unixODBC-2.2.14-p2/0040755000076400007640000000000011163161010012166 5ustar nicknickunixODBC-2.2.14-p2/Interix/0040755000076400007640000000000011150523331013614 5ustar nicknickunixODBC-2.2.14-p2/Interix/configure0100644000076400007640000200055410307012274015525 0ustar nicknick#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 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 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+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; 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 || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # 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 # 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 as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; 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 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') 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=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # 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 before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, 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 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { 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 sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Find the correct PATH separator. Usually this is `:', but # DJGPP uses `;' like DOS. if test "X${PATH_SEPARATOR+set}" != Xset; then UNAME=${UNAME-`uname 2>/dev/null`} case X$UNAME in *-DOS) lt_cv_sys_path_separator=';' ;; *) lt_cv_sys_path_separator=':' ;; esac PATH_SEPARATOR=$lt_cv_sys_path_separator fi # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do 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="$save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi # 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` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="DRVConfig/MiniSQL/odbcminiS.c" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subdirs_all="$ac_subdirs_all libltdl" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE YACC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE CPP LEX LEXLIB LEX_OUTPUT_ROOT LN_S CXX CXXFLAGS ac_ct_CXX CXXDEPMODE EGREP subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os ECHO RANLIB ac_ct_RANLIB LIBTOOL INCLTDL LIBLTDL SHLIBEXT LIBICONV ICONV_CHAR_ENCODING ICONV_UNICODE_ENCODING LIBADD_CRYPT LIBADD_POW READLINE HAVE_FLEX_TRUE HAVE_FLEX_FALSE LFLAGS LIBADD_DL PTH_CPPFLAGS PTH_CFLAGS PTH_LDFLAGS PTH_LIBS LIBSOCKET LIBNSL USER_INCLUDES USER_LDFLAGS LIBZ LIBPNG qt_libraries qt_includes QT_INCLUDES QT_LDFLAGS MOC LIB_QT X_INCLUDES X_LDFLAGS x_libraries x_includes LIB_X11 msql_libraries msql_headers MSQL_TRUE MSQL_FALSE QT_TRUE QT_FALSE DRIVERS_TRUE DRIVERS_FALSE FDB_TRUE FDB_FALSE QNX_TRUE QNX_FALSE WITHLT_TRUE WITHLT_FALSE ALLOCA LIB_VERSION LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # 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. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= 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 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -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 | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$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 ;; -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 ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 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 ;; -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=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 ;; -*) { 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 && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 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'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac 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 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 # 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 its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | 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 if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS # # 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 \`..'] _ACEOF cat <<_ACEOF 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] --datadir=DIR read-only architecture-independent data [PREFIX/share] --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] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _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] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors --enable-static=PKGS build static libraries default=no --enable-shared=PKGS build shared libraries default=yes --enable-gui build GUI Parts default=yes --enable-threads build with thread support default=yes --enable-gnuthreads build with gnu threads support default=no --enable-readline build with readline support default=yes --enable-drivers build included drivers default=yes --enable-fdb build file-based data access default=no --enable-fastvalidate use relaxed handle checking in the DM default=no --enable-iconv build with iconv support default=yes --enable-stats build with statistic gathering support default=yes --enable-rtldgroup build with RTLD_GROUP passed to dlopen (when supported) default=yes --enable-ltdllib Use system libltdl.so (if found) default=no --enable-fast-install=PKGS optimize for fast installation default=yes --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld default=no --with-pic try to use only PIC/non-PIC objects default=use both --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib --with-iconv-char-enc=enc Encoding to use as ASCII default=auto-search --with-iconv-ucode-enc=enc Encoding to use as UNICODE default=auto-search --with-pth=ARG Build with GNU Pth Library (default=yes) --with-pth-test Perform GNU Pth Sanity Test (default=yes) --with-qt-dir=DIR where the root of Qt is installed --with-qt-includes=DIR where the Qt includes are. --with-qt-libraries=DIR where the Qt library is installed. --with-qt-bin=DIR where the Qt binaries are installed. --with-extra-includes=DIR adds non standard include paths --with-extra-libs=DIR adds non standard library paths --with-extra-xlibs= adds non standard library for X --with-msql-lib=DIR where the root of MiniSQL libs are installed --with-msql-include=DIR where the MiniSQL headers are installed 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 CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style 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 elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright (C) 2003 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 0 fi exec 5>config.log cat >&5 <<_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.59. Invocation command line was $ $0 $@ _ACEOF { 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` hostinfo = `(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=. echo "PATH: $as_dir" done } >&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_sep= 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=`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_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; 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: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. 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, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf 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 -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >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 explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 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 { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 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 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`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 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 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 am__api_version="1.6" 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 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # 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. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$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 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$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' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 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 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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 $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # Define the identity of the package. PACKAGE=unixODBC VERSION=2.2.12 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"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$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" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done 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 echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 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. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? 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.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. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 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 echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&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' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { 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 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 echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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 | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 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 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 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 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=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 -std1 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 -std1. */ int osf4_cc_array ['\x00' == 0 ? 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 # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f 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. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext 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 rm -f .deps 2>/dev/null mkdir .deps 2>/dev/null if test -d .deps; then DEPDIR=.deps else # MS-DOS does not allow filenames that begin with a dot. DEPDIR=_deps fi rmdir .deps 2>/dev/null ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-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= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 for depmode in $am_compiler_list; do # 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. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_CC_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type 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 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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 echo $ECHO_N "(cached) $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else 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 non-existent 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else 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 echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else 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 non-existent 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else 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 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 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 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then echo "$as_me:$LINENO: result: $LEX" >&5 echo "${ECHO_T}$LEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test -z "$LEXLIB" then echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5 echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6 if test "${ac_cv_lib_fl_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfl $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yywrap (); int main () { yywrap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_fl_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fl_yywrap=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 if test $ac_cv_lib_fl_yywrap = yes; then LEXLIB="-lfl" else echo "$as_me:$LINENO: checking for yywrap in -ll" >&5 echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6 if test "${ac_cv_lib_l_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ll $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yywrap (); int main () { yywrap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_l_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_l_yywrap=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6 if test $ac_cv_lib_l_yywrap = yes; then LEXLIB="-ll" fi fi fi if test "x$LEX" != "x:"; then echo "$as_me:$LINENO: checking lex output file root" >&5 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6 if test "${ac_cv_prog_lex_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # The minimal lex program is just a single line: %%. But some broken lexes # (Solaris, I think it was) want two %% lines, so accommodate them. cat >conftest.l <<_ACEOF %% %% _ACEOF { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5 (eval $LEX conftest.l) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 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 { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 rm -f conftest.l LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS=$LIBS LIBS="$LIBS $LEXLIB" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_lex_yytext_pointer=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS rm -f "${LEX_OUTPUT_ROOT}.c" fi echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 echo "${ECHO_T}$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 fi if test "$LEX" = :; then LEX=${am_missing_run}flex 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. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$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 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$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' echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi # Check whether --enable-static or --disable-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. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac else enable_static=no fi; # Check whether --enable-shared or --disable-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. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac else enable_shared=yes fi; # Check whether --enable-gui or --disable-gui was given. if test "${enable_gui+set}" = set; then enableval="$enable_gui" case "${enableval}" in yes) gui=true ;; no) gui=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-gui" >&5 echo "$as_me: error: bad value ${enableval} for --enable-gui" >&2;} { (exit 1); exit 1; }; } ;; esac else gui=true fi; if test "x$gui" = "xtrue"; then ac_ext=cc 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 -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$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 for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f 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. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h 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= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 for depmode in $am_compiler_list; do # 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. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_CXX_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type else 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 fi # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then enableval="$enable_threads" case "${enableval}" in yes) thread=true ;; no) thread=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-thread" >&5 echo "$as_me: error: bad value ${enableval} for --enable-thread" >&2;} { (exit 1); exit 1; }; } ;; esac else thread=true fi; # Check whether --enable-gnuthreads or --disable-gnuthreads was given. if test "${enable_gnuthreads+set}" = set; then enableval="$enable_gnuthreads" case "${enableval}" in yes) gnuthread=true ;; no) gnuthread=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-gnuthread" >&5 echo "$as_me: error: bad value ${enableval} for --enable-gnuthread" >&2;} { (exit 1); exit 1; }; } ;; esac else gnuthread=false fi; # Check whether --enable-readline or --disable-readline was given. if test "${enable_readline+set}" = set; then enableval="$enable_readline" case "${enableval}" in yes) readline=true ;; no) readline=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-readline" >&5 echo "$as_me: error: bad value ${enableval} for --enable-readline" >&2;} { (exit 1); exit 1; }; } ;; esac else readline=true fi; # Check whether --enable-drivers or --disable-drivers was given. if test "${enable_drivers+set}" = set; then enableval="$enable_drivers" case "${enableval}" in yes) drivers=true ;; no) drivers=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-drivers" >&5 echo "$as_me: error: bad value ${enableval} for --enable-drivers" >&2;} { (exit 1); exit 1; }; } ;; esac else drivers=true fi; # Check whether --enable-fdb or --disable-fdb was given. if test "${enable_fdb+set}" = set; then enableval="$enable_fdb" case "${enableval}" in yes) fdb=true ;; no) fdb=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-fdb" >&5 echo "$as_me: error: bad value ${enableval} for --enable-fdb" >&2;} { (exit 1); exit 1; }; } ;; esac else fdb=false fi; # Check whether --enable-fastvalidate or --disable-fastvalidate was given. if test "${enable_fastvalidate+set}" = set; then enableval="$enable_fastvalidate" case "${enableval}" in yes) fastvalidate=true ;; no) fastvalidate=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-fastvalidate" >&5 echo "$as_me: error: bad value ${enableval} for --enable-fastvalidate" >&2;} { (exit 1); exit 1; }; } ;; esac else fastvalidate=false fi; # Check whether --enable-iconv or --disable-iconv was given. if test "${enable_iconv+set}" = set; then enableval="$enable_iconv" case "${enableval}" in yes) iconv=true ;; no) iconv=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-iconv" >&5 echo "$as_me: error: bad value ${enableval} for --enable-iconv" >&2;} { (exit 1); exit 1; }; } ;; esac else iconv=true fi; echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f 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 #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/sem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else 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 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF semh=true else semh=false fi done # Check whether --enable-stats or --disable-stats was given. if test "${enable_stats+set}" = set; then enableval="$enable_stats" case "${enableval}" in yes) if test "x$semh" = "xfalse"; then { { echo "$as_me:$LINENO: error: stats enabled but required header was not found" >&5 echo "$as_me: error: stats enabled but required header was not found" >&2;} { (exit 1); exit 1; }; } fi stats=true ;; no) stats=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-stats" >&5 echo "$as_me: error: bad value ${enableval} for --enable-stats" >&2;} { (exit 1); exit 1; }; } ;; esac else stats=$semh fi; # Check whether --enable-rtldgroup or --disable-rtldgroup was given. if test "${enable_rtldgroup+set}" = set; then enableval="$enable_rtldgroup" case "${enableval}" in yes) rtldgroup=true ;; no) rtldgroup=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-rltdgroup" >&5 echo "$as_me: error: bad value ${enableval} for --enable-rltdgroup" >&2;} { (exit 1); exit 1; }; } ;; esac else rtldgroup=true fi; # Check whether --enable-ltdllib or --disable-ltdllib was given. if test "${enable_ltdllib+set}" = set; then enableval="$enable_ltdllib" case "${enableval}" in yes) ltdllib=true ;; no) ltdllib=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-ltdllib" >&5 echo "$as_me: error: bad value ${enableval} for --enable-ltdllib" >&2;} { (exit 1); exit 1; }; } ;; esac else ltdllib=false fi; INCLTDL="" LIBLTDL="" echo "$as_me:$LINENO: checking Have we enabled using RTLD_GROUP " >&5 echo $ECHO_N "checking Have we enabled using RTLD_GROUP ... $ECHO_C" >&6 if test "x$rtldgroup" = "xtrue"; then echo "$as_me:$LINENO: result: yes " >&5 echo "${ECHO_T}yes " >&6 case $enable_ltdl_convenience in no) { { echo "$as_me:$LINENO: error: this package needs a convenience libltdl" >&5 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_builddir}/''libltdl'/libltdlc.la INCLTDL='-I${top_srcdir}/''libltdl' else echo "$as_me:$LINENO: result: no " >&5 echo "${ECHO_T}no " >&6; case $enable_ltdl_convenience in no) { { echo "$as_me:$LINENO: error: this package needs a convenience libltdl" >&5 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 --enable-rtdlgroup=no" ;; esac LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la INCLTDL='-I${top_srcdir}/''libltdl' fi subdirs="$subdirs libltdl" # Check whether --enable-fast-install or --disable-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. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Find the correct PATH separator. Usually this is `:', but # DJGPP uses `;' like DOS. if test "X${PATH_SEPARATOR+set}" != Xset; then UNAME=${UNAME-`uname 2>/dev/null`} case X$UNAME in *-DOS) lt_cv_sys_path_separator=';' ;; *) lt_cv_sys_path_separator=':' ;; esac PATH_SEPARATOR=$lt_cv_sys_path_separator fi # Check whether --with-gnu-ld or --without-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. echo "$as_me:$LINENO: checking for ld used by GCC" >&5 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&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 echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_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 lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else lt_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$lt_cv_path_LD" if test -n "$LD"; then echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then lt_cv_prog_gnu_ld=yes else lt_cv_prog_gnu_ld=no fi fi echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/${ac_tool_prefix}nm if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then lt_cv_path_NM="$tmp_nm -B" break elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then lt_cv_path_NM="$tmp_nm -p" break else 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 fi fi done IFS="$ac_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi NM="$lt_cv_path_NM" echo "$as_me:$LINENO: result: $NM" >&5 echo "${ECHO_T}$NM" >&6 echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5 echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 egrep 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 aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi4*) 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* | mingw* | pw32*) lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' lt_cv_file_magic_cmd='/usr/bin/file -L' case "$host_os" in rhapsody* | darwin1.[012]) lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` ;; *) # Darwin 1.3 on lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac ;; freebsd*) 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)/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 ;; interix*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20*|hpux11*) 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_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; irix5* | irix6*) case $host_os in irix5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux-gnu*) case $host_cpu in alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' else lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' 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 ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' lt_cv_file_magic_test_file=/shlib/libc.so lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_test_file=/lib/libc.so ;; sysv5uw[78]* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; esac ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output" >&5 echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix*) symcode='[BCDEGRST]' ;; solaris* | sysv5*) symcode='[BDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $host_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then symcode='[ABCDGISTW]' fi # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? 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=$? 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 egrep ' nm_test_var$' "$nlist" >/dev/null; then if egrep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = { EOF sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest; then pipe_works=yes fi LIBS="$save_LIBS" CFLAGS="$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 -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" if test -z "$lt_cv_sys_global_symbol_pipe"; then global_symbol_to_cdecl= global_symbol_to_c_name_address= else global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" fi if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else 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 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in /*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; ?:/*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. ;; *) ac_save_MAGIC_CMD="$MAGIC_CMD" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="/usr/bin:$PATH" for ac_dir in $ac_dummy; do 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 <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$ac_save_ifs" MAGIC_CMD="$ac_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in /*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; ?:/*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. ;; *) ac_save_MAGIC_CMD="$MAGIC_CMD" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="/usr/bin:$PATH" for ac_dir in $ac_dummy; do 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 <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$ac_save_ifs" MAGIC_CMD="$ac_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-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 *-*-irix6*) # Find out which ABI we are using. echo '#line 5861 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then 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 rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.err conftest.$ac_objext \ 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 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$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 ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" need_locks="$enable_libtool_lock" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o if test x"$host" != x"$build"; then ac_tool_prefix=${host_alias}- else ac_tool_prefix= fi # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case $host_os in linux-gnu*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac 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 # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Allow CC to be a program name with arguments. set dummy $CC compiler="$2" echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. objdir=_libs fi rmdir .libs 2>/dev/null echo "$as_me:$LINENO: result: $objdir" >&5 echo "${ECHO_T}$objdir" >&6 # Check whether --with-pic or --without-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 # We assume here that the value for lt_cv_prog_cc_pic will not be cached # in isolation, and that seeing it set (from the cache) indicates that # the associated values are set (in the cache) correctly too. echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "${lt_cv_prog_cc_pic+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_cc_pic= lt_cv_prog_cc_shlib= lt_cv_prog_cc_wl= lt_cv_prog_cc_static= lt_cv_prog_cc_no_builtin= lt_cv_prog_cc_can_build_shared=$can_build_shared if test "$GCC" = yes; then lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-static' case $host_os in aix*) # Below there is a dirty hack to force normal static linking with -ldl # The problem is because libdl dynamically linked with both libc and # libC (AIX C++ library), which obviously doesn't included in libraries # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # not sure about C++ programs. lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_cv_prog_cc_pic='-fno-common' ;; cygwin* | mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_cv_prog_cc_pic='-DDLL_EXPORT' ;; sysv4*MP*) if test -d /usr/nec; then lt_cv_prog_cc_pic=-Kconform_pic fi ;; *) lt_cv_prog_cc_pic='-fPIC' ;; esac else # PORTME Check for PIC flags for the system compiler. case $host_os in aix3* | aix4* | aix5*) lt_cv_prog_cc_wl='-Wl,' # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_cv_prog_cc_static='-Bstatic' else lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' fi ;; hpux9* | hpux10* | hpux11*) # Is there a better lt_cv_prog_cc_static that works with the bundled CC? lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" lt_cv_prog_cc_pic='+Z' ;; irix5* | irix6*) lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' # PIC (with -KPIC) is the default. ;; cygwin* | mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_cv_prog_cc_pic='-DDLL_EXPORT' ;; newsos6) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' ;; osf3* | osf4* | osf5*) # All OSF/1 code is PIC. lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' ;; sco3.2v5*) lt_cv_prog_cc_pic='-Kpic' lt_cv_prog_cc_static='-dn' lt_cv_prog_cc_shlib='-belf' ;; solaris*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Wl,' ;; sunos4*) lt_cv_prog_cc_pic='-PIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' if test "x$host_vendor" = xsni; then lt_cv_prog_cc_wl='-LD' else lt_cv_prog_cc_wl='-Wl,' fi ;; uts4*) lt_cv_prog_cc_pic='-pic' lt_cv_prog_cc_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_cv_prog_cc_pic='-Kconform_pic' lt_cv_prog_cc_static='-Bstatic' fi ;; *) lt_cv_prog_cc_can_build_shared=no ;; esac fi fi if test -z "$lt_cv_prog_cc_pic"; then echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 else echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5 echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6 # Check to make sure the pic_flag actually works. echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6 if test "${lt_cv_prog_cc_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then case $host_os in hpux9* | hpux10* | hpux11*) # On HP-UX, both CC and GCC only warn that PIC is supported... then # they create non-PIC objects. So, if there were any warnings, we # assume that PIC is not supported. if test -s conftest.err; then lt_cv_prog_cc_pic_works=no else lt_cv_prog_cc_pic_works=yes fi ;; *) lt_cv_prog_cc_pic_works=yes ;; esac else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_prog_cc_pic_works=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi if test "X$lt_cv_prog_cc_pic_works" = Xno; then lt_cv_prog_cc_pic= lt_cv_prog_cc_can_build_shared=no else lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" fi echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5 echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6 fi # Check for any special shared library compilation flags. if test -n "$lt_cv_prog_cc_shlib"; then { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5 echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;} if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then : else { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} lt_cv_prog_cc_can_build_shared=no fi fi echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6 if test "${lt_cv_prog_cc_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_cc_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" 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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_prog_cc_static_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi # Belt *and* braces to stop my trousers falling down: test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5 echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6 pic_flag="$lt_cv_prog_cc_pic" special_shlib_compile_flags="$lt_cv_prog_cc_shlib" wl="$lt_cv_prog_cc_wl" link_static_flag="$lt_cv_prog_cc_static" no_builtin_flag="$lt_cv_prog_cc_no_builtin" can_build_shared="$lt_cv_prog_cc_can_build_shared" # Check to see if options -o and -c are simultaneously supported by compiler echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else $rm -r conftest 2>/dev/null mkdir conftest cd conftest echo "int some_variable = 0;" > conftest.$ac_ext mkdir out # According to Tom Tromey, Ian Lance Taylor reported there are C compilers # that will create temporary files in the current directory regardless of # the output directory. Thus, making CWD read-only will cause this test # to fail, enabling locking or at least warning the user not to do parallel # builds. chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no if { (eval echo configure:6423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then lt_cv_compiler_c_o=no else lt_cv_compiler_c_o=yes fi else # Append any errors to the config.log. cat out/conftest.err 1>&5 lt_cv_compiler_c_o=no fi CFLAGS="$save_CFLAGS" chmod u+w . $rm conftest* out/* rmdir out cd .. rmdir conftest $rm -r conftest 2>/dev/null fi compiler_c_o=$lt_cv_compiler_c_o echo "$as_me:$LINENO: result: $compiler_c_o" >&5 echo "${ECHO_T}$compiler_c_o" >&6 if test x"$compiler_c_o" = x"yes"; then # Check to see if we can write to a .lo echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6 if test "${lt_cv_compiler_o_lo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_compiler_o_lo=no save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -c -o conftest.lo" save_objext="$ac_objext" ac_objext=lo cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { int some_variable = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then lt_cv_compiler_o_lo=no else lt_cv_compiler_o_lo=yes fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_objext="$save_objext" CFLAGS="$save_CFLAGS" fi compiler_o_lo=$lt_cv_compiler_o_lo echo "$as_me:$LINENO: result: $compiler_o_lo" >&5 echo "${ECHO_T}$compiler_o_lo" >&6 else compiler_o_lo=no fi # Check to see if we can do hard links to lock some files if needed hard_links="nottested" if test "$compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 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 if test "$GCC" = yes; then # Check to see if options -fno-rtti -fno-exceptions are supported by compiler echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 echo "int some_variable = 0;" > conftest.$ac_ext save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" compiler_rtti_exceptions=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { int some_variable = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then compiler_rtti_exceptions=no else compiler_rtti_exceptions=yes fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5 echo "${ECHO_T}$compiler_rtti_exceptions" >&6 if test "$compiler_rtti_exceptions" = "yes"; then no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' else no_builtin_flag=' -fno-builtin' fi fi # See if the linker supports building shared libraries. echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6 allow_undefined_flag= no_undefined_flag= need_lib_prefix=unknown need_version=unknown # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments archive_cmds= archive_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_into_libs=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= link_all_deplibs=unknown always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an egrep regular expression 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_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX, the GNU linker is very broken # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF ;; amigaos*) 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 # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | egrep ': 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*) # 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=yes extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ test -f $output_objdir/impgen.exe || (cd $output_objdir && \ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ else $CC -o impgen impgen.c ; fi)~ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' # cygwin and mingw dlls have different entry points and sets of symbols # to exclude. # FIXME: what about values for MSVC? dll_entry=__cygwin_dll_entry@12 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ case $host_os in mingw*) # mingw values dll_entry=_DllMainCRTStartup@12 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ ;; esac # mingw and cygwin differ, and it's simplest to just exclude the union # of the two symbol sets. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one (in ltdll.c) if test "x$lt_cv_need_dllmain" = "xyes"; then ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' else ltdll_obj= ltdll_cmds= fi # Extract the symbol export list from an `--export-all' def file, # then regenerate the def file from the symbol export list, so that # the compiled dll only exports the symbol export list. # Be careful not to strip the DATA tag left be newer dlltools. export_symbols_cmds="$ltdll_cmds"' $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def; _lt_hint=1; cat $export_symbols | while read symbol; do set dummy \$symbol; case \$# in 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; esac; _lt_hint=`expr 1 + \$_lt_hint`; done; fi~ '"$ltdll_cmds"' $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' ;; 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 -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | egrep ': supported targets:.* interix' > /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 ;; interix*) 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 -o $lib' ;; 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 | egrep ': 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" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' case $host_os in cygwin* | mingw* | pw32*) # dlltool doesn't understand --whole-archive et. al. whole_archive_flag_spec= ;; *) # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi ;; esac 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 "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. hardcode_direct=yes archive_cmds='' 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 hardcode_direct=yes 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' else # not using gcc if test "$host_cpu" = ia64; then shared_flag='${wl}-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall can do strange things, 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' hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then 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 ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. allow_undefined_flag='${wl}-berok' # This is a bit strange, but is similar to how AIX traditionally builds # it's shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' fi fi ;; amigaos*) 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 # see comment about different semantics on the GNU ld section ld_shlibs=no ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. 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"`' ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on allow_undefined_flag='-flat_namespace -undefined suppress' ;; esac # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' hardcode_direct=yes hardcode_shlibpath_var=no whole_archive_flag_spec='-all_load $convenience' ;; 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*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9* | hpux10* | hpux11*) case $host_os in hpux9*) 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' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_minus_L=yes # Not in the search PATH, but as the default # location of the library. export_dynamic_flag_spec='${wl}-E' ;; irix5* | irix6*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: 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 ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no 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 $linker_flags' 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 $linker_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi 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 ${wl}-set_version ${wl}$verstring` ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf '-exported_symbol ' >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' #Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) 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 export_dynamic_flag_spec='${wl}-Bexport' ;; solaris*) # gcc --version < 3.0 without binutils cannot create self contained # shared libraries reliably, requiring libgcc.a to resolve some of # the object symbols generated in some cases. Libraries that use # assert need libgcc.a to resolve __eprintf, for example. Linking # a copy of libgcc.a into every shared library to guarantee resolving # such symbols causes other problems: According to Tim Van Holder # , C++ libraries end up with a separate # (to the application) exception stack for one thing. no_undefined_flag=' -z defs' if test "$GCC" = yes; then case `$CC --version 2>/dev/null` in [12].*) cat <&2 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably *** create self contained shared libraries on Solaris systems, without *** introducing a dependency on libgcc.a. Therefore, libtool is disabling *** -no-undefined support, which will at least allow you to build shared *** libraries. However, you may find that when you link such libraries *** into an application without using GCC, you have to manually add *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to *** upgrade to a newer version of GCC. Another option is to rebuild your *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. EOF no_undefined_flag= ;; esac fi # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now 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' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; 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) if test "x$host_vendor" = xsno; then archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? else 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 fi 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' ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now # Dont do the -M $lib.exp, it fails on unixware 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} -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; 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.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5uw7* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no # Check hardcoding attributes. echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var"; then # We can hardcode non-existant 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 "$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 echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi reload_cmds='$LD$reload_flag -o $output$reload_objs' test -z "$deplibs_check_method" && deplibs_check_method=unknown # PORTME Fill in your ld.so characteristics echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= 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" sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}.so$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}.so$major' ;; aix4* | aix5*) version_type=linux if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' 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}.so$versuffix ${libname}${release}.so$major $libname.so' 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}.so$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; beos*) library_names_spec='${libname}.so' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$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" export_dynamic_flag_spec=-rdynamic # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin*) library_names_spec='$libname.dll.a' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog .libs/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' ;; yes,mingw*) library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` ;; yes,pw32*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll' ;; *) library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; *) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' soname_spec='${libname}${release}.so$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. dynamic_linker="$host_os dld.sl" version_type=sunos need_lib_prefix=no need_version=no shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' soname_spec='${libname}${release}.sl$major' # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6*) version_type=irix need_lib_prefix=no need_version=no soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' case $host_os in irix5*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 ") 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}" ;; # No shared lib support for Linux oldld, aout, or coff. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) dynamic_linker=no ;; # This must be Linux ELF. linux-gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; 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}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no 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 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; os2*) libname_spec='$name' need_lib_prefix=no library_names_spec='$libname.dll $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_version=no soname_spec='${libname}${release}.so' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; solaris*|interix*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=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 ;; uts4*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' soname_spec='$libname.so.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 ;; aix4*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi 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 "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 ;; cygwin* | mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char 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 #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char 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 #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" 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" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$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 if test "$enable_shared" = yes && test "$GCC" = yes; then case $host_os in sco3.2v5*) # On SCO 5, an explicit -lc is not wanted when making shared # libraries. It's unnecessary, and giving it makes strange things # happen, like profiler mcount calls segfaulting and ctype.h # macros not working (if used in a library but not the mainline). # FIXME: Maybe the below code could detect -lc is unnecessary, but # SCO $archive_cmds uses $LD, so it's not reached. lt_cv_archive_cmds_need_lc=no ;; esac 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. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 if test "${lt_cv_archive_cmds_need_lc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else $rm conftest* echo 'static int dummy;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_cv_prog_cc_wl compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest 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=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$save_allow_undefined_flag else cat conftest.err 1>&5 fi fi echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6 ;; esac else case $host_os in sco3.2v5*) # On SCO 5, an explicit -lc is not wanted when making shared # libraries. It's unnecessary, and giving it makes strange things # happen, like profiler mcount calls segfaulting and ctype.h # macros not working (if used in a library but not the mainline). # FIXME: Maybe the below code could detect -lc is unnecessary, but # SCO $archive_cmds uses $LD, so it's not reached. lt_cv_archive_cmds_need_lc=no ;; esac fi need_lc=${lt_cv_archive_cmds_need_lc-yes} # The second clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then : else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. test -f Makefile && make "$ltmain" fi if test -f "$ltmain"; then trap "$rm \"${ofile}T\"; exit 1" 1 2 15 $rm -f "${ofile}T" echo creating $ofile # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS \ AR AR_FLAGS CC LD LN_S NM SHELL \ reload_flag reload_cmds wl \ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ library_names_spec soname_spec \ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ old_striplib striplib file_magic_cmd export_symbols_cmds \ deplibs_check_method allow_undefined_flag no_undefined_flag \ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ global_symbol_to_c_name_address \ hardcode_libdir_flag_spec hardcode_libdir_separator \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do case $var in reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ postinstall_cmds | postuninstall_cmds | \ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done cat <<__EOF__ > "${ofile}T" #! $SHELL # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996-2000 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="sed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$need_lc # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # The default C compiler. CC=$lt_CC # Is the compiler the GNU C compiler? with_gcc=$GCC # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_pic_flag pic_mode=$pic_mode # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_compiler_c_o # Can we write directly to a .lo ? compiler_o_lo=$lt_compiler_o_lo # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_link_static_flag # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_no_builtin_flag # 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 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_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 and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # 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.so during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # 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 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$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 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "${ofile}T" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac case $host_os in cygwin* | mingw* | pw32* | os2*) cat <<'EOF' >> "${ofile}T" # This is a source program that is used to create dlls on Windows # Don't remove nor modify the starting and closing comments # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ # This is a source program that is used to create import libraries # on Windows for dlls which lack them. Don't remove nor modify the # starting and closing comments # /* impgen.c starts here */ # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. # # This file is part of GNU libtool. # # This program is free software; you can 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. # */ # # #include /* for printf() */ # #include /* for open(), lseek(), read() */ # #include /* for O_RDONLY, O_BINARY */ # #include /* for strdup() */ # # /* O_BINARY isn't required (or even defined sometimes) under Unix */ # #ifndef O_BINARY # #define O_BINARY 0 # #endif # # static unsigned int # pe_get16 (fd, offset) # int fd; # int offset; # { # unsigned char b[2]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 2); # return b[0] + (b[1]<<8); # } # # static unsigned int # pe_get32 (fd, offset) # int fd; # int offset; # { # unsigned char b[4]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 4); # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # static unsigned int # pe_as32 (ptr) # void *ptr; # { # unsigned char *b = ptr; # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # int # main (argc, argv) # int argc; # char *argv[]; # { # int dll; # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; # unsigned long export_rva, export_size, nsections, secptr, expptr; # unsigned long name_rvas, nexp; # unsigned char *expdata, *erva; # char *filename, *dll_name; # # filename = argv[1]; # # dll = open(filename, O_RDONLY|O_BINARY); # if (dll < 1) # return 1; # # dll_name = filename; # # for (i=0; filename[i]; i++) # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') # dll_name = filename + i +1; # # pe_header_offset = pe_get32 (dll, 0x3c); # opthdr_ofs = pe_header_offset + 4 + 20; # num_entries = pe_get32 (dll, opthdr_ofs + 92); # # if (num_entries < 1) /* no exports */ # return 1; # # export_rva = pe_get32 (dll, opthdr_ofs + 96); # export_size = pe_get32 (dll, opthdr_ofs + 100); # nsections = pe_get16 (dll, pe_header_offset + 4 +2); # secptr = (pe_header_offset + 4 + 20 + # pe_get16 (dll, pe_header_offset + 4 + 16)); # # expptr = 0; # for (i = 0; i < nsections; i++) # { # char sname[8]; # unsigned long secptr1 = secptr + 40 * i; # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); # unsigned long vsize = pe_get32 (dll, secptr1 + 16); # unsigned long fptr = pe_get32 (dll, secptr1 + 20); # lseek(dll, secptr1, SEEK_SET); # read(dll, sname, 8); # if (vaddr <= export_rva && vaddr+vsize > export_rva) # { # expptr = fptr + (export_rva - vaddr); # if (export_rva + export_size > vaddr + vsize) # export_size = vsize - (export_rva - vaddr); # break; # } # } # # expdata = (unsigned char*)malloc(export_size); # lseek (dll, expptr, SEEK_SET); # read (dll, expdata, export_size); # erva = expdata - export_rva; # # nexp = pe_as32 (expdata+24); # name_rvas = pe_as32 (expdata+32); # # printf ("EXPORTS\n"); # for (i = 0; i> "${ofile}T" || (rm -f "${ofile}T"; exit 1) mv -f "${ofile}T" "$ofile" || \ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") chmod +x "$ofile" fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion use_builtin_libtool="no" if test "x$ltdllib" = "xtrue"; then echo "$as_me:$LINENO: checking for lt_dlopen in -lltdl" >&5 echo $ECHO_N "checking for lt_dlopen in -lltdl... $ECHO_C" >&6 if test "${ac_cv_lib_ltdl_lt_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char lt_dlopen (); int main () { lt_dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ltdl_lt_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ltdl_lt_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlopen" >&6 if test $ac_cv_lib_ltdl_lt_dlopen = yes; then LIBLTDL="-lltdl" else use_builtin_libtool="yes" fi if test "x$use_builtin_libtool" = "xno"; then for ac_header in ltdl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else 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 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else use_builtin_libtool="yes" fi done fi else use_builtin_libtool="yes" fi echo "$as_me:$LINENO: checking if we are using the included libltdl " >&5 echo $ECHO_N "checking if we are using the included libltdl ... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $use_builtin_libtool " >&5 echo "${ECHO_T}$use_builtin_libtool " >&6 echo "$as_me:$LINENO: checking which extension is used for shared libraries" >&5 echo $ECHO_N "checking which extension is used for shared libraries... $ECHO_C" >&6 if test "${libltdl_cv_shlibext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_last= for ac_spec in $library_names_spec; do ac_last="$ac_spec" done echo "$ac_last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest libltdl_cv_shlibext=`cat conftest` rm -f conftest fi echo "$as_me:$LINENO: result: $libltdl_cv_shlibext" >&5 echo "${ECHO_T}$libltdl_cv_shlibext" >&6 if test -n "$libltdl_cv_shlibext"; then cat >>confdefs.h <<_ACEOF #define LTDL_SHLIB_EXT "$libltdl_cv_shlibext" _ACEOF fi SHLIBEXT="$libltdl_cv_shlibext" if test "x$iconv" = "xtrue"; then # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then withval="$with_libiconv_prefix" for dir in `echo "$withval" | tr : ' '`; do if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi done fi; echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6 if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=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 () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" 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 () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 echo "${ECHO_T}$am_cv_func_iconv" >&6 if test "$am_cv_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF echo "$as_me:$LINENO: checking for iconv declaration" >&5 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- }$am_cv_proto_iconv" >&6 cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi LIBICONV= if test "$am_cv_lib_iconv" = yes; then LIBICONV="-liconv" fi iconv_char_enc="auto-search" # Check whether --with-iconv_char_enc or --without-iconv_char_enc was given. if test "${with_iconv_char_enc+set}" = set; then withval="$with_iconv_char_enc" iconv_char_enc="$withval" fi; ICONV_CHAR_ENCODING="$iconv_char_enc" iconv_ucode_enc="auto-search" # Check whether --with-iconv_ucode_enc or --without-iconv_ucode_enc was given. if test "${with_iconv_ucode_enc+set}" = set; then withval="$with_iconv_ucode_enc" iconv_ucode_enc="$withval" fi; ICONV_CHAR_ENCODING="" ICONV_UNICODE_ENCODING="" if test "$am_cv_func_iconv" = yes; then echo "$as_me:$LINENO: checking for encoding to use for CHAR representations " >&5 echo $ECHO_N "checking for encoding to use for CHAR representations ... $ECHO_C" >&6; ICONV_CHAR_ENCODING="$iconv_char_enc" echo "$as_me:$LINENO: result: $iconv_char_enc " >&5 echo "${ECHO_T}$iconv_char_enc " >&6; echo "$as_me:$LINENO: checking for encoding to use for UNICODE representations " >&5 echo $ECHO_N "checking for encoding to use for UNICODE representations ... $ECHO_C" >&6; ICONV_UNICODE_ENCODING="$iconv_ucode_enc" echo "$as_me:$LINENO: result: $iconv_ucode_enc " >&5 echo "${ECHO_T}$iconv_ucode_enc " >&6; fi fi echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 if test "${ac_cv_lib_crypt_crypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char crypt (); int main () { crypt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_crypt_crypt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_crypt_crypt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 if test $ac_cv_lib_crypt_crypt = yes; then LIBADD_CRYPT="-lcrypt"; cat >>confdefs.h <<\_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF fi echo "$as_me:$LINENO: checking for pow in -lm" >&5 echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_pow+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char pow (); int main () { pow (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_pow=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_pow=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5 echo "${ECHO_T}$ac_cv_lib_m_pow" >&6 if test $ac_cv_lib_m_pow = yes; then LIBADD_POW="-lm" fi have_readline="no" if test "x$readline" = "xtrue"; then echo "$as_me:$LINENO: checking for readline in -lreadline " >&5 echo $ECHO_N "checking for readline in -lreadline ... $ECHO_C" >&6 ac_save_LIBS="$LIBS" LIBS="-lreadline $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char readline(); int main () { readline() ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 READLINE=-lreadline have_readline="yes" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "$as_me:$LINENO: checking for readline in -lreadline -lcurses " >&5 echo $ECHO_N "checking for readline in -lreadline -lcurses ... $ECHO_C" >&6 ac_save_LIBS="$LIBS" LIBS="-lreadline -lcurses $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char readline(); int main () { readline() ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 READLINE="-lreadline -lcurses" have_readline="yes" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "x$have_readline" = "xyes"; then for ac_header in readline/history.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else 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 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_READLINE 1 _ACEOF fi done fi fi if test "x$drivers" = "xtrue"; then echo "$as_me:$LINENO: checking Are we using flex " >&5 echo $ECHO_N "checking Are we using flex ... $ECHO_C" >&6 if test "x$LEX" = "xflex"; then LFLAGS="$LFLAGS -i" echo "$as_me:$LINENO: result: yes " >&5 echo "${ECHO_T}yes " >&6; else echo "$as_me:$LINENO: result: no - text driver disabled " >&5 echo "${ECHO_T}no - text driver disabled " >&6; fi if test "x$LEX" = "xflex" ; then HAVE_FLEX_TRUE= HAVE_FLEX_FALSE='#' else HAVE_FLEX_TRUE='#' HAVE_FLEX_FALSE= fi else if test "xabc" = "xdef" ; then HAVE_FLEX_TRUE= HAVE_FLEX_FALSE='#' else HAVE_FLEX_TRUE='#' HAVE_FLEX_FALSE= fi fi case $host_os in *qnx* ) qnx="true" cat >>confdefs.h <<\_ACEOF #define QNX_LIBLTDL 1 _ACEOF ;; esac echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$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 for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else 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 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for long" >&5 echo $ECHO_N "checking for long... $ECHO_C" >&6 if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 () { if ((long *) 0) return 0; if (sizeof (long)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 echo "${ECHO_T}$ac_cv_type_long" >&6 echo "$as_me:$LINENO: checking size of long" >&5 echo $ECHO_N "checking size of long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. 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. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_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. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else 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 conftest.err conftest.$ac_objext conftest.$ac_ext done else 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. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_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. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else 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 conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f 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. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 long longval () { return (long) (sizeof (long)); } unsigned long ulongval () { return (long) (sizeof (long)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (long))) < 0) { long i = longval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_long=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF echo "$as_me:$LINENO: checking if platform is 64 bit" >&5 echo $ECHO_N "checking if platform is 64 bit... $ECHO_C" >&6 if test "$ac_cv_sizeof_long" = "8"; then echo "$as_me:$LINENO: result: Yes " >&5 echo "${ECHO_T}Yes " >&6; cat >>confdefs.h <<\_ACEOF #define PLATFORM64 1 _ACEOF else echo "$as_me:$LINENO: result: No " >&5 echo "${ECHO_T}No " >&6; fi echo "$as_me:$LINENO: checking for long long" >&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6 if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 () { long long x; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 echo "${ECHO_T}$ac_cv_type_long_long" >&6 if eval "test \"`echo $ac_cv_type_long_long`\" = yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG 1 _ACEOF fi for ac_func in strcasecmp strncasecmp vsnprintf strtol atoll strtoll endpwent do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $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 #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBADD_DL= THREADLIB="" if test "x$thread" = "xtrue"; then if test "x$gnuthread" = "xtrue"; then PTH_CPPFLAGS='' PTH_CFLAGS='' PTH_LDFLAGS='' PTH_LIBS='' echo "$as_me:$LINENO: checking for GNU Pth" >&5 echo $ECHO_N "checking for GNU Pth... $ECHO_C" >&6 if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: " >&5 echo "${ECHO_T} " >&6 fi # Check whether --with-pth or --without-pth was given. if test "${with_pth+set}" = set; then withval="$with_pth" else with_pth="yes" fi; # Check whether --with-pth-test or --without-pth-test was given. if test "${with_pth_test+set}" = set; then withval="$with_pth_test" else with_pth_test="yes" fi; if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: + Command Line Options:" >&5 echo "${ECHO_T} + Command Line Options:" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o --with-pth=$with_pth" >&5 echo "${ECHO_T} o --with-pth=$with_pth" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o --with-pth-test=$with_pth_test" >&5 echo "${ECHO_T} o --with-pth-test=$with_pth_test" >&6 fi if test ".$with_pth" != .no; then _pth_subdir=no _pth_subdir_opts='' case "$with_pth" in subdir:* ) _pth_subdir=yes _pth_subdir_opts=`echo $with_pth | sed -e 's/^subdir:[^ ]*[ ]*//'` with_pth=`echo $with_pth | sed -e 's/^subdir:\([^ ]*\).*$/\1/'` ;; esac _pth_version="" _pth_location="" _pth_type="" _pth_cppflags="" _pth_cflags="" _pth_ldflags="" _pth_libs="" if test ".$with_pth" = .yes; then # via config script in $PATH _pth_version=`(pth-config --version) 2>/dev/null |\ sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'` if test ".$_pth_version" != .; then _pth_location=`pth-config --prefix` _pth_type='installed' _pth_cppflags=`pth-config --cflags` _pth_cflags=`pth-config --cflags` _pth_ldflags=`pth-config --ldflags` _pth_libs=`pth-config --libs` fi elif test -d "$with_pth"; then with_pth=`echo $with_pth | sed -e 's;/*$;;'` _pth_found=no # via locally included source tree if test ".$_pth_subdir" = .yes; then _pth_location="$with_pth" _pth_type='local' _pth_cppflags="-I$with_pth" _pth_cflags="-I$with_pth" if test -f "$with_pth/ltconfig"; then _pth_ldflags="-L$with_pth/.libs" else _pth_ldflags="-L$with_pth" fi _pth_libs="-lpth" _pth_version=`grep '^const char PTH_Hello' $with_pth/pth_vers.c |\ sed -e 's;^.*Version[ ]*\([0-9]*\.[0-9]*[.ab][0-9]*\)[ ].*$;\1;'` _pth_found=yes ac_configure_args="$ac_configure_args --enable-subdir $_pth_subdir_opts" with_pth_test=no fi # via config script under a specified directory # (a standard installation, but not a source tree) if test ".$_pth_found" = .no; then for _dir in $with_pth/bin $with_pth; do if test -f "$_dir/pth-config"; then test -f "$_dir/pth-config.in" && continue # pth-config in source tree! _pth_version=`($_dir/pth-config --version) 2>/dev/null |\ sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'` if test ".$_pth_version" != .; then _pth_location=`$_dir/pth-config --prefix` _pth_type="installed" _pth_cppflags=`$_dir/pth-config --cflags` _pth_cflags=`$_dir/pth-config --cflags` _pth_ldflags=`$_dir/pth-config --ldflags` _pth_libs=`$_dir/pth-config --libs` _pth_found=yes break fi fi done fi # in any subarea under a specified directory # (either a special installation or a Pth source tree) if test ".$_pth_found" = .no; then _pth_found=0 for _file in x `find $with_pth -name "pth.h" -type f -print`; do test .$_file = .x && continue _dir=`echo $_file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` _pth_version=`($_dir/pth-config --version) 2>/dev/null |\ sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'` if test ".$_pth_version" = .; then _pth_version=`grep '^#define PTH_VERSION_STR' $_file |\ sed -e 's;^#define[ ]*PTH_VERSION_STR[ ]*"\([0-9]*\.[0-9]*[.ab][0-9]*\)[ ].*$;\1;'` fi _pth_cppflags="-I$_dir" _pth_cflags="-I$_dir" _pth_found=`expr $_pth_found + 1` done for _file in x `find $with_pth -name "libpth.[aso]" -type f -print`; do test .$_file = .x && continue _dir=`echo $_file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` _pth_ldflags="-L$_dir" _pth_libs="-lpth" _pth_found=`expr $_pth_found + 1` done if test ".$_pth_found" = .2; then _pth_location="$with_pth" _pth_type="uninstalled" else _pth_version='' fi fi fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: + Determined Location:" >&5 echo "${ECHO_T} + Determined Location:" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o path: $_pth_location" >&5 echo "${ECHO_T} o path: $_pth_location" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o type: $_pth_type" >&5 echo "${ECHO_T} o type: $_pth_type" >&6 fi if test ".$_pth_version" = .; then if test ".$with_pth" != .yes; then echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6 echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Unable to locate GNU Pth under $with_pth. Please specify the correct path to either a GNU Pth installation tree (use --with-pth=DIR if you used --prefix=DIR for installing GNU Pth in the past) or to a GNU Pth source tree (use --with-pth=DIR if DIR is a path to a pth-X.Y.Z/ directory; but make sure the package is already built, i.e., the "configure; make" step was already performed there). EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 else echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6 echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Unable to locate GNU Pth in any system-wide location (see \$PATH). Please specify the correct path to either a GNU Pth installation tree (use --with-pth=DIR if you used --prefix=DIR for installing GNU Pth in the past) or to a GNU Pth source tree (use --with-pth=DIR if DIR is a path to a pth-X.Y.Z/ directory; but make sure the package is already built, i.e., the "configure; make" step was already performed there). EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 fi fi _req_version="1.3.0 " for _var in _pth_version _req_version; do eval "_val=\"\$${_var}\"" _major=`echo $_val | sed 's/\([0-9]*\)\.\([0-9]*\)\([ab.]\)\([0-9]*\)/\1/'` _minor=`echo $_val | sed 's/\([0-9]*\)\.\([0-9]*\)\([ab.]\)\([0-9]*\)/\2/'` _rtype=`echo $_val | sed 's/\([0-9]*\)\.\([0-9]*\)\([ab.]\)\([0-9]*\)/\3/'` _micro=`echo $_val | sed 's/\([0-9]*\)\.\([0-9]*\)\([ab.]\)\([0-9]*\)/\4/'` case $_rtype in "a" ) _rtype=0 ;; "b" ) _rtype=1 ;; "." ) _rtype=2 ;; esac _hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \ "major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"` eval "${_var}_hex=\"\$_hex\"" done if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: + Determined Versions:" >&5 echo "${ECHO_T} + Determined Versions:" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o existing: $_pth_version -> 0x$_pth_version_hex" >&5 echo "${ECHO_T} o existing: $_pth_version -> 0x$_pth_version_hex" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o required: $_req_version -> 0x$_req_version_hex" >&5 echo "${ECHO_T} o required: $_req_version -> 0x$_req_version_hex" >&6 fi _ok=0 if test ".$_pth_version_hex" != .; then if test ".$_req_version_hex" != .; then if test $_pth_version_hex -ge $_req_version_hex; then _ok=1 fi fi fi if test ".$_ok" = .0; then echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6 echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Found Pth version $_pth_version, but required at least version $_req_version. Upgrade Pth under $_pth_location to $_req_version or higher first, please. EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 fi if test ".$with_pth_test" = .yes; then _ac_save_CPPFLAGS="$CPPFLAGS" _ac_save_CFLAGS="$CFLAGS" _ac_save_LDFLAGS="$LDFLAGS" _ac_save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $_pth_cppflags" CFLAGS="$CFLAGS $_pth_cflags" LDFLAGS="$LDFLAGS $_pth_ldflags" LIBS="$LIBS $_pth_libs" if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: + Test Build Environment:" >&5 echo "${ECHO_T} + Test Build Environment:" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o CPPFLAGS=\"$CPPFLAGS\"" >&5 echo "${ECHO_T} o CPPFLAGS=\"$CPPFLAGS\"" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o CFLAGS=\"$CFLAGS\"" >&5 echo "${ECHO_T} o CFLAGS=\"$CFLAGS\"" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o LDFLAGS=\"$LDFLAGS\"" >&5 echo "${ECHO_T} o LDFLAGS=\"$LDFLAGS\"" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o LIBS=\"$LIBS\"" >&5 echo "${ECHO_T} o LIBS=\"$LIBS\"" >&6 fi cross_compile=no if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: + Performing Sanity Checks:" >&5 echo "${ECHO_T} + Performing Sanity Checks:" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o pre-processor test" >&5 echo "${ECHO_T} o pre-processor test" >&6 fi 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 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then _ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 _ok=no fi rm -f conftest.err conftest.$ac_ext if test ".$_ok" != .yes; then echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6 echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity pre-processor check. This means the GNU Pth header pth.h was not found. We used the following build environment: >> CPP="$CPP" >> CPPFLAGS="$CPPFLAGS" See config.log for possibly more details. EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o link check" >&5 echo "${ECHO_T} o link check" >&6 fi 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 () { int main(int argc, char *argv) { FILE *fp; if (!(fp = fopen("conftestval", "w"))) exit(1); fprintf(fp, "hmm"); fclose(fp); pth_init(); pth_kill(); if (!(fp = fopen("conftestval", "w"))) exit(1); fprintf(fp, "yes"); fclose(fp); exit(0); } ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then _ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 _ok=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test ".$_ok" != .yes; then echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6 echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity linker check. This means the GNU Pth library libpth.a was not found. We used the following build environment: >> CC="$CC" >> CFLAGS="$CFLAGS" >> LDFLAGS="$LDFLAGS" >> LIBS="$LIBS" See config.log for possibly more details. EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o run-time check" >&5 echo "${ECHO_T} o run-time check" >&6 fi if test "$cross_compiling" = yes; then _ok=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(int argc, char *argv) { FILE *fp; if (!(fp = fopen("conftestval", "w"))) exit(1); fprintf(fp, "hmm"); fclose(fp); pth_init(); pth_kill(); if (!(fp = fopen("conftestval", "w"))) exit(1); fprintf(fp, "yes"); fclose(fp); exit(0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then _ok=`cat conftestval` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) _ok=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test ".$_ok" != .yes; then if test ".$_ok" = .no; then echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6 echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity execution check. This usually means that the GNU Pth shared library libpth.so is present but \$LD_LIBRARY_PATH is incomplete to execute a Pth test. In this case either disable this test via --without-pth-test, or extend \$LD_LIBRARY_PATH, or build GNU Pth as a static library only via its --disable-shared Autoconf option. We used the following build environment: >> CC="$CC" >> CFLAGS="$CFLAGS" >> LDFLAGS="$LDFLAGS" >> LIBS="$LIBS" See config.log for possibly more details. EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 else echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6 echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity run-time check. This usually means that the GNU Pth library failed to work and possibly caused a core dump in the test program. In this case it is strongly recommended that you re-install GNU Pth and this time make sure that it really passes its "make test" procedure. We used the following build environment: >> CC="$CC" >> CFLAGS="$CFLAGS" >> LDFLAGS="$LDFLAGS" >> LIBS="$LIBS" See config.log for possibly more details. EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 fi fi _extendvars="yes" if test ".$_extendvars" != .yes; then CPPFLAGS="$_ac_save_CPPFLAGS" CFLAGS="$_ac_save_CFLAGS" LDFLAGS="$_ac_save_LDFLAGS" LIBS="$_ac_save_LIBS" fi else _extendvars="yes" if test ".$_extendvars" = .yes; then if test ".$_pth_subdir" = .yes; then CPPFLAGS="$CPPFLAGS $_pth_cppflags" CFLAGS="$CFLAGS $_pth_cflags" LDFLAGS="$LDFLAGS $_pth_ldflags" LIBS="$LIBS $_pth_libs" fi fi fi PTH_CPPFLAGS="$_pth_cppflags" PTH_CFLAGS="$_pth_cflags" PTH_LDFLAGS="$_pth_ldflags" PTH_LIBS="$_pth_libs" if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: + Final Results:" >&5 echo "${ECHO_T} + Final Results:" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o PTH_CPPFLAGS=\"$PTH_CPPFLAGS\"" >&5 echo "${ECHO_T} o PTH_CPPFLAGS=\"$PTH_CPPFLAGS\"" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o PTH_CFLAGS=\"$PTH_CFLAGS\"" >&5 echo "${ECHO_T} o PTH_CFLAGS=\"$PTH_CFLAGS\"" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o PTH_LDFLAGS=\"$PTH_LDFLAGS\"" >&5 echo "${ECHO_T} o PTH_LDFLAGS=\"$PTH_LDFLAGS\"" >&6 fi if test ".$verbose" = .yes; then echo "$as_me:$LINENO: result: o PTH_LIBS=\"$PTH_LIBS\"" >&5 echo "${ECHO_T} o PTH_LIBS=\"$PTH_LIBS\"" >&6 fi fi if test ".$with_pth" != .no; then echo "$as_me:$LINENO: result: version $_pth_version, $_pth_type under $_pth_location" >&5 echo "${ECHO_T}version $_pth_version, $_pth_type under $_pth_location" >&6 : else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 : fi CPPFLAGS="$CPPFLAGS $PTH_CPPFLAGS" CFLAGS="$CFLAGS $PTH_CFLAGS" LDFLAGS="$LDFLAGS $PTH_LDFLAGS" THREADLIB="$PTH_LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPTH 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF else gotthread="no"; echo "$as_me:$LINENO: checking for mutex_lock in -lthread " >&5 echo $ECHO_N "checking for mutex_lock in -lthread ... $ECHO_C" >&6 ac_save_LIBS="$LIBS" LIBS="-lthread $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mutex_lock(); int main () { mutex_lock() ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_LIBTHREAD 1 _ACEOF echo "$as_me:$LINENO: checking if compiler accepts -mt" >&5 echo $ECHO_N "checking if compiler accepts -mt... $ECHO_C" >&6 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mt -c conftest.c 2>&1`"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 CFLAGS="$CFLAGS -mt" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF gotthread="yes"; THREADLIB="-lthread" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "x$gotthread" = "xno"; then echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5 echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6 ac_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. */ #ifdef __cplusplus extern "C" #endif #include int main () { pthread_mutex_lock(0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF gotthread="yes"; THREADLIB="-lpthread" if test "x$ac_cv_c_compiler_gnu"="xyes"; then echo "$as_me:$LINENO: checking if compiler accepts -pthread" >&5 echo $ECHO_N "checking if compiler accepts -pthread... $ECHO_C" >&6 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -pthread -c conftest.c 2>&1`"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 CFLAGS="$CFLAGS -pthread" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* else echo "$as_me:$LINENO: checking if compiler accepts -mt" >&5 echo $ECHO_N "checking if compiler accepts -mt... $ECHO_C" >&6 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mt -c conftest.c 2>&1`"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 CFLAGS="$CFLAGS -mt" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "x$gotthread" = "xno"; then echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lc" >&5 echo $ECHO_N "checking for pthread_mutex_lock in -lc... $ECHO_C" >&6 ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __cplusplus extern "C" #endif #include int main () { pthread_mutex_lock(0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF gotthread="yes"; THREADLIB="" if test "x$ac_cv_c_compiler_gnu"="xyes"; then echo "$as_me:$LINENO: checking if compiler accepts -pthread" >&5 echo $ECHO_N "checking if compiler accepts -pthread... $ECHO_C" >&6 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -pthread -c conftest.c 2>&1`"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 CFLAGS="$CFLAGS -pthread" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* else echo "$as_me:$LINENO: checking if compiler accepts -mt" >&5 echo $ECHO_N "checking if compiler accepts -mt... $ECHO_C" >&6 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mt -c conftest.c 2>&1`"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 CFLAGS="$CFLAGS -mt" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "x$gotthread" = "xno"; then if test "x$ac_cv_c_compiler_gnu"="xyes"; then echo "$as_me:$LINENO: checking if compiler accepts -pthread" >&5 echo $ECHO_N "checking if compiler accepts -pthread... $ECHO_C" >&6 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -pthread -c conftest.c 2>&1`"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 CFLAGS="$CFLAGS -pthread" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lc" >&5 echo $ECHO_N "checking for pthread_mutex_lock in -lc... $ECHO_C" >&6 ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __cplusplus extern "C" #endif #include int main () { pthread_mutex_lock(0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF THREADLIB="-pthread -lc_r" gotthread="yes"; else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi fi if test "x$gotthread" = "xno"; then SAVECFLAGS="$CFLAGS" CFLAGS="$CFLAGS -D_THREAD_SAFE -D_ALL_SOURCE -D_LONG_LONG" echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5 echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6 ac_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. */ #ifdef __cplusplus extern "C" #endif #include int main () { pthread_mutex_lock(0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF gotthread="yes"; THREADLIB="-lpthread" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CFLAGS="$SAVECFLAGS" cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _LONG_LONG 1 _ACEOF fi if test "x$gotthread" = "xyes"; then save_LIBS=$LIBS echo "$as_me:$LINENO: checking for localtime_r in -lc" >&5 echo $ECHO_N "checking for localtime_r in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_localtime_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char localtime_r (); int main () { localtime_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_c_localtime_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_localtime_r=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_c_localtime_r" >&5 echo "${ECHO_T}$ac_cv_lib_c_localtime_r" >&6 if test $ac_cv_lib_c_localtime_r = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LOCALTIME_R 1 _ACEOF fi LIBS=$save_LIBS fi fi fi case $host_os in "darwin"*) stats="false" macosx="yes" cat >>confdefs.h <<\_ACEOF #define OSXHEADER 1 _ACEOF ;; sysv5Open*) if test "x$THREADLIB" = "x"; then LIBS="$LIBS $THREADLIB" else LIBS="$LIBS -Kthread" fi ;; *) LIBS="$LIBS $THREADLIB" ;; esac if test "x$stats" = "xtrue"; then for ac_func in ftok semget shmget semop snprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $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 #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else stats=false fi done fi if test "x$stats" = "xtrue"; then 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 echo "$as_me:$LINENO: checking for semundo union" >&5 echo $ECHO_N "checking for semundo union... $ECHO_C" >&6 if test "${ac_cv_semundo_union+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 () { union semun semctl_arg; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_semundo_union=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_semundo_union=yes fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_semundo_union" >&5 echo "${ECHO_T}$ac_cv_semundo_union" >&6 if eval "test \"`echo $ac_cv_semundo_union`\" = yes"; then cat >>confdefs.h <<\_ACEOF #define NEED_SEMUNDO_UNION 1 _ACEOF fi cat >>confdefs.h <<\_ACEOF #define COLLECT_STATS 1 _ACEOF fi echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket (); int main () { socket (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 if test $ac_cv_lib_socket_socket = yes; then LIBSOCKET="-lsocket" fi echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBNSL="-lnsl" fi ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO qt_libraries="" qt_includes="" # Check whether --with-qt-dir or --without-qt-dir was given. if test "${with_qt_dir+set}" = set; then withval="$with_qt_dir" ac_qt_includes="$withval"/include ac_qt_libraries="$withval"/lib ac_qt_bindir="$withval"/bin fi; # Check whether --with-qt-includes or --without-qt-includes was given. if test "${with_qt_includes+set}" = set; then withval="$with_qt_includes" ac_qt_includes="$withval" fi; kde_qt_libs_given=no # Check whether --with-qt-libraries or --without-qt-libraries was given. if test "${with_qt_libraries+set}" = set; then withval="$with_qt_libraries" ac_qt_libraries="$withval" kde_qt_libs_given=yes fi; # Check whether --with-qt-bin or --without-qt-bin was given. if test "${with_qt_bin+set}" = set; then withval="$with_qt_bin" ac_qt_bindir="$withval" fi; if test "x$macosx" = "xyes"; then if test "x$gui" = "xtrue"; then echo "$as_me:$LINENO: checking for extra includes" >&5 echo $ECHO_N "checking for extra includes... $ECHO_C" >&6 # Check whether --with-extra-includes or --without-extra-includes was given. if test "${with_extra_includes+set}" = set; then withval="$with_extra_includes" kde_use_extra_includes="$withval" else kde_use_extra_includes=NONE fi; kde_extra_includes= if test -n "$kde_use_extra_includes" && \ test "$kde_use_extra_includes" != "NONE"; then ac_save_ifs=$IFS IFS=':' for dir in $kde_use_extra_includes; do kde_extra_includes="$kde_extra_includes $dir" all_includes="$all_includes -I$dir" USER_INCLUDES="$USER_INCLUDES -I$dir" done IFS=$ac_save_ifs kde_use_extra_includes="added" else kde_use_extra_includes="no" fi echo "$as_me:$LINENO: result: $kde_use_extra_includes" >&5 echo "${ECHO_T}$kde_use_extra_includes" >&6 kde_extra_libs= echo "$as_me:$LINENO: checking for extra libs" >&5 echo $ECHO_N "checking for extra libs... $ECHO_C" >&6 # Check whether --with-extra-libs or --without-extra-libs was given. if test "${with_extra_libs+set}" = set; then withval="$with_extra_libs" kde_use_extra_libs=$withval else kde_use_extra_libs=NONE fi; if test -n "$kde_use_extra_libs" && \ test "$kde_use_extra_libs" != "NONE"; then ac_save_ifs=$IFS IFS=':' for dir in $kde_use_extra_libs; do kde_extra_libs="$kde_extra_libs $dir" all_libraries="$all_libraries -L$dir" KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -rpath $dir" USER_LDFLAGS="$USER_LDFLAGS -L$dir" done IFS=$ac_save_ifs kde_use_extra_libs="added" else kde_use_extra_libs="no" fi echo "$as_me:$LINENO: result: $kde_use_extra_libs" >&5 echo "${ECHO_T}$kde_use_extra_libs" >&6 kde_extra_xlibs= echo "$as_me:$LINENO: checking for extra xlibs" >&5 echo $ECHO_N "checking for extra xlibs... $ECHO_C" >&6 # Check whether --with-extra-xlibs or --without-extra-xlibs was given. if test "${with_extra_xlibs+set}" = set; then withval="$with_extra_xlibs" kde_use_extra_xlibs=$withval else kde_use_extra_xlibs=NONE fi; if test -n "$kde_use_extra_xlibs" && \ test "$kde_use_extra_xlibs" != "NONE"; then EXTRA_XLIBS="$kde_use_extra_xlibs" USER_LDFLAGS="$USER_LDFLAGS $EXTRA_XLIBS" kde_use_extra_xlibs="added" else kde_use_extra_xlibs="no" fi echo "$as_me:$LINENO: result: $kde_use_extra_xlibs" >&5 echo "${ECHO_T}$kde_use_extra_xlibs" >&6 echo "$as_me:$LINENO: checking for libz" >&5 echo $ECHO_N "checking for libz... $ECHO_C" >&6 if test "${ac_cv_lib_z+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 kde_save_LIBS="$LIBS" LIBS="$all_libraries -lz $LIBSOCKET" kde_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $all_includes" 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 (zlibVersion() == ZLIB_VERSION); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "ac_cv_lib_z='-lz'" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_z=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$kde_save_LIBS" CFLAGS="$kde_save_CFLAGS" fi if eval "test ! \"`echo $ac_cv_lib_z`\" = no"; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBZ 1 _ACEOF LIBZ="$ac_cv_lib_z" echo "$as_me:$LINENO: result: $ac_cv_lib_z" >&5 echo "${ECHO_T}$ac_cv_lib_z" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 LIBZ="" fi echo "$as_me:$LINENO: checking for libpng" >&5 echo $ECHO_N "checking for libpng... $ECHO_C" >&6 if test "${ac_cv_lib_png+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else kde_save_LIBS="$LIBS" LIBS="$LIBS $all_libraries -lpng $LIBZ -lm -lX11 $LIBSOCKET" kde_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $all_includes" 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. */ #include int main () { png_structp png_ptr = png_create_read_struct( /* image ptr */ PNG_LIBPNG_VER_STRING, 0, 0, 0 ); return( png_ptr != 0 ); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "ac_cv_lib_png='-lpng $LIBZ -lm'" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_png=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$kde_save_LIBS" CFLAGS="$kde_save_CFLAGS" fi if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPNG 1 _ACEOF LIBPNG="$ac_cv_lib_png" echo "$as_me:$LINENO: result: $ac_cv_lib_png" >&5 echo "${ECHO_T}$ac_cv_lib_png" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 LIBPNG="" fi if test -z ""; then kde_qtver=2 else kde_qtver= fi if test -z ""; then if test $kde_qtver = 2; then kde_qt_minversion=">= 2.2" else kde_qt_minversion=">= 1.42 and < 2.0" fi else kde_qt_minversion= fi if test -z ""; then if test $kde_qtver = 2; then kde_qt_verstring="QT_VERSION >= 220" else kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" fi else kde_qt_verstring= fi LIBQT="-lqt" if test kde_qtver = 2; then LIBQT="$LIBQT $LIBPNG" fi echo "$as_me:$LINENO: checking for Qt" >&5 echo $ECHO_N "checking for Qt... $ECHO_C" >&6 LIBQT="$LIBQT $LIBSOCKET" if test "${ac_cv_have_qt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else #try to guess Qt locations qt_incdirs="$QTINC /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/include/qt3" test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs" qt_incdirs="$ac_qt_includes $qt_incdirs" qt_incdir=NO for i in $qt_incdirs; do for j in qmovie.h; do if test -r "$i/$j"; then qt_incdir=$i break 2 fi done done ac_qt_includes="$qt_incdir" qt_libdirs="$QTLIB /usr/lib/qt/lib /usr/lib /usr/local/qt/lib /usr/lib/qt" test -n "$QTDIR" && qt_libdirs="$QTDIR/lib $QTDIR $qt_libdirs" if test ! "$ac_qt_libraries" = "NO"; then qt_libdirs="$ac_qt_libraries $qt_libdirs" fi test=NONE qt_libdir=NONE for dir in $qt_libdirs; do try="ls -1 $dir/libqt*" if test=`eval $try 2> /dev/null`; then qt_libdir=$dir; break; else echo "tried $dir" >&5 ; fi done ac_qt_libraries="$qt_libdir" ac_ext=cc 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 ac_cxxflags_safe="$CXXFLAGS" ac_ldflags_safe="$LDFLAGS" ac_libs_safe="$LIBS" CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" LDFLAGS="-L$qt_libdir $all_libraries" LIBS="$LIBS $LIBQT" cat > conftest.$ac_ext < #include #include #include EOF if test $kde_qtver = 2; then cat >> conftest.$ac_ext < EOF fi echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext cat >> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest; then rm -f conftest* else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_qt_libraries="NO" fi rm -f conftest* CXXFLAGS="$ac_cxxflags_safe" LDFLAGS="$ac_ldflags_safe" LIBS="$ac_libs_safe" 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 "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then ac_cv_have_qt="have_qt=no" ac_qt_notfound="" if test "$ac_qt_includes" = NO; then if test "$ac_qt_libraries" = NO; then ac_qt_notfound="(headers and libraries)"; else ac_qt_notfound="(headers)"; fi else ac_qt_notfound="(libraries)"; fi have_qt="no" else have_qt="yes" fi fi eval "$ac_cv_have_qt" if test "$have_qt" != yes; then echo "$as_me:$LINENO: result: $have_qt" >&5 echo "${ECHO_T}$have_qt" >&6; LIBQT="-lqt-mt" if test kde_qtver = 2; then LIBQT="$LIBQT $LIBPNG" fi echo "$as_me:$LINENO: checking for Qt-Mt" >&5 echo $ECHO_N "checking for Qt-Mt... $ECHO_C" >&6 LIBQT="$LIBQT $LIBSOCKET" if test "${ac_cv_have_qt_mt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else #try to guess Qt locations qt_incdirs="$QTINC /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/include/qt3" test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs" qt_incdirs="$ac_qt_includes $qt_incdirs" qt_incdir=NO for i in $qt_incdirs; do for j in qmovie.h; do if test -r "$i/$j"; then qt_incdir=$i break 2 fi done done ac_qt_includes="$qt_incdir" qt_libdirs="$QTLIB /usr/lib/qt/lib /usr/lib /usr/local/qt/lib /usr/lib/qt" test -n "$QTDIR" && qt_libdirs="$QTDIR/lib $QTDIR $qt_libdirs" if test ! "$ac_qt_libraries" = "NO"; then qt_libdirs="$ac_qt_libraries $qt_libdirs" fi test=NONE qt_libdir=NONE for dir in $qt_libdirs; do try="ls -1 $dir/libqt*" if test=`eval $try 2> /dev/null`; then qt_libdir=$dir; break; else echo "tried $dir" >&5 ; fi done ac_qt_libraries="$qt_libdir" ac_ext=cc 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 ac_cxxflags_safe="$CXXFLAGS" ac_ldflags_safe="$LDFLAGS" ac_libs_safe="$LIBS" CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" LDFLAGS="-L$qt_libdir $all_libraries" LIBS="$LIBS $LIBQT" cat > conftest.$ac_ext < #include #include #include EOF if test $kde_qtver = 2; then cat >> conftest.$ac_ext < EOF fi echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext cat >> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest; then rm -f conftest* else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_qt_libraries="NO" fi rm -f conftest* CXXFLAGS="$ac_cxxflags_safe" LDFLAGS="$ac_ldflags_safe" LIBS="$ac_libs_safe" 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 "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then ac_cv_have_qt_mt="have_qt=no" ac_qt_notfound="" if test "$ac_qt_includes" = NO; then if test "$ac_qt_libraries" = NO; then ac_qt_notfound="(headers and libraries)"; else ac_qt_notfound="(headers)"; fi else ac_qt_notfound="(libraries)"; fi have_qt="no" else have_qt="yes" fi fi if test "$have_qt" != yes; then echo "$as_me:$LINENO: result: $have_qt" >&5 echo "${ECHO_T}$have_qt" >&6; fi fi if test "$have_qt" = yes; then ac_cv_have_qt="have_qt=yes \ ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries" echo "$as_me:$LINENO: result: libraries $ac_qt_libraries, headers $ac_qt_includes" >&5 echo "${ECHO_T}libraries $ac_qt_libraries, headers $ac_qt_includes" >&6 qt_libraries="$ac_qt_libraries" qt_includes="$ac_qt_includes" fi if test ! "$kde_qt_libs_given" = "yes"; then echo "$as_me:$LINENO: checking if Qt compiles without flags" >&5 echo $ECHO_N "checking if Qt compiles without flags... $ECHO_C" >&6 if test "${kde_cv_qt_direct+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc 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 ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH ac_LIBRARY_PATH="$LIBRARY_PATH" ac_cxxflags_safe="$CXXFLAGS" ac_ldflags_safe="$LDFLAGS" ac_libs_safe="$LIBS" CXXFLAGS="$CXXFLAGS -I$qt_includes" LDFLAGS="$X_LDFLAGS" LIBS="$LIBQTEXACT -lXext -lX11 $LIBSOCKET" LD_LIBRARY_PATH= export LD_LIBRARY_PATH LIBRARY_PATH= export LIBRARY_PATH cat > conftest.$ac_ext < #include #include #include EOF if test $kde_qtver = 2; then cat >> conftest.$ac_ext < EOF fi echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext cat >> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest; then kde_cv_qt_direct="yes" else kde_cv_qt_direct="no" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* CXXFLAGS="$ac_cxxflags_safe" LDFLAGS="$ac_ldflags_safe" LIBS="$ac_libs_safe" LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe" export LD_LIBRARY_PATH LIBRARY_PATH="$ac_LIBRARY_PATH" export LIBRARY_PATH 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 if test "$kde_cv_qt_direct" = "yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 qt_libraries= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then QT_INCLUDES=""; else QT_INCLUDES="-I$qt_includes" all_includes="$QT_INCLUDES $all_includes" fi if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then QT_LDFLAGS="" else QT_LDFLAGS="-L$qt_libraries" all_libraries="$QT_LDFLAGS $all_libraries" fi echo "$as_me:$LINENO: checking for moc" >&5 echo $ECHO_N "checking for moc... $ECHO_C" >&6 if test "${kde_cv_path_moc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else kde_cv_path_moc="NONE" if test -n "$MOC"; then kde_cv_path_moc="$MOC"; else dirs="$ac_qt_bindir $QTDIR/bin $QTDIR/src/moc \ /usr/bin /usr/X11R6/bin /usr/lib/qt/bin \ /usr/local/qt/bin" kde_save_IFS=$IFS IFS=':' for dir in $PATH; do dirs="$dirs $dir" done IFS=$kde_save_IFS for dir in $dirs; do if test -x "$dir/moc"; then if test -n "" then evalstr="$dir/moc 2>&1 " if eval $evalstr; then kde_cv_path_moc="$dir/moc" break fi else kde_cv_path_moc="$dir/moc" break fi fi done fi fi if test -z "$kde_cv_path_moc" || test "$kde_cv_path_moc" = "NONE"; then echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 else echo "$as_me:$LINENO: result: $kde_cv_path_moc" >&5 echo "${ECHO_T}$kde_cv_path_moc" >&6 MOC=$kde_cv_path_moc fi if test -z "$MOC"; then if test -n "$ac_cv_path_moc"; then output=`eval "$ac_cv_path_moc --help 2>&1 | sed -e '1q' | grep Qt"` fi echo "configure:13399: tried to call $ac_cv_path_moc --help 2>&1 | sed -e '1q' | grep Qt" >&5 echo "configure:13400: moc output: $output" >&5 # if test -z "$output"; then # KDE_MOC_ERROR_MESSAGE # fi if test -z "$output"; then have_qt="no"; fi fi LIB_QT="$LIBQT" else have_qt="no"; fi else if test "x$gui" = "xtrue"; then echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 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 "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then kde_x_includes=NO else kde_x_includes=$x_includes fi if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then kde_x_libraries=NO else kde_x_libraries=$x_libraries fi # below we use the standard autoconf calls ac_x_libraries=$kde_x_libraries ac_x_includes=$kde_x_includes rm -fr conftest.dir if mkdir conftest.dir; then cd conftest.dir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat >Imakefile <<'_ACEOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' _ACEOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && test -f $ac_im_libdir/libX11.$ac_extension; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -fr conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. 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 echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lXt $LIBS" 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 () { XtMalloc (0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r $ac_dir/libXt.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no if test -z "$ac_x_includes"; then ac_x_includes="." fi if test -z "$ac_x_libraries"; then ac_x_libraries="/usr/lib" fi #from now on we use our own again # when the user already gave --x-includes, we ignore # what the standard autoconf macros told us. if test "$kde_x_includes" = NO; then kde_x_includes=$ac_x_includes fi if test "$kde_x_includes" = NO; then { { echo "$as_me:$LINENO: error: Can't find X includes. Please check your installation and add the correct paths or run configure with --enable-gui=no!" >&5 echo "$as_me: error: Can't find X includes. Please check your installation and add the correct paths or run configure with --enable-gui=no!" >&2;} { (exit 1); exit 1; }; } fi if test "$ac_x_libraries" = NO; then { { echo "$as_me:$LINENO: error: Can't find X libraries. Please check your installation and add the correct paths or run configure with --enable-gui=no!" >&5 echo "$as_me: error: Can't find X libraries. Please check your installation and add the correct paths or run configure with --enable-gui=no!" >&2;} { (exit 1); exit 1; }; } fi # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ kde_x_includes=$kde_x_includes ac_x_libraries=$ac_x_libraries" fi eval "$ac_cv_have_x" if test "$have_x" != yes; then echo "$as_me:$LINENO: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6 no_x=yes else echo "$as_me:$LINENO: result: libraries $ac_x_libraries, headers $kde_x_includes" >&5 echo "${ECHO_T}libraries $ac_x_libraries, headers $kde_x_includes" >&6 fi if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then X_INCLUDES="" x_includes="."; else x_includes=$kde_x_includes X_INCLUDES="-I$x_includes" fi if test -z "$ac_x_libraries" || test "x$ac_x_libraries" = xNONE; then X_LDFLAGS="" x_libraries="/usr/lib"; else x_libraries=$ac_x_libraries X_LDFLAGS="-L$x_libraries" fi all_includes="$all_includes $X_INCLUDES" all_libraries="$all_libraries $X_LDFLAGS" LIB_X11='-lX11 $(LIBSOCKET)' echo "$as_me:$LINENO: checking for libXext" >&5 echo $ECHO_N "checking for libXext... $ECHO_C" >&6 if test "${kde_cv_have_libXext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else kde_ldflags_safe="$LDFLAGS" kde_libs_safe="$LIBS" LDFLAGS="$X_LDFLAGS $USER_LDFLAGS" LIBS="-lXext -lX11 $LIBSOCKET" 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 () { printf("hello Xext\n"); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then kde_cv_have_libXext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 kde_cv_have_libXext=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$kde_ldflags_safe LIBS=$kde_libs_safe fi echo "$as_me:$LINENO: result: $kde_cv_have_libXext" >&5 echo "${ECHO_T}$kde_cv_have_libXext" >&6 if test "kde_cv_have_libXext" = "no"; then { { echo "$as_me:$LINENO: error: We need a working libXext to proceed. Since configure can't find it itself, we stop here assuming that make wouldn't find them either." >&5 echo "$as_me: error: We need a working libXext to proceed. Since configure can't find it itself, we stop here assuming that make wouldn't find them either." >&2;} { (exit 1); exit 1; }; } fi if test -z ""; then kde_qtver=2 else kde_qtver= fi if test -z ""; then if test $kde_qtver = 2; then kde_qt_minversion=">= 2.2" else kde_qt_minversion=">= 1.42 and < 2.0" fi else kde_qt_minversion= fi if test -z ""; then if test $kde_qtver = 2; then kde_qt_verstring="QT_VERSION >= 220" else kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" fi else kde_qt_verstring= fi LIBQT="" LIBQTEXACT="-lqt" if test $kde_qtver = 2; then LIBQT="$LIBQT $LIBPNG" fi echo "$as_me:$LINENO: checking for Qt" >&5 echo $ECHO_N "checking for Qt... $ECHO_C" >&6 LIBQT="$LIBQT $EXTRA_XLIBS -lXext -lX11 $LIBSOCKET" if test "${ac_cv_have_qt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else #try to guess Qt locations qt_incdirs="$QTINC /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt $x_includes /usr/include/qt3" test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs" qt_incdirs="$ac_qt_includes $qt_incdirs" qt_incdir=NO for i in $qt_incdirs; do for j in qmovie.h; do if test -r "$i/$j"; then qt_incdir=$i break 2 fi done done ac_qt_includes="$qt_incdir" qt_libdirs="$QTLIB /usr/lib/qt/lib /usr/X11R6/lib /usr/lib /usr/local/qt/lib /usr/lib/qt $x_libraries" test -n "$QTDIR" && qt_libdirs="$QTDIR/lib $QTDIR $qt_libdirs" if test ! "$ac_qt_libraries" = "NO"; then qt_libdirs="$ac_qt_libraries $qt_libdirs" fi test=NONE qt_libdir=NONE for dir in $qt_libdirs; do try="ls -1 $dir/libqt-mt*" if test=`eval $try 2> /dev/null`; then qt_libdir=$dir; LIBQTEXACT="-lqt-mt" break; else try="ls -1 $dir/libqt*" if test=`eval $try 2> /dev/null`; then qt_libdir=$dir; break; else echo "tried $dir" >&5 ; fi echo "tried $dir" >&5 ; fi done LIBQT="$LIBQTEXACT $EXTRA_XLIBS -lXext -lX11 $LIBSOCKET" ac_qt_libraries="$qt_libdir" ac_ext=cc 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 ac_cxxflags_safe="$CXXFLAGS" ac_ldflags_safe="$LDFLAGS" ac_libs_safe="$LIBS" CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" LDFLAGS="-L$qt_libdir $all_libraries" LIBS="$LIBS $LIBQT" cat > conftest.$ac_ext < #include #include #include EOF if test $kde_qtver = 2; then cat >> conftest.$ac_ext < EOF fi echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext cat >> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest; then rm -f conftest* else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_qt_libraries="NO" fi rm -f conftest* CXXFLAGS="$ac_cxxflags_safe" LDFLAGS="$ac_ldflags_safe" LIBS="$ac_libs_safe" 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 "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then ac_cv_have_qt="have_qt=no" ac_qt_notfound="" if test "$ac_qt_includes" = NO; then if test "$ac_qt_libraries" = NO; then ac_qt_notfound="(headers and libraries)"; else ac_qt_notfound="(headers)"; fi else ac_qt_notfound="(libraries)"; fi have_qt="no" else have_qt="yes" fi fi eval "$ac_cv_have_qt" if test "$have_qt" != yes; then echo "$as_me:$LINENO: result: $have_qt" >&5 echo "${ECHO_T}$have_qt" >&6; else ac_cv_have_qt="have_qt=yes \ ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries" echo "$as_me:$LINENO: result: libraries $ac_qt_libraries, headers $ac_qt_includes" >&5 echo "${ECHO_T}libraries $ac_qt_libraries, headers $ac_qt_includes" >&6 qt_libraries="$ac_qt_libraries" qt_includes="$ac_qt_includes" fi if test ! "$kde_qt_libs_given" = "yes"; then echo "$as_me:$LINENO: checking if Qt compiles without flags" >&5 echo $ECHO_N "checking if Qt compiles without flags... $ECHO_C" >&6 if test "${kde_cv_qt_direct+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cc 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 ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH ac_LIBRARY_PATH="$LIBRARY_PATH" ac_cxxflags_safe="$CXXFLAGS" ac_ldflags_safe="$LDFLAGS" ac_libs_safe="$LIBS" CXXFLAGS="$CXXFLAGS -I$qt_includes" LDFLAGS="$X_LDFLAGS" LIBS="$LIBQTEXACT -lXext -lX11 $LIBSOCKET" LD_LIBRARY_PATH= export LD_LIBRARY_PATH LIBRARY_PATH= export LIBRARY_PATH cat > conftest.$ac_ext < #include #include #include EOF if test $kde_qtver = 2; then cat >> conftest.$ac_ext < EOF fi echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext cat >> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest; then kde_cv_qt_direct="yes" else kde_cv_qt_direct="no" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* CXXFLAGS="$ac_cxxflags_safe" LDFLAGS="$ac_ldflags_safe" LIBS="$ac_libs_safe" LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe" export LD_LIBRARY_PATH LIBRARY_PATH="$ac_LIBRARY_PATH" export LIBRARY_PATH 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 if test "$kde_cv_qt_direct" = "yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 qt_libraries= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then QT_INCLUDES=""; else QT_INCLUDES="-I$qt_includes" all_includes="$QT_INCLUDES $all_includes" fi if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then QT_LDFLAGS="" else QT_LDFLAGS="-L$qt_libraries" all_libraries="$QT_LDFLAGS $all_libraries" fi echo "$as_me:$LINENO: checking for moc" >&5 echo $ECHO_N "checking for moc... $ECHO_C" >&6 if test "${kde_cv_path_moc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else kde_cv_path_moc="NONE" if test -n "$MOC"; then kde_cv_path_moc="$MOC"; else dirs="$ac_qt_bindir $QTDIR/bin $QTDIR/src/moc \ /usr/bin /usr/X11R6/bin /usr/lib/qt/bin \ /usr/local/qt/bin" kde_save_IFS=$IFS IFS=':' for dir in $PATH; do dirs="$dirs $dir" done IFS=$kde_save_IFS for dir in $dirs; do if test -x "$dir/moc"; then if test -n "" then evalstr="$dir/moc 2>&1 " if eval $evalstr; then kde_cv_path_moc="$dir/moc" break fi else kde_cv_path_moc="$dir/moc" break fi fi done fi fi if test -z "$kde_cv_path_moc" || test "$kde_cv_path_moc" = "NONE"; then echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 else echo "$as_me:$LINENO: result: $kde_cv_path_moc" >&5 echo "${ECHO_T}$kde_cv_path_moc" >&6 MOC=$kde_cv_path_moc fi if test -z "$MOC"; then if test -n "$ac_cv_path_moc"; then output=`eval "$ac_cv_path_moc --help 2>&1 | sed -e '1q' | grep Qt"` fi echo "configure:14173: tried to call $ac_cv_path_moc --help 2>&1 | sed -e '1q' | grep Qt" >&5 echo "configure:14174: moc output: $output" >&5 # if test -z "$output"; then # KDE_MOC_ERROR_MESSAGE # fi if test -z "$output"; then have_qt="no"; fi fi LIB_QT='$(LIBPNG) -lXext $(LIB_X11)' LIB_QT="$LIBQTEXACT $LIB_QT" else have_qt="no"; fi fi # Check whether --with-msql-lib or --without-msql-lib was given. if test "${with_msql_lib+set}" = set; then withval="$with_msql_lib" msql_libraries="$withval" fi; # Check whether --with-msql-include or --without-msql-include was given. if test "${with_msql_include+set}" = set; then withval="$with_msql_include" msql_headers="$withval" fi; echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f 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 #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_header in malloc.h unistd.h pwd.h crypt.h limits.h synch.h strings.h string.h locale.h sys/malloc.h sys/types.h sys/sem.h stdarg.h varargs.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else 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 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done INCLUDES="$INCLUDES $USER_INCLUDES"; for ac_header in msql.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else 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 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF msql=true else msql=false; for ac_dir in $kde_extra_includes $msql_headers; do for ac_header in $ac_dir/msql.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else 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 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF msql=true; INCLUDES="$INCLUDES $USER_INCLUDES -I$ac_dir"; fi done done fi done if test "x$msql" = "xtrue" ; then MSQL_TRUE= MSQL_FALSE='#' else MSQL_TRUE='#' MSQL_FALSE= fi if test "x$have_qt" = "xyes" ; then QT_TRUE= QT_FALSE='#' else QT_TRUE='#' QT_FALSE= fi if test "x$drivers" = "xtrue" ; then DRIVERS_TRUE= DRIVERS_FALSE='#' else DRIVERS_TRUE='#' DRIVERS_FALSE= fi if test "x$fdb" = "xtrue" ; then FDB_TRUE= FDB_FALSE='#' else FDB_TRUE='#' FDB_FALSE= fi if test "x$qnx" = "xtrue" ; then QNX_TRUE= QNX_FALSE='#' else QNX_TRUE='#' QNX_FALSE= fi if test "x$use_builtin_libtool" = "xyes" ; then WITHLT_TRUE= WITHLT_FALSE='#' else WITHLT_TRUE='#' WITHLT_FALSE= fi if test "x$fastvalidate" = "xtrue"; then cat >>confdefs.h <<\_ACEOF #define FAST_HANDLE_VALIDATE 1 _ACEOF fi echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* 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"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 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; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 () { struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$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 ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&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 <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in dir; do LIBS="-l$ac_lib $ac_func_search_save_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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi else echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in x; do LIBS="-l$ac_lib $ac_func_search_save_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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo "$as_me:$LINENO: checking for working alloca.h" >&5 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for alloca" >&5 echo $ECHO_N "checking for alloca... $ECHO_C" >&6 if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 # if 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); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$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=alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 echo "${ECHO_T}$ac_cv_os_cray" >&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $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 #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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. */ 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 () { exit (find_stack_direction () < 0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $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 #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); /* 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__doprnt) || defined (__stub____doprnt) choke me #else char (*f) () = _doprnt; #endif #ifdef __cplusplus } #endif int main () { return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in putenv socket strdup strstr setenv setlocale strchr do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $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 #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done cat >>confdefs.h <<\_ACEOF #define UNIXODBC_SOURCE 1 _ACEOF LIB_VERSION="1:0:0" ac_config_files="$ac_config_files Makefile extras/Makefile log/Makefile lst/Makefile sqp/Makefile ini/Makefile odbcinst/Makefile cur/Makefile DriverManager/Makefile odbcinstQ/Makefile exe/Makefile DRVConfig/Makefile DRVConfig/drvcfg1/Makefile DRVConfig/drvcfg2/Makefile DRVConfig/PostgreSQL/Makefile DRVConfig/MiniSQL/Makefile DRVConfig/MySQL/Makefile DRVConfig/nn/Makefile DRVConfig/esoob/Makefile DRVConfig/oplodbc/Makefile DRVConfig/template/Makefile DRVConfig/tds/Makefile DRVConfig/txt/Makefile DRVConfig/Oracle/Makefile DRVConfig/sapdb/Makefile DRVConfig/Mimer/Makefile Drivers/Makefile Drivers/PostgreSQL/Makefile Drivers/Postgre7.1/Makefile Drivers/nn/Makefile Drivers/txt/Makefile Drivers/txt/doc/Makefile Drivers/odbc/Makefile Drivers/template/Makefile Drivers/MiniSQL/Makefile include/Makefile doc/Makefile doc/AdministratorManual/Makefile doc/ProgrammerManual/Makefile doc/ProgrammerManual/Tutorial/Makefile doc/UserManual/Makefile doc/lst/Makefile DataManager/Makefile DataManagerII/Makefile ODBCConfig/Makefile odbctest/Makefile autotest/Makefile samples/Makefile" 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, don't put newlines in cache variables' values. # 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. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *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 \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!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" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" 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}' # 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 # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. cat >confdef2opt.sed <<\_ACEOF t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote d : quote s,[ `~#$^&*(){}\\|;'"<>?],\\&,g s,\[,\\&,g s,\],\\&,g s,\$,$$,g p _ACEOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing # line-breaks from the sub-command output. A line-break within # single-quotes doesn't work because, if this script is created in a # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed 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_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 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 "${HAVE_FLEX_TRUE}" && test -z "${HAVE_FLEX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_FLEX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_FLEX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_FLEX_TRUE}" && test -z "${HAVE_FLEX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_FLEX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_FLEX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${MSQL_TRUE}" && test -z "${MSQL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MSQL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MSQL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${QT_TRUE}" && test -z "${QT_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"QT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"QT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DRIVERS_TRUE}" && test -z "${DRIVERS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DRIVERS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DRIVERS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${FDB_TRUE}" && test -z "${FDB_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"FDB\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"FDB\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${QNX_TRUE}" && test -z "${QNX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"QNX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"QNX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WITHLT_TRUE}" && test -z "${WITHLT_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WITHLT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"WITHLT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $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 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # 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+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; 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 || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # 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 # 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 as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; 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 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') 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=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # 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 before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, 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 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 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 sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -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 --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. 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 ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 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" ;; 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 if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "extras/Makefile" ) CONFIG_FILES="$CONFIG_FILES extras/Makefile" ;; "log/Makefile" ) CONFIG_FILES="$CONFIG_FILES log/Makefile" ;; "lst/Makefile" ) CONFIG_FILES="$CONFIG_FILES lst/Makefile" ;; "sqp/Makefile" ) CONFIG_FILES="$CONFIG_FILES sqp/Makefile" ;; "ini/Makefile" ) CONFIG_FILES="$CONFIG_FILES ini/Makefile" ;; "odbcinst/Makefile" ) CONFIG_FILES="$CONFIG_FILES odbcinst/Makefile" ;; "cur/Makefile" ) CONFIG_FILES="$CONFIG_FILES cur/Makefile" ;; "DriverManager/Makefile" ) CONFIG_FILES="$CONFIG_FILES DriverManager/Makefile" ;; "odbcinstQ/Makefile" ) CONFIG_FILES="$CONFIG_FILES odbcinstQ/Makefile" ;; "exe/Makefile" ) CONFIG_FILES="$CONFIG_FILES exe/Makefile" ;; "DRVConfig/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/Makefile" ;; "DRVConfig/drvcfg1/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/drvcfg1/Makefile" ;; "DRVConfig/drvcfg2/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/drvcfg2/Makefile" ;; "DRVConfig/PostgreSQL/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/PostgreSQL/Makefile" ;; "DRVConfig/MiniSQL/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/MiniSQL/Makefile" ;; "DRVConfig/MySQL/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/MySQL/Makefile" ;; "DRVConfig/nn/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/nn/Makefile" ;; "DRVConfig/esoob/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/esoob/Makefile" ;; "DRVConfig/oplodbc/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/oplodbc/Makefile" ;; "DRVConfig/template/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/template/Makefile" ;; "DRVConfig/tds/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/tds/Makefile" ;; "DRVConfig/txt/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/txt/Makefile" ;; "DRVConfig/Oracle/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/Oracle/Makefile" ;; "DRVConfig/sapdb/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/sapdb/Makefile" ;; "DRVConfig/Mimer/Makefile" ) CONFIG_FILES="$CONFIG_FILES DRVConfig/Mimer/Makefile" ;; "Drivers/Makefile" ) CONFIG_FILES="$CONFIG_FILES Drivers/Makefile" ;; "Drivers/PostgreSQL/Makefile" ) CONFIG_FILES="$CONFIG_FILES Drivers/PostgreSQL/Makefile" ;; "Drivers/Postgre7.1/Makefile" ) CONFIG_FILES="$CONFIG_FILES Drivers/Postgre7.1/Makefile" ;; "Drivers/nn/Makefile" ) CONFIG_FILES="$CONFIG_FILES Drivers/nn/Makefile" ;; "Drivers/txt/Makefile" ) CONFIG_FILES="$CONFIG_FILES Drivers/txt/Makefile" ;; "Drivers/txt/doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES Drivers/txt/doc/Makefile" ;; "Drivers/odbc/Makefile" ) CONFIG_FILES="$CONFIG_FILES Drivers/odbc/Makefile" ;; "Drivers/template/Makefile" ) CONFIG_FILES="$CONFIG_FILES Drivers/template/Makefile" ;; "Drivers/MiniSQL/Makefile" ) CONFIG_FILES="$CONFIG_FILES Drivers/MiniSQL/Makefile" ;; "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/AdministratorManual/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/AdministratorManual/Makefile" ;; "doc/ProgrammerManual/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/ProgrammerManual/Makefile" ;; "doc/ProgrammerManual/Tutorial/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/ProgrammerManual/Tutorial/Makefile" ;; "doc/UserManual/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/UserManual/Makefile" ;; "doc/lst/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/lst/Makefile" ;; "DataManager/Makefile" ) CONFIG_FILES="$CONFIG_FILES DataManager/Makefile" ;; "DataManagerII/Makefile" ) CONFIG_FILES="$CONFIG_FILES DataManagerII/Makefile" ;; "ODBCConfig/Makefile" ) CONFIG_FILES="$CONFIG_FILES ODBCConfig/Makefile" ;; "odbctest/Makefile" ) CONFIG_FILES="$CONFIG_FILES odbctest/Makefile" ;; "autotest/Makefile" ) CONFIG_FILES="$CONFIG_FILES autotest/Makefile" ;; "samples/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 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_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 to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $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 -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@YACC@,$YACC,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@CPP@,$CPP,;t t s,@LEX@,$LEX,;t t s,@LEXLIB@,$LEXLIB,;t t s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t s,@LN_S@,$LN_S,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@EGREP@,$EGREP,;t t s,@subdirs@,$subdirs,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@ECHO@,$ECHO,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@INCLTDL@,$INCLTDL,;t t s,@LIBLTDL@,$LIBLTDL,;t t s,@SHLIBEXT@,$SHLIBEXT,;t t s,@LIBICONV@,$LIBICONV,;t t s,@ICONV_CHAR_ENCODING@,$ICONV_CHAR_ENCODING,;t t s,@ICONV_UNICODE_ENCODING@,$ICONV_UNICODE_ENCODING,;t t s,@LIBADD_CRYPT@,$LIBADD_CRYPT,;t t s,@LIBADD_POW@,$LIBADD_POW,;t t s,@READLINE@,$READLINE,;t t s,@HAVE_FLEX_TRUE@,$HAVE_FLEX_TRUE,;t t s,@HAVE_FLEX_FALSE@,$HAVE_FLEX_FALSE,;t t s,@LFLAGS@,$LFLAGS,;t t s,@LIBADD_DL@,$LIBADD_DL,;t t s,@PTH_CPPFLAGS@,$PTH_CPPFLAGS,;t t s,@PTH_CFLAGS@,$PTH_CFLAGS,;t t s,@PTH_LDFLAGS@,$PTH_LDFLAGS,;t t s,@PTH_LIBS@,$PTH_LIBS,;t t s,@LIBSOCKET@,$LIBSOCKET,;t t s,@LIBNSL@,$LIBNSL,;t t s,@USER_INCLUDES@,$USER_INCLUDES,;t t s,@USER_LDFLAGS@,$USER_LDFLAGS,;t t s,@LIBZ@,$LIBZ,;t t s,@LIBPNG@,$LIBPNG,;t t s,@qt_libraries@,$qt_libraries,;t t s,@qt_includes@,$qt_includes,;t t s,@QT_INCLUDES@,$QT_INCLUDES,;t t s,@QT_LDFLAGS@,$QT_LDFLAGS,;t t s,@MOC@,$MOC,;t t s,@LIB_QT@,$LIB_QT,;t t s,@X_INCLUDES@,$X_INCLUDES,;t t s,@X_LDFLAGS@,$X_LDFLAGS,;t t s,@x_libraries@,$x_libraries,;t t s,@x_includes@,$x_includes,;t t s,@LIB_X11@,$LIB_X11,;t t s,@msql_libraries@,$msql_libraries,;t t s,@msql_headers@,$msql_headers,;t t s,@MSQL_TRUE@,$MSQL_TRUE,;t t s,@MSQL_FALSE@,$MSQL_FALSE,;t t s,@QT_TRUE@,$QT_TRUE,;t t s,@QT_FALSE@,$QT_FALSE,;t t s,@DRIVERS_TRUE@,$DRIVERS_TRUE,;t t s,@DRIVERS_FALSE@,$DRIVERS_FALSE,;t t s,@FDB_TRUE@,$FDB_TRUE,;t t s,@FDB_FALSE@,$FDB_FALSE,;t t s,@QNX_TRUE@,$QNX_TRUE,;t t s,@QNX_FALSE@,$QNX_FALSE,;t t s,@WITHLT_TRUE@,$WITHLT_TRUE,;t t s,@WITHLT_FALSE@,$WITHLT_FALSE,;t t s,@ALLOCA@,$ALLOCA,;t t s,@LIB_VERSION@,$LIB_VERSION,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # 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. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || 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 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # 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 # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file and --srcdir arguments so they do not pile up. ac_sub_configure_args= ac_prev= for ac_arg in $ac_configure_args; do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -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=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d $srcdir/$ac_dir || continue { echo "$as_me:$LINENO: configuring in $ac_dir" >&5 echo "$as_me: configuring in $ac_dir" >&6;} { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'" elif test -f $ac_srcdir/configure; then ac_sub_configure="$SHELL '$ac_srcdir/configure'" elif test -f $ac_srcdir/configure.in; then ac_sub_configure=$ac_configure else { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative path. ac_sub_cache_file=$ac_top_builddir$cache_file ;; esac { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval $ac_sub_configure $ac_sub_configure_args \ --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir || { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} { (exit 1); exit 1; }; } fi cd $ac_popdir done fi unixODBC-2.2.14-p2/Interix/config.guess0100644000076400007640000011355007750253634016154 0ustar nicknick#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-09-04' # 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., 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. # Written by Per Bothner . # Please send patches to . # # 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. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. 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 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int dummy(){}" > $dummy.c ; for c in cc gcc c89 ; do ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; if test $? = 0 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; rm -f $dummy.c $dummy.o $dummy.rel ; 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' # 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. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in amiga) machine=m68k-unknown ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; mac68k) machine=m68k-apple ;; macppc) machine=powerpc-apple ;; hp3[0-9][05]) machine=m68k-hp ;; ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE}" in i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null 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 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # 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 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # 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. cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; 2-1307) UNAME_MACHINE="alphaev68" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; 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 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; 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 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; 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 0 ;; 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 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /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 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; sparc*:NetBSD:*) echo `uname -p`-unknown-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # 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 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; 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 $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; 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 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????: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 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; 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 0 ;; *: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 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 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 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | 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 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 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]) case "${HPUX_REV}" in 11.[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" ;; esac ;; esac fi ;; esac 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 $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 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 $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; hppa*:OpenBSD:*:*) echo hppa-unknown-openbsd exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; 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 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x*:Interix*:*:*) # 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 i386-pc-interix exit 0 ;; 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 i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in big) echo mips-unknown-linux-gnu && exit 0 ;; little) echo mipsel-unknown-linux-gnu && exit 0 ;; esac ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; 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 ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; 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 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ld_supported_targets=`cd /; ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-pc-linux-gnu\n", argv[1]); # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-pc-linux-gnuaout\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; 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 0 ;; 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 0 ;; 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 0 ;; i*86:*:5:[78]*) 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 0 ;; 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|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; 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 i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; 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 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*: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 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *: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 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; 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 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *: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 0 ;; 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 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; 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"); 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 $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # 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 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; 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: unixODBC-2.2.14-p2/Interix/libtool0100644000076400007640000044134107763121521015221 0ustar nicknick#! /bin/sh # libtool - Provide generalized library-building support services. # Generated automatically by (GNU unixODBC 2.2.6) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996-2000 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="sed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host PERILINUX: # Shell to use when invoking shell scripts. SHELL="/bin/sh" # Whether or not to build shared libraries. build_libtool_libs=yes # Whether or not to build static libraries. build_old_libs=no # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=no # Whether or not to optimize for fast installation. fast_install=needless # The host system. host_alias= host=i386-pc-interix # An echo program that does not interpret backslashes. echo="print -r" # The archiver. AR="ar" AR_FLAGS="cru" # The default C compiler. CC="gcc" # Is the compiler the GNU C compiler? with_gcc=yes # The linker used to build libraries. LD="/opt/gcc.3.3/i586-pc-interix3/bin/ld" # Whether we need hard or soft links. LN_S="ln -s" # A BSD-compatible nm program. NM="/bin/nm -B" # A symbol stripping program STRIP=strip # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=file # Used on cygwin: DLL creation program. DLLTOOL="dlltool" # Used on cygwin: object dumper. OBJDUMP="objdump" # Used on cygwin: assembler. AS="as" # The name of the directory that contains temporary libtool files. objdir=.libs # How to create reloadable object files. reload_flag=" -r" reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" # How to pass a linker flag through the compiler. wl="-Wl," # Object file suffix (normally "o"). objext="o" # Old archive suffix (normally "a"). libext="a" # Executable file suffix (normally ""). exeext="" # Additional compiler flags for building library objects. pic_flag=" " #pic_flag=" -fPIC" pic_mode=default # Does compiler simultaneously support -c and -o options? compiler_c_o="yes" # Can we write directly to a .lo ? compiler_o_lo="yes" # Must we lock files when doing compilation ? need_locks="no" # Do we need the lib prefix for modules? need_lib_prefix=no # Do we need a version for libraries? need_version=no # Whether dlopen is supported. dlopen_support=unknown # Whether dlopen of programs is supported. dlopen_self=unknown # Whether dlopen of statically linked programs is supported. dlopen_self_static=unknown # Compiler flag to prevent dynamic linking. link_static_flag="-static" # Compiler flag to turn off builtin functions. no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions" # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec="\${wl}--export-dynamic" # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" # Compiler flag to generate thread-safe objects. thread_safe_flag_spec="" # Library versioning type. version_type=linux # Format of library name prefix. libname_spec="lib\$name" # 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="\${libname}\${release}.so\$versuffix \${libname}\${release}.so\$major \$libname.so" # The coded name of the library, if different from the real name. soname_spec="\${libname}\${release}.so\$major" # Commands used to build and install an old-style archive. RANLIB="ranlib" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib" old_postuninstall_cmds="" # Create an old-style archive from a shared archive. old_archive_from_new_cmds="" # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds="" # Commands used to build and install a shared archive. 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 -o \$lib" postinstall_cmds="chmod +x \$lib" postuninstall_cmds="" # Commands to strip libraries. old_striplib="strip --strip-debug" striplib="strip --strip-unneeded" # Method to check whether dependent libraries are shared objects. deplibs_check_method="pass_all" # Command to use when deplibs_check_method == file_magic. file_magic_cmd="" # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag="" # Flag that forces no undefined symbols. no_undefined_flag="" # Commands used to finish a libtool library installation in a directory. finish_cmds="" # Same as above, but a single script fragment to be evaled but not shown. finish_eval="" # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGISTW][ABCDGISTW]*\\)[ ][ ]*\\(_\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'" # Transform the output of nm in a proper C declaration global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern char \\1;/p'" # Transform the output of nm in a C name address pair global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" # This is the shared library runtime path variable. runpath_var=LD_RUN_PATH # This is the shared library path variable. shlibpath_var=LD_LIBRARY_PATH # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=yes # How to hardcode a shared library path into an executable. hardcode_action=immediate # Whether we should hardcode library paths into libraries. hardcode_into_libs=yes # Flag to hardcode $libdir into a binary during linking. # This must work even if $libdir does not exist. hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator="" # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. hardcode_direct=no # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=no # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=unsupported # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=unknown # Compile-time system search path for libraries sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" # Run-time system search path for libraries sys_lib_dlsearch_path_spec="/lib /usr/lib" # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" # Set to yes if exported symbols are required. always_export_symbols=no # The commands to list exported symbols. export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | sed 's/.* //' | sort | uniq > \$export_symbols" # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds="" # Symbols that should not be listed in the preloaded symbols. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Symbols that must always be exported. include_expsyms="" # ### END LIBTOOL CONFIG # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # 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 "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" # Parse our command line options once, thoroughly. while test $# -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" exit 0 ;; --config) sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; --debug) echo "$progname: enabling shell trace mode" set -x ;; --dry-run | -n) run=: ;; --features) echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit 0 ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --quiet | --silent) show=: ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit 1 ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then case $nonopt in *cc | *++ | gcc* | *-gcc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit 1 fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= prev= lastarg= srcfile="$nonopt" suppress_output= user_target=no for arg do case $prev in "") ;; xcompiler) # Aesthetically quote the previous argument. prev= lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac # Add the previous argument to base_compile. if test -z "$base_compile"; then base_compile="$lastarg" else base_compile="$base_compile $lastarg" fi continue ;; esac # Accept any command-line options. case $arg in -o) if test "$user_target" != "no"; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit 1 fi user_target=next ;; -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; -Xcompiler) prev=xcompiler continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. if test -z "$base_compile"; then base_compile="$lastarg" else base_compile="$base_compile $lastarg" fi continue ;; esac case $user_target in next) # The next one is the -o target name user_target=yes continue ;; yes) # We got the output file user_target=set libobj="$arg" continue ;; esac # Accept the current argument as the source file. lastarg="$srcfile" srcfile="$arg" # Aesthetically quote the previous argument. # Backslashify any backslashes, double quotes, and dollar signs. # These are the only characters that are still specially # interpreted inside of double-quoted scrings. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $lastarg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac # Add the previous argument to base_compile. if test -z "$base_compile"; then base_compile="$lastarg" else base_compile="$base_compile $lastarg" fi done case $user_target in set) ;; no) # Get the name of the library object. libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; *) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit 1 ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSfmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit 1 ;; esac if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit 1 fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $libobj" else removelist="$libobj" fi $run $rm $removelist trap "$run $rm $removelist; exit 1" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) 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" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit 1" 1 2 15 else 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 $run ln "$0" "$lockfile" 2>/dev/null; do $show "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." $run $rm $removelist exit 1 fi echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi # 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 # All platforms use -DPIC, to notify preprocessed assembler code. command="$base_compile $srcfile $pic_flag -DPIC" else # Don't build PIC code command="$base_compile $srcfile" fi if test "$build_old_libs" = yes; then lo_libobj="$libobj" dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$libobj"; then dir="$objdir" else dir="$dir/$objdir" fi libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` if test -d "$dir"; then $show "$rm $libobj" $run $rm $libobj else $show "$mkdir $dir" $run $mkdir $dir status=$? if test $status -ne 0 && test ! -d $dir; then exit $status fi fi fi if test "$compiler_o_lo" = yes; then output_obj="$libobj" command="$command -o $output_obj" elif test "$compiler_c_o" = yes; then output_obj="$obj" command="$command -o $output_obj" fi $run $rm "$output_obj" $show "$command" if $run eval "$command"; then : else test -n "$output_obj" && $run $rm $removelist exit 1 fi 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." $run $rm $removelist exit 1 fi # Just move the object if needed, then go on to compile the next one if test x"$output_obj" != x"$libobj"; then $show "$mv $output_obj $libobj" if $run $mv $output_obj $libobj; then : else error=$? $run $rm $removelist exit $error fi fi # If we have no pic_flag, then copy the object into place and finish. if (test -z "$pic_flag" || test "$pic_mode" != default) && test "$build_old_libs" = yes; then # Rename the .lo from within objdir to obj if test -f $obj; then $show $rm $obj $run $rm $obj fi $show "$mv $libobj $obj" if $run $mv $libobj $obj; then : else error=$? $run $rm $removelist exit $error fi xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` # Now arrange that obj and lo_libobj become the same file $show "(cd $xdir && $LN_S $baseobj $libobj)" if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then # Unlock the critical section if it was locked if test "$need_locks" != no; then $run $rm "$lockfile" fi exit 0 else error=$? $run $rm $removelist exit $error fi fi # Allow error messages only from the first compilation. suppress_output=' >/dev/null 2>&1' 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 $srcfile" else # All platforms use -DPIC, to notify preprocessed assembler code. command="$base_compile $srcfile $pic_flag -DPIC" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" output_obj="$obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" $run $rm "$output_obj" $show "$command" if $run eval "$command"; then : else $run $rm $removelist exit 1 fi 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." $run $rm $removelist exit 1 fi # Just move the object if needed if test x"$output_obj" != x"$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Create an invalid libtool object if no PIC, so that we do not # accidentally link it into a program. if test "$build_libtool_libs" != yes; then $show "echo timestamp > $libobj" $run eval "echo timestamp > \$libobj" || exit $? else # Move the .lo from within objdir $show "$mv $libobj $lo_libobj" if $run $mv $libobj $lo_libobj; then : else error=$? $run $rm $removelist exit $error fi fi fi # Unlock the critical section if it was locked if test "$need_locks" != no; then $run $rm "$lockfile" fi exit 0 ;; # libtool link mode link | relink) modename="$modename: link" case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # 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 invokation. # 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" compile_command="$nonopt" finalize_command="$nonopt" compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= sys_deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= # We need to know -static, to get the right output filenames. for arg do case $arg in -all-static | -static) if test "X$arg" = "X-all-static"; then if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_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 case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$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" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit 1 fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; 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 ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$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 compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -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 $echo "$modename: more than one -exported-symbols argument is not allowed" exit 1 fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi 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*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit 1 fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" sys_deplibs="$sys_deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" sys_deplibs="$sys_deplibs $arg" continue ;; -module) module=yes continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -o) prev=output ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # 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 ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.lo | *.$objext) # A library or standard object. if test "$prev" = dlfiles; then # This file was specified with -dlopen. if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $arg" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` prev= else case $arg in *.lo) libobjs="$libobjs $arg" ;; *) objs="$objs $arg" ;; esac 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. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` 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\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d $output_objdir; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test $status -ne 0 && test ! -d $output_objdir; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit 1 ;; *.$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 case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac libs="$libs $deplib" done 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 link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit 1 ;; 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 if test $linkmode = prog; then # Determine which files to process case $pass in dlopen) libs="$dlfiles" save_deplibs="$deplibs" # Collect dlpreopened libraries deplibs= ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi for deplib in $libs; do lib= found=no case $deplib in -l*) if test $linkmode = oldlib && test $linkmode = obj; then $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 continue fi if test $pass = conv; then deplibs="$deplib $deplibs" continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do # Search the libtool library lib="$searchdir/lib${name}.la" if test -f "$lib"; then found=yes break fi 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 fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test $pass = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test $pass = conv; then deplibs="$deplib $deplibs" continue fi if test $pass = scan; then deplibs="$deplib $deplibs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test $pass = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # 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) if test "$deplibs_check_method" != pass_all; then echo echo "*** Warning: This library needs some functionality provided by $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." else echo echo "*** Warning: Linking the shared library $output against the" echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi 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 = 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 continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test $found = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit 1 fi # Check to see that this really is a libtool archive. if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variable installed. installed=yes # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test $linkmode = oldlib && test $linkmode = obj; }; then # Add dl[pre]opened files of deplib 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 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit 1 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" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac tmp_libs="$tmp_libs $deplib" done elif test $linkmode != prog && test $linkmode != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit 1 fi 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 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit 1 fi # This library was specified with -dlopen. if test $pass = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit 1 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. dlprefiles="$dlprefiles $lib" 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 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # 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 $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test $pass = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit 1 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" # 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" 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*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test 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 case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # Link against this shared library if test "$linkmode,$pass" = "prog,link" || { 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 if test $linkmode = prog; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi fi 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 if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; 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*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`echo $soroot | sed -e 's/^.*\///'` newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' eval cmds=\"$extract_expsyms_cmds\" for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' eval cmds=\"$old_archive_from_expsyms_cmds\" for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" 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" 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; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" 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 $echo "$modename: configuration error: unsupported hardcode properties" exit 1 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; 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" else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" 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 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 # Try to link the static library # 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 library needs some functionality provided by $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 "*** Therefore, libtool will create a static module, that should work " echo "*** as long as the dlopening 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 build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" 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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` 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" case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac 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) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="-L$absdir/$objdir" else eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit 1 fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="-L$absdir" fi ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $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 test $pass != scan && dependency_libs="$newdependency_libs" 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 case $deplib in -L*) new_libs="$deplib $new_libs" ;; *) 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 if test "$pass" = "conv" && { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then libs="$deplibs" # reset libs deplibs= fi done # for pass if test $linkmode = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # 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*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit 1 else echo echo "*** Warning: Linking the shared library $output against the non-libtool" echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test $# -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. libext=al oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit 1 fi current="$2" revision="$3" age="$4" # 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]) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case $revision in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case $age in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac if test $age -gt $current; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 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 major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix) major=`expr $current - $age + 1` verstring="sgi$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test $loop != 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="sgi$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test $loop != 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= verstring="0.0" 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 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs. $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* 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 "$lib_search_path " | sed -e 's% $path % %g'` deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` dependency_libs=`echo "$dependency_libs " | sed -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*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd*) # Do not include libc due to us having libc/libc_r. ;; *) # 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 behaviour. 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. $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 10q \ | egrep "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done if test -n "$a_deplib" ; then droppeddeps=yes echo echo "*** Warning: This library needs some functionality provided by $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." fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; 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 if eval echo \"$potent_lib\" 2>/dev/null \ | sed 10q \ | egrep "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done if test -n "$a_deplib" ; then droppeddeps=yes echo echo "*** Warning: This library needs some functionality provided by $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." fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g' -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 is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; 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 # 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" eval dep_rpath=\"$hardcode_libdir_flag_spec\" 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 library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi test -z "$dlname" && dlname=$soname lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Ensure that we have .o objects for linkers which dislike .lo # (e.g. aix) in case we are running --disable-static for obj in $libobjs; do xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` if test ! -f $xdir/$oldobj; then $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? fi done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols eval cmds=\"$export_symbols_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? # # Do this on AIX to avoid the name clashes # Nick Gorham # case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) $show "(cd \$xdir && for loobj in *; do nm=\`basename \$loobj .lo\`; mv \$nm.lo \$nm.o; done )" $run eval "(cd \$xdir && for loobj in *; do nm=\`basename \$loobj .lo\`; mv \$nm.lo \$nm.o; done )" || exit $? esac libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` done 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 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval cmds=\"$archive_expsym_cmds\" else eval cmds=\"$archive_cmds\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? exit 0 fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run 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 "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit 1 fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $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 wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` done 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" eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${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" $run eval "echo timestamp > $libobj" || exit $? exit 0 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" eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" else # Just create a symlink. $show $rm $libobj $run $rm $libobj xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$libobj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` $show "(cd $xdir && $LN_S $oldobj $baseobj)" $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 ;; prog) case $host in *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi 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 / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac 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*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; 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 dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$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 arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`echo "$arg" | sed -e 's%^.*/%%'` $run eval 'echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # 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" | sort +2 | 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/$dlsyms"' else echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= 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*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit 1 ;; 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 if test $need_relink = no || test "$build_libtool_libs" != yes; 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. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" 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. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit 0 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" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 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. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "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}\" || 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 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; 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 $0 --fallback-echo"; then case $0 in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; *) qecho="$SHELL `pwd`/$0 --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 our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`echo $output|sed 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe ;; *) exeext= ;; esac $rm $output trap "$rm $output; exit 1" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # 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' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: 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 >> $output "\ # 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 # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then echo >> $output "\ 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 >> $output "\ # 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 >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi echo >> $output "\ 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 >> $output "\ # 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 >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # win32 systems need to use the prog path for dll # lookup to work *-*-cygwin* | *-*-pw32*) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ # Export the path to the program. PATH=\"\$progdir:\$PATH\" export PATH exec \$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" 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\ " chmod +x $output fi exit 0 ;; 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" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` done fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then eval cmds=\"$old_archive_from_new_cmds\" else # Ensure that we have .o objects in place in case we decided # not to build a shared library, and have fallen back to building # static libs even though --disable-static was passed! for oldobj in $oldobjs; do if test ! -f $oldobj; then xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$oldobj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` $show "(cd $xdir && ${LN_S} $obj $baseobj)" $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? fi done eval cmds=\"$old_archive_cmds\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "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}\" || 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 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` # Only create the output if not a dry run. if test -z "$run"; then 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) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit 1 fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi newdlprefiles="$newdlprefiles $libdir/$name" 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) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # 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' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # 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 fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit 0 ;; # libtool install mode install) modename="$modename: install" # 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" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # 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) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -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. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit 1 fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test $# -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit 1 fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit 1 ;; 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. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # 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 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 continue fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test $# -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" eval cmds=\"$postinstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run 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 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit 0 ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Do a test to see if this is really a libtool program. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then notinst_deplibs= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 exit 1 fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : else $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyways case $install_prog,$host in /usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`echo $destfile | sed -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $0 --finish$current_libdirs' else exit 0 fi ;; # libtool finish mode finish) modename="$modename: finish" 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. eval cmds=\"$finish_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = ":" && exit 0 echo "----------------------------------------------------------------------" 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" echo "more information, such as the ld(1) and ld.so(8) manual pages." echo "----------------------------------------------------------------------" exit 0 ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit 1 fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit 1 fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit 1 fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 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 (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved enviroment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # 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 0 fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" 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 if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit 1 fi rmdirs= for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$objdir" else objdir="$dir/$objdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 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 (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $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" test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test $mode = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" if test $? != 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. eval cmds=\"$old_postuninstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" if test $? != 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) if test "$build_old_libs" = yes; then oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` rmfiles="$rmfiles $dir/$oldobj" fi ;; *) # Do a test to see if this is a libtool program. if test $mode = clean && (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$file rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit 1 ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit 1 fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit 1 fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [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 --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --version print version information 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 \`$modename --help --mode=MODE' for a more detailed description of MODE." exit 0 ;; clean) $echo \ "Usage: $modename [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: $modename [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 -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always 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: $modename [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: $modename [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: $modename [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 rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [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 -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 -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] 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: $modename [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." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac echo $echo "Try \`$modename --help' for more information about other modes." exit 0 # Local Variables: # mode:shell-script # sh-indentation:2 # End: unixODBC-2.2.14-p2/vms/0040755000076400007640000000000011150523331012777 5ustar nicknickunixODBC-2.2.14-p2/vms/install_image.com0100644000076400007640000000104307363332200016306 0ustar nicknick$ $ if p1 .eqs. "" then $goto ERR_NOPARAMS $ $ install :== $install/command $ $ if (f$file ("''p1'", "KNOWN")) $ then install replace/open/header/shared 'p1' $ else install create/open/header/shared 'p1' $ endif $done: $ exit $ $ERR_NOPARAMS: $ write sys$output " " $ write sys$output "The correct calling sequence is: " $ write sys$output " " $ write sys$output "$ @install_server p1 $ write sys$output " " $ write sys$output "Where: " $ write sys$output " " $ write sys$output " p1 = Image to be installed" $ write sys$output " " $ exit 44 $ unixODBC-2.2.14-p2/vms/odbc2_axp.opt0100644000076400007640000000303207563762215015402 0ustar nicknickLIBODBCINST.EXE/SHARE CASE_SENSITIVE=YES SYMBOL_VECTOR = (SQLAllocConnect=PROCEDURE,- SQLAllocEnv=PROCEDURE,- SQLAllocStmt=PROCEDURE,- SQLBindCol=PROCEDURE,- SQLBindParameter=PROCEDURE,- SQLBrowseConnect=PROCEDURE,- SQLCancel=PROCEDURE,- SQLColAttributes=PROCEDURE,- SQLColumnPrivileges=PROCEDURE,- SQLColumns=PROCEDURE,- SQLConnect=PROCEDURE,- SQLDescribeCol=PROCEDURE,- SQLDescribeParam=PROCEDURE,- SQLDisconnect=PROCEDURE,- SQLDriverConnect=PROCEDURE,- SQLError=PROCEDURE,- SQLExecDirect=PROCEDURE,- SQLExecute=PROCEDURE,- SQLExtendedFetch=PROCEDURE,- SQLFetch=PROCEDURE,- SQLForeignKeys=PROCEDURE,- SQLFreeConnect=PROCEDURE,- SQLFreeEnv=PROCEDURE,- SQLFreeStmt=PROCEDURE,- SQLGetConnectOption=PROCEDURE,- SQLGetCursorName=PROCEDURE,- SQLGetData=PROCEDURE,- SQLGetFunctions=PROCEDURE,- SQLGetInfo=PROCEDURE,- SQLGetStmtOption=PROCEDURE,- SQLGetTypeInfo=PROCEDURE,- SQLMoreResults=PROCEDURE,- SQLNativeSql=PROCEDURE,- SQLNumParams=PROCEDURE,- SQLNumResultCols=PROCEDURE,- SQLParamData=PROCEDURE,- SQLParamOptions=PROCEDURE,- SQLPrepare=PROCEDURE,- SQLPrimaryKeys=PROCEDURE,- SQLProcedureColumns=PROCEDURE,- SQLProcedures=PROCEDURE,- SQLPutData=PROCEDURE,- SQLRowCount=PROCEDURE,- SQLSetConnectOption=PROCEDURE,- SQLSetCursorName=PROCEDURE,- SQLSetPos=PROCEDURE,- SQLSetScrollOptions=PROCEDURE,- SQLSetStmtOption=PROCEDURE,- SQLSpecialColumns=PROCEDURE,- SQLStatistics=PROCEDURE,- SQLTablePrivileges=PROCEDURE,- SQLTables=PROCEDURE,- SQLTransact=PROCEDURE) unixODBC-2.2.14-p2/vms/odbc_axp.opt0100644000076400007640000000452011014503600015274 0ustar nicknickLIBODBCINST.EXE/SHARE CASE_SENSITIVE=YES SYMBOL_VECTOR = (SQLAllocConnect=PROCEDURE,- SQLAllocEnv=PROCEDURE,- SQLAllocHandle=PROCEDURE,- SQLAllocHandleStd=PROCEDURE,- SQLAllocStmt=PROCEDURE,- SQLBindCol=PROCEDURE,- SQLBindParam=PROCEDURE,- SQLBindParameter=PROCEDURE,- SQLBrowseConnect=PROCEDURE,- SQLBulkOperations=PROCEDURE,- SQLCancel=PROCEDURE,- SQLCloseCursor=PROCEDURE,- SQLColAttribute=PROCEDURE,- SQLColAttributes=PROCEDURE,- SQLColumnPrivileges=PROCEDURE,- SQLColumns=PROCEDURE,- SQLConnect=PROCEDURE,- SQLCopyDesc=PROCEDURE,- SQLDataSources=PROCEDURE,- SQLDescribeCol=PROCEDURE,- SQLDescribeParam=PROCEDURE,- SQLDisconnect=PROCEDURE,- SQLDriverConnect=PROCEDURE,- SQLDrivers=PROCEDURE,- SQLEndTran=PROCEDURE,- SQLError=PROCEDURE,- SQLExecDirect=PROCEDURE,- SQLExecute=PROCEDURE,- SQLExtendedFetch=PROCEDURE,- SQLFetch=PROCEDURE,- SQLFetchScroll=PROCEDURE,- SQLForeignKeys=PROCEDURE,- SQLFreeConnect=PROCEDURE,- SQLFreeEnv=PROCEDURE,- SQLFreeHandle=PROCEDURE,- SQLFreeStmt=PROCEDURE,- SQLGetConnectAttr=PROCEDURE,- SQLGetConnectOption=PROCEDURE,- SQLGetCursorName=PROCEDURE,- SQLGetData=PROCEDURE,- SQLGetDescField=PROCEDURE,- SQLGetDescRec=PROCEDURE,- SQLGetDiagField=PROCEDURE,- SQLGetDiagRec=PROCEDURE,- SQLGetEnvAttr=PROCEDURE,- SQLGetFunctions=PROCEDURE,- SQLGetInfo=PROCEDURE,- SQLGetStmtAttr=PROCEDURE,- SQLGetStmtOption=PROCEDURE,- SQLGetTypeInfo=PROCEDURE,- SQLMoreResults=PROCEDURE,- SQLNativeSql=PROCEDURE,- SQLNumParams=PROCEDURE,- SQLNumResultCols=PROCEDURE,- SQLParamData=PROCEDURE,- SQLParamOptions=PROCEDURE,- SQLPrepare=PROCEDURE,- SQLPrimaryKeys=PROCEDURE,- SQLProcedureColumns=PROCEDURE,- SQLProcedures=PROCEDURE,- SQLPutData=PROCEDURE,- SQLRowCount=PROCEDURE,- SQLSetConnectAttr=PROCEDURE,- SQLSetConnectOption=PROCEDURE,- SQLSetCursorName=PROCEDURE,- SQLSetDescField=PROCEDURE,- SQLSetDescRec=PROCEDURE,- SQLSetEnvAttr=PROCEDURE,- SQLSetParam=PROCEDURE,- SQLSetPos=PROCEDURE,- SQLSetScrollOptions=PROCEDURE,- SQLSetStmtAttr=PROCEDURE,- SQLSetStmtOption=PROCEDURE,- SQLSpecialColumns=PROCEDURE,- SQLStatistics=PROCEDURE,- SQLTablePrivileges=PROCEDURE,- SQLTables=PROCEDURE,- SQLTransact=PROCEDURE,- iniElement=PROCEDURE) unixODBC-2.2.14-p2/vms/odbcinst_axp.opt0100644000076400007640000000150407363332200016201 0ustar nicknickCASE_SENSITIVE=YES SYMBOL_VECTOR = (SQLManageDataSources=PROCEDURE,- SQLCreateDataSource=PROCEDURE,- SQLGetTranslator=PROCEDURE,- SQLInstallDriverManager=PROCEDURE,- SQLGetInstalledDrivers=PROCEDURE,- SQLGetAvailableDrivers=PROCEDURE,- SQLConfigDataSource=PROCEDURE,- SQLWriteDSNToIni=PROCEDURE,- SQLRemoveDSNFromIni=PROCEDURE,- SQLValidDSN=PROCEDURE,- SQLWritePrivateProfileString=PROCEDURE,- SQLGetPrivateProfileString=PROCEDURE,- SQLRemoveDriverManager=PROCEDURE,- SQLRemoveTranslator=PROCEDURE,- SQLRemoveDriver=PROCEDURE,- SQLConfigDriver=PROCEDURE,- SQLInstallerError=PROCEDURE,- SQLPostInstallerError=PROCEDURE,- SQLWriteFileDSN=PROCEDURE,- SQLReadFileDSN=PROCEDURE,- SQLInstallDriverEx=PROCEDURE,- SQLInstallTranslatorEx=PROCEDURE,- SQLGetConfigMode=PROCEDURE,- SQLSetConfigMode=PROCEDURE,- odbcinst_system_file_path=PROCEDURE) unixODBC-2.2.14-p2/vms/odbc_setup.com0100644000076400007640000000077307564473330015653 0ustar nicknick$ whoami = f$parse(f$environment("PROCEDURE"),,,,"NO_CONCEAL") $ whereami = f$parse(whoami,,,"DEVICE") + f$parse(whoami,,,"DIRECTORY") - ".][000000]" - "][" - ".]" - "]" + "]" $ define ODBC_LIBDIR 'whereami' $! $ file_loop: $ file = f$search("ODBC_LIBDIR:*ODBC*.EXE") $ if file .eqs. "" then goto file_loop_end $ image_name = f$parse(file,,,"NAME") $ define 'f$edit(image_name,"UPCASE")' "ODBC_LIBDIR:''image_name'.EXE" $ goto file_loop $ file_loop_end: $! $ isql :== $ODBC_LIBDIR:ISQL.EXE $ exit unixODBC-2.2.14-p2/vms/drivermanager_axp.opt0100644000076400007640000000444007363332200017224 0ustar nicknickCASE_SENSITIVE=YES SYMBOL_VECTOR = (SQLAllocConnect=PROCEDURE,- SQLAllocEnv=PROCEDURE,- SQLAllocHandle=PROCEDURE,- SQLAllocHandleStd=PROCEDURE,- SQLAllocStmt=PROCEDURE,- SQLBindCol=PROCEDURE,- SQLBindParam=PROCEDURE,- SQLBindParameter=PROCEDURE,- SQLBrowseConnect=PROCEDURE,- SQLBulkOperations=PROCEDURE,- SQLCancel=PROCEDURE,- SQLCloseCursor=PROCEDURE,- SQLColAttribute=PROCEDURE,- SQLColAttributes=PROCEDURE,- SQLColumnPrivileges=PROCEDURE,- SQLColumns=PROCEDURE,- SQLConnect=PROCEDURE,- SQLCopyDesc=PROCEDURE,- SQLDataSources=PROCEDURE,- SQLDescribeCol=PROCEDURE,- SQLDescribeParam=PROCEDURE,- SQLDisconnect=PROCEDURE,- SQLDriverConnect=PROCEDURE,- SQLDrivers=PROCEDURE,- SQLEndTran=PROCEDURE,- SQLError=PROCEDURE,- SQLExecDirect=PROCEDURE,- SQLExecute=PROCEDURE,- SQLExtendedFetch=PROCEDURE,- SQLFetch=PROCEDURE,- SQLFetchScroll=PROCEDURE,- SQLForeignKeys=PROCEDURE,- SQLFreeConnect=PROCEDURE,- SQLFreeEnv=PROCEDURE,- SQLFreeHandle=PROCEDURE,- SQLFreeStmt=PROCEDURE,- SQLGetConnectAttr=PROCEDURE,- SQLGetConnectOption=PROCEDURE,- SQLGetCursorName=PROCEDURE,- SQLGetData=PROCEDURE,- SQLGetDescField=PROCEDURE,- SQLGetDescRec=PROCEDURE,- SQLGetDiagField=PROCEDURE,- SQLGetDiagRec=PROCEDURE,- SQLGetEnvAttr=PROCEDURE,- SQLGetFunctions=PROCEDURE,- SQLGetInfo=PROCEDURE,- SQLGetStmtAttr=PROCEDURE,- SQLGetStmtOption=PROCEDURE,- SQLGetTypeInfo=PROCEDURE,- SQLMoreResults=PROCEDURE,- SQLNativeSql=PROCEDURE,- SQLNumParams=PROCEDURE,- SQLNumResultCols=PROCEDURE,- SQLParamData=PROCEDURE,- SQLParamOptions=PROCEDURE,- SQLPrepare=PROCEDURE,- SQLPrimaryKeys=PROCEDURE,- SQLProcedureColumns=PROCEDURE,- SQLProcedures=PROCEDURE,- SQLPutData=PROCEDURE,- SQLRowCount=PROCEDURE,- SQLSetConnectAttr=PROCEDURE,- SQLSetConnectOption=PROCEDURE,- SQLSetCursorName=PROCEDURE,- SQLSetDescField=PROCEDURE,- SQLSetDescRec=PROCEDURE,- SQLSetEnvAttr=PROCEDURE,- SQLSetParam=PROCEDURE,- SQLSetPos=PROCEDURE,- SQLSetScrollOptions=PROCEDURE,- SQLSetStmtAttr=PROCEDURE,- SQLSetStmtOption=PROCEDURE,- SQLSpecialColumns=PROCEDURE,- SQLStatistics=PROCEDURE,- SQLTablePrivileges=PROCEDURE,- SQLTables=PROCEDURE,- SQLTransact=PROCEDURE) unixODBC-2.2.14-p2/README0100644000076400007640000000340007406551044013057 0ustar nicknick+-------------------------------------------------------------+ | unixODBC | +-------------------------------------------------------------+ README --------------------------------------------------------------- Description: unixODBC is an Open Source ODBC sub-system and an ODBC SDK for Linux, Mac OSX, and UNIX. License: All libraries are LGPL except the News Server driver which is GPL. LGPL libraries can be used by commercial software. All programs are GPL. Parts: unixODBC includes the following; - Driver Manager - Installer Library and command line tool - Drivers and Driver Setup libraries - Graphical tools to admin ODBC, test drivers and browse data sources - Command Line Tools to help install a driver and work with SQL How To Start: Look for and read README files with extensions of interest. Then read the INSTALL file. You can also jump into the doc directory and browse information there. And do not forget the online stuff. Some documentation may be a bit out of date the vast majority of it should be ok. Config Files: The ODBC Installer Library is responsible for reading and writing the unixODBC config files. The savy can look at; _odbcinst_SystemINI.c _odbcinst_UserINI.c In anycase; you can override where unixODBC looks for its system config files by setting the ODBCSYSINI enviroment variable during the use of unixODBC. Resources: http://sourceforge.net/projects/unixodbc/ +-------------------------------------------------------------+ | Peter Harvey | | 14.DEC.01 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/acinclude.m40100644000076400007640000005563411067201027014377 0ustar nicknick## -*- autoconf -*- dnl unixODBC dnl dnl This file has been customized for unixODBC. dnl dnl AC_CHECK_LIBPT_NOC(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND dnl [, OTHER-LIBRARIES]]]) AC_DEFUN([AC_CHECK_LIBPT_NOC], [AC_MSG_CHECKING([for $2 in -l$1]) dnl Use a cache variable name containing both the library and function name, dnl because the test really is for library $1 defining function $2, not dnl just for library $1. Separate tests with the same $1 and different $2s dnl may have different results. ac_save_LIBS="$LIBS" LIBS="-l$1 $5 $LIBS" AC_TRY_LINK(dnl [ #ifdef __cplusplus extern "C" #endif #include ], [$2(0)], eval "ac_cv_lib_$ac_lib_var=yes", eval "ac_cv_lib_$ac_lib_var=no") LIBS="$ac_save_LIBS" dnl if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then AC_MSG_RESULT(yes) ifelse([$3], , [changequote(, )dnl ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` changequote([, ])dnl AC_DEFINE_UNQUOTED($ac_tr_lib) LIBS="-l$1 $LIBS" ], [$3]) else AC_MSG_RESULT(no) ifelse([$4], , , [$4 ])dnl fi ]) dnl Check if the compiler works with a given command line option dnl AC_CHECK_COMP_OPT(OPTION) AC_DEFUN([AC_CHECK_COMP_OPT], [AC_MSG_CHECKING([if compiler accepts -$1]) echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -$1 -c conftest.c 2>&1`"; then AC_MSG_RESULT(yes) CFLAGS="$CFLAGS -$1" else AC_MSG_RESULT(no) fi rm -f conftest* ]) dnl Check for a lib, without checking the cache first dnl AC_CHECK_LIB_NOC(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND dnl [, OTHER-LIBRARIES]]]) AC_DEFUN([AC_CHECK_LIB_NOC], [AC_MSG_CHECKING([for $2 in -l$1 $5]) ac_save_LIBS="$LIBS" LIBS="-l$1 $5 $LIBS" AC_TRY_LINK(dnl [/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $2(); ], [$2()], eval "ac_cv_lib_$ac_lib_var=yes", eval "ac_cv_lib_$ac_lib_var=no") LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then AC_MSG_RESULT(yes) ifelse([$3], , [changequote(, )dnl ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` changequote([, ])dnl AC_DEFINE_UNQUOTED($ac_tr_lib) LIBS="-l$1 $LIBS" ], [$3]) else AC_MSG_RESULT(no) ifelse([$4], , , [$4 ])dnl fi ]) dnl ## dnl ## GNU Pth - The GNU Portable Threads dnl ## Copyright (c) 1999-2000 Ralf S. Engelschall dnl ## dnl ## This file is part of GNU Pth, a non-preemptive thread scheduling dnl ## library which can be found at http://www.gnu.org/software/pth/. dnl ## dnl ## This library is free software; you can redistribute it and/or dnl ## modify it under the terms of the GNU Lesser General Public dnl ## License as published by the Free Software Foundation; either dnl ## version 2.1 of the License, or (at your option) any later version. dnl ## dnl ## This library is distributed in the hope that it will be useful, dnl ## but WITHOUT ANY WARRANTY; without even the implied warranty of dnl ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl ## Lesser General Public License for more details. dnl ## dnl ## You should have received a copy of the GNU Lesser General Public dnl ## License along with this library; if not, write to the Free Software dnl ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 dnl ## USA, or contact Ralf S. Engelschall . dnl ## dnl ## pth.m4: Autoconf macro for locating GNU Pth from within dnl ## configure.in of third-party software packages dnl ## dnl ## dnl ## Synopsis: dnl ## AC_CHECK_PTH([MIN-VERSION [, # minimum Pth version, e.g. 1.2b3 dnl ## DEFAULT-WITH-PTH [, # default value for --with-pth option dnl ## DEFAULT-WITH-PTH-TEST [,# default value for --with-pth-test option dnl ## EXTEND-VARS [, # whether CFLAGS/LDFLAGS/etc are extended dnl ## ACTION-IF-FOUND [, # action to perform if Pth was found dnl ## ACTION-IF-NOT-FOUND # action to perform if Pth was not found dnl ## ]]]]]]) dnl ## Examples: dnl ## AC_CHECK_PTH(1.2.0) dnl ## AC_CHECK_PTH(1.2.0,,,no,CFLAGS="$CFLAGS -DHAVE_PTH $PTH_CFLAGS") dnl ## AC_CHECK_PTH(1.2.0,yes,yes,yes,CFLAGS="$CFLAGS -DHAVE_PTH") dnl ## dnl dnl # auxilliary macros AC_DEFUN([_AC_PTH_ERROR], [dnl AC_MSG_RESULT([*FAILED*]) echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 $1 EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 ]) AC_DEFUN([_AC_PTH_VERBOSE], [dnl if test ".$verbose" = .yes; then AC_MSG_RESULT([ $1]) fi ]) dnl # the user macro AC_DEFUN([AC_CHECK_PTH], [dnl dnl dnl # prerequisites AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_CPP])dnl dnl PTH_CPPFLAGS='' PTH_CFLAGS='' PTH_LDFLAGS='' PTH_LIBS='' AC_SUBST(PTH_CPPFLAGS) AC_SUBST(PTH_CFLAGS) AC_SUBST(PTH_LDFLAGS) AC_SUBST(PTH_LIBS) dnl # command line options AC_MSG_CHECKING(for GNU Pth) _AC_PTH_VERBOSE([]) AC_ARG_WITH(pth,dnl [ --with-pth[=ARG] Build with GNU Pth Library (default=]ifelse([$2],,yes,$2)[)],dnl ,dnl with_pth="ifelse([$2],,yes,$2)" )dnl AC_ARG_WITH(pth-test,dnl [ --with-pth-test Perform GNU Pth Sanity Test (default=]ifelse([$3],,yes,$3)[)],dnl ,dnl with_pth_test="ifelse([$3],,yes,$3)" )dnl _AC_PTH_VERBOSE([+ Command Line Options:]) _AC_PTH_VERBOSE([ o --with-pth=$with_pth]) _AC_PTH_VERBOSE([ o --with-pth-test=$with_pth_test]) dnl dnl # configuration if test ".$with_pth" != .no; then _pth_subdir=no _pth_subdir_opts='' case "$with_pth" in subdir:* ) _pth_subdir=yes changequote(, )dnl _pth_subdir_opts=`echo $with_pth | sed -e 's/^subdir:[^ ]*[ ]*//'` with_pth=`echo $with_pth | sed -e 's/^subdir:\([^ ]*\).*$/\1/'` changequote([, ])dnl ;; esac _pth_version="" _pth_location="" _pth_type="" _pth_cppflags="" _pth_cflags="" _pth_ldflags="" _pth_libs="" if test ".$with_pth" = .yes; then # via config script in $PATH changequote(, )dnl _pth_version=`(pth-config --version) 2>/dev/null |\ sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'` changequote([, ])dnl if test ".$_pth_version" != .; then _pth_location=`pth-config --prefix` _pth_type='installed' _pth_cppflags=`pth-config --cflags` _pth_cflags=`pth-config --cflags` _pth_ldflags=`pth-config --ldflags` _pth_libs=`pth-config --libs` fi elif test -d "$with_pth"; then with_pth=`echo $with_pth | sed -e 's;/*$;;'` _pth_found=no # via locally included source tree if test ".$_pth_subdir" = .yes; then _pth_location="$with_pth" _pth_type='local' _pth_cppflags="-I$with_pth" _pth_cflags="-I$with_pth" if test -f "$with_pth/ltconfig"; then _pth_ldflags="-L$with_pth/.libs" else _pth_ldflags="-L$with_pth" fi _pth_libs="-lpth" changequote(, )dnl _pth_version=`grep '^const char PTH_Hello' $with_pth/pth_vers.c |\ sed -e 's;^.*Version[ ]*\([0-9]*\.[0-9]*[.ab][0-9]*\)[ ].*$;\1;'` changequote([, ])dnl _pth_found=yes ac_configure_args="$ac_configure_args --enable-subdir $_pth_subdir_opts" with_pth_test=no fi # via config script under a specified directory # (a standard installation, but not a source tree) if test ".$_pth_found" = .no; then for _dir in $with_pth/bin $with_pth; do if test -f "$_dir/pth-config"; then test -f "$_dir/pth-config.in" && continue # pth-config in source tree! changequote(, )dnl _pth_version=`($_dir/pth-config --version) 2>/dev/null |\ sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'` changequote([, ])dnl if test ".$_pth_version" != .; then _pth_location=`$_dir/pth-config --prefix` _pth_type="installed" _pth_cppflags=`$_dir/pth-config --cflags` _pth_cflags=`$_dir/pth-config --cflags` _pth_ldflags=`$_dir/pth-config --ldflags` _pth_libs=`$_dir/pth-config --libs` _pth_found=yes break fi fi done fi # in any subarea under a specified directory # (either a special installation or a Pth source tree) if test ".$_pth_found" = .no; then changequote(, )dnl _pth_found=0 for _file in x `find $with_pth -name "pth.h" -type f -print`; do test .$_file = .x && continue _dir=`echo $_file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` _pth_version=`($_dir/pth-config --version) 2>/dev/null |\ sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'` if test ".$_pth_version" = .; then _pth_version=`grep '^#define PTH_VERSION_STR' $_file |\ sed -e 's;^#define[ ]*PTH_VERSION_STR[ ]*"\([0-9]*\.[0-9]*[.ab][0-9]*\)[ ].*$;\1;'` fi _pth_cppflags="-I$_dir" _pth_cflags="-I$_dir" _pth_found=`expr $_pth_found + 1` done for _file in x `find $with_pth -name "libpth.[aso]" -type f -print`; do test .$_file = .x && continue _dir=`echo $_file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` _pth_ldflags="-L$_dir" _pth_libs="-lpth" _pth_found=`expr $_pth_found + 1` done changequote([, ])dnl if test ".$_pth_found" = .2; then _pth_location="$with_pth" _pth_type="uninstalled" else _pth_version='' fi fi fi _AC_PTH_VERBOSE([+ Determined Location:]) _AC_PTH_VERBOSE([ o path: $_pth_location]) _AC_PTH_VERBOSE([ o type: $_pth_type]) if test ".$_pth_version" = .; then if test ".$with_pth" != .yes; then _AC_PTH_ERROR([dnl Unable to locate GNU Pth under $with_pth. Please specify the correct path to either a GNU Pth installation tree (use --with-pth=DIR if you used --prefix=DIR for installing GNU Pth in the past) or to a GNU Pth source tree (use --with-pth=DIR if DIR is a path to a pth-X.Y.Z/ directory; but make sure the package is already built, i.e., the "configure; make" step was already performed there).]) else _AC_PTH_ERROR([dnl Unable to locate GNU Pth in any system-wide location (see \$PATH). Please specify the correct path to either a GNU Pth installation tree (use --with-pth=DIR if you used --prefix=DIR for installing GNU Pth in the past) or to a GNU Pth source tree (use --with-pth=DIR if DIR is a path to a pth-X.Y.Z/ directory; but make sure the package is already built, i.e., the "configure; make" step was already performed there).]) fi fi dnl # dnl # Check whether the found version is sufficiently new dnl # _req_version="ifelse([$1],,1.0.0,$1)" for _var in _pth_version _req_version; do eval "_val=\"\$${_var}\"" _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\1/'` _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\2/'` _rtype=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\3/'` _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\4/'` case $_rtype in "a" ) _rtype=0 ;; "b" ) _rtype=1 ;; "." ) _rtype=2 ;; esac _hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \ "major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"` eval "${_var}_hex=\"\$_hex\"" done _AC_PTH_VERBOSE([+ Determined Versions:]) _AC_PTH_VERBOSE([ o existing: $_pth_version -> 0x$_pth_version_hex]) _AC_PTH_VERBOSE([ o required: $_req_version -> 0x$_req_version_hex]) _ok=0 if test ".$_pth_version_hex" != .; then if test ".$_req_version_hex" != .; then if test $_pth_version_hex -ge $_req_version_hex; then _ok=1 fi fi fi if test ".$_ok" = .0; then _AC_PTH_ERROR([dnl Found Pth version $_pth_version, but required at least version $_req_version. Upgrade Pth under $_pth_location to $_req_version or higher first, please.]) fi dnl # dnl # Perform Pth Sanity Compile Check dnl # if test ".$with_pth_test" = .yes; then _ac_save_CPPFLAGS="$CPPFLAGS" _ac_save_CFLAGS="$CFLAGS" _ac_save_LDFLAGS="$LDFLAGS" _ac_save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $_pth_cppflags" CFLAGS="$CFLAGS $_pth_cflags" LDFLAGS="$LDFLAGS $_pth_ldflags" LIBS="$LIBS $_pth_libs" _AC_PTH_VERBOSE([+ Test Build Environment:]) _AC_PTH_VERBOSE([ o CPPFLAGS=\"$CPPFLAGS\"]) _AC_PTH_VERBOSE([ o CFLAGS=\"$CFLAGS\"]) _AC_PTH_VERBOSE([ o LDFLAGS=\"$LDFLAGS\"]) _AC_PTH_VERBOSE([ o LIBS=\"$LIBS\"]) cross_compile=no define(_code1, [dnl #include #include ]) define(_code2, [dnl int main(int argc, char *argv[]) { FILE *fp; if (!(fp = fopen("conftestval", "w"))) exit(1); fprintf(fp, "hmm"); fclose(fp); pth_init(); pth_kill(); if (!(fp = fopen("conftestval", "w"))) exit(1); fprintf(fp, "yes"); fclose(fp); exit(0); } ]) _AC_PTH_VERBOSE([+ Performing Sanity Checks:]) _AC_PTH_VERBOSE([ o pre-processor test]) AC_TRY_CPP(_code1, _ok=yes, _ok=no) if test ".$_ok" != .yes; then _AC_PTH_ERROR([dnl Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity pre-processor check. This means the GNU Pth header pth.h was not found. We used the following build environment: >> CPP="$CPP" >> CPPFLAGS="$CPPFLAGS" See config.log for possibly more details.]) fi _AC_PTH_VERBOSE([ o link check]) AC_TRY_LINK(_code1, _code2, _ok=yes, _ok=no) if test ".$_ok" != .yes; then _AC_PTH_ERROR([dnl Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity linker check. This means the GNU Pth library libpth.a was not found. We used the following build environment: >> CC="$CC" >> CFLAGS="$CFLAGS" >> LDFLAGS="$LDFLAGS" >> LIBS="$LIBS" See config.log for possibly more details.]) fi _AC_PTH_VERBOSE([ o run-time check]) AC_TRY_RUN(_code1 _code2, _ok=`cat conftestval`, _ok=no, _ok=no) if test ".$_ok" != .yes; then if test ".$_ok" = .no; then _AC_PTH_ERROR([dnl Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity execution check. This usually means that the GNU Pth shared library libpth.so is present but \$LD_LIBRARY_PATH is incomplete to execute a Pth test. In this case either disable this test via --without-pth-test, or extend \$LD_LIBRARY_PATH, or build GNU Pth as a static library only via its --disable-shared Autoconf option. We used the following build environment: >> CC="$CC" >> CFLAGS="$CFLAGS" >> LDFLAGS="$LDFLAGS" >> LIBS="$LIBS" See config.log for possibly more details.]) else _AC_PTH_ERROR([dnl Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity run-time check. This usually means that the GNU Pth library failed to work and possibly caused a core dump in the test program. In this case it is strongly recommended that you re-install GNU Pth and this time make sure that it really passes its "make test" procedure. We used the following build environment: >> CC="$CC" >> CFLAGS="$CFLAGS" >> LDFLAGS="$LDFLAGS" >> LIBS="$LIBS" See config.log for possibly more details.]) fi fi _extendvars="ifelse([$4],,yes,$4)" if test ".$_extendvars" != .yes; then CPPFLAGS="$_ac_save_CPPFLAGS" CFLAGS="$_ac_save_CFLAGS" LDFLAGS="$_ac_save_LDFLAGS" LIBS="$_ac_save_LIBS" fi else _extendvars="ifelse([$4],,yes,$4)" if test ".$_extendvars" = .yes; then if test ".$_pth_subdir" = .yes; then CPPFLAGS="$CPPFLAGS $_pth_cppflags" CFLAGS="$CFLAGS $_pth_cflags" LDFLAGS="$LDFLAGS $_pth_ldflags" LIBS="$LIBS $_pth_libs" fi fi fi PTH_CPPFLAGS="$_pth_cppflags" PTH_CFLAGS="$_pth_cflags" PTH_LDFLAGS="$_pth_ldflags" PTH_LIBS="$_pth_libs" AC_SUBST(PTH_CPPFLAGS) AC_SUBST(PTH_CFLAGS) AC_SUBST(PTH_LDFLAGS) AC_SUBST(PTH_LIBS) _AC_PTH_VERBOSE([+ Final Results:]) _AC_PTH_VERBOSE([ o PTH_CPPFLAGS=\"$PTH_CPPFLAGS\"]) _AC_PTH_VERBOSE([ o PTH_CFLAGS=\"$PTH_CFLAGS\"]) _AC_PTH_VERBOSE([ o PTH_LDFLAGS=\"$PTH_LDFLAGS\"]) _AC_PTH_VERBOSE([ o PTH_LIBS=\"$PTH_LIBS\"]) fi if test ".$with_pth" != .no; then AC_MSG_RESULT([version $_pth_version, $_pth_type under $_pth_location]) ifelse([$5], , :, [$5]) else AC_MSG_RESULT([no]) ifelse([$6], , :, [$6]) fi ]) # AC_CHECK_LONG_LONG #------------------- AC_DEFUN([AC_CHECK_LONG_LONG], [ AC_MSG_CHECKING(for long long) AC_CACHE_VAL(ac_cv_type_long_long, [ AC_TRY_COMPILE([ #include ], [ long long x; ], ac_cv_type_long_long=yes, ac_cv_type_long_long=no) ]) AC_MSG_RESULT($ac_cv_type_long_long) if eval "test \"`echo $ac_cv_type_long_long`\" = yes"; then AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long]) fi ])# AC_CHECK_LONG_LONG dnl From Bruno Haible. AC_DEFUN([AM_ICONV], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_ARG_WITH([libiconv-prefix], [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ for dir in `echo "$withval" | tr : ' '`; do if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi done ]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi LIBICONV= if test "$am_cv_lib_iconv" = yes; then LIBICONV="-liconv" fi AC_SUBST(LIBICONV) ]) # AC_LIBLTDL_CONVENIENCE_G([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE_G], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience CFLAGS=-DWITHOUT_RTLD_GROUP" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE AC_DEFUN([AC_CHECK_SEMUNDOO], [ AC_LANG_C AC_MSG_CHECKING([for semundo union]) AC_CACHE_VAL(ac_cv_semundo_union, [ AC_TRY_LINK([ #include #include #include ], [ union semun semctl_arg; ], ac_cv_semundo_union=no, ac_cv_semundo_union=yes) ]) AC_MSG_RESULT($ac_cv_semundo_union) if eval "test \"`echo $ac_cv_semundo_union`\" = yes"; then AC_DEFINE(NEED_SEMUNDO_UNION, 1, [Define if you need semundo union]) fi ]) m4_include([qt.m4]) unixODBC-2.2.14-p2/qt.m40100644000076400007640000003064511032174050013064 0ustar nicknick# Copyright (C) 2001 David Johnson # This file is free software; the author gives unlimited permission to copy # and/or distribute it, with or without modifications, as long as this notice # is preserved. # # This was pulled from a gettext example on a SuSE 9.1 distro and has since been # enhanced to serve the purposes of unixODBC. # # Peter Harvey 30.AUG.05 # # FUN_CHECK_QT([qt_min_version],[qt_max_version]) # check for qt headers, libs, progs and compilation # substs QT_CXXFLAGS, QT_LDFLAGS, and QT_LIBS # substs QTVERSION, MOC and UIC # MOC and UIC 'precious' variables AC_DEFUN([FUN_CHECK_QT], [ AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PATH_X]) AC_REQUIRE([AC_PATH_XTRA]) # some 'precious' variables for configure --help AC_ARG_VAR(QTMIN, minimum version of Qt to search for e.g. export QTMIN=020400) AC_ARG_VAR(QTMAX, maximum version of Qt to search for e.g. export QTMAX=030305) AC_ARG_VAR(MOC, QT meta object compiler command) AC_ARG_VAR(UIC, Qt UI compiler command) AC_CACHE_SAVE AC_MSG_NOTICE([checking for Qt]) # process our args if test -z "$1" ; then qt_min_version=0 else qt_min_version=$1 fi if test -z "$2" ; then qt_max_version=99999 else qt_max_version=$2 fi # adjust for user preferences if test "x$QTMIN" != "x" ; then qt_min_version=$QTMIN; fi if test "x$QTMAX" != "x" ; then if expr $QTMAX '<' $qt_max_version > /dev/null ; then qt_max_version=$QTMAX; fi fi # set up our configuration options qt_dir="" qt_includes="" qt_libraries="" qt_programs="" AC_ARG_WITH([qt_dir], AC_HELP_STRING([--with-qt-dir=DIR], [where the Qt package is installed]), [ qt_dir="$withval" qt_includes="$withval"/include qt_libraries="$withval"/lib qt_programs="$withval"/bin ]) AC_ARG_WITH([qt_includes], AC_HELP_STRING([--with-qt-includes=DIR], [where the Qt includes are installed]), [qt_includes="$withval"]) AC_ARG_WITH([qt_libraries], AC_HELP_STRING([--with-qt-libraries=DIR], [where the Qt libraries are installed]), [qt_libraries="$withval"]) AC_ARG_WITH([qt_programs], AC_HELP_STRING([--with-qt-programs=DIR], [where the Qt programs are installed]), [qt_programs="$withval"]) QTVERSION="00000" FUN_QT_HEADERS AC_MSG_NOTICE([Found Qt version $QTVERSION]) FUN_QT_LIBRARIES FUN_QT_PROGRAMS FUN_QT_COMPILE AC_SUBST(QTVERSION) AC_SUBST(MOC) AC_SUBST(UIC) QT_CXXFLAGS="-I$qt_includes -I$qt_includes/QtCore -I$qt_includes/QtGui -I$qt_includes/QtAssistant -I$qt_includes/QtNetwork" AC_SUBST(QT_CXXFLAGS) QT_LDFLAGS="-L$qt_libraries" AC_SUBST(QT_LDFLAGS) QT_LIBS="$qt_libs" AC_SUBST(QT_LIBS) have_qt="yes" ])#FUN_CHECK_QT # FUN_QT_HEADERS # helper function for FUN_CHECK_QT # check for qt headers in standard locations AC_DEFUN([FUN_QT_HEADERS], [ qt_found_version="" qt_v4_include="" # Have not been told where Qt is so search for it... if test "x$qt_includes" = "x" ; then # look in standard locations qt_found_dirs="" qt_include_dirs=" $QTDIR/include /usr/include /usr/local/include /usr/X11R6/include `ls -dr /usr/include/qt* 2>/dev/null` `ls -dr /usr/local/include/qt* 2>/dev/null` `ls -dr /usr/X11R6/include/qt* 2>/dev/null` `ls -dr /usr/lib/qt*/include 2>/dev/null` `ls -dr /usr/local/lib/qt*/include 2>/dev/null` `ls -dr /usr/X11R6/lib/qt*/include 2>/dev/null` `ls -dr /usr/local/qt*/include 2>/dev/null` `ls -dr /usr/local/Trolltech/Qt*/include 2>/dev/null` `ls -dr /opt/qt*/include 2>/dev/null` " for n in $qt_include_dirs ; do if test -r "$n/qglobal.h"; then qt_found_dirs="$qt_found_dirs $n" else if test -r "$n/Qt/qglobal.h"; then qt_found_dirs="$qt_found_dirs $n" fi fi done # find the latest version between min_version and max_version qt_prev_version=$qt_min_version for n in $qt_found_dirs ; do AC_MSG_NOTICE([Checking dir $n]) FUN_QT_VERSION($n) if expr $qt_current_version '>=' $qt_prev_version > /dev/null ; then if expr $qt_current_version '<=' $qt_max_version > /dev/null ; then qt_includes=$n qt_prev_version=$qt_current_version qt_found_version=$qt_current_version fi fi done fi AC_MSG_CHECKING([for Qt headers]) if test "x$qt_includes" = "x" ; then AC_MSG_RESULT([no]) AC_MSG_ERROR([cannot find correct Qt headers!, consider adding --enable-gui=no to configure arguments]) else # Ensure we have a version... if test "x$qt_found_version" = "x" ; then FUN_QT_VERSION($qt_includes) qt_found_version=$qt_current_version fi if test "x$qt_found_version" = "x" ; then AC_MSG_RESULT([no]) AC_MSG_ERROR([cannot find version of Qt!, consider adding --enable-gui=no to configure arguments]) fi AC_MSG_RESULT([$qt_includes]) AC_MSG_CHECKING([for Qt4 headers]) if test -r "$qt_includes/Qt/qglobal.h"; then qt_v4_include="y" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi dnl TODO need to strip out white space QTVERSION=$qt_found_version; AC_MSG_CHECKING([include layout]) if test "x$qt_v4_include" = "xy" ; then AC_MSG_RESULT([v4 layout]) AC_DEFINE(QT_V4LAYOUT) # Lets get rid of qt3support in favour of pure qt4 - PAH # AC_DEFINE(QT3_SUPPORT) # MOCDEFS="-DQT3_SUPPORT" # AC_SUBST(MOCDEFS) have_qt4="yes" else MOCDEFS="" AC_SUBST(MOCDEFS) AC_MSG_RESULT([standard layout]) fi fi ])#FUN_QT_HEADERS # FUN_QT_VERSION(qt_include_dir) # helper function for FUN_QT_HEADERS # get version from qglobal.h AC_DEFUN([FUN_QT_VERSION], [ dnl the 2x versions need the extra sed if test -r "$1/qglobal.h"; then qt_current_version=`grep -w '#define QT_VERSION' "$1"/qglobal.h | grep -v '#define QT_VERSION_STR' | sed s/'#define QT_VERSION 0x'// | sed s/'#define QT_VERSION'//` else if test -r "$1/Qt/qglobal.h"; then # if test "x$qt_current_version" = "x" ; then qt_current_version=`grep -w '#define QT_VERSION' "$1"/Qt/qglobal.h | grep -v '#define QT_VERSION_STR' | sed s/'#define QT_VERSION 0x'// | sed s/'#define QT_VERSION'//` fi fi ])#FUN_QT_VERSION # FUN_QT_LIBRARIES # helper function for FUN_CHECK_QT # check for qt libs in standard locations AC_DEFUN([FUN_QT_LIBRARIES], [ AC_REQUIRE([FUN_QT_HEADERS]) AC_MSG_CHECKING([for Qt libraries]) # Ensure we have the lib dir... if test "x$qt_libraries" = "x" ; then # see if it is relative to the includes qt_tree="$qt_includes" # # the cygwin dirhame only strips up to the first / # case $host_os in cygwin*) empty_dir="x/" ;; *) empty_dir="x" ;; esac while test "x$qt_tree" != $empty_dir ; do # first go around will fail... if expr "$QTVERSION" '>=' "040000" > /dev/null ; then if ls $qt_tree/lib/libQt* > /dev/null 2> /dev/null ; then qt_libraries=$qt_tree/lib break else # lop off tail of path dnl not as portable as it should be... qt_tree="`dirname $qt_tree`" fi else if ls $qt_tree/lib/libqt* > /dev/null 2> /dev/null ; then qt_libraries=$qt_tree/lib break else # lop off tail of path dnl not as portable as it should be... qt_tree="`dirname $qt_tree`" fi fi done fi # Use QTVERSION and gotthread to set libs we need... if expr "$QTVERSION" '>=' "040000" > /dev/null ; then qt_libs="-lQtGui -lQtCore -lQtAssistantClient -lQtNetwork" else if test "x$gotthread" = "xyes" ; then try="ls -1 $qt_libraries/libqt-mt*" if test=`eval $try 2> /dev/null`; then qt_libs="-lqt-mt" else qt_libs="-lqt" fi else qt_libs="-lqt" fi fi # Return... if test "x$qt_libraries" = "x" ; then AC_MSG_RESULT([no]) AC_MSG_ERROR([cannot find Qt libraries!, consider adding --enable-gui=no to configure arguments]) else AC_MSG_RESULT([$qt_libraries]) AC_CHECK_FILE([$qt_includes/QtGui/QWizard], [have_qtwizard=yes], [have_qtwizard=no]) AC_CHECK_FILE([$qt_includes/QtGui/QMdiArea], [have_qtmdiarea=yes], [have_qtmdiarea=no]) fi ])#FUN_QT_LIBRARIES # FUN_QT_PROGRAMS # helper function for FUN_CHECK_QT # searches for moc and uic AC_DEFUN([FUN_QT_PROGRAMS], [ AC_REQUIRE([FUN_QT_LIBRARIES]) AC_MSG_CHECKING([for Qt utilities]) if test "x$q_programs" = "x" ; then # see if it is relative to the libraries qt_tree="$qt_libraries" while test "x$qt_tree" != "x" ; do # first go around will fail if ls $qt_tree/bin/moc* > /dev/null 2> /dev/null ; then qt_programs=$qt_tree/bin break else # lop off tail of path dnl not as portable as it should be... qt_tree="`dirname $qt_tree`" fi done # if we haven't found the progs, there's not much more we can do fi if test "x$qt_programs" = "x" ; then AC_MSG_RESULT([no]) AC_MSG_ERROR([cannot find Qt utilities!, consider adding --enable-gui=no to configure arguments]) else AC_MSG_RESULT([$qt_programs]) # find the right moc if test -z "$MOC" ; then AC_CHECK_PROG(MOC, moc, moc ) if test "x$MOC" = "x" ; then # could be renamed to avoid clashes if ls $qt_programs/moc > /dev/null 2> /dev/null ; then MOC="$qt_programs/moc" else if expr "$QTVERSION" '>=' "200" > /dev/null ; then if ls $qt_programs/moc2 > /dev/null 2> /dev/null ; then MOC="$qt_programs/moc2" fi else if expr "$QTVERSION" '>=' "300" > /dev/null ; then if $qt_programs/moc3 > /dev/null 2> /dev/null ; then MOC="$qt_programs/moc3" fi fi fi fi fi if test "x$MOC" = "x" ; then AC_MSG_RESULT([no]) AC_MSG_ERROR([cannot find Qt meta object compiler!, consider adding --enable-gui=no to configure arguments]) fi fi # find the right uic if expr "$QTVERSION" '>=' "220" > /dev/null ; then if test -z "$UIC" ; then AC_CHECK_PROG(UIC, uic, uic ) if test "x$UIC" = "x" ; then # could be renamed to avoid clashes if ls $qt_programs/uic > /dev/null 2> /dev/null ; then UIC="$qt_programs/uic" else if expr "$QTVERSION" '>=' "300" > /dev/null ; then if ls $qt_programs/uic3 > /dev/null 2> /dev/null ; then UIC="$qt_programs/uic3" fi fi fi fi fi else # if uic is important to the build, change this UIC="" fi fi ])#FUN_QT_PROGRAMS # FUN_QT_COMPILE # helper function for FUN_CHECK_QT # compile a simple qt program AC_DEFUN([FUN_QT_COMPILE], [ AC_REQUIRE([FUN_QT_HEADERS]) AC_REQUIRE([FUN_QT_LIBRARIES]) AC_REQUIRE([FUN_QT_PROGRAMS]) AC_LANG_PUSH(C++) AC_MSG_NOTICE([qt_libraries=$qt_libraries]) AC_MSG_NOTICE([LDFLAGS=$LDFLAGS]) AC_MSG_NOTICE([X_LIBS=$X_LIBS]) AC_MSG_CHECKING([whether a simple Qt program compiles]) ac_cxxflags_save="$CXXFLAGS" ac_ldflags_save="$LDFLAGS" ac_libs_save="$LIBS" if expr "$QTVERSION" '>=' "040000" > /dev/null ; then CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS -I$qt_includes -I$qt_includes/QtCore -I$qt_includes/QtGui $X_CFLAGS $all_includes" else CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS -I$qt_includes $X_CFLAGS $all_includes" fi LDFLAGS="$LDFLAGS -L$qt_libraries $X_LIBS $X_LDFLAGS" LIBS="$LIBS $PTHREAD_LIBS $qt_libs $X_EXTRA_LIBS -lXext -lX11 $X_PRE_LIBS $EXTRA_XLIBS" if expr "$QTVERSION" '>=' "040000" > /dev/null ; then AC_TRY_LINK([ #include #include ], [QString s = "hello world"; QMessageBox::information(0, s, "no he is not"); return 0;], qt_compile=yes, qt_compile=no) else AC_TRY_LINK([ #include #include ], [QString s = "hello world"; QMessageBox::information(0, s, "no he is not"); return 0;], qt_compile=yes, qt_compile=no) fi CXXFLAGS="$ac_cxxflags_save" LDFLAGS="$ac_ldflags_save" LIBS="$ac_libs_save" AC_LANG_POP(C++) if test "x$qt_compile" = "xyes" ; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) # We do not want to force everything to stop because we do not have # qt - let caller decide what to do. # AC_MSG_ERROR([cannot compile a Qt program!]) fi ])#FUN_QT_COMPILE unixODBC-2.2.14-p2/configure.in0100644000076400007640000003653511111035010014501 0ustar nicknickdnl Process this file with autoconf to produce a configure script. AC_INIT(DRVConfig/MiniSQL/odbcminiS.c) AM_INIT_AUTOMAKE(unixODBC, 2.2.14) dnl Checks for programs. AC_PROG_AWK AC_PROG_YACC AC_PROG_CC AC_PROG_CPP AM_PROG_LEX AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_DISABLE_STATIC AC_ENABLE_SHARED dnl Check if we want to build the gui bits AC_ARG_ENABLE( gui, [ --enable-gui build GUI Parts [default=yes]], [ case "${enableval}" in yes) gui=true ;; no) gui=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-gui) ;; esac],[gui=true]) dnl Only need c++ for the GUI bits if test "x$gui" = "xtrue"; then AC_PROG_CXX else dnl This gets around a autoconf problem 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 fi dnl Check if we want to worry about threads AC_ARG_ENABLE( threads, [ --enable-threads build with thread support [default=yes]], [ case "${enableval}" in yes) thread=true ;; no) thread=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-thread) ;; esac],[thread=true]) AC_ARG_ENABLE( gnuthreads, [ --enable-gnuthreads build with gnu threads support [default=no]], [ case "${enableval}" in yes) gnuthread=true ;; no) gnuthread=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-gnuthread) ;; esac],[gnuthread=false]) AC_ARG_ENABLE( readline, [ --enable-readline build with readline support [default=yes]], [ case "${enableval}" in yes) readline=true ;; no) readline=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-readline) ;; esac],[readline=true]) AC_ARG_ENABLE( inicaching, [ --enable-inicaching build with ini file caching support [default=yes]], [ case "${enableval}" in yes) inicaching=true ;; no) inicaching=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-inicaching) ;; esac],[inicaching=true]) dnl Check if we want to build the drivers AC_ARG_ENABLE( drivers, [ --enable-drivers build included drivers [default=yes]], [ case "${enableval}" in yes) drivers=true ;; no) drivers=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-drivers) ;; esac],[drivers=true]) AC_ARG_ENABLE( fdb, [ --enable-fdb build file-based data access [default=no]], [ case "${enableval}" in yes) fdb=true ;; no) fdb=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-fdb) ;; esac],[fdb=false]) AC_ARG_ENABLE( odbctrace, [ --enable-odbctrace build odbc trace library [default=no]], [ case "${enableval}" in yes) odbctrace=true ;; no) odbctrace=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-odbctrace) ;; esac],[odbctrace=false]) AC_ARG_ENABLE( fastvalidate, [ --enable-fastvalidate use relaxed handle checking in the DM [default=no]], [ case "${enableval}" in yes) fastvalidate=true ;; no) fastvalidate=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-fastvalidate) ;; esac],[fastvalidate=false]) AC_ARG_ENABLE( iconv, [ --enable-iconv build with iconv support [default=yes]], [ case "${enableval}" in yes) iconv=true ;; no) iconv=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-iconv) ;; esac],[iconv=true]) dnl Check for sys/sem.h AC_CHECK_HEADERS(sys/sem.h, semh=true, semh=false) AC_ARG_ENABLE( stats, [ --enable-stats build with statistic gathering support [default=yes]], [ case "${enableval}" in yes) if test "x$semh" = "xfalse"; then AC_MSG_ERROR(stats enabled but required header was not found) fi stats=true ;; no) stats=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-stats) ;; esac],[stats=$semh]) AC_ARG_ENABLE( rtldgroup, [ --enable-rtldgroup build with RTLD_GROUP passed to dlopen (when supported) [default=yes]], [ case "${enableval}" in yes) rtldgroup=true ;; no) rtldgroup=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-rltdgroup) ;; esac],[rtldgroup=true]) AC_ARG_ENABLE( ltdllib, [ --enable-ltdllib Use system libltdl.so (if found) [default=no]], [ case "${enableval}" in yes) ltdllib=true ;; no) ltdllib=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-ltdllib) ;; esac],[ltdllib=false]) AC_ARG_ENABLE( handlemap, [ --enable-handlemap driver manager can map driver handles called back from broken drivers [default=no]], [ case "${enableval}" in yes) handlemap=true ;; no) handlemap=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-handlemap) ;; esac],[handlemap=false]) dnl Enable building of the convenience library dnl and set LIBLTDL accordingly INCLTDL="" LIBLTDL="" AC_MSG_CHECKING( Have we enabled using RTLD_GROUP ) if test "x$rtldgroup" = "xtrue"; then AC_MSG_RESULT( yes ) AC_LIBLTDL_CONVENIENCE else AC_MSG_RESULT( no ); AC_LIBLTDL_CONVENIENCE_G fi dnl Check for dlopen support AC_LIBTOOL_DLOPEN dnl for cygwin support AC_LIBTOOL_WIN32_DLL dnl Configure libtool AM_PROG_LIBTOOL dnl Configure libltdl AC_CONFIG_SUBDIRS(libltdl) use_builtin_libtool="no" dnl override the libtool lines if we use the system libs if test "x$ltdllib" = "xtrue"; then AC_CHECK_LIB( ltdl, lt_dlopen, [ LIBLTDL="-lltdl" ], [use_builtin_libtool="yes"] ) if test "x$use_builtin_libtool" = "xno"; then AC_CHECK_HEADERS(ltdl.h, [], [use_builtin_libtool="yes"] ) fi else use_builtin_libtool="yes" fi AC_MSG_CHECKING( if we are using the included libltdl ) AC_MSG_RESULT( $use_builtin_libtool ) dnl Substitute INCLTDL and LIBLTDL in the Makefiles AC_SUBST(LTDLINCL) AC_SUBST(LIBLTDL) dnl Find shared lib extension AC_MSG_CHECKING(for shared lib extension) SHLIBEXT="$shrext_cmds" AC_MSG_RESULT($shrext_cmds) AC_SUBST(SHLIBEXT) if test "x$iconv" = "xtrue"; then AM_ICONV iconv_char_enc="auto-search" AC_ARG_WITH(iconv_char_enc, [ --with-iconv-char-enc=enc Encoding to use as ASCII [default=auto-search] ], iconv_char_enc="$withval" ) ICONV_CHAR_ENCODING="$iconv_char_enc" iconv_ucode_enc="auto-search" AC_ARG_WITH(iconv_ucode_enc, [ --with-iconv-ucode-enc=enc Encoding to use as UNICODE [default=auto-search] ], iconv_ucode_enc="$withval" ) ICONV_CHAR_ENCODING="" ICONV_UNICODE_ENCODING="" if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING( for encoding to use for CHAR representations ); ICONV_CHAR_ENCODING="$iconv_char_enc" AC_MSG_RESULT( $iconv_char_enc ); AC_MSG_CHECKING( for encoding to use for UNICODE representations ); ICONV_UNICODE_ENCODING="$iconv_ucode_enc" AC_MSG_RESULT( $iconv_ucode_enc ); fi AC_SUBST(ICONV_CHAR_ENCODING) AC_SUBST(ICONV_UNICODE_ENCODING) fi dnl Checks for libraries. AC_CHECK_LIB(crypt, crypt, [ LIBADD_CRYPT="-lcrypt"; AC_DEFINE(HAVE_LIBCRYPT)],) AC_SUBST(LIBADD_CRYPT) AC_CHECK_LIB(m, pow, [ LIBADD_POW="-lm" ], ) AC_SUBST(LIBADD_POW) have_readline="no" if test "x$readline" = "xtrue"; then AC_CHECK_LIB_NOC(readline, readline, [ READLINE=-lreadline have_readline="yes" ], [ dnl try with -lcurses AC_CHECK_LIB_NOC(readline, readline, [ READLINE="-lreadline -lcurses" have_readline="yes" ], [ ], -lcurses ) ]) if test "x$have_readline" = "xyes"; then AC_CHECK_HEADERS(readline/history.h, [AC_DEFINE(HAVE_READLINE, 1)]) fi fi AC_SUBST(READLINE) AC_MSG_CHECKING( Are we using ini caching ) if test "x$inicaching" = "xtrue"; then CFLAGS="$CFLAGS -DENABLE_INI_CACHING" AC_MSG_RESULT( yes ); else AC_MSG_RESULT( no ); fi dnl Are we using flex if test "x$drivers" = "xtrue"; then AC_MSG_CHECKING( Are we using flex ) if test "x$LEX" = "xflex"; then LFLAGS="$LFLAGS -i" AC_MSG_RESULT( yes ); AC_CHECK_LIB(c, scandir, [AC_DEFINE(HAVE_SCANDIR, 1)] ) else AC_MSG_RESULT( no - text driver disabled ); fi AM_CONDITIONAL(HAVE_FLEX, test "x$LEX" = "xflex" ) AC_SUBST(LFLAGS) else AM_CONDITIONAL(HAVE_FLEX, test "xabc" = "xdef" ) fi case $host_os in *qnx* ) qnx="true" AC_DEFINE(QNX_LIBLTDL) ;; esac dnl check how time() can be used AC_HEADER_TIME AC_CHECK_HEADERS(sys/time.h) AC_CHECK_SIZEOF(long, 4) AC_MSG_CHECKING([if platform is 64 bit]) if test "$ac_cv_sizeof_long" = "8"; then AC_MSG_RESULT( Yes ); AC_DEFINE(PLATFORM64) else AC_MSG_RESULT( No ); fi AC_CHECK_LONG_LONG AC_CHECK_SIZEOF([long int]) AC_CHECK_FUNCS( strcasecmp strncasecmp vsnprintf strtol atoll strtoll endpwent gettimeofday ftime time stricmp strnicmp ) LIBADD_DL= AC_SUBST(LIBADD_DL) THREADLIB="" if test "x$thread" = "xtrue"; then if test "x$gnuthread" = "xtrue"; then AC_CHECK_PTH( 1.3.0 ) CPPFLAGS="$CPPFLAGS $PTH_CPPFLAGS" CFLAGS="$CFLAGS $PTH_CFLAGS" LDFLAGS="$LDFLAGS $PTH_LDFLAGS" THREADLIB="$PTH_LIBS" AC_DEFINE(HAVE_LIBPTH,1) AC_DEFINE(_REENTRANT) else gotthread="no"; AC_CHECK_LIB_NOC(thread, mutex_lock, [ AC_DEFINE(HAVE_LIBTHREAD,1) dnl Check if the compiler will build with -mt as a option, this is a solaris thing AC_CHECK_COMP_OPT(mt) AC_DEFINE(_REENTRANT) gotthread="yes"; THREADLIB="-lthread" ]) if test "x$gotthread" = "xno"; then AC_CHECK_LIBPT_NOC(pthread, pthread_mutex_lock, [ AC_DEFINE(HAVE_LIBPTHREAD,1) AC_DEFINE(_REENTRANT) gotthread="yes"; THREADLIB="-lpthread" if test "x$ac_cv_prog_gcc"="xyes"; then dnl Check if the compiler will build with -pthread as a option AC_CHECK_COMP_OPT(pthread) else dnl Check if the compiler will build with -mt as a option AC_CHECK_COMP_OPT(mt) fi ]) fi if test "x$gotthread" = "xno"; then AC_CHECK_LIBPT_NOC(c, pthread_mutex_lock, [ AC_DEFINE(HAVE_LIBPTHREAD,1) AC_DEFINE(_REENTRANT) gotthread="yes"; THREADLIB="" if test "x$ac_cv_prog_gcc"="xyes"; then dnl Check if the compiler will build with -pthread as a option AC_CHECK_COMP_OPT(pthread) else dnl Check if the compiler will build with -mt as a option AC_CHECK_COMP_OPT(mt) fi ]) fi if test "x$gotthread" = "xno"; then if test "x$ac_cv_prog_gcc"="xyes"; then dnl This is for freebsd that needs -lpthread before it finds the lib AC_CHECK_COMP_OPT(pthread) AC_CHECK_LIBPT_NOC(c, pthread_mutex_lock, [ AC_DEFINE(HAVE_LIBPTHREAD,1) AC_DEFINE(_REENTRANT) THREADLIB="-pthread -lc_r" gotthread="yes"; ]) fi fi dnl Check for AIX if test "x$gotthread" = "xno"; then SAVECFLAGS="$CFLAGS" CFLAGS="$CFLAGS -D_THREAD_SAFE -D_ALL_SOURCE -D_LONG_LONG" AC_CHECK_LIBPT_NOC(pthread, pthread_mutex_lock, [ AC_DEFINE(HAVE_LIBPTHREAD,1) gotthread="yes"; THREADLIB="-lpthread" ]) CFLAGS="$SAVECFLAGS" AC_DEFINE(_THREAD_SAFE) AC_DEFINE(_ALL_SOURCE) AC_DEFINE(_LONG_LONG) fi if test "x$gotthread" = "xyes"; then dnl do not add a -lc because of this save_LIBS=$LIBS AC_CHECK_LIB(c, localtime_r, [AC_DEFINE(HAVE_LOCALTIME_R, 1)] ) LIBS=$save_LIBS fi fi fi case $host_os in "darwin"*) stats="false" macosx="yes" AC_DEFINE(OSXHEADER) ;; sysv5Open*) if test "x$THREADLIB" = "x"; then LIBS="$LIBS $THREADLIB" else LIBS="$LIBS -Kthread" fi ;; *) LIBS="$LIBS $THREADLIB" ;; esac if test "x$stats" = "xtrue"; then AC_CHECK_FUNCS( ftok semget shmget semop snprintf,[],[stats=false]) fi if test "x$stats" = "xtrue"; then AC_CHECK_SEMUNDOO AC_DEFINE(COLLECT_STATS) fi dnl I need to check for libsocket before testing X AC_CHECK_LIB(socket, socket, [LIBSOCKET="-lsocket"]) dnl for Solaris AC_SUBST(LIBSOCKET) AC_CHECK_LIB(nsl, gethostbyname, [LIBNSL="-lnsl"]) dnl for Solaris AC_SUBST(LIBNSL) dnl use the new QT detection macros have_qt="no" have_qt4="no" if test "x$gui" = "xtrue"; then FUN_CHECK_QT fi AC_ARG_WITH(msql-lib, [ --with-msql-lib=DIR where the root of MiniSQL libs are installed ], msql_libraries="$withval" ) AC_ARG_WITH(msql-include, [ --with-msql-include=DIR where the MiniSQL headers are installed ], msql_headers="$withval" ) AC_SUBST(msql_libraries) AC_SUBST(msql_headers) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(malloc.h unistd.h pwd.h crypt.h limits.h synch.h strings.h string.h locale.h sys/malloc.h sys/types.h sys/sem.h stdarg.h varargs.h sys/time.h sys/timeb.h time.h ) INCLUDES="$INCLUDES $USER_INCLUDES"; dnl only build the mSQL code if the headers are in place AC_CHECK_HEADERS(msql.h,[msql=true], [ msql=false; for ac_dir in $kde_extra_includes $msql_headers; do AC_CHECK_HEADERS( $ac_dir/msql.h, [ msql=true; INCLUDES="$INCLUDES $USER_INCLUDES -I$ac_dir"; ]) done ]) dnl AC_SUBST(all_includes) dnl AC_SUBST(all_libraries) AM_CONDITIONAL(MSQL, test "x$msql" = "xtrue" ) AM_CONDITIONAL(QT, test "x$have_qt" = "xyes" ) AM_CONDITIONAL(QT4, test "x$have_qt4" = "xyes" ) AM_CONDITIONAL(QTWIZARD, test "x$have_qtwizard" = "xyes" ) AM_CONDITIONAL(QTMDIAREA, test "x$have_qtmdiarea" = "xyes" ) AM_CONDITIONAL(DRIVERS, test "x$drivers" = "xtrue" ) AM_CONDITIONAL(FDB, test "x$fdb" = "xtrue" ) AM_CONDITIONAL(QNX, test "x$qnx" = "xtrue" ) AM_CONDITIONAL(WITHLT, test "x$use_builtin_libtool" = "xyes" ) AM_CONDITIONAL(ODBCTRACE, test "x$odbctrace" = "xtrue" ) dnl This blows up due to what I think is a bug in automake 1.6.3 dnl AC_SUBST(INCLUDES) if test "x$fastvalidate" = "xtrue"; then AC_DEFINE(FAST_HANDLE_VALIDATE) fi if test "x$handlemap" = "xtrue"; then AC_DEFINE(WITH_HANDLE_REDIRECT) fi dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_STRUCT_TM AC_TYPE_UID_T AC_HEADER_DIRENT dnl Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_VPRINTF AC_CHECK_FUNCS( putenv socket strdup strstr setenv setlocale strchr ) dnl This is the unixODBC source tree AC_DEFINE(UNIXODBC_SOURCE) LIB_VERSION="1:0:0" AC_SUBST(LIB_VERSION) AC_OUTPUT( Makefile \ extras/Makefile \ log/Makefile \ lst/Makefile \ ini/Makefile \ odbcinst/Makefile \ cur/Makefile \ DriverManager/Makefile \ odbcinstQ/Makefile \ odbcinstQ4/Makefile \ exe/Makefile \ DRVConfig/Makefile \ DRVConfig/drvcfg1/Makefile \ DRVConfig/drvcfg2/Makefile \ DRVConfig/PostgreSQL/Makefile \ DRVConfig/MiniSQL/Makefile \ DRVConfig/MySQL/Makefile \ DRVConfig/nn/Makefile \ DRVConfig/esoob/Makefile \ DRVConfig/oplodbc/Makefile \ DRVConfig/template/Makefile \ DRVConfig/tds/Makefile \ DRVConfig/txt/Makefile \ DRVConfig/Oracle/Makefile \ DRVConfig/sapdb/Makefile \ DRVConfig/Mimer/Makefile \ Drivers/Makefile \ Drivers/PostgreSQL/Makefile \ Drivers/Postgre7.1/Makefile \ Drivers/nn/Makefile \ Drivers/odbc/Makefile \ Drivers/template/Makefile \ Drivers/MiniSQL/Makefile \ include/Makefile \ doc/Makefile \ doc/AdministratorManual/Makefile \ doc/ProgrammerManual/Makefile \ doc/ProgrammerManual/Tutorial/Makefile \ doc/UserManual/Makefile \ doc/lst/Makefile \ DataManager/Makefile \ DataManagerII/Makefile \ ODBCConfig/Makefile \ odbctest/Makefile \ autotest/Makefile \ samples/Makefile \ ) unixODBC-2.2.14-p2/aclocal.m40100644000076400007640000075101711111035056014041 0ustar nicknick# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 47 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_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_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/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. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$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 && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|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-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The 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 > conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 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*) # 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` ;; 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 ;; *) # 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. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done 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` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # -------------------- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ------------------------------------------------------------------ AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&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_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext 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 > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_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 .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_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" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; 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*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_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' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # 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)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $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' ;; knetbsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU 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=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- #- set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the 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; 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 ;; 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*) 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=unknown ;; 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 ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # --------------- AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([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 fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # -------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # # Check for any special shared library compilation flags. # _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= if test "$GCC" = no; then case $host_os in sco3.2v5*) _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' ;; esac fi if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : else AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no fi fi # # Check to make sure the static flag actually works. # AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) # Report which librarie types wil actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) 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]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # 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 unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' 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 # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in ia64*|hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${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_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_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' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sco*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 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. # 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//" # 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 # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) symcode='[[BDRT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # 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. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; sco3.2v5*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_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_AC_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' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' 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 # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; sco3.2v5*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4.2uw2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv5*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && 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_MSG_RESULT([$SED]) ]) # Copyright (C) 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # 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 # 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 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 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 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # 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 case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # 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]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 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 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # 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 # 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 12 # 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.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([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 ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # 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_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # 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]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 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 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 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. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 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. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 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 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 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. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # 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="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # 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([acinclude.m4]) unixODBC-2.2.14-p2/Makefile.am0100644000076400007640000000155411057230653014240 0ustar nicknickSUBDIRS = \ extras \ log \ lst \ ini \ libltdl \ odbcinst \ DriverManager \ odbcinstQ \ odbcinstQ4 \ exe \ cur \ DRVConfig \ Drivers \ include \ doc \ ODBCConfig \ DataManager \ DataManagerII \ odbctest \ autotest \ samples EXTRA_DIST = \ unixODBC.spec \ unixODBC-sr.spec \ README.OSX \ README.VMS \ README.QNX \ README.CYGWIN \ README.AIX \ README.SOLARIS \ README.INTERIX \ vms/install_image.com \ vms/odbc2_axp.opt \ vms/odbc_axp.opt \ vms/odbcinst_axp.opt \ vms/odbc_setup.com \ vms/drivermanager_axp.opt \ vmsbuild.com \ Interix/configure \ Interix/config.guess \ Interix/libtool \ qt.m4 install-data-am: -touch $(DESTDIR)${sysconfdir}/odbcinst.ini -touch $(DESTDIR)${sysconfdir}/odbc.ini -mkdir -p $(DESTDIR)${sysconfdir}/ODBCDataSources $(DESTDIR)${bindir}/odbc_config --header > $(DESTDIR)${includedir}/unixodbc_conf.h unixODBC-2.2.14-p2/Makefile.in0100644000076400007640000005077211111035272014246 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS config.guess config.sub depcomp \ install-sh ltmain.sh missing mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.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 configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = \ extras \ log \ lst \ ini \ libltdl \ odbcinst \ DriverManager \ odbcinstQ \ odbcinstQ4 \ exe \ cur \ DRVConfig \ Drivers \ include \ doc \ ODBCConfig \ DataManager \ DataManagerII \ odbctest \ autotest \ samples EXTRA_DIST = \ unixODBC.spec \ unixODBC-sr.spec \ README.OSX \ README.VMS \ README.QNX \ README.CYGWIN \ README.AIX \ README.SOLARIS \ README.INTERIX \ vms/install_image.com \ vms/odbc2_axp.opt \ vms/odbc_axp.opt \ vms/odbcinst_axp.opt \ vms/odbc_setup.com \ vms/drivermanager_axp.opt \ vmsbuild.com \ Interix/configure \ Interix/config.guess \ Interix/libtool \ qt.m4 all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ 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: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # 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): @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; \ (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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @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; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/Interix $(distdir)/vms @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(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-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) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(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) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && 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 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @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: 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) 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 $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-exec-am: install-info: install-info-recursive install-man: 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-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-libtool distclean-recursive \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am install-data-am: -touch $(DESTDIR)${sysconfdir}/odbcinst.ini -touch $(DESTDIR)${sysconfdir}/odbc.ini -mkdir -p $(DESTDIR)${sysconfdir}/ODBCDataSources $(DESTDIR)${bindir}/odbc_config --header > $(DESTDIR)${includedir}/unixodbc_conf.h # 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: unixODBC-2.2.14-p2/configure0100755000076400007640000347766411111035300014120 0ustar nicknick#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 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=: # 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 # 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 # 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 # 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.) as_nl=' ' 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 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. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # 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 || 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=: # 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 : _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=: # 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 : (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 autoconf@gnu.org about your system, echo including any error possibly output before this echo message } 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" || { 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 fi echo >conf$$.file 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 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'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$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 && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 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="DRVConfig/MiniSQL/odbcminiS.c" # 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" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar YACC YFLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP LEX LEX_OUTPUT_ROOT LEXLIB LN_S CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE GREP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os ECHO AR RANLIB DLLTOOL AS OBJDUMP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL subdirs LTDLINCL LIBLTDL SHLIBEXT LIBICONV ICONV_CHAR_ENCODING ICONV_UNICODE_ENCODING LIBADD_CRYPT LIBADD_POW READLINE HAVE_FLEX_TRUE HAVE_FLEX_FALSE LFLAGS LIBADD_DL PTH_CPPFLAGS PTH_CFLAGS PTH_LDFLAGS PTH_LIBS LIBSOCKET LIBNSL XMKMF X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS QTMIN QTMAX MOC UIC MOCDEFS QTVERSION QT_CXXFLAGS QT_LDFLAGS QT_LIBS msql_libraries msql_headers MSQL_TRUE MSQL_FALSE QT_TRUE QT_FALSE QT4_TRUE QT4_FALSE QTWIZARD_TRUE QTWIZARD_FALSE QTMDIAREA_TRUE QTMDIAREA_FALSE DRIVERS_TRUE DRIVERS_FALSE FDB_TRUE FDB_FALSE QNX_TRUE QNX_FALSE WITHLT_TRUE WITHLT_FALSE ODBCTRACE_TRUE ODBCTRACE_FALSE ALLOCA LIB_VERSION LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias YACC YFLAGS CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS XMKMF QTMIN QTMAX MOC UIC' ac_subdirs_all='libltdl' # Initialize some variables set by options. ac_init_help= ac_init_version=false # 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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=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 ;; -*) { 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 && { 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. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 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'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. 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 case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { 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 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 .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { 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 -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | 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 .." { 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" || { 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 X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-gui build GUI Parts default=yes --enable-threads build with thread support default=yes --enable-gnuthreads build with gnu threads support default=no --enable-readline build with readline support default=yes --enable-inicaching build with ini file caching support default=yes --enable-drivers build included drivers default=yes --enable-fdb build file-based data access default=no --enable-odbctrace build odbc trace library default=no --enable-fastvalidate use relaxed handle checking in the DM default=no --enable-iconv build with iconv support default=yes --enable-stats build with statistic gathering support default=yes --enable-rtldgroup build with RTLD_GROUP passed to dlopen (when supported) default=yes --enable-ltdllib Use system libltdl.so (if found) default=no --enable-handlemap driver manager can map driver handles called back from broken drivers default=no --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib --with-iconv-char-enc=enc Encoding to use as ASCII default=auto-search --with-iconv-ucode-enc=enc Encoding to use as UNICODE default=auto-search --with-pth=ARG Build with GNU Pth Library (default=yes) --with-pth-test Perform GNU Pth Sanity Test (default=yes) --with-x use the X Window System --with-qt-dir=DIR where the Qt package is installed --with-qt-includes=DIR where the Qt includes are installed --with-qt-libraries=DIR where the Qt libraries are installed --with-qt-programs=DIR where the Qt programs are installed --with-msql-lib=DIR where the root of MiniSQL libs are installed --with-msql-include=DIR where the MiniSQL headers are installed Some influential environment variables: 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. 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 CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags XMKMF Path to xmkmf, Makefile generator for X Window System QTMIN minimum version of Qt to search for e.g. export QTMIN=020400 QTMAX maximum version of Qt to search for e.g. export QTMAX=030305 MOC QT meta object compiler command UIC Qt UI compiler command 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" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 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.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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.61. 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=. 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=`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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $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=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac 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=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac 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 && echo "$as_me: caught signal $ac_signal" 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 explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 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 { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # 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,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 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 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`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 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 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 am__api_version="1.9" 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 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 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. # 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. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS 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 { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$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' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 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 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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 $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`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 echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } 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=unixODBC VERSION=2.2.14 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"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # 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 -' 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 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. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? 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.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. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? 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 | *.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 { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 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. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? 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 { { 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 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 { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out 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. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? 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 | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? 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 ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else 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 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else 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 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else 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) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$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 done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_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= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # 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 { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$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=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 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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 echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$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 "echo \"\$as_me:$LINENO: $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 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 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 "echo \"\$as_me:$LINENO: $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 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 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 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 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 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_LEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $LEX" >&5 echo "${ECHO_T}$LEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking lex output file root" >&5 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } if test "${ac_cv_prog_lex_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { echo "$as_me:$LINENO: checking lex library" >&5 echo $ECHO_N "checking lex library... $ECHO_C" >&6; } if test "${ac_cv_lib_lex+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_lex=$ac_lib else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 echo "${ECHO_T}$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_prog_lex_yytext_pointer=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 echo "${ECHO_T}$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 # 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. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS 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 { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$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' { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`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 echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # 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 --enable-gui was given. if test "${enable_gui+set}" = set; then enableval=$enable_gui; case "${enableval}" in yes) gui=true ;; no) gui=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-gui" >&5 echo "$as_me: error: bad value ${enableval} for --enable-gui" >&2;} { (exit 1); exit 1; }; } ;; esac else gui=true fi if test "x$gui" = "xtrue"; 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 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else 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 { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else 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 { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$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= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # 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 { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$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 else 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 fi # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then enableval=$enable_threads; case "${enableval}" in yes) thread=true ;; no) thread=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-thread" >&5 echo "$as_me: error: bad value ${enableval} for --enable-thread" >&2;} { (exit 1); exit 1; }; } ;; esac else thread=true fi # Check whether --enable-gnuthreads was given. if test "${enable_gnuthreads+set}" = set; then enableval=$enable_gnuthreads; case "${enableval}" in yes) gnuthread=true ;; no) gnuthread=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-gnuthread" >&5 echo "$as_me: error: bad value ${enableval} for --enable-gnuthread" >&2;} { (exit 1); exit 1; }; } ;; esac else gnuthread=false fi # Check whether --enable-readline was given. if test "${enable_readline+set}" = set; then enableval=$enable_readline; case "${enableval}" in yes) readline=true ;; no) readline=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-readline" >&5 echo "$as_me: error: bad value ${enableval} for --enable-readline" >&2;} { (exit 1); exit 1; }; } ;; esac else readline=true fi # Check whether --enable-inicaching was given. if test "${enable_inicaching+set}" = set; then enableval=$enable_inicaching; case "${enableval}" in yes) inicaching=true ;; no) inicaching=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-inicaching" >&5 echo "$as_me: error: bad value ${enableval} for --enable-inicaching" >&2;} { (exit 1); exit 1; }; } ;; esac else inicaching=true fi # Check whether --enable-drivers was given. if test "${enable_drivers+set}" = set; then enableval=$enable_drivers; case "${enableval}" in yes) drivers=true ;; no) drivers=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-drivers" >&5 echo "$as_me: error: bad value ${enableval} for --enable-drivers" >&2;} { (exit 1); exit 1; }; } ;; esac else drivers=true fi # Check whether --enable-fdb was given. if test "${enable_fdb+set}" = set; then enableval=$enable_fdb; case "${enableval}" in yes) fdb=true ;; no) fdb=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-fdb" >&5 echo "$as_me: error: bad value ${enableval} for --enable-fdb" >&2;} { (exit 1); exit 1; }; } ;; esac else fdb=false fi # Check whether --enable-odbctrace was given. if test "${enable_odbctrace+set}" = set; then enableval=$enable_odbctrace; case "${enableval}" in yes) odbctrace=true ;; no) odbctrace=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-odbctrace" >&5 echo "$as_me: error: bad value ${enableval} for --enable-odbctrace" >&2;} { (exit 1); exit 1; }; } ;; esac else odbctrace=false fi # Check whether --enable-fastvalidate was given. if test "${enable_fastvalidate+set}" = set; then enableval=$enable_fastvalidate; case "${enableval}" in yes) fastvalidate=true ;; no) fastvalidate=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-fastvalidate" >&5 echo "$as_me: error: bad value ${enableval} for --enable-fastvalidate" >&2;} { (exit 1); exit 1; }; } ;; esac else fastvalidate=false fi # Check whether --enable-iconv was given. if test "${enable_iconv+set}" = set; then enableval=$enable_iconv; case "${enableval}" in yes) iconv=true ;; no) iconv=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-iconv" >&5 echo "$as_me: error: bad value ${enableval} for --enable-iconv" >&2;} { (exit 1); exit 1; }; } ;; esac else iconv=true fi { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name 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 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else 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 echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/sem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF semh=true else semh=false fi done # Check whether --enable-stats was given. if test "${enable_stats+set}" = set; then enableval=$enable_stats; case "${enableval}" in yes) if test "x$semh" = "xfalse"; then { { echo "$as_me:$LINENO: error: stats enabled but required header was not found" >&5 echo "$as_me: error: stats enabled but required header was not found" >&2;} { (exit 1); exit 1; }; } fi stats=true ;; no) stats=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-stats" >&5 echo "$as_me: error: bad value ${enableval} for --enable-stats" >&2;} { (exit 1); exit 1; }; } ;; esac else stats=$semh fi # Check whether --enable-rtldgroup was given. if test "${enable_rtldgroup+set}" = set; then enableval=$enable_rtldgroup; case "${enableval}" in yes) rtldgroup=true ;; no) rtldgroup=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-rltdgroup" >&5 echo "$as_me: error: bad value ${enableval} for --enable-rltdgroup" >&2;} { (exit 1); exit 1; }; } ;; esac else rtldgroup=true fi # Check whether --enable-ltdllib was given. if test "${enable_ltdllib+set}" = set; then enableval=$enable_ltdllib; case "${enableval}" in yes) ltdllib=true ;; no) ltdllib=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-ltdllib" >&5 echo "$as_me: error: bad value ${enableval} for --enable-ltdllib" >&2;} { (exit 1); exit 1; }; } ;; esac else ltdllib=false fi # Check whether --enable-handlemap was given. if test "${enable_handlemap+set}" = set; then enableval=$enable_handlemap; case "${enableval}" in yes) handlemap=true ;; no) handlemap=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-handlemap" >&5 echo "$as_me: error: bad value ${enableval} for --enable-handlemap" >&2;} { (exit 1); exit 1; }; } ;; esac else handlemap=false fi INCLTDL="" LIBLTDL="" { echo "$as_me:$LINENO: checking Have we enabled using RTLD_GROUP " >&5 echo $ECHO_N "checking Have we enabled using RTLD_GROUP ... $ECHO_C" >&6; } if test "x$rtldgroup" = "xtrue"; then { echo "$as_me:$LINENO: result: yes " >&5 echo "${ECHO_T}yes " >&6; } case $enable_ltdl_convenience in no) { { echo "$as_me:$LINENO: error: this package needs a convenience libltdl" >&5 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_builddir}/''libltdl'/libltdlc.la LTDLINCL='-I${top_srcdir}/''libltdl' # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" else { echo "$as_me:$LINENO: result: no " >&5 echo "${ECHO_T}no " >&6; }; case $enable_ltdl_convenience in no) { { echo "$as_me:$LINENO: error: this package needs a convenience libltdl" >&5 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 CFLAGS=-DWITHOUT_RTLD_GROUP" ;; esac LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la LTDLINCL='-I${top_srcdir}/''libltdl' # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" fi # 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 # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 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` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 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 { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 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 { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && 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 fi SED=$lt_cv_path_SED { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } # 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. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$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='$CC -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 aix4* | aix5*) 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'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu | 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 ;; 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*) 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=unknown ;; 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 ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$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 no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # 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=$? 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 6130 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? 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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|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=$? 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-*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-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi 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 { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$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 ;; *-*-cygwin* | *-*-mingw* | *-*-pw32*) 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 echo "${ECHO_T}$DLLTOOL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $AS" >&5 echo "${ECHO_T}$AS" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 echo "${ECHO_T}$ac_ct_AS" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 echo "${ECHO_T}$OBJDUMP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac need_locks="$enable_libtool_lock" for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done 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 { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$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 "echo \"\$as_me:$LINENO: $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 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 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 "echo \"\$as_me:$LINENO: $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 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 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 { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # 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_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog" 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_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else 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_f77_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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*) # 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` ;; 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 ;; *) # 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. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done 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` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else { echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris* | sysv5*) symcode='[BDRT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # 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. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? 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=$? 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 < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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 -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done 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 { echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6; } else { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi 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 case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=yes enable_win32_dll=yes # 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 # 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 # Use C for the default configuration in the libtool script tagname= 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;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # # Check for any special shared library compilation flags. # lt_prog_cc_shlib= if test "$GCC" = no; then case $host_os in sco3.2v5*) lt_prog_cc_shlib='-belf' ;; esac fi if test -n "$lt_prog_cc_shlib"; then { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : else { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} lt_cv_prog_cc_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # { echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_prog_compiler_static" printf "$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 > conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works=yes fi else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$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:8215: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8219: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$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= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&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*) # 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' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_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' ;; 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 ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) 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 ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_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' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' 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' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic='-Kpic' lt_prog_compiler_static='-dn' ;; 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* | sysv5*) 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 ;; 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 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$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:8477: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8481: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } if test x"$lt_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 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 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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:8539: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:8543: \$? = $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 > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || 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 .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 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 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list 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_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. 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-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac 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>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) 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 # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; 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*) # _LT_AC_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}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... 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}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= 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' ;; esac archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; 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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi 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* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 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 ;; 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 "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 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].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes 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 # 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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 $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then 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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='' 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 $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) 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 # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. 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 "$deplibs" | $SED -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*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = 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' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac 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* | kfreebsd*-gnu | 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* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -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*|ia64*) archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=no hardcode_shlibpath_var=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no hardcode_shlibpath_var=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: 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 ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no 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 ;; 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi 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 ${wl}-set_version ${wl}$verstring` ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else 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' 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 linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; 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.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now 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' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; 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 fi { echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$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. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? 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 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=$? 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* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; 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*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_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' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $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' ;; knetbsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU 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=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant 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_AC_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 { echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac 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*) 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 { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = 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 ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" 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" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$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 # Report which librarie types wil actually be built { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # 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 # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 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. # 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//" # 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 # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$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 # 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 # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # 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 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_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 and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. 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 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_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 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 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$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 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" 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 CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (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 archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_automatic_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 # 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= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm 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 unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC 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-%%"` # We don't want -fno-exception wen 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. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes 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 # 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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 $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then 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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='' 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 $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_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}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... 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}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac 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 if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else 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' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac 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* | kfreebsd*-gnu | 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) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then 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 case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_CXX='+b $libdir' hardcode_libdir_separator_CXX=: ;; ia64*) hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; *) hardcode_direct_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*|ia64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) 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 $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in ia64*|hppa*64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) 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 ;; 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 -set_version $verstring` -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 ${wl}-set_version ${wl}$verstring` ${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 ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. 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 $list' 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*) # 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*) # Portland Group C++ compiler 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' 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 $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support 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::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no 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' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. 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 # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) 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 ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 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. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 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 ;; 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. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) 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 -set_version $verstring` -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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' 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" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' 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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 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 ;; sco*) archive_cmds_need_lc_CXX=no case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; 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 C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}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' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) archive_cmds_need_lc_CXX=no ;; 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 { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? 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 # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 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 solaris*) case $cc_basename in CC*) # 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. postdeps_CXX='-lCstd -lCrun' ;; esac esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&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*) # 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' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_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= ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_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_AC_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 ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; 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* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_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="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; 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*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC*) # 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' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; 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*) ;; sco*) case $cc_basename in CC*) lt_prog_compiler_pic_CXX='-fPIC' ;; *) ;; esac ;; 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 ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$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:13099: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13103: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_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 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 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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:13161: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13165: \$? = $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 > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || 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 .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 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 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 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*) 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 { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$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. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? 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 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=$? 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* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; 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*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_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' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $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' ;; knetbsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU 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=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&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-existant 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_AC_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 { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac 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*) 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 { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = 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 ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" 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" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$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 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # 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 # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$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 # 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 # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_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 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_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 and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. 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 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_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 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 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$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 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" 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 CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$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-%%"` { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-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_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; 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_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-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_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_F77='-Kpic' lt_prog_compiler_static_F77='-dn' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # 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:15488: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15492: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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:15550: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:15554: \$? = $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 > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=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 .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 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 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # 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_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. 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-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=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_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$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_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$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_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_F77=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${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_F77='${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' ;; esac archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$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_F77=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$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_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes else # We have old collect2 hardcode_direct_F77=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_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= 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 # 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_F77=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_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _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 "echo \"\$as_me:$LINENO: $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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _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 "echo \"\$as_me:$LINENO: $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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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_F77='${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_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_F77=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$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_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$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_F77='$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_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*|ia64*) archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; ia64*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; *) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; sco3.2v5*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4.2uw2*) archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_F77='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv5*) no_undefined_flag_F77=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$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' hardcode_libdir_flag_spec_F77= hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 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. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? 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_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; 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*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_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' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $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' ;; knetbsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU 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=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # 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 # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # 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 # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # 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_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # 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_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" 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 CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$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-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$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:17675: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17679: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; 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_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_GCJ='-Kpic' lt_prog_compiler_static_GCJ='-dn' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # 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:17937: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17941: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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:17999: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:18003: \$? = $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 > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=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 .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 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 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # 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_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. 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-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=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_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$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_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$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_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_GCJ=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${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_GCJ='${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' ;; esac archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$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_GCJ=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$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_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=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_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= 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 # 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_GCJ=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_GCJ='-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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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_GCJ='${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_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$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_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$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_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*|ia64*) archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; ia64*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; *) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; sco3.2v5*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4.2uw2*) archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv5*) no_undefined_flag_GCJ=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$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' hardcode_libdir_flag_spec_GCJ= hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ 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. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? 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_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; 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*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_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' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $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' ;; knetbsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU 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=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac 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*) 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 { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = 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 ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" 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" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$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 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # 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 # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # 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 # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # 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_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # 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_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" 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 CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # 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. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$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-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # 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 # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # 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 # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # 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_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # 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_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" 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 CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion subdirs="$subdirs libltdl" use_builtin_libtool="no" if test "x$ltdllib" = "xtrue"; then { echo "$as_me:$LINENO: checking for lt_dlopen in -lltdl" >&5 echo $ECHO_N "checking for lt_dlopen in -lltdl... $ECHO_C" >&6; } if test "${ac_cv_lib_ltdl_lt_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_dlopen (); int main () { return lt_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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_ltdl_lt_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ltdl_lt_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlopen" >&6; } if test $ac_cv_lib_ltdl_lt_dlopen = yes; then LIBLTDL="-lltdl" else use_builtin_libtool="yes" fi if test "x$use_builtin_libtool" = "xno"; then for ac_header in ltdl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else use_builtin_libtool="yes" fi done fi else use_builtin_libtool="yes" fi { echo "$as_me:$LINENO: checking if we are using the included libltdl " >&5 echo $ECHO_N "checking if we are using the included libltdl ... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $use_builtin_libtool " >&5 echo "${ECHO_T}$use_builtin_libtool " >&6; } { echo "$as_me:$LINENO: checking for shared lib extension" >&5 echo $ECHO_N "checking for shared lib extension... $ECHO_C" >&6; } SHLIBEXT="$shrext_cmds" { echo "$as_me:$LINENO: result: $shrext_cmds" >&5 echo "${ECHO_T}$shrext_cmds" >&6; } if test "x$iconv" = "xtrue"; then # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then withval=$with_libiconv_prefix; for dir in `echo "$withval" | tr : ' '`; do if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi done fi { echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=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 () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" 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 () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 echo "${ECHO_T}$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF { echo "$as_me:$LINENO: checking for iconv declaration" >&5 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then am_cv_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- }$am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi LIBICONV= if test "$am_cv_lib_iconv" = yes; then LIBICONV="-liconv" fi iconv_char_enc="auto-search" # Check whether --with-iconv_char_enc was given. if test "${with_iconv_char_enc+set}" = set; then withval=$with_iconv_char_enc; iconv_char_enc="$withval" fi ICONV_CHAR_ENCODING="$iconv_char_enc" iconv_ucode_enc="auto-search" # Check whether --with-iconv_ucode_enc was given. if test "${with_iconv_ucode_enc+set}" = set; then withval=$with_iconv_ucode_enc; iconv_ucode_enc="$withval" fi ICONV_CHAR_ENCODING="" ICONV_UNICODE_ENCODING="" if test "$am_cv_func_iconv" = yes; then { echo "$as_me:$LINENO: checking for encoding to use for CHAR representations " >&5 echo $ECHO_N "checking for encoding to use for CHAR representations ... $ECHO_C" >&6; }; ICONV_CHAR_ENCODING="$iconv_char_enc" { echo "$as_me:$LINENO: result: $iconv_char_enc " >&5 echo "${ECHO_T}$iconv_char_enc " >&6; }; { echo "$as_me:$LINENO: checking for encoding to use for UNICODE representations " >&5 echo $ECHO_N "checking for encoding to use for UNICODE representations ... $ECHO_C" >&6; }; ICONV_UNICODE_ENCODING="$iconv_ucode_enc" { echo "$as_me:$LINENO: result: $iconv_ucode_enc " >&5 echo "${ECHO_T}$iconv_ucode_enc " >&6; }; fi fi { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; } if test "${ac_cv_lib_crypt_crypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $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 crypt (); int main () { return crypt (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_crypt_crypt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_crypt_crypt=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; } if test $ac_cv_lib_crypt_crypt = yes; then LIBADD_CRYPT="-lcrypt"; cat >>confdefs.h <<\_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF fi { echo "$as_me:$LINENO: checking for pow in -lm" >&5 echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6; } if test "${ac_cv_lib_m_pow+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $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 pow (); int main () { return pow (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_m_pow=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_pow=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5 echo "${ECHO_T}$ac_cv_lib_m_pow" >&6; } if test $ac_cv_lib_m_pow = yes; then LIBADD_POW="-lm" fi have_readline="no" if test "x$readline" = "xtrue"; then { echo "$as_me:$LINENO: checking for readline in -lreadline " >&5 echo $ECHO_N "checking for readline in -lreadline ... $ECHO_C" >&6; } ac_save_LIBS="$LIBS" LIBS="-lreadline $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char readline(); int main () { readline() ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } READLINE=-lreadline have_readline="yes" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { echo "$as_me:$LINENO: checking for readline in -lreadline -lcurses " >&5 echo $ECHO_N "checking for readline in -lreadline -lcurses ... $ECHO_C" >&6; } ac_save_LIBS="$LIBS" LIBS="-lreadline -lcurses $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char readline(); int main () { readline() ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } READLINE="-lreadline -lcurses" have_readline="yes" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test "x$have_readline" = "xyes"; then for ac_header in readline/history.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_READLINE 1 _ACEOF fi done fi fi { echo "$as_me:$LINENO: checking Are we using ini caching " >&5 echo $ECHO_N "checking Are we using ini caching ... $ECHO_C" >&6; } if test "x$inicaching" = "xtrue"; then CFLAGS="$CFLAGS -DENABLE_INI_CACHING" { echo "$as_me:$LINENO: result: yes " >&5 echo "${ECHO_T}yes " >&6; }; else { echo "$as_me:$LINENO: result: no " >&5 echo "${ECHO_T}no " >&6; }; fi if test "x$drivers" = "xtrue"; then { echo "$as_me:$LINENO: checking Are we using flex " >&5 echo $ECHO_N "checking Are we using flex ... $ECHO_C" >&6; } if test "x$LEX" = "xflex"; then LFLAGS="$LFLAGS -i" { echo "$as_me:$LINENO: result: yes " >&5 echo "${ECHO_T}yes " >&6; }; { echo "$as_me:$LINENO: checking for scandir in -lc" >&5 echo $ECHO_N "checking for scandir in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_scandir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $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 scandir (); int main () { return scandir (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_c_scandir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_scandir=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_scandir" >&5 echo "${ECHO_T}$ac_cv_lib_c_scandir" >&6; } if test $ac_cv_lib_c_scandir = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SCANDIR 1 _ACEOF fi else { echo "$as_me:$LINENO: result: no - text driver disabled " >&5 echo "${ECHO_T}no - text driver disabled " >&6; }; fi if test "x$LEX" = "xflex" ; then HAVE_FLEX_TRUE= HAVE_FLEX_FALSE='#' else HAVE_FLEX_TRUE='#' HAVE_FLEX_FALSE= fi else if test "xabc" = "xdef" ; then HAVE_FLEX_TRUE= HAVE_FLEX_FALSE='#' else HAVE_FLEX_TRUE='#' HAVE_FLEX_FALSE= fi fi case $host_os in *qnx* ) qnx="true" cat >>confdefs.h <<\_ACEOF #define QNX_LIBLTDL 1 _ACEOF ;; esac { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else 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 { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$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 for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for long" >&5 echo $ECHO_N "checking for long... $ECHO_C" >&6; } if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 typedef long ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 echo "${ECHO_T}$ac_cv_type_long" >&6; } # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of long" >&5 echo $ECHO_N "checking size of long... $ECHO_C" >&6; } if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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. */ $ac_includes_default typedef long ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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. */ $ac_includes_default typedef long ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else 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 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. */ $ac_includes_default typedef long ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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. */ $ac_includes_default typedef long ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else 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 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. */ $ac_includes_default typedef long ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else 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 ?*) ac_cv_sizeof_long=$ac_lo;; '') if test "$ac_cv_type_long" = yes; then { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else ac_cv_sizeof_long=0 fi ;; esac 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 typedef long ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; fprintf (f, "%lu\n", i); } 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_long" = yes; then { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else ac_cv_sizeof_long=0 fi fi 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 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF { echo "$as_me:$LINENO: checking if platform is 64 bit" >&5 echo $ECHO_N "checking if platform is 64 bit... $ECHO_C" >&6; } if test "$ac_cv_sizeof_long" = "8"; then { echo "$as_me:$LINENO: result: Yes " >&5 echo "${ECHO_T}Yes " >&6; }; cat >>confdefs.h <<\_ACEOF #define PLATFORM64 1 _ACEOF else { echo "$as_me:$LINENO: result: No " >&5 echo "${ECHO_T}No " >&6; }; fi { echo "$as_me:$LINENO: checking for long long" >&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6; } if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 () { long long 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_long=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 echo "${ECHO_T}$ac_cv_type_long_long" >&6; } if eval "test \"`echo $ac_cv_type_long_long`\" = yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG 1 _ACEOF fi { echo "$as_me:$LINENO: checking for long int" >&5 echo $ECHO_N "checking for long int... $ECHO_C" >&6; } if test "${ac_cv_type_long_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 typedef long int ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_long_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_int=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5 echo "${ECHO_T}$ac_cv_type_long_int" >&6; } # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of long int" >&5 echo $ECHO_N "checking size of long int... $ECHO_C" >&6; } if test "${ac_cv_sizeof_long_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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. */ $ac_includes_default typedef long int ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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. */ $ac_includes_default typedef long int ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else 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 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. */ $ac_includes_default typedef long int ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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. */ $ac_includes_default typedef long int ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else 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 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. */ $ac_includes_default typedef long int ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else 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 ?*) ac_cv_sizeof_long_int=$ac_lo;; '') if test "$ac_cv_type_long_int" = yes; then { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long int) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else ac_cv_sizeof_long_int=0 fi ;; esac 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 typedef long int ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; fprintf (f, "%lu\n", i); } 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_long_int" = yes; then { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long int) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else ac_cv_sizeof_long_int=0 fi fi 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 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int _ACEOF for ac_func in strcasecmp strncasecmp vsnprintf strtol atoll strtoll endpwent gettimeofday ftime time stricmp strnicmp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBADD_DL= THREADLIB="" if test "x$thread" = "xtrue"; then if test "x$gnuthread" = "xtrue"; then PTH_CPPFLAGS='' PTH_CFLAGS='' PTH_LDFLAGS='' PTH_LIBS='' { echo "$as_me:$LINENO: checking for GNU Pth" >&5 echo $ECHO_N "checking for GNU Pth... $ECHO_C" >&6; } if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: " >&5 echo "${ECHO_T} " >&6; } fi # Check whether --with-pth was given. if test "${with_pth+set}" = set; then withval=$with_pth; else with_pth="yes" fi # Check whether --with-pth-test was given. if test "${with_pth_test+set}" = set; then withval=$with_pth_test; else with_pth_test="yes" fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: + Command Line Options:" >&5 echo "${ECHO_T} + Command Line Options:" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o --with-pth=$with_pth" >&5 echo "${ECHO_T} o --with-pth=$with_pth" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o --with-pth-test=$with_pth_test" >&5 echo "${ECHO_T} o --with-pth-test=$with_pth_test" >&6; } fi if test ".$with_pth" != .no; then _pth_subdir=no _pth_subdir_opts='' case "$with_pth" in subdir:* ) _pth_subdir=yes _pth_subdir_opts=`echo $with_pth | sed -e 's/^subdir:[^ ]*[ ]*//'` with_pth=`echo $with_pth | sed -e 's/^subdir:\([^ ]*\).*$/\1/'` ;; esac _pth_version="" _pth_location="" _pth_type="" _pth_cppflags="" _pth_cflags="" _pth_ldflags="" _pth_libs="" if test ".$with_pth" = .yes; then # via config script in $PATH _pth_version=`(pth-config --version) 2>/dev/null |\ sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'` if test ".$_pth_version" != .; then _pth_location=`pth-config --prefix` _pth_type='installed' _pth_cppflags=`pth-config --cflags` _pth_cflags=`pth-config --cflags` _pth_ldflags=`pth-config --ldflags` _pth_libs=`pth-config --libs` fi elif test -d "$with_pth"; then with_pth=`echo $with_pth | sed -e 's;/*$;;'` _pth_found=no # via locally included source tree if test ".$_pth_subdir" = .yes; then _pth_location="$with_pth" _pth_type='local' _pth_cppflags="-I$with_pth" _pth_cflags="-I$with_pth" if test -f "$with_pth/ltconfig"; then _pth_ldflags="-L$with_pth/.libs" else _pth_ldflags="-L$with_pth" fi _pth_libs="-lpth" _pth_version=`grep '^const char PTH_Hello' $with_pth/pth_vers.c |\ sed -e 's;^.*Version[ ]*\([0-9]*\.[0-9]*[.ab][0-9]*\)[ ].*$;\1;'` _pth_found=yes ac_configure_args="$ac_configure_args --enable-subdir $_pth_subdir_opts" with_pth_test=no fi # via config script under a specified directory # (a standard installation, but not a source tree) if test ".$_pth_found" = .no; then for _dir in $with_pth/bin $with_pth; do if test -f "$_dir/pth-config"; then test -f "$_dir/pth-config.in" && continue # pth-config in source tree! _pth_version=`($_dir/pth-config --version) 2>/dev/null |\ sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'` if test ".$_pth_version" != .; then _pth_location=`$_dir/pth-config --prefix` _pth_type="installed" _pth_cppflags=`$_dir/pth-config --cflags` _pth_cflags=`$_dir/pth-config --cflags` _pth_ldflags=`$_dir/pth-config --ldflags` _pth_libs=`$_dir/pth-config --libs` _pth_found=yes break fi fi done fi # in any subarea under a specified directory # (either a special installation or a Pth source tree) if test ".$_pth_found" = .no; then _pth_found=0 for _file in x `find $with_pth -name "pth.h" -type f -print`; do test .$_file = .x && continue _dir=`echo $_file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` _pth_version=`($_dir/pth-config --version) 2>/dev/null |\ sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'` if test ".$_pth_version" = .; then _pth_version=`grep '^#define PTH_VERSION_STR' $_file |\ sed -e 's;^#define[ ]*PTH_VERSION_STR[ ]*"\([0-9]*\.[0-9]*[.ab][0-9]*\)[ ].*$;\1;'` fi _pth_cppflags="-I$_dir" _pth_cflags="-I$_dir" _pth_found=`expr $_pth_found + 1` done for _file in x `find $with_pth -name "libpth.[aso]" -type f -print`; do test .$_file = .x && continue _dir=`echo $_file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` _pth_ldflags="-L$_dir" _pth_libs="-lpth" _pth_found=`expr $_pth_found + 1` done if test ".$_pth_found" = .2; then _pth_location="$with_pth" _pth_type="uninstalled" else _pth_version='' fi fi fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: + Determined Location:" >&5 echo "${ECHO_T} + Determined Location:" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o path: $_pth_location" >&5 echo "${ECHO_T} o path: $_pth_location" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o type: $_pth_type" >&5 echo "${ECHO_T} o type: $_pth_type" >&6; } fi if test ".$_pth_version" = .; then if test ".$with_pth" != .yes; then { echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6; } echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Unable to locate GNU Pth under $with_pth. Please specify the correct path to either a GNU Pth installation tree (use --with-pth=DIR if you used --prefix=DIR for installing GNU Pth in the past) or to a GNU Pth source tree (use --with-pth=DIR if DIR is a path to a pth-X.Y.Z/ directory; but make sure the package is already built, i.e., the "configure; make" step was already performed there). EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 else { echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6; } echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Unable to locate GNU Pth in any system-wide location (see \$PATH). Please specify the correct path to either a GNU Pth installation tree (use --with-pth=DIR if you used --prefix=DIR for installing GNU Pth in the past) or to a GNU Pth source tree (use --with-pth=DIR if DIR is a path to a pth-X.Y.Z/ directory; but make sure the package is already built, i.e., the "configure; make" step was already performed there). EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 fi fi _req_version="1.3.0 " for _var in _pth_version _req_version; do eval "_val=\"\$${_var}\"" _major=`echo $_val | sed 's/\([0-9]*\)\.\([0-9]*\)\([ab.]\)\([0-9]*\)/\1/'` _minor=`echo $_val | sed 's/\([0-9]*\)\.\([0-9]*\)\([ab.]\)\([0-9]*\)/\2/'` _rtype=`echo $_val | sed 's/\([0-9]*\)\.\([0-9]*\)\([ab.]\)\([0-9]*\)/\3/'` _micro=`echo $_val | sed 's/\([0-9]*\)\.\([0-9]*\)\([ab.]\)\([0-9]*\)/\4/'` case $_rtype in "a" ) _rtype=0 ;; "b" ) _rtype=1 ;; "." ) _rtype=2 ;; esac _hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \ "major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"` eval "${_var}_hex=\"\$_hex\"" done if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: + Determined Versions:" >&5 echo "${ECHO_T} + Determined Versions:" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o existing: $_pth_version -> 0x$_pth_version_hex" >&5 echo "${ECHO_T} o existing: $_pth_version -> 0x$_pth_version_hex" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o required: $_req_version -> 0x$_req_version_hex" >&5 echo "${ECHO_T} o required: $_req_version -> 0x$_req_version_hex" >&6; } fi _ok=0 if test ".$_pth_version_hex" != .; then if test ".$_req_version_hex" != .; then if test $_pth_version_hex -ge $_req_version_hex; then _ok=1 fi fi fi if test ".$_ok" = .0; then { echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6; } echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Found Pth version $_pth_version, but required at least version $_req_version. Upgrade Pth under $_pth_location to $_req_version or higher first, please. EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 fi if test ".$with_pth_test" = .yes; then _ac_save_CPPFLAGS="$CPPFLAGS" _ac_save_CFLAGS="$CFLAGS" _ac_save_LDFLAGS="$LDFLAGS" _ac_save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $_pth_cppflags" CFLAGS="$CFLAGS $_pth_cflags" LDFLAGS="$LDFLAGS $_pth_ldflags" LIBS="$LIBS $_pth_libs" if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: + Test Build Environment:" >&5 echo "${ECHO_T} + Test Build Environment:" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o CPPFLAGS=\"$CPPFLAGS\"" >&5 echo "${ECHO_T} o CPPFLAGS=\"$CPPFLAGS\"" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o CFLAGS=\"$CFLAGS\"" >&5 echo "${ECHO_T} o CFLAGS=\"$CFLAGS\"" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o LDFLAGS=\"$LDFLAGS\"" >&5 echo "${ECHO_T} o LDFLAGS=\"$LDFLAGS\"" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o LIBS=\"$LIBS\"" >&5 echo "${ECHO_T} o LIBS=\"$LIBS\"" >&6; } fi cross_compile=no if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: + Performing Sanity Checks:" >&5 echo "${ECHO_T} + Performing Sanity Checks:" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o pre-processor test" >&5 echo "${ECHO_T} o pre-processor test" >&6; } fi 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 if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $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 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 _ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 _ok=no fi rm -f conftest.err conftest.$ac_ext if test ".$_ok" != .yes; then { echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6; } echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity pre-processor check. This means the GNU Pth header pth.h was not found. We used the following build environment: >> CPP="$CPP" >> CPPFLAGS="$CPPFLAGS" See config.log for possibly more details. EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o link check" >&5 echo "${ECHO_T} o link check" >&6; } fi 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 () { int main(int argc, char *argv) { FILE *fp; if (!(fp = fopen("conftestval", "w"))) exit(1); fprintf(fp, "hmm"); fclose(fp); pth_init(); pth_kill(); if (!(fp = fopen("conftestval", "w"))) exit(1); fprintf(fp, "yes"); fclose(fp); exit(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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then _ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 _ok=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test ".$_ok" != .yes; then { echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6; } echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity linker check. This means the GNU Pth library libpth.a was not found. We used the following build environment: >> CC="$CC" >> CFLAGS="$CFLAGS" >> LDFLAGS="$LDFLAGS" >> LIBS="$LIBS" See config.log for possibly more details. EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o run-time check" >&5 echo "${ECHO_T} o run-time check" >&6; } fi if test "$cross_compiling" = yes; then _ok=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(int argc, char *argv) { FILE *fp; if (!(fp = fopen("conftestval", "w"))) exit(1); fprintf(fp, "hmm"); fclose(fp); pth_init(); pth_kill(); if (!(fp = fopen("conftestval", "w"))) exit(1); fprintf(fp, "yes"); fclose(fp); exit(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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then _ok=`cat conftestval` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) _ok=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test ".$_ok" != .yes; then if test ".$_ok" = .no; then { echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6; } echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity execution check. This usually means that the GNU Pth shared library libpth.so is present but \$LD_LIBRARY_PATH is incomplete to execute a Pth test. In this case either disable this test via --without-pth-test, or extend \$LD_LIBRARY_PATH, or build GNU Pth as a static library only via its --disable-shared Autoconf option. We used the following build environment: >> CC="$CC" >> CFLAGS="$CFLAGS" >> LDFLAGS="$LDFLAGS" >> LIBS="$LIBS" See config.log for possibly more details. EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 else { echo "$as_me:$LINENO: result: *FAILED*" >&5 echo "${ECHO_T}*FAILED*" >&6; } echo " +------------------------------------------------------------------------+" 1>&2 cat <>/ /' 1>&2 Found GNU Pth $_pth_version under $_pth_location, but was unable to perform a sanity run-time check. This usually means that the GNU Pth library failed to work and possibly caused a core dump in the test program. In this case it is strongly recommended that you re-install GNU Pth and this time make sure that it really passes its "make test" procedure. We used the following build environment: >> CC="$CC" >> CFLAGS="$CFLAGS" >> LDFLAGS="$LDFLAGS" >> LIBS="$LIBS" See config.log for possibly more details. EOT echo " +------------------------------------------------------------------------+" 1>&2 exit 1 fi fi _extendvars="yes" if test ".$_extendvars" != .yes; then CPPFLAGS="$_ac_save_CPPFLAGS" CFLAGS="$_ac_save_CFLAGS" LDFLAGS="$_ac_save_LDFLAGS" LIBS="$_ac_save_LIBS" fi else _extendvars="yes" if test ".$_extendvars" = .yes; then if test ".$_pth_subdir" = .yes; then CPPFLAGS="$CPPFLAGS $_pth_cppflags" CFLAGS="$CFLAGS $_pth_cflags" LDFLAGS="$LDFLAGS $_pth_ldflags" LIBS="$LIBS $_pth_libs" fi fi fi PTH_CPPFLAGS="$_pth_cppflags" PTH_CFLAGS="$_pth_cflags" PTH_LDFLAGS="$_pth_ldflags" PTH_LIBS="$_pth_libs" if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: + Final Results:" >&5 echo "${ECHO_T} + Final Results:" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o PTH_CPPFLAGS=\"$PTH_CPPFLAGS\"" >&5 echo "${ECHO_T} o PTH_CPPFLAGS=\"$PTH_CPPFLAGS\"" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o PTH_CFLAGS=\"$PTH_CFLAGS\"" >&5 echo "${ECHO_T} o PTH_CFLAGS=\"$PTH_CFLAGS\"" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o PTH_LDFLAGS=\"$PTH_LDFLAGS\"" >&5 echo "${ECHO_T} o PTH_LDFLAGS=\"$PTH_LDFLAGS\"" >&6; } fi if test ".$verbose" = .yes; then { echo "$as_me:$LINENO: result: o PTH_LIBS=\"$PTH_LIBS\"" >&5 echo "${ECHO_T} o PTH_LIBS=\"$PTH_LIBS\"" >&6; } fi fi if test ".$with_pth" != .no; then { echo "$as_me:$LINENO: result: version $_pth_version, $_pth_type under $_pth_location" >&5 echo "${ECHO_T}version $_pth_version, $_pth_type under $_pth_location" >&6; } : else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } : fi CPPFLAGS="$CPPFLAGS $PTH_CPPFLAGS" CFLAGS="$CFLAGS $PTH_CFLAGS" LDFLAGS="$LDFLAGS $PTH_LDFLAGS" THREADLIB="$PTH_LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPTH 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF else gotthread="no"; { echo "$as_me:$LINENO: checking for mutex_lock in -lthread " >&5 echo $ECHO_N "checking for mutex_lock in -lthread ... $ECHO_C" >&6; } ac_save_LIBS="$LIBS" LIBS="-lthread $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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mutex_lock(); int main () { mutex_lock() ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LIBTHREAD 1 _ACEOF { echo "$as_me:$LINENO: checking if compiler accepts -mt" >&5 echo $ECHO_N "checking if compiler accepts -mt... $ECHO_C" >&6; } echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mt -c conftest.c 2>&1`"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } CFLAGS="$CFLAGS -mt" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f conftest* cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF gotthread="yes"; THREADLIB="-lthread" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$gotthread" = "xno"; then { echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5 echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6; } ac_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. */ #ifdef __cplusplus extern "C" #endif #include int main () { pthread_mutex_lock(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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF gotthread="yes"; THREADLIB="-lpthread" if test "x$ac_cv_c_compiler_gnu"="xyes"; then { echo "$as_me:$LINENO: checking if compiler accepts -pthread" >&5 echo $ECHO_N "checking if compiler accepts -pthread... $ECHO_C" >&6; } echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -pthread -c conftest.c 2>&1`"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } CFLAGS="$CFLAGS -pthread" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f conftest* else { echo "$as_me:$LINENO: checking if compiler accepts -mt" >&5 echo $ECHO_N "checking if compiler accepts -mt... $ECHO_C" >&6; } echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mt -c conftest.c 2>&1`"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } CFLAGS="$CFLAGS -mt" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f conftest* fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test "x$gotthread" = "xno"; then { echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lc" >&5 echo $ECHO_N "checking for pthread_mutex_lock in -lc... $ECHO_C" >&6; } ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __cplusplus extern "C" #endif #include int main () { pthread_mutex_lock(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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF gotthread="yes"; THREADLIB="" if test "x$ac_cv_c_compiler_gnu"="xyes"; then { echo "$as_me:$LINENO: checking if compiler accepts -pthread" >&5 echo $ECHO_N "checking if compiler accepts -pthread... $ECHO_C" >&6; } echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -pthread -c conftest.c 2>&1`"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } CFLAGS="$CFLAGS -pthread" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f conftest* else { echo "$as_me:$LINENO: checking if compiler accepts -mt" >&5 echo $ECHO_N "checking if compiler accepts -mt... $ECHO_C" >&6; } echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mt -c conftest.c 2>&1`"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } CFLAGS="$CFLAGS -mt" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f conftest* fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test "x$gotthread" = "xno"; then if test "x$ac_cv_c_compiler_gnu"="xyes"; then { echo "$as_me:$LINENO: checking if compiler accepts -pthread" >&5 echo $ECHO_N "checking if compiler accepts -pthread... $ECHO_C" >&6; } echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -pthread -c conftest.c 2>&1`"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } CFLAGS="$CFLAGS -pthread" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f conftest* { echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lc" >&5 echo $ECHO_N "checking for pthread_mutex_lock in -lc... $ECHO_C" >&6; } ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __cplusplus extern "C" #endif #include int main () { pthread_mutex_lock(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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF THREADLIB="-pthread -lc_r" gotthread="yes"; else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test "x$gotthread" = "xno"; then SAVECFLAGS="$CFLAGS" CFLAGS="$CFLAGS -D_THREAD_SAFE -D_ALL_SOURCE -D_LONG_LONG" { echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5 echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6; } ac_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. */ #ifdef __cplusplus extern "C" #endif #include int main () { pthread_mutex_lock(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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "ac_cv_lib_$ac_lib_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_cv_lib_$ac_lib_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF gotthread="yes"; THREADLIB="-lpthread" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi CFLAGS="$SAVECFLAGS" cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _LONG_LONG 1 _ACEOF fi if test "x$gotthread" = "xyes"; then save_LIBS=$LIBS { echo "$as_me:$LINENO: checking for localtime_r in -lc" >&5 echo $ECHO_N "checking for localtime_r in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_localtime_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $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 localtime_r (); int main () { return localtime_r (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_c_localtime_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_localtime_r=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_localtime_r" >&5 echo "${ECHO_T}$ac_cv_lib_c_localtime_r" >&6; } if test $ac_cv_lib_c_localtime_r = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LOCALTIME_R 1 _ACEOF fi LIBS=$save_LIBS fi fi fi case $host_os in "darwin"*) stats="false" macosx="yes" cat >>confdefs.h <<\_ACEOF #define OSXHEADER 1 _ACEOF ;; sysv5Open*) if test "x$THREADLIB" = "x"; then LIBS="$LIBS $THREADLIB" else LIBS="$LIBS -Kthread" fi ;; *) LIBS="$LIBS $THREADLIB" ;; esac if test "x$stats" = "xtrue"; then for ac_func in ftok semget shmget semop snprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else stats=false fi done fi if test "x$stats" = "xtrue"; then 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 { echo "$as_me:$LINENO: checking for semundo union" >&5 echo $ECHO_N "checking for semundo union... $ECHO_C" >&6; } if test "${ac_cv_semundo_union+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 () { union semun semctl_arg; ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_semundo_union=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_semundo_union=yes fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_semundo_union" >&5 echo "${ECHO_T}$ac_cv_semundo_union" >&6; } if eval "test \"`echo $ac_cv_semundo_union`\" = yes"; then cat >>confdefs.h <<\_ACEOF #define NEED_SEMUNDO_UNION 1 _ACEOF fi cat >>confdefs.h <<\_ACEOF #define COLLECT_STATS 1 _ACEOF fi { echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $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 socket (); int main () { return socket (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; } if test $ac_cv_lib_socket_socket = yes; then LIBSOCKET="-lsocket" fi { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $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 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBNSL="-lnsl" fi have_qt="no" have_qt4="no" if test "x$gui" = "xtrue"; then { echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 echo "$as_me: error: Cannot use X directory names containing '" >&2;} { (exit 1); exit 1; }; };; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. 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 "echo \"\$as_me:$LINENO: $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 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 # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" 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 () { XrmInitialize () ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { echo "$as_me:$LINENO: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >>confdefs.h <<\_ACEOF #define X_DISPLAY_MISSING 1 _ACEOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$ac_xsave_LIBS -R $x_libraries" 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: neither works" >&5 echo "${ECHO_T}neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" 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 XOpenDisplay (); int main () { return XOpenDisplay (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; } if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $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 dnet_ntoa (); int main () { return dnet_ntoa (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dnet_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_dnet_ntoa=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test $ac_cv_lib_dnet_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; } if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $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 dnet_ntoa (); int main () { return dnet_ntoa (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_stub_dnet_ntoa=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. { echo "$as_me:$LINENO: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 gethostbyname to an innocuous variant, in case declares gethostbyname. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyname innocuous_gethostbyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyname /* 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 (); /* 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_gethostbyname || defined __stub___gethostbyname choke me #endif int main () { return gethostbyname (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = no; then { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $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 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $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 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_gethostbyname=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; } if test $ac_cv_lib_bsd_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. { echo "$as_me:$LINENO: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 connect to an innocuous variant, in case declares connect. For example, HP-UX 11i declares gettimeofday. */ #define connect innocuous_connect /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef connect /* 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 connect (); /* 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_connect || defined __stub___connect choke me #endif int main () { return connect (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_connect=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = no; then { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_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 connect (); int main () { return connect (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } if test $ac_cv_lib_socket_connect = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. { echo "$as_me:$LINENO: checking for remove" >&5 echo $ECHO_N "checking for remove... $ECHO_C" >&6; } if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 remove to an innocuous variant, in case declares remove. For example, HP-UX 11i declares gettimeofday. */ #define remove innocuous_remove /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef remove /* 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 remove (); /* 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_remove || defined __stub___remove choke me #endif int main () { return remove (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_remove=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 echo "${ECHO_T}$ac_cv_func_remove" >&6; } if test $ac_cv_func_remove = no; then { echo "$as_me:$LINENO: checking for remove in -lposix" >&5 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; } if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $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 remove (); int main () { return remove (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_posix_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix_remove=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; } if test $ac_cv_lib_posix_remove = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. { echo "$as_me:$LINENO: checking for shmat" >&5 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; } if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 shmat to an innocuous variant, in case declares shmat. For example, HP-UX 11i declares gettimeofday. */ #define shmat innocuous_shmat /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shmat /* 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 shmat (); /* 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_shmat || defined __stub___shmat choke me #endif int main () { return shmat (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shmat=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 echo "${ECHO_T}$ac_cv_func_shmat" >&6; } if test $ac_cv_func_shmat = no; then { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; } if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $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 shmat (); int main () { return shmat (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_ipc_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ipc_shmat=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; } if test $ac_cv_lib_ipc_shmat = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_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 IceConnectionNumber (); int main () { return IceConnectionNumber (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_ICE_IceConnectionNumber=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_IceConnectionNumber=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi # some 'precious' variables for configure --help 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $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" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache { echo "$as_me:$LINENO: checking for Qt" >&5 echo "$as_me: checking for Qt" >&6;} # process our args if test -z "" ; then qt_min_version=0 else qt_min_version= fi if test -z "" ; then qt_max_version=99999 else qt_max_version= fi # adjust for user preferences if test "x$QTMIN" != "x" ; then qt_min_version=$QTMIN; fi if test "x$QTMAX" != "x" ; then if expr $QTMAX '<' $qt_max_version > /dev/null ; then qt_max_version=$QTMAX; fi fi # set up our configuration options qt_dir="" qt_includes="" qt_libraries="" qt_programs="" # Check whether --with-qt_dir was given. if test "${with_qt_dir+set}" = set; then withval=$with_qt_dir; qt_dir="$withval" qt_includes="$withval"/include qt_libraries="$withval"/lib qt_programs="$withval"/bin fi # Check whether --with-qt_includes was given. if test "${with_qt_includes+set}" = set; then withval=$with_qt_includes; qt_includes="$withval" fi # Check whether --with-qt_libraries was given. if test "${with_qt_libraries+set}" = set; then withval=$with_qt_libraries; qt_libraries="$withval" fi # Check whether --with-qt_programs was given. if test "${with_qt_programs+set}" = set; then withval=$with_qt_programs; qt_programs="$withval" fi QTVERSION="00000" qt_found_version="" qt_v4_include="" # Have not been told where Qt is so search for it... if test "x$qt_includes" = "x" ; then # look in standard locations qt_found_dirs="" qt_include_dirs=" $QTDIR/include /usr/include /usr/local/include /usr/X11R6/include `ls -dr /usr/include/qt* 2>/dev/null` `ls -dr /usr/local/include/qt* 2>/dev/null` `ls -dr /usr/X11R6/include/qt* 2>/dev/null` `ls -dr /usr/lib/qt*/include 2>/dev/null` `ls -dr /usr/local/lib/qt*/include 2>/dev/null` `ls -dr /usr/X11R6/lib/qt*/include 2>/dev/null` `ls -dr /usr/local/qt*/include 2>/dev/null` `ls -dr /usr/local/Trolltech/Qt*/include 2>/dev/null` `ls -dr /opt/qt*/include 2>/dev/null` " for n in $qt_include_dirs ; do if test -r "$n/qglobal.h"; then qt_found_dirs="$qt_found_dirs $n" else if test -r "$n/Qt/qglobal.h"; then qt_found_dirs="$qt_found_dirs $n" fi fi done # find the latest version between min_version and max_version qt_prev_version=$qt_min_version for n in $qt_found_dirs ; do { echo "$as_me:$LINENO: Checking dir $n" >&5 echo "$as_me: Checking dir $n" >&6;} if test -r "$n/qglobal.h"; then qt_current_version=`grep -w '#define QT_VERSION' "$n"/qglobal.h | grep -v '#define QT_VERSION_STR' | sed s/'#define QT_VERSION 0x'// | sed s/'#define QT_VERSION'//` else if test -r "$n/Qt/qglobal.h"; then # if test "x$qt_current_version" = "x" ; then qt_current_version=`grep -w '#define QT_VERSION' "$n"/Qt/qglobal.h | grep -v '#define QT_VERSION_STR' | sed s/'#define QT_VERSION 0x'// | sed s/'#define QT_VERSION'//` fi fi if expr $qt_current_version '>=' $qt_prev_version > /dev/null ; then if expr $qt_current_version '<=' $qt_max_version > /dev/null ; then qt_includes=$n qt_prev_version=$qt_current_version qt_found_version=$qt_current_version fi fi done fi { echo "$as_me:$LINENO: checking for Qt headers" >&5 echo $ECHO_N "checking for Qt headers... $ECHO_C" >&6; } if test "x$qt_includes" = "x" ; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { { echo "$as_me:$LINENO: error: cannot find correct Qt headers!, consider adding --enable-gui=no to configure arguments" >&5 echo "$as_me: error: cannot find correct Qt headers!, consider adding --enable-gui=no to configure arguments" >&2;} { (exit 1); exit 1; }; } else # Ensure we have a version... if test "x$qt_found_version" = "x" ; then if test -r "$qt_includes/qglobal.h"; then qt_current_version=`grep -w '#define QT_VERSION' "$qt_includes"/qglobal.h | grep -v '#define QT_VERSION_STR' | sed s/'#define QT_VERSION 0x'// | sed s/'#define QT_VERSION'//` else if test -r "$qt_includes/Qt/qglobal.h"; then # if test "x$qt_current_version" = "x" ; then qt_current_version=`grep -w '#define QT_VERSION' "$qt_includes"/Qt/qglobal.h | grep -v '#define QT_VERSION_STR' | sed s/'#define QT_VERSION 0x'// | sed s/'#define QT_VERSION'//` fi fi qt_found_version=$qt_current_version fi if test "x$qt_found_version" = "x" ; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { { echo "$as_me:$LINENO: error: cannot find version of Qt!, consider adding --enable-gui=no to configure arguments" >&5 echo "$as_me: error: cannot find version of Qt!, consider adding --enable-gui=no to configure arguments" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $qt_includes" >&5 echo "${ECHO_T}$qt_includes" >&6; } { echo "$as_me:$LINENO: checking for Qt4 headers" >&5 echo $ECHO_N "checking for Qt4 headers... $ECHO_C" >&6; } if test -r "$qt_includes/Qt/qglobal.h"; then qt_v4_include="y" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi QTVERSION=$qt_found_version; { echo "$as_me:$LINENO: checking include layout" >&5 echo $ECHO_N "checking include layout... $ECHO_C" >&6; } if test "x$qt_v4_include" = "xy" ; then { echo "$as_me:$LINENO: result: v4 layout" >&5 echo "${ECHO_T}v4 layout" >&6; } cat >>confdefs.h <<\_ACEOF #define QT_V4LAYOUT 1 _ACEOF # Lets get rid of qt3support in favour of pure qt4 - PAH # AC_DEFINE(QT3_SUPPORT) # MOCDEFS="-DQT3_SUPPORT" # AC_SUBST(MOCDEFS) have_qt4="yes" else MOCDEFS="" { echo "$as_me:$LINENO: result: standard layout" >&5 echo "${ECHO_T}standard layout" >&6; } fi fi { echo "$as_me:$LINENO: Found Qt version $QTVERSION" >&5 echo "$as_me: Found Qt version $QTVERSION" >&6;} { echo "$as_me:$LINENO: checking for Qt libraries" >&5 echo $ECHO_N "checking for Qt libraries... $ECHO_C" >&6; } # Ensure we have the lib dir... if test "x$qt_libraries" = "x" ; then # see if it is relative to the includes qt_tree="$qt_includes" # # the cygwin dirhame only strips up to the first / # case $host_os in cygwin*) empty_dir="x/" ;; *) empty_dir="x" ;; esac while test "x$qt_tree" != $empty_dir ; do # first go around will fail... if expr "$QTVERSION" '>=' "040000" > /dev/null ; then if ls $qt_tree/lib/libQt* > /dev/null 2> /dev/null ; then qt_libraries=$qt_tree/lib break else # lop off tail of path qt_tree="`dirname $qt_tree`" fi else if ls $qt_tree/lib/libqt* > /dev/null 2> /dev/null ; then qt_libraries=$qt_tree/lib break else # lop off tail of path qt_tree="`dirname $qt_tree`" fi fi done fi # Use QTVERSION and gotthread to set libs we need... if expr "$QTVERSION" '>=' "040000" > /dev/null ; then qt_libs="-lQtGui -lQtCore -lQtAssistantClient -lQtNetwork" else if test "x$gotthread" = "xyes" ; then try="ls -1 $qt_libraries/libqt-mt*" if test=`eval $try 2> /dev/null`; then qt_libs="-lqt-mt" else qt_libs="-lqt" fi else qt_libs="-lqt" fi fi # Return... if test "x$qt_libraries" = "x" ; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { { echo "$as_me:$LINENO: error: cannot find Qt libraries!, consider adding --enable-gui=no to configure arguments" >&5 echo "$as_me: error: cannot find Qt libraries!, consider adding --enable-gui=no to configure arguments" >&2;} { (exit 1); exit 1; }; } else { echo "$as_me:$LINENO: result: $qt_libraries" >&5 echo "${ECHO_T}$qt_libraries" >&6; } as_ac_File=`echo "ac_cv_file_$qt_includes/QtGui/QWizard" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $qt_includes/QtGui/QWizard" >&5 echo $ECHO_N "checking for $qt_includes/QtGui/QWizard... $ECHO_C" >&6; } if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$qt_includes/QtGui/QWizard"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi ac_res=`eval echo '${'$as_ac_File'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_File'}'` = yes; then have_qtwizard=yes else have_qtwizard=no fi as_ac_File=`echo "ac_cv_file_$qt_includes/QtGui/QMdiArea" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $qt_includes/QtGui/QMdiArea" >&5 echo $ECHO_N "checking for $qt_includes/QtGui/QMdiArea... $ECHO_C" >&6; } if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$qt_includes/QtGui/QMdiArea"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi ac_res=`eval echo '${'$as_ac_File'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_File'}'` = yes; then have_qtmdiarea=yes else have_qtmdiarea=no fi fi { echo "$as_me:$LINENO: checking for Qt utilities" >&5 echo $ECHO_N "checking for Qt utilities... $ECHO_C" >&6; } if test "x$q_programs" = "x" ; then # see if it is relative to the libraries qt_tree="$qt_libraries" while test "x$qt_tree" != "x" ; do # first go around will fail if ls $qt_tree/bin/moc* > /dev/null 2> /dev/null ; then qt_programs=$qt_tree/bin break else # lop off tail of path qt_tree="`dirname $qt_tree`" fi done # if we haven't found the progs, there's not much more we can do fi if test "x$qt_programs" = "x" ; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { { echo "$as_me:$LINENO: error: cannot find Qt utilities!, consider adding --enable-gui=no to configure arguments" >&5 echo "$as_me: error: cannot find Qt utilities!, consider adding --enable-gui=no to configure arguments" >&2;} { (exit 1); exit 1; }; } else { echo "$as_me:$LINENO: result: $qt_programs" >&5 echo "${ECHO_T}$qt_programs" >&6; } # find the right moc if test -z "$MOC" ; then # Extract the first word of "moc", so it can be a program name with args. set dummy moc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_MOC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$MOC"; then ac_cv_prog_MOC="$MOC" # 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_MOC="moc " echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MOC=$ac_cv_prog_MOC if test -n "$MOC"; then { echo "$as_me:$LINENO: result: $MOC" >&5 echo "${ECHO_T}$MOC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$MOC" = "x" ; then # could be renamed to avoid clashes if ls $qt_programs/moc > /dev/null 2> /dev/null ; then MOC="$qt_programs/moc" else if expr "$QTVERSION" '>=' "200" > /dev/null ; then if ls $qt_programs/moc2 > /dev/null 2> /dev/null ; then MOC="$qt_programs/moc2" fi else if expr "$QTVERSION" '>=' "300" > /dev/null ; then if $qt_programs/moc3 > /dev/null 2> /dev/null ; then MOC="$qt_programs/moc3" fi fi fi fi fi if test "x$MOC" = "x" ; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { { echo "$as_me:$LINENO: error: cannot find Qt meta object compiler!, consider adding --enable-gui=no to configure arguments" >&5 echo "$as_me: error: cannot find Qt meta object compiler!, consider adding --enable-gui=no to configure arguments" >&2;} { (exit 1); exit 1; }; } fi fi # find the right uic if expr "$QTVERSION" '>=' "220" > /dev/null ; then if test -z "$UIC" ; then # Extract the first word of "uic", so it can be a program name with args. set dummy uic; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_UIC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$UIC"; then ac_cv_prog_UIC="$UIC" # 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_UIC="uic " echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi UIC=$ac_cv_prog_UIC if test -n "$UIC"; then { echo "$as_me:$LINENO: result: $UIC" >&5 echo "${ECHO_T}$UIC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$UIC" = "x" ; then # could be renamed to avoid clashes if ls $qt_programs/uic > /dev/null 2> /dev/null ; then UIC="$qt_programs/uic" else if expr "$QTVERSION" '>=' "300" > /dev/null ; then if ls $qt_programs/uic3 > /dev/null 2> /dev/null ; then UIC="$qt_programs/uic3" fi fi fi fi fi else # if uic is important to the build, change this UIC="" fi 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 { echo "$as_me:$LINENO: qt_libraries=$qt_libraries" >&5 echo "$as_me: qt_libraries=$qt_libraries" >&6;} { echo "$as_me:$LINENO: LDFLAGS=$LDFLAGS" >&5 echo "$as_me: LDFLAGS=$LDFLAGS" >&6;} { echo "$as_me:$LINENO: X_LIBS=$X_LIBS" >&5 echo "$as_me: X_LIBS=$X_LIBS" >&6;} { echo "$as_me:$LINENO: checking whether a simple Qt program compiles" >&5 echo $ECHO_N "checking whether a simple Qt program compiles... $ECHO_C" >&6; } ac_cxxflags_save="$CXXFLAGS" ac_ldflags_save="$LDFLAGS" ac_libs_save="$LIBS" if expr "$QTVERSION" '>=' "040000" > /dev/null ; then CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS -I$qt_includes -I$qt_includes/QtCore -I$qt_includes/QtGui $X_CFLAGS $all_includes" else CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS -I$qt_includes $X_CFLAGS $all_includes" fi LDFLAGS="$LDFLAGS -L$qt_libraries $X_LIBS $X_LDFLAGS" LIBS="$LIBS $PTHREAD_LIBS $qt_libs $X_EXTRA_LIBS -lXext -lX11 $X_PRE_LIBS $EXTRA_XLIBS" if expr "$QTVERSION" '>=' "040000" > /dev/null ; 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 () { QString s = "hello world"; QMessageBox::information(0, s, "no he is not"); 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then qt_compile=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 qt_compile=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext 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 int main () { QString s = "hello world"; QMessageBox::information(0, s, "no he is not"); 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then qt_compile=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 qt_compile=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi CXXFLAGS="$ac_cxxflags_save" LDFLAGS="$ac_ldflags_save" LIBS="$ac_libs_save" 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 "x$qt_compile" = "xyes" ; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } # We do not want to force everything to stop because we do not have # qt - let caller decide what to do. # AC_MSG_ERROR([cannot compile a Qt program!]) fi QT_CXXFLAGS="-I$qt_includes -I$qt_includes/QtCore -I$qt_includes/QtGui -I$qt_includes/QtAssistant -I$qt_includes/QtNetwork" QT_LDFLAGS="-L$qt_libraries" QT_LIBS="$qt_libs" have_qt="yes" fi # Check whether --with-msql-lib was given. if test "${with_msql_lib+set}" = set; then withval=$with_msql_lib; msql_libraries="$withval" fi # Check whether --with-msql-include was given. if test "${with_msql_include+set}" = set; then withval=$with_msql_include; msql_headers="$withval" fi { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_header in malloc.h unistd.h pwd.h crypt.h limits.h synch.h strings.h string.h locale.h sys/malloc.h sys/types.h sys/sem.h stdarg.h varargs.h sys/time.h sys/timeb.h time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done INCLUDES="$INCLUDES $USER_INCLUDES"; for ac_header in msql.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF msql=true else msql=false; for ac_dir in $kde_extra_includes $msql_headers; do for ac_header in $ac_dir/msql.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF msql=true; INCLUDES="$INCLUDES $USER_INCLUDES -I$ac_dir"; fi done done fi done if test "x$msql" = "xtrue" ; then MSQL_TRUE= MSQL_FALSE='#' else MSQL_TRUE='#' MSQL_FALSE= fi if test "x$have_qt" = "xyes" ; then QT_TRUE= QT_FALSE='#' else QT_TRUE='#' QT_FALSE= fi if test "x$have_qt4" = "xyes" ; then QT4_TRUE= QT4_FALSE='#' else QT4_TRUE='#' QT4_FALSE= fi if test "x$have_qtwizard" = "xyes" ; then QTWIZARD_TRUE= QTWIZARD_FALSE='#' else QTWIZARD_TRUE='#' QTWIZARD_FALSE= fi if test "x$have_qtmdiarea" = "xyes" ; then QTMDIAREA_TRUE= QTMDIAREA_FALSE='#' else QTMDIAREA_TRUE='#' QTMDIAREA_FALSE= fi if test "x$drivers" = "xtrue" ; then DRIVERS_TRUE= DRIVERS_FALSE='#' else DRIVERS_TRUE='#' DRIVERS_FALSE= fi if test "x$fdb" = "xtrue" ; then FDB_TRUE= FDB_FALSE='#' else FDB_TRUE='#' FDB_FALSE= fi if test "x$qnx" = "xtrue" ; then QNX_TRUE= QNX_FALSE='#' else QNX_TRUE='#' QNX_FALSE= fi if test "x$use_builtin_libtool" = "xyes" ; then WITHLT_TRUE= WITHLT_FALSE='#' else WITHLT_TRUE='#' WITHLT_FALSE= fi if test "x$odbctrace" = "xtrue" ; then ODBCTRACE_TRUE= ODBCTRACE_FALSE='#' else ODBCTRACE_TRUE='#' ODBCTRACE_FALSE= fi if test "x$fastvalidate" = "xtrue"; then cat >>confdefs.h <<\_ACEOF #define FAST_HANDLE_VALIDATE 1 _ACEOF fi if test "x$handlemap" = "xtrue"; then cat >>confdefs.h <<\_ACEOF #define WITH_HANDLE_REDIRECT 1 _ACEOF fi { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else 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 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 typedef size_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi { echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$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 ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 <$ac_hdr> int main () { if ((DIR *) 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else 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 echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { echo "$as_me:$LINENO: checking for working alloca.h" >&5 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking for alloca" >&5 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 echo "${ECHO_T}$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF { echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* 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 _doprnt (); /* 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__doprnt || defined __stub____doprnt choke me #endif int main () { return _doprnt (); ; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in putenv socket strdup strstr setenv setlocale strchr do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done cat >>confdefs.h <<\_ACEOF #define UNIXODBC_SOURCE 1 _ACEOF LIB_VERSION="1:0:0" ac_config_files="$ac_config_files Makefile extras/Makefile log/Makefile lst/Makefile ini/Makefile odbcinst/Makefile cur/Makefile DriverManager/Makefile odbcinstQ/Makefile odbcinstQ4/Makefile exe/Makefile DRVConfig/Makefile DRVConfig/drvcfg1/Makefile DRVConfig/drvcfg2/Makefile DRVConfig/PostgreSQL/Makefile DRVConfig/MiniSQL/Makefile DRVConfig/MySQL/Makefile DRVConfig/nn/Makefile DRVConfig/esoob/Makefile DRVConfig/oplodbc/Makefile DRVConfig/template/Makefile DRVConfig/tds/Makefile DRVConfig/txt/Makefile DRVConfig/Oracle/Makefile DRVConfig/sapdb/Makefile DRVConfig/Mimer/Makefile Drivers/Makefile Drivers/PostgreSQL/Makefile Drivers/Postgre7.1/Makefile Drivers/nn/Makefile Drivers/odbc/Makefile Drivers/template/Makefile Drivers/MiniSQL/Makefile include/Makefile doc/Makefile doc/AdministratorManual/Makefile doc/ProgrammerManual/Makefile doc/ProgrammerManual/Tutorial/Makefile doc/UserManual/Makefile doc/lst/Makefile DataManager/Makefile DataManagerII/Makefile ODBCConfig/Makefile odbctest/Makefile autotest/Makefile samples/Makefile" 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $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" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 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}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.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=`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 -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 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 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 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 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 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 "${HAVE_FLEX_TRUE}" && test -z "${HAVE_FLEX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_FLEX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_FLEX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_FLEX_TRUE}" && test -z "${HAVE_FLEX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_FLEX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_FLEX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${MSQL_TRUE}" && test -z "${MSQL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MSQL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MSQL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${QT_TRUE}" && test -z "${QT_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"QT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"QT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${QT4_TRUE}" && test -z "${QT4_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"QT4\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"QT4\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${QTWIZARD_TRUE}" && test -z "${QTWIZARD_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"QTWIZARD\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"QTWIZARD\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${QTMDIAREA_TRUE}" && test -z "${QTMDIAREA_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"QTMDIAREA\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"QTMDIAREA\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DRIVERS_TRUE}" && test -z "${DRIVERS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DRIVERS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DRIVERS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${FDB_TRUE}" && test -z "${FDB_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"FDB\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"FDB\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${QNX_TRUE}" && test -z "${QNX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"QNX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"QNX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WITHLT_TRUE}" && test -z "${WITHLT_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WITHLT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"WITHLT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ODBCTRACE_TRUE}" && test -z "${ODBCTRACE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"ODBCTRACE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"ODBCTRACE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $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 ## --------------------- ## ## 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=: # 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 # 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 # 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 # 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.) as_nl=' ' 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 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. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # 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 || 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" || { 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 fi echo >conf$$.file 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 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.61. 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 cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet 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 Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 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' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. 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 ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) 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. -*) { 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 if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "extras/Makefile") CONFIG_FILES="$CONFIG_FILES extras/Makefile" ;; "log/Makefile") CONFIG_FILES="$CONFIG_FILES log/Makefile" ;; "lst/Makefile") CONFIG_FILES="$CONFIG_FILES lst/Makefile" ;; "ini/Makefile") CONFIG_FILES="$CONFIG_FILES ini/Makefile" ;; "odbcinst/Makefile") CONFIG_FILES="$CONFIG_FILES odbcinst/Makefile" ;; "cur/Makefile") CONFIG_FILES="$CONFIG_FILES cur/Makefile" ;; "DriverManager/Makefile") CONFIG_FILES="$CONFIG_FILES DriverManager/Makefile" ;; "odbcinstQ/Makefile") CONFIG_FILES="$CONFIG_FILES odbcinstQ/Makefile" ;; "odbcinstQ4/Makefile") CONFIG_FILES="$CONFIG_FILES odbcinstQ4/Makefile" ;; "exe/Makefile") CONFIG_FILES="$CONFIG_FILES exe/Makefile" ;; "DRVConfig/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/Makefile" ;; "DRVConfig/drvcfg1/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/drvcfg1/Makefile" ;; "DRVConfig/drvcfg2/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/drvcfg2/Makefile" ;; "DRVConfig/PostgreSQL/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/PostgreSQL/Makefile" ;; "DRVConfig/MiniSQL/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/MiniSQL/Makefile" ;; "DRVConfig/MySQL/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/MySQL/Makefile" ;; "DRVConfig/nn/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/nn/Makefile" ;; "DRVConfig/esoob/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/esoob/Makefile" ;; "DRVConfig/oplodbc/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/oplodbc/Makefile" ;; "DRVConfig/template/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/template/Makefile" ;; "DRVConfig/tds/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/tds/Makefile" ;; "DRVConfig/txt/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/txt/Makefile" ;; "DRVConfig/Oracle/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/Oracle/Makefile" ;; "DRVConfig/sapdb/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/sapdb/Makefile" ;; "DRVConfig/Mimer/Makefile") CONFIG_FILES="$CONFIG_FILES DRVConfig/Mimer/Makefile" ;; "Drivers/Makefile") CONFIG_FILES="$CONFIG_FILES Drivers/Makefile" ;; "Drivers/PostgreSQL/Makefile") CONFIG_FILES="$CONFIG_FILES Drivers/PostgreSQL/Makefile" ;; "Drivers/Postgre7.1/Makefile") CONFIG_FILES="$CONFIG_FILES Drivers/Postgre7.1/Makefile" ;; "Drivers/nn/Makefile") CONFIG_FILES="$CONFIG_FILES Drivers/nn/Makefile" ;; "Drivers/odbc/Makefile") CONFIG_FILES="$CONFIG_FILES Drivers/odbc/Makefile" ;; "Drivers/template/Makefile") CONFIG_FILES="$CONFIG_FILES Drivers/template/Makefile" ;; "Drivers/MiniSQL/Makefile") CONFIG_FILES="$CONFIG_FILES Drivers/MiniSQL/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/AdministratorManual/Makefile") CONFIG_FILES="$CONFIG_FILES doc/AdministratorManual/Makefile" ;; "doc/ProgrammerManual/Makefile") CONFIG_FILES="$CONFIG_FILES doc/ProgrammerManual/Makefile" ;; "doc/ProgrammerManual/Tutorial/Makefile") CONFIG_FILES="$CONFIG_FILES doc/ProgrammerManual/Tutorial/Makefile" ;; "doc/UserManual/Makefile") CONFIG_FILES="$CONFIG_FILES doc/UserManual/Makefile" ;; "doc/lst/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lst/Makefile" ;; "DataManager/Makefile") CONFIG_FILES="$CONFIG_FILES DataManager/Makefile" ;; "DataManagerII/Makefile") CONFIG_FILES="$CONFIG_FILES DataManagerII/Makefile" ;; "ODBCConfig/Makefile") CONFIG_FILES="$CONFIG_FILES ODBCConfig/Makefile" ;; "odbctest/Makefile") CONFIG_FILES="$CONFIG_FILES odbctest/Makefile" ;; "autotest/Makefile") CONFIG_FILES="$CONFIG_FILES autotest/Makefile" ;; "samples/Makefile") CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 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_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") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim YACC!$YACC$ac_delim YFLAGS!$YFLAGS$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CPP!$CPP$ac_delim LEX!$LEX$ac_delim LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim LEXLIB!$LEXLIB$ac_delim LN_S!$LN_S$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 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 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim DLLTOOL!$DLLTOOL$ac_delim AS!$AS$ac_delim OBJDUMP!$OBJDUMP$ac_delim CXXCPP!$CXXCPP$ac_delim F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim subdirs!$subdirs$ac_delim LTDLINCL!$LTDLINCL$ac_delim LIBLTDL!$LIBLTDL$ac_delim SHLIBEXT!$SHLIBEXT$ac_delim LIBICONV!$LIBICONV$ac_delim ICONV_CHAR_ENCODING!$ICONV_CHAR_ENCODING$ac_delim ICONV_UNICODE_ENCODING!$ICONV_UNICODE_ENCODING$ac_delim LIBADD_CRYPT!$LIBADD_CRYPT$ac_delim LIBADD_POW!$LIBADD_POW$ac_delim READLINE!$READLINE$ac_delim HAVE_FLEX_TRUE!$HAVE_FLEX_TRUE$ac_delim HAVE_FLEX_FALSE!$HAVE_FLEX_FALSE$ac_delim LFLAGS!$LFLAGS$ac_delim LIBADD_DL!$LIBADD_DL$ac_delim PTH_CPPFLAGS!$PTH_CPPFLAGS$ac_delim PTH_CFLAGS!$PTH_CFLAGS$ac_delim PTH_LDFLAGS!$PTH_LDFLAGS$ac_delim PTH_LIBS!$PTH_LIBS$ac_delim LIBSOCKET!$LIBSOCKET$ac_delim LIBNSL!$LIBNSL$ac_delim XMKMF!$XMKMF$ac_delim X_CFLAGS!$X_CFLAGS$ac_delim X_PRE_LIBS!$X_PRE_LIBS$ac_delim X_LIBS!$X_LIBS$ac_delim X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim QTMIN!$QTMIN$ac_delim QTMAX!$QTMAX$ac_delim MOC!$MOC$ac_delim UIC!$UIC$ac_delim MOCDEFS!$MOCDEFS$ac_delim QTVERSION!$QTVERSION$ac_delim QT_CXXFLAGS!$QT_CXXFLAGS$ac_delim QT_LDFLAGS!$QT_LDFLAGS$ac_delim QT_LIBS!$QT_LIBS$ac_delim msql_libraries!$msql_libraries$ac_delim msql_headers!$msql_headers$ac_delim MSQL_TRUE!$MSQL_TRUE$ac_delim MSQL_FALSE!$MSQL_FALSE$ac_delim QT_TRUE!$QT_TRUE$ac_delim QT_FALSE!$QT_FALSE$ac_delim QT4_TRUE!$QT4_TRUE$ac_delim QT4_FALSE!$QT4_FALSE$ac_delim QTWIZARD_TRUE!$QTWIZARD_TRUE$ac_delim QTWIZARD_FALSE!$QTWIZARD_FALSE$ac_delim QTMDIAREA_TRUE!$QTMDIAREA_TRUE$ac_delim QTMDIAREA_FALSE!$QTMDIAREA_FALSE$ac_delim DRIVERS_TRUE!$DRIVERS_TRUE$ac_delim DRIVERS_FALSE!$DRIVERS_FALSE$ac_delim FDB_TRUE!$FDB_TRUE$ac_delim FDB_FALSE!$FDB_FALSE$ac_delim QNX_TRUE!$QNX_TRUE$ac_delim QNX_FALSE!$QNX_FALSE$ac_delim WITHLT_TRUE!$WITHLT_TRUE$ac_delim WITHLT_FALSE!$WITHLT_FALSE$ac_delim ODBCTRACE_TRUE!$ODBCTRACE_TRUE$ac_delim ODBCTRACE_FALSE!$ODBCTRACE_FALSE$ac_delim ALLOCA!$ALLOCA$ac_delim LIB_VERSION!$LIB_VERSION$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 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 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _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 fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 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 || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; 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 "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; 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 || 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=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 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=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # 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= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF 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 sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;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 $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out 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"; } && { 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 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 ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || 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 || 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=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # 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 # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file and --srcdir arguments so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -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=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; *) case $ac_arg in *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" echo "$as_me:$LINENO: $ac_msg" >&5 echo "$ac_msg" >&6 { 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=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 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=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} { (exit 1); exit 1; }; } fi cd "$ac_popdir" done fi unixODBC-2.2.14-p2/AUTHORS0100644000076400007640000000350611011031222013230 0ustar nicknickAuthors of unixODBC... Peter Harvey Nick Gorham The PostgreSQL Driver was modified from the standard PostgreSQL ODBC driver (http://www.postgresql.org) The NNTP Driver as written by Ke Jin The MySQL driver is a mirror from the MySQL folks. Other contributors include Alex Hornby Artiom Morozov Arun K Desai Bard Hustveit Bill Bouma Bill Medland Bojnourdi Kaikavous Brian Harris Bruce A Mallett Charles Morrison Charles Overbeck Christian Jullien Christian Werner Constantine Filin Craig A Berry Dave Berry David Brown Dmitriy Yusupov Emile Heitor Erik Lundqvist Frediano Ziglio Gary Bunting Geoffrey Gowan Greg Bentz Holger Bischoff Holger Schurig Ian Ashley James Dugal Jason Crummack Jay Cai Jay Q. Cai Jay Van Vark Jeff Garzik Jean Louis Charton Jens Schlegel Jess Balint Jim Ziegler Joel W. Reed John C. Rood John L Miller Jon KÃ¥re Hellan Jon Pounder Jon Willeke Jürgen Pfeifer Keith Woodard Lars Doelle Manush Dodunekov Mark Chopping Mark Hessling Mark Vanderwiel Martin Edlman Martin Evans Martin Hobbs Martin Kittel Martin Lacko Max Khon Michael Koch Mike Schultz Mikko Vierula Murad Nayal Murray Todd Williams Nikolai Afanasiev Ocke Janssen Oded Comay Ola Sundell Oren Nechushtan Patrice Favre Paul Richardson Per Bengtsson Per I. Mathisen Pierangelo Masarati Rafi Einstein Ralf Fassel Rick Flower Ron Norman Samuel Cote Scot Loach Scott Courtney Shandy J. Brown Simon Pepping Stefan Radman Steffen Dettmer Steve Gilbert Steve Langasek Steven M. Schultz Steven Reynolds Stuart Coupe Thomas Langen Tim Roepken Tomas Zellerin Trond Eivind Glomsrød Venu Anuganti Zoltan Boszormenyi If I have omitted anyone from this let me know and I will amend it ASAP. I have removed the email address of the people on this list. If someone wants to get in touch, mail me and I will pass it on. Nick Gorham unixODBC-2.2.14-p2/COPYING0100644000076400007640000005755710021405714013245 0ustar nicknick GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 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. [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. 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. 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. 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. 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. 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. 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. 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 unixODBC-2.2.14-p2/ChangeLog0100644000076400007640000015641211111037255013754 0ustar nicknick19th-Nov-2008 2.2.14 * missing protype in 2.2.13 made the build fail on some platforms 18th-Nov-2008 2.2.13 * There was a mutex around iconv that needed adding. Without this, there was a potential thread problem * Fix problem with SQLGetDiagRec/Field returning double driver errors * odbctest was using the wrong handle for SQLGetConnectOption * remove startup thread race condition * fix descriptor memory leak with UNICODE only drivers (thanks Ian) * Alter the default 64bit build mode, and change the flag to BUILD_LEGACY_64_BIT_MODE * Fix a couple of 64bit problems * create unixodbc_conf.h on install to contain compile settings * Allow the GUI parts to build with qt4 * try and deal with drivers that call internal W functions and end up in the driver manager (informix for example). Enabled by --enable-handlemap=yes when configuring * Fix leak of iconv handles * Allow the setup API to call through to the wide driver functions * Fix potential seg fault in SQLGetPrivateProfileString * Fix a couple of broken casts, and some MS 64bit changes * Add check for postgres driver getting into a spin wait * Fix logging that reported the setting of env attrs failing * Add isql option to wrap strings with quotes * Add isql option -3 to make isql use ODBC 3 calls instead of 2 * Add timestamp to logging output * Pull any errors from driver whern SQLBrowseConnect returns SQL_NEED_DATA * isql now displays any warnings from SQLMoreResults * Add include path to odbc_config --cflags output * Fix some SQLLEN/SQLINTEGER conflicts in the cursor lib * isql now checks if the driver has SQLMoreResults before calling it * A couple of tweeks in the txt driver * Fix More than 1 log msg relevant in odbcinst now * Changed UI plugin technique for odbcinst see... ODBCConfig > main.cpp, and odbcinst > SQLManageDataSources.c and odbcinstQ4 > SQLManageDataSources.cpp * Add more 64 bit changes, remove SQLROWCOUNT and its frends from 64 bit land * Couple of descriptor typo's fixed (Thanks Jess) * Add odbcinstQ4 to support pure Qt4 SQLCreateDataSource and SQLManageDataSources * Add ODBCCreateDataSourceQ4 as Qt4 based exec to SQLCreateDataSource * Add ODBCManageDataSourcesQ4 as Qt4 based exec to SQLManageDataSources * Add "-c" option to odbcinst to call SQLCreateDataSource * Add "-m" option to odbcinst to call SQLManageDataSources * Add ODBCDataManagerQ4 * Add Wrappers (C++, QtCore 4, QtGui 4 - thin wrappers to ODBC) * Add more complete set of driver config options to GUI config * Fix incorrect export file in odbcinstQ * Added some extra features to isql (thanks to Ron Norman for the ideas) * Add diag support lib for driver development and possibly DM This is very 'black-boxed' on purpose. * Fix Replaced diag code in txt driver to use new diag lib. * Add New odbctrac library. * Add Threading can not be config via Qt(4) based GUI * Add New ODBCString library. * Add odbcinst.ini -> ODBC -> TraceLibrary and corresponding GUI Qt(4) config. * prevent the cursor lib from seg faulting if the query isn't a select * Add SQLULEN size display to the output of odbcinst -j * Add mutexes in odbcinst/_logging.c * Remove the MySQL Driver, its woefully out of date now * Remove incorrect path in vms_odbc.opt * rename trace.h to odbctrace.h to avoid potential name conflicts and move to include dir * update unixODBC.spec file * Add README.CYGWIN * Fix build problem with QT4 without QWizard support * Alter how the Ansi-Unicode mapping is done, so a unicode function can be passed to the driver (if it supports it) even if a non unicode connect was done * Fix buffer overrun in SQLDriverConnectW and SQLColAttributesW * I have cut back on a lot of the GUI parts that are being added. The goal is to create a distinct set of files that contains these and other parts that are not part of the core goal of providing ODBC. Likewise the drivers will go on the next release, as most DB's now have their own folk working on their drivers and they all interoperate with unixODBC so its just adding confusion including them here (IMHO that is) * Prevent a potential buffer overrun in the DM * The processing of --enable-rtldgroup had been dropped, back now * Allow the cursor lib to handle multiple result sets 13th-Oct-2006 Release 2.2.12 * Add missing SQLSetStmtOptionA and SQLSetStmtOptionW * The config string being passed into ConfigDsn was wrong, removed semicolon, and added terminating double null * Add help help to isql * Couple of changes to make the build on OSX work better * Alter odbctest FullConnect to use SQLDriverConnect * Replace a missed flag for true 64 bit operation * Add ODBC3<->ODBC2 type mapping in SQLSetParam * Add missing SQLSetStmtOptionW.c * Tidy up the search for GUI lib code in SQLManageDatasource * Backport a couple of changes from the Debian build into the cursor lib * Add extra config settings to the MaxDB/SapDB setup lib * Fix possible exit from SQLConnect without having closed in the driver * Fix configure problem on Tru64 * Fix a build issue on Sinix * Allow calling metadata functions via the cursor lib * Alter args to SQLParamOptions * Fix bug preventing attribute length from being returned from SQLDrivers * Fix broken iusql * SQLTransact via the cursor lib has the args swapped * Remove leak in the postgres driver (error messages were not being released), and yet a different leak in convert.c * Add code to allow the Cursor lib to call SQLGetDiagRec * Updated libtool, automake and autoconf, so expect problems for the next few months... * Add new QT detection macros (Thanks Peter) * Removed some unneeded strlen's from the postgres drivers * Small change to the logging in SQLBrowseConnect * Add additional SQLGetInfo value SQL_ATTR_DRIVER_THREADING (1028) that returns a SQL_USMALLINT containing the level of thread protection afforded the driver by the driver manager * Fix small bug that prevents SQLDrivers from returning the first entry if SQL_FETCH_FIRST is not used * Make DataManagerII check the DB's quote char when creating SQL * The cursor lib wasn't correctly returning the last rowset * Fix problem with the cursor lib, rowsets and SQLExtendedFetch * Fix couple of spelling mistakes in isql * Allow decoupling of SQLHANDLES between application and driver, there is a 64bit DB2 where the driver handles are int's but unixODBC uses void *. There is a define for DRV_SQLHANDLE in DriverManager/drivermanager.h that allows this choice at build time * Add a few extra checks for only unicode API's from the driver * Check for existance of qt-mt lib before adding to link line * added missing cleanup in Postgres driver * Added a contrib directory with (so far) a new ODBCConfig and ODBCStats apps, (Thanks Fizz for those). * Ask the driver when there are no errors left in the DM's store * Add a couple of unicode fixes suppled by Oracle * Small fix for call to SQLGetDiagField * Fix silly typo that was using sizeof( SQL_WCHAR ) instead of SQLWCHAR * Add check for C_TYPE in SQLBindCol, SQLBindParameter, SQLBindParam, and SQLGetData * Fix overflow if the LOG_MESSAGE_LENGTH is increased * Save the last arg for SQLSetConnectAttr if called before connection for later passing to driver * Fix missing mutex release in SQLFreeHandle (thanks Mark) * Add missing maps from unicode in SQLSetDescFieldW and SQLSetStmtAttrW * Handle resetting statement descriptors to implicit values, by passing in NULL or the implicit descrptor to SQLSetStmtAttr with the attribute SQL_ATTR_APP_PARAM_DESC or SQL_ATTR_APP_ROW_DESC * Avoid calling SQLGetInfo for every SQLEndTran/SQLTransact * Remove inconsistency in the return value from SQLGetPrivateProfileString * Fix broken QT_VERSION detection * Add UNICODE wrapper functions in libodbcinst. The ini file is still ascii, so its not got full support at the moment, but any apps that need the W functions should build now * Add GUI support for SQLCreateDataSource * More informative error message if a invalid handle is passed to SQLAllocHandle * Add TIMESTAMP_NO_TMZONE to Postgres drivers types * The ANSI to UNICODE mapping in SQLTablePrivilges was broken * Fix incorrect buffer length in SQLGetInfo when calling unicode drivers 4-March-2005 Release 2.2.11 * Fix a couple of typo errors in postgres driver and odbctest * Fix problem where ini files could be truncated under heavy load * Fix potential hang with FILEDSN's if the connect string included a DSN= entry as well * Don't save the SAVEFILE attribute in the filedsn. * Fixed bug that prevented the setting of some attributes via the DMConnAttr method * Removed the -module entry from the cursor lib, it prevents it building on HPUX. * Add a couple of extra info types to the pull down in odbctest * SQLGetInfoW was returning the wrong length when converting from the ANSI call. The same was also going on the other way. Also fixed same thing for other calls. * Fix incorrect value in SQLFetchScroll in odbctest * Fix memory leak in odbcinstQ * Check for MOC being found, before building GUI parts * Add list of export symbols to libodbcinst * Fix a problem in the cursor lib returning blobs * SQL_DIAG_NUMBER was being stored and returned as a SQLINTEGER instead of a SQLRETURN * Check if we can include sys/stats.h in iniOpen.c * Fix potential buffer overun in SQLConfigDataSource() * Fix problem in odbctest that prevented intervals from being displayed. * Cope with SHLIBEXT not being set when finding the cursor lib * Add a couple of missing Setup64 checks * Small change in __info to conserve memory * Add odbcinst.exp to distrib * Add missing ODBC2 installer stubs * Fix typo in SQLStatistics * Not passing user names and password into isql passes NULLS not empty strings into SQLConnect * Add missing SQLPrepareA from the driver manager export file * Make the default for DontDLClose 1, it doesn't do any harm, and fixes some segfaults * Fix printf format in the postgres driver on 64 platforms 29-Sep-2004 Release 2.2.10 * Add additional check in sqltypes.h to detect AIX 64 bit * Fixed minor copypaste error in configure.in * Fixed problem in configure script that prevented it using the qt-header and qt-lib config args. And allow the QT bin dir to be set. * Add new spec file (Thanks Stefan) * Alter string initialisation in isql to reduce memory use on some platforms * Remove the parts of odbcinstext.h that only are needed in unixODBC builds from outside app builds. (Cheers Stefan) * Small fix to DataManagerII * Protect iconv handle in threaded environments * Extend cursor lib to cope with where clauses * Remove incorrect duplicate function in iniOpen.c * Strip FILEDSN from connection string before passing to driver * If using a cursor lib use "IS NULL" instead of binding nulls * Allow 32 and 64 installations to coexist using a Driver64 entry in odbcinst.ini * Fix uninitialsed value that was causing "Driver does not support the requested version" warning * Fix typo in sqltypes.h that failed when building Perl DBD::ODBC * INI cacheing is not on by default, it can lead to a memory leak * Alter the Makefile.am's so builds outside the config dir can be done * Fix possible buffer overrun in SQLConnect * Replaced crypt auth in postgres with md5 for 7.1 Postgres driver * Fix memory leak in descriptor thread support 24-Jun-2004 Release 2.2.9 * Fix problem so that if SQLGetPrivateProfileString fails because odbcinst.ini doesn't exist, it copys the default value into the output. * Avoid caling SQLFreeEnv the driver more than once. * Rename lo_xxx func in Postgres driver(s) to avoid clash with postgres lib. * Add odbc-config to find compile time options for use with other build tools * Fix call to SQLParamData in cursor lib * Add SQL_NULL_DESC to include files * Remove -M for unixware builds from libtool * Fix descriptor bug in SQLCopyDesc (Thanks Erik) * Add extra iconv targets * Fix bug that stopped RTLD_GROUP from being added to dlopen * Remove mem leak if libodbc.so is loaded using dlopen instead of linked as is normally done. * Add check for LP64 in sqltypes.h * Remove dlclose from ODBCConfig * Fix typo in the readline detection in configure * Fix potential hang with semaphore allocation in driver manager * Alter how the state is set after a SQLParamData to S5 insted of S4 * Stop the driver manager from calling SQLFreeEnv twice in the driver * Add new MySQL source from MyODBC 3.51.07 * Update the uo_fopen functions * Add some extra mutex locks around end_tran code. * Alter the flag to build real 64 bit mode to BUILD_REAL_64_BIT_MODE * Update a couple of prototypes for 64 bit builds * Fix assorted 64 bit warnings and cast issues 17-Feb-2004 Release 2.2.8 * Fix bug in SQLMoreResults that moves to incorrect state * Fix problem where metadata calls fail if in STATE_S5 * Fix bug inserting ini entry with more than one '=' * Fix some stupid leaks in the connection pooling code * Allow the driver manager to probe a pooled connection, to see if its valid. Set the query to use in the odbcinst.ini entry by setting CPProbe = SQL, for example this works well for postgres [PostgreSQL] Description = Postgres SQL Driver Driver = /usr/local/lib/libodbcpsql.so.2.0.0 Setup = /usr/local/lib/libodbcpsqlS.so CPTimeout = 1000 CPTimeToLive = 100 CPProbe = select user FileUsage = 1 DisableGetFunctions = 0 DontDLCLose = 1 * Fix the SQLGetPrivateProfile code when passing NULL sections or names. * Fix SQLGetData to avoid a problem returning unicode from ODBC2 drivers. * Make the header sqlext.h include the unicode header sqlucode.h. This matches the MS header files. * Added DriverConfig lib for Mimer. (From Mimer) * Make connection pooling check using SQLGetConnectOption as well as Attr * Fix leak if iconv is used and a connection fails * Add configure option to disable the use of readline in isql 02-Dec-2003 Release 2.2.7 * Add missing comma in Oracle setup lib * Add -l option to isql to allow setting locale * Fix problem in SQLDriverConnectW that prevented connecting to UNICODE driver. * Remove a couple of the attribute mappings from SQLColAttribute when going from V2 app to V3 driver. * Clear SQLError errors in the same was as SQLGetDiagRec (this will help PHP out somewhat). * Add a check to handle driver that don't support SQLGetEnvAttr * Allow ATTR; in set attr lists from ini file * Small change to warning dialogs in odbctest (Thanks Mark). * Fix the cursor lib to work via SQLFetch as well as the other fetches. * Update the README.OSX file to cover building the cursor lib. * Remove the SQLNumResults() call after a execute. This means the DM doesn't know if there is a result set, but it seems to match what the MS one is doing. * Fix a major mistake in the thread protection, it worked fine until the driver returned a error. * Fix write beyond string bound in SQLDriverConnect.c (Thanks Ocke) * Add call to setlocale( LC_ALL, "" ) in isql.c, can also be set using -l option * Add initial support for Microsoft Interix, details in README.INTERIX * small change to ODBCConfig to have the password field in the driver properties hide the password * Make both # and ; comments in ini files * Update README.OSX to cover changing driver libs into bundles * Fix a couple of small display problems in odbctest * minor updates to odbctest: Have the gui list match the input order and the ini file Restore the selection after Add/Remove * Expand a text buffer to avoid overflow * Add RTLD_MEMBER to dlopen args if available (AIX) * Fix bug in SQLWritePrivateProfileString 21-July-2003 Release 2.2.6 * Add SQL...A() functions as well as W * Add some 64 Bit changes * Add support for SQL_BIGINT in Postgre7.1 driver * Fix bug in libtool that fixes a call to access * Allow setting of odbcinstQ lib load with either environment variable ODBCINSTQ or in the [ODBC] section of odbcinst.ini with a odbcinstq = /path/to/libodbcinstQ.so * Alter the way SQLDataSources works (again :-) * Add configure option to force the way dlopen works * Fix bug in stats collection * Add call to endpwent() to avoid a small leak * Allow isql to handle SQLMoreResults * Add option TracePid in [ODBC] section of odbcinst.ini, setting this makes the DM treat the TracePath as a path to a directory, and creates seperate log file for eack PID in use, mainly of use when used under something like apache. * Add extra unicode string for Solaris, see README.SOLARIS * Sort error messages according to state (as per the spec) * Remove trailing \ from doc/Makefile.am * Fix memory corruption in postgres driver that caused table creation under OpenOffice to fail * Tidy up gODBCconfig so it builds with current tools (or so I hope). 26-Feb-2003 Release 2.2.5 * On error from SQLMoreResult don't change to S1 * Fix build problem with QT 3.1.1 * Fix spelling of error message * Fix bug where multiple connections give ODBC version error (thanks Jay Cai) * Increase the TEXT_FIELD_SIZE in the PG drivers * Set output handle to NULL if SQLAllocHandle call fails * Return any errors from the drivers SQLAllocConnect * Update version of automake and autoconf used to produce distributions * rebuild libtools configure to work with new autoconf 24-January-2003 Release 2.2.4 * Make the DM look in libdir for the cursor lib * Additions to DataManagerII * More thread safe issues and fixes * Fix uninitialised pointer in SQLDriverConnect.c * Fix memory leak in SQLGetDiagRec * Add missing SAG conformance SQLGetfo call in odbctest * Fix bug in SQLDriverConnect where warnings were not getting into the error stack * Add quotes to table names in DataManager * update the file "missing" * Add missing SQL_DECIMAL in logging conversions * VMS build changes... (Thanks Craig) * get caught up with changes since the original VMS port * follow the compiler warnings to fix myriad small nits throughout the sources * change the handling of shareable images so they no longer need to be placed in SYS$SHARE * improve the installation and set-up process * Make the cursor lib build without needing libodbc, it breaks on HPUX * Fix allocation problem in cursor lib * Fix potential seg fault in cursor lib, when bind is done with null indicator * Update README.QNX to cope with QNX 6.2 * Fix problem with flags to dlopen * Make the exit logging in the driver manager display unknown return codes * Fix bug in driver manager where a SQLAllocHandle in the driver can cause a seg fault * Add -s option to isql to allow the input buffer size to be set i.e. isql -s32000 dsn * Update some of the autoconf scripts to handle RH 8 * Add extra attrs to oracle setup lib * Allow DMEnvAttrs to be set in odbcinst.ini as well * Alter the way the config mode is stored, don't use putenv now, as it causes trouble if the DM is unloaded. Also malloc the strings if the environment is set via the DM, to avoid the same problem with putenv. This caused a crash of OpenOffice on Solaris 23-August-2002 Release 2.2.3 * fix bug in unicode_to_ansi_copy * DataManagerII was missed from the last release, sorry, I thought that it had been moved to DataManager. * DatamanagerII: Remove duplicate rows with drivers such as Postgres which doesn't work as expected when getting lists of Schemas * Attempt to set permissions for the file dsn directory. * Fix bug with conversion of ODBC 2 values to SQL_C_WCHAR * Make the postgres drivers return a SQL State of 01000 for a warning, not 00000 * Add option to isql (-x) to specify a separator in hex (0x09 is V tab) or octal (012) * Fix typo in pre 7.1 Postgres driver that broke bound timestamps * Fix what looks like a bug in the libtool dlopen wrapper, its fails to fail, when failing to load a lib. * Only call the ODBC 3 version of SQLGetFuctions if we have requested ODBC3 some drivers (SAPDB) that return ODBC 3 API's only return this call if the connect specified ODBC 3. * Check the attributes being passed into SQLSetConnectAttr, only pas into SQLSetConnectOption if they are ODBC 2 values. The same for SQLSetStmtAttr * Allow double clicks on dsn's to bring up the configure in ODBCConfig * Add extra thread checks for FreeBSD * Add check for SQL_NO_DATA in isql * Add code to make DM cope with SQL_NO_DATA from SQLExec(Direct) * Change UNICODE conversions, remove all inplace converts. * Add support for iconv for the UNICODE to ANSI conversions * Add code to make DM code with SQL_NO_DATA from SQLExec(Direct) * DBFIO: completed basic functionality (DBF file access library) * dbfio: completed basic functionality (test program for DBFIO) * Add checks for usage counts for loaded libs * Replicate the way the MS DM only calls SQLAllocEnv on a driver once * Add fix from John L Miller for SQLEndTran and SQLTransact * Make it try and find a working iconv set of encodings * Small fix to SQLMoreResults from John L Miller * Alter error state return in SQLCloseCursor * Allow state 07009 to be mapped to S1002 or S1093 depending on the calling function * Fix major ineffiency with text fields and the Postgres drivers * Fix incorrect return state from SQLEndTran/SQLTransact * Make rowcount return a count of -1 if its returns a error * Further AIX linking tweeks 08-July-2002 Release 2.2.2 * added -m option to isql * improved row count at end-of-result in isql * allow SQLColAttribute(s)(W) to be called with a column number of 0 to get the descriptor count * Remove -export-symbols from sample, it was causing some problems on Solaris * Add DataManagerII, this is a updated version from Mark Vanderwiel * Update libtool to escape from AIX build problem * Add fix to avoid file handle limitations * Add more UNICODE changes, it looks like it is native 16 representation after all. The old way (Fixed at BE) can be reproduced by defining UCS16BE * Add iusql, its just the same as isql but uses the wide functions * Couple of cast warnings cleaned up * Add change to libtool to clean up AIX build * Create README.AIX * Fix small bug in SQLDriverConnectW, I was allocating 1 byte two little * Fix typo in SQLConnect that wasn't allowing the driver manager to supply SQLFreeConnect for drivers that didn't support this. * Fix build on Caldera OpenUnix8 (not sure why anywone would want to go anywhere near this OS IMHO...) * Move DataManagerII to DataManager * Alter what comes back in the second field from SQLDataSources to be the description from the ODBCINST.INI entry, this matches what happens in with the windows DM. 23-Mar-2002 Release 2.2.1 * odbcinst: now tries to auto create system odbc.ini * odbcinst: implemented -n, -l, -h for -q -s * Add option to disable definition of windows types in sqltype.h * Fix small bug in ini uper case routines. * Added STMT and OPTION to MySQL driver setup * Added -j arg for odbcinst (shows INI file names) * Fixed seg fault bug in Text File driver * Fix small bug in SQLBrowseConnect * Fix check for Darwin (OSX) * Fix bug in sqltypes that stopped 64 bit builds * Fix build problem on 32 bit platforms without long long * Add option to set environment (unix) values via SQLSetEnv, this can also be done in the odbc.ini, for example [sample] Description = Test to DB2 Driver = DB2 DMEnvAttr = SQL_ATTR_UNIXODBC_ENVATTR={DB2INSTANCE=db2inst1} * Fix some cases where the trace file env value was "Trace File" * Make the readline check make sure there are headers as well as libs * Add check to use RTLD_GROUP in libltdl if present * change DWORD definition to unsigned long where applicable * Fix bug in error reporting that cound crash with multiple errors and ODBC3 * Remove C++ comment from exe/odbcinst.c * If we are not building the drivers, dont build sqp * Alter default size of odbctest window * Improve check for stats headers * Add install-data-am section back to Makefile.am to create the empty ini files * Extend naming of cursor lib to work on non linux platforms (it expected a .so) * Make Postgres driver(s) handle {oj ... } syntax * Fix some endian issues with 4 byte unicode support * Update the MySQL driver code 30-Jan-2002 Release 2.2.0 * Allow SQL_ATTR_LOGIN_TIMEOUT to be set on a connected connection doesn't make that much sense, but it mirrors what the Windows DM does. * Change DWORD in sqltypes to be a unsigned int to work on 64 bit platforms * Fix incorrect diag message in SQLSetStmtOption.c * Hack to the 7.1 postgres driver to enable SQLPrepare to be called BEFORE SQLBindParameter * Reset the stmt->prepared flag when going into a SQLParamData state after SQLExecDirect * Fix silly bug that stops odbctest adding the fidt entry on the list * Add missing tracing to SQLBrowseConnect * Fix some potential corruption in SQLGetDiagField * Add some simple cacheing to SQLGetPrivateProfileString * check for redefinition of SQL_OL_CAP to stop AIX build breaking * Add missing getGlobalDefaults in PG 7.1 driver (Thanks Rick) * Fix bug in SQLConnectW (Thanks Artiom) * More mods to SQLConnectW and SQLDriverConnectW * More MS generated 64bit changes * Add MyODBC 3.5 driver. Its a separate configure in Drivers/MySQL Release 2.1.1 2001-12-21 * started to add mac package/install dirs for PackageMaker * added qmake project files as an optional build process * ODBCConfig can build with a static odbcinstQ * Remove auto text driver setup, this breaks new installs as it can't find odbcinst * Fix mixup in SQLSetScrollOptions * Small portability fix for BSDI * Make UNIX Domain socket settable in postgres driver vua UDP= in odbc.ini dsn entry * Fix bug where some SQLGetConnectAttr values were not coming from the driver, but the driver manager * Alter odbctest to make directory select in Manage Auto Test work better * Fix browser in DataManager so that it works with drivers that don't return values from SQLRowCount * Fix some error retrieval problems * Alter the include files to match MS ODBC 3.52 with 64bit support, fix assorted warnings when building on 64bit platforms * Add option to force tracing on, this is for use with apps like StarOffice that disable tracing * Add support for MAX_ROWS in postgres drivers * Add fix to cover Darwin 1.5 (OSX) * Add DisableGetFunctions option to driver section of odbcinst.ini to cope with drivers that can't handle the call (Solid 2.2 AFAIK) * Fix 64 bit bug in Postgres driver * Add some ODBC 3 bits to the Postgres driver to make it run with Star Office 6.0 (beta) Release 2.1.0 2001-11-27 * cvs moved to Source Forge * attempts have been made to cleanup GNU auto-stuff to make the cvs code more accessable - added README.cvs - hopefully "make -f Makefile.cvs" works on more platforms * implemented more in SQLManageDataSources() - created odbcinstQ (plugin for Qt GUI support in odbcinst) - moved most code from ODBCConfig to odbcinstQ * stupid mistake on my part(Nick), left a #ifdef in isql.c that prevented displaying a list of tables * Make calls to localtime in Postgres Driver only when required * Made some changes to Postgres prototypes * Add option to get odbcinst info from stdin * Make SQLError errors clean down after each API call for ODBC 3 apps * Add mapping from SQLColAttribute attributes to ODBC2 attributes * Fix reported leak in ltdl.c * Make the path for file DSN's come from the odbcinst.ini file * If using a ODBC 3 driver call the one off version of SQLGetFunctions * Now builds better on Darwin * Reinstate conversion from wide to ansi types in SQLGetData if the driver is ODBC2, also adjust the buffer length to prevent buffer overrun. * Stop ODBCConfig setting Trace File in odbcinst.ini it should be TraceFile Release 2.0.10 2001-10-14 * odbctxt : escape special chars when read/write lines into a table * Fix bug where a Execute that errors should return to state S2 * Update README.OSX to cover a txt driver problem * Add Drivers/txt/doc to distribution * Add missing text driver setup from spec file * add missing VMS opt files * Add missing include from DataManager (Samuel Cote) * Remove LT_GLOBAL from the libtool code. This breaks perl amongst others. * Allow the display of unicode data in logs * Fix stupid WCHAR bug in SQLGetData * Move ifdef in __stats.c to allow the building of ODBCConfig under Mac OSX * Add missing args to prototype in sqlext.h (Thanks Christian) * Pass on unknown connection attributes to driver after connect * Make SQLGetPrivateProfileString return the actual len read, not + 2 * Make the OSX build cleaner, it just needs the dlcompat lib now * Allow ODBCConfig to handle attributes not described in setup libs * Stop the ODBC Version being set when there are open connections * Alter odbcinst error messages to match windows * Fix incorrect installer errors (they were offset by one...) * Create ./odbc.ini if it doesn't exist * Fix typo that stoped odbctest from building on Suns latest compiler * Slightly alter the unicode definitions in sqltypes.h * Add support for FILEDSN in driver manager, odbcinst, and ODBCConfig * Fix buffer overrun in Postgres drivers Release 2.0.9 2001-08-14 * odbctxt: tweeked - now works on PowerPC * Add auto register for text driver to Makefile.am * Add check for flex, sqp won't build with lex now * odbctxtS: now supports CaseSensitive property * Add build time option to select wchar_t UNICODE (4 bytes) as opposed to signed short UNICODE (2 byte) * Add build time option to select the length of logged strings (LOG_MESSAGE_LEN in drivermanager.h) * Fix libtool bug that caused the AIX build to not produce shared libs * Fix couple of typos that caused the build to fail on Solaris * Add conditional for 64 bit application compilation when the sizeof(long) will not have been done by configure * Fix small bug in postgres driver on debian * Add build instruction for QNX * add Slovak translation of gODBCConfig * Fixes to SQLBrowseConnect in driver manager * Get the DM to check with the driver for the CLI Year * Fix small bug in strncasecmp in extras * Add extra support for SQLSetConnectAttr before connection * rename global structure in Postgres drivers to avoid a colision * Add support for presetting Env,Conn and Stmt attributes via the ini file using the following syntax in the dsn section of odbc.ini DMConnAttr = SQL_ATTR_CONNECTION_TIMEOUT=30 DMStmtAttr = SQL_ATTR_NOSCAN=SQL_NOSCAN_OFF;*SQL_ROWSET_SIZE=20 the * indicates thats its a override attribute, so any attempt to call SQLSetStmtAttr to set the rowsize, will always set it to 20 in this example. NOTE: That at the moment, this information will be lost if ODBCConfig is used Release 2.0.8 2001-06-25 * Add definition of alphasort and checks for location of dir.h in the txt driver. * Add some missing functions from cur lib * Fix a problem in configure.in that was loosing LIB settings * Remove C++ comment from sqlext.h * sqp: now makes use of check for NOT NULL in CREATE TABLE * sqp: fixed missing pointer assignment (affected CREATE TABLE) * sqp: added more debugging messages (but turned off by default) * odbctxt: removed long log message (would cause seg fault) * odbctxt: now appends a space to each SQL statement; this is to work around a problem in the sqp lexer when last char is close quote * Fixed a bug in the driver manager that would fail if the driver returned a max size error message * sqp: now makes use of IS NULL and IS NOT NULL * sqp: now makes use of INSERT INTO table(col1,...) * sqp: now makes use of LIKE and NOT LIKE (with optional ESCAPE) * sqp: now makes use of any mix of AND, OR, () in WHERE clause * sqp: now makes use of ? for column value (used in SQLBindParameter) * sqp: now makes use of integers for column values (just mapped to string) * odbctxt: basic implementation of SQLBindParameter (only SQL_C_CHAR input allowed) * odbctxt: new syntaxes of sqp parser taken into account * odbctxt: new option CaseSensitive (Yes or No) allowed in .odbc.ini file * odbctxt: fix message length returned in SQLGetDiagRec function * odbctxt: drop statement when freeing it via SQLFreeHandle * sqp: default string length changed to 255 * Fix threading problem when multiple ENV's are in use Release 2.0.7 Peter Harvey And Nick Gorham 2001-06-06 * ODBCConfig/DataManager: Updates for Qt 3.0 * Add extra decoding of types in the log output * Fix some type problems for 64 bit platforms * Fix rogue logging in SQLGetInfo * Add correlation and alias to sqp * Add some fixes to the txt driver to enable it to work with StarOffice * Stop Ctrl-D from Segfaulting isql * Add a example autotest to the build * Make isql detect the EOF when not using readline * Tidy up the libs from autoconf * DataManager: refinements such as; logout a DSN, isql history * sqp: CREATE TABLE now supports most data types and some column options * sqp: added DROP TABLE * sqp: added ORDER BY * sqp: enhanced api with sqpOpen, sqpClose... * odbctxt: checked in rewrite (much less code now) * odbctxtS: added setup lib for odbctxt * ODBCConfig: Stats now shows PIDs * Add missing -lpthread in configure (thanks Jon Kåre Hellan) * Remove C++ comments from autotest.h * Fix big in Postgres7.1 with binding a column to a double (thanks Jürgen) * Update libtool to 1.4 * Fix problem that looked like a restriction on the size of ini files, but was actually a problem when the same section appeared twice in a file * Add VMS port (Thanks Jason) * Add extra PG7.1 numeric fix (Thanks Zoltan) * Add fix to PG7.1 to allow the retrieval of more than 8K blobs, adjust the define TEXT_FIELD_SIZE in psqlodbc.h (Thanks Bojnourdi) * Fix small typo in SQLConnect (Thanks Martin) * The postgres drivers didn't recognise "Yes" in the ini files, only 1 or 0, fixed now * Avoid "broken pipe" message with postgres (Thanks Gary) * Alter check if cursor lib needed with ODBC 3 apps * Fix couple of bugs with cursor lib * Get to build on Mac OS X (without GUI bits ATM) look at README.OSX for help and hints * Fix for use with QT 3 * Remove default trace option from ODBCINSTConstructProperties * Stop ODBCConfig from accepting null DSN names Release 2.0.6 Nick Gorham 2001-04-18 * Add define for _THREAD_SAFE to help AIX builds * Fix bug in cursor lib introduced by UNICODE addon's * Make the header definitions work on 64 bit platforms * Fix a incorrect return from SQLConnect with pooling * Add support for unicode drivers that have ANSI functions renamed to the unicode versions (duh!). * If pooling, then set the flag to not close the driver handle (DontDLClose) * Add CPTimeToLive option to restrict the number of times a driver will be reused (useful with leaky drivers) * Alter logging, and support setting logging via SQLSetConnectAttr call * Add a AutoTest facility to odbctest * Fix incorrect error test in SQLBrowseConnect * Check descriptor is for a open connection * More unicode fixes Release 2.0.5 2001-03-21 Nick Gorham * Add extra autoconf checks for -pthread and -mt compiler options * Add Postgres7.1 tree for code from new postgres development * Fix retrieval of errors for SQLTables and SQLColumns call in isql * Fix mem leak in DM if SQLDisconnect was called with open statements or descriptors * Fix broken check if readline needs -lcurses * Add setup lib for SAPDB (thanks Holger Schurig) * Added locale fixes to PG7.1 driver (thanks Zoltan) * Fix configure problem on Solaris Release 2.0.4 2001-02-02 Nick Gorham * Changes to Postgres driver for operation with PG 7 and locale changes (Zoltan Boszormenyi) * Fix problem with SQLSetConnectAttr and unicode operation * Apply patch to DataManager from Christian.Werner which fixes truncated query result rows, formatting errors in HTML output, and adds a leading blank to each where expression in order to prevent SQL syntax errors in e.g. LIKE '..' or MATCHES '..'cases. * Add support for SQLDriverLoad and SQLDriverUnload functions Release 2.0.3 2001-01-13 Peter Harvey and Nick Gorham * sqp: added a yywrap() to eliminate link dependency * sqi: home dir default if no path with database file name * sqi: creates database file if not exists * ini: open fails if existing file appears not be an ini * Fixed problem where null row status array could be passed into SQLExtendedFetch * Fixed further bug in unicode_to_ansi (thanks Martin Edlman) * Fixed bug in UNICODE converison in SQLGetInfo * Added sqi/test to build tree, its moved to exe * Add extra checks for readline to see if -lcurses is needed * Add check for -lpthreads that should be ok on Tru64 * Replace printf with puts in isql to cope with columns containing '%' Release 2.0.2 2001-01-08 Peter Harvey * ODBCConfig: Repurposed 'Tracing' tab. Now is 'Advanced' and contains both Tracing and Pooling options. * Fixed bug in __info that caused SQLGetDiagRec to fail Release 2.0.1 2001-01-06 Nick Gorham * Fix bug introduced with UNICODE that corrupted the SQLSTATE from SQLError Release 2.0.0 2001-01-04 Nick Gorham * Added table browse for DataManager * Fix problem in template driver with Solaris compiler * Add msql-include option to specify search path * Fix compile problem in MiniSQL code with Solaris compiler * Fix conditional include of strings.h in ODBCConfig build * Fix tracing in SQLConnect * Alter check for DSN length in SQLConnect * Validate input handle before setting output handle * Fix error code from SQLSpecialColumns and null table names * Fix potential deadlock in SQLFreeHandle * Add change to make the Postgres driver look for the local socket in two places to cope with debian distrib * Fiddle with the MiniSQL searching again * Add sqlucode.h to headers * Fix threaded race condition in __handles.c * Revamped Credits page in ODBCConfig. * Show more useful info in DataManager tree-view * Fixed problem with DataManager 'hanging' upon exit * Added -pthread option to gcc calls when needed * Now needs QT 2.2.x, changed configure to check * Add missing identifier_type in SQLSpecialColumns log * Add some checks for long columns in isql and DataManager * Add connection pooling support to driver manager * ODBCConfig; Code cleanup. Removed extra class layer created by QtArch * ODBCConfig.Drivers.Config; driver specific options now accepted, if already exist in odbcinst.ini, as simple text fields in GUI * ODBCConfig and DataManager now attempt to save and restore state... such as window geometry. * ODBCConfig now supports connection pooling options. * ODBCConfig now has a Stats tab which is similar to CPU or mem monitor. This will be improved upon and the code will likley make its way into a dock widget * Add UNICODE support * Disable the default building of static libs * Add support for GNU portable threads Release 1.8.13 2000-11-14 Nick Gorham * Add missing line continuation char in SQLGetDiagField.c * Add fix to SQLGetDiagField to return the server name on statements and descriptors * Remove -lcrypt from all but the Postgres driver build * Remove CR/LF expansion in Postgres driver * odbctest was calling SQLPrimaryKeys when it should have been calling SQLTablePrivileges * Add SQL_DRIVER_HDESC support to SQLGetInfo * Add display of returned error text in log file * Take notice of DontDLClose when calling ConfigDataSource. * Fix duplicated log messages on failed connect * Fix incorrect arg to SQLError, change from SQLINTEGER to SQLSMALLINT (Thanks Ralf) * Updated libtool to 1.3.5 * Fixed crash in SQLConnect when NULL server and SQL_NTS passed in (Thanks Venu for the next four changes) * The error code mapping was wrong, it should only map ODBC 3 errors to ODBC 2, not the other way around * Fixed a incorrect error return in SQLPrepare when a NULL string was passed * Zero the handles when released, just to avoid reuse of values * Added readline support to isql, (thanks Tomas Zellerin) * Support the setting of SQL_AUTOCOMMIT before connecting * Fixed bug in odbctest's SQLColAttributes call * Add test in configure for localtime_r and use if present 2000-08-18 Nick Gorham Release 1.8.12 * Fix typo in Postgres driver. * Add i18n support to the Postgres driver (thanks Zoltan) * Remove fix for Postgres driver and large objects, it breaks the SQLColumns call :-( Release 1.8.11 2000-08-16 Nick Gorham * Add --enable-fastvalidate option. This reduces the safety of the handle checking but improves performance when using many handles * If SQLDriverConnect is called with a NULL con_str_in look for the DEFAULT DSN entry * Remove a underscore from odbcinst_system_file_path, it seem's to cause the linker on AIX to have problems * Remove some additional C++ comments from the postgres driver * Call SQLSetConfigMode before calling SQLConfigDataSource * Fix error handling in case of referential integrity violations in Postgres driver * Fix problem with SQLColAttributes swapping its args, and don't check the driver version before mapping to ODBC 3 values. (thanks Tomas) * Make SQLDescribeParam work in state S4 and above, when in ODBC 2 mode * Avoid potential buffer overrun in __info.c when reporting errors from SQLConnect/SQLDriverConnect * Fix potential mem corruption in SQLGetDiagField (thanks Jay) * Add fix to allow the Postgres driver to receive large objects (thanks Bill) * Fix buffer overrun in SQLGetDiagField (thanks again Jay) * Fix for SQLGetDiagField(SQL_DIAG_SUBCLASS_ORIGIN) returning a null string, it now returns something meaningful * The Postgres driver didn't shupdown the connection to the database before dropping the socket * Fix incorrect return from SQLDataSources * Make SQLDriverConnect return all errors from the driver not just the first one * Add Oracle setup lib for http://www.easysoft.org/projects/oracle * Stop isql calling SQLFetch if the query doesn't generate a result set. This stops the function sequence error * Add missing break in postgres password authentication * Add fix in SQLTables for broken version of EXCEL * Fix a bug that caused SQLTransact to fail if called with a connection handle in state C4. This caused Corel Paradox to fall over Release 1.8.10 2000-06-15 Nick Gorham * Add some fixes to make it work and compile on IRIX (Murad) * Add a couple of missing casts in odbctest (Michael) * Fix BOOL bug in postgres driver (Dmitriy) * use setenv rather that putenv if available * Fix a couple of bugs in odbctest/attr.cpp * Fix problem where info warnings could be lost * Fix a couple of problems in the Postgres driver * Fix bug that caused a success with info message from SQLExecute or SQLExecDirect to be lost if used with a ODBC 3 driver and the application called SQLGetDiagRec * Fix problem where bookmarks were failing for StarOffice 5.2 * Stop SQLDriverConnect dumping core when passed a null dsn string * Map ODBC 2 SQLSTATE values to ODBC 3 * Add missing odbcconfig.h to the install include in gODBCConfig * Fix incorrect state from Postgres Driver * Fix integer length problem with SQLExtendedFetch that manifested on big endian platforms (Sparc,Aix,HPUX etc) (Alex) * Avoid clash with definition of CHAR in GNOME XML layer * odbctest SQLExtendedFetch was using the wrong orentation value * Add define for SQLTCHAR * Fix problem in setting tracing on, and a core dump when loading the cursor lib failed (Steve) Release 1.8.9 2000-06-13 Nick Gorham * Fix a State problem when coming out of a SQLParamData cycle * Fix bug where SQLBrowseConnect may leave a connection in C1 not C2 * Pass LOGIN_TIMEOUT onto driver if it is set before the connect * Reverse the test to set DIAG_CLASS_ORIGIN * Return SQL_DIAG_SERVER_NAME and SQL_DIAG_RETURNCODE * Allow explicit allocation of Descriptors * Fix a problem with the SQLFetchScroll -> SQLExtendedFetch mapping * Fix a problem in the MiniSQL Makefile.am * Call SQLSetConfigMode before calling ConfigDSN * Fix problem in SQLCopyDesc and complete case when DM does the work * Return SQL_SUCCESS_WITH_INFO messages from SQLConnect * Added MetaDataBlockFetch connection attribute to esoob driver * Fix bug in __info.c that caused a small memory corruption when logging was on * Enable the reporting of errors on descriptors * Fix extra ] in the msql part of configure.in * Add error reporting to DataManager (Tim) * Assorted fixes to text driver (Peter) * odbctest now ready to use (hopefully) 2000-05-03 Nick Gorham * Fix bug in configure.in where disabling build of drivers also disabled build of GUI bits. * SQLDataSources should return the Driver Description, not the data source description * Add partly written odbctest GUI to project * Remove conditional around VOID typedef in sqltypes.h by default Release 1.8.8 2000-04-27 Nick Gorham * Add extra include for unixware * Added some fixes to the template driver found by Nikolai Afanasiev, and also fix the logging code to recongnise 'On' * Alter distrib to not include moc generated files * Using the env var ODBCHOME was a "real bad idea" for perl I have changed it to ODBCSYSINI * Alter logging so that if the log file fails to open stderr is not used. This caused problems in server processes. * Fix a problem with SQLDrivers * Fix a potential leak, that stopped SQLDisconnect being called * Fix problems with text driver * Improve isql (thanks Ralf) * Make gODBCConfig a proper gtk widget * Remove stray printf in the DM code * Fix a couple of daft bugs, thanks to Tim Roepken * Fix a problem where handles were not being free'd * Fix a problem that stopped StarOffice 5.2 working with a ODBC 2 driver, it failed to set SQLGetDiagRec in the output of SQLGetFunctions 2000-03-11 Nick Gorham * Adjust configure to check for limits, and use this to find max file path. It was only 14 char before under HP-UX * Make ODBCCOnfig try calling SQLConfigureDSN, for setup libs that can do it themself * Make the mutex functions static * Remove some unwanted X functions from the lib line * Remove dlfcn.h in ODBCConfig * Rationalise environment vars, ODBCHOME points to where odbc.ini and odbcinst.ini are. ODBCINI points to the user ini file (normally ~/.odbc.ini) * Fix bug causing all connection errors to be lost after connecting * Add GTK+ Based gODBCConfig 2000-03-01 Nick Gorham * Add extra defines to sqltypes.h * Fix bug in the Postgres driver with the use if the SQL_DATA_AT_EXEC value * Replace the ODBCINI with ODBCHOME environment var 2000-02-23 Nick Gorham * Remove the GLOBAL flag from the dlopen in the libtool lib. This caused problems with perl DBD::ODBC * Fix the support for threads and Solaris * Add odbcinst.ini flag to disable unloading the driver, this enables the IBM DB2 lib to be used Release 1.8.6 2000-02-21 Nick Gorham * Fix memory leak in the Postgres driver * Fix a bug in the DM when using threads and ODBC 3 drivers, SQLGetDiagField fails * Fix a situation where PHP can crash the DM by calling SQLFreeStmt after SQLDisconnect * Add support for Solaris Threada * Make building with thread support the default 2000-02-12 Nick Gorham * Add option to use ODBCINI to move the odbcinst and odbc ini file. This was asked for by applix * Add setup lib for Easysoft ODBC-ODBC bridge 2000-02-02 Nick Gorham * Add flag in odbcinst.ini to disable the SQLFetch -> SQLExtendedFetch mapping for broken drivers * Alter the ini file parsing so the right hand side can contain extra ='s * Fix a bug in SQLGetStmtAttr with a missing '&' * Added a couple of patches from Manush to improve working with the solid driver Release 1.8.4 2000-01-18 Nick Gorham * Fix bug in SQLAllocHandle where a failed stmt alloc would report a error on the statement not the connection and dump core * Make the default path when adding a driver in ODBCConfig $prefix\lib * Add the missing [unixODBC] prefix to error messages * Fix a problem in template/SQLDriverConnect found by Charles Overbeck * Update to libtool 1.3.4 * Fix problem in ODBCConfig where a cast to const char * was needed Release 1.8.3 1999-12-28 Nick Gorham * Fix a bug where a SQLDisconnect was not releasing the lib handle 1999-12-11 Nick Gorham * Merge in changes from the Postgres ODBC people to fix a problem with LONGBIN's * Mask out the password fields in log for SQLConnect and SQLDriverConnect * Change a incorrent HY004 error return to IM004 in SQLConnect Release 1.8.2 For AlphaLinux Distribution 1999-12-02 Nick Gorham * Fix some daft mistakes in odbcinst.c, and the template driver * Remove the C++ comments from the Postgres driver so it can be compiled with a C compiler * Add LIBSOCKET to the Postgres driver link line * Add strncasecmp to extras * Make the Postgres driver use the socket lib if needed 1999-11-23 Nick Gorham * Add support for encrypted passwords in the Postgre driber * Remove some remaining non-libtool dlopen code * Fix some threading problems 1999-11-19 Nick Gorham Release 1.8.1 ********** * Make the code more portable * Remove CR from Postgres source 1999-11-17 Nick Gorham * Fix a bug with the ODBC 3 error functions. * Fix a missing function_entry from SQLExecDirect(). Release 1.8 ************* 1999-11-13 Nick Gorham * Fix bug with logging that killed StarOffice * Upgrade the Postgres driver to 6.4.6, this fixes a problem with fields containing cr/lf combinations. * Change the logging so that the logging info comes from a special [ODBC] section in odbcinst.ini. This means that what goes on before the connect can be logged 1999-11-10 Nick Gorham * Make SQLError,SQLGetDiagField and SQLGetDiagRec usable with all versions of application and driver. * Add configure flag to specify where to look for the MiniSQL lib. * Add configure flag to disable the building of the drivers. 1999-11-02 Nick Gorham * Fix bug in the cursor lib introduced by the fix for the glibc bugs. * Fix bug where SQLSetConnectAttr/Option can return without clearing a connection thread lock. 1999-10-29 Nick Gorham * Make the postgres driver able to connect via UNIX domain sockets 1999-10-29 Holger Bischoff * Assorted stupid bugs fixed in the DM 1999-10-26 Nick Gorham * Started rewrite of the SQLError/SQLGetDiagSupport in the driver manager * Fix isql so that SQL_SUCCESS_WITH_INFO is a success for SQLConnect 1999-10-20 Greg Bentz * Added fix for SQLTransact, it was checking for a non null henv first, it now checks the hdbc first (Thanks Greg) * The connection_count in the environment handle was only incremented on the first connection, but decremented on all free dbc's, this caused the count to go negative at time. 1999-10-09 Nick Gorham * Added Manush's patch to map ODBC 3-2 datetime values 1999-10-05 Nick Gorham * working on getting the build to be more portable * added --enable-gui configure option to turn off all c++ and GUI bits * improved performance by removing logging core when logging is off * added extras dir to contain code for missing functions on certain platforms * first day out for the cursor lib, read only at the moment, a sample program is included in samples/cursor.c * fixed problem that if the user .odbc.ini was not found the code failed to go on to the system odbc.ini * fixed problem caused by some versions of dlsym reporting function that should be in the driver and returning the entry from the DM Release 1.7 ************* 1999-07-26 Nick Gorham * New config added, now using autoconf. * Thread safe support added. * Assorted Driver Manager bug fixes added. * default location for odbcinst.ini and odbc.ini is now /usr/local/etc to conform to GNU standards. 1999-05-15 Peter Harvey * Drivers: nn driver added 1999-05-10 Nick * DM: New Dm added. 1999-04-04 Martin Evans * Makefiles: Some changes to; a) use gcc, and b) build into other than /usr 1999-03-30 Peter Harvey * ChangeLog: Started ChangeLog unixODBC-2.2.14-p2/INSTALL0100644000076400007640000002025407624477624013253 0ustar nicknickPrerequisits ============ Before trying to compile unixODBC make sure you have installed the following software packages: o gnu make version 3.7 or newer (required) o C++ compiler and library (required): - egcs 1.x, or - g++ 2.8.x and libg++ 2.8.x (where x > 0), or - g++ 2.7.2.x and libg++ 2.7.2 The code will build with native unix compilers on platforms such as HPUX AIX and Solaris, but it may require extra tweaks to get working. If you want to install any of the GUI components, you must have also installed the Qt libraries from http://www.troll.no Version 3 or above is now required. Basic Installation ================== These are generic installation instructions. 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, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). 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 at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' 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. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Type `make install' to install the programs and any data files and documentation. 4. 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. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure 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 must use a version of `make' that supports the `VPATH' variable, such as 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 `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have 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. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' 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. 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'. Optional Features ================= 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. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM 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 host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. 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. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--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. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. unixODBC-2.2.14-p2/NEWS0100644000076400007640000000206510126542661012702 0ustar nicknickRelease History =============== NOTE: I have moved what was here into ChangeLog, it seemed to make more sense that way (NG). Release 2.2.10 29-Sep-2004 Release 2.2.9 24-Jan-2004 Release 2.2.8 17-Feb-2004 Release 2.2.7 02-Dec-2003 Release 2.2.6 21-July-2003 Release 2.2.5 26-Feb-2003 Release 2.2.4 24-January-2003 Release 2.2.3 23-August-2002 Release 2.2.2 8-July-2002 Release 2.2.1 23-Mar-2002 Release 2.2.0 30-Jan-2002 Release 2.1.1 2001-12-21 Release 2.1.0 2001-11-27 Release 2.0.10 2001-10-14 Release 2.0.9 2001-08-14 Release 2.0.8 2001-06-25 Release 2.0.7 2001-06-06 Release 2.0.6 2001-04-18 Release 2.0.5 2001-03-21 Release 2.0.4 2001-02-02 Release 2.0.3 2001-01-13 Release 2.0.2 2001-01-08 Release 2.0.1 2001-01-06 Release 2.0.0 2001-01-04 Release 1.8.13 2000-11-14 Release 1.8.12 2000-08-18 Release 1.8.11 2000-08-16 Release 1.8.10 2000-06-15 Release 1.8.9 2000-06-13 Release 1.8.8 2000-05-03 Release 1.8.6 2000-02-21 Release 1.8.4 2000-02-12 Release 1.8.3 1999-12-28 Release 1.8.2 1999-12-11 Release 1.8.1 1999-11-17 Release 1.8 1999-11-13 Release 1.7 1999-07-26 unixODBC-2.2.14-p2/config.guess0100755000076400007640000012475310307012272014523 0ustar nicknick#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-08-03' # 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. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted 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. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. 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 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 -q "$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 ;; *) 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 __ELF__ >/dev/null 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 ;; macppc:MirBSD:*:*) echo powerppc-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 ;; 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:SunOS:5.*:*) echo i386-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:*:[45]) 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 __LP64__ >/dev/null 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:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*: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 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-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 ;; arm*: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 ;; 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:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #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; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #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 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu 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 ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 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 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-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 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*) 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 i386. echo i386-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; } ;; 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.0*:*) 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 ;; 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 ;; 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 *86) UNAME_PROCESSOR=i686 ;; 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 ;; 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: unixODBC-2.2.14-p2/config.sub0100644000076400007640000007577710307012272014176 0ustar nicknick#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-07-08' # 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 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. # 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 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-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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) os= basic_machine=$1 ;; -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 ;; -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/'` ;; -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 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ms1 \ | msp430 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m32c) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # 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-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | ms1-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; m32c-*) ;; # 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 ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; 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 ;; cr16c) basic_machine=cr16c-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 ;; 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 ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; 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 ;; 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 ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; 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 ;; 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 ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; 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 ;; 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 ;; 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[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) 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. -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* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -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* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -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*) # 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 ;; -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 *-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 ;; 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 ;; -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: unixODBC-2.2.14-p2/depcomp0100755000076400007640000002752507367074035013600 0ustar nicknick#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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 . 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 # `libtool' can also be set to `yes' or `no'. depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} 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 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. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" 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. 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. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$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" ;; tru64) # The Tru64 AIX 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. tmpdepfile1="$object.d" tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'` if test "$libtool" = yes; then "$@" -Wc,-MD else "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab 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 proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. test -z "$dashmflag" && dashmflag=-M ( IFS=" " case " $* " in *" --mode=compile "*) # this is libtool, let us make it quiet for arg do # cycle over the arguments case "$arg" in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi 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) # X makedepend ( shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift;; -*) ;; *) set fnord "$@" "$arg"; shift;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tail +3 "$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 proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi 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 proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 unixODBC-2.2.14-p2/install-sh0100755000076400007640000001273607363332141014214 0ustar nicknick#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # 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 $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 unixODBC-2.2.14-p2/ltmain.sh0100644000076400007640000055461010307012272014022 0ustar nicknick# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 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. basename="s,^.*/,,g" # 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: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.20 TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)" # 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 # 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 <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" ##################################### # Shell function definitions: # This seems to be the best place for them # 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 () { 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 -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi 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_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 () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" 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. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" 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 $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run 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 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi 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 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xdir="$my_gentop/$my_xlib" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" status=$? if test "$status" -ne 0 && test ! -d "$my_xdir"; then exit $status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do 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 have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` 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}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $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" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2005 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # 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 $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) 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" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 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 $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "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." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </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." $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 $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </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." $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 $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_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 case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$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" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$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 (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi 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. libobjs="$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 non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; 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 ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= 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 compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -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 $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch) prev=darwin_framework compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" 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*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit $EXIT_FAILURE fi 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*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-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 -framework System" 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 ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -module) module=yes continue ;; # -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* pass through architecture-specific compiler args for GCC -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 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*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # 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 ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi 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. libobjs="$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 non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_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. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` 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\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; 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 test "X$duplicate_deps" = "Xyes" ; 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 test "X$duplicate_compiler_generated_deps" = "Xyes" ; 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 link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; 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 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 "$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) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; 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 (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac 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 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." 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 -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; 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 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # 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) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 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 used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi 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 $echo "$modename: cannot find the library \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # 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 case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac 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 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE 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" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi 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 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE 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 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # 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 $echo "$modename: warning: library \`$lib' was moved." 1>&2 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 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE 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" # 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*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test 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 test "X$duplicate_deps" = "Xyes" ; 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 -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 *" $dir "*) ;; *" $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 if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if 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 realname="$2" shift; 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*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" 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* ) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; 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 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; 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 $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE 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; 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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` 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 test "X$duplicate_deps" = "Xyes" ; 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) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared 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 "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs 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" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # 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*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" 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 if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # 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="$2" number_minor="$3" number_revision="$4" # # 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) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; 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]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; 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]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; 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]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE 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 major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` 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 iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` 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 iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; 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 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi 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) ;; $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 if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi 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 "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`$echo "$dependency_libs " | ${SED} -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*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-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. test "X$arg" = "X-lc" && continue ;; *) # 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. $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} 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 else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then 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 \"$potent_lib\" 2>/dev/null \ | ${SED} 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 else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi 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" | ${SED} -e "1s,^X,," -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 is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; 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 # 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 realname="$2" shift; 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" 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` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "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"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$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"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" 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 $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:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # 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= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$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\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 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 ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "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" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" 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\" 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 # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(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 $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 $show "${rm}r $gentop" $run ${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 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run 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 "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $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 wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" 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" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${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" # $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" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi 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 / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac 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*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; 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 dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$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 arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # 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/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= 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*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; 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 if test "$need_relink" = no || test "$build_libtool_libs" != yes; 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. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" 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. $run $rm $output # Link the executable and exit $show "$link_command" $run 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" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 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. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "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}\" || 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 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; 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 our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) cwrappersource=`$echo ${objdir}/lt-${outputname}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #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 DIR_SEPARATOR #define DIR_SEPARATOR '/' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) #define HAVE_DOS_BASED_FILE_SYSTEM #ifndef DIR_SEPARATOR_2 #define DIR_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 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" return 127; } 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 ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } 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); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # 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' # 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 variable: 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 >> $output "\ # 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 # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ 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 >> $output "\ # 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 $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ 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 >> $output "\ # 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 >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ 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*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE 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 $EXIT_FAILURE fi fi\ " chmod +x $output fi 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" 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" 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 # 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 $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$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 $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_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 for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$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= 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 save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "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}\" || 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 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; 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. if test -z "$run"; then 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) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" 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) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # 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' # Libraries that this one depends upon. dependency_libs='$dependency_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 fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # 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. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # 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. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; 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. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # 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 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "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. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run 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 if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run 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 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run 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 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 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 file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo 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. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo 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. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" save_umask=`umask` umask 0077 if $mkdir "$tmpdir"; then umask $save_umask else umask $save_umask $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 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) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" 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. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "----------------------------------------------------------------------" $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" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # 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 ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" 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 if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 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 (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $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" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $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) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # 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 $show "$rm $rmfiles" $run $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 $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [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 --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information 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 \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [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: $modename [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 -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always 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: $modename [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: $modename [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: $modename [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 rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [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 -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] 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: $modename [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." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # 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: unixODBC-2.2.14-p2/missing0100755000076400007640000002403607562237141013610 0ustar nicknick#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 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, 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # 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 case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -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' 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]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` 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' is missing on your system. 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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # 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 you do not seem to have it handy on your system. 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 prerequirements 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 unixODBC-2.2.14-p2/mkinstalldirs0100755000076400007640000000133507366561106015017 0ustar nicknick#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.2 2001/10/27 16:35:18 peteralexharvey Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here unixODBC-2.2.14-p2/unixODBC.spec0100644000076400007640000000662711057452656014512 0ustar nicknick%define name unixODBC %define ver 2.2.13 %define prefix /usr %define sysconfdir /etc Summary: ODBC driver manager and drivers for PostgreSQL, MySQL, etc. Name: %{name} Version: %ver Release: 1 License: LGPL and GPL Group: Applications/Databases Source: %{name}-%{ver}.tar.gz BuildRoot: /var/tmp/%{name}-%{ver}-root URL: http://www.unixodbc.org/ Docdir: %{prefix}/doc Prefix: %prefix %description unixODBC aims to provide a complete ODBC solution for the Linux platform. All programs are GPL. All libs are LGPL (except nn which is GPL?). %package devel Summary: Includes and static libraries for ODBC development Group: Development/Libraries Requires: %{name} = %{ver} %description devel unixODBC aims to provide a complete ODBC solution for the Linux platform. All programs are GPL. All libs are LGPL (except nn which is GPL?). This package contains the include files and static libraries for development. %package gui-qt Summary: ODBC configurator, Data Source browser and ODBC test tool based on Qt Group: Applications/Databases Requires: %{name} = %{ver} %description gui-qt unixODBC aims to provide a complete ODBC solution for the Linux platform. All programs are GPL. All libs are LGPL (except nn which is GPL?). This package contains two Qt based GUI programs for unixODBC: ODBCConfig and DataManager %prep %setup %ifarch alpha ARCH_FLAGS="--host=alpha-redhat-linux" %endif export -n LANG LINGUAS LC_ALL if [ ! -f configure ]; then CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir} else CFLAGS="$RPM_OPT_FLAGS" ./configure $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir} fi %build export -n LANG LINGUAS LC_ALL if [ "$SMP" != "" ]; then (make "MAKE=make -k -j $SMP"; exit 0) make else make fi %install [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT make prefix=$RPM_BUILD_ROOT%{prefix} sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} install-strip %clean [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT %pre if [ -f %{sysconfdir}/odbc.ini ]; then mv -f %{sysconfdir}/odbc.ini %{sysconfdir}/odbc.ini.rpmsave fi if [ -f %{sysconfdir}/odbcinst.ini ]; then mv -f %{sysconfdir}/odbcinst.ini %{sysconfdir}/odbcinst.ini.rpmsave fi %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-, root, root) %doc AUTHORS COPYING ChangeLog NEWS README README.GTK doc %{sysconfdir}/odbc.ini %{sysconfdir}/odbcinst.ini %{prefix}/bin/dltest %{prefix}/bin/isql %{prefix}/bin/iusql %{prefix}/bin/odbcinst %{prefix}/bin/odbc_config %{prefix}/lib/libesoobS.so* %{prefix}/lib/libsapdbS.so* %{prefix}/lib/libnn.so* %{prefix}/lib/libodbc.so* %{prefix}/lib/libodbccr.so* %{prefix}/lib/libodbcdrvcfg1S.so* %{prefix}/lib/libodbcdrvcfg2S.so* %{prefix}/lib/libodbcinst.so* %{prefix}/lib/libodbcminiS.so* %{prefix}/lib/libodbcmyS.so* %{prefix}/lib/libodbcnnS.so* %{prefix}/lib/libodbcpsql.so* %{prefix}/lib/libodbcpsqlS.so* %{prefix}/lib/libodbctxt.so* %{prefix}/lib/libodbctxtS.so* %{prefix}/lib/liboplodbcS.so* %{prefix}/lib/liboraodbcS.so* %{prefix}/lib/libtdsS.so* %{prefix}/lib/libtemplate.so* %{prefix}/lib/libboundparam.so* %{prefix}/lib/libgtrtst.so* %{prefix}/lib/libmimerS.so* %files devel %defattr(-, root, root) %{prefix}/include/* %{prefix}/lib/*.la %files gui-qt %defattr(-, root, root) %{prefix}/bin/DataManager %{prefix}/bin/DataManagerII %{prefix}/bin/ODBCConfig %{prefix}/bin/odbctest %{prefix}/lib/libodbcinstQ.so* unixODBC-2.2.14-p2/unixODBC-sr.spec0100644000076400007640000003202510532570541015112 0ustar nicknick# # spec file for the unixODBC package # Name: unixODBC Version: 2.2.1pre Release: 1sr Summary: ODBC Driver Manager License: LGPL URL: http://www.%{name}.org/ %define vpkg odbc %{!?_sysconfdir: %define _sysconfdir /etc} # default location for drivers is libdir %{!?drvlibdir: %define drvlibdir %{_libdir}} %define configure_options --enable-shared --enable-static # defaults below can be overridden during build # e.g. rpmbuild --define 'build_gui_gtk 1' %{!?build_drivers: %define build_drivers 1} %{!?build_gui_qt: %define build_gui_qt 1} %{!?build_gui_gtk: %define build_gui_gtk 0} # define macros if they are not defined %{!?__ldconfig:%define __ldconfig /sbin/ldconfig} %{!?_pkglibdir:%define _pkglibdir %{_libdir}/%{name}} %{!?__libtool:%define __libtool /usr/bin/libtool} %{!?__cut:%define __cut /usr/bin/cut} %{!?__cat:%define __cat /bin/cat} # --- Multi-Vendor specifics --- %if "%{_vendor}" == "suse" %define group Productivity/Databases/Tools %define group_devel Development/Libraries/C and C++ %define conflicts libiodbc-devel # special _sysconfdir defined on SuSE for co-existence with iODBC (includes conflict remains) %define _sysconfdir /etc/%{name} # SuSE puts driver and setup libraries into pkglibdir (usually /usr/lib/unixODBC) %define drvlibdir %{_pkglibdir} %elseif "%{_vendor}" == "redhat" %define group System Environment/Libraries %define group_devel Development/Libraries %endif Group: %{?group}%{!?group:Applications/Databases} Provides: %{vpkg}, %{name} # conflicts with iODBC (same includes and sysconfdir not compatible) Conflicts: %{?conflicts}%{!?conflicts:iodbc} Source: %{?url}%{name}-%{version}.tar.gz #Patch: %{name}-xxxx.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot # do not change prefix below but use "rpm -i --prefix=" to relocate Prefix: %{_prefix} %description unixODBC is an Open Source ODBC sub-system and ODBC SDK for UNIX Install unixODBC if you want to access databases through ODBC. Drivers bundled with %{name} can be found in the %{name}-drivers packages. Links to further drivers can be found under %{url}drivers.html If you want to develop programs that will access data through ODBC, you need to install the %{name}-devel package. The unixODBC Project goals are to develop and promote unixODBC to be the definitive standard for ODBC on non MS Windows platforms. This is to include GUI support for both KDE and GNOME. This package was built for the %{_target_platform} platform. If you want to run it on a different architecture and platform, it is recommended that you rebuild it using the Source RPM. # --- Sub-Packages --- %package devel Summary: Includes and static libraries for ODBC development Group: %{?group_devel}%{!?group_devel:Development/Libraries} Requires: %{name} = %{version} Provides: %{name}-devel, %{vpkg}-devel %description devel This package contains the include files and static libraries for ODBC development. %if %{build_gui_qt} %package gui-qt Summary: ODBC configurator, Data Source browser and ODBC test tool based on Qt Group: %{?group_gui}%{!?group_gui:Applications/Databases} #BuildPrereq: qt[23]-devel Requires: %{name} = %{version} #Requires: %{name} = %{version}, qt[23] Provides: %{name}-gui, %{vpkg}-gui %description gui-qt This package contains Qt based GUI programs for unixODBC: - ODBCConfig graphical user interface for configuring the ODBC framework - DataManager graphical user interface for browsing databases DataManagerII (next generation) - odbctest graphical user interface for testing ODBC drivers (developer) %endif # build_gui_qt %if %{build_gui_gtk} %package gui-gtk Summary: ODBC configurator based on GTK+ and GTK+ widget for gnome-db Group: %{?group_gui}%{!?group_gui:Applications/Databases} #BuildPrereq: gnome-libs-devel, gtk-devel Requires: %{name} = %{version} #Requires: %{name} = %{version}, gnome-libs, gtk Provides: %{name}-gui, %{vpkg}-gui %description gui-gtk This package contains one GTK+ based GUI program for unixODBC: - gODBCConfig: a graphical user interface for configuring DSNs %endif # build_gui_gtk %if %{build_drivers} %package drivers Summary: Database Drivers and Setup libraries for unixODBC Group: %{?group}%{!?group:Applications/Databases} Requires: %{name} = %{version} Provides: %{name}-drivers, %{vpkg}-drivers %description drivers This package contains unixODBC drivers and setup libraries for various database systems %package drivers-devel Summary: Static library versions of Drivers and Setup libraries for unixODBC Group: %{?group}%{!?group:Applications/Databases} Requires: %{name}-devel = %{version} Provides: %{name}-drivers-devel, %{vpkg}-drivers-devel %description drivers This package contains unixODBC drivers and setup libraries for various database systems %description drivers-devel This package contains static versions of unixODBC drivers and setup libraries %endif # build_drivers %prep # --- prep scriptlet --- %if %{build_gui_qt} # for building the Qt GUI the QTDIR variable has to be set if test -z "$QTDIR"; then %{__cat} <<'!' ERROR - environment variable QTDIR is not set! In order to build the Qt GUI for %{name} this variable needs to point to the root of the Qt installation (e.g. /usr/lib/qt3) If you do not intend to build the gui-qt subpackage, you just need to call rpmbuild with: --define 'build_gui_qt 0' Build aborted. ! exit 1 fi %endif # build_gui_qt # unpack original sources %setup # and apply patch(es) if any #%patch %if "%{_vendor}" == "suse" # SuSE puts the drivers in pkglibdir (needs a Makefile.in editing) %{__perl} -pi.orig -e 's/\$\(DESTDIR\)\$\(libdir\)/\$\(DESTDIR\)\$\(pkglibdir\)/' \ Drivers/*/Makefile.in DRVConfig/*/Makefile.in %endif %if %{build_gui_gtk} # fix depcomp in GTK GUI (libtool needs it for relinking) ( cd gODBCConfig; if test ! -f ./depcomp; then ln -s ../depcomp .; fi ) %endif # --- end of prep scriptlet --- %build # --- build scriptlet --- # configure autoconf package %configure \ %if %{build_drivers} --enable-drivers \ %else --disable-drivers \ %endif %if %{build_gui_qt}%{build_gui_gtk} --enable-gui \ %else --disable-gui \ %endif %if %{build_gui_qt} --with-qt-dir="${QTDIR}" \ %endif %{?configure_options} # and compile it %{__make} all # fix relink statement in .la files created by buggy bundled libtool # prepend temporary install lib path to aid in relinking for la in `%{__grep} '^relink_command=' */*.la | %{__cut} -d: -f1`; do %{__sed} "s,^\(relink_command=.*\.lo \),\1-L${RPM_BUILD_ROOT}%{_libdir} ," $la >$la.fixed %{__mv} $la.fixed $la done # above fix can be removed once unixODBC bundles # ltmain.sh with an appropriate relink patch (>=1.5.x) # --- end of build scriptlet --- %install # --- install scriptlet --- # remove old build root directory %{__rm} -rf $RPM_BUILD_ROOT # install into fresh build root %makeinstall %if %{build_gui_gtk} # GTK GUI must be configured and built after installing the main unixODBC parts cd gODBCConfig %configure --enable-shared --with-odbc=${RPM_BUILD_ROOT}%{_prefix} # does not like makeinstall - do manually %{__make} DESTDIR=${RPM_BUILD_ROOT} install cd .. %endif # build_gui_gtk # remove empty configuration files from buildroot # (they will be created on-the-fly by the post scriptlet) %{__rm} -f ${RPM_BUILD_ROOT}%{_sysconfdir}/odbcinst.ini %{__rm} -f ${RPM_BUILD_ROOT}%{_sysconfdir}/odbc.ini %if "%{_vendor}" == "suse" # rename odbctest to ODBCTest in SuSE to avoid clash with iODBC mv ${RPM_BUILD_ROOT}%{_bindir}/odbctest ${RPM_BUILD_ROOT}%{_bindir}/ODBCTest %endif # --- end of install scriptlet --- %clean # --- clean scriptlet --- # remove build root directory %{__rm} -rf $RPM_BUILD_ROOT # --- end of clean scriptlet --- %files # --- files section --- %defattr(-, root, root) %doc AUTHORS COPYING ChangeLog NEWS README README.* doc %dir %{_sysconfdir}/ODBCDataSources # system config files not included - created on the fly by post #config %{_sysconfdir}/odbcinst.ini #config %{_sysconfdir}/odbc.ini %{_bindir}/isql %{_bindir}/dltest %{_bindir}/odbcinst %{_bindir}/iusql %{_bindir}/odbc_config %{_libdir}/libodbc.so* # driver manager configuration %{_libdir}/libodbcinst.so* # generic cursors library %{_libdir}/libodbccr.so* # testing %{_libdir}/libgtrtst.so* %{_libdir}/libboundparam.so* %files devel %defattr(-, root, root) %{_includedir}/*.h %{_libdir}/*.a %{_libdir}/*.la %if %{build_gui_qt} %files gui-qt %defattr(-, root, root) %{_bindir}/ODBCConfig %{_bindir}/DataManager %{_bindir}/DataManagerII %if "%{_vendor}" == "suse" %{_bindir}/ODBCTest %else %{_bindir}/odbctest %endif %{_libdir}/libodbcinstQ.so* %endif %if %{build_gui_gtk} %defattr(-, root, root) %files gui-gtk %{_bindir}/gODBCConfig %{_libdir}/libgtkodbcconfig.so* %endif %if %{build_drivers} %files drivers %defattr(-, root, root) %{drvlibdir}/libesoobS.so* %{drvlibdir}/libmimerS.so.* %{drvlibdir}/libnn.so* %{drvlibdir}/libodbcdrvcfg1S.so* %{drvlibdir}/libodbcdrvcfg2S.so* %{drvlibdir}/libodbcminiS.so* %{drvlibdir}/libodbcmyS.so* %{drvlibdir}/libodbcnnS.so* %{drvlibdir}/libodbcpsql.so* %{drvlibdir}/libodbcpsqlS.so* %{drvlibdir}/libodbctxt.so* %{drvlibdir}/libodbctxtS.so* %{drvlibdir}/liboplodbcS.so* %{drvlibdir}/liboraodbcS.so* %{drvlibdir}/libsapdbS.so* %{drvlibdir}/libtdsS.so* %{drvlibdir}/libtemplate.so.* %files drivers-devel %defattr(-, root, root) %{drvlibdir}/libesoobS.*a %{drvlibdir}/libmimerS.*a %{drvlibdir}/libnn.*a %{drvlibdir}/libodbcdrvcfg1S.*a %{drvlibdir}/libodbcdrvcfg2S.*a %{drvlibdir}/libodbcminiS.*a %{drvlibdir}/libodbcmyS.*a %{drvlibdir}/libodbcnnS.*a %{drvlibdir}/libodbcpsql.*a %{drvlibdir}/libodbcpsqlS.*a %{drvlibdir}/libodbctxt.*a %{drvlibdir}/libodbctxtS.*a %{drvlibdir}/liboplodbcS.*a %{drvlibdir}/liboraodbcS.*a %{drvlibdir}/libsapdbS.*a %{drvlibdir}/libtdsS.*a %{drvlibdir}/libtemplate.*a %endif # build_drivers # --- Pre/Post/Un/Install/Verify scripts --- %post %{__ldconfig} if test "$1" = 1 ; then # first instance of the package # find configuration utility odbcinst=odbcinst # last resort - rely on path for dir in ${RPM_INSTALL_PREFIX}/bin %{_bindir}; do test -x $dir/$odbcinst || continue # not here odbcinst=$dir/$odbcinst # found break # out of loop done # create/remove default entries in configuration files # if they do not exist (creates config files): # driver configuration file odbcinst.ini $odbcinst -q -d -n 'ODBC' 1>&- 2>&- # exists ? if test $? -gt 0 ; then # no, create echo '[ODBC]' | $odbcinst -i -d -r 1>&- 2>&- # install $odbcinst -u -d -n 'ODBC' 1>&- 2>&- # remove fi # system data source configuration file odbc.ini $odbcinst -q -s -l -n 'DEFAULT' 1>&- 2>&- # exists ? if test $? -gt 0 ; then # no, create echo '[DEFAULT]' | $odbcinst -i -s -l -r 1>&- 2>&- # install $odbcinst -u -s -l -n 'DEFAULT' 1>&- 2>&- # remove fi fi %preun # configuration files in %{_sysconfdir} stay in place (even if empty) # they might be needed by another driver manager %postun -p %{__ldconfig} %changelog * Wed Sep 08 2004 Nick Gorham 2.2.10-1sr - Update version number * Tue Jul 27 2004 Stefan Radman 2.2.9-2sr - do not build gui-gtk package by default (tendency to fail) - support override of build options (drivers,gui_qt,gui_gtk) - removed some vendor/version specific hacks, some cosmetics ;-) * Tue Jun 29 2004 Nick Gorham 2.2.10 Moved to new version and added to main CVS * Fri Apr 25 2004 Stefan Radman 2.2.9-1 - updated to 2.2.9 - removed obsolete readlines patch - added odbc_config * Thu Apr 08 2004 Stefan Radman 2.2.8-1 - updated to 2.2.8 - enabled drivers, enabled threads - fixed relinking problem by inserting temporary install lib path into relink_command of .la files on the fly. now builds standalone - added drivers and drivers-devel packages - move drivers into lib/unixODBC on SuSE - added -readlines patch - with-qt-dir is not enough, added QTDIR environment variable and a warning if its not set and gui-qt building is requested - made subpackages configurable - added Mimer to files * Thu Jan 15 2004 Stefan Radman 2.2.7-2 - fixed incomplete driver property parsing in libodbcinst (patch) - added drivers again as separate package * Wed Dec 2 2003 Stefan Radman 2.2.7-1 - upgraded to 2.2.7 * Wed Nov 5 2003 Stefan Radman 2.2.6-3 - renamed for first internal release - changed pre: cannot use rpm to determine path of odbcinst - creates driver subpackage (setup library needed for Oracle) - disabled drivers, disabled threads * Wed Jul 23 2003 Stefan Radman 2.2.6-1 - initial version derived from several spec files and HOWTOs - credits: unixODBC, RedHat, SuSE, Edas - News Server driver not integrated to keep license GPL - install DM libs in %{_libdir} but drivers in %{_libdir}/%{name} - need nicer options to enable/disable building of gui and driver packages - dont install odbc*.ini, will be created by post scriptlet - sysconfdir is /etc and /etc/unixODBC in SuSE - added --with-qt-dir to compile with qt3 specifically - added Requires and BuildPrereq to gui-qt package - added fix for relinking during install (prepend temporary install lib path) unixODBC-2.2.14-p2/README.OSX0100644000076400007640000000663711011031776013536 0ustar nicknick+-------------------------------------------------------------+ | unixODBC | | Mac OSX | +-------------------------------------------------------------+ README --------------------------------------------------------------- It seems at least with 10.5 of OSX, that we can just configure as normal (--enable-gui=no) and build, no special instructions are needed. --------------------------------------------------------------- Building With GNU Auto Tools (by Nick): It looks as if Darwin (Mac OSX) doesn't support the normal dlopen type process that unixODBC requires. However help is at hand in the form of dlcompat-20010831.tar.gz. This file contains wrappers to emulate the calls. I have put this in ftp://ftp.easysoft.com/pub/beta/unixODBC/dlcompat-20010831.tar.gz It should be downloaded, unpacked then run make install This should be done before configuring unixODBC This file was created by Christoph Pfisterer and the original copy can be found at http://fink.sourceforge.net If you get a "ld: multiple definitions of symbol " error, then you should edit the file libtool in the unixODBC base directory and find the line whole_archive_flag_spec="-all_load \$convenience" and replace it with whole_archive_flag_spec= As at the time of writing, Qt is not available on OSX, its best to disable the search for X libs that may fail, by configuring with ./configure --enable-gui=no Building With Qt qmake (by Peter): Qt is now availible for OSX but unixODBC may not detect your Qt libs... worse yet you may not be able sort out the GNU auto-tools required to build on OSX. If you want to build using qmake then read README.qmake. Creating Install Packages: unixODBC contains a number of directories and files to help create OSX Packages. The process of doing so is not nearly as automated as creating RPM files using the GNU auto tools. Look for the mac-install and mac-package directories. Cursor LIB The cursor lilb needs a manual stage build to create it as a OSX bundle it needs to be like that so the DM can load it at run time. To do this, after the "make" and "make install" have finished, go to the cur directory in the build tree. Then there issue these commands cc -bundle -flat_namespace -undefined suppress -o libodbccr.1.0.0.so *.lo cp libodbccr.1.0.0.so /usr/local/lib/libodbccr.1 Replace /usr/local/lib/ in the above with whatever your actual unixODBC lib path is. You may also have to do the same with any driver you build. You can check this by testing the type of the lib, for example. file /usr/local/lib/libodbcpsql.2.0.0.so /usr/local/lib/libodbcpsql.2.0.0.so: Mach-O dynamically linked shared library ppc This is not the correct type. So to get it as you need :- cd Drivers/Postgre7.1 cc -bundle -flat_namespace -undefined suppress -o libodbcpsql.2.0.0.so *.lo cp libodbcpsql.2.0.0.so /usr/local/lib/libodbcpsql.2.0.0.so Now to check file /usr/local/lib/libodbcpsql.2.0.0.so /usr/local/lib/libodbcpsql.2.0.0.so: Mach-O bundle ppc Thats how it should be to work under the driver manager +-------------------------------------------------------------+ | Peter Harvey | | Added to by Nick Gorham | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/README.VMS0100644000076400007640000001215710572763643013544 0ustar nicknickBuilding unixODBC on OpenVMS (Alpha only) ========================================= Here's an initial go at building unixODBC on OpenVMS, at present this will only run on alpha but if anyone requires use of this on VAX drop me an email (suypport@easysoft.com) and I'll do the necessary transfer vector macro's to export the required symbols from the two shared objects (ODBC.EXE and ODBCINST.EXE). Current components which have been built on OpenVMS LIBODBC.OLB Driver manager as an OpenVMS static object library LIBODBCINST.OLB ODBC installer / setup static object library LIBODBCPSQL.OLB Postgres 6.5 driver static object library LIBODBC.EXE Driver manager shareable image LIBODBCINST.EXE ODBC installer / setup shareable image LIBODBCPSQL.EXE Postgres 6.5 driver shareable image ISQL.EXE Command line SQL tool DLTEST.EXE Program to test loading shared libraries Additional components included to perform building on OpenVMS VMSBUILD.COM - DCL script which compiles, links and installs unixODBC [.EXTRAS]VMS.C - Contains OpenVMS specific wrappers (dlopen, etc..) [.VMS]INSTALL_IMAGE.COM - DCL script to install shareable images [.VMS]ODBCINST_AXP.OPT - Linker options file for ODBC installer shared image [.VMS]ODBC_AXP.OPT - Linker options file for Driver manager shared image [.VMS]ODBC2_AXP.OPT - Linker options file for ODBC 2 drivers [.VMS]ODBC_SETUP.COM - DCL script to set up logicals and commands Building unixODBC on OpenVMS ============================ After unpacking the archive, change into the unixodbc directory and perform the following functions. COMPILING $ @vmsbuild COMPILE LINKING $ @vmsbuild LINK COPYING SHARED LIBRARIES TO THEIR INSTALLED LOCATION Define the logical name ODBC_LIBDIR to point to wherever you would like the libraries to reside and run the build procedure again with the "install" option as in the following example: $ define ODBC_LIBDIR DISK$DBSTUFF:[ODBCLIB] ! will be created if it doesn't exist $ @vmsbuild install If the ODBC_LIBDIR logical is not defined, it will be defined for you and a [.odbclib] directory will be created under the top level of the source directory. Note that the build procedure can be run in batch if you prefer. It is also possible to specify ALL as the parameter and do the compile, link, and install in one fell swoop. For example: $ submit/noprint/param=all vmsbuild.com Post-installation tasks ====================================== To use the installed software, you need to run the command procedure ODBC_SETUP.COM, which will have been installed in the same directory as the libraries. This procedure defines the ODBC_LIBDIR logical name and additional logical names that are needed for the image activator to locate the libraries. It also defines the ISQL command. Put a line similar to the following (with your own disk and directory specification) in your LOGIN.COM, or (to make the software available system-wide) in SYS$MANAGER:SYLOGIN.COM: $ @disk$dbstuff:[odbclib]odbc_setup N.B. It may be tempting to simply dump the libraries into SYS$SHARE and depend on the image activator's default behavior to locate the images. That works, but it's the surest way to what is known on another popular platform as DLL hell. If you'll be programming with ODBC rather than just using ISQL, be sure to hang on to the contents of the [.include] and [.doc] directories. Look at the compiler flags and link commands in vmsbuild.com for examples of what you need to do to build programs using the libraries. For performance reasons it may be desireable to install the libraries as known images (which has nothing to do with "install" in the sense of copying software to its target location). See the documentation to the INSTALL command or use the command procedure [.vms]install_image.com provided with this kit. Installing the images with privileges is not recommended unless there is a compelling reason (Hint: failure to set up file permissions properly on your .ini files is not a compelling reason). Locations of ODBC.INI and ODBCINST.INI ====================================== After running the @VMSBUILD INSTALL command a blank odbc.ini and odbcinst.ini will be created in ODBC_LIBDIR. To override the default locations of the user odbc.ini or the directory where the system odbc.ini and odbcinst.ini reside define the following logicals. $ define/log ODBCINI "DKA100:[MYDIR.ODBC]ODBC.INI" $ define/log ODBCSYSINI "DKA100:[MYDIR.SYS]" Example Setup With Postgres 6.5 =============================== ODBC_LIBDIR:ODBCINST.INI [PostgreSQL] Description = Postgres SQL Driver Driver = LIBODBCPSQL Setup = FileUsage = 1 ODBC_LIBDIR:ODBC.INI [Postgres] Description = Test to Postgres Driver = PostgreSQL Trace = No Database = sample Servername = myserver.mydomain.com UserName = postgres Password = password Port = 5432 Protocol = 6.4 ReadOnly = No RowVersioning = No ShowSystemTables = No ShowOidColumn = No FakeOidIndex = No ConnSettings = Jason last updated 7-NOV-2002 by Craig A. Berry -- craigberry@mac.com unixODBC-2.2.14-p2/README.QNX0100644000076400007640000000223507573371750013542 0ustar nicknickBuilding unixODBC on QNX ======================== This has been tested on the QNX 6.1 x86 release. 1. unpack the distribution, and cd into the distribution dir 2. Add any missing files automake --add-missing 3. Configure unixODBC ./configure --sysconfdir=/etc --enable-gui=no --prefix=/opt 4. run libtooloze using the QNX version of libtool, then update aclocal.m4 libtoolize --force aclocal 5. We now need to alter the flags dlopen uses cd libltdl sed "s/RTLD_GLOBAL/RTLD_GROUP/" ltdl.c > ltdl.c.new sed "s/RTLD_LAZY/RTLD_NOW/" ltdl.c.new > ltdl.c cd .. 6. Force a reconfigure rm config.cache 7. Make, then install make make install And with luck and a trailing wind, that should be that. EXTRA STUFF for QNX 6.2, if the wind is head on... If you find that it segfaults, its worth going into the libltdl directory, editing the Makefile, and changing the line CFLAGS = -g -O2 to CFLAGS = -g -O2 -DPIC -fPIC then touch ltdl.c to force a rebuild You may also get a error when building in the exe directory, to fix this, go to the exe directory, edit Makefile, and change OBJEXT = @OBJEXT@ to OBJEXT = o And EXEEXT = @EXEEXT@ to EXEEXT = unixODBC-2.2.14-p2/README.CYGWIN0100644000076400007640000000104111023260261014041 0ustar nicknickTo build unixODBC on cygwin, all you need to do is to rerun the autoconf tools to create versions that seem to play on windows, then build as normal. Of course to do this you need to have installed the Cygwin development packages. So: aclocal automake --add-missing automake autoconf libtoolize --copy --ltdl --force Then you can run configure as normal ./configure --enable-gui=no make make install At least that seems to work when I tried it... If you find problems just let me know. -- Nick Gorham (nick.gorham@easysoft.com) unixODBC-2.2.14-p2/README.AIX0100644000076400007640000000520010437351746013504 0ustar nicknickBuilding on AIX =============== Install ======= AIX seems to ship with a install tool /usr/bin/bsdinstall, unfortunatly the version of autoconf that unixODBC uses doesn't seem to like this, so make sure it doesn't find this. It may be best to define INSTALL as a empty string before building, forcing it to use the builtin install-sh. Threads ======= You need to decide to build with or without threads, if you want threads I would do this export CC=xlc_r export CXX=xlC_r ./configure If you don't want threads, do this export CC=xlc export CXX=xlC ./configure --enable-threads=no Shared Libs =========== Because of the way that AIX builds its shared libs there are a couple of points to remember 1. All drivers need changing into .so The drivers will be build as a .a, containing a .so, BUT dlopen only is able to open a .so, so to fix this, for each driver that is needed, do the following (in this case the postgres driver). Go to the target lib directory cd /usr/local/lib extract the .so from the .a ar -x libodbcpsql.a This will create libodbcpsql.so.2 The same will need doing for the seyup libs ar -x libodbcpsqlS.a 2. Shared libs containing C++ are special This is only a issue with the libodbcinstQ.a lib that is opened by ODBCConfig. There are two things, first because libtool decides that shared libs ar lib*.a the code trys to load libodbcinstQ.a, and also we maye have to rebuild the lib using the IBM util makeC++SharedLib (the name gives its away :-) I have tried this with a current AIX, and it seems that all is needed is to extract the .so from the .a by running ar -x libodbcinstQ.a to get the .so If that doesn't help, or on older AIX's the following may need doing. After the make install is done, go into the odbcinstQ dir on thE build tree, and do the following makeC++SharedLib -p 0 -o libodbcinstQ.so.1.0 -L$QTDIR/lib -lqt -L$PREFIX/lib -lodbc -lodbcinst .libs/libodbcinstQ.lax/libodbcextraslc.al/strcasecmp.o *.o ../ini/*.lo where QTDIR is set to the top of the qt tree, so $QTDIR/lib will contain libqt.a and PREFIX is set to the unixODBC install tree, so $PREFIX/lib contains libodbc.a. Ignore any duplicate symbol warnings they are due to the same things being in libodbc.a and libodbcinst.a this will then build a libodbcinstQ.so.1.0, we can copy that to the target lib dir, and delete the existing lib, and link it (again replace $PREFIX with the correct path cp libodbcinstQ.so.1.0 $PREFIX/lib cd $PREFIX/lib rm libodbcinstQ.a ln -s libodbcinstQ.so.1.0 libodbcinstQ.a Then all should be OK with ODBCConfig Nick Gorham unixODBC-2.2.14-p2/README.SOLARIS0100644000076400007640000000266507676016342014214 0ustar nicknickBuilding unixODBC on Solaris ---------------------------- This should just work, however I have had the following helpfull hints sent to me by David Brown of Starquest. The suggested change has been made to the code in __info.c "Last fall, I had problems running on Solaris 7, because my system did have an iconv conversion between ISO8859-1 and UCS-2. I discovered two things: * the missing iconv tables are available by a patch for Solaris 7 (there is also a corresponding patch for Solaris 8, that fixes a lot in this area - seems recommended to use that as well) * Solaris uses the name 8859-1 in its tables rather than ISO8859-1 or ISO-8859-1. So what I've done is: 1) make the following change to DriverManager/__info.c: diff __info.c __info.c.orig 385c385 < char *asc[] = { "char", "ISO8859-1", "ISO-8859-1", "8859-1", "ASCII", NULL }; --- >> char *asc[] = { "char", "ISO8859-1", "ISO-8859-1", "ASCII", NULL }; 2) tell customers to apply the following Solaris patches: Solaris 7: Patch-ID# 112689-02 Keywords: UTF-8 ICONV Synopsis: SunOS 5.7: UTF-8 locale ICONV patch Date: Aug/28/2002 Solaris 8: Patch-ID# 113261-01 Keywords: UTF-8 ICONV Synopsis: SunOS 5.8: UTF-8 locale ICONV patch Date: Oct/11/2002 this has since been superceded by 11326-02, but I think unixODBC should function fine with 113261-01 Patch-ID# 113261-02 Keywords: UTF-8 ICONV Synopsis: SunOS 5.8: UTF-8 locale ICONV patch Date: Feb/21/2003" unixODBC-2.2.14-p2/README.INTERIX0100644000076400007640000000100007762667075014213 0ustar nicknickSome notes on building UnixODBC on Microsoft Interix First use the modified configure and config.guess included in the Interix directory, copy them up into the main directory. Then build with the following line CFLAGS="-D_ALL_SOURCE -I/usr/local/include" CPPFLAGS="-D_ALL_SOURCE -I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure After running configure, copy libtool from the Interix directory into the build directory Thanks to the MS group for supplying this info. Thats all for now. Nick. unixODBC-2.2.14-p2/vmsbuild.com0100644000076400007640000002111411014545661014524 0ustar nicknick$! vmsbuild.com -- DCL procedure to build unixODBC on OpenVMS $! $ say := "write sys$OUTPUT" $ whoami = f$parse(f$environment("PROCEDURE"),,,,"NO_CONCEAL") $ cwd = f$parse(whoami,,,"DEVICE") + f$parse(whoami,,,"DIRECTORY") - ".][000000]" - "][" - ".]" - "]" + "]" $ set default 'cwd' $! $ basedir = cwd - "]" $ define/translation=concealed ODBCSRC "''basedir'.]" $! $ if p1 .eqs. "" then $goto ERR_NOPARAMS $! $ includes = "ODBCSRC:[include],ODBCSRC:[extras],ODBCSRC:[libltdl]" $! /first_include requires CC 6.4 or later but avoids impossibly long /define qualifier $ CFLAGS="/names=as_is/prefix=all/include=(" + includes + ")/first_include=(ODBCSRC:[include]vmsconfig.h) $ LFLAGS="/nodebug/notrace" $! $ if p2 .eqs. "DEBUG" $ then $ CFLAGS = CFLAGS + "/noopt/debug" $ LFLAGS = LFLAGS + "/debug/trace" $ endif $! $ if p1 .eqs. "CLEAN" $ then $ set default 'cwd' $ d = f$parse(whoami,,,"DEVICE") + f$parse(whoami,,,"DIRECTORY") - ".][000000]" - "][" - ".]" - "]" + "]" $ say "Removing all object files and listings" $ delete/noconfirm [...]*.obj;*, *.lis;* $ say "Removing all object libraries and linker maps" $ delete/noconfirm [...]*.olb;*, *.map;* $ goto all_done $ endif $! $ if p1 .eqs. "COMPILE" .or. p1 .eqs. "ALL" $ then $ say "Compiling unixODBC" $ if f$search("ODBCSRC:[vms]libodbcinst.olb") .eqs. "" then library/create ODBCSRC:[vms]libodbcinst.olb $ if f$search("ODBCSRC:[vms]libodbc.olb") .eqs. "" then library/create ODBCSRC:[vms]libodbc.olb $ if f$search("ODBCSRC:[vms]libodbcpsql.olb") .eqs. "" then library/create ODBCSRC:[vms]libodbcpsql.olb $ call create_vmsconfig_h $ call compile "ODBCSRC:[extras]" "*.C" "ODBCSRC:[vms]libodbcinst.olb" "ODBCSRC:[vms]libodbc.olb" $ call compile "ODBCSRC:[ini]" "*.C" "ODBCSRC:[vms]libodbcinst.olb" "ODBCSRC:[vms]libodbc.olb" $ call compile "ODBCSRC:[log]" "*.C" "ODBCSRC:[vms]libodbcinst.olb" $ call compile "ODBCSRC:[lst]" "*.C" "ODBCSRC:[vms]libodbcinst.olb" "ODBCSRC:[vms]libodbc.olb" $ call compile "ODBCSRC:[odbcinst]" "*.C" "ODBCSRC:[vms]libodbcinst.olb" $ call compile "ODBCSRC:[drivermanager]" "*.C" "ODBCSRC:[vms]libodbc.olb" $ call compile "ODBCSRC:[exe]" "*.C" $ call compile "ODBCSRC:[drivers.postgresql]" "*.C" "ODBCSRC:[vms]libodbcpsql.olb" $ set default 'cwd' $! $ endif $! $ if f$trnlnm("ODBC_LIBDIR").eqs."" $ then $ if f$search("ODBCSRC:[000000]odbclib.dir") .eqs. "" $ then $ create/directory/log ODBCSRC:[odbclib] $ endif $ libdir = f$parse("ODBCSRC:[odbclib]",,,,"NO_CONCEAL") -".][000000"-"]["-"].;"+"]" $ define/process ODBC_LIBDIR 'libdir' $ say "Defining ODBC_LIBDIR as """ + f$trnlnm("ODBC_LIBDIR") + """ $ else $ if f$search("ODBC_LIBDIR") .eqs. "" $ then $ create/directory/log ODBC_LIBDIR $ endif $ endif $! $! Build Shared objects $! $ if p1 .eqs. "LINK" .or. p1 .eqs. "ALL" $ then $ set default ODBCSRC:[vms] $! $ say "Linking libodbcinst.exe" $ link 'LFLAGS' libodbcinst.olb/library,odbcinst_axp.opt/opt/share=libodbcinst.exe $! $ say "Linking libodbc.exe" $ link 'LFLAGS' libodbc.olb/library,odbc_axp.opt/opt/share=libodbc.exe $! $! The following kludge brought to you by the fact that on ODS-5 disks the C compiler $! may create module names in upper or mixed case depending on how the archive was $! unpacked. Try lower case and if it's not there, assume uppper case. $! $ module = "psqlodbc" $ module_exists == 0 $ call check_module "''module'" "libodbcpsql.olb" $ if .not. module_exists then module = f$edit(module,"UPCASE") $! $ say "Linking libodbcpsql.exe" $ link 'LFLAGS' libodbcpsql.olb/library/include="''module'",odbc2_axp.opt/opt/share=libodbcpsql.exe $! $ set default ODBCSRC:[exe] $ say "Linking isql.exe, dltest.exe and odbc-config.exe" $ link 'LFLAGS' isql.OBJ,SYS$INPUT/OPT ODBCSRC:[vms]libodbc.exe/SHARE $ eod $! $ link 'LFLAGS' dltest.OBJ,ODBCSRC:[vms]libodbcinst.olb/library $ link 'LFLAGS' odbc-config.OBJ $ endif $! $ if p1 .eqs. "INSTALL" .or. p1 .eqs. "ALL" $ then $! $ copy/log ODBCSRC:[vms]libodbc*.exe ODBC_LIBDIR: $ copy/log ODBCSRC:[vms]odbc_setup.com ODBC_LIBDIR: $ copy/log ODBCSRC:[exe]isql.exe ODBC_LIBDIR: $ copy/log ODBCSRC:[exe]dltest.exe ODBC_LIBDIR: $ copy/log ODBCSRC:[exe]odbc-config.exe ODBC_LIBDIR: $! $! check for odbc.ini and odbcinst.ini in ODBC_LIBDIR $! $ file = f$search ("ODBC_LIBDIR:odbc.ini") $ if file .eqs. "" $ then $ say "Creating ODBC_LIBDIR:odbc.ini" $ create ODBC_LIBDIR:odbc.ini $ endif $! $ file = f$search ("ODBC_LIBDIR:odbcinst.ini") $ if file .eqs. "" $ then $ say "Creating ODBC_LIBDIR:odbcinst.ini" $ create ODBC_LIBDIR:odbcinst.ini $ endif $! $ set file ODBC_LIBDIR:*.*/protection=(w:re) $ endif $! $ all_done: $ set default 'cwd' $ exit (1) $! $ ERR_NOPARAMS: $ say " " $ say "The correct calling sequence is: " $ say " " $ say "$ @vmsbuild p1 [p2] $ say " " $ say "Where p1 is : " $ say " " $ say " ALL : COMPILE LINK, and INSTALL steps." $ say " CLEAN : Remove all objects and object libraries." $ say " COMPILE : Compile all source and produce object libraries" $ say " LINK : Create shareable images" $ say " INSTALL : Copy shareable images to ODBC_LIBDIR:" $ say " " $ say "and DEBUG may optionally be specified for p2 when p1 is COMPILE, LINK, or ALL" $ say " " $ exit 44 $! $! compile subroutine will compile all p2 source files $! and place the resulting object files in libraries $! specified as p3 and/or p4 $! $ compile : subroutine $ set default 'p1' $ loop: $ file = f$search ("''p2'",1) $ if file .eqs. "" then goto complete $ filename = f$parse (file,,,"name") $ if f$edit(filename,"UPCASE") .eqs. "INIOS2PROFILE" then goto loop $ object = F$SEARCH ("''filename'.OBJ;*",2) $ if object .eqs. "" $ then $ say "cc" + CFLAGS + " ''filename'.C" $ on warning then continue $ cc 'CFLAGS' 'filename' $! keep module names upper case to avoid insanity on ODS-5 volumes $ if p3 .nes. "" then library/replace/log 'p3' 'f$edit(filename,"UPCASE")' $ if p4 .nes. "" then library/replace/log 'p4' 'f$edit(filename,"UPCASE")' $ endif $ goto loop $ complete: $ set default 'cwd' $ exit $ endsubroutine ! compile $ $! $ create_vmsconfig_h : subroutine $! $ SEARCH/KEY=(POS:2,SIZE:8) ODBCSRC:[000000]CONFIGURE. "VERSION="/EXACT/OUTPUT=version.tmp $ open/read version version.tmp $ read version versionline $ close version $ delete/noconfirm/nolog version.tmp;* $ versionstring = f$element(1, "=", f$edit(versionline, "COLLAPSE")) $! $ if f$search("ODBCSRC:[include]vmsconfig.h") .nes. "" then delete/noconfirm/nolog ODBCSRC:[include]vmsconfig.h;* $ open/write vmsconfig ODBCSRC:[include]vmsconfig.h $ write vmsconfig "/* auto-generated definitions for VMS port */ $ write vmsconfig "#define UNIXODBC" $ write vmsconfig "#define HAVE_PWD_H 1" $ write vmsconfig "#if __VMS_VER >= 70000000" $ write vmsconfig "#define HAVE_STRCASECMP" $ write vmsconfig "#define HAVE_STRNCASECMP" $ write vmsconfig "#define HAVE_STDARG_H" $ write vmsconfig "#endif" $ write vmsconfig "#define SIZEOF_LONG_INT 8" $ write vmsconfig "#define UNIXODBC_SOURCE" $ write vmsconfig "#define readonly __readonly" $ write vmsconfig "#define DEFLIB_PATH ""ODBC_LIBDIR:[LIB]""" $ write vmsconfig "#define SYSTEM_LIB_PATH ""ODBC_LIBDIR:[LIB]""" $ write vmsconfig "#define SHLIBEXT "".exe""" $ write vmsconfig "#define VERSION ""''versionstring'""" $ write vmsconfig "#define PREFIX ""ODBC_LIBDIR:""" $ write vmsconfig "#define EXEC_PREFIX ""ODBC_LIBDIR:[BIN]""" $ write vmsconfig "#define BIN_PREFIX ""ODBC_LIBDIR:[BIN]""" $ write vmsconfig "#define INCLUDE_PREFIX ""ODBC_LIBDIR:[INCLUDE]""" $ write vmsconfig "#define LIB_PREFIX ""ODBC_LIBDIR:[ETC]""" $ write vmsconfig "#define SYSTEM_FILE_PATH ""ODBC_LIBDIR:[ETC]""" $ write vmsconfig "char* getvmsenv (char* symbol);" $ close vmsconfig $! $ open/write unixodbcconfig ODBCSRC:[include]unixodbc_conf.h $ write unixodbcconfig "/* auto-generated definitions for VMS port */ $ write unixodbcconfig "#ifndef HAVE_PWD_H" $ write unixodbcconfig " #define HAVE_PWD_H" $ write unixodbcconfig "#endif" $ write unixodbcconfig "#ifndef SIZEOF_LONG_INT" $ write unixodbcconfig " #define SIZEOF_LONG_INT 8" $ write unixodbcconfig "#endif" $ close unixodbcconfig $ exit $ endsubroutine ! create_vmsconfig_h $! $ check_module : subroutine $! Check for presence of a particular module in an object library. $! p1: module name, p2: object library $ set noon $ define/user_mode sys$output nl: $ define/user_mode sys$error nl: $ library/list/only="''p1'" 'p2' $ if .not. $status $ then $! probably LBR$_KEYNOTFND; defer other errors until link time $ module_exists == 0 $ else $ module_exists == 1 $ endif $ set on $ exit $ endsubroutine ! check_module unixODBC-2.2.14-p2/extras/0040755000076400007640000000000011150523331013500 5ustar nicknickunixODBC-2.2.14-p2/extras/Makefile.am0100644000076400007640000000031611025707633015543 0ustar nicknicknoinst_LTLIBRARIES = libodbcextraslc.la INCLUDES = -I@top_srcdir@/include EXTRA_DIST = vms.c libodbcextraslc_la_SOURCES = \ strcasecmp.c \ snprintf.c libodbcextraslc_la_LDFLAGS = -no-undefined unixODBC-2.2.14-p2/extras/Makefile.in0100644000076400007640000003506711111035254015554 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = extras DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libodbcextraslc_la_LIBADD = am_libodbcextraslc_la_OBJECTS = strcasecmp.lo snprintf.lo libodbcextraslc_la_OBJECTS = $(am_libodbcextraslc_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcextraslc_la_SOURCES) DIST_SOURCES = $(libodbcextraslc_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_LTLIBRARIES = libodbcextraslc.la INCLUDES = -I@top_srcdir@/include EXTRA_DIST = vms.c libodbcextraslc_la_SOURCES = \ strcasecmp.c \ snprintf.c libodbcextraslc_la_LDFLAGS = -no-undefined all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu extras/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu extras/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 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 libodbcextraslc.la: $(libodbcextraslc_la_OBJECTS) $(libodbcextraslc_la_DEPENDENCIES) $(LINK) $(libodbcextraslc_la_LDFLAGS) $(libodbcextraslc_la_OBJECTS) $(libodbcextraslc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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: 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) 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-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .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-exec \ install-exec-am install-info install-info-am install-man \ 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-info-am # 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: unixODBC-2.2.14-p2/extras/strcasecmp.c0100644000076400007640000000177407563762211016035 0ustar nicknick#include #include #ifndef HAVE_STRCASECMP 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; } while (c1 == c2); return c1 - c2; } #endif #ifndef HAVE_STRNCASECMP int strncasecmp (const char *s1, const char *s2, int n ) { 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; n --; } while (c1 == c2 && n > 0 ); if ( n == 0 ) return 0; return c1 - c2; } #endif void ___extra_func_to_mollify_linker( void ) { } unixODBC-2.2.14-p2/extras/snprintf.c0100644000076400007640000004160211012310544015504 0ustar nicknick/* * Copyright Patrick Powell 1995 * This code is based on code written by Patrick Powell (papowell@astart.com) * It may be used for any purpose as long as this notice remains intact * on all source code distributions */ /************************************************************** * Original: * Patrick Powell Tue Apr 11 09:48:21 PDT 1995 * A bombproof version of doprnt (dopr) included. * Sigh. This sort of thing is always nasty do deal with. Note that * the version here does not include floating point... * * snprintf() is used instead of sprintf() as it does limit checks * for string length. This covers a nasty loophole. * * The other functions are there to prevent NULL pointers from * causing nast effects. * * More Recently: * Brandon Long 9/15/96 for mutt 0.43 * This was ugly. It is still ugly. I opted out of floating point * numbers, but the formatter understands just about everything * from the normal C string format, at least as far as I can tell from * the Solaris 2.5 printf(3S) man page. * * Brandon Long 10/22/97 for mutt 0.87.1 * Ok, added some minimal floating point support, which means this * probably requires libm on most operating systems. Don't yet * support the exponent (e,E) and sigfig (g,G). Also, fmtint() * was pretty badly broken, it just wasn't being exercised in ways * which showed it, so that's been fixed. Also, formated the code * to mutt conventions, and removed dead code left over from the * original. Also, there is now a builtin-test, just compile with: * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm * and run snprintf for results. * * Thomas Roessler 01/27/98 for mutt 0.89i * The PGP code was using unsigned hexadecimal formats. * Unfortunately, unsigned formats simply didn't work. * * Michael Elkins 03/05/98 for mutt 0.90.8 * The original code assumed that both snprintf() and vsnprintf() were * missing. Some systems only have snprintf() but not vsnprintf(), so * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF. * * Andrew Tridgell (tridge@samba.org) Oct 1998 * fixed handling of %.0f * added test for HAVE_LONG_DOUBLE * * Eric Sharkey Dec 2003 * fixed handling of floating point numbers less than 0.1 * * Eric Sharkey Mar 2005 * fixed return value to conform to C99 standard * **************************************************************/ /* XXX Hmm... Perhaps autoconf this up again? */ #define HAVE_LONG_DOUBLE #include #include #include #include "uodbc_extras.h" /* varargs declarations: */ #if defined(HAVE_STDARG_H) # include # define VA_LOCAL_DECL va_list ap # define VA_START(f) va_start(ap, f) # define VA_SHIFT(v,t) ; /* no-op for ANSI */ # define VA_END va_end(ap) #else # if defined(HAVE_VARARGS_H) # define VA_LOCAL_DECL va_list ap # define VA_START(f) va_start(ap) /* f is ignored! */ # define VA_SHIFT(v,t) v = va_arg(ap,t) # define VA_END va_end(ap) # else /*XX ** NO VARARGS ** XX*/ # error No variable argument support # endif #endif #ifdef HAVE_LONG_DOUBLE #define LDOUBLE long double #else #define LDOUBLE double #endif /*int snprintf (char *str, size_t count, const char *fmt, ...);*/ /*int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);*/ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args); static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max); static void fmtint (char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags); static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags); static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c ); /* * dopr(): poor man's version of doprintf */ /* format read states */ #define DP_S_DEFAULT 0 #define DP_S_FLAGS 1 #define DP_S_MIN 2 #define DP_S_DOT 3 #define DP_S_MAX 4 #define DP_S_MOD 5 #define DP_S_CONV 6 #define DP_S_DONE 7 /* format flags - Bits */ #define DP_F_MINUS (1 << 0) #define DP_F_PLUS (1 << 1) #define DP_F_SPACE (1 << 2) #define DP_F_NUM (1 << 3) #define DP_F_ZERO (1 << 4) #define DP_F_UP (1 << 5) #define DP_F_UNSIGNED (1 << 6) /* Conversion Flags */ #define DP_C_SHORT 1 #define DP_C_LONG 2 #define DP_C_LDOUBLE 3 #define char_to_int(p) (p - '0') #define MAX(p,q) ((p >= q) ? p : q) static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) { char ch; long value; LDOUBLE fvalue; char *strvalue; int min; int max; int state; int flags; int cflags; size_t currlen; state = DP_S_DEFAULT; currlen = flags = cflags = min = 0; max = -1; ch = *format++; while (state != DP_S_DONE) { if ((ch == '\0') || (currlen >= maxlen)) state = DP_S_DONE; switch(state) { case DP_S_DEFAULT: if (ch == '%') state = DP_S_FLAGS; else dopr_outch (buffer, &currlen, maxlen, ch); ch = *format++; break; case DP_S_FLAGS: switch (ch) { case '-': flags |= DP_F_MINUS; ch = *format++; break; case '+': flags |= DP_F_PLUS; ch = *format++; break; case ' ': flags |= DP_F_SPACE; ch = *format++; break; case '#': flags |= DP_F_NUM; ch = *format++; break; case '0': flags |= DP_F_ZERO; ch = *format++; break; default: state = DP_S_MIN; break; } break; case DP_S_MIN: if (isdigit((unsigned char)ch)) { min = 10*min + char_to_int (ch); ch = *format++; } else if (ch == '*') { min = va_arg (args, int); ch = *format++; state = DP_S_DOT; } else state = DP_S_DOT; break; case DP_S_DOT: if (ch == '.') { state = DP_S_MAX; ch = *format++; } else state = DP_S_MOD; break; case DP_S_MAX: if (isdigit((unsigned char)ch)) { if (max < 0) max = 0; max = 10*max + char_to_int (ch); ch = *format++; } else if (ch == '*') { max = va_arg (args, int); ch = *format++; state = DP_S_MOD; } else state = DP_S_MOD; break; case DP_S_MOD: /* Currently, we don't support Long Long, bummer */ switch (ch) { case 'h': cflags = DP_C_SHORT; ch = *format++; break; case 'l': cflags = DP_C_LONG; ch = *format++; break; case 'L': cflags = DP_C_LDOUBLE; ch = *format++; break; default: break; } state = DP_S_CONV; break; case DP_S_CONV: switch (ch) { case 'd': case 'i': if (cflags == DP_C_SHORT) /* value = va_arg (args, short int); */ value = va_arg (args, int); else if (cflags == DP_C_LONG) value = va_arg (args, long int); else value = va_arg (args, int); fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); break; case 'o': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) /* value = va_arg (args, unsigned short int); */ value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = (long)va_arg (args, unsigned long int); else value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); break; case 'u': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) /* value = va_arg (args, unsigned short int); */ value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = (long)va_arg (args, unsigned long int); else value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); break; case 'X': flags |= DP_F_UP; case 'x': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) /* value = va_arg (args, unsigned short int); */ value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = (long)va_arg (args, unsigned long int); else value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); break; case 'f': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); /* um, floating point? */ fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); break; case 'E': flags |= DP_F_UP; case 'e': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); break; case 'G': flags |= DP_F_UP; case 'g': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); break; case 'c': dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); break; case 's': strvalue = va_arg (args, char *); if (max < 0) max = maxlen; /* ie, no max */ fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); break; case 'p': strvalue = (char*) va_arg (args, void *); fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); break; case 'n': if (cflags == DP_C_SHORT) { short int *num; num = va_arg (args, short int *); *num = currlen; } else if (cflags == DP_C_LONG) { long int *num; num = va_arg (args, long int *); *num = (long int)currlen; } else { int *num; num = va_arg (args, int *); *num = currlen; } break; case '%': dopr_outch (buffer, &currlen, maxlen, ch); break; case 'w': /* not supported yet, treat as next char */ ch = *format++; break; default: /* Unknown, skip */ break; } ch = *format++; state = DP_S_DEFAULT; flags = cflags = min = 0; max = -1; break; case DP_S_DONE: break; default: /* hmm? */ break; /* some picky compilers need this */ } } if (currlen < maxlen - 1) buffer[currlen] = '\0'; else buffer[maxlen - 1] = '\0'; return currlen; } static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max) { int padlen, strln; /* amount to pad */ int cnt = 0; if (value == 0) { value = ""; } for (strln = 0; value[strln]; ++strln); /* strlen */ padlen = min - strln; if (padlen < 0) padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justify */ while ((padlen > 0) && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, ' '); --padlen; ++cnt; } while (*value && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, *value++); ++cnt; } while ((padlen < 0) && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, ' '); ++padlen; ++cnt; } } /* Have to handle DP_F_NUM (ie 0x and 0 alternates) */ static void fmtint (char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags) { int signvalue = 0; unsigned long uvalue; char convert[20]; int place = 0; int spadlen = 0; /* amount to space pad */ int zpadlen = 0; /* amount to zero pad */ int caps = 0; if (max < 0) max = 0; uvalue = value; if(!(flags & DP_F_UNSIGNED)) { if( value < 0 ) { signvalue = '-'; uvalue = -value; } else if (flags & DP_F_PLUS) /* Do a sign (+/i) */ signvalue = '+'; else if (flags & DP_F_SPACE) signvalue = ' '; } if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ do { convert[place++] = (caps? "0123456789ABCDEF":"0123456789abcdef") [uvalue % (unsigned)base ]; uvalue = (uvalue / (unsigned)base ); } while(uvalue && (place < 20)); if (place == 20) place--; convert[place] = 0; zpadlen = max - place; spadlen = min - MAX (max, place) - (signvalue ? 1 : 0); if (zpadlen < 0) zpadlen = 0; if (spadlen < 0) spadlen = 0; if (flags & DP_F_ZERO) { zpadlen = MAX(zpadlen, spadlen); spadlen = 0; } if (flags & DP_F_MINUS) spadlen = -spadlen; /* Left Justifty */ #ifdef DEBUG_SNPRINTF printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", zpadlen, spadlen, min, max, place); #endif /* Spaces */ while (spadlen > 0) { dopr_outch (buffer, currlen, maxlen, ' '); --spadlen; } /* Sign */ if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); /* Zeros */ if (zpadlen > 0) { while (zpadlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --zpadlen; } } /* Digits */ while (place > 0) dopr_outch (buffer, currlen, maxlen, convert[--place]); /* Left Justified spaces */ while (spadlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); ++spadlen; } } static LDOUBLE abs_val (LDOUBLE value) { LDOUBLE result = value; if (value < 0) result = -value; return result; } static LDOUBLE pow10 (int exponent) { LDOUBLE result = 1; while (exponent) { result *= 10; exponent--; } return result; } static long round (LDOUBLE value) { long intpart; intpart = (long)value; value = value - intpart; if (value >= 0.5) intpart++; return intpart; } static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags) { int signvalue = 0; LDOUBLE ufvalue; char iconvert[20]; char fconvert[20]; int iplace = 0; int fplace = 0; int padlen = 0; /* amount to pad */ int zpadlen = 0; int caps = 0; long intpart; long fracpart; /* * AIX manpage says the default is 0, but Solaris says the default * is 6, and sprintf on AIX defaults to 6 */ if (max < 0) max = 6; ufvalue = abs_val (fvalue); if (fvalue < 0) signvalue = '-'; else if (flags & DP_F_PLUS) /* Do a sign (+/i) */ signvalue = '+'; else if (flags & DP_F_SPACE) signvalue = ' '; #if 0 if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ #endif intpart = (long)ufvalue; /* * Sorry, we only support 9 digits past the decimal because of our * conversion method */ if (max > 9) max = 9; /* We "cheat" by converting the fractional part to integer by * multiplying by a factor of 10 */ fracpart = round ((pow10 (max)) * (ufvalue - intpart)); if (fracpart >= pow10 (max)) { intpart++; fracpart -= pow10 (max); } #ifdef DEBUG_SNPRINTF printf("fmtfp: %g %d.%d min=%d max=%d\n", (double)fvalue, intpart, fracpart, min, max); #endif /* Convert integer part */ do { iconvert[iplace++] = (caps? "0123456789ABCDEF":"0123456789abcdef")[intpart % 10]; intpart = (intpart / 10); } while(intpart && (iplace < 20)); if (iplace == 20) iplace--; iconvert[iplace] = 0; /* Convert fractional part */ do { fconvert[fplace++] = (caps? "0123456789ABCDEF":"0123456789abcdef")[fracpart % 10]; fracpart = (fracpart / 10); } while(fplace < max); if (fplace == 20) fplace--; fconvert[fplace] = 0; /* -1 for decimal point, another -1 if we are printing a sign */ padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); zpadlen = max - fplace; if (zpadlen < 0) zpadlen = 0; if (padlen < 0) padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justifty */ if ((flags & DP_F_ZERO) && (padlen > 0)) { if (signvalue) { dopr_outch (buffer, currlen, maxlen, signvalue); --padlen; signvalue = 0; } while (padlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --padlen; } } while (padlen > 0) { dopr_outch (buffer, currlen, maxlen, ' '); --padlen; } if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); while (iplace > 0) dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); #ifdef DEBUG_SNPRINTF printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen); #endif /* * Decimal point. This should probably use locale to find the correct * char to print out. */ if (max > 0) { dopr_outch (buffer, currlen, maxlen, '.'); while (fplace > 0) dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); } while (zpadlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --zpadlen; } while (padlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); ++padlen; } } static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c) { if (*currlen < maxlen) buffer[(*currlen)] = c; (*currlen)++; } int uodbc_vsnprintf (char *str, size_t count, const char *fmt, va_list args) { int l; str[0] = 0; l=dopr(str, count, fmt, args); return l; } #ifdef HAVE_STDARGS int uodbc_snprintf (char *str,size_t count,const char *fmt,...) #else int uodbc_snprintf (va_alist) va_dcl #endif { int l; #ifndef HAVE_STDARGS char *str; size_t count; char *fmt; #endif VA_LOCAL_DECL; VA_START (fmt); VA_SHIFT (str, char *); VA_SHIFT (count, size_t ); VA_SHIFT (fmt, char *); l=uodbc_vsnprintf(str, count, fmt, ap); VA_END; return l; } unixODBC-2.2.14-p2/extras/vms.c0100644000076400007640000002666711014546154014476 0ustar nicknick#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static int error_status = SS$_NORMAL; static char error_buffer[256]; static char getenv_buffer[256]; typedef struct { struct dsc$descriptor_s fnmdes; struct dsc$descriptor_s imgdes; struct dsc$descriptor_s symdes; char filename[NAM$C_MAXRSS]; } vms_dl; int vms_dlsym (vms_dl *, void **, int); void * lt_dlsym (void *, const char *); int lt_dlinit (void) { return 0; } char translate_buffer[NAM$C_MAXRSS+1]; int to_vms_callback(char *name, int type) { strcpy(translate_buffer, name); return 1; } void * lt_dlopen (const char *filename) { /* * Locates and validates a shareable image. If the caller supplies a * path as part of the image name, that's where we look. Note that this * includes cases where the image name is a logical name pointing to a full * file spec including path. If there is no path, we look at wherever the * logical name LTDL_LIBRARY_PATH points (if it exists); it'd normally be a * search list logical defined in lt_dladdsearchdir, so it could point to a * number of places. As a last resort we look in SYS$SHARE. */ vms_dl *dh; int status; struct FAB imgfab; struct NAM imgnam; char defimg[NAM$C_MAXRSS+1]; char *defpath; char local_fspec[NAM$C_MAXRSS+1]; if (filename == NULL) { error_status = SS$_UNSUPPORTED; return NULL; } strcpy(local_fspec, filename); /* * The driver manager will handle a hard-coded path from a .ini file, but * only if it's an absolute path in unix syntax. To make those acceptable * to lib$find_image_symbol, we have to convert to VMS syntax. N.B. Because * of the static buffer, this is not thread-safe, but copying immediately to * local storage should limit the damage. */ if (filename[0] == '/') { int num_translated = decc$to_vms(local_fspec, to_vms_callback, 0, 1); if (num_translated == 1) strcpy(local_fspec, translate_buffer); } dh = (vms_dl *)malloc (sizeof (vms_dl)); memset( dh, 0, sizeof(vms_dl) ); if (dh == NULL) { error_status = SS$_INSFMEM; return NULL; } imgfab = cc$rms_fab; imgfab.fab$l_fna = local_fspec; imgfab.fab$b_fns = (int) strlen (local_fspec); imgfab.fab$w_ifi = 0; /* If the logical name LTDL_LIBRARY_PATH does not exist, we'll depend * on the image name being a logical name or on the image residing in * SYS$SHARE. */ if ( getvmsenv("LTDL_LIBRARY_PATH") == NULL ) { strcpy( defimg, ".EXE" ); } else { strcpy( defimg, "LTDL_LIBRARY_PATH:.EXE" ); } imgfab.fab$l_dna = defimg; imgfab.fab$b_dns = strlen(defimg); imgfab.fab$l_fop = FAB$M_NAM; imgfab.fab$l_nam = &imgnam; imgnam = cc$rms_nam; imgnam.nam$l_esa = dh->filename; imgnam.nam$b_ess = NAM$C_MAXRSS; status = sys$parse (&imgfab); if (!($VMS_STATUS_SUCCESS(status))) { /* No luck with LTDL_LIBRARY_PATH; try SYS$SHARE */ strcpy( defimg, "SYS$SHARE:.EXE" ); imgfab.fab$b_dns = strlen(defimg); status = sys$parse (&imgfab); if (!($VMS_STATUS_SUCCESS(status))) { error_status = status; return NULL; } } dh->fnmdes.dsc$b_dtype = DSC$K_DTYPE_T; dh->fnmdes.dsc$b_class = DSC$K_CLASS_S; dh->fnmdes.dsc$a_pointer = imgnam.nam$l_name; dh->fnmdes.dsc$w_length = imgnam.nam$b_name; dh->imgdes.dsc$b_dtype = DSC$K_DTYPE_T; dh->imgdes.dsc$b_class = DSC$K_CLASS_S; dh->imgdes.dsc$a_pointer = dh->filename; dh->imgdes.dsc$w_length = imgnam.nam$b_esl; /* ** Attempt to load a symbol at this stage to ** validate that the shared file can be loaded */ lt_dlsym (dh, "Fake_Symbol_Name"); if (!((error_status ^ LIB$_KEYNOTFOU) & ~7)) error_status = SS$_NORMAL; if (!($VMS_STATUS_SUCCESS(error_status))) { free (dh); return NULL; } return dh; } int lt_dlclose (void *handle) { free (handle); return 0; } void * lt_dlsym (void *handle, const char *name) { vms_dl *dh; void *ptr; int status, flags; dh = (vms_dl *)handle; if (!dh) return NULL; dh->symdes.dsc$b_dtype = DSC$K_DTYPE_T; dh->symdes.dsc$b_class = DSC$K_CLASS_S; dh->symdes.dsc$a_pointer = (char *) name; dh->symdes.dsc$w_length = strlen (name); /* firstly attempt with flags set to 0 case insensitive */ flags = 0; status = vms_dlsym (dh, &ptr, flags); if (!($VMS_STATUS_SUCCESS(status))) { /* ** Try again with mixed case flag set */ flags = LIB$M_FIS_MIXEDCASE; status = vms_dlsym (dh, &ptr, flags); if (!($VMS_STATUS_SUCCESS(status))) { error_status = status; return NULL; } } return ptr; } int vms_dlsym ( vms_dl *dh, void **ptr, int flags) { LIB$ESTABLISH (LIB$SIG_TO_RET); return LIB$FIND_IMAGE_SYMBOL (&dh->fnmdes, &dh->symdes, ptr, &dh->imgdes, flags); } const char *lt_dlerror (void) { struct dsc$descriptor desc; short outlen; int status; if (($VMS_STATUS_SUCCESS(error_status))) return NULL; desc.dsc$b_dtype = DSC$K_DTYPE_T; desc.dsc$b_class = DSC$K_CLASS_S; desc.dsc$a_pointer = error_buffer; desc.dsc$w_length = sizeof (error_buffer); status = sys$getmsg (error_status, &outlen, &desc, 15, 0); if ($VMS_STATUS_SUCCESS(status)) error_buffer[outlen] = '\0'; else sprintf (error_buffer, "OpenVMS exit status %8X", error_status); error_status = SS$_NORMAL; return (error_buffer); } struct itemlist3 { unsigned short buflen; unsigned short item; void *buf; unsigned short *retlen; }; int lt_dladdsearchdir (const char *search_dir) { /* * Adds a path to the list of paths where lt_dlopen will look for shareable images. * We do this via a user-mode search list logical, adding one more item to the end of * the list whenever called. */ $DESCRIPTOR(lib_path_d, "LTDL_LIBRARY_PATH"); $DESCRIPTOR( proc_table_d, "LNM$PROCESS_TABLE" ); unsigned int status = 0; unsigned char accmode = 0, lnm_exists = 1; int index = 0, max_index = 0; struct itemlist3 trnlnmlst[4] = {{sizeof(accmode), LNM$_ACMODE, &accmode, 0}, {sizeof(max_index), LNM$_MAX_INDEX, &max_index, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; struct itemlist3 *crelnmlst; struct eqvarray { char eqvname[256]; }; struct eqvarray *eqvlist; /* First just check to see whether the logical name exists and how many equivalence * names there are. */ status = SYS$TRNLNM ( NULL, &proc_table_d, &lib_path_d, NULL, trnlnmlst); /* If the logical name doesn't exist or exists at a privilege mode or table I * can't even look at, then I'll want to proceed with creating my user-mode logical. */ if ( status == SS$_NOLOGNAM || status == SS$_NOPRIV ) { status = SS$_NORMAL; lnm_exists = 0; /* skip further translation attempts */ max_index = 0; } if (!$VMS_STATUS_SUCCESS(status)) { error_status = status; return -1; } /* Also skip further translation if the first translation exists in any mode other * than user mode; we want to stick user mode logicals in front of these. */ if ( accmode != PSL$C_USER ) { lnm_exists = 0; max_index = 0; } /* Allocate an item list for logical name creation and an array of equivalence * name buffers. */ crelnmlst = (struct itemlist3 *) malloc( sizeof(struct itemlist3) * (max_index + 3) ); if (crelnmlst == NULL) { error_status = SS$_INSFMEM; return -1; } eqvlist = (struct eqvarray *) malloc( sizeof(struct eqvarray) * (max_index + 2) ); if (eqvlist == NULL) { error_status = SS$_INSFMEM; return -1; } trnlnmlst[1].buflen = sizeof(index); trnlnmlst[1].item = LNM$_INDEX; trnlnmlst[1].buf = &index; trnlnmlst[1].retlen = NULL; trnlnmlst[2].buflen = sizeof(eqvlist[0].eqvname); trnlnmlst[2].item = LNM$_STRING; /* The loops iterates over the search list index, getting the translation * for each index and storing it in the item list for re-creation. */ for (index = 0; index <= max_index && lnm_exists; index++ ) { /* Wire the input buffer for translation to the output buffer for creation */ trnlnmlst[2].buf = &eqvlist[index].eqvname; crelnmlst[index].buf = &eqvlist[index].eqvname; trnlnmlst[2].retlen = &crelnmlst[index].buflen; status = SYS$TRNLNM ( NULL, &proc_table_d, &lib_path_d, NULL, trnlnmlst); if (!$VMS_STATUS_SUCCESS(status)) { error_status = status; free(crelnmlst); free(eqvlist); return -1; } /* If we come across a non-user-mode translation, back up and get out * because we don't want to recreate those in user mode. */ if ( accmode != PSL$C_USER ) { index--; break; } crelnmlst[index].item = LNM$_STRING; crelnmlst[index].retlen = NULL; } /* At this point we have captured all the existing translations (if * any) and stored them in the item list for re-creation of the logical * name. All that's left is to add the new item to the end of the list * and terminate the list. */ crelnmlst[index].buflen = strlen(search_dir); crelnmlst[index].item = LNM$_STRING; crelnmlst[index].buf = (char *) search_dir; crelnmlst[index].retlen = NULL; crelnmlst[index+1].buflen = 0; crelnmlst[index+1].item = 0; crelnmlst[index+1].buf = NULL; crelnmlst[index+1].retlen = NULL; accmode = PSL$C_USER; status = SYS$CRELNM( NULL, &proc_table_d, &lib_path_d, &accmode, crelnmlst ); if (!$VMS_STATUS_SUCCESS(status)) { error_status = status; free(crelnmlst); free(eqvlist); return -1; } free(crelnmlst); free(eqvlist); error_status = SS$_NORMAL; return 0; } char * getvmsenv (char *symbol) { int status; unsigned short cbvalue; $DESCRIPTOR (logicalnametable, "LNM$FILE_DEV"); struct dsc$descriptor_s logicalname; struct itemlist3 itemlist[2]; logicalname.dsc$w_length = strlen (symbol); logicalname.dsc$b_dtype = DSC$K_DTYPE_T; logicalname.dsc$b_class = DSC$K_CLASS_S; logicalname.dsc$a_pointer = symbol; itemlist[0].buflen = sizeof (getenv_buffer) -1; itemlist[0].item = LNM$_STRING; itemlist[0].buf = getenv_buffer; itemlist[0].retlen = &cbvalue; itemlist[1].buflen = 0; itemlist[1].item = 0; itemlist[1].buf = 0; itemlist[1].retlen = 0; status = SYS$TRNLNM (0, &logicalnametable, &logicalname, 0, itemlist); if (!($VMS_STATUS_SUCCESS(status))) return NULL; if (cbvalue > 0) { getenv_buffer[cbvalue] = '\0'; return getenv_buffer; } return NULL; } unixODBC-2.2.14-p2/log/0040755000076400007640000000000011150523331012753 5ustar nicknickunixODBC-2.2.14-p2/log/README0100644000076400007640000000212607363332174013647 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | LOG lib (liblog.so) | +-------------------------------------------------------------+ This library provides some usefull functions for managing log/debug messages. +-------------------------------------------------------------+ | Peter Harvey | | http://www.genix.net/unixODBC | | pharvey@codebydesign.com | | 10.APR.99 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/log/Makefile.am0100644000076400007640000000034611025710060015005 0ustar nicknicknoinst_LTLIBRARIES = libloglc.la INCLUDES = -I@top_srcdir@/include libloglc_la_SOURCES = \ _logFreeMsg.c \ logClear.c \ logClose.c \ logOn.c \ logOpen.c \ logPeekMsg.c \ logPopMsg.c \ logPushMsg.c libloglc_la_LIBADD = unixODBC-2.2.14-p2/log/Makefile.in0100644000076400007640000003600511111035260015015 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = log DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libloglc_la_DEPENDENCIES = am_libloglc_la_OBJECTS = _logFreeMsg.lo logClear.lo logClose.lo \ logOn.lo logOpen.lo logPeekMsg.lo logPopMsg.lo logPushMsg.lo libloglc_la_OBJECTS = $(am_libloglc_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libloglc_la_SOURCES) DIST_SOURCES = $(libloglc_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_LTLIBRARIES = libloglc.la INCLUDES = -I@top_srcdir@/include libloglc_la_SOURCES = \ _logFreeMsg.c \ logClear.c \ logClose.c \ logOn.c \ logOpen.c \ logPeekMsg.c \ logPopMsg.c \ logPushMsg.c libloglc_la_LIBADD = all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu log/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu log/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 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 libloglc.la: $(libloglc_la_OBJECTS) $(libloglc_la_DEPENDENCIES) $(LINK) $(libloglc_la_LDFLAGS) $(libloglc_la_OBJECTS) $(libloglc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_logFreeMsg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logClear.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logClose.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logOn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logOpen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logPeekMsg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logPopMsg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logPushMsg.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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: 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) 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-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .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-exec \ install-exec-am install-info install-info-am install-man \ 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-info-am # 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: unixODBC-2.2.14-p2/log/_logFreeMsg.c0100644000076400007640000000200010723054453015306 0ustar nicknick/********************************************************************** * _logFreeMsg * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "log.h" /*! * \brief Callback function to free mem used by a message. * * This function is set in logOpen and is automatically used * to free mem used by a message when the message is deleted. * * \param pMsg * * \sa logOpen */ void _logFreeMsg( void *pMsg ) { HLOGMSG hMsg = (HLOGMSG)pMsg; if ( !hMsg ) return; /* free msg memory */ if ( hMsg->pszModuleName != NULL ) free(hMsg->pszModuleName); if ( hMsg->pszFunctionName != NULL ) free(hMsg->pszFunctionName); if ( hMsg->pszMessage != NULL ) free(hMsg->pszMessage); free( hMsg ); } unixODBC-2.2.14-p2/log/logClear.c0100644000076400007640000000134510723056020014650 0ustar nicknick#include "log.h" /*! * \brief Clear all log messages. * * \param hLog * * \return int * \retval LOG_ERROR * \retval LOG_SUCCESS * * \sa logOpen * logClose */ int logClear( HLOG hLog ) { /* we have to be logOpen to logClear messages */ if ( !hLog ) return LOG_ERROR; /* We rely upon a callback being set to handle clearing mem used by each msg. This should be set in logOpen but just in case - we check it here. */ if ( !hLog->hMessages->pFree ) return LOG_ERROR; /* go to last message and delete until no more messages */ lstLast( hLog->hMessages ); while ( !lstEOL( hLog->hMessages ) ) { lstDelete( hLog->hMessages ); } return LOG_SUCCESS; } unixODBC-2.2.14-p2/log/logClose.c0100644000076400007640000000251410723054453014676 0ustar nicknick/********************************************************************** * logClose * * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "log.h" /*! * \brief Closes log. * * This will clear all messages and close the log. All memory used * by the messages is automatically freed by calls to _logFreeMsg. * All remaining mem used by the log is also freed - including the * log handle itself. * * \param hLog A log handle init by \sa logOpen. * * \return int * \retval LOG_SUCCESS * * \sa logOpen */ int logClose( HLOG hLog ) { /* we must be logOpen to logClose */ if ( !hLog ) return LOG_ERROR; /* clear all messages - including the handle */ /* _logFreeMsg will automatically be called for each msg */ lstClose( hLog->hMessages ); /* free remaining mem used by log - including the handle */ if ( hLog->pszProgramName ) free( hLog->pszProgramName ); if ( hLog->pszLogFile ) free( hLog->pszLogFile ); free( hLog ); return LOG_SUCCESS; } unixODBC-2.2.14-p2/log/logOn.c0100644000076400007640000000203510723054453014203 0ustar nicknick/********************************************************************** * logOn * * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "log.h" /*! * \brief Turn logging on/off. * * Logging is turned OFF by default. Turn it on when you want * logged messages to be stored. Turn it back off when you want to * 'pause' logging. * * This may be used during debugging sessions to reduce clutter * in the log results. * * \param hLog * \param bOn * * \return int * \retval LOG_SUCCESS * * \sa logOpen * logClose */ int logOn( HLOG hLog, int bOn ) { /* log must be logOpen to logOn */ if ( !hLog ) return LOG_ERROR; hLog->bOn = bOn; return LOG_SUCCESS; } unixODBC-2.2.14-p2/log/logOpen.c0100644000076400007640000000411610723054453014532 0ustar nicknick/********************************************************************** * logOpen * * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "log.h" /*! * \brief Open (init) a log (hLog). * * This function must be called before any other in this API. * _logFreeMsg is applied to the log to ensure that all message * mem is freed. * * \param phLog Output. Log handle returned here. * \param pszProgramName Input. Default program name. This is attached to * each message when written to file. It is only used * if a viable pszLogFile given. Can be NULL. * \param pszLogFile Input. File name of log file. Can be NULL. * \param nMaxMsgs Input. Max messages to store. When this limit is * reached - oldest message will be deleted. This * can be set to 0 to remove any limit. * * \return int * \retval LOG_ERROR * \retval LOG_SUCCESS * * \sa logClose */ int logOpen( HLOG *phLog, char *pszProgramName, char *pszLogFile, long nMaxMsgs ) { /* sanity check */ if ( !phLog ) return LOG_ERROR; /* LOG STRUCT */ *phLog = malloc( sizeof(LOG) ); (*phLog)->nMaxMsgs = nMaxMsgs; (*phLog)->hMessages = lstOpen(); (*phLog)->bOn = 0; (*phLog)->pszLogFile = NULL; (*phLog)->pszProgramName = NULL; /* each msg will be freed when deleted by this (_logFreeMsg) callback */ lstSetFreeFunc( (*phLog)->hMessages, _logFreeMsg ); /* PROGRAM NAME */ if ( pszProgramName ) (*phLog)->pszProgramName = (char *)strdup( pszProgramName ); else (*phLog)->pszProgramName = (char *)strdup( "UNKNOWN" ); /* LOG FILE */ if ( pszLogFile ) (*phLog)->pszLogFile = (char*)strdup( pszLogFile ); return LOG_SUCCESS; } unixODBC-2.2.14-p2/log/logPeekMsg.c0100644000076400007640000000333510723056020015156 0ustar nicknick/********************************************************************** * logPopMsg * * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "log.h" /*! * \brief Returns a specific message. * * This returns a reference to a specific message and does * NOT delete the message or remove it from the log. This is * good for 'peeking' at messages in the stack. * * \param hLog Input. Viable log handle. * \param nMsg Input. This is the index to the desired message. The * index is 1 based with 1 being the oldest message. * \param phMsg Output. A reference to the message in the log. This * message is still maintained/owned by the log. The * reference is only valid until some other code modifies * the log. * * \return int * \retval LOG_NO_DATA No message at nMsg. * \retval LOG_ERROR * \retval LOG_SUCCESS * * \sa logPopMsg */ int logPeekMsg( HLOG hLog, long nMsg, HLOGMSG *phMsg ) { /* we must be logOpen to logPeekMsg */ if ( !hLog ) return LOG_ERROR; /* get reference */ /* \todo This can be terribly slow as we scan for each call. We may want to implement this over a vector instead of a list. */ *phMsg = (HLOGMSG)lstGoto( hLog->hMessages, nMsg - 1 ); /* was it found? */ if ( lstEOL( hLog->hMessages ) ) return LOG_NO_DATA; return LOG_SUCCESS; } unixODBC-2.2.14-p2/log/logPopMsg.c0100644000076400007640000000233110723054453015033 0ustar nicknick/********************************************************************** * logPopMsg * * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "log.h" /*! * \brief Removes the oldest message from the log. * * The log is a FIFO stack and we implement a possible max on the * number of messages we can store. When we hot the max we 'pop' * a message out. The mem used by the message is automatically * freed with a call to \sa _logFreeMsg. * * \param hLog * * \return int * \retval LOG_NO_DATA * \retval LOG_ERROR * \retval LOG_SUCCESS * * \sa logPushMsg * logPeekMsg */ int logPopMsg( HLOG hLog ) { /* we must be logOpen to logPopMsg */ if ( !hLog ) return LOG_ERROR; /* FIFO */ lstFirst( hLog->hMessages ); /* do we have a message to delete? */ if ( lstEOL( hLog->hMessages ) ) return LOG_NO_DATA; return lstDelete( hLog->hMessages ); } unixODBC-2.2.14-p2/log/logPushMsg.c0100644000076400007640000001366611012310442015212 0ustar nicknick/********************************************************************** * logPushMsg * * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "log.h" #include "ini.h" /* Define this as a fall through, HAVE_STDARG_H is probably already set */ /*#define HAVE_VARARGS_H*/ /* varargs declarations: */ #if defined(HAVE_STDARG_H) # include #define VA_LOCAL_DECL va_list ap #define VA_START(f) va_start(ap, f) #define VA_SHIFT(v,t) ; /* no-op for ANSI */ #define VA_END va_end(ap) #else #if defined(HAVE_VARARGS_H) #define VA_LOCAL_DECL va_list ap #define VA_START(f) va_start(ap) /* f is ignored! */ #define VA_SHIFT(v,t) v = va_arg(ap,t) #define VA_END va_end(ap) #else #error No variable argument support #endif #endif #ifndef HAVE_VSNPRINTF int uodbc_vsnprintf (char *str, size_t count, const char *fmt, va_list args); #endif int logPushMsg( HLOG hLog, char *pszModule, char *pszFunctionName, int nLine, int nSeverity, int nCode, char *pszMessage ) { HLOGMSG hMsg; FILE *hFile; if ( !hLog ) return LOG_ERROR; if ( !hLog->hMessages ) return LOG_ERROR; if ( !hLog->bOn ) return LOG_SUCCESS; if ( !pszModule ) return LOG_ERROR; if ( !pszFunctionName ) return LOG_ERROR; if ( !pszMessage ) return LOG_ERROR; /* check for, and handle, max msg */ if ( hLog->nMaxMsgs && hLog->hMessages->nItems >= hLog->nMaxMsgs ) logPopMsg( hLog ); hMsg = malloc( sizeof(LOGMSG) ); if (!hMsg) goto error_abort0; hMsg->pszModuleName = (char *)strdup( pszModule ); if (!hMsg->pszModuleName) goto error_abort1; hMsg->pszFunctionName = (char *)strdup( pszFunctionName ); if (!hMsg->pszFunctionName) goto error_abort2; hMsg->pszMessage = (char *)strdup( pszMessage ); if (!hMsg->pszMessage) goto error_abort3; hMsg->nLine = nLine; hMsg->nSeverity = nSeverity; hMsg->nCode = nCode; /* append to list */ lstAppend( hLog->hMessages, hMsg ); /* append to file */ if ( hLog->pszLogFile ) { hFile = uo_fopen( hLog->pszLogFile, "a" ); if ( !hFile ) return LOG_ERROR; uo_fprintf( hFile, "[%s][%s][%s][%d]%s\n", hLog->pszProgramName, pszModule, pszFunctionName, nLine, pszMessage ); uo_fclose( hFile ); } return LOG_SUCCESS; error_abort3: free(hMsg->pszFunctionName); error_abort2: free(hMsg->pszModuleName); error_abort1: free(hMsg); error_abort0: return LOG_ERROR; } int logvPushMsgf( HLOG hLog, char *pszModule, char *pszFunctionName, int nLine, int nSeverity, int nCode, char *pszMessageFormat, va_list args ) { HLOGMSG hMsg=NULL; FILE *hFile; int mlen=0; if ( !hLog ) return LOG_ERROR; if ( !hLog->hMessages ) return LOG_ERROR; if ( !hLog->bOn ) return LOG_SUCCESS; if ( !pszModule ) return LOG_ERROR; if ( !pszFunctionName ) return LOG_ERROR; if ( !pszMessageFormat ) return LOG_ERROR; /* check for, and handle, max msg */ if ( hLog->nMaxMsgs && hLog->hMessages->nItems == hLog->nMaxMsgs ) logPopMsg( hLog ); hMsg = malloc( sizeof(LOGMSG) ); if (!hMsg) goto error_abort0; hMsg->pszModuleName = (char *)strdup( pszModule ); if (!hMsg->pszModuleName) goto error_abort1; hMsg->pszFunctionName = (char *)strdup( pszFunctionName ); if (!hMsg->pszFunctionName) goto error_abort2; #if defined( HAVE_VSNPRINTF ) mlen=vsnprintf(NULL,0,pszMessageFormat,args); #else mlen=uodbc_vsnprintf(NULL,0,pszMessageFormat,args); #endif mlen++; hMsg->pszMessage = malloc(mlen); if (!hMsg->pszMessage) goto error_abort3; #if defined( HAVE_VSNPRINTF ) vsnprintf(hMsg->pszMessage,mlen,pszMessageFormat,args); #else uodbc_vsnprintf(hMsg->pszMessage,mlen,pszMessageFormat,args); #endif hMsg->nLine = nLine; hMsg->nSeverity = nSeverity; hMsg->nCode = nCode; /* append to list */ lstAppend( hLog->hMessages, hMsg ); /* append to file */ if ( hLog->pszLogFile ) { hFile = uo_fopen( hLog->pszLogFile, "a" ); if ( !hFile ) return LOG_ERROR; if (hMsg) { uo_fprintf( hFile, "[%s][%s][%s][%d]%s\n", hLog->pszProgramName, pszModule, pszFunctionName, nLine, hMsg->pszMessage ); } else { uo_fprintf( hFile, "[%s][%s][%s][%d]", hLog->pszProgramName, pszModule, pszFunctionName, nLine ); uo_vfprintf( hFile, pszMessageFormat, args ); uo_fprintf( hFile, "\n" ); } uo_fclose( hFile ); } return LOG_SUCCESS; error_abort3: free(hMsg->pszFunctionName); error_abort2: free(hMsg->pszModuleName); error_abort1: free(hMsg); error_abort0: return LOG_ERROR; } #ifdef HAVE_STDARGS int logPushMsgf( HLOG hLog, char *pszModule, char *pszFunctionName, int nLine, int nSeverity, int nCode, char *pszMessageFormat, ... ) #else int logPushMsgf( va_alist ) va_dcl #endif { int err; #ifndef HAVE_STDARGS HLOG hLog; char *pszModule; char *pszFunctionName; int nLine; int nSeverity; int nCode; char *pszMessageFormat; #endif VA_LOCAL_DECL; VA_START (pszMessageFormat); VA_SHIFT (hLog, HLOG); VA_SHIFT (pszModule, char *); VA_SHIFT (pszFunctionName, char *); VA_SHIFT (nLine, int ); VA_SHIFT (nSeverity, int ); VA_SHIFT (nCode, int ); VA_SHIFT (pszMessageFormat, char *); err=logvPushMsgf(hLog,pszModule,pszFunctionName,nLine,nSeverity,nCode,pszMessageFormat,ap); VA_END; return err; } unixODBC-2.2.14-p2/lst/0040755000076400007640000000000011150523331012774 5ustar nicknickunixODBC-2.2.14-p2/lst/README0100644000076400007640000000257407716453673013711 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * * * * Peter Harvey 04.APR.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | LST lib (liblst.so) | +-------------------------------------------------------------+ README Description: A linked list lib. Provides user with a set of very easy to use and proven functions for a doubly-linked list. Supports the creation of cursor sets which may, optionally, be based upon a user supplied filter function. Concurrency is handled to a certian extent but this lib is no substitute for the fine concurrency handling of a full DBMS. +-------------------------------------------------------------+ | Peter Harvey | | pharvey@codebydesign.com | | www.unixodbc.org | | 16.APR.99 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/lst/Makefile.am0100644000076400007640000000102311025707677015043 0ustar nicknicknoinst_LTLIBRARIES = liblstlc.la INCLUDES = -I@top_srcdir@/include liblstlc_la_LDFLAGS = -no-undefined liblstlc_la_SOURCES = \ _lstAdjustCurrent.c \ _lstDump.c \ _lstFreeItem.c \ _lstNextValidItem.c \ _lstPrevValidItem.c \ _lstVisible.c \ lstAppend.c \ lstClose.c \ lstDelete.c \ lstEOL.c \ lstFirst.c \ lstGet.c \ lstGetBookMark.c \ lstGoto.c \ lstGotoBookMark.c \ lstInsert.c \ lstLast.c \ lstNext.c \ lstOpen.c \ lstOpenCursor.c \ lstPrev.c \ lstSeek.c \ lstSeekItem.c \ lstSet.c \ lstSetFreeFunc.c unixODBC-2.2.14-p2/lst/Makefile.in0100644000076400007640000004152211111035261015037 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = lst DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ChangeLog TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) liblstlc_la_LIBADD = am_liblstlc_la_OBJECTS = _lstAdjustCurrent.lo _lstDump.lo \ _lstFreeItem.lo _lstNextValidItem.lo _lstPrevValidItem.lo \ _lstVisible.lo lstAppend.lo lstClose.lo lstDelete.lo lstEOL.lo \ lstFirst.lo lstGet.lo lstGetBookMark.lo lstGoto.lo \ lstGotoBookMark.lo lstInsert.lo lstLast.lo lstNext.lo \ lstOpen.lo lstOpenCursor.lo lstPrev.lo lstSeek.lo \ lstSeekItem.lo lstSet.lo lstSetFreeFunc.lo liblstlc_la_OBJECTS = $(am_liblstlc_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(liblstlc_la_SOURCES) DIST_SOURCES = $(liblstlc_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_LTLIBRARIES = liblstlc.la INCLUDES = -I@top_srcdir@/include liblstlc_la_LDFLAGS = -no-undefined liblstlc_la_SOURCES = \ _lstAdjustCurrent.c \ _lstDump.c \ _lstFreeItem.c \ _lstNextValidItem.c \ _lstPrevValidItem.c \ _lstVisible.c \ lstAppend.c \ lstClose.c \ lstDelete.c \ lstEOL.c \ lstFirst.c \ lstGet.c \ lstGetBookMark.c \ lstGoto.c \ lstGotoBookMark.c \ lstInsert.c \ lstLast.c \ lstNext.c \ lstOpen.c \ lstOpenCursor.c \ lstPrev.c \ lstSeek.c \ lstSeekItem.c \ lstSet.c \ lstSetFreeFunc.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lst/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lst/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 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 liblstlc.la: $(liblstlc_la_OBJECTS) $(liblstlc_la_DEPENDENCIES) $(LINK) $(liblstlc_la_LDFLAGS) $(liblstlc_la_OBJECTS) $(liblstlc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lstAdjustCurrent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lstDump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lstFreeItem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lstNextValidItem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lstPrevValidItem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lstVisible.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstAppend.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstClose.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstDelete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstEOL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstFirst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstGet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstGetBookMark.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstGoto.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstGotoBookMark.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstInsert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstLast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstNext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstOpen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstOpenCursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstPrev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstSeek.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstSeekItem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstSet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstSetFreeFunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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: 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) 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-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .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-exec \ install-exec-am install-info install-info-am install-man \ 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-info-am # 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: unixODBC-2.2.14-p2/lst/ChangeLog0100644000076400007640000000111307363332174014555 0ustar nicknick1999-04-30 Peter Harvey * bVisible: Added bVisible to HLSTITEM and it is used by nav funcs. 1999-04-28 Peter Harvey * lstOpen: Now inits nItem to 0 (got removed somehow) 1999-04-21 Peter Harvey * _lstDump: Added 1999-04-15 Peter Harvey * All: Added lstOpenCursor and cursor support (still needs locking) 1999-04-07 Peter Harvey * BookMarks: Added 1999-04-04 Peter Harvey * ChangeLog: Started ChangeLog unixODBC-2.2.14-p2/lst/TODO0100644000076400007640000000244707363332174013506 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * * * * Peter Harvey 04.APR.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | LST lib (liblst.so) | +-------------------------------------------------------------+ TODO 1. Improve the handling of concurrency issues. 2. Add support for user defined sort function. 3. Enhance lstSeek() so as to use sort order to improve search efficiency. 4. Improve handling of serious errors where memory is likely to be lost... for example printf a message. +-------------------------------------------------------------+ | Peter Harvey | | pharvey@codebydesign.com | | www.genix.net/unixODBC | | 16.APR.99 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/lst/_lstAdjustCurrent.c0100644000076400007640000000146707363332174016642 0ustar nicknick#include "lst.h" /*************************** * ENSURE CURRENT IS NOT ON A bDelete ITEM * * 1. Should only be required for root list. ***************************/ void *_lstAdjustCurrent( HLST hLst ) { HLSTITEM h; if ( !hLst ) return NULL; if ( !hLst->hCurrent ) return NULL; if ( _lstVisible( hLst->hCurrent ) ) return hLst->hCurrent; h = hLst->hCurrent; while ( !_lstVisible( hLst->hCurrent ) && hLst->hCurrent->pPrev ) { hLst->hCurrent = hLst->hCurrent->pPrev; } if ( _lstVisible( hLst->hCurrent ) ) return hLst->hCurrent; hLst->hCurrent = h; while ( !_lstVisible( hLst->hCurrent ) && hLst->hCurrent->pNext ) { hLst->hCurrent = hLst->hCurrent->pNext; } if ( _lstVisible( hLst->hCurrent ) ) return hLst->hCurrent; hLst->hCurrent = NULL; return NULL; } unixODBC-2.2.14-p2/lst/_lstDump.c0100644000076400007640000000121707363332174014743 0ustar nicknick#include "lst.h" void _lstDump( HLST hLst ) { HLSTITEM hItem; int nItem = 0; printf( "LST - BEGIN DUMP\n" ); if ( hLst ) { printf( "\thLst = %p\n", hLst ); printf( "\t\thLst->hLstBase = %p\n", hLst->hLstBase ); hItem = hLst->hFirst; while ( hItem ) { printf( "\t%d\n", nItem ); printf( "\t\thItem = %p\n", hItem ); printf( "\t\thItem->bDelete = %d\n", hItem->bDelete ); printf( "\t\thItem->bHide = %d\n", hItem->bHide ); printf( "\t\thItem->pData = %p\n", hItem->pData ); printf( "\t\thItem->hLst = %p\n", hItem->hLst ); nItem++; hItem = hItem->pNext; } } printf( "LST - END DUMP\n" ); } unixODBC-2.2.14-p2/lst/_lstFreeItem.c0100644000076400007640000000320607363332174015536 0ustar nicknick#include "lst.h" /*************************** * _lstFreeItem * * 1. FREES MEMORY USED BY THE LIST ITEM AND REMOVES IT FROM ITS LIST * 2. WILL CLEAN UP root ITEM IF REQUIRED.. NEVER SETS bDelete... lstDelete DOES SET bDelete * 3. CALLS _lstAdjustCurrent TO ENSURE THAT CURRENT DOES NOT END UP ON bDelete ITEM ***************************/ int _lstFreeItem( HLSTITEM hItem ) { HLST hLst; HLSTITEM hItemRoot; HLSTITEM hNewCurrent = NULL; if ( !hItem ) return LST_ERROR; hLst = (HLST)hItem->hLst; /************* * FREE root ITEM AS REQUIRED *************/ if ( hLst->hLstBase ) { hItemRoot = (HLSTITEM)hItem->pData; /************* * dec ref count in root item *************/ hItemRoot->nRefs--; /************* * DELETE root ITEM IF REF = 0 AND SOMEONE SAID DELETE IT *************/ if ( hItemRoot->nRefs < 1 && hItemRoot->bDelete ) { _lstFreeItem( hItemRoot ); } } /************* * WE ALWAYS FREE hItem *************/ if ( hItem->pData && hLst->pFree ) hLst->pFree( hItem->pData ); if ( !hItem->bDelete ) /* THIS IS REALLY ONLY A FACTOR FOR ROOT ITEMS */ hLst->nItems--; if ( hItem == hLst->hFirst ) hLst->hFirst = hItem->pNext; if ( hItem == hLst->hLast ) hLst->hLast = hItem->pPrev; if ( hItem->pPrev ) { hItem->pPrev->pNext = hItem->pNext; if ( hItem == hLst->hCurrent ) hNewCurrent = hItem->pPrev; } if ( hItem->pNext ) { hItem->pNext->pPrev = hItem->pPrev; if ( !hNewCurrent && hItem == hLst->hCurrent ) hNewCurrent = hItem->pNext; } free( hItem ); hLst->hCurrent = hNewCurrent; _lstAdjustCurrent( hLst ); return LST_SUCCESS; } unixODBC-2.2.14-p2/lst/_lstNextValidItem.c0100644000076400007640000000045107363332174016552 0ustar nicknick#include "lst.h" HLSTITEM _lstNextValidItem( HLST hLst, HLSTITEM hItem ) { if ( !hLst ) return NULL; if ( !hItem ) return NULL; hItem = hItem->pNext; while ( hItem ) { if ( _lstVisible( hItem ) ) return hItem; hItem = hItem->pNext; } return NULL; } unixODBC-2.2.14-p2/lst/_lstPrevValidItem.c0100644000076400007640000000045207363332174016551 0ustar nicknick#include "lst.h" HLSTITEM _lstPrevValidItem( HLST hLst, HLSTITEM hItem ) { if ( !hLst ) return NULL; if ( !hItem ) return NULL; hItem = hItem->pPrev; while ( hItem ) { if ( _lstVisible( hItem ) ) return hItem; hItem = hItem->pPrev; } return NULL; } unixODBC-2.2.14-p2/lst/_lstVisible.c0100644000076400007640000000044207363332174015432 0ustar nicknick#include "lst.h" int _lstVisible( HLSTITEM hItem ) { HLST hLst; if ( !hItem ) return false; hLst = (HLST)hItem->hLst; if ( hItem->bDelete && hLst->bShowDeleted == false ) return false; if ( hItem->bHide && hLst->bShowHidden == false ) return false; return true; } unixODBC-2.2.14-p2/lst/lstAppend.c0100644000076400007640000000300307676016252015104 0ustar nicknick#include "lst.h" /************************* * lstAppend * * 1. APPEND TO BASE LIST IF hLst IS A CURSOR * 2. APPEND REF TO THIS LIST *************************/ int lstAppend( HLST hLst, void *pData ) { HLSTITEM hItem; if ( !hLst ) return LST_ERROR; /********************** * CREATE AN ITEM **********************/ hItem = (HLSTITEM) malloc( sizeof(LSTITEM) ); if ( !hItem ) return LST_ERROR; hItem->bDelete = false; hItem->bHide = false; hItem->hLst = hLst; hItem->nRefs = 0; hItem->pData = NULL; hItem->pNext = NULL; hItem->pPrev = NULL; if ( hLst->hLstBase ) { /********************** * WE ARE A CURSOR LIST SO... * 1. ADD TO BASE LIST * 2. ADD TO THIS LIST (ref to base list) **********************/ lstAppend( hLst->hLstBase, pData ); hItem->pData = hLst->hLstBase->hCurrent; hLst->hLstBase->hCurrent->nRefs++; _lstAppend( hLst, hItem ); } else { /********************** * WE ARE THE ROOT SO... * 1. ADD TO THIS LIST **********************/ hItem->pData = pData; _lstAppend( hLst, hItem ); } return LST_SUCCESS; } /************************* * SIMPLY CONNECTS THE LINKS/POINTERS AND SETS CURRENT *************************/ int _lstAppend( HLST hLst, HLSTITEM hItem ) { if ( hLst->hFirst ) { hItem->pPrev = hLst->hLast; hLst->hLast->pNext = hItem; hLst->hLast = hItem; } else { hItem->pPrev = NULL; hLst->hFirst = hItem; hLst->hLast = hItem; } hLst->hCurrent = hItem; hLst->nItems++; return LST_SUCCESS; } unixODBC-2.2.14-p2/lst/lstClose.c0100644000076400007640000000222407363332174014743 0ustar nicknick#include "lst.h" /********************* * lstClose * * Call for Cursor or root list. *********************/ int lstClose( HLST hLst ) { HLSTITEM hItem; if ( !hLst ) return LST_ERROR; hLst->nRefs--; /********************* * We will not really remove the list if we have * refs to it... we will just decrement ref. * We will be deleted when the last ref is being removed. *********************/ if ( hLst->nRefs > 0 ) return LST_SUCCESS; /************************ * DELETE ITEMS (and their refs) * - do not use standard nav funcs because they will skip items where bDelete ************************/ hItem = hLst->hFirst; while ( hItem ) { _lstFreeItem( hItem ); hItem = hLst->hFirst; } /************************ * RECURSE AS REQUIRED. RECURSION WILL STOP AS SOON AS WE GET TO A LIST WHICH * DOES NOT NEED TO BE DELETED YET (refs >= 0). ************************/ if ( hLst->hLstBase ) /* we are a cursor */ lstClose( hLst->hLstBase ); /* dec ref count and close if < 0 */ /************************ * FREE LIST HANDLE ************************/ free( hLst ); return LST_SUCCESS; } unixODBC-2.2.14-p2/lst/lstDelete.c0100644000076400007640000000275607363332174015112 0ustar nicknick#include "lst.h" int _lstDeleteFlag( HLSTITEM hItem ); /*********************** * lstDelete * * Do not call unless you want to delete the item * from the cursor (if the list is one) **AND** the * root list. In other words; this should not be * called from functions such as lstClose() which * desire to simply free memory used by a specific * the list. * * This is the only function to set bDelete in the root * item (as required). * * lstFreeItem will decrement ref counters and do a real * delete when refs are 0. ************************/ int lstDelete( HLST hLst ) { HLSTITEM hItem = NULL; HLSTITEM hItemRoot = NULL; if ( !hLst ) return LST_ERROR; hItem = hLst->hCurrent; if ( !hItem ) return LST_ERROR; /********************* * ARE WE A CURSOR LIST *********************/ if ( hLst->hLstBase ) { hItemRoot = (HLSTITEM)hItem->pData; _lstDeleteFlag( hItemRoot ); return _lstFreeItem( hItem ); } /********************* * WE ARE root LIST. CHECK FOR REFS BEFORE CALLING FREE *********************/ _lstDeleteFlag( hItem ); if ( hItem->nRefs < 1 ) return _lstFreeItem( hItem ); return LST_SUCCESS; } /*************************** * FLAG FOR DELETE (should only be called if root list) ***************************/ int _lstDeleteFlag( HLSTITEM hItem ) { HLST hLst; hLst = (HLST)hItem->hLst; if ( !hItem->bDelete ) hLst->nItems--; hItem->bDelete = true; if ( hLst->hCurrent == hItem ) _lstAdjustCurrent( hLst ); return true; } unixODBC-2.2.14-p2/lst/lstEOL.c0100644000076400007640000000021607363332174014314 0ustar nicknick#include "lst.h" int lstEOL( HLST hLst ) { if ( !hLst ) return true; if ( !hLst->hCurrent ) return true; return false; } unixODBC-2.2.14-p2/lst/lstFirst.c0100644000076400007640000000045007363332174014764 0ustar nicknick#include "lst.h" void *lstFirst( HLST hLst ) { if ( !hLst ) return NULL; if ( !hLst->hFirst ) return NULL; if ( !_lstVisible( hLst->hFirst ) ) hLst->hCurrent = _lstNextValidItem( hLst, hLst->hFirst ); else hLst->hCurrent = hLst->hFirst; return hLst->hCurrent; } unixODBC-2.2.14-p2/lst/lstGet.c0100644000076400007640000000071107363332174014414 0ustar nicknick#include "lst.h" /* * */ void *lstGet( HLST hLst ) { HLSTITEM hItem; if ( !hLst ) return NULL; if ( !hLst->hCurrent ) return NULL; if ( hLst->hLstBase ) hItem = (HLSTITEM)hLst->hCurrent->pData; /* cursor pData points directly to the root Item (not the roots pData) */ else /* a cursor may be based upon another cursor but pData is always ptr to root item */ hItem = hLst->hCurrent; return hItem->pData; } unixODBC-2.2.14-p2/lst/lstGetBookMark.c0100644000076400007640000000042607363332174016045 0ustar nicknick#include "lst.h" int lstGetBookMark( HLST hLst, HLSTBOOKMARK hLstBookMark ) { if ( !hLst ) return LST_ERROR; if ( !hLstBookMark ) return LST_ERROR; hLstBookMark->hCurrent = hLst->hCurrent; hLstBookMark->hLst = hLst; return LST_SUCCESS; } unixODBC-2.2.14-p2/lst/lstGoto.c0100644000076400007640000000175010723054415014602 0ustar nicknick#include "lst.h" /*! * \brief Returns the data stored at nIndex. * * This does a scan from first-to-last until nIndex or until EOL. This * can be slow if there are many items in the list. * * This does not return the item handle - it returns the user data stored * in the item. * * When done; the current item is either the item at nIndex or EOL. * * \param hLst Input. Viable list handle. * \param nIndex Input. 0-based index of the desired item. * * \return void* * \retval NULL Item at index could not be found - effectively data is NULL. * \retval !NULL Reference to the data stored at nIndex */ void *lstGoto( HLST hLst, long nIndex ) { long n = 0; if ( !hLst ) return NULL; lstFirst( hLst ); while ( n <= nIndex ) { if ( lstEOL( hLst ) ) break; if ( n == nIndex ) return hLst->hCurrent->pData; n++; lstNext( hLst ); } return NULL; } unixODBC-2.2.14-p2/lst/lstGotoBookMark.c0100644000076400007640000000032007363332174016227 0ustar nicknick#include "lst.h" int lstGotoBookMark( HLSTBOOKMARK hLstBookMark ) { if ( !hLstBookMark ) return LST_ERROR; hLstBookMark->hLst->hCurrent = hLstBookMark->hCurrent; return LST_SUCCESS; } unixODBC-2.2.14-p2/lst/lstInsert.c0100644000076400007640000000334607363332174015150 0ustar nicknick#include "lst.h" int lstInsert( HLST hLst, void *pData ) { HLSTITEM hItem; if ( !hLst ) return LST_ERROR; if ( !hLst->hCurrent ) return lstAppend( hLst, pData ); /********************** * CREATE AN ITEM **********************/ hItem = malloc( sizeof(LSTITEM) ); if ( !hItem ) return LST_ERROR; hItem->bDelete = false; hItem->bHide = false; hItem->hLst = hLst; hItem->nRefs = 0; hItem->pData = NULL; hItem->pNext = NULL; hItem->pPrev = NULL; if ( hLst->hLstBase ) { /********************** * WE ARE A CURSOR LIST SO... * 1. ADD TO BASE LIST * 2. inc BASE LIST ITEM REF COUNT * 3. ADD TO THIS LIST (ref to base list) **********************/ lstInsert( hLst->hLstBase, pData ); /* !!! INSERT POS IN BASE LIST IS UNPREDICTABLE !!! */ /* BECAUSE hCurrent MAY HAVE CHANGED AND WE */ /* ARE NOT TRYING TO PUT IT BACK */ hItem->pData = hLst->hLstBase->hCurrent; hLst->hLstBase->hCurrent->nRefs++; _lstInsert( hLst, hItem ); } else { /********************** * WE ARE THE ROOT SO... * 1. ADD TO THIS LIST **********************/ hItem->pData = pData; _lstInsert( hLst, hItem ); } return LST_SUCCESS; } /************************* * SIMPLY CONNECTS THE LINKS/POINTERS AND SETS CURRENT *************************/ int _lstInsert( HLST hLst, HLSTITEM hItem ) { if ( !hLst->hCurrent ) return _lstAppend( hLst, hItem ); hItem->pPrev = hLst->hCurrent->pPrev; hItem->pNext = hLst->hCurrent; if ( hLst->hCurrent->pPrev ) hLst->hCurrent->pPrev->pNext = hItem; hLst->hCurrent->pPrev = hItem; if ( hLst->hCurrent == hLst->hFirst ) hLst->hFirst = hItem; hLst->hCurrent = hItem; hLst->nItems++; return LST_SUCCESS; } unixODBC-2.2.14-p2/lst/lstLast.c0100644000076400007640000000044307363332174014602 0ustar nicknick#include "lst.h" void *lstLast( HLST hLst ) { if ( !hLst ) return NULL; if ( !hLst->hLast ) return NULL; if ( !_lstVisible( hLst->hLast ) ) hLst->hCurrent = _lstPrevValidItem( hLst, hLst->hLast ); else hLst->hCurrent = hLst->hLast; return hLst->hCurrent; } unixODBC-2.2.14-p2/lst/lstNext.c0100644000076400007640000000051107363332174014611 0ustar nicknick#include "lst.h" void *lstNext( HLST hLst ) { if ( !hLst ) return NULL; if ( !hLst->hCurrent ) return NULL; hLst->hCurrent = hLst->hCurrent->pNext; if ( hLst->hCurrent ) { if ( !_lstVisible( hLst->hCurrent ) ) hLst->hCurrent = _lstNextValidItem( hLst, hLst->hCurrent ); } return hLst->hCurrent; } unixODBC-2.2.14-p2/lst/lstOpen.c0100644000076400007640000000072607363332174014604 0ustar nicknick#include "lst.h" HLST lstOpen() { HLST hLst = NULL; hLst = malloc( sizeof(LST) ); if ( hLst ) { hLst->bExclusive = false; hLst->hCurrent = NULL; hLst->hFirst = NULL; hLst->hLast = NULL; hLst->hLstBase = NULL; hLst->nRefs = 1; /* someone created us so lets assume that it counts as one ref */ hLst->pFilter = NULL; hLst->pFree = free; hLst->nItems = 0; hLst->bShowDeleted = false; hLst->bShowHidden = false; } return hLst; } unixODBC-2.2.14-p2/lst/lstOpenCursor.c0100644000076400007640000000205307363332174015775 0ustar nicknick#include "lst.h" HLST lstOpenCursor( HLST hBase, int (*pFilterFunc)( HLST, void * ), void *pExtras ) { HLST hLst = NULL; if ( !hBase ) return NULL; /************************* * CREATE A NEW LIST *************************/ hLst = lstOpen(); if ( !hLst ) return NULL; hBase->nRefs++; hLst->pFilter = pFilterFunc; hLst->pFree = NULL; /* never free pData in a cursor */ hLst->pExtras = pExtras; /************************* * ADD ITEMS FROM hBase (skipping any bDelete items) *************************/ lstFirst( hBase ); if ( pFilterFunc ) { while ( !lstEOL( hBase ) ) { if ( pFilterFunc( hLst, lstGet( hBase ) ) ) lstAppend( hLst, hBase->hCurrent ); lstNext( hBase ); } } else { while ( !lstEOL( hBase ) ) { lstAppend( hLst, hBase->hCurrent ); lstNext( hBase ); } } /************************* * THIS *MUST* BE DONE AFTER THE LIST IS LOADED * OTHERWISE lstAppend() WILL APPEND INTO ROOT LIST AND MAKE A REF IN THIS LIST *************************/ hLst->hLstBase = hBase; return hLst; } unixODBC-2.2.14-p2/lst/lstPrev.c0100644000076400007640000000051307363332174014611 0ustar nicknick#include "lst.h" void *lstPrev( HLST hLst ) { if ( !hLst ) return NULL; if ( !hLst->hCurrent ) return NULL; hLst->hCurrent = hLst->hCurrent->pPrev; if ( hLst->hCurrent ) { if ( !_lstVisible( hLst->hCurrent ) ) hLst->hCurrent = _lstPrevValidItem( hLst, hLst->hCurrent ); } return hLst->hCurrent; } unixODBC-2.2.14-p2/lst/lstSeek.c0100644000076400007640000000036307363332174014567 0ustar nicknick#include "lst.h" int lstSeek( HLST hLst, void *pData ) { if ( !hLst ) return false; lstFirst( hLst ); while ( !lstEOL( hLst ) ) { if ( lstGet( hLst ) == pData ) return true; lstNext( hLst ); } return false; } unixODBC-2.2.14-p2/lst/lstSeekItem.c0100644000076400007640000000037207363332174015406 0ustar nicknick#include "lst.h" int lstSeekItem( HLST hLst, HLSTITEM hItem ) { if ( !hLst ) return false; lstFirst( hLst ); while ( !lstEOL( hLst ) ) { if ( hLst->hCurrent == hItem ) return true; lstNext( hLst ); } return false; } unixODBC-2.2.14-p2/lst/lstSet.c0100644000076400007640000000076607363332174014442 0ustar nicknick#include "lst.h" void *lstSet( HLST hLst, void *pData ) { HLSTITEM hItem; HLST hLstRoot; if ( !hLst ) return NULL; if ( !hLst->hCurrent ) return NULL; if ( hLst->hLstBase ) hItem = (HLSTITEM)hLst->hCurrent->pData; else hItem = hLst->hCurrent; hLstRoot = (HLST)hItem->hLst; /************************** * SET VALUE **************************/ if ( hItem->pData && hLstRoot->pFree ) hLstRoot->pFree( hItem->pData ); hItem->pData = pData; return pData; } unixODBC-2.2.14-p2/lst/lstSetFreeFunc.c0100644000076400007640000000023207363332174016044 0ustar nicknick#include "lst.h" int lstSetFreeFunc( HLST hLst, void (*pFree)( void *pData ) ) { if ( !hLst ) return false; hLst->pFree = pFree; return true; } unixODBC-2.2.14-p2/ini/0040755000076400007640000000000011150523332012752 5ustar nicknickunixODBC-2.2.14-p2/ini/README0100644000076400007640000000214407716453673013657 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | INI lib (libini.so) | +-------------------------------------------------------------+ This library provides some usefull functions for processing INI files (such as odbc.ini). It is heavily used in unixODBC by the ODBCConfig and unixODBC Driver Config libs. Peter Harvey pharvey@codebydesign.com 22.MAR.99 +-------------------------------------------------------------+ | Please visit; | | www.unixodbc.org | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/ini/Makefile.am0100644000076400007640000000162011025707654015016 0ustar nicknicknoinst_LTLIBRARIES = libinilc.la INCLUDES = -I@top_srcdir@/include libinilc_la_LDFLAGS = -no-undefined libinilc_la_LIBADD = \ ../extras/libodbcextraslc.la libinilc_la_SOURCES = \ iniAllTrim.c \ iniAppend.c \ iniDelete.c \ iniClose.c \ iniCommit.c \ iniObject.c \ iniObjectFirst.c \ iniObjectLast.c \ iniObjectNext.c \ iniObjectSeek.c \ iniObjectSeekSure.c \ iniObjectUpdate.c \ iniObjectInsert.c \ iniObjectDelete.c \ iniObjectEOL.c \ iniOpen.c \ iniProperty.c \ iniPropertyFirst.c \ iniPropertyLast.c \ iniPropertyNext.c \ iniPropertySeek.c \ iniPropertySeekSure.c \ iniPropertyUpdate.c \ iniPropertyInsert.c \ iniPropertyDelete.c \ iniPropertyEOL.c \ iniPropertyValue.c \ iniValue.c \ iniToUpper.c \ iniElement.c \ iniElementCount.c \ iniGetBookmark.c \ iniGotoBookmark.c \ iniCursor.c \ _iniObjectRead.c \ _iniPropertyRead.c \ _iniDump.c \ _iniScanUntilObject.c unixODBC-2.2.14-p2/ini/Makefile.in0100644000076400007640000004513411111035257015024 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = ini DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libinilc_la_DEPENDENCIES = ../extras/libodbcextraslc.la am_libinilc_la_OBJECTS = iniAllTrim.lo iniAppend.lo iniDelete.lo \ iniClose.lo iniCommit.lo iniObject.lo iniObjectFirst.lo \ iniObjectLast.lo iniObjectNext.lo iniObjectSeek.lo \ iniObjectSeekSure.lo iniObjectUpdate.lo iniObjectInsert.lo \ iniObjectDelete.lo iniObjectEOL.lo iniOpen.lo iniProperty.lo \ iniPropertyFirst.lo iniPropertyLast.lo iniPropertyNext.lo \ iniPropertySeek.lo iniPropertySeekSure.lo iniPropertyUpdate.lo \ iniPropertyInsert.lo iniPropertyDelete.lo iniPropertyEOL.lo \ iniPropertyValue.lo iniValue.lo iniToUpper.lo iniElement.lo \ iniElementCount.lo iniGetBookmark.lo iniGotoBookmark.lo \ iniCursor.lo _iniObjectRead.lo _iniPropertyRead.lo _iniDump.lo \ _iniScanUntilObject.lo libinilc_la_OBJECTS = $(am_libinilc_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libinilc_la_SOURCES) DIST_SOURCES = $(libinilc_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_LTLIBRARIES = libinilc.la INCLUDES = -I@top_srcdir@/include libinilc_la_LDFLAGS = -no-undefined libinilc_la_LIBADD = \ ../extras/libodbcextraslc.la libinilc_la_SOURCES = \ iniAllTrim.c \ iniAppend.c \ iniDelete.c \ iniClose.c \ iniCommit.c \ iniObject.c \ iniObjectFirst.c \ iniObjectLast.c \ iniObjectNext.c \ iniObjectSeek.c \ iniObjectSeekSure.c \ iniObjectUpdate.c \ iniObjectInsert.c \ iniObjectDelete.c \ iniObjectEOL.c \ iniOpen.c \ iniProperty.c \ iniPropertyFirst.c \ iniPropertyLast.c \ iniPropertyNext.c \ iniPropertySeek.c \ iniPropertySeekSure.c \ iniPropertyUpdate.c \ iniPropertyInsert.c \ iniPropertyDelete.c \ iniPropertyEOL.c \ iniPropertyValue.c \ iniValue.c \ iniToUpper.c \ iniElement.c \ iniElementCount.c \ iniGetBookmark.c \ iniGotoBookmark.c \ iniCursor.c \ _iniObjectRead.c \ _iniPropertyRead.c \ _iniDump.c \ _iniScanUntilObject.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ini/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu ini/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 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 libinilc.la: $(libinilc_la_OBJECTS) $(libinilc_la_DEPENDENCIES) $(LINK) $(libinilc_la_LDFLAGS) $(libinilc_la_OBJECTS) $(libinilc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_iniDump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_iniObjectRead.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_iniPropertyRead.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_iniScanUntilObject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniAllTrim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniAppend.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniClose.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniCommit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniCursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniDelete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniElementCount.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniGetBookmark.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniGotoBookmark.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniObject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniObjectDelete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniObjectEOL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniObjectFirst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniObjectInsert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniObjectLast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniObjectNext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniObjectSeek.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniObjectSeekSure.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniObjectUpdate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniOpen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniProperty.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniPropertyDelete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniPropertyEOL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniPropertyFirst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniPropertyInsert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniPropertyLast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniPropertyNext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniPropertySeek.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniPropertySeekSure.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniPropertyUpdate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniPropertyValue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniToUpper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iniValue.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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: 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) 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-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .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-exec \ install-exec-am install-info install-info-am install-man \ 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-info-am # 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: unixODBC-2.2.14-p2/ini/iniAllTrim.c0100644000076400007640000000210107363332174015166 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniAllTrim( char *pszString ) { int nForwardCursor = 0; int nTrailingCursor = 0; int bTrim = 1; /* TRIM LEFT */ for ( nForwardCursor=0; pszString[nForwardCursor] != '\0'; nForwardCursor++ ) { if ( bTrim && isspace( pszString[nForwardCursor] ) ) { /* DO NOTHING */ } else { bTrim = 0; pszString[nTrailingCursor] = pszString[nForwardCursor]; nTrailingCursor++; } } pszString[nTrailingCursor] = '\0'; /* TRIM RIGHT */ for ( nForwardCursor=strlen(pszString)-1; nForwardCursor >= 0 && isspace( pszString[nForwardCursor] ); nForwardCursor-- ) { } pszString[nForwardCursor+1] = '\0'; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniAppend.c0100644000076400007640000000442711060200404015021 0ustar nicknick/********************************************************************************** * iniAppend * * - Appends Sections which do not exist in hIni. Ignores all else. * - Does not try to append 'missing' Entries to existing Sections (does not try to merge). * - hIni will become ReadOnly * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniAppend( HINI hIni, char *pszFileName ) { FILE *hFile; char szLine[INI_MAX_LINE+1]; char szObjectName[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; /* SANITY CHECK */ if ( strlen( pszFileName ) > ODBC_FILENAME_MAX ) return INI_ERROR; /* OPEN FILE */ hFile = uo_fopen( pszFileName, "r" ); if ( !hFile ) return INI_ERROR; iniObjectLast( hIni ); iniPropertyLast( hIni ); /* SCAN UNTIL WE GET TO AN OBJECT NAME OR EOF */ szLine[0] = '\0'; if ( _iniScanUntilObject( hIni, hFile, szLine ) == INI_SUCCESS ) { do { if ( szLine[0] == hIni->cLeftBracket ) { _iniObjectRead( hIni, szLine, szObjectName ); if ( iniObjectSeek( hIni, szObjectName ) == INI_SUCCESS ) { iniObjectLast( hIni ); iniPropertyLast( hIni ); if ( _iniScanUntilNextObject( hIni, hFile, szLine ) != INI_SUCCESS) break; } else { iniObjectInsert( hIni, szObjectName ); if ( uo_fgets( szLine, INI_MAX_LINE, hFile ) == NULL ) break; } } else if ( (strchr( hIni->cComment, szLine[0] ) == NULL ) && isalnum(szLine[0]) ) { _iniPropertyRead( hIni, szLine, szPropertyName, szPropertyValue ); iniPropertyInsert( hIni, szPropertyName, szPropertyValue ); if ( uo_fgets( szLine, INI_MAX_LINE, hFile ) == NULL ) break; } else { if ( uo_fgets( szLine, INI_MAX_LINE, hFile ) == NULL ) break; } } while( 1 ); } /* WE ARE NOT GOING TO TRY TO BE SMART ENOUGH TO SAVE THIS STUFF */ hIni->bReadOnly = 1; /* CLEANUP */ if ( hFile != NULL ) uo_fclose( hFile ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniDelete.c0100644000076400007640000000137007363332174015033 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" /****************************** * iniDelete * ******************************/ int iniDelete( HINI hIni ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; /* REMOVE ALL SUBORDINATE INFO */ iniObjectFirst( hIni ); while ( iniObjectDelete( hIni ) == INI_SUCCESS ) { } return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniClose.c0100644000076400007640000000152207363332174014675 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" /****************************** * iniClose * * 1. free memory previously allocated for HINI * 2. DO NOT save any changes (see iniCommit) ******************************/ int iniClose( HINI hIni ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; hIni->hCurObject = hIni->hFirstObject; while ( iniObjectDelete( hIni ) == INI_SUCCESS ) { } free( hIni ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniCommit.c0100644000076400007640000000221210100543062015034 0ustar nicknick/********************************************************************************** * iniCommit * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniCommit( HINI hIni ) { FILE *hFile; /* SANITY CHECK */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->bReadOnly ) return INI_ERROR; /* OPEN FILE */ #ifdef __OS2__ if (hIni->iniFileType == 0) { #endif hFile = uo_fopen( hIni->szFileName, "w" ); #ifdef __OS2__ } else { hFile = (FILE *)iniOS2Open (hIni->szFileName); } #endif if ( !hFile ) return INI_ERROR; _iniDump( hIni, hFile ); /* CLEANUP */ if ( hFile != NULL ) { #ifdef __OS2__ if (hIni->iniFileType == 0) #endif uo_fclose( hFile ); #ifdef __OS2__ else iniOS2Close( hFile); #endif } return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniObject.c0100644000076400007640000000144607363332174015043 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" /****************************** * iniObject * ******************************/ int iniObject( HINI hIni, char *pszObject ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_NO_DATA; /* Ok */ strncpy( pszObject, hIni->hCurObject->szName, INI_MAX_OBJECT_NAME ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniObjectFirst.c0100644000076400007640000000146607363332174016055 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * PAH = Peter Harvey - pharvey@codebydesign.com * ----------------------------------------------- * * PAH 19.MAR.99 Now sets hCurProperty to hFirstProperty when found **************************************************/ #include "ini.h" int iniObjectFirst( HINI hIni ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; hIni->hCurObject = hIni->hFirstObject; iniPropertyFirst( hIni ); if ( hIni->hCurObject == NULL ) return INI_NO_DATA; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniObjectLast.c0100644000076400007640000000147707363332174015673 0ustar nicknick/********************************************************************************** * iniObjectLast * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * PAH = Peter Harvey - pharvey@codebydesign.com * ----------------------------------------------- * * PAH 19.MAR.99 Now sets hCurProperty to hFirstProperty when found **************************************************/ #include "ini.h" int iniObjectLast( HINI hIni ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; hIni->hCurObject = hIni->hLastObject; iniPropertyFirst( hIni ); if ( hIni->hCurObject == NULL ) return INI_NO_DATA; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniObjectNext.c0100644000076400007640000000156007363332174015677 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * PAH = Peter Harvey - pharvey@codebydesign.com * ----------------------------------------------- * * PAH 19.MAR.99 Now sets hCurProperty to hFirstProperty when found **************************************************/ #include "ini.h" int iniObjectNext( HINI hIni ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_NO_DATA; hIni->hCurObject = hIni->hCurObject->pNext; iniPropertyFirst( hIni ); if ( hIni->hCurObject == NULL ) return INI_NO_DATA; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniObjectSeek.c0100644000076400007640000000161607363332174015652 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * PAH = Peter Harvey - pharvey@codebydesign.com * ----------------------------------------------- * * PAH 19.MAR.99 Now sets hCurProperty to hFirstProperty when found **************************************************/ #include "ini.h" int iniObjectSeek( HINI hIni, char *pszObject ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { if ( strcasecmp( pszObject, hIni->hCurObject->szName ) == 0 ) return INI_SUCCESS; iniObjectNext( hIni ); } return INI_NO_DATA; } unixODBC-2.2.14-p2/ini/iniObjectSeekSure.c0100644000076400007640000000152107363332174016504 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com * ----------------------------------------------- * * PAH 06.MAR.99 Added this func **************************************************/ #include "ini.h" int iniObjectSeekSure( HINI hIni, char *pszObject ) { int nReturn; /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( !pszObject ) return INI_ERROR; if ( (nReturn = iniObjectSeek( hIni, pszObject )) == INI_NO_DATA ) return iniObjectInsert( hIni, pszObject ); return nReturn; } unixODBC-2.2.14-p2/ini/iniObjectUpdate.c0100644000076400007640000000134207363332174016201 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniObjectUpdate( HINI hIni, char *pszObject ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_ERROR; /* Ok */ strncpy( hIni->hCurObject->szName, pszObject, INI_MAX_OBJECT_NAME ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniObjectInsert.c0100644000076400007640000000260707363332174016230 0ustar nicknick/********************************************************************************** * iniObjectInsert * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniObjectInsert( HINI hIni, char *pszObject ) { HINIOBJECT hObject; char szObjectName[INI_MAX_OBJECT_NAME+1]; /* SANITY CHECK */ if ( hIni == NULL ) return INI_ERROR; if ( pszObject == NULL ) return INI_ERROR; strncpy( szObjectName, pszObject, INI_MAX_OBJECT_NAME ); iniAllTrim( szObjectName ); /* CREATE OBJECT STRUCT */ hObject = malloc( sizeof(INIOBJECT) ); hIni->hCurProperty = NULL; hObject->hFirstProperty = NULL; hObject->hLastProperty = NULL; hObject->nProperties = 0; hObject->pNext = NULL; hObject->pPrev = NULL; strncpy( hObject->szName, szObjectName, INI_MAX_OBJECT_NAME ); /* APPEND TO OBJECT LIST */ if ( hIni->hFirstObject == NULL ) hIni->hFirstObject = hObject; hObject->pPrev = hIni->hLastObject; hIni->hLastObject = hObject; if ( hObject->pPrev != NULL ) hObject->pPrev->pNext = hObject; hIni->hCurObject = hObject; hIni->nObjects++; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniObjectDelete.c0100644000076400007640000000260507363332174016164 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" /****************************** * iniObjectDelete * ******************************/ int iniObjectDelete( HINI hIni ) { HINIOBJECT hObject; /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_NO_DATA; hObject = hIni->hCurObject; /* REMOVE ALL SUBORDINATE INFO */ hIni->hCurProperty = hObject->hFirstProperty; while ( iniPropertyDelete( hIni ) == INI_SUCCESS ) { } /* REMOVE FROM LIST */ if ( hIni->hFirstObject == hObject ) hIni->hFirstObject = hObject->pNext; if ( hIni->hLastObject == hObject ) hIni->hLastObject = hObject->pPrev; hIni->hCurObject = NULL; if ( hObject->pNext ) { hObject->pNext->pPrev = hObject->pPrev; hIni->hCurObject = hObject->pNext; } if ( hObject->pPrev ) { hObject->pPrev->pNext = hObject->pNext; hIni->hCurObject = hObject->pPrev; } hIni->nObjects--; /* FREE MEMORY */ free( hObject ); iniPropertyFirst( hIni ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniObjectEOL.c0100644000076400007640000000113707363332174015400 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniObjectEOL( HINI hIni ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return TRUE; return FALSE; } unixODBC-2.2.14-p2/ini/iniOpen.c0100644000076400007640000002746211060200600014515 0ustar nicknick/********************************************************************************** * iniOpen * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * PAH = Peter Harvey - pharvey@codebydesign.com * ----------------------------------------------- * * PAH 06.MAR.99 Can now create file-less INI. Pass NULL for * pszFileName. Then copy a file name into hIni->szFileName * before calling iniCommit. **************************************************/ #include "ini.h" /* * Changes sent by MQJoe, to avoid limit on number of open file handles */ /*************************************************** * Override fstream command to overcome 255 file * handle limit ***************************************************/ #include #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #include #include #if defined( HAVE_VSNPRINTF ) && defined( USE_LL_FIO ) FILE *uo_fopen( const char *filename, const char *mode ) { int fp; long oMode = 0, pMode = 0; pMode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; switch ( mode[0] ) { case 'r': oMode = O_RDONLY; break; case 'w': oMode = O_RDWR | O_CREAT | O_TRUNC; break; case 'o': oMode = O_RDWR | O_CREAT | O_TRUNC; break; case 'a': oMode = O_CREAT | O_APPEND | O_WRONLY; break; default: return FALSE; } fp = open(filename, oMode, pMode ); return(fp != -1) ? (FILE*)fp : NULL; } int uo_fclose( FILE *stream ) { close((int)stream); return 0; } char *uo_fgets( char *buffer, int n, FILE *stream ) { int fp = (int)stream; char ch; int i = 0, c = 0; buffer[0] = 0; do { c = read(fp, &ch, 1); if ( c == 1 ) { buffer[i++] = ch; if ( ch == '\n' ) break; } } while ( c && i < n ); buffer[i] = 0; return(c) ? buffer : NULL; } int uo_vfprintf( FILE *stream, const char *fmt, va_list ap) { int fp = (int)stream; long lNeededSize = 256; char* szBuffer = NULL; long lBufSize = 0; int r = 0; do { if ( lNeededSize > lBufSize ) { if ( szBuffer ) free(szBuffer); szBuffer = (char*)malloc(lNeededSize); lBufSize = lNeededSize; } lNeededSize = vsnprintf(szBuffer, lBufSize, fmt, ap); lNeededSize++; } while ( lNeededSize > lBufSize ); r = write(fp, szBuffer, (lNeededSize - 1) ); if ( szBuffer ) free(szBuffer); return r; } int uo_fprintf( FILE *stream, const char *fmt, ...) { int r; va_list ap; va_start(ap, fmt); r = uo_vfprintf(stream,fmt,ap); va_end(ap); return r; } #endif /***************************************************/ #ifdef __OS2__ int iniOpen( HINI *hIni, char *pszFileName, char *cComment, char cLeftBracket, char cRightBracket, char cEqual, int bCreate, int bFileType ) { FILE *hFile; char szLine[INI_MAX_LINE+1]; char szObjectName[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; int nValidFile; char *ObjectList; char *PropertyList; char *ValueList; int numberObject; int ObjectNumber; int numberProperty; int PropertyNumber; int nValidProperty; char *tmpObjectName; char *tmpPropertyName; char *tmpProperyValue; #ifdef __OS2DEBUG__ printf("iniOpen entered \n"); #endif /* INIT STATEMENT */ *hIni = malloc( sizeof(INI) ); if ( pszFileName && pszFileName != STDINFILE ) strncpy((*hIni)->szFileName, pszFileName, ODBC_FILENAME_MAX ); else if ( pszFileName == STDINFILE ) strncpy((*hIni)->szFileName, "stdin", ODBC_FILENAME_MAX ); else strncpy((*hIni)->szFileName, "", ODBC_FILENAME_MAX ); strcpy( (*hIni)->cComment, cComment ); (*hIni)->cLeftBracket = cLeftBracket; (*hIni)->cRightBracket = cRightBracket; (*hIni)->cEqual = cEqual; (*hIni)->bChanged = FALSE; (*hIni)->hCurObject = NULL; (*hIni)->hFirstObject = NULL; (*hIni)->hLastObject = NULL; (*hIni)->nObjects = 0; (*hIni)->bReadOnly = 0; (*hIni)->iniFileType = bFileType; #ifdef __OS2DEBUG__ printf("iniOpen file is mode %d \n", bFileType); #endif /* OPEN FILE */ if ( pszFileName ) { if ( pszFileName == STDINFILE ) { hFile = stdin; (*hIni)->iniFileType = 0; /* stdin is always text */ } else { if ( (*hIni)->iniFileType == 0 ) hFile = uo_fopen( pszFileName, "r" ); else hFile = (FILE *)iniOS2Open( pszFileName); } if ( !hFile ) { /* * This could fail because of something other than the file not existing... */ if ( bCreate == TRUE ) { if ( (*hIni)->iniFileType == 0 ) hFile = uo_fopen( pszFileName, "w" ); else hFile = (FILE *)iniOS2Open( pszFileName); } } if ( !hFile ) { free( *hIni ); *hIni = NULL; return INI_ERROR; } if ( (*hIni)->iniFileType == 1 ) { nValidFile = INI_ERROR; ObjectList = (char *)iniOS2LoadObjectList( hFile, &numberObject); if ( numberObject > 0 ) { nValidFile = INI_SUCCESS; ObjectNumber = 0; do { tmpObjectName = (char *)(ObjectList + ObjectNumber); strcpy(szObjectName, tmpObjectName); iniObjectInsert( (*hIni), szObjectName ); PropertyList = (char *)iniOS2LoadPropertyList( hFile, szObjectName, &numberProperty); if ( numberProperty > 0 ) { PropertyNumber = 0; do { tmpPropertyName = PropertyList + PropertyNumber; strcpy(szPropertyName, tmpPropertyName); ValueList = (char *)iniOS2Read( hFile, szObjectName, szPropertyName, szPropertyValue); strcpy(szPropertyValue, ValueList); iniPropertyInsert( (*hIni), szPropertyName, szPropertyValue); PropertyNumber = PropertyNumber + strlen(szPropertyName) + 1; } while ( PropertyNumber < numberProperty ); free(PropertyList); } ObjectNumber = ObjectNumber + strlen(szObjectName) + 1; } while ( ObjectNumber < numberObject ); free(ObjectList); } } else { nValidFile = _iniScanUntilObject( *hIni, hFile, szLine ); if ( nValidFile == INI_SUCCESS ) { char *ptr; do { if ( szLine[0] == cLeftBracket ) { _iniObjectRead( (*hIni), szLine, szObjectName ); iniObjectInsert( (*hIni), szObjectName ); } else if ( (strchr( cComment, szLine[0] ) == NULL ) && !isspace(szLine[0]) ) { _iniPropertyRead( (*hIni), szLine, szPropertyName, szPropertyValue ); iniPropertyInsert( (*hIni), szPropertyName, szPropertyValue ); } } while ( (ptr = uo_fgets( szLine, INI_MAX_LINE, hFile )) != NULL ); } } if ( nValidFile == INI_ERROR ) { /* INVALID FILE */ if ( hFile != NULL ) { if ( (*hIni)->iniFileType == 0 ) uo_fclose( hFile ); else iniOS2Close(hFile); } free( *hIni ); *hIni = NULL; return INI_ERROR; } /* CLEANUP */ if ( hFile != NULL ) { if ( (*hIni)->iniFileType == 0 ) { uo_fclose( hFile ); } else iniOS2Close(hFile); } iniObjectFirst( *hIni ); } /* if file given */ return INI_SUCCESS; } #else int iniOpen( HINI *hIni, char *pszFileName, char *cComment, char cLeftBracket, char cRightBracket, char cEqual, int bCreate ) { FILE *hFile; char szLine[INI_MAX_LINE+1]; char szObjectName[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; int nValidFile; /* INIT STATEMENT */ *hIni = malloc( sizeof(INI) ); if ( pszFileName && pszFileName != STDINFILE ) strncpy((*hIni)->szFileName, pszFileName, ODBC_FILENAME_MAX ); else if ( pszFileName == STDINFILE ) strncpy((*hIni)->szFileName, "stdin", ODBC_FILENAME_MAX ); else strncpy((*hIni)->szFileName, "", ODBC_FILENAME_MAX ); strcpy( (*hIni)->cComment, cComment ); (*hIni)->cLeftBracket = cLeftBracket; (*hIni)->cRightBracket = cRightBracket; (*hIni)->cEqual = cEqual; (*hIni)->bChanged = FALSE; (*hIni)->hCurObject = NULL; (*hIni)->hFirstObject = NULL; (*hIni)->hLastObject = NULL; (*hIni)->nObjects = 0; (*hIni)->bReadOnly = 0; /* OPEN FILE */ if ( pszFileName ) { errno = 0; if ( pszFileName == STDINFILE ) { hFile = stdin; } else { hFile = uo_fopen( pszFileName, "r" ); } if ( ( !hFile ) && ( errno != ENFILE ) && ( errno != EMFILE ) && ( errno != ENOMEM ) && ( errno != EACCES ) ) { /* * This could fail because of something other than the file not existing... */ if ( bCreate == TRUE ) { hFile = uo_fopen( pszFileName, "w" ); } } if ( !hFile ) { free( *hIni ); *hIni = NULL; return INI_ERROR; } nValidFile = _iniScanUntilObject( *hIni, hFile, szLine ); if ( nValidFile == INI_SUCCESS ) { char *ptr; do { if ( szLine[0] == cLeftBracket ) { _iniObjectRead( (*hIni), szLine, szObjectName ); iniObjectInsert( (*hIni), szObjectName ); } else if ( (strchr( cComment, szLine[0] ) == NULL ) && !isspace(szLine[0]) ) { _iniPropertyRead( (*hIni), szLine, szPropertyName, szPropertyValue ); iniPropertyInsert( (*hIni), szPropertyName, szPropertyValue ); } } while ( (ptr = uo_fgets( szLine, INI_MAX_LINE, hFile )) != NULL ); } else if ( nValidFile == INI_ERROR ) { /* INVALID FILE */ if ( hFile != NULL ) uo_fclose( hFile ); free( *hIni ); *hIni = NULL; return INI_ERROR; } /* CLEANUP */ if ( hFile != NULL ) uo_fclose( hFile ); iniObjectFirst( *hIni ); } /* if file given */ return INI_SUCCESS; } #endif unixODBC-2.2.14-p2/ini/iniProperty.c0100644000076400007640000000143207363332174015454 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniProperty( HINI hIni, char *pszProperty ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_NO_DATA; if ( hIni->hCurProperty == NULL ) return INI_NO_DATA; /* Ok */ strncpy( pszProperty, hIni->hCurProperty->szName, INI_MAX_PROPERTY_NAME ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniPropertyFirst.c0100644000076400007640000000134707363332174016471 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniPropertyFirst( HINI hIni ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_NO_DATA; hIni->hCurProperty = hIni->hCurObject->hFirstProperty; if ( hIni->hCurProperty == NULL ) return INI_NO_DATA; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniPropertyLast.c0100644000076400007640000000136307363332174016303 0ustar nicknick/********************************************************************************** * iniPropertyLast * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniPropertyLast( HINI hIni ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_NO_DATA; hIni->hCurProperty = hIni->hCurObject->hLastProperty; if ( hIni->hCurProperty == NULL ) return INI_NO_DATA; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniPropertyNext.c0100644000076400007640000000146407363332174016320 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniPropertyNext( HINI hIni ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_NO_DATA; if ( hIni->hCurProperty == NULL ) return INI_NO_DATA; hIni->hCurProperty = hIni->hCurProperty->pNext; if ( hIni->hCurProperty == NULL ) return INI_NO_DATA; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniPropertySeek.c0100644000076400007640000000262707363332174016273 0ustar nicknick/********************************************************************************** * iniPropertySeek * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniPropertySeek( HINI hIni, char *pszObject, char *pszProperty, char *pszValue ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; /* Ok */ iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) != TRUE ) { if ( pszObject[0] == '\0' || strcasecmp( pszObject, hIni->hCurObject->szName ) == 0 ) { /* EITHER THE OBJECT HAS BEEN FOUND OR THE OBJECT DOES NOT MATTER */ /* IN ANYCASE LETS SCAN FOR PROPERTY */ iniPropertyFirst( hIni ); while ( iniPropertyEOL( hIni ) != TRUE ) { if ( pszProperty[0] == '\0' || strcasecmp( pszProperty, hIni->hCurProperty->szName ) == 0 ) { if ( pszValue[0] == '\0' || strcasecmp( pszValue, hIni->hCurProperty->szValue ) == 0 ) { /* FOUND IT !! */ return INI_SUCCESS; } } iniPropertyNext( hIni ); } if ( pszObject[0] != '\0' ) { hIni->hCurObject = NULL; return INI_NO_DATA; } } iniObjectNext( hIni ); } return INI_NO_DATA; } unixODBC-2.2.14-p2/ini/iniPropertySeekSure.c0100644000076400007640000000215107363332174017122 0ustar nicknick/********************************************************************************** * iniPropertySeek * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com * ----------------------------------------------- * * PAH 06.MAR.99 Added this func **************************************************/ #include "ini.h" int iniPropertySeekSure( HINI hIni, char *pszObject, char *pszProperty, char *pszValue ) { int nReturn; /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( !pszObject ) return INI_ERROR; if ( !pszProperty ) return INI_ERROR; if ( !pszValue ) return INI_ERROR; /* OK */ if ( (nReturn = iniPropertySeek( hIni, pszObject, pszProperty, "" )) == INI_NO_DATA ) { iniObjectSeekSure( hIni, pszObject ); return iniPropertyInsert( hIni, pszProperty, pszValue ); } else if ( nReturn == INI_SUCCESS ) return iniValue( hIni, pszValue ); return nReturn; } unixODBC-2.2.14-p2/ini/iniPropertyUpdate.c0100644000076400007640000000160607363332174016622 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniPropertyUpdate( HINI hIni, char *pszProperty, char *pszValue ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_ERROR; if ( hIni->hCurProperty == NULL ) return INI_ERROR; /* Ok */ strncpy( hIni->hCurProperty->szName, pszProperty, INI_MAX_PROPERTY_NAME ); strncpy( hIni->hCurProperty->szValue, pszValue, INI_MAX_PROPERTY_VALUE ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniPropertyInsert.c0100644000076400007640000000266107363332174016646 0ustar nicknick/********************************************************************************** * iniPropertyInsert * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniPropertyInsert( HINI hIni, char *pszProperty, char *pszValue ) { HINIOBJECT hObject; HINIPROPERTY hProperty; /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_ERROR; if ( pszProperty == NULL ) return INI_ERROR; hObject = hIni->hCurObject; /* CREATE PROPERTY STRUCT */ hProperty = (HINIPROPERTY)malloc( sizeof(INIPROPERTY) ); strncpy( hProperty->szName, pszProperty, INI_MAX_PROPERTY_NAME ); strncpy( hProperty->szValue, pszValue, INI_MAX_PROPERTY_VALUE ); hProperty->pNext = NULL; iniAllTrim( hProperty->szName ); iniAllTrim( hProperty->szValue ); /* APPEND TO LIST */ if ( hObject->hFirstProperty == NULL ) hObject->hFirstProperty = hProperty; hProperty->pPrev = hObject->hLastProperty; hObject->hLastProperty = hProperty; if ( hProperty->pPrev != NULL ) hProperty->pPrev->pNext = hProperty; hIni->hCurProperty = hProperty; hObject->nProperties++; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniPropertyDelete.c0100644000076400007640000000256307762667075016623 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" /****************************** * iniPropertyDelete * ******************************/ int iniPropertyDelete( HINI hIni ) { HINIPROPERTY hProperty; HINIOBJECT hObject; /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_ERROR; if ( hIni->hCurProperty == NULL ) return INI_NO_DATA; hObject = hIni->hCurObject; hProperty = hIni->hCurProperty; if ( hObject->hFirstProperty == hProperty ) hObject->hFirstProperty = hProperty->pNext; if ( hObject->hLastProperty == hProperty ) hObject->hLastProperty = hProperty->pPrev; hIni->hCurProperty = NULL; if ( hProperty->pNext ) { hProperty->pNext->pPrev = hProperty->pPrev; hIni->hCurProperty = hProperty->pNext; } if ( hProperty->pPrev ) { hProperty->pPrev->pNext = hProperty->pNext; hIni->hCurProperty = hProperty->pPrev; } hObject->nProperties--; /* FREE MEMORY */ free( hProperty ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniPropertyEOL.c0100644000076400007640000000122007363332174016007 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniPropertyEOL( HINI hIni ) { /* SANITY CHECKS */ if ( hIni == NULL ) return TRUE; if ( hIni->hCurObject == NULL ) return TRUE; if ( hIni->hCurProperty == NULL ) return TRUE; return FALSE; } unixODBC-2.2.14-p2/ini/iniPropertyValue.c0100644000076400007640000000250010065530755016444 0ustar nicknick/********************************************************************************** * . * totally untested * * see iniElement instead **********************************************************************************/ #include "ini.h" int iniPropertyValue( char *pszString, char *pszProperty, char *pszValue, char cEqual, char cPropertySep ) { char szBuffer[INI_MAX_LINE+1]; char szEqual[2]; char szPropertySep[2]; char *pProperty; char *pValue; char *pValueLastChar; szEqual[0] = cEqual; szEqual[1] = '\0'; szPropertySep[0] = cPropertySep; szPropertySep[1] = '\0'; strcpy( pszValue, "" ); strncpy( szBuffer, pszString, INI_MAX_LINE ); /* find pszProperty */ while ( 1 ) { pProperty = (char *)strtok( szBuffer, (const char *)szPropertySep ); if ( pProperty == NULL ) break; else { /* extract pszValue */ if ( strncmp( pProperty, pszProperty, strlen(pszProperty) ) == 0 ) { pValue = (char *)strtok( szBuffer, (const char *)szEqual ); if ( pValue ) { /* truncate any other data */ pValueLastChar = (char *)strchr( pValue, szPropertySep[ 0 ] ); if ( pValueLastChar ) pValueLastChar[0] = '\0'; strncpy( pszValue, pValue, INI_MAX_PROPERTY_VALUE ); iniAllTrim( pszValue ); } break; } } } return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniValue.c0100644000076400007640000000152707363332174014711 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" /****************************** * iniValue * ******************************/ int iniValue( HINI hIni, char *pszValue ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_NO_DATA; if ( hIni->hCurProperty == NULL ) return INI_NO_DATA; strncpy( pszValue, hIni->hCurProperty->szValue, INI_MAX_PROPERTY_VALUE ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniToUpper.c0100644000076400007640000000114107430025101015203 0ustar nicknick/********************************************************************************** * . * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniToUpper( char *pszString ) { int n = 0; for ( n = 0; pszString[n] != '\0'; n++ ) pszString[n] = toupper((unsigned char)pszString[n]); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniElement.c0100644000076400007640000000771310213146764015225 0ustar nicknick/********************************************************************************** * iniElement * * Use when; * 1. strtok is scary (also does not handle empty elements well) * 2. strstr is not portable * 3. performance is less important than simplicity and the above (feel free to improve on this) * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniElement( char *pszData, char cSeperator, char cTerminator, int nElement, char *pszElement, int nMaxElement ) { int nCurElement = 0; int nChar = 0; int nCharInElement = 0; memset( pszElement, '\0', nMaxElement ); for ( ; nCurElement <= nElement && (nCharInElement+1) < nMaxElement; nChar++ ) { /* check for end of data */ if ( cSeperator != cTerminator && pszData[nChar] == cTerminator ) { break; } if ( cSeperator == cTerminator && pszData[nChar] == cSeperator && pszData[nChar+1] == cTerminator ) { break; } /* check for end of element */ if ( pszData[nChar] == cSeperator ) { nCurElement++; } else if ( nCurElement == nElement ) { pszElement[nCharInElement] = pszData[nChar]; nCharInElement++; } } if ( pszElement[0] == '\0' ) { return INI_NO_DATA; } return INI_SUCCESS; } /* Like iniElement(), but rather than a terminator, the input buffer length is given */ int iniElementMax( char *pData, char cSeperator, int nDataLen, int nElement, char *pszElement, int nMaxElement ) { int nCurElement = 0; int nChar = 0; int nCharInElement = 0; memset( pszElement, '\0', nMaxElement ); for ( ; nCurElement <= nElement && (nCharInElement+1) < nMaxElement && nChar < nDataLen ; nChar++ ) { /* check for end of element */ if ( pData[nChar] == cSeperator ) { nCurElement++; } else if ( nCurElement == nElement ) { pszElement[nCharInElement] = pData[nChar]; nCharInElement++; } } if ( pszElement[0] == '\0' ) { return INI_NO_DATA; } return INI_SUCCESS; } int iniElementEOL( char *pszData, char cSeperator, char cTerminator, int nElement, char *pszElement, int nMaxElement ) { int nCurElement = 0; int nChar = 0; int nCharInElement = 0; memset( pszElement, '\0', nMaxElement ); for ( ;(nCharInElement+1) < nMaxElement; nChar++ ) { /* check for end of data */ if ( cSeperator != cTerminator && pszData[nChar] == cTerminator ) { break; } if ( cSeperator == cTerminator && pszData[nChar] == cSeperator && pszData[nChar+1] == cTerminator ) { break; } /* check for end of element */ if ( pszData[nChar] == cSeperator && nCurElement < nElement ) { nCurElement++; } else if ( nCurElement >= nElement ) { pszElement[nCharInElement] = pszData[nChar]; nCharInElement++; } } if ( pszElement[0] == '\0' ) { return INI_NO_DATA; } return INI_SUCCESS; } int iniElementToEnd( char *pszData, char cSeperator, char cTerminator, int nElement, char *pszElement, int nMaxElement ) { int nCurElement = 0; int nChar = 0; int nCharInElement = 0; memset( pszElement, '\0', nMaxElement ); for ( ; nCurElement <= nElement && (nCharInElement+1) < nMaxElement; nChar++ ) { /* check for end of data */ if ( cSeperator != cTerminator && pszData[nChar] == cTerminator ) break; if ( cSeperator == cTerminator && pszData[nChar] == cSeperator && pszData[nChar+1] == cTerminator ) break; /* check for end of element */ if ( pszData[nChar] == cSeperator && ( nCurElement < nElement )) nCurElement++; else if ( nCurElement == nElement ) { pszElement[nCharInElement] = pszData[nChar]; nCharInElement++; } } if ( pszElement[0] == '\0' ) return INI_NO_DATA; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniElementCount.c0100644000076400007640000000173407363332174016237 0ustar nicknick/********************************************************************************** * iniElementCount * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 05.APR.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int iniElementCount( char *pszData, char cSeperator, char cTerminator ) { int nToManyElements = 30000; int nCurElement = 0; int nChar = 0; for ( ; nCurElement <= nToManyElements; nChar++ ) { /* check for end of data */ if ( cSeperator != cTerminator && pszData[nChar] == cTerminator ) break; if ( cSeperator == cTerminator && pszData[nChar] == cSeperator && pszData[nChar+1] == cTerminator ) break; /* check for end of element */ if ( pszData[nChar] == cSeperator ) nCurElement++; } return nCurElement; } unixODBC-2.2.14-p2/ini/iniGetBookmark.c0100644000076400007640000000146207363332174016040 0ustar nicknick/********************************************************************************** * iniGetBookmark * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * PAH = Peter Harvey - pharvey@codebydesign.com * ----------------------------------------------- * * PAH 18.MAR.99 Created. **************************************************/ #include "ini.h" int iniGetBookmark( HINI hIni, HINIBOOKMARK hIniBookmark ) { if ( hIni == NULL || hIniBookmark == NULL ) return INI_ERROR; hIniBookmark->hIni = hIni; hIniBookmark->hCurObject = hIni->hCurObject; hIniBookmark->hCurProperty = hIni->hCurProperty; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniGotoBookmark.c0100644000076400007640000000142307363332174016226 0ustar nicknick/********************************************************************************** * iniGotoBookmark * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * PAH = Peter Harvey - pharvey@codebydesign.com * ----------------------------------------------- * * PAH 18.MAR.99 Created. **************************************************/ #include "ini.h" int iniGotoBookmark( INIBOOKMARK IniBookmark ) { if ( IniBookmark.hIni == NULL ) return INI_ERROR; (IniBookmark.hIni)->hCurObject = IniBookmark.hCurObject; (IniBookmark.hIni)->hCurProperty = IniBookmark.hCurProperty; return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/iniCursor.c0100644000076400007640000000130407363332174015103 0ustar nicknick/********************************************************************************** * iniCursor * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * PAH = Peter Harvey - pharvey@codebydesign.com * ----------------------------------------------- * * PAH 18.MAR.99 Created. **************************************************/ #include "ini.h" int iniCursor( HINI hIni, HINI hIniCursor ) { if ( hIni == NULL || hIniCursor == NULL ) return INI_ERROR; memcpy( hIniCursor, hIni, sizeof(INI) ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/_iniObjectRead.c0100644000076400007640000000214607363332174015774 0ustar nicknick/********************************************************************************** * _iniObjectRead * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int _iniObjectRead( HINI hIni, char *szLine, char *pszObjectName ) { int nChar; /* SANITY CHECK */ if ( hIni == NULL ) return INI_ERROR; /* SCAN LINE TO EXTRACT OBJECT NAME WITH NO BRACKETS */ nChar = 1; while ( 1 ) { if ( (szLine[nChar] == '\0') || (nChar == INI_MAX_OBJECT_NAME) ) { pszObjectName[nChar-1] = '\0'; break; } if ( szLine[nChar] == hIni->cRightBracket ) { pszObjectName[nChar-1] = '\0'; break; } pszObjectName[nChar-1] = szLine[nChar]; nChar++; } iniAllTrim( pszObjectName ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/_iniPropertyRead.c0100644000076400007640000000206207363332174016407 0ustar nicknick/********************************************************************************** * _iniPropertyRead * * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int _iniPropertyRead( HINI hIni, char *szLine, char *pszPropertyName, char *pszPropertyValue ) { /* SANITY CHECKS */ if ( hIni == NULL ) return INI_ERROR; if ( hIni->hCurObject == NULL ) return INI_ERROR; /* SCAN LINE TO EXTRACT PROPERTY NAME AND VALUE WITH NO TRAILING SPACES */ strcpy( pszPropertyName, "" ); strcpy( pszPropertyValue, "" ); iniElement( szLine, '=', '\0', 0, pszPropertyName, INI_MAX_PROPERTY_NAME ); iniElementToEnd( szLine, '=', '\0', 1, pszPropertyValue, INI_MAX_PROPERTY_VALUE ); iniAllTrim( pszPropertyName ); iniAllTrim( pszPropertyValue ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/_iniDump.c0100644000076400007640000000511710100543062014657 0ustar nicknick/********************************************************************************** * _iniDump * * Dump contents to hStream. * * - iniCommit calls this. You can bypass iniCommit restrictions to get some debugging information by calling directly. * - Make sure the stream is open before calling. * - leaves list position at iniObjectFirst() * - always returns true * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int __iniDebug( HINI hIni ) { /* SANITY CHECK */ if ( hIni == NULL ) return INI_ERROR; /* SCAN OBJECTS */ iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { printf( "%c%s%c\n", hIni->cLeftBracket, hIni->hCurObject->szName, hIni->cRightBracket ); iniPropertyFirst( hIni ); while ( iniPropertyEOL( hIni ) == FALSE ) { printf( "%s\t\t%c %s\n", hIni->hCurProperty->szName, hIni->cEqual, hIni->hCurProperty->szValue ); iniPropertyNext( hIni ); } printf( "\n" ); iniPropertyFirst( hIni ); iniObjectNext( hIni ); } iniObjectFirst( hIni ); return INI_SUCCESS; } int _iniDump( HINI hIni, FILE *hStream ) { /* SANITY CHECK */ if ( hIni == NULL ) return INI_ERROR; if ( !hStream ) return INI_ERROR; /* SCAN OBJECTS */ iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { #ifdef __OS2__ if ( hIni->iniFileType == 0 ) #endif uo_fprintf( hStream, "%c%s%c\n", hIni->cLeftBracket, hIni->hCurObject->szName, hIni->cRightBracket ); iniPropertyFirst( hIni ); while ( iniPropertyEOL( hIni ) == FALSE ) { #ifdef __OS2__ if ( hIni->iniFileType == 0 ) { #endif uo_fprintf( hStream, "%s\t\t%c %s\n", hIni->hCurProperty->szName, hIni->cEqual, hIni->hCurProperty->szValue ); #ifdef __OS2__ } else { iniOS2Write( hStream, hIni->hCurObject->szName, hIni->hCurProperty->szName, hIni->hCurProperty->szValue); } #endif iniPropertyNext( hIni ); } #ifdef __OS2__ if ( hIni->iniFileType == 0 ) #endif uo_fprintf( hStream, "\n" ); iniPropertyFirst( hIni ); iniObjectNext( hIni ); } iniObjectFirst( hIni ); return INI_SUCCESS; } unixODBC-2.2.14-p2/ini/_iniScanUntilObject.c0100644000076400007640000000301707754717566017037 0ustar nicknick/********************************************************************************** * _iniScanUntilObject * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "ini.h" int _iniScanUntilObject( HINI hIni, FILE *hFile, char *pszLine ) { /* SCAN UNTIL WE GET TO AN OBJECT NAME OR EOF */ pszLine[0] = '\0'; while ( 1 ) { if ( uo_fgets( pszLine, INI_MAX_LINE, hFile ) == NULL ) { return INI_NO_DATA; } /* printf( "[PAH][%s][%d] Line=[%s]\n", __FILE__, __LINE__, pszLine ); */ if ( pszLine[0] == hIni->cLeftBracket ) { return INI_SUCCESS; } iniAllTrim( pszLine ); if ( pszLine[0] == '\0' ) { continue; } if ( strchr( hIni->cComment, pszLine[0] ) == NULL ) { return INI_ERROR; } } return INI_SUCCESS; } int _iniScanUntilNextObject( HINI hIni, FILE *hFile, char *pszLine ) { /* SCAN UNTIL WE GET TO AN OBJECT NAME OR EOF, SKIPPING BODY */ pszLine[0] = '\0'; while ( 1 ) { if ( uo_fgets( pszLine, INI_MAX_LINE, hFile ) == NULL ) { return INI_NO_DATA; } if ( pszLine[0] == hIni->cLeftBracket ) { return INI_SUCCESS; } } return INI_SUCCESS; } unixODBC-2.2.14-p2/libltdl/0040755000076400007640000000000011150523332013621 5ustar nicknickunixODBC-2.2.14-p2/libltdl/README0100644000076400007640000000053310307012274014500 0ustar nicknickThis 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 unixODBC-2.2.14-p2/libltdl/acinclude.m40100644000076400007640000070642010307012274016021 0ustar nicknick# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 ## Free Software Foundation, Inc. ## 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. # serial 47 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_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_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/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. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$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 && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|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-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The 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 > conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 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*) # 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` ;; 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 ;; *) # 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. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done 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` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # -------------------- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ------------------------------------------------------------------ AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&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_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext 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 > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_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 .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_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" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; 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*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_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' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # 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)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $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' ;; knetbsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU 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=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- #- set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the 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; 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 ;; 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*) 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=unknown ;; 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 ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # --------------- AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([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 fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # -------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # # Check for any special shared library compilation flags. # _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= if test "$GCC" = no; then case $host_os in sco3.2v5*) _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' ;; esac fi if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : else AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no fi fi # # Check to make sure the static flag actually works. # AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ## 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... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) # Report which librarie types wil actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) 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]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # 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 unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' 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 # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in ia64*|hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${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_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_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' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sco*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" ## 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... AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 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. # 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//" # 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 # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) symcode='[[BDRT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # 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. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; sco3.2v5*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_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_AC_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' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' 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 # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; sco3.2v5*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4.2uw2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv5*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && 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_MSG_RESULT([$SED]) ]) ## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- ## Copyright (C) 1999-2000 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 AC_LIB_LTDL # AC_WITH_LTDL # ------------ # 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. AC_DEFUN([AC_WITH_LTDL], [AC_REQUIRE([AC_LIB_LTDL]) AC_SUBST([LIBLTDL]) AC_SUBST([INCLTDL]) # Unless the user asks us to check, assume no installed ltdl exists. use_installed_libltdl=no AC_ARG_WITH([included_ltdl], [ --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_LIB([ltdl], [lt_dlcaller_register], [with_included_ltdl=no], [with_included_ltdl=yes]) ]) fi if test "x$enable_ltdl_install" != xyes; then # If the user did not specify an installable libltdl, then default # to a convenience lib. AC_LIBLTDL_CONVENIENCE fi if test "x$with_included_ltdl" = xno; then # 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 fi # Report our decision... AC_MSG_CHECKING([whether to use included libltdl]) AC_MSG_RESULT([$with_included_ltdl]) AC_CONFIG_SUBDIRS([libltdl]) ])# AC_WITH_LTDL # AC_LIB_LTDL # ----------- # Perform all the checks necessary for compilation of the ltdl objects # -- including compiler checks and header checks. AC_DEFUN([AC_LIB_LTDL], [AC_PREREQ(2.50) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_C_CONST]) AC_REQUIRE([AC_HEADER_STDC]) AC_REQUIRE([AC_HEADER_DIRENT]) AC_REQUIRE([_LT_AC_CHECK_DLFCN]) AC_REQUIRE([AC_LTDL_ENABLE_INSTALL]) AC_REQUIRE([AC_LTDL_SHLIBEXT]) AC_REQUIRE([AC_LTDL_SHLIBPATH]) AC_REQUIRE([AC_LTDL_SYSSEARCHPATH]) AC_REQUIRE([AC_LTDL_OBJDIR]) AC_REQUIRE([AC_LTDL_DLPREOPEN]) AC_REQUIRE([AC_LTDL_DLLIB]) AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) AC_REQUIRE([AC_LTDL_DLSYM_USCORE]) AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS]) AC_REQUIRE([AC_LTDL_FUNC_ARGZ]) AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ stdio.h unistd.h]) AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h]) AC_CHECK_HEADERS([string.h strings.h], [break]) AC_CHECK_FUNCS([strchr index], [break]) AC_CHECK_FUNCS([strrchr rindex], [break]) AC_CHECK_FUNCS([memcpy bcopy], [break]) AC_CHECK_FUNCS([memmove strcmp]) AC_CHECK_FUNCS([closedir opendir readdir]) ])# AC_LIB_LTDL # AC_LTDL_ENABLE_INSTALL # ---------------------- AC_DEFUN([AC_LTDL_ENABLE_INSTALL], [AC_ARG_ENABLE([ltdl-install], [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])]) AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) ])])# AC_LTDL_ENABLE_INSTALL # AC_LTDL_SYS_DLOPEN_DEPLIBS # -------------------------- AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether deplibs are loaded by dlopen], [libltdl_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. libltdl_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. libltdl_cv_sys_dlopen_deplibs=unknown ;; aix[[45]]*) libltdl_cv_sys_dlopen_deplibs=yes ;; 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 libltdl_cv_sys_dlopen_deplibs=yes ;; gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) # GNU and its variants, using gnu ld.so (Glibc) libltdl_cv_sys_dlopen_deplibs=yes ;; hpux10*|hpux11*) libltdl_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. libltdl_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. libltdl_cv_sys_dlopen_deplibs=yes ;; netbsd*) libltdl_cv_sys_dlopen_deplibs=yes ;; openbsd*) libltdl_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 explictly say `no'. libltdl_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'. libltdl_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'. libltdl_cv_sys_dlopen_deplibs=yes ;; solaris*) libltdl_cv_sys_dlopen_deplibs=yes ;; esac ]) if test "$libltdl_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 ])# AC_LTDL_SYS_DLOPEN_DEPLIBS # AC_LTDL_SHLIBEXT # ---------------- AC_DEFUN([AC_LTDL_SHLIBEXT], [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) AC_CACHE_CHECK([which extension is used for loadable modules], [libltdl_cv_shlibext], [ module=yes eval libltdl_cv_shlibext=$shrext_cmds ]) if test -n "$libltdl_cv_shlibext"; then AC_DEFINE_UNQUOTED([LTDL_SHLIB_EXT], ["$libltdl_cv_shlibext"], [Define to the extension used for shared libraries, say, ".so".]) fi ])# AC_LTDL_SHLIBEXT # AC_LTDL_SHLIBPATH # ----------------- AC_DEFUN([AC_LTDL_SHLIBPATH], [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) AC_CACHE_CHECK([which variable specifies run-time library path], [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"]) if test -n "$libltdl_cv_shlibpath_var"; then AC_DEFINE_UNQUOTED([LTDL_SHLIBPATH_VAR], ["$libltdl_cv_shlibpath_var"], [Define to the name of the environment variable that determines the dynamic library search path.]) fi ])# AC_LTDL_SHLIBPATH # AC_LTDL_SYSSEARCHPATH # --------------------- AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) AC_CACHE_CHECK([for the default library search path], [libltdl_cv_sys_search_path], [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) if test -n "$libltdl_cv_sys_search_path"; then sys_search_path= for dir in $libltdl_cv_sys_search_path; do if test -z "$sys_search_path"; then sys_search_path="$dir" else sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" fi done AC_DEFINE_UNQUOTED([LTDL_SYSSEARCHPATH], ["$sys_search_path"], [Define to the system default library search path.]) fi ])# AC_LTDL_SYSSEARCHPATH # AC_LTDL_OBJDIR # -------------- AC_DEFUN([AC_LTDL_OBJDIR], [AC_CACHE_CHECK([for objdir], [libltdl_cv_objdir], [libltdl_cv_objdir="$objdir" if test -n "$objdir"; then : else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then libltdl_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. libltdl_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi ]) AC_DEFINE_UNQUOTED([LTDL_OBJDIR], ["$libltdl_cv_objdir/"], [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# AC_LTDL_OBJDIR # AC_LTDL_DLPREOPEN # ----------------- AC_DEFUN([AC_LTDL_DLPREOPEN], [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) 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 ])# AC_LTDL_DLPREOPEN # AC_LTDL_DLLIB # ------------- AC_DEFUN([AC_LTDL_DLLIB], [LIBADD_DL= AC_SUBST(LIBADD_DL) AC_LANG_PUSH([C]) AC_CHECK_FUNC([shl_load], [AC_DEFINE([HAVE_SHL_LOAD], [1], [Define if you have the shl_load function.])], [AC_CHECK_LIB([dld], [shl_load], [AC_DEFINE([HAVE_SHL_LOAD], [1], [Define if you have the shl_load function.]) LIBADD_DL="$LIBADD_DL -ldld"], [AC_CHECK_LIB([dl], [dlopen], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"], [AC_TRY_LINK([#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"], [AC_CHECK_LIB([svld], [dlopen], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"], [AC_CHECK_LIB([dld], [dld_link], [AC_DEFINE([HAVE_DLD], [1], [Define if you have the GNU dld library.]) LIBADD_DL="$LIBADD_DL -ldld"], [AC_CHECK_FUNC([_dyld_func_lookup], [AC_DEFINE([HAVE_DYLD], [1], [Define if you have the _dyld_func_lookup function.])]) ]) ]) ]) ]) ]) ]) if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes then lt_save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DL" AC_CHECK_FUNCS([dlerror]) LIBS="$lt_save_LIBS" fi AC_LANG_POP ])# AC_LTDL_DLLIB # AC_LTDL_SYMBOL_USCORE # --------------------- # does the compiler prefix global symbols with an underscore? AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) AC_CACHE_CHECK([for _ prefix in compiled symbols], [ac_cv_sys_symbol_underscore], [ac_cv_sys_symbol_underscore=no cat > conftest.$ac_ext < $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 ac_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" >&AC_FD_CC fi fi else echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC fi else echo "configure: failed program was:" >&AC_FD_CC cat conftest.c >&AC_FD_CC fi rm -rf conftest* ]) ])# AC_LTDL_SYMBOL_USCORE # AC_LTDL_DLSYM_USCORE # -------------------- AC_DEFUN([AC_LTDL_DLSYM_USCORE], [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) if test x"$ac_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_DL" _LT_AC_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 ])# AC_LTDL_DLSYM_USCORE # AC_LTDL_FUNC_ARGZ # ----------------- AC_DEFUN([AC_LTDL_FUNC_ARGZ], [AC_CHECK_HEADERS([argz.h]) 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.])], [#if HAVE_ARGZ_H # include #endif]) AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify]) ])# AC_LTDL_FUNC_ARGZ unixODBC-2.2.14-p2/libltdl/configure.ac0100644000076400007640000000431410312533404016106 0ustar nicknick## Process this file with autoconf to create configure. -*- autoconf -*- # Copyright 2001 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 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 dnl FIXME: Is this really new enough? AC_PREREQ(2.50) ## ------------------------ ## ## Autoconf initialisation. ## ## ------------------------ ## AC_INIT([libltdl], [1.2], [bug-libtool@gnu.org]) AC_CONFIG_SRCDIR([ltdl.c]) ## ------------------------------- ## ## Libltdl specific configuration. ## ## ------------------------------- ## AC_CONFIG_AUX_DIR([.]) if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then if test -f ${srcdir}/ltmain.sh; then # if libltdl is libtoolized, it is assumed to be stand-alone and # installed unless the command line overrides it (tested above) enable_ltdl_install=yes else AC_MSG_WARN([*** The top-level configure must select either]) AC_MSG_WARN([*** [A""C_LIBLTDL_INSTALLABLE] or [A""C_LIBLTDL_CONVENIENCE].]) AC_MSG_ERROR([*** Maybe you want to --enable-ltdl-install?]) fi fi ## ------------------------ ## ## Automake Initialisation. ## ## ------------------------ ## AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, -) AM_CONFIG_HEADER([config.h:config-h.in]) ## ------------------ ## ## C compiler checks. ## ## ------------------ ## AC_PROG_CC AC_C_CONST AC_C_INLINE ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_SUBST([LIBTOOL_DEPS]) AC_LIB_LTDL ## -------- ## ## Outputs. ## ## -------- ## AC_CONFIG_FILES([Makefile]) AC_OUTPUT unixODBC-2.2.14-p2/libltdl/aclocal.m40100644000076400007640000007551511011033550015465 0ustar nicknick# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 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. # 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. # Copyright (C) 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # 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 # 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 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 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 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # 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 case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # 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]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 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 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # 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"]) ]) # Copyright (C) 1996, 1997, 2000, 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. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 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 12 # 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.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([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 ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # 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_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # 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])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 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 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 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. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 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. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 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 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 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. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # 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="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # 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([acinclude.m4]) unixODBC-2.2.14-p2/libltdl/ltdl.h0100644000076400007640000002714610307012274014741 0ustar nicknick/* ltdl.h -- generic dlopen functions Copyright (C) 1998-2000 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. 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 it under the same distribution terms that you use for the rest of that program. 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 */ /* Only include this header file once. */ #ifndef LTDL_H #define LTDL_H 1 #include /* for size_t declaration */ /* --- MACROS FOR PORTABILITY --- */ /* 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. */ #ifdef __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_BEGIN_C_DECLS /* LT_PARAMS is a macro used to wrap function prototypes, so that compilers that don't understand ANSI C prototypes still work, and ANSI C compilers can issue warnings about type mismatches. */ #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) # define LT_PARAMS(protos) protos # define lt_ptr void* #else # define LT_PARAMS(protos) () # define lt_ptr char* #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 /* LT_CONC creates a new concatenated symbol for the compiler in a portable way. */ #if defined(__STDC__) || defined(__cplusplus) || defined(_MSC_VER) # define LT_CONC(s,t) s##t #else # define LT_CONC(s,t) s/**/t #endif /* LT_STRLEN can be used safely on NULL pointers. */ #define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0) /* --- WINDOWS SUPPORT --- */ /* Canonicalise Windows and Cygwin recognition macros. */ #ifdef __CYGWIN32__ # ifndef __CYGWIN__ # define __CYGWIN__ __CYGWIN32__ # endif #endif #if defined(_WIN32) || defined(WIN32) # ifndef __WINDOWS__ # ifdef _WIN32 # define __WINDOWS__ _WIN32 # else # ifdef WIN32 # define __WINDOWS__ WIN32 # endif # endif # endif #endif #ifdef __WINDOWS__ # ifndef __CYGWIN__ /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory separator when it is set. */ # define LT_DIRSEP_CHAR '\\' # define LT_PATHSEP_CHAR ';' # endif #endif #ifndef LT_PATHSEP_CHAR # define LT_PATHSEP_CHAR ':' #endif /* DLL building support on win32 hosts; mostly to workaround their ridiculous implementation of data symbol exporting. */ #ifndef LT_SCOPE # ifdef __WINDOWS__ # ifdef DLL_EXPORT /* defined by libtool (if required) */ # define LT_SCOPE __declspec(dllexport) # endif # ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */ # define LT_SCOPE extern __declspec(dllimport) # endif # endif # ifndef LT_SCOPE /* static linking or !__WINDOWS__ */ # define LT_SCOPE extern # endif #endif #if defined(_MSC_VER) /* Visual Studio */ # define R_OK 4 #endif /* --- DYNAMIC MODULE LOADING API --- */ typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */ /* Initialisation and finalisation functions for libltdl. */ LT_SCOPE int lt_dlinit LT_PARAMS((void)); LT_SCOPE int lt_dlexit LT_PARAMS((void)); /* Module search path manipulation. */ LT_SCOPE int lt_dladdsearchdir LT_PARAMS((const char *search_dir)); LT_SCOPE int lt_dlinsertsearchdir LT_PARAMS((const char *before, const char *search_dir)); LT_SCOPE int lt_dlsetsearchpath LT_PARAMS((const char *search_path)); LT_SCOPE const char *lt_dlgetsearchpath LT_PARAMS((void)); LT_SCOPE int lt_dlforeachfile LT_PARAMS(( const char *search_path, int (*func) (const char *filename, lt_ptr data), lt_ptr data)); /* Portable libltdl versions of the system dlopen() API. */ LT_SCOPE lt_dlhandle lt_dlopen LT_PARAMS((const char *filename)); LT_SCOPE lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename)); LT_SCOPE lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle, const char *name)); LT_SCOPE const char *lt_dlerror LT_PARAMS((void)); LT_SCOPE int lt_dlclose LT_PARAMS((lt_dlhandle handle)); /* Module residency management. */ LT_SCOPE int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle)); LT_SCOPE int lt_dlisresident LT_PARAMS((lt_dlhandle handle)); /* --- MUTEX LOCKING --- */ typedef void lt_dlmutex_lock LT_PARAMS((void)); typedef void lt_dlmutex_unlock LT_PARAMS((void)); typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg)); typedef const char *lt_dlmutex_geterror LT_PARAMS((void)); LT_SCOPE int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock, lt_dlmutex_unlock *unlock, lt_dlmutex_seterror *seterror, lt_dlmutex_geterror *geterror)); /* --- MEMORY HANDLING --- */ /* By default, the realloc function pointer is set to our internal realloc implementation which iself uses lt_dlmalloc and lt_dlfree. libltdl relies on a featureful realloc, but if you are sure yours has the right semantics then you can assign it directly. Generally, it is safe to assign just a malloc() and a free() function. */ LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)); LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)); LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)); /* --- PRELOADED MODULE SUPPORT --- */ /* A preopened symbol. Arrays of this type comprise the exported symbols for a dlpreopened module. */ typedef struct { const char *name; lt_ptr address; } lt_dlsymlist; LT_SCOPE int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded)); LT_SCOPE int lt_dlpreload_default LT_PARAMS((const lt_dlsymlist *preloaded)); #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 --- */ /* 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. */ } lt_dlinfo; LT_SCOPE const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)); LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place)); LT_SCOPE int lt_dlforeach LT_PARAMS(( int (*func) (lt_dlhandle handle, lt_ptr data), lt_ptr data)); /* Associating user data with loaded modules. */ typedef unsigned lt_dlcaller_id; LT_SCOPE lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void)); LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key, lt_dlhandle handle, lt_ptr data)); LT_SCOPE lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key, lt_dlhandle handle)); /* --- USER MODULE LOADER API --- */ typedef struct lt_dlloader lt_dlloader; typedef lt_ptr lt_user_data; typedef lt_ptr lt_module; /* Function pointer types for creating user defined module loaders. */ typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data, const char *filename)); typedef int lt_module_close LT_PARAMS((lt_user_data loader_data, lt_module handle)); typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data, lt_module handle, const char *symbol)); typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data)); struct lt_user_dlloader { const char *sym_prefix; lt_module_open *module_open; lt_module_close *module_close; lt_find_sym *find_sym; lt_dlloader_exit *dlloader_exit; lt_user_data dlloader_data; }; LT_SCOPE lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place)); LT_SCOPE lt_dlloader *lt_dlloader_find LT_PARAMS(( const char *loader_name)); LT_SCOPE const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place)); LT_SCOPE lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place)); LT_SCOPE int lt_dlloader_add LT_PARAMS((lt_dlloader *place, const struct lt_user_dlloader *dlloader, const char *loader_name)); LT_SCOPE int lt_dlloader_remove LT_PARAMS(( const char *loader_name)); /* --- ERROR MESSAGE HANDLING --- */ /* 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. */ #define lt_dlerror_table \ LT_ERROR(UNKNOWN, "unknown error") \ LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \ LT_ERROR(INVALID_LOADER, "invalid loader") \ LT_ERROR(INIT_LOADER, "loader initialization failed") \ LT_ERROR(REMOVE_LOADER, "loader removal failed") \ LT_ERROR(FILE_NOT_FOUND, "file not found") \ LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \ LT_ERROR(NO_SYMBOLS, "no symbols defined") \ LT_ERROR(CANNOT_OPEN, "can't open the module") \ LT_ERROR(CANNOT_CLOSE, "can't close the module") \ LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \ LT_ERROR(NO_MEMORY, "not enough memory") \ LT_ERROR(INVALID_HANDLE, "invalid module handle") \ LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \ LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \ LT_ERROR(SHUTDOWN, "library already shutdown") \ LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \ LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \ LT_ERROR(INVALID_POSITION, "invalid search path insert position") /* 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 }; /* These functions are only useful from inside custom module loaders. */ LT_SCOPE int lt_dladderror LT_PARAMS((const char *diagnostic)); LT_SCOPE int lt_dlseterror LT_PARAMS((int errorcode)); /* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */ #ifdef LT_NON_POSIX_NAMESPACE # define lt_ptr_t lt_ptr # define lt_module_t lt_module # define lt_module_open_t lt_module_open # define lt_module_close_t lt_module_close # define lt_find_sym_t lt_find_sym # define lt_dlloader_exit_t lt_dlloader_exit # define lt_dlloader_t lt_dlloader # define lt_dlloader_data_t lt_user_data #endif LT_END_C_DECLS #endif /* !LTDL_H */ unixODBC-2.2.14-p2/libltdl/Makefile.am0100644000076400007640000000137310307012274015657 0ustar nicknick## Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = no-dependencies foreign if INSTALL_LTDL include_HEADERS = ltdl.h lib_LTLIBRARIES = libltdl.la else noinst_HEADERS = ltdl.h endif if CONVENIENCE_LTDL noinst_LTLIBRARIES = libltdlc.la endif ## Make sure these will be cleaned even when they're not built by ## default. CLEANFILES = libltdl.la libltdlc.la libltdl_la_SOURCES = ltdl.c libltdl_la_LDFLAGS = -no-undefined -version-info 4:2:1 libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = ltdl.c libltdlc_la_LIBADD = $(LIBADD_DL) ## Because we do not have automatic dependency tracking: ltdl.lo: ltdl.h config.h $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck unixODBC-2.2.14-p2/libltdl/Makefile.in0100644000076400007640000005026511011033566015674 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ DIST_COMMON = README $(am__configure_deps) $(am__include_HEADERS_DIST) \ $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config-h.in \ $(top_srcdir)/configure COPYING.LIB acconfig.h config.guess \ config.sub install-sh ltmain.sh missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libltdl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libltdl_la_OBJECTS = ltdl.lo libltdl_la_OBJECTS = $(am_libltdl_la_OBJECTS) @INSTALL_LTDL_TRUE@am_libltdl_la_rpath = -rpath $(libdir) libltdlc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libltdlc_la_OBJECTS = ltdl.lo libltdlc_la_OBJECTS = $(am_libltdlc_la_OBJECTS) @CONVENIENCE_LTDL_TRUE@am_libltdlc_la_rpath = DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES) DIST_SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES) am__include_HEADERS_DIST = ltdl.h includeHEADERS_INSTALL = $(INSTALL_HEADER) am__noinst_HEADERS_DIST = ltdl.h HEADERS = $(include_HEADERS) $(noinst_HEADERS) 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); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVENIENCE_LTDL_FALSE = @CONVENIENCE_LTDL_FALSE@ CONVENIENCE_LTDL_TRUE = @CONVENIENCE_LTDL_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LTDL_FALSE = @INSTALL_LTDL_FALSE@ INSTALL_LTDL_TRUE = @INSTALL_LTDL_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ 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@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = no-dependencies foreign @INSTALL_LTDL_TRUE@include_HEADERS = ltdl.h @INSTALL_LTDL_TRUE@lib_LTLIBRARIES = libltdl.la @INSTALL_LTDL_FALSE@noinst_HEADERS = ltdl.h @CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = libltdlc.la CLEANFILES = libltdl.la libltdlc.la libltdl_la_SOURCES = ltdl.c libltdl_la_LDFLAGS = -no-undefined -version-info 4:2:1 libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = ltdl.c libltdlc_la_LIBADD = $(LIBADD_DL) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign 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: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) 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: $(am__configure_deps) $(top_srcdir)/acconfig.h cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libltdl.la: $(libltdl_la_OBJECTS) $(libltdl_la_DEPENDENCIES) $(LINK) $(am_libltdl_la_rpath) $(libltdl_la_LDFLAGS) $(libltdl_la_OBJECTS) $(libltdl_la_LIBADD) $(LIBS) libltdlc.la: $(libltdlc_la_OBJECTS) $(libltdlc_la_DEPENDENCIES) $(LINK) $(am_libltdlc_la_rpath) $(libltdlc_la_LDFLAGS) $(libltdlc_la_OBJECTS) $(libltdlc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(COMPILE) -c $< .c.obj: $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ rm -f "$(DESTDIR)$(includedir)/$$f"; \ 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(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-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) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(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) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && 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 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @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: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h installdirs: for dir in "$(DESTDIR)$(libdir)" "$(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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-includeHEADERS install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -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-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-info-am \ uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES ctags dist dist-all dist-bzip2 \ dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-includeHEADERS install-info \ install-info-am install-libLTLIBRARIES install-man \ 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-info-am \ uninstall-libLTLIBRARIES ltdl.lo: ltdl.h config.h $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck # 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: unixODBC-2.2.14-p2/libltdl/config-h.in0100644000076400007640000001312111011033634015633 0ustar nicknick/* config-h.in. Generated from configure.ac by autoheader. */ /* Some of these are defined here, not in configure.in, because they're AC_DEFINEd in two different places, which causes two defines to appear. Some C compilers might now appreciate it... */ /* Define if you have the libdl library or equivalent. */ #undef HAVE_LIBDL /* Define if you have the GNU dld library. */ #undef HAVE_DLD /* Define if you have the shl_load function. */ #undef HAVE_SHL_LOAD /* Define to 1 if you have the `argz_append' function. */ #undef HAVE_ARGZ_APPEND /* 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_ASSERT_H /* Define to 1 if you have the `bcopy' function. */ #undef HAVE_BCOPY /* Define to 1 if you have the `closedir' function. */ #undef HAVE_CLOSEDIR /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #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 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 `index' function. */ #undef HAVE_INDEX /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if you have the libdl library or equivalent. */ #undef HAVE_LIBDL /* Define to 1 if you have the header file. */ #undef HAVE_MACH_O_DYLD_H /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `opendir' function. */ #undef HAVE_OPENDIR /* Define if libtool can extract symbol lists from object files. */ #undef HAVE_PRELOADED_SYMBOLS /* Define to 1 if you have the `readdir' function. */ #undef HAVE_READDIR /* Define to 1 if you have the `rindex' function. */ #undef HAVE_RINDEX /* Define if you have the shl_load function. */ #undef HAVE_SHL_LOAD /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_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 `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strcmp' function. */ #undef HAVE_STRCMP /* 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 `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_DL_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_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_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define if the OS needs help to load dependent libraries for dlopen(). */ #undef LTDL_DLOPEN_DEPLIBS /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LTDL_OBJDIR /* Define to the name of the environment variable that determines the dynamic library search path. */ #undef LTDL_SHLIBPATH_VAR /* Define to the extension used for shared libraries, say, ".so". */ #undef LTDL_SHLIB_EXT /* Define to the system default library search path. */ #undef LTDL_SYSSEARCHPATH /* Define if dlsym() requires a leading underscore in symbol names. */ #undef NEED_USCORE /* 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 to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* 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 `__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 unixODBC-2.2.14-p2/libltdl/configure0100755000076400007640000275147411011033573015550 0ustar nicknick#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for libltdl 1.2. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 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=: # 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 # 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 # 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 # 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.) as_nl=' ' 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 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. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # 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 || 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=: # 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 : _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=: # 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 : (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 autoconf@gnu.org about your system, echo including any error possibly output before this echo message } 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" || { 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 fi echo >conf$$.file 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 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'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$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 && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 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='libltdl' PACKAGE_TARNAME='libltdl' PACKAGE_VERSION='1.2' PACKAGE_STRING='libltdl 1.2' PACKAGE_BUGREPORT='bug-libtool@gnu.org' ac_unique_file="ltdl.c" # 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" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os GREP EGREP LN_S ECHO AR RANLIB DLLTOOL AS OBJDUMP CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false # 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_TARNAME}' 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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=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 ;; -*) { 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 && { 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. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 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'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. 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 case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { 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 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 .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { 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 -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | 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 .." { 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" || { 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 libltdl 1.2 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/libltdl] --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] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of libltdl 1.2:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static 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 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] 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 CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _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" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 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 libltdl configure 1.2 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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 libltdl $as_me 1.2, which was generated by GNU Autoconf 2.61. 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=. 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=`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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $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=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac 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=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac 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 && echo "$as_me: caught signal $ac_signal" 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 explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 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 { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # 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,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 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 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`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 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 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 ## ------------------------------- ## ## Libltdl specific configuration. ## ## ------------------------------- ## ac_aux_dir= for ac_dir in . "$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 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&5 echo "$as_me: error: cannot find install-sh or install.sh in . \"$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. if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then if test -f ${srcdir}/ltmain.sh; then # if libltdl is libtoolized, it is assumed to be stand-alone and # installed unless the command line overrides it (tested above) enable_ltdl_install=yes else { echo "$as_me:$LINENO: WARNING: *** The top-level configure must select either" >&5 echo "$as_me: WARNING: *** The top-level configure must select either" >&2;} { echo "$as_me:$LINENO: WARNING: *** A\"\"C_LIBLTDL_INSTALLABLE or A\"\"C_LIBLTDL_CONVENIENCE." >&5 echo "$as_me: WARNING: *** A\"\"C_LIBLTDL_INSTALLABLE or A\"\"C_LIBLTDL_CONVENIENCE." >&2;} { { echo "$as_me:$LINENO: error: *** Maybe you want to --enable-ltdl-install?" >&5 echo "$as_me: error: *** Maybe you want to --enable-ltdl-install?" >&2;} { (exit 1); exit 1; }; } fi fi ## ------------------------ ## ## Automake Initialisation. ## ## ------------------------ ## am__api_version="1.9" # 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. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS 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 { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$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' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 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 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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 $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`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 echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } 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=libltdl VERSION=1.2 # 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"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # 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:config-h.in" ## ------------------ ## ## C compiler checks. ## ## ------------------ ## 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 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. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? 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.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. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? 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 | *.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 { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 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. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? 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 { { 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 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 { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out 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. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? 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 | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? 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 ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else 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 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else 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 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else 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) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$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 done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_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= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # 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 { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else 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 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6; } if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else 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 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$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 ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## # 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 --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=yes fi # 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 # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 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` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 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 { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 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 { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && 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 fi SED=$lt_cv_path_SED { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name 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 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # 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. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$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='$CC -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi { echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 aix4* | aix5*) 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'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu | 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 ;; 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*) 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=unknown ;; 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 ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$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 no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # 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=$? 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 4487 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? 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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|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=$? 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-*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-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi 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 { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$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 ;; *-*-cygwin* | *-*-mingw* | *-*-pw32*) 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 echo "${ECHO_T}$DLLTOOL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $AS" >&5 echo "${ECHO_T}$AS" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 echo "${ECHO_T}$ac_ct_AS" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 echo "${ECHO_T}$OBJDUMP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac need_locks="$enable_libtool_lock" 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 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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 echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$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 "echo \"\$as_me:$LINENO: $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 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 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 "echo \"\$as_me:$LINENO: $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 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 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 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 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 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else 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 echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------- ## ## Report this to bug-libtool@gnu.org ## ## ---------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else 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 { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else 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 { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$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=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 depcc="$CXX" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # 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 { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$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 "echo \"\$as_me:$LINENO: $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 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 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 "echo \"\$as_me:$LINENO: $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 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 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 { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # 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_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog" 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_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else 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_f77_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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*) # 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` ;; 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 ;; *) # 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. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done 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` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else { echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris* | sysv5*) symcode='[BDRT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # 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. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? 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=$? 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 < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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 -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done 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 { echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6; } else { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" 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 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi 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 case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=yes # 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 # 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 # Use C for the default configuration in the libtool script tagname= 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;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # # Check for any special shared library compilation flags. # lt_prog_cc_shlib= if test "$GCC" = no; then case $host_os in sco3.2v5*) lt_prog_cc_shlib='-belf' ;; esac fi if test -n "$lt_prog_cc_shlib"; then { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : else { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} lt_cv_prog_cc_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # { echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_prog_compiler_static" printf "$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 > conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works=yes fi else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi ## 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_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$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:7528: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7532: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$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= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&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*) # 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' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_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' ;; 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 ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) 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 ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_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' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' 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' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic='-Kpic' lt_prog_compiler_static='-dn' ;; 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* | sysv5*) 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 ;; 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 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$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:7790: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7794: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } if test x"$lt_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 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 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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:7852: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7856: \$? = $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 > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || 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 .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 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 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list 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_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. 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-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac 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>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) 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 # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; 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*) # _LT_AC_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}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... 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}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= 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' ;; esac archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; 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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi 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* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 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 ;; 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 "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 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].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes 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 # 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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 $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then 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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec=' ' 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 $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) 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 # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. 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 "$deplibs" | $SED -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*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = 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' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac 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* | kfreebsd*-gnu | 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* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -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*|ia64*) archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=no hardcode_shlibpath_var=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no hardcode_shlibpath_var=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: 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 ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no 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 ;; 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi 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 ${wl}-set_version ${wl}$verstring` ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else 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' 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 linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; 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.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now 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' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; 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 fi { echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$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. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? 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 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=$? 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* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; 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*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_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' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $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' ;; knetbsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU 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=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant 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_AC_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 { echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac 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*) 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 { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = 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 ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" 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" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$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 # Report which librarie types wil actually be built { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # 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 # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 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. # 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//" # 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 # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$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 # 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 # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # 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 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_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 and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. 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 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_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 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 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$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 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" 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 CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (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 archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_automatic_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 # 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= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm 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 unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC 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-%%"` # We don't want -fno-exception wen 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. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes 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 # 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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 $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then 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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX=' ' 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 $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_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}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... 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}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac 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 if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else 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' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac 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* | kfreebsd*-gnu | 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) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then 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 case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_CXX='+b $libdir' hardcode_libdir_separator_CXX=: ;; ia64*) hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; *) hardcode_direct_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*|ia64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) 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 $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in ia64*|hppa*64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) 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 ;; 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 -set_version $verstring` -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 ${wl}-set_version ${wl}$verstring` ${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 ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. 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 $list' 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*) # 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*) # Portland Group C++ compiler 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' 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 $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support 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::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no 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' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. 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 # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) 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 ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 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. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 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 ;; 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. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) 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 -set_version $verstring` -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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' 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" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' 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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 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 ;; sco*) archive_cmds_need_lc_CXX=no case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; 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 C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}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' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) archive_cmds_need_lc_CXX=no ;; 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 { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$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... cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? 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 # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 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 solaris*) case $cc_basename in CC*) # 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. postdeps_CXX='-lCstd -lCrun' ;; esac esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&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*) # 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' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_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= ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_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_AC_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 ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; 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* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_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="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; 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*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC*) # 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' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; 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*) ;; sco*) case $cc_basename in CC*) lt_prog_compiler_pic_CXX='-fPIC' ;; *) ;; esac ;; 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 ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$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:12416: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:12420: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_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 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 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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:12478: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:12482: \$? = $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 > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || 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 .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 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 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 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*) 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 { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$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. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? 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 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=$? 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* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; 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*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_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' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $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' ;; knetbsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU 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=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&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-existant 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_AC_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 { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac 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*) 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 { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = 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 ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" 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" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$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 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # 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 # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$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 # 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 # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_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 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_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 and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. 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 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_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 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 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$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 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" 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 CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$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-%%"` { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-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_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; 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_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-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_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_F77='-Kpic' lt_prog_compiler_static_F77='-dn' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # 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:14805: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14809: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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:14867: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14871: \$? = $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 > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=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 .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 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 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # 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_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. 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-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=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_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$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_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$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_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_F77=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${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_F77='${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' ;; esac archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$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_F77=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$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_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes else # We have old collect2 hardcode_direct_F77=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_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= 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 # 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_F77=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_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _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 "echo \"\$as_me:$LINENO: $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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _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 "echo \"\$as_me:$LINENO: $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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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_F77='${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_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_F77=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77=' ' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$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_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$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_F77='$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_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*|ia64*) archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; ia64*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; *) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; sco3.2v5*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4.2uw2*) archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_F77='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv5*) no_undefined_flag_F77=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$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' hardcode_libdir_flag_spec_F77= hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 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. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? 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_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; 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*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_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' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $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' ;; knetbsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU 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=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # 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 # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # 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 # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # 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_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # 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_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" 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 CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$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-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$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... lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$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:16996: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17000: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; 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_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_GCJ='-Kpic' lt_prog_compiler_static_GCJ='-dn' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # 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:17258: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17262: \$? = $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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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:17320: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:17324: \$? = $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 > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=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 .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 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 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # 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_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. 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-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=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_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$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_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$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_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_GCJ=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${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_GCJ='${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' ;; esac archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$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_GCJ=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$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_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=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_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= 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 # 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_GCJ=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_GCJ='-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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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_GCJ='${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_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ=' ' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$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_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$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_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*|ia64*) archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; ia64*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; *) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; sco3.2v5*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4.2uw2*) archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv5*) no_undefined_flag_GCJ=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$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' hardcode_libdir_flag_spec_GCJ= hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ 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. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? 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_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; 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*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_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' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $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' ;; knetbsd*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU 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=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac 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*) 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 { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = 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 ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" 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" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$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 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # 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 # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # 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 # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # 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_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # 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_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" 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 CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # 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. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$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-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # 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 # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # 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 # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # 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_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # 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_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" 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 CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 <$ac_hdr> int main () { if ((DIR *) 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else 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 echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi # Check whether --enable-ltdl-install was given. if test "${enable_ltdl_install+set}" = set; then enableval=$enable_ltdl_install; fi 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 { echo "$as_me:$LINENO: checking which extension is used for loadable modules" >&5 echo $ECHO_N "checking which extension is used for loadable modules... $ECHO_C" >&6; } if test "${libltdl_cv_shlibext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else module=yes eval libltdl_cv_shlibext=$shrext_cmds fi { echo "$as_me:$LINENO: result: $libltdl_cv_shlibext" >&5 echo "${ECHO_T}$libltdl_cv_shlibext" >&6; } if test -n "$libltdl_cv_shlibext"; then cat >>confdefs.h <<_ACEOF #define LTDL_SHLIB_EXT "$libltdl_cv_shlibext" _ACEOF fi { echo "$as_me:$LINENO: checking which variable specifies run-time library path" >&5 echo $ECHO_N "checking which variable specifies run-time library path... $ECHO_C" >&6; } if test "${libltdl_cv_shlibpath_var+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_shlibpath_var="$shlibpath_var" fi { echo "$as_me:$LINENO: result: $libltdl_cv_shlibpath_var" >&5 echo "${ECHO_T}$libltdl_cv_shlibpath_var" >&6; } if test -n "$libltdl_cv_shlibpath_var"; then cat >>confdefs.h <<_ACEOF #define LTDL_SHLIBPATH_VAR "$libltdl_cv_shlibpath_var" _ACEOF fi { echo "$as_me:$LINENO: checking for the default library search path" >&5 echo $ECHO_N "checking for the default library search path... $ECHO_C" >&6; } if test "${libltdl_cv_sys_search_path+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec" fi { echo "$as_me:$LINENO: result: $libltdl_cv_sys_search_path" >&5 echo "${ECHO_T}$libltdl_cv_sys_search_path" >&6; } if test -n "$libltdl_cv_sys_search_path"; then sys_search_path= for dir in $libltdl_cv_sys_search_path; do if test -z "$sys_search_path"; then sys_search_path="$dir" else sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" fi done cat >>confdefs.h <<_ACEOF #define LTDL_SYSSEARCHPATH "$sys_search_path" _ACEOF fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${libltdl_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_objdir="$objdir" if test -n "$objdir"; then : else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then libltdl_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. libltdl_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi fi { echo "$as_me:$LINENO: result: $libltdl_cv_objdir" >&5 echo "${ECHO_T}$libltdl_cv_objdir" >&6; } cat >>confdefs.h <<_ACEOF #define LTDL_OBJDIR "$libltdl_cv_objdir/" _ACEOF { echo "$as_me:$LINENO: checking whether libtool supports -dlopen/-dlpreopen" >&5 echo $ECHO_N "checking whether libtool supports -dlopen/-dlpreopen... $ECHO_C" >&6; } if test "${libltdl_cv_preloaded_symbols+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: $libltdl_cv_preloaded_symbols" >&5 echo "${ECHO_T}$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 LIBADD_DL= 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 { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SHL_LOAD 1 _ACEOF else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SHL_LOAD 1 _ACEOF LIBADD_DL="$LIBADD_DL -ldld" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes" 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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF libltdl_cv_func_dlopen="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DLD 1 _ACEOF LIBADD_DL="$LIBADD_DL -ldld" else { echo "$as_me:$LINENO: checking for _dyld_func_lookup" >&5 echo $ECHO_N "checking for _dyld_func_lookup... $ECHO_C" >&6; } if test "${ac_cv_func__dyld_func_lookup+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then ac_cv_func__dyld_func_lookup=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__dyld_func_lookup=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func__dyld_func_lookup" >&5 echo "${ECHO_T}$ac_cv_func__dyld_func_lookup" >&6; } if test $ac_cv_func__dyld_func_lookup = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DYLD 1 _ACEOF fi fi fi fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi fi 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_DL" for ac_func in dlerror do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$lt_save_LIBS" 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 { echo "$as_me:$LINENO: checking for _ prefix in compiled symbols" >&5 echo $ECHO_N "checking for _ prefix in compiled symbols... $ECHO_C" >&6; } if test "${ac_cv_sys_symbol_underscore+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_symbol_underscore=no cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? 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=$? 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 ac_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 { echo "$as_me:$LINENO: result: $ac_cv_sys_symbol_underscore" >&5 echo "${ECHO_T}$ac_cv_sys_symbol_underscore" >&6; } if test x"$ac_cv_sys_symbol_underscore" = xyes; then if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then { echo "$as_me:$LINENO: checking whether we have to add an underscore for dlsym" >&5 echo $ECHO_N "checking whether we have to add an underscore for dlsym... $ECHO_C" >&6; } if test "${libltdl_cv_need_uscore+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_need_uscore=unknown save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DL" 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 < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? 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_unknown|x*) ;; esac else : # compilation failed fi fi rm -fr conftest* LIBS="$save_LIBS" fi { echo "$as_me:$LINENO: result: $libltdl_cv_need_uscore" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking whether deplibs are loaded by dlopen" >&5 echo $ECHO_N "checking whether deplibs are loaded by dlopen... $ECHO_C" >&6; } if test "${libltdl_cv_sys_dlopen_deplibs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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. libltdl_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. libltdl_cv_sys_dlopen_deplibs=unknown ;; aix[45]*) libltdl_cv_sys_dlopen_deplibs=yes ;; 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 libltdl_cv_sys_dlopen_deplibs=yes ;; gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) # GNU and its variants, using gnu ld.so (Glibc) libltdl_cv_sys_dlopen_deplibs=yes ;; hpux10*|hpux11*) libltdl_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. libltdl_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. libltdl_cv_sys_dlopen_deplibs=yes ;; netbsd*) libltdl_cv_sys_dlopen_deplibs=yes ;; openbsd*) libltdl_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 explictly say `no'. libltdl_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'. libltdl_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'. libltdl_cv_sys_dlopen_deplibs=yes ;; solaris*) libltdl_cv_sys_dlopen_deplibs=yes ;; esac fi { echo "$as_me:$LINENO: result: $libltdl_cv_sys_dlopen_deplibs" >&5 echo "${ECHO_T}$libltdl_cv_sys_dlopen_deplibs" >&6; } if test "$libltdl_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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------- ## ## Report this to bug-libtool@gnu.org ## ## ---------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for error_t" >&5 echo $ECHO_N "checking for error_t... $ECHO_C" >&6; } if test "${ac_cv_type_error_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_ARGZ_H # include #endif typedef error_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_error_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_error_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_error_t" >&5 echo "${ECHO_T}$ac_cv_type_error_t" >&6; } if test $ac_cv_type_error_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_ERROR_T 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define error_t int _ACEOF fi for ac_func in argz_append argz_create_sep argz_insert argz_next argz_stringify do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ stdio.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------- ## ## Report this to bug-libtool@gnu.org ## ## ---------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dl.h sys/dl.h dld.h mach-o/dyld.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------- ## ## Report this to bug-libtool@gnu.org ## ## ---------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in string.h strings.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 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 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------- ## ## Report this to bug-libtool@gnu.org ## ## ---------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in strchr index do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in strrchr rindex do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in memcpy bcopy do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in memmove strcmp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in closedir opendir readdir do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 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 && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ## -------- ## ## Outputs. ## ## -------- ## ac_config_files="$ac_config_files Makefile" 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $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" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 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=`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 -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 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 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 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 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 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 { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 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 { { echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 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 : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $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 ## --------------------- ## ## 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=: # 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 # 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 # 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 # 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.) as_nl=' ' 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 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. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # 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 || 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" || { 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 fi echo >conf$$.file 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 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 libltdl $as_me 1.2, which was generated by GNU Autoconf 2.61. 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 cat >>$CONFIG_STATUS <<_ACEOF # 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_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet 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_cs_version="\\ libltdl config.status 1.2 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 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' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. 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 ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) 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. -*) { 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 if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # 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:config-h.in" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 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") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LN_S!$LN_S$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim DLLTOOL!$DLLTOOL$ac_delim AS!$AS$ac_delim OBJDUMP!$OBJDUMP$ac_delim CPP!$CPP$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 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 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim CXXCPP!$CXXCPP$ac_delim F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim LIBTOOL_DEPS!$LIBTOOL_DEPS$ac_delim INSTALL_LTDL_TRUE!$INSTALL_LTDL_TRUE$ac_delim INSTALL_LTDL_FALSE!$INSTALL_LTDL_FALSE$ac_delim CONVENIENCE_LTDL_TRUE!$CONVENIENCE_LTDL_TRUE$ac_delim CONVENIENCE_LTDL_FALSE!$CONVENIENCE_LTDL_FALSE$ac_delim LIBADD_DL!$LIBADD_DL$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 14; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 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 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _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 fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 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 || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; 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 "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; 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 || 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=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 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=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # 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= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF 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 sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;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 $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out 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"; } && { 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 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 ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then 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. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`$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 || echo X$ac_file | 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) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || 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 || 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=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # 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 unixODBC-2.2.14-p2/libltdl/COPYING.LIB0100644000076400007640000006365610307012274015277 0ustar nicknick 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! unixODBC-2.2.14-p2/libltdl/acconfig.h0100644000076400007640000000063407452707312015557 0ustar nicknick/* Some of these are defined here, not in configure.in, because they're AC_DEFINEd in two different places, which causes two defines to appear. Some C compilers might now appreciate it... */ /* Define if you have the libdl library or equivalent. */ #undef HAVE_LIBDL /* Define if you have the GNU dld library. */ #undef HAVE_DLD /* Define if you have the shl_load function. */ #undef HAVE_SHL_LOAD unixODBC-2.2.14-p2/libltdl/config.guess0100755000076400007640000012475310312324047016153 0ustar nicknick#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-08-03' # 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. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted 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. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. 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 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 -q "$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 ;; *) 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 __ELF__ >/dev/null 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 ;; macppc:MirBSD:*:*) echo powerppc-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 ;; 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:SunOS:5.*:*) echo i386-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:*:[45]) 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 __LP64__ >/dev/null 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:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*: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 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-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 ;; arm*: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 ;; 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:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #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; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #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 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu 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 ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 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 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-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 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*) 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 i386. echo i386-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; } ;; 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.0*:*) 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 ;; 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 ;; 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 *86) UNAME_PROCESSOR=i686 ;; 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 ;; 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: unixODBC-2.2.14-p2/libltdl/config.sub0100755000076400007640000007577710312324047015631 0ustar nicknick#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-07-08' # 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 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. # 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 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-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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) os= basic_machine=$1 ;; -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 ;; -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/'` ;; -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 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ms1 \ | msp430 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m32c) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # 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-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | ms1-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; m32c-*) ;; # 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 ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; 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 ;; cr16c) basic_machine=cr16c-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 ;; 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 ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; 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 ;; 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 ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; 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 ;; 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 ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; 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 ;; 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 ;; 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[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) 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. -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* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -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* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -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*) # 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 ;; -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 *-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 ;; 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 ;; -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: unixODBC-2.2.14-p2/libltdl/install-sh0100755000076400007640000002174510312324047015634 0ustar nicknick#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-07-09.12 # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= 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: -c (ignored) -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. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; 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 for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi 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 "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # 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: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then case $dstdir in /*) pathcomp=/ ;; -*) pathcomp=./ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $dstdir shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit 1 fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # 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 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $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 "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); 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-end: "$" # End: unixODBC-2.2.14-p2/libltdl/ltmain.sh0100644000076400007640000055461010312324047015452 0ustar nicknick# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 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. basename="s,^.*/,,g" # 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: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.20 TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)" # 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 # 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 <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" ##################################### # Shell function definitions: # This seems to be the best place for them # 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 () { 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 -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi 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_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 () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" 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. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" 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 $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run 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 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi 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 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xdir="$my_gentop/$my_xlib" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" status=$? if test "$status" -ne 0 && test ! -d "$my_xdir"; then exit $status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do 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 have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` 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}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $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" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2005 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # 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 $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) 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" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 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 $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "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." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </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." $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 $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </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." $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 $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_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 case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$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" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$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 (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi 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. libobjs="$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 non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; 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 ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= 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 compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -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 $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch) prev=darwin_framework compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" 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*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit $EXIT_FAILURE fi 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*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-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 -framework System" 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 ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -module) module=yes continue ;; # -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* pass through architecture-specific compiler args for GCC -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 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*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # 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 ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi 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. libobjs="$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 non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_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. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` 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\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; 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 test "X$duplicate_deps" = "Xyes" ; 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 test "X$duplicate_compiler_generated_deps" = "Xyes" ; 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 link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; 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 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 "$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) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; 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 (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac 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 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." 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 -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; 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 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # 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) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 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 used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi 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 $echo "$modename: cannot find the library \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # 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 case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac 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 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE 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" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi 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 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE 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 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # 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 $echo "$modename: warning: library \`$lib' was moved." 1>&2 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 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE 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" # 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*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test 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 test "X$duplicate_deps" = "Xyes" ; 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 -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 *" $dir "*) ;; *" $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 if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if 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 realname="$2" shift; 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*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" 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* ) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; 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 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; 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 $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE 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; 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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` 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 test "X$duplicate_deps" = "Xyes" ; 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) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared 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 "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs 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" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # 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*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" 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 if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # 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="$2" number_minor="$3" number_revision="$4" # # 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) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; 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]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; 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]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; 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]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE 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 major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` 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 iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` 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 iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; 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 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi 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) ;; $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 if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi 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 "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`$echo "$dependency_libs " | ${SED} -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*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-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. test "X$arg" = "X-lc" && continue ;; *) # 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. $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} 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 else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then 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 \"$potent_lib\" 2>/dev/null \ | ${SED} 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 else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi 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" | ${SED} -e "1s,^X,," -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 is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; 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 # 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 realname="$2" shift; 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" 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` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "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"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$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"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" 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 $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:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # 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= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$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\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 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 ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "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" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" 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\" 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 # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(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 $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 $show "${rm}r $gentop" $run ${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 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run 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 "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $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 wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" 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" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${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" # $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" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi 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 / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac 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*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; 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 dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$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 arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # 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/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= 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*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; 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 if test "$need_relink" = no || test "$build_libtool_libs" != yes; 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. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" 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. $run $rm $output # Link the executable and exit $show "$link_command" $run 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" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 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. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "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}\" || 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 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; 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 our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) cwrappersource=`$echo ${objdir}/lt-${outputname}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #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 DIR_SEPARATOR #define DIR_SEPARATOR '/' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) #define HAVE_DOS_BASED_FILE_SYSTEM #ifndef DIR_SEPARATOR_2 #define DIR_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 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" return 127; } 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 ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } 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); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # 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' # 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 variable: 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 >> $output "\ # 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 # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ 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 >> $output "\ # 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 $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ 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 >> $output "\ # 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 >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ 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*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE 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 $EXIT_FAILURE fi fi\ " chmod +x $output fi 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" 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" 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 # 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 $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$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 $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_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 for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$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= 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 save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "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}\" || 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 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; 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. if test -z "$run"; then 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) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" 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) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # 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' # Libraries that this one depends upon. dependency_libs='$dependency_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 fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # 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. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # 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. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; 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. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # 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 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "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. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run 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 if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run 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 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run 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 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 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 file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo 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. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo 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. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" save_umask=`umask` umask 0077 if $mkdir "$tmpdir"; then umask $save_umask else umask $save_umask $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 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) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" 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. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "----------------------------------------------------------------------" $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" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # 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 ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" 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 if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 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 (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $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" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $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) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # 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 $show "$rm $rmfiles" $run $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 $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [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 --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information 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 \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [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: $modename [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 -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always 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: $modename [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: $modename [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: $modename [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 rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [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 -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] 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: $modename [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." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # 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: unixODBC-2.2.14-p2/libltdl/missing0100755000076400007640000002403610312324047015223 0ustar nicknick#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 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, 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # 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 case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -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' 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]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` 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' is missing on your system. 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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # 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 you do not seem to have it handy on your system. 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 prerequirements 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 unixODBC-2.2.14-p2/libltdl/ltdl.c0100644000076400007640000030124211067202013014720 0ustar nicknick/* ltdl.c -- system independent dlopen wrapper Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. 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 it under the same distribution terms that you use for the rest of that program. 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 */ #if HAVE_CONFIG_H # include #endif #if HAVE_UNISTD_H # include #endif #if HAVE_STDIO_H # include #endif /* Include the header defining malloc. On K&R C compilers, that's , on ANSI C and ISO C compilers, that's . */ #if HAVE_STDLIB_H # include #else # if HAVE_MALLOC_H # include # endif #endif #if HAVE_STRING_H # include #else # if HAVE_STRINGS_H # include # endif #endif #if HAVE_CTYPE_H # include #endif #if HAVE_MEMORY_H # include #endif #if HAVE_ERRNO_H # include #endif #ifndef __WINDOWS__ # ifdef __WIN32__ # define __WINDOWS__ # endif #endif #undef LT_USE_POSIX_DIRENT #ifdef HAVE_CLOSEDIR # ifdef HAVE_OPENDIR # ifdef HAVE_READDIR # ifdef HAVE_DIRENT_H # define LT_USE_POSIX_DIRENT # endif /* HAVE_DIRENT_H */ # endif /* HAVE_READDIR */ # endif /* HAVE_OPENDIR */ #endif /* HAVE_CLOSEDIR */ #undef LT_USE_WINDOWS_DIRENT_EMULATION #ifndef LT_USE_POSIX_DIRENT # ifdef __WINDOWS__ # define LT_USE_WINDOWS_DIRENT_EMULATION # endif /* __WINDOWS__ */ #endif /* LT_USE_POSIX_DIRENT */ #ifdef LT_USE_POSIX_DIRENT # include # define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) #else # ifdef LT_USE_WINDOWS_DIRENT_EMULATION # define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) # else # define dirent direct # define LT_D_NAMLEN(dirent) ((dirent)->d_namlen) # if HAVE_SYS_NDIR_H # include # endif # if HAVE_SYS_DIR_H # include # endif # if HAVE_NDIR_H # include # endif # endif #endif #if HAVE_ARGZ_H # include #endif #if HAVE_ASSERT_H # include #else # define assert(arg) ((void) 0) #endif #include "ltdl.h" #if WITH_DMALLOC # include #endif /* --- WINDOWS SUPPORT --- */ #ifdef DLL_EXPORT # define LT_GLOBAL_DATA __declspec(dllexport) #else # define LT_GLOBAL_DATA #endif /* fopen() mode flags for reading a text file */ #undef LT_READTEXT_MODE #ifdef __WINDOWS__ # define LT_READTEXT_MODE "rt" #else # define LT_READTEXT_MODE "r" #endif #ifdef LT_USE_WINDOWS_DIRENT_EMULATION #include #define dirent lt_dirent #define DIR lt_DIR struct dirent { char d_name[2048]; int d_namlen; }; typedef struct _DIR { HANDLE hSearch; WIN32_FIND_DATA Win32FindData; BOOL firsttime; struct dirent file_info; } DIR; #endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ /* --- 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 LTDL_ARCHIVE_EXT #define LTDL_ARCHIVE_EXT ".la" /* max. filename length */ #ifndef LT_FILENAME_MAX # define LT_FILENAME_MAX 1024 #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 /* --- MEMORY HANDLING --- */ /* These are the functions used internally. In addition to making use of the associated function pointers above, they also perform error handling. */ static char *lt_estrdup LT_PARAMS((const char *str)); static lt_ptr lt_emalloc LT_PARAMS((size_t size)); static lt_ptr lt_erealloc LT_PARAMS((lt_ptr addr, size_t size)); /* static lt_ptr rpl_realloc LT_PARAMS((lt_ptr ptr, size_t size)); */ #define rpl_realloc realloc /* These are the pointers that can be changed by the caller: */ LT_GLOBAL_DATA lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)) = (lt_ptr (*) LT_PARAMS((size_t))) malloc; LT_GLOBAL_DATA lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)) = (lt_ptr (*) LT_PARAMS((lt_ptr, size_t))) rpl_realloc; LT_GLOBAL_DATA void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)) = (void (*) LT_PARAMS((lt_ptr))) free; /* The following macros reduce the amount of typing needed to cast assigned memory. */ #if WITH_DMALLOC #define LT_DLMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) #define LT_DLREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) #define LT_DLFREE(p) \ LT_STMT_START { if (p) (p) = (xfree (p), (lt_ptr) 0); } LT_STMT_END #define LT_EMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) #define LT_EREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) #else #define LT_DLMALLOC(tp, n) ((tp *) lt_dlmalloc ((n) * sizeof(tp))) #define LT_DLREALLOC(tp, p, n) ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp))) #define LT_DLFREE(p) \ LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END #define LT_EMALLOC(tp, n) ((tp *) lt_emalloc ((n) * sizeof(tp))) #define LT_EREALLOC(tp, p, n) ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) #endif #define LT_DLMEM_REASSIGN(p, q) LT_STMT_START { \ if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = 0; } \ } LT_STMT_END /* --- REPLACEMENT FUNCTIONS --- */ #undef strdup #define strdup rpl_strdup static char *strdup LT_PARAMS((const char *str)); static char * strdup(str) const char *str; { char *tmp = 0; if (str) { tmp = LT_DLMALLOC (char, 1+ strlen (str)); if (tmp) { strcpy(tmp, str); } } return tmp; } #if ! HAVE_STRCMP #undef strcmp #define strcmp rpl_strcmp static int strcmp LT_PARAMS((const char *str1, const char *str2)); static int strcmp (str1, str2) const char *str1; const char *str2; { if (str1 == str2) return 0; if (str1 == 0) return -1; if (str2 == 0) return 1; for (;*str1 && *str2; ++str1, ++str2) { if (*str1 != *str2) break; } return (int)(*str1 - *str2); } #endif #if ! HAVE_STRCHR # if HAVE_INDEX # define strchr index # else # define strchr rpl_strchr static const char *strchr LT_PARAMS((const char *str, int ch)); static const char* strchr(str, ch) const char *str; int ch; { const char *p; for (p = str; *p != (char)ch && *p != LT_EOS_CHAR; ++p) /*NOWORK*/; return (*p == (char)ch) ? p : 0; } # endif #endif /* !HAVE_STRCHR */ #if ! HAVE_STRRCHR # if HAVE_RINDEX # define strrchr rindex # else # define strrchr rpl_strrchr static const char *strrchr LT_PARAMS((const char *str, int ch)); static const char* strrchr(str, ch) const char *str; int ch; { const char *p, *q = 0; for (p = str; *p != LT_EOS_CHAR; ++p) { if (*p == (char) ch) { q = p; } } return q; } # endif #endif /* NOTE: Neither bcopy nor the memcpy implementation below can reliably handle copying in overlapping areas of memory. Use memmove (for which there is a fallback implmentation below) if you need that behaviour. */ #if ! HAVE_MEMCPY # if HAVE_BCOPY # define memcpy(dest, src, size) bcopy (src, dest, size) # else # define memcpy rpl_memcpy static lt_ptr memcpy LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); static lt_ptr memcpy (dest, src, size) lt_ptr dest; const lt_ptr src; size_t size; { const char * s = src; char * d = dest; size_t i = 0; for (i = 0; i < size; ++i) { d[i] = s[i]; } return dest; } # endif /* !HAVE_BCOPY */ #endif /* !HAVE_MEMCPY */ #if ! HAVE_MEMMOVE # define memmove rpl_memmove static lt_ptr memmove LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); static lt_ptr memmove (dest, src, size) lt_ptr dest; const lt_ptr src; size_t size; { const char * s = src; char * d = dest; size_t i; if (d < s) for (i = 0; i < size; ++i) { d[i] = s[i]; } else if (d > s && size > 0) for (i = size -1; ; --i) { d[i] = s[i]; if (i == 0) break; } return dest; } #endif /* !HAVE_MEMMOVE */ #ifdef LT_USE_WINDOWS_DIRENT_EMULATION static void closedir LT_PARAMS((DIR *entry)); static void closedir(entry) DIR *entry; { assert(entry != (DIR *) NULL); FindClose(entry->hSearch); lt_dlfree((lt_ptr)entry); } static DIR * opendir LT_PARAMS((const char *path)); static DIR* opendir (path) const char *path; { char file_specification[LT_FILENAME_MAX]; DIR *entry; assert(path != (char *) NULL); /* allow space for: path + '\\' '\\' '*' '.' '*' + '\0' */ (void) strncpy (file_specification, path, LT_FILENAME_MAX-6); file_specification[LT_FILENAME_MAX-6] = LT_EOS_CHAR; (void) strcat(file_specification,"\\"); entry = LT_DLMALLOC (DIR,sizeof(DIR)); if (entry != (DIR *) 0) { entry->firsttime = TRUE; entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); } if (entry->hSearch == INVALID_HANDLE_VALUE) { (void) strcat(file_specification,"\\*.*"); entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); if (entry->hSearch == INVALID_HANDLE_VALUE) { LT_DLFREE (entry); return (DIR *) 0; } } return(entry); } static struct dirent *readdir LT_PARAMS((DIR *entry)); static struct dirent *readdir(entry) 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; (void) strncpy(entry->file_info.d_name,entry->Win32FindData.cFileName, LT_FILENAME_MAX-1); entry->file_info.d_name[LT_FILENAME_MAX - 1] = LT_EOS_CHAR; entry->file_info.d_namlen = strlen(entry->file_info.d_name); return(&entry->file_info); } #endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ /* According to Alexandre Oliva , ``realloc is not entirely portable'' In any case we want to use the allocator supplied by the user without burdening them with an lt_dlrealloc function pointer to maintain. Instead implement our own version (with known boundary conditions) using lt_dlmalloc and lt_dlfree. */ /* #undef realloc #define realloc rpl_realloc */ #if 0 /* You can't (re)define realloc unless you also (re)define malloc. Right now, this code uses the size of the *destination* to decide how much to copy. That's not right, but you can't know the size of the source unless you know enough about, or wrote malloc. So this code is disabled... */ static lt_ptr realloc (ptr, size) lt_ptr ptr; size_t size; { if (size == 0) { /* For zero or less bytes, free the original memory */ if (ptr != 0) { lt_dlfree (ptr); } return (lt_ptr) 0; } else if (ptr == 0) { /* Allow reallocation of a NULL pointer. */ return lt_dlmalloc (size); } else { /* Allocate a new block, copy and free the old block. */ lt_ptr mem = lt_dlmalloc (size); if (mem) { memcpy (mem, ptr, size); lt_dlfree (ptr); } /* Note that the contents of PTR are not damaged if there is insufficient memory to realloc. */ return mem; } } #endif #if ! HAVE_ARGZ_APPEND # define argz_append rpl_argz_append static error_t argz_append LT_PARAMS((char **pargz, size_t *pargz_len, const char *buf, size_t buf_len)); static error_t argz_append (pargz, pargz_len, buf, buf_len) 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 = LT_DLREALLOC (char, *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; } #endif /* !HAVE_ARGZ_APPEND */ #if ! HAVE_ARGZ_CREATE_SEP # define argz_create_sep rpl_argz_create_sep static error_t argz_create_sep LT_PARAMS((const char *str, int delim, char **pargz, size_t *pargz_len)); static error_t argz_create_sep (str, delim, pargz, pargz_len) 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+ LT_STRLEN (str); if (argz_len) { const char *p; char *q; argz = LT_DLMALLOC (char, argz_len); if (!argz) return ENOMEM; for (p = str, q = argz; *p != LT_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] != LT_EOS_CHAR)) *q++ = LT_EOS_CHAR; else --argz_len; } else *q++ = *p; } /* Copy terminating LT_EOS_CHAR. */ *q = *p; } /* If ARGZ_LEN has shrunk to nothing, release ARGZ's memory. */ if (!argz_len) LT_DLFREE (argz); /* Assign new values. */ *pargz = argz; *pargz_len = argz_len; return 0; } #endif /* !HAVE_ARGZ_CREATE_SEP */ #if ! HAVE_ARGZ_INSERT # define argz_insert rpl_argz_insert static error_t argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, char *before, const char *entry)); static error_t argz_insert (pargz, pargz_len, before, entry) 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+ LT_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] != LT_EOS_CHAR)) --before; { size_t entry_len = 1+ LT_STRLEN (entry); size_t argz_len = *pargz_len + entry_len; size_t offset = before - *pargz; char *argz = LT_DLREALLOC (char, *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; } #endif /* !HAVE_ARGZ_INSERT */ #if ! HAVE_ARGZ_NEXT # define argz_next rpl_argz_next static char *argz_next LT_PARAMS((char *argz, size_t argz_len, const char *entry)); static char * argz_next (argz, argz_len, entry) 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, LT_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; } } #endif /* !HAVE_ARGZ_NEXT */ #if ! HAVE_ARGZ_STRINGIFY # define argz_stringify rpl_argz_stringify static void argz_stringify LT_PARAMS((char *argz, size_t argz_len, int sep)); static void argz_stringify (argz, argz_len, sep) 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] == LT_EOS_CHAR) argz[argz_len] = sep; } } } #endif /* !HAVE_ARGZ_STRINGIFY */ /* --- TYPE DEFINITIONS -- */ /* This type is used for the array of caller data sets in each handler. */ typedef struct { lt_dlcaller_id key; lt_ptr data; } lt_caller_data; /* --- OPAQUE STRUCTURES DECLARED IN LTDL.H --- */ /* Extract the diagnostic strings from the error table macro in the same order as the enumerated indices in ltdl.h. */ static const char *lt_dlerror_strings[] = { #define LT_ERROR(name, diagnostic) (diagnostic), lt_dlerror_table #undef LT_ERROR 0 }; /* This structure is used for the list of registered loaders. */ struct lt_dlloader { struct lt_dlloader *next; const char *loader_name; /* identifying name for each loader */ const char *sym_prefix; /* prefix for symbols */ lt_module_open *module_open; lt_module_close *module_close; lt_find_sym *find_sym; lt_dlloader_exit *dlloader_exit; lt_user_data dlloader_data; }; struct lt_dlhandle_struct { struct lt_dlhandle_struct *next; lt_dlloader *loader; /* dlopening interface */ lt_dlinfo info; int depcount; /* number of dependencies */ lt_dlhandle *deplibs; /* dependencies */ lt_module module; /* system module handle */ lt_ptr system; /* system specific data */ lt_caller_data *caller_data; /* per caller associated data */ int flags; /* various boolean stats */ }; /* Various boolean flags can be stored in the flags field of an lt_dlhandle_struct... */ #define LT_DLGET_FLAG(handle, flag) (((handle)->flags & (flag)) == (flag)) #define LT_DLSET_FLAG(handle, flag) ((handle)->flags |= (flag)) #define LT_DLRESIDENT_FLAG (0x01 << 0) /* ...add more flags here... */ #define LT_DLIS_RESIDENT(handle) LT_DLGET_FLAG(handle, LT_DLRESIDENT_FLAG) #define LT_DLSTRERROR(name) lt_dlerror_strings[LT_CONC(LT_ERROR_,name)] static const char objdir[] = LTDL_OBJDIR; static const char archive_ext[] = LTDL_ARCHIVE_EXT; #ifdef LTDL_SHLIB_EXT static const char shlib_ext[] = LTDL_SHLIB_EXT; #endif #ifdef LTDL_SYSSEARCHPATH static const char sys_search_path[] = LTDL_SYSSEARCHPATH; #endif /* --- MUTEX LOCKING --- */ /* Macros to make it easier to run the lock functions only if they have been registered. The reason for the complicated lock macro is to ensure that the stored error message from the last error is not accidentally erased if the current function doesn't generate an error of its own. */ #define LT_DLMUTEX_LOCK() LT_STMT_START { \ if (lt_dlmutex_lock_func) (*lt_dlmutex_lock_func)(); \ } LT_STMT_END #define LT_DLMUTEX_UNLOCK() LT_STMT_START { \ if (lt_dlmutex_unlock_func) (*lt_dlmutex_unlock_func)();\ } LT_STMT_END #define LT_DLMUTEX_SETERROR(errormsg) LT_STMT_START { \ if (lt_dlmutex_seterror_func) \ (*lt_dlmutex_seterror_func) (errormsg); \ else lt_dllast_error = (errormsg); } LT_STMT_END #define LT_DLMUTEX_GETERROR(errormsg) LT_STMT_START { \ if (lt_dlmutex_seterror_func) \ (errormsg) = (*lt_dlmutex_geterror_func) (); \ else (errormsg) = lt_dllast_error; } LT_STMT_END /* The mutex functions stored here are global, and are necessarily the same for all threads that wish to share access to libltdl. */ static lt_dlmutex_lock *lt_dlmutex_lock_func = 0; static lt_dlmutex_unlock *lt_dlmutex_unlock_func = 0; static lt_dlmutex_seterror *lt_dlmutex_seterror_func = 0; static lt_dlmutex_geterror *lt_dlmutex_geterror_func = 0; static const char *lt_dllast_error = 0; /* Either set or reset the mutex functions. Either all the arguments must be valid functions, or else all can be NULL to turn off locking entirely. The registered functions should be manipulating a static global lock from the lock() and unlock() callbacks, which needs to be reentrant. */ int lt_dlmutex_register (lock, unlock, seterror, geterror) lt_dlmutex_lock *lock; lt_dlmutex_unlock *unlock; lt_dlmutex_seterror *seterror; lt_dlmutex_geterror *geterror; { lt_dlmutex_unlock *old_unlock = unlock; int errors = 0; /* Lock using the old lock() callback, if any. */ LT_DLMUTEX_LOCK (); if ((lock && unlock && seterror && geterror) || !(lock || unlock || seterror || geterror)) { lt_dlmutex_lock_func = lock; lt_dlmutex_unlock_func = unlock; lt_dlmutex_geterror_func = geterror; } else { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_MUTEX_ARGS)); ++errors; } /* Use the old unlock() callback we saved earlier, if any. Otherwise record any errors using internal storage. */ if (old_unlock) (*old_unlock) (); /* Return the number of errors encountered during the execution of this function. */ return errors; } /* --- ERROR HANDLING --- */ static const char **user_error_strings = 0; static int errorcount = LT_ERROR_MAX; int lt_dladderror (diagnostic) const char *diagnostic; { int errindex = 0; int result = -1; const char **temp = (const char **) 0; assert (diagnostic); LT_DLMUTEX_LOCK (); errindex = errorcount - LT_ERROR_MAX; temp = LT_EREALLOC (const char *, user_error_strings, 1 + errindex); if (temp) { user_error_strings = temp; user_error_strings[errindex] = diagnostic; result = errorcount++; } LT_DLMUTEX_UNLOCK (); return result; } int lt_dlseterror (errindex) int errindex; { int errors = 0; LT_DLMUTEX_LOCK (); if (errindex >= errorcount || errindex < 0) { /* Ack! Error setting the error message! */ LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_ERRORCODE)); ++errors; } else if (errindex < LT_ERROR_MAX) { /* No error setting the error message! */ LT_DLMUTEX_SETERROR (lt_dlerror_strings[errindex]); } else { /* No error setting the error message! */ LT_DLMUTEX_SETERROR (user_error_strings[errindex - LT_ERROR_MAX]); } LT_DLMUTEX_UNLOCK (); return errors; } static lt_ptr lt_emalloc (size) size_t size; { lt_ptr mem = lt_dlmalloc (size); if (size && !mem) LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); return mem; } static lt_ptr lt_erealloc (addr, size) lt_ptr addr; size_t size; { lt_ptr mem = lt_dlrealloc (addr, size); if (size && !mem) LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); return mem; } static char * lt_estrdup (str) const char *str; { char *copy = strdup (str); if (LT_STRLEN (str) && !copy) LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); return copy; } /* --- DLOPEN() INTERFACE LOADER --- */ #if HAVE_LIBDL /* dynamic linking with dlopen/dlsym */ #if HAVE_DLFCN_H # include #endif #if HAVE_SYS_DL_H # include #endif /* * This needed fixing for any number of reasons, including Perl DBD::ODBC */ #ifdef RTLD_GROUP # define LT_GLOBAL RTLD_GROUP # define LT_GROUP RTLD_GROUP #elif defined( RTLD_GLOBAL ) # define LT_GLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_GLOBAL DL_GLOBAL # endif #endif /* !RTLD_GLOBAL */ #ifndef LT_GLOBAL # define LT_GLOBAL 0 #endif /* !LT_GLOBAL */ /* We may have to define LT_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_LAZY_OR_NOW # ifdef RTLD_LAZY # define LT_LAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_LAZY_OR_NOW DL_LAZY # endif # endif /* !RTLD_LAZY */ #endif #ifndef LT_LAZY_OR_NOW # ifdef RTLD_NOW # define LT_LAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_LAZY_OR_NOW DL_NOW # endif # endif /* !RTLD_NOW */ #endif #ifndef LT_LAZY_OR_NOW # define LT_LAZY_OR_NOW 0 #endif /* !LT_LAZY_OR_NOW */ #if HAVE_DLERROR # define DLERROR(arg) dlerror () #else # define DLERROR(arg) LT_DLSTRERROR (arg) #endif #ifdef RTLD_MEMBER # define LT_MEMBER RTLD_MEMBER #else # define LT_MEMBER 0 #endif static lt_module sys_dl_open (loader_data, filename) lt_user_data loader_data; const char *filename; { /* * this need removing, otherwise things like perl break * lt_module module = dlopen (filename, LT_GLOBAL | LT_LAZY_OR_NOW); */ #ifdef QNX_LIBLTDL lt_module module = dlopen (filename, LT_GLOBAL | LT_LAZY_OR_NOW); #else #ifdef WITHOUT_RTLD_GROUP lt_module module = dlopen (filename, LT_LAZY_OR_NOW | LT_MEMBER ); #else #ifdef LT_GROUP lt_module module = dlopen (filename, LT_GROUP | LT_LAZY_OR_NOW | LT_MEMBER ); #else lt_module module = dlopen (filename, LT_LAZY_OR_NOW | LT_MEMBER ); #endif #endif #endif if (!module) { LT_DLMUTEX_SETERROR (DLERROR (CANNOT_OPEN)); } return module; } static int sys_dl_close (loader_data, module) lt_user_data loader_data; lt_module module; { int errors = 0; if (dlclose (module) != 0) { LT_DLMUTEX_SETERROR (DLERROR (CANNOT_CLOSE)); ++errors; } return errors; } static lt_ptr sys_dl_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = dlsym (module, symbol); if (!address) { LT_DLMUTEX_SETERROR (DLERROR (SYMBOL_NOT_FOUND)); } return address; } static struct lt_user_dlloader sys_dl = { # ifdef NEED_USCORE "_", # else 0, # endif sys_dl_open, sys_dl_close, sys_dl_sym, 0, 0 }; #endif /* HAVE_LIBDL */ /* --- SHL_LOAD() INTERFACE LOADER --- */ #if HAVE_SHL_LOAD /* dynamic linking with shl_load (HP-UX) (comments from gmodule) */ #ifdef 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. */ #ifndef DYNAMIC_PATH # define DYNAMIC_PATH 0 #endif #ifndef BIND_RESTRICTED # define BIND_RESTRICTED 0 #endif #define LT_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH) static lt_module sys_shl_open (loader_data, filename) lt_user_data loader_data; const char *filename; { 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) { lt_ptr address; shl_findsym (&self, "main", TYPE_UNDEFINED, &address); } if (!filename) { module = self; } else { module = shl_load (filename, LT_BIND_FLAGS, 0L); if (!module) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); } } return module; } static int sys_shl_close (loader_data, module) lt_user_data loader_data; lt_module module; { int errors = 0; if (module && (shl_unload ((shl_t) (module)) != 0)) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ++errors; } return errors; } static lt_ptr sys_shl_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = 0; /* sys_shl_open should never return a NULL module handle */ if (module == (lt_module) 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); } else if (!shl_findsym((shl_t*) &module, symbol, TYPE_UNDEFINED, &address)) { if (!address) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); } } return address; } static struct lt_user_dlloader sys_shl = { 0, sys_shl_open, sys_shl_close, sys_shl_sym, 0, 0 }; #endif /* HAVE_SHL_LOAD */ /* --- LOADLIBRARY() INTERFACE LOADER --- */ #ifdef __WINDOWS__ /* dynamic linking for Win32 */ #include /* Forward declaration; required to implement handle search below. */ static lt_dlhandle handles; static lt_module sys_wll_open (loader_data, filename) lt_user_data loader_data; const char *filename; { lt_dlhandle cur; lt_module module = 0; const char *errormsg = 0; char *searchname = 0; char *ext; char self_name_buf[MAX_PATH]; if (!filename) { /* Get the name of main module */ *self_name_buf = 0; GetModuleFileName (NULL, self_name_buf, sizeof (self_name_buf)); filename = ext = self_name_buf; } else { ext = strrchr (filename, '.'); } if (ext) { /* FILENAME already has an extension. */ searchname = lt_estrdup (filename); } else { /* Append a `.' to stop Windows from adding an implicit `.dll' extension. */ searchname = LT_EMALLOC (char, 2+ LT_STRLEN (filename)); if (searchname) sprintf (searchname, "%s.", filename); } if (!searchname) return 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); #if defined(__CYGWIN__) { char wpath[MAX_PATH]; cygwin_conv_to_full_win32_path (searchname, wpath); module = LoadLibrary (wpath); } #else module = LoadLibrary (searchname); #endif /* Restore the error mode. */ SetErrorMode(errormode); } LT_DLFREE (searchname); /* 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_DLMUTEX_LOCK (); cur = handles; while (cur) { if (!cur->module) { cur = 0; break; } if (cur->module == module) { break; } cur = cur->next; } LT_DLMUTEX_UNLOCK (); if (cur || !module) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); module = 0; } return module; } static int sys_wll_close (loader_data, module) lt_user_data loader_data; lt_module module; { int errors = 0; if (FreeLibrary(module) == 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ++errors; } return errors; } static lt_ptr sys_wll_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = GetProcAddress (module, symbol); if (!address) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); } return address; } static struct lt_user_dlloader sys_wll = { 0, sys_wll_open, sys_wll_close, sys_wll_sym, 0, 0 }; #endif /* __WINDOWS__ */ /* --- LOAD_ADD_ON() INTERFACE LOADER --- */ #ifdef __BEOS__ /* dynamic linking for BeOS */ #include static lt_module sys_bedl_open (loader_data, filename) lt_user_data loader_data; const char *filename; { 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_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); image = 0; } return (lt_module) image; } static int sys_bedl_close (loader_data, module) lt_user_data loader_data; lt_module module; { int errors = 0; if (unload_add_on ((image_id) module) != B_OK) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ++errors; } return errors; } static lt_ptr sys_bedl_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = 0; image_id image = (image_id) module; if (get_image_symbol (image, symbol, B_SYMBOL_TYPE_ANY, address) != B_OK) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); address = 0; } return address; } static struct lt_user_dlloader sys_bedl = { 0, sys_bedl_open, sys_bedl_close, sys_bedl_sym, 0, 0 }; #endif /* __BEOS__ */ /* --- DLD_LINK() INTERFACE LOADER --- */ #if HAVE_DLD /* dynamic linking with dld */ #if HAVE_DLD_H #include #endif static lt_module sys_dld_open (loader_data, filename) lt_user_data loader_data; const char *filename; { lt_module module = strdup (filename); if (dld_link (filename) != 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); LT_DLFREE (module); module = 0; } return module; } static int sys_dld_close (loader_data, module) lt_user_data loader_data; lt_module module; { int errors = 0; if (dld_unlink_by_file ((char*)(module), 1) != 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ++errors; } else { LT_DLFREE (module); } return errors; } static lt_ptr sys_dld_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = dld_get_func (symbol); if (!address) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); } return address; } static struct lt_user_dlloader sys_dld = { 0, sys_dld_open, sys_dld_close, sys_dld_sym, 0, 0 }; #endif /* HAVE_DLD */ /* --- DYLD() MACOSX/DARWIN INTERFACE LOADER --- */ #if HAVE_DYLD #if 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 */ #ifndef ENUM_DYLD_BOOL # define ENUM_DYLD_BOOL # undef FALSE # undef TRUE enum DYLD_BOOL { FALSE, TRUE }; #endif #ifndef LC_REQ_DYLD # define LC_REQ_DYLD 0x80000000 #endif #ifndef LC_LOAD_WEAK_DYLIB # define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD) #endif static const struct mach_header * (*ltdl_NSAddImage)(const char *image_name, unsigned long options) = 0; static NSSymbol (*ltdl_NSLookupSymbolInImage)(const struct mach_header *image,const char *symbolName, unsigned long options) = 0; static enum DYLD_BOOL (*ltdl_NSIsSymbolNameDefinedInImage)(const struct mach_header *image, const char *symbolName) = 0; static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0; #ifndef NSADDIMAGE_OPTION_NONE #define NSADDIMAGE_OPTION_NONE 0x0 #endif #ifndef NSADDIMAGE_OPTION_RETURN_ON_ERROR #define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1 #endif #ifndef NSADDIMAGE_OPTION_WITH_SEARCHING #define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2 #endif #ifndef NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED #define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4 #endif #ifndef NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME #define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8 #endif #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0 #endif #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1 #endif #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2 #endif #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR #define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4 #endif static const char * lt_int_dyld_error(othererror) char* othererror; { /* return the dyld error string, or the passed in error string if none */ NSLinkEditErrors ler; int lerno; const char *errstr; const char *file; NSLinkEditError(&ler,&lerno,&file,&errstr); if (!errstr || !strlen(errstr)) errstr = othererror; return errstr; } static const struct mach_header * lt_int_dyld_get_mach_header_from_nsmodule(module) NSModule module; { /* There should probably be an apple dyld api for this */ int i=_dyld_image_count(); int j; const char *modname=NSNameOfModule(module); const struct mach_header *mh=NULL; if (!modname) return NULL; for (j = 0; j < i; j++) { if (!strcmp(_dyld_get_image_name(j),modname)) { mh=_dyld_get_image_header(j); break; } } return mh; } static const char* lt_int_dyld_lib_install_name(mh) const struct mach_header *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 */ int j; struct load_command *lc; unsigned long offset = sizeof(struct mach_header); const char* retStr=NULL; for (j = 0; j < mh->ncmds; j++) { lc = (struct load_command*)(((unsigned long)mh) + offset); if (LC_ID_DYLIB == lc->cmd) { retStr=(char*)(((struct dylib_command*)lc)->dylib.name.offset + (unsigned long)lc); } offset += lc->cmdsize; } return retStr; } static const struct mach_header * lt_int_dyld_match_loaded_lib_by_install_name(const char *name) { int i=_dyld_image_count(); int j; const struct mach_header *mh=NULL; const char *id=NULL; for (j = 0; j < i; j++) { id=lt_int_dyld_lib_install_name(_dyld_get_image_header(j)); if ((id) && (!strcmp(id,name))) { mh=_dyld_get_image_header(j); break; } } return mh; } static NSSymbol lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh) const char *symbol; const struct mach_header *mh; { /* Safe to assume our mh is good */ int j; struct load_command *lc; unsigned long offset = sizeof(struct mach_header); NSSymbol retSym = 0; const struct mach_header *mh1; if ((ltdl_NSLookupSymbolInImage) && NSIsSymbolNameDefined(symbol) ) { 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)) { mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct dylib_command*)lc)->dylib.name.offset + (unsigned long)lc)); if (!mh1) { /* Maybe NSAddImage can find it */ mh1=ltdl_NSAddImage((char*)(((struct dylib_command*)lc)->dylib.name.offset + (unsigned long)lc), NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED + NSADDIMAGE_OPTION_WITH_SEARCHING + NSADDIMAGE_OPTION_RETURN_ON_ERROR ); } if (mh1) { retSym = ltdl_NSLookupSymbolInImage(mh1, symbol, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR ); if (retSym) break; } } offset += lc->cmdsize; } } return retSym; } static int sys_dyld_init() { int retCode = 0; int err = 0; if (!_dyld_present()) { retCode=1; } else { err = _dyld_func_lookup("__dyld_NSAddImage",(unsigned long*)<dl_NSAddImage); err = _dyld_func_lookup("__dyld_NSLookupSymbolInImage",(unsigned long*)<dl_NSLookupSymbolInImage); err = _dyld_func_lookup("__dyld_NSIsSymbolNameDefinedInImage",(unsigned long*)<dl_NSIsSymbolNameDefinedInImage); err = _dyld_func_lookup("__dyld_NSMakePrivateModulePublic",(unsigned long*)<dl_NSMakePrivateModulePublic); } return retCode; } static lt_module sys_dyld_open (loader_data, filename) lt_user_data loader_data; const char *filename; { lt_module module = 0; NSObjectFileImage ofi = 0; NSObjectFileImageReturnCode ofirc; if (!filename) return (lt_module)-1; ofirc = NSCreateObjectFileImageFromFile(filename, &ofi); switch (ofirc) { case NSObjectFileImageSuccess: module = NSLinkModule(ofi, filename, NSLINKMODULE_OPTION_RETURN_ON_ERROR | NSLINKMODULE_OPTION_PRIVATE | NSLINKMODULE_OPTION_BINDNOW); NSDestroyObjectFileImage(ofi); if (module) ltdl_NSMakePrivateModulePublic(module); break; case NSObjectFileImageInappropriateFile: if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) { module = (lt_module)ltdl_NSAddImage(filename, NSADDIMAGE_OPTION_RETURN_ON_ERROR); break; } default: LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); return 0; } if (!module) LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); return module; } static int sys_dyld_close (loader_data, module) lt_user_data loader_data; lt_module module; { int retCode = 0; int flags = 0; if (module == (lt_module)-1) return 0; #ifdef __BIG_ENDIAN__ if (((struct mach_header *)module)->magic == MH_MAGIC) #else if (((struct mach_header *)module)->magic == MH_CIGAM) #endif { LT_DLMUTEX_SETERROR("Can not close a dylib"); retCode = 1; } else { #if 1 /* 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_int_dyld_get_mach_header_from_nsmodule(module), "__DATA","__mod_term_func")) { flags += NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED; } #endif #ifdef __ppc__ flags += NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES; #endif if (!NSUnLinkModule(module,flags)) { retCode=1; LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_CLOSE))); } } return retCode; } static lt_ptr sys_dyld_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = 0; NSSymbol *nssym = 0; void *unused; const struct mach_header *mh=NULL; char saveError[256] = "Symbol not found"; if (module == (lt_module)-1) { _dyld_lookup_and_bind(symbol,(unsigned long*)&address,&unused); return address; } #ifdef __BIG_ENDIAN__ if (((struct mach_header *)module)->magic == MH_MAGIC) #else if (((struct mach_header *)module)->magic == MH_CIGAM) #endif { if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) { mh=module; if (ltdl_NSIsSymbolNameDefinedInImage((struct mach_header*)module,symbol)) { nssym = ltdl_NSLookupSymbolInImage((struct mach_header*)module, symbol, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR ); } } } else { nssym = NSLookupSymbolInModule(module, symbol); } if (!nssym) { strncpy(saveError, lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)), 255); saveError[255] = 0; if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module); nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh); } if (!nssym) { LT_DLMUTEX_SETERROR (saveError); return NULL; } return NSAddressOfSymbol(nssym); } static struct lt_user_dlloader sys_dyld = { "_", sys_dyld_open, sys_dyld_close, sys_dyld_sym, 0, 0 }; #endif /* HAVE_DYLD */ /* --- DLPREOPEN() INTERFACE LOADER --- */ /* emulate dynamic linking using preloaded_symbols */ typedef struct lt_dlsymlists_t { struct lt_dlsymlists_t *next; const lt_dlsymlist *syms; } lt_dlsymlists_t; static const lt_dlsymlist *default_preloaded_symbols = 0; static lt_dlsymlists_t *preloaded_symbols = 0; static int presym_init (loader_data) lt_user_data loader_data; { int errors = 0; LT_DLMUTEX_LOCK (); preloaded_symbols = 0; if (default_preloaded_symbols) { errors = lt_dlpreload (default_preloaded_symbols); } LT_DLMUTEX_UNLOCK (); return errors; } static int presym_free_symlists () { lt_dlsymlists_t *lists; LT_DLMUTEX_LOCK (); lists = preloaded_symbols; while (lists) { lt_dlsymlists_t *tmp = lists; lists = lists->next; LT_DLFREE (tmp); } preloaded_symbols = 0; LT_DLMUTEX_UNLOCK (); return 0; } static int presym_exit (loader_data) lt_user_data loader_data; { presym_free_symlists (); return 0; } static int presym_add_symlist (preloaded) const lt_dlsymlist *preloaded; { lt_dlsymlists_t *tmp; lt_dlsymlists_t *lists; int errors = 0; LT_DLMUTEX_LOCK (); lists = preloaded_symbols; while (lists) { if (lists->syms == preloaded) { goto done; } lists = lists->next; } tmp = LT_EMALLOC (lt_dlsymlists_t, 1); if (tmp) { memset (tmp, 0, sizeof(lt_dlsymlists_t)); tmp->syms = preloaded; tmp->next = preloaded_symbols; preloaded_symbols = tmp; } else { ++errors; } done: LT_DLMUTEX_UNLOCK (); return errors; } static lt_module presym_open (loader_data, filename) lt_user_data loader_data; const char *filename; { lt_dlsymlists_t *lists; lt_module module = (lt_module) 0; LT_DLMUTEX_LOCK (); lists = preloaded_symbols; if (!lists) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (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@"; } while (lists) { const lt_dlsymlist *syms = lists->syms; while (syms->name) { if (!syms->address && strcmp(syms->name, filename) == 0) { module = (lt_module) syms; goto done; } ++syms; } lists = lists->next; } LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); done: LT_DLMUTEX_UNLOCK (); return module; } static int presym_close (loader_data, module) lt_user_data loader_data; lt_module module; { /* Just to silence gcc -Wall */ module = 0; return 0; } static lt_ptr presym_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_dlsymlist *syms = (lt_dlsymlist*) module; ++syms; while (syms->address) { if (strcmp(syms->name, symbol) == 0) { return syms->address; } ++syms; } LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); return 0; } static struct lt_user_dlloader presym = { 0, presym_open, presym_close, presym_sym, presym_exit, 0 }; /* --- DYNAMIC MODULE LOADING --- */ /* The type of a function used at each iteration of foreach_dirinpath(). */ typedef int foreach_callback_func LT_PARAMS((char *filename, lt_ptr data1, lt_ptr data2)); static int foreach_dirinpath LT_PARAMS((const char *search_path, const char *base_name, foreach_callback_func *func, lt_ptr data1, lt_ptr data2)); static int find_file_callback LT_PARAMS((char *filename, lt_ptr data, lt_ptr ignored)); static int find_handle_callback LT_PARAMS((char *filename, lt_ptr data, lt_ptr ignored)); static int foreachfile_callback LT_PARAMS((char *filename, lt_ptr data1, lt_ptr data2)); static int canonicalize_path LT_PARAMS((const char *path, char **pcanonical)); static int argzize_path LT_PARAMS((const char *path, char **pargz, size_t *pargz_len)); static FILE *find_file LT_PARAMS((const char *search_path, const char *base_name, char **pdir)); static lt_dlhandle *find_handle LT_PARAMS((const char *search_path, const char *base_name, lt_dlhandle *handle)); static int find_module LT_PARAMS((lt_dlhandle *handle, const char *dir, const char *libdir, const char *dlname, const char *old_name, int installed)); static int free_vars LT_PARAMS((char *dlname, char *oldname, char *libdir, char *deplibs)); static int load_deplibs LT_PARAMS((lt_dlhandle handle, char *deplibs)); static int trim LT_PARAMS((char **dest, const char *str)); static int try_dlopen LT_PARAMS((lt_dlhandle *handle, const char *filename)); static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, const char *filename)); static int unload_deplibs LT_PARAMS((lt_dlhandle handle)); static int lt_argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, char *before, const char *entry)); static int lt_argz_insertinorder LT_PARAMS((char **pargz, size_t *pargz_len, const char *entry)); static int lt_argz_insertdir LT_PARAMS((char **pargz, size_t *pargz_len, const char *dirnam, struct dirent *dp)); static int lt_dlpath_insertdir LT_PARAMS((char **ppath, char *before, const char *dir)); static int list_files_by_dir LT_PARAMS((const char *dirnam, char **pargz, size_t *pargz_len)); static int file_not_found LT_PARAMS((void)); static char *user_search_path= 0; static lt_dlloader *loaders = 0; static lt_dlhandle handles = 0; static int initialized = 0; /* Initialize libltdl. */ int lt_dlinit () { int errors = 0; LT_DLMUTEX_LOCK (); /* Initialize only at first call. */ if (++initialized == 1) { handles = 0; user_search_path = 0; /* empty search path */ #if HAVE_LIBDL errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen"); #endif #if HAVE_SHL_LOAD errors += lt_dlloader_add (lt_dlloader_next (0), &sys_shl, "dlopen"); #endif #ifdef __WINDOWS__ errors += lt_dlloader_add (lt_dlloader_next (0), &sys_wll, "dlopen"); #endif #ifdef __BEOS__ errors += lt_dlloader_add (lt_dlloader_next (0), &sys_bedl, "dlopen"); #endif #if HAVE_DLD errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dld, "dld"); #endif #if HAVE_DYLD errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dyld, "dyld"); errors += sys_dyld_init(); #endif errors += lt_dlloader_add (lt_dlloader_next (0), &presym, "dlpreload"); if (presym_init (presym.dlloader_data)) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INIT_LOADER)); ++errors; } else if (errors != 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (DLOPEN_NOT_SUPPORTED)); ++errors; } } LT_DLMUTEX_UNLOCK (); return errors; } int lt_dlpreload (preloaded) const lt_dlsymlist *preloaded; { int errors = 0; if (preloaded) { errors = presym_add_symlist (preloaded); } else { presym_free_symlists(); LT_DLMUTEX_LOCK (); if (default_preloaded_symbols) { errors = lt_dlpreload (default_preloaded_symbols); } LT_DLMUTEX_UNLOCK (); } return errors; } int lt_dlpreload_default (preloaded) const lt_dlsymlist *preloaded; { LT_DLMUTEX_LOCK (); default_preloaded_symbols = preloaded; LT_DLMUTEX_UNLOCK (); return 0; } int lt_dlexit () { /* shut down libltdl */ lt_dlloader *loader; int errors = 0; LT_DLMUTEX_LOCK (); loader = loaders; if (!initialized) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (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; handles; ++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 (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level) { if (lt_dlclose (tmp)) { ++errors; } } } /* done if only resident modules are left */ if (!saw_nonresident) break; } /* close all loaders */ while (loader) { lt_dlloader *next = loader->next; lt_user_data data = loader->dlloader_data; if (loader->dlloader_exit && loader->dlloader_exit (data)) { ++errors; } LT_DLMEM_REASSIGN (loader, next); } loaders = 0; } done: LT_DLMUTEX_UNLOCK (); return errors; } static int tryall_dlopen (handle, filename) lt_dlhandle *handle; const char *filename; { lt_dlhandle cur; lt_dlloader *loader; const char *saved_error; int errors = 0; LT_DLMUTEX_GETERROR (saved_error); LT_DLMUTEX_LOCK (); cur = handles; loader = loaders; /* check whether the module was already opened */ while (cur) { /* try to dlopen the program itself? */ if (!cur->info.filename && !filename) { break; } if (cur->info.filename && filename && strcmp (cur->info.filename, filename) == 0) { break; } cur = cur->next; } if (cur) { ++cur->info.ref_count; *handle = cur; goto done; } cur = *handle; 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_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ++errors; goto done; } */ cur->info.filename = lt_estrdup (filename); if (!cur->info.filename) { ++errors; goto done; } } else { cur->info.filename = 0; } while (loader) { lt_user_data data = loader->dlloader_data; cur->module = loader->module_open (data, filename); if (cur->module != 0) { break; } loader = loader->next; } if (!loader) { LT_DLFREE (cur->info.filename); ++errors; goto done; } cur->loader = loader; LT_DLMUTEX_SETERROR (saved_error); done: LT_DLMUTEX_UNLOCK (); return errors; } static int tryall_dlopen_module (handle, prefix, dirname, dlname) lt_dlhandle *handle; const char *prefix; const char *dirname; const char *dlname; { int error = 0; char *filename = 0; size_t filename_len = 0; size_t dirname_len = LT_STRLEN (dirname); assert (handle); assert (dirname); assert (dlname); #ifdef 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 = LT_EMALLOC (char, dirname_len + 1 + 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); } else if (tryall_dlopen (handle, filename) != 0) { ++error; } LT_DLFREE (filename); return error; } static int find_module (handle, dir, libdir, dlname, old_name, installed) lt_dlhandle *handle; const char *dir; const char *libdir; const char *dlname; const char *old_name; int installed; { /* 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) == 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) == 0) return 0; } /* try to open the not-installed module */ if (!installed) { if (tryall_dlopen_module (handle, dir, objdir, dlname) == 0) return 0; } /* maybe it was moved to another directory */ { if (tryall_dlopen_module (handle, (const char *) 0, dir, dlname) == 0) return 0; } } return 1; } static int canonicalize_path (path, pcanonical) const char *path; char **pcanonical; { char *canonical = 0; assert (path && *path); assert (pcanonical); canonical = LT_EMALLOC (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] != '/') #ifdef 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) #ifdef 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 (path, pargz, pargz_len) 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_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); break; default: LT_DLMUTEX_SETERROR (LT_DLSTRERROR (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 (search_path, base_name, func, data1, data2) const char *search_path; const char *base_name; foreach_callback_func *func; lt_ptr data1; lt_ptr data2; { int result = 0; int filenamesize = 0; size_t lenbase = LT_STRLEN (base_name); size_t argz_len = 0; char *argz = 0; char *filename = 0; char *canonical = 0; LT_DLMUTEX_LOCK (); if (!search_path || !*search_path) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (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 (lendir +1 +lenbase >= filenamesize) { LT_DLFREE (filename); filenamesize = lendir +1 +lenbase +1; /* "/d" + '/' + "f" + '\0' */ filename = LT_EMALLOC (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: LT_DLFREE (argz); LT_DLFREE (canonical); LT_DLFREE (filename); LT_DLMUTEX_UNLOCK (); 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 (filename, data1, data2) char *filename; lt_ptr data1; lt_ptr 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; LT_DLFREE (*pdir); *pdir = lt_estrdup (filename); is_done = (*pdir == 0) ? -1 : 1; } return is_done; } static FILE * find_file (search_path, base_name, pdir) 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 (filename, data, ignored) char *filename; lt_ptr data; lt_ptr ignored; { lt_dlhandle *handle = (lt_dlhandle *) data; int notfound = access (filename, R_OK); /* 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 (handle, filename) != 0) *handle = 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 (search_path, base_name, handle) const char *search_path; const char *base_name; lt_dlhandle *handle; { if (!search_path) return 0; if (!foreach_dirinpath (search_path, base_name, find_handle_callback, handle, 0)) return 0; return handle; } static int load_deplibs (handle, deplibs) lt_dlhandle handle; char *deplibs; { #if LTDL_DLOPEN_DEPLIBS char *p, *save_search_path = 0; int depcount = 0; int i; char **names = 0; #endif int errors = 0; handle->depcount = 0; #if LTDL_DLOPEN_DEPLIBS if (!deplibs) { return errors; } ++errors; LT_DLMUTEX_LOCK (); if (user_search_path) { save_search_path = lt_estrdup (user_search_path); if (!save_search_path) goto cleanup; } /* extract search paths and count deplibs */ p = deplibs; while (*p) { if (!isspace ((int) *p)) { char *end = p+1; while (*end && !isspace((int) *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; } } /* restore the old search path */ LT_DLFREE (user_search_path); user_search_path = save_search_path; LT_DLMUTEX_UNLOCK (); if (!depcount) { errors = 0; goto cleanup; } names = LT_EMALLOC (char *, depcount * sizeof (char*)); if (!names) goto cleanup; /* now only extract the actual deplibs */ depcount = 0; p = deplibs; while (*p) { if (isspace ((int) *p)) { ++p; } else { char *end = p+1; while (*end && !isspace ((int) *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 = LT_EMALLOC (char, 1+ name_len); if (name) sprintf (name, "lib%s", p+2); } else name = lt_estrdup(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) { int j = 0; handle->deplibs = (lt_dlhandle*) LT_EMALLOC (lt_dlhandle *, depcount); if (!handle->deplibs) goto cleanup; for (i = 0; i < depcount; ++i) { handle->deplibs[j] = lt_dlopenext(names[depcount-1-i]); if (handle->deplibs[j]) { ++j; } } handle->depcount = j; /* Number of successfully loaded deplibs */ errors = 0; } cleanup_names: for (i = 0; i < depcount; ++i) { LT_DLFREE (names[i]); } cleanup: LT_DLFREE (names); #endif return errors; } static int unload_deplibs (handle) lt_dlhandle handle; { int i; int errors = 0; if (handle->depcount) { for (i = 0; i < handle->depcount; ++i) { if (!LT_DLIS_RESIDENT (handle->deplibs[i])) { errors += lt_dlclose (handle->deplibs[i]); } } } return errors; } static int trim (dest, str) 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; LT_DLFREE (*dest); if (!end) return 1; if (len > 3 && str[0] == '\'') { tmp = LT_EMALLOC (char, end - str); if (!tmp) return 1; strncpy(tmp, &str[1], (end - str) - 1); tmp[len-3] = LT_EOS_CHAR; *dest = tmp; } else { *dest = 0; } return 0; } static int free_vars (dlname, oldname, libdir, deplibs) char *dlname; char *oldname; char *libdir; char *deplibs; { LT_DLFREE (dlname); LT_DLFREE (oldname); LT_DLFREE (libdir); LT_DLFREE (deplibs); return 0; } static int try_dlopen (phandle, filename) lt_dlhandle *phandle; const char *filename; { const char * ext = 0; const char * saved_error = 0; char * canonical = 0; char * base_name = 0; char * dir = 0; char * name = 0; int errors = 0; lt_dlhandle newhandle; assert (phandle); assert (*phandle == 0); LT_DLMUTEX_GETERROR (saved_error); /* dlopen self? */ if (!filename) { *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); if (*phandle == 0) return 1; memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); newhandle = *phandle; /* lt_dlclose()ing yourself is very bad! Disallow it. */ LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG); if (tryall_dlopen (&newhandle, 0) != 0) { LT_DLFREE (*phandle); return 1; } goto register_handle; } assert (filename && *filename); /* Doing this immediately allows internal functions to safely assume only canonicalized paths are passed. */ if (canonicalize_path (filename, &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 = LT_EMALLOC (char, 1+ dirlen); if (!dir) { ++errors; goto cleanup; } strncpy (dir, canonical, dirlen); dir[dirlen] = LT_EOS_CHAR; ++base_name; } else base_name = canonical; assert (base_name && *base_name); /* Check whether we are opening a libtool module (.la extension). */ ext = strrchr (base_name, '.'); if (ext && strcmp (ext, archive_ext) == 0) { /* this seems to be a libtool module */ FILE * file = 0; char * dlname = 0; char * old_name = 0; char * libdir = 0; char * deplibs = 0; char * line = 0; size_t line_len; /* 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; /* extract the module name from the file name */ name = LT_EMALLOC (char, ext - base_name + 1); if (!name) { ++errors; goto cleanup; } /* canonicalize the module name */ { size_t i; for (i = 0; i < ext - base_name; ++i) { if (isalnum ((int)(base_name[i]))) { name[i] = base_name[i]; } else { name[i] = '_'; } } name[ext - base_name] = LT_EOS_CHAR; } /* 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; LT_DLMUTEX_LOCK (); search_path = user_search_path; if (search_path) file = find_file (user_search_path, base_name, &dir); LT_DLMUTEX_UNLOCK (); if (!file) { search_path = getenv (LTDL_SEARCHPATH_VAR); if (search_path) file = find_file (search_path, base_name, &dir); } #ifdef LTDL_SHLIBPATH_VAR if (!file) { search_path = getenv (LTDL_SHLIBPATH_VAR); if (search_path) file = find_file (search_path, base_name, &dir); } #endif #ifdef LTDL_SYSSEARCHPATH if (!file && sys_search_path) { file = find_file (sys_search_path, base_name, &dir); } #endif } if (!file) { file = fopen (filename, 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_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ++errors; goto cleanup; } line_len = LT_FILENAME_MAX; line = LT_EMALLOC (char, line_len); if (!line) { fclose (file); ++errors; goto cleanup; } /* read the .la file */ while (!feof (file)) { 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. */ while ((line[LT_STRLEN(line) -1] != '\n') && (!feof (file))) { line = LT_DLREALLOC (char, line, line_len *2); 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 (strcmp (line, "installed=yes\n") == 0) { installed = 1; } else if (strcmp (line, "installed=no\n") == 0) { 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_estrdup (last_libname + 1); if (!last_libname) { ++errors; goto cleanup; } LT_DLMEM_REASSIGN (dlname, last_libname); } } if (errors) break; } fclose (file); LT_DLFREE (line); /* allocate the handle */ *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); if (*phandle == 0) ++errors; if (errors) { free_vars (dlname, old_name, libdir, deplibs); LT_DLFREE (*phandle); goto cleanup; } assert (*phandle); memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); if (load_deplibs (*phandle, deplibs) == 0) { newhandle = *phandle; /* find_module may replace newhandle */ if (find_module (&newhandle, dir, libdir, dlname, old_name, installed)) { unload_deplibs (*phandle); ++errors; } } else { ++errors; } free_vars (dlname, old_name, libdir, deplibs); if (errors) { LT_DLFREE (*phandle); goto cleanup; } if (*phandle != newhandle) { unload_deplibs (*phandle); } } else { /* not a libtool module */ *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); if (*phandle == 0) { ++errors; goto cleanup; } memset (*phandle, 0, sizeof (struct lt_dlhandle_struct)); 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) && !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name, &newhandle) #ifdef LTDL_SHLIBPATH_VAR && !find_handle (getenv (LTDL_SHLIBPATH_VAR), base_name, &newhandle) #endif #ifdef LTDL_SYSSEARCHPATH && !find_handle (sys_search_path, base_name, &newhandle) #endif ))) { if (tryall_dlopen (&newhandle, filename) != 0) { newhandle = NULL; } } if (!newhandle) { LT_DLFREE (*phandle); ++errors; goto cleanup; } } register_handle: LT_DLMEM_REASSIGN (*phandle, newhandle); if ((*phandle)->info.ref_count == 0) { (*phandle)->info.ref_count = 1; LT_DLMEM_REASSIGN ((*phandle)->info.name, name); LT_DLMUTEX_LOCK (); (*phandle)->next = handles; handles = *phandle; LT_DLMUTEX_UNLOCK (); } LT_DLMUTEX_SETERROR (saved_error); cleanup: LT_DLFREE (dir); LT_DLFREE (name); LT_DLFREE (canonical); return errors; } lt_dlhandle lt_dlopen (filename) const char *filename; { lt_dlhandle handle = 0; /* Just incase we missed a code path in try_dlopen() that reports an error, but forgets to reset handle... */ if (try_dlopen (&handle, filename) != 0) return 0; return handle; } /* If the last error messge store was `FILE_NOT_FOUND', then return non-zero. */ static int file_not_found () { const char *error = 0; LT_DLMUTEX_GETERROR (error); if (error == LT_DLSTRERROR (FILE_NOT_FOUND)) return 1; return 0; } /* If FILENAME has an ARCHIVE_EXT or SHLIB_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 SHLIB_EXT appended instead. */ lt_dlhandle lt_dlopenext (filename) const char *filename; { lt_dlhandle handle = 0; char * tmp = 0; char * ext = 0; size_t len; int errors = 0; if (!filename) { return lt_dlopen (filename); } assert (filename); len = LT_STRLEN (filename); ext = strrchr (filename, '.'); /* If FILENAME already bears a suitable extension, there is no need to try appending additional extensions. */ if (ext && ((strcmp (ext, archive_ext) == 0) #ifdef LTDL_SHLIB_EXT || (strcmp (ext, shlib_ext) == 0) #endif )) { return lt_dlopen (filename); } /* First try appending ARCHIVE_EXT. */ tmp = LT_EMALLOC (char, len + LT_STRLEN (archive_ext) + 1); if (!tmp) return 0; strcpy (tmp, filename); strcat (tmp, archive_ext); errors = try_dlopen (&handle, tmp); /* 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 ())) { LT_DLFREE (tmp); return handle; } #ifdef LTDL_SHLIB_EXT /* Try appending SHLIB_EXT. */ if (LT_STRLEN (shlib_ext) > LT_STRLEN (archive_ext)) { LT_DLFREE (tmp); tmp = LT_EMALLOC (char, len + LT_STRLEN (shlib_ext) + 1); if (!tmp) return 0; strcpy (tmp, filename); } else { tmp[len] = LT_EOS_CHAR; } strcat(tmp, shlib_ext); errors = try_dlopen (&handle, tmp); /* As before, if the file was found but loading failed, return now with the current error message. */ if (handle || ((errors > 0) && !file_not_found ())) { LT_DLFREE (tmp); return handle; } #endif /* Still here? Then we really did fail to locate any of the file names we tried. */ LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); LT_DLFREE (tmp); return 0; } static int lt_argz_insert (pargz, pargz_len, before, entry) char **pargz; size_t *pargz_len; char *before; const char *entry; { error_t error; if ((error = argz_insert (pargz, pargz_len, before, entry))) { switch (error) { case ENOMEM: LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); break; default: LT_DLMUTEX_SETERROR (LT_DLSTRERROR (UNKNOWN)); break; } return 1; } return 0; } static int lt_argz_insertinorder (pargz, pargz_len, entry) 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 (pargz, pargz_len, dirnam, dp) 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 + LT_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 = LT_EMALLOC (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; LT_DLFREE (buf); return errors; } static int list_files_by_dir (dirnam, pargz, pargz_len) 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 (dirname, data1, data2) char *dirname; lt_ptr data1; lt_ptr data2; { int (*func) LT_PARAMS((const char *filename, lt_ptr data)) = (int (*) LT_PARAMS((const char *filename, lt_ptr data))) 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: LT_DLFREE (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 (search_path, func, data) const char *search_path; int (*func) LT_PARAMS ((const char *filename, lt_ptr data)); lt_ptr data; { int is_done = 0; 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, func, data); } else { /* Otherwise search the default paths. */ is_done = foreach_dirinpath (user_search_path, 0, foreachfile_callback, func, data); if (!is_done) { is_done = foreach_dirinpath (getenv("LTDL_LIBRARY_PATH"), 0, foreachfile_callback, func, data); } #ifdef LTDL_SHLIBPATH_VAR if (!is_done) { is_done = foreach_dirinpath (getenv(LTDL_SHLIBPATH_VAR), 0, foreachfile_callback, func, data); } #endif #ifdef LTDL_SYSSEARCHPATH if (!is_done) { is_done = foreach_dirinpath (getenv(LTDL_SYSSEARCHPATH), 0, foreachfile_callback, func, data); } #endif } return is_done; } int lt_dlclose (handle) lt_dlhandle handle; { lt_dlhandle cur, last; int errors = 0; LT_DLMUTEX_LOCK (); /* check whether the handle is valid */ last = cur = handles; while (cur && handle != cur) { last = cur; cur = cur->next; } if (!cur) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ++errors; goto done; } handle->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 (handle->info.ref_count <= 0 && !LT_DLIS_RESIDENT (handle)) { lt_user_data data = handle->loader->dlloader_data; if (handle != handles) { last->next = handle->next; } else { handles = handle->next; } errors += handle->loader->module_close (data, handle->module); errors += unload_deplibs(handle); /* It is up to the callers to free the data itself. */ LT_DLFREE (handle->caller_data); LT_DLFREE (handle->info.filename); LT_DLFREE (handle->info.name); LT_DLFREE (handle); goto done; } if (LT_DLIS_RESIDENT (handle)) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CLOSE_RESIDENT_MODULE)); ++errors; } done: LT_DLMUTEX_UNLOCK (); return errors; } lt_ptr lt_dlsym (handle, symbol) lt_dlhandle handle; const char *symbol; { size_t lensym; char lsym[LT_SYMBOL_LENGTH]; char *sym; lt_ptr address; lt_user_data data; if (!handle) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); return 0; } if (!symbol) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); return 0; } lensym = LT_STRLEN (symbol) + LT_STRLEN (handle->loader->sym_prefix) + LT_STRLEN (handle->info.name); if (lensym + LT_SYMBOL_OVERHEAD < LT_SYMBOL_LENGTH) { sym = lsym; } else { sym = LT_EMALLOC (char, lensym + LT_SYMBOL_OVERHEAD + 1); if (!sym) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (BUFFER_OVERFLOW)); return 0; } } data = handle->loader->dlloader_data; if (handle->info.name) { const char *saved_error; LT_DLMUTEX_GETERROR (saved_error); /* this is a libtool module */ if (handle->loader->sym_prefix) { strcpy(sym, handle->loader->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->loader->find_sym (data, handle->module, sym); if (address) { if (sym != lsym) { LT_DLFREE (sym); } return address; } LT_DLMUTEX_SETERROR (saved_error); } /* otherwise try "symbol" */ if (handle->loader->sym_prefix) { strcpy(sym, handle->loader->sym_prefix); strcat(sym, symbol); } else { strcpy(sym, symbol); } address = handle->loader->find_sym (data, handle->module, sym); if (sym != lsym) { LT_DLFREE (sym); } return address; } const char * lt_dlerror () { const char *error; LT_DLMUTEX_GETERROR (error); LT_DLMUTEX_SETERROR (0); return error ? error : NULL; } static int lt_dlpath_insertdir (ppath, before, dir) 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_estrdup (dir); if (*ppath == 0) ++errors; return errors; } 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 (before - *ppath <= 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); LT_DLMEM_REASSIGN (*ppath, argz); cleanup: LT_DLFREE (canonical); LT_DLFREE (argz); return errors; } int lt_dladdsearchdir (search_dir) const char *search_dir; { int errors = 0; if (search_dir && *search_dir) { LT_DLMUTEX_LOCK (); if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0) ++errors; LT_DLMUTEX_UNLOCK (); } return errors; } int lt_dlinsertsearchdir (before, search_dir) const char *before; const char *search_dir; { int errors = 0; if (before) { LT_DLMUTEX_LOCK (); if ((before < user_search_path) || (before >= user_search_path + LT_STRLEN (user_search_path))) { LT_DLMUTEX_UNLOCK (); LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_POSITION)); return 1; } LT_DLMUTEX_UNLOCK (); } if (search_dir && *search_dir) { LT_DLMUTEX_LOCK (); if (lt_dlpath_insertdir (&user_search_path, (char *) before, search_dir) != 0) { ++errors; } LT_DLMUTEX_UNLOCK (); } return errors; } int lt_dlsetsearchpath (search_path) const char *search_path; { int errors = 0; LT_DLMUTEX_LOCK (); LT_DLFREE (user_search_path); LT_DLMUTEX_UNLOCK (); if (!search_path || !LT_STRLEN (search_path)) { return errors; } LT_DLMUTEX_LOCK (); if (canonicalize_path (search_path, &user_search_path) != 0) ++errors; LT_DLMUTEX_UNLOCK (); return errors; } const char * lt_dlgetsearchpath () { const char *saved_path; LT_DLMUTEX_LOCK (); saved_path = user_search_path; LT_DLMUTEX_UNLOCK (); return saved_path; } int lt_dlmakeresident (handle) lt_dlhandle handle; { int errors = 0; if (!handle) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ++errors; } else { LT_DLSET_FLAG (handle, LT_DLRESIDENT_FLAG); } return errors; } int lt_dlisresident (handle) lt_dlhandle handle; { if (!handle) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); return -1; } return LT_DLIS_RESIDENT (handle); } /* --- MODULE INFORMATION --- */ const lt_dlinfo * lt_dlgetinfo (handle) lt_dlhandle handle; { if (!handle) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); return 0; } return &(handle->info); } lt_dlhandle lt_dlhandle_next (place) lt_dlhandle place; { return place ? place->next : handles; } int lt_dlforeach (func, data) int (*func) LT_PARAMS((lt_dlhandle handle, lt_ptr data)); lt_ptr data; { int errors = 0; lt_dlhandle cur; LT_DLMUTEX_LOCK (); cur = handles; while (cur) { lt_dlhandle tmp = cur; cur = cur->next; if ((*func) (tmp, data)) { ++errors; break; } } LT_DLMUTEX_UNLOCK (); return errors; } lt_dlcaller_id lt_dlcaller_register () { static lt_dlcaller_id last_caller_id = 0; int result; LT_DLMUTEX_LOCK (); result = ++last_caller_id; LT_DLMUTEX_UNLOCK (); return result; } lt_ptr lt_dlcaller_set_data (key, handle, data) lt_dlcaller_id key; lt_dlhandle handle; lt_ptr data; { int n_elements = 0; lt_ptr stale = (lt_ptr) 0; int i; /* This needs to be locked so that the caller data can be updated simultaneously by different threads. */ LT_DLMUTEX_LOCK (); if (handle->caller_data) while (handle->caller_data[n_elements].key) ++n_elements; for (i = 0; i < n_elements; ++i) { if (handle->caller_data[i].key == key) { stale = handle->caller_data[i].data; break; } } /* Ensure that there is enough room in this handle's caller_data array to accept a new element (and an empty end marker). */ if (i == n_elements) { lt_caller_data *temp = LT_DLREALLOC (lt_caller_data, handle->caller_data, 2+ n_elements); if (!temp) { stale = 0; goto done; } handle->caller_data = temp; /* We only need this if we needed to allocate a new caller_data. */ handle->caller_data[i].key = key; handle->caller_data[1+ i].key = 0; } handle->caller_data[i].data = data; done: LT_DLMUTEX_UNLOCK (); return stale; } lt_ptr lt_dlcaller_get_data (key, handle) lt_dlcaller_id key; lt_dlhandle handle; { lt_ptr result = (lt_ptr) 0; /* This needs to be locked so that the caller data isn't updated by another thread part way through this function. */ LT_DLMUTEX_LOCK (); /* Locate the index of the element with a matching KEY. */ { int i; for (i = 0; handle->caller_data[i].key; ++i) { if (handle->caller_data[i].key == key) { result = handle->caller_data[i].data; break; } } } LT_DLMUTEX_UNLOCK (); return result; } /* --- USER MODULE LOADER API --- */ int lt_dlloader_add (place, dlloader, loader_name) lt_dlloader *place; const struct lt_user_dlloader *dlloader; const char *loader_name; { int errors = 0; lt_dlloader *node = 0, *ptr = 0; if ((dlloader == 0) /* diagnose null parameters */ || (dlloader->module_open == 0) || (dlloader->module_close == 0) || (dlloader->find_sym == 0)) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); return 1; } /* Create a new dlloader node with copies of the user callbacks. */ node = LT_EMALLOC (lt_dlloader, 1); if (!node) return 1; node->next = 0; node->loader_name = loader_name; node->sym_prefix = dlloader->sym_prefix; node->dlloader_exit = dlloader->dlloader_exit; node->module_open = dlloader->module_open; node->module_close = dlloader->module_close; node->find_sym = dlloader->find_sym; node->dlloader_data = dlloader->dlloader_data; LT_DLMUTEX_LOCK (); if (!loaders) { /* If there are no loaders, NODE becomes the list! */ loaders = node; } else if (!place) { /* If PLACE is not set, add NODE to the end of the LOADERS list. */ for (ptr = loaders; ptr->next; ptr = ptr->next) { /*NOWORK*/; } ptr->next = node; } else if (loaders == place) { /* If PLACE is the first loader, NODE goes first. */ node->next = place; loaders = node; } else { /* Find the node immediately preceding PLACE. */ for (ptr = loaders; ptr->next != place; ptr = ptr->next) { /*NOWORK*/; } if (ptr->next != place) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); ++errors; } else { /* Insert NODE between PTR and PLACE. */ node->next = place; ptr->next = node; } } LT_DLMUTEX_UNLOCK (); return errors; } int lt_dlloader_remove (loader_name) const char *loader_name; { lt_dlloader *place = lt_dlloader_find (loader_name); lt_dlhandle handle; int errors = 0; if (!place) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); return 1; } LT_DLMUTEX_LOCK (); /* Fail if there are any open modules which use this loader. */ for (handle = handles; handle; handle = handle->next) { if (handle->loader == place) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (REMOVE_LOADER)); ++errors; goto done; } } if (place == loaders) { /* PLACE is the first loader in the list. */ loaders = loaders->next; } else { /* Find the loader before the one being removed. */ lt_dlloader *prev; for (prev = loaders; prev->next; prev = prev->next) { if (!strcmp (prev->next->loader_name, loader_name)) { break; } } place = prev->next; prev->next = prev->next->next; } if (place->dlloader_exit) { errors = place->dlloader_exit (place->dlloader_data); } LT_DLFREE (place); done: LT_DLMUTEX_UNLOCK (); return errors; } lt_dlloader * lt_dlloader_next (place) lt_dlloader *place; { lt_dlloader *next; LT_DLMUTEX_LOCK (); next = place ? place->next : loaders; LT_DLMUTEX_UNLOCK (); return next; } const char * lt_dlloader_name (place) lt_dlloader *place; { const char *name = 0; if (place) { LT_DLMUTEX_LOCK (); name = place ? place->loader_name : 0; LT_DLMUTEX_UNLOCK (); } else { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); } return name; } lt_user_data * lt_dlloader_data (place) lt_dlloader *place; { lt_user_data *data = 0; if (place) { LT_DLMUTEX_LOCK (); data = place ? &(place->dlloader_data) : 0; LT_DLMUTEX_UNLOCK (); } else { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); } return data; } lt_dlloader * lt_dlloader_find (loader_name) const char *loader_name; { lt_dlloader *place = 0; LT_DLMUTEX_LOCK (); for (place = loaders; place; place = place->next) { if (strcmp (place->loader_name, loader_name) == 0) { break; } } LT_DLMUTEX_UNLOCK (); return place; } unixODBC-2.2.14-p2/odbcinst/0040755000076400007640000000000011150523333014001 5ustar nicknickunixODBC-2.2.14-p2/odbcinst/README0100644000076400007640000000301010306116555014656 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | ODBCINST lib (libodbcinst.so) | +-------------------------------------------------------------+ This share library supports ODBC Install/Setup and Config options. It is modelled after MS'isms and should, therefore, allow for an easy transition from MS'isms to other platforms (ie Linux). A complicating factor for unixODBC is that the GUI may not be present - or if it is - it may be any number of types (X, KDE, GNOME etc). So the GUI bits of odbcinst must be plugable. This library handles this. See SQLManageDataSources() and the odbcinstQ library. This lib also has a command line tool called odbcinst. +-------------------------------------------------------------+ | Peter Harvey | | pharvey@codebydesign.com | | http://www.unixodbc.org | | 10.APR.99 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/odbcinst/Makefile.am0100644000076400007640000000536411111034627016042 0ustar nicknicklib_LTLIBRARIES = libodbcinst.la INCLUDES = -I@top_srcdir@/include \ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" \ -DDEFLIB_PATH=\"@libdir@\" \ -DSHLIBEXT=\"@SHLIBEXT@\" \ -DUNIXODBC_SOURCE \ $(LTDLINCL) EXTRA_DIST = \ odbcinst.exp libodbcinst_la_LDFLAGS = \ -no-undefined \ -version-info @LIB_VERSION@ \ -export-dynamic \ -export-symbols @srcdir@/odbcinst.exp libodbcinst_la_LIBADD = \ ../ini/libinilc.la \ ../log/libloglc.la \ ../lst/liblstlc.la \ $(LIBLTDL) $(LIBADD_DL) if WITHLT libodbcinst_la_DEPENDENCIES = \ ../log/libloglc.la \ ../ini/libinilc.la \ ../lst/liblstlc.la \ $(LIBLTDL) else libodbcinst_la_DEPENDENCIES = \ ../log/libloglc.la \ ../ini/libinilc.la \ ../lst/liblstlc.la endif sysconf_DATA= libodbcinst_la_SOURCES = \ ODBCINSTConstructProperties.c \ ODBCINSTDestructProperties.c \ ODBCINSTSetProperty.c \ ODBCINSTValidateProperties.c \ ODBCINSTValidateProperty.c \ SQLConfigDataSource.c \ SQLConfigDriver.c \ SQLCreateDataSource.c \ SQLGetAvailableDrivers.c \ SQLGetConfigMode.c \ SQLGetInstalledDrivers.c \ SQLGetPrivateProfileString.c \ SQLGetTranslator.c \ SQLInstallDriverEx.c \ SQLInstallDriverManager.c \ SQLInstallTranslatorEx.c \ SQLInstallerError.c \ SQLManageDataSources.c \ SQLPostInstallerError.c \ SQLReadFileDSN.c \ SQLRemoveDSNFromIni.c \ SQLRemoveDriver.c \ SQLRemoveDriverManager.c \ SQLRemoveTranslator.c \ SQLSetConfigMode.c \ SQLValidDSN.c \ SQLWriteDSNToIni.c \ SQLWriteFileDSN.c \ SQLWritePrivateProfileString.c \ SQLInstallODBC.c \ _logging.c \ _odbcinst_ConfigModeINI.c \ _odbcinst_UserINI.c \ _odbcinst_SystemINI.c \ _odbcinst_GetSections.c \ _odbcinst_GetEntries.c \ _SQLGetInstalledDrivers.c \ _SQLWriteInstalledDrivers.c libodbcinstlc_la_LDFLAGS = noinst_LTLIBRARIES = libodbcinstlc.la libodbcinstlc_la_SOURCES = \ ODBCINSTConstructProperties.c \ ODBCINSTDestructProperties.c \ ODBCINSTSetProperty.c \ ODBCINSTValidateProperties.c \ ODBCINSTValidateProperty.c \ SQLConfigDataSource.c \ SQLConfigDriver.c \ SQLCreateDataSource.c \ SQLGetAvailableDrivers.c \ SQLGetConfigMode.c \ SQLGetInstalledDrivers.c \ SQLGetPrivateProfileString.c \ SQLGetTranslator.c \ SQLInstallDriverEx.c \ SQLInstallDriverManager.c \ SQLInstallTranslatorEx.c \ SQLInstallerError.c \ SQLManageDataSources.c \ SQLPostInstallerError.c \ SQLReadFileDSN.c \ SQLRemoveDSNFromIni.c \ SQLRemoveDriver.c \ SQLRemoveDriverManager.c \ SQLRemoveTranslator.c \ SQLSetConfigMode.c \ SQLValidDSN.c \ SQLWriteDSNToIni.c \ SQLWriteFileDSN.c \ SQLWritePrivateProfileString.c \ _logging.c \ _odbcinst_ConfigModeINI.c \ _odbcinst_UserINI.c \ _odbcinst_SystemINI.c \ _odbcinst_GetSections.c \ _odbcinst_GetEntries.c \ _SQLGetInstalledDrivers.c \ _SQLWriteInstalledDrivers.c unixODBC-2.2.14-p2/odbcinst/Makefile.in0100644000076400007640000006134211111035263016046 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = odbcinst DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sysconfdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = am_libodbcinst_la_OBJECTS = ODBCINSTConstructProperties.lo \ ODBCINSTDestructProperties.lo ODBCINSTSetProperty.lo \ ODBCINSTValidateProperties.lo ODBCINSTValidateProperty.lo \ SQLConfigDataSource.lo SQLConfigDriver.lo \ SQLCreateDataSource.lo SQLGetAvailableDrivers.lo \ SQLGetConfigMode.lo SQLGetInstalledDrivers.lo \ SQLGetPrivateProfileString.lo SQLGetTranslator.lo \ SQLInstallDriverEx.lo SQLInstallDriverManager.lo \ SQLInstallTranslatorEx.lo SQLInstallerError.lo \ SQLManageDataSources.lo SQLPostInstallerError.lo \ SQLReadFileDSN.lo SQLRemoveDSNFromIni.lo SQLRemoveDriver.lo \ SQLRemoveDriverManager.lo SQLRemoveTranslator.lo \ SQLSetConfigMode.lo SQLValidDSN.lo SQLWriteDSNToIni.lo \ SQLWriteFileDSN.lo SQLWritePrivateProfileString.lo \ SQLInstallODBC.lo _logging.lo _odbcinst_ConfigModeINI.lo \ _odbcinst_UserINI.lo _odbcinst_SystemINI.lo \ _odbcinst_GetSections.lo _odbcinst_GetEntries.lo \ _SQLGetInstalledDrivers.lo _SQLWriteInstalledDrivers.lo libodbcinst_la_OBJECTS = $(am_libodbcinst_la_OBJECTS) libodbcinstlc_la_LIBADD = am_libodbcinstlc_la_OBJECTS = ODBCINSTConstructProperties.lo \ ODBCINSTDestructProperties.lo ODBCINSTSetProperty.lo \ ODBCINSTValidateProperties.lo ODBCINSTValidateProperty.lo \ SQLConfigDataSource.lo SQLConfigDriver.lo \ SQLCreateDataSource.lo SQLGetAvailableDrivers.lo \ SQLGetConfigMode.lo SQLGetInstalledDrivers.lo \ SQLGetPrivateProfileString.lo SQLGetTranslator.lo \ SQLInstallDriverEx.lo SQLInstallDriverManager.lo \ SQLInstallTranslatorEx.lo SQLInstallerError.lo \ SQLManageDataSources.lo SQLPostInstallerError.lo \ SQLReadFileDSN.lo SQLRemoveDSNFromIni.lo SQLRemoveDriver.lo \ SQLRemoveDriverManager.lo SQLRemoveTranslator.lo \ SQLSetConfigMode.lo SQLValidDSN.lo SQLWriteDSNToIni.lo \ SQLWriteFileDSN.lo SQLWritePrivateProfileString.lo _logging.lo \ _odbcinst_ConfigModeINI.lo _odbcinst_UserINI.lo \ _odbcinst_SystemINI.lo _odbcinst_GetSections.lo \ _odbcinst_GetEntries.lo _SQLGetInstalledDrivers.lo \ _SQLWriteInstalledDrivers.lo libodbcinstlc_la_OBJECTS = $(am_libodbcinstlc_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcinst_la_SOURCES) $(libodbcinstlc_la_SOURCES) DIST_SOURCES = $(libodbcinst_la_SOURCES) $(libodbcinstlc_la_SOURCES) sysconfDATA_INSTALL = $(INSTALL_DATA) DATA = $(sysconf_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbcinst.la INCLUDES = -I@top_srcdir@/include \ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" \ -DDEFLIB_PATH=\"@libdir@\" \ -DSHLIBEXT=\"@SHLIBEXT@\" \ -DUNIXODBC_SOURCE \ $(LTDLINCL) EXTRA_DIST = \ odbcinst.exp libodbcinst_la_LDFLAGS = \ -no-undefined \ -version-info @LIB_VERSION@ \ -export-dynamic \ -export-symbols @srcdir@/odbcinst.exp libodbcinst_la_LIBADD = \ ../ini/libinilc.la \ ../log/libloglc.la \ ../lst/liblstlc.la \ $(LIBLTDL) $(LIBADD_DL) @WITHLT_FALSE@libodbcinst_la_DEPENDENCIES = \ @WITHLT_FALSE@ ../log/libloglc.la \ @WITHLT_FALSE@ ../ini/libinilc.la \ @WITHLT_FALSE@ ../lst/liblstlc.la @WITHLT_TRUE@libodbcinst_la_DEPENDENCIES = \ @WITHLT_TRUE@ ../log/libloglc.la \ @WITHLT_TRUE@ ../ini/libinilc.la \ @WITHLT_TRUE@ ../lst/liblstlc.la \ @WITHLT_TRUE@ $(LIBLTDL) sysconf_DATA = libodbcinst_la_SOURCES = \ ODBCINSTConstructProperties.c \ ODBCINSTDestructProperties.c \ ODBCINSTSetProperty.c \ ODBCINSTValidateProperties.c \ ODBCINSTValidateProperty.c \ SQLConfigDataSource.c \ SQLConfigDriver.c \ SQLCreateDataSource.c \ SQLGetAvailableDrivers.c \ SQLGetConfigMode.c \ SQLGetInstalledDrivers.c \ SQLGetPrivateProfileString.c \ SQLGetTranslator.c \ SQLInstallDriverEx.c \ SQLInstallDriverManager.c \ SQLInstallTranslatorEx.c \ SQLInstallerError.c \ SQLManageDataSources.c \ SQLPostInstallerError.c \ SQLReadFileDSN.c \ SQLRemoveDSNFromIni.c \ SQLRemoveDriver.c \ SQLRemoveDriverManager.c \ SQLRemoveTranslator.c \ SQLSetConfigMode.c \ SQLValidDSN.c \ SQLWriteDSNToIni.c \ SQLWriteFileDSN.c \ SQLWritePrivateProfileString.c \ SQLInstallODBC.c \ _logging.c \ _odbcinst_ConfigModeINI.c \ _odbcinst_UserINI.c \ _odbcinst_SystemINI.c \ _odbcinst_GetSections.c \ _odbcinst_GetEntries.c \ _SQLGetInstalledDrivers.c \ _SQLWriteInstalledDrivers.c libodbcinstlc_la_LDFLAGS = noinst_LTLIBRARIES = libodbcinstlc.la libodbcinstlc_la_SOURCES = \ ODBCINSTConstructProperties.c \ ODBCINSTDestructProperties.c \ ODBCINSTSetProperty.c \ ODBCINSTValidateProperties.c \ ODBCINSTValidateProperty.c \ SQLConfigDataSource.c \ SQLConfigDriver.c \ SQLCreateDataSource.c \ SQLGetAvailableDrivers.c \ SQLGetConfigMode.c \ SQLGetInstalledDrivers.c \ SQLGetPrivateProfileString.c \ SQLGetTranslator.c \ SQLInstallDriverEx.c \ SQLInstallDriverManager.c \ SQLInstallTranslatorEx.c \ SQLInstallerError.c \ SQLManageDataSources.c \ SQLPostInstallerError.c \ SQLReadFileDSN.c \ SQLRemoveDSNFromIni.c \ SQLRemoveDriver.c \ SQLRemoveDriverManager.c \ SQLRemoveTranslator.c \ SQLSetConfigMode.c \ SQLValidDSN.c \ SQLWriteDSNToIni.c \ SQLWriteFileDSN.c \ SQLWritePrivateProfileString.c \ _logging.c \ _odbcinst_ConfigModeINI.c \ _odbcinst_UserINI.c \ _odbcinst_SystemINI.c \ _odbcinst_GetSections.c \ _odbcinst_GetEntries.c \ _SQLGetInstalledDrivers.c \ _SQLWriteInstalledDrivers.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu odbcinst/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu odbcinst/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcinst.la: $(libodbcinst_la_OBJECTS) $(libodbcinst_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbcinst_la_LDFLAGS) $(libodbcinst_la_OBJECTS) $(libodbcinst_la_LIBADD) $(LIBS) libodbcinstlc.la: $(libodbcinstlc_la_OBJECTS) $(libodbcinstlc_la_DEPENDENCIES) $(LINK) $(libodbcinstlc_la_LDFLAGS) $(libodbcinstlc_la_OBJECTS) $(libodbcinstlc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODBCINSTConstructProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODBCINSTDestructProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODBCINSTSetProperty.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODBCINSTValidateProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODBCINSTValidateProperty.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLConfigDataSource.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLConfigDriver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCreateDataSource.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetAvailableDrivers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConfigMode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetInstalledDrivers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetPrivateProfileString.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetTranslator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLInstallDriverEx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLInstallDriverManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLInstallODBC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLInstallTranslatorEx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLInstallerError.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLManageDataSources.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPostInstallerError.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLReadFileDSN.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLRemoveDSNFromIni.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLRemoveDriver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLRemoveDriverManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLRemoveTranslator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetConfigMode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLValidDSN.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLWriteDSNToIni.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLWriteFileDSN.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLWritePrivateProfileString.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_SQLGetInstalledDrivers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_SQLWriteInstalledDrivers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_logging.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_odbcinst_ConfigModeINI.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_odbcinst_GetEntries.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_odbcinst_GetSections.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_odbcinst_SystemINI.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_odbcinst_UserINI.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: install-sysconfDATA: $(sysconf_DATA) @$(NORMAL_INSTALL) test -z "$(sysconfdir)" || $(mkdir_p) "$(DESTDIR)$(sysconfdir)" @list='$(sysconf_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ $(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ done uninstall-sysconfDATA: @$(NORMAL_UNINSTALL) @list='$(sysconf_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \ rm -f "$(DESTDIR)$(sysconfdir)/$$f"; \ 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) $(DATA) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sysconfdir)"; 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) 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-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-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-sysconfDATA install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES \ uninstall-sysconfDATA .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-exec install-exec-am install-info \ install-info-am install-libLTLIBRARIES install-man \ install-strip install-sysconfDATA 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-info-am uninstall-libLTLIBRARIES \ uninstall-sysconfDATA # 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: unixODBC-2.2.14-p2/odbcinst/ChangeLog0100644000076400007640000000041407363332176015565 0ustar nicknick1999-05-08 Peter Harvey * SQLWritePrivateProfileString: Now allows ODBC_BOTH_DSN (for calls to write odbcinst info) 1999-04-10 Peter Harvey * ODBCINSTConstructProperties: Added Trace and TraceFile options unixODBC-2.2.14-p2/odbcinst/ODBCINSTConstructProperties.c0100644000076400007640000002244311060007064021334 0ustar nicknick/************************************************** * ODBCINSTConstructProperties * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include static const char *aYesNo[] = { "Yes", "No", NULL }; /*! * \brief Builds a property list for pszDriver. * * Adds common DSN properties (Name,Driver,Description) and then asks the * drivers setup to load any additional properties. * * This is used to support editing DSN properties without forcing the driver * developer to create a UI for the many different UI implementations. The * driver developer can just implement ODBCINSTGetProperties. This function * can then call ODBCINSTGetProperties to get properties. The code that calls * this function can then display the properties in the UI in use. * * \param pszDriver Friendly driver name. * \param hFirstProperty Place to store the properties list. The properties (including * some of the elements within each HODBCINSTPROPERTY may * need to be freed using \sa ODBCINSTDestructProperties. * * \return int * \retval ODBCINST_ERROR Called failed. No memory was allocated at hFirstProperty. The * likely reasons for this; \li failed to lookup setup library name * \li failed to load setup library \li failed to find * ODBCINSTGetProperties symbol in setup library * \retval ODBCINST_SUCCESS Success! Do not forget to call ODBCINSTDestructProperties to * free memory used by the properties when you are done. * * \sa ODBCINSTDestructProperties */ int ODBCINSTConstructProperties( char *pszDriver, HODBCINSTPROPERTY *hFirstProperty ) { char szError[LOG_MSG_MAX+1]; char szDriverSetup[ODBC_FILENAME_MAX+1]; HINI hIni; int (*pODBCINSTGetProperties)( HODBCINSTPROPERTY ); void *hDLL = NULL; HODBCINSTPROPERTY hLastProperty; char szSectionName[INI_MAX_OBJECT_NAME+1]; char szIniName[ INI_MAX_OBJECT_NAME + 1 ]; char b1[ 256 ], b2[ 256 ]; /* SANITY CHECKS */ if ( pszDriver == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "Need a driver name. Make it the friendly name." ); return ODBCINST_ERROR; } #ifdef VMS sprintf( szIniName, "%s:%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 )); #else sprintf( szIniName, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 )); #endif /* GET DRIVER SETUP FILE NAME FOR GIVEN DRIVER */ #ifdef __OS2__ if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', FALSE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', FALSE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "Could not open odbcinst.ini" ); return ODBCINST_ERROR; } #ifdef PLATFORM64 /* ASSUME USER FRIENDLY NAME FOR STARTERS */ if ( iniPropertySeek( hIni, pszDriver, "Setup64", "" ) == INI_SUCCESS ) { } else if ( iniPropertySeek( hIni, pszDriver, "Setup", "" ) == INI_SUCCESS ) { } else { /* NOT USER FRIENDLY NAME I GUESS SO ASSUME DRIVER FILE NAME */ if ( iniPropertySeek( hIni, "", "Driver64", pszDriver ) == INI_SUCCESS ) { iniObject( hIni, szSectionName ); if ( iniPropertySeek( hIni, szSectionName, "Setup64", "" ) != INI_SUCCESS ) { sprintf( szError, "Could not find Setup property for (%s) in system information", pszDriver ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, szError ); iniClose( hIni ); return ODBCINST_ERROR; } } else if ( iniPropertySeek( hIni, "", "Driver", pszDriver ) == INI_SUCCESS ) { iniObject( hIni, szSectionName ); if ( iniPropertySeek( hIni, szSectionName, "Setup", "" ) != INI_SUCCESS ) { sprintf( szError, "Could not find Setup property for (%s) in system information", pszDriver ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, szError ); iniClose( hIni ); return ODBCINST_ERROR; } } else { sprintf( szError, "Could not find driver (%s) in system information", pszDriver ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, szError ); iniClose( hIni ); return ODBCINST_ERROR; } } #else /* ASSUME USER FRIENDLY NAME FOR STARTERS */ if ( iniPropertySeek( hIni, pszDriver, "Setup", "" ) != INI_SUCCESS ) { /* NOT USER FRIENDLY NAME I GUESS SO ASSUME DRIVER FILE NAME */ if ( iniPropertySeek( hIni, "", "Driver", pszDriver ) != INI_SUCCESS ) { sprintf( szError, "Could not find driver (%s) in system information", pszDriver ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, szError ); iniClose( hIni ); return ODBCINST_ERROR; } else { iniObject( hIni, szSectionName ); if ( iniPropertySeek( hIni, szSectionName, "Setup", "" ) != INI_SUCCESS ) { sprintf( szError, "Could not find Setup property for (%s) in system information", pszDriver ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, szError ); iniClose( hIni ); return ODBCINST_ERROR; } } } #endif iniValue( hIni, szDriverSetup ); iniClose( hIni ); if ( szDriverSetup[ 0 ] == '\0' ) { sprintf( szError, "Could not find Setup property for (%s) in system information", pszDriver ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, szError ); return ODBCINST_ERROR; } /* * initialize libtool */ lt_dlinit(); /* TRY GET FUNC FROM DRIVER SETUP */ if ( !(hDLL = lt_dlopen( szDriverSetup )) ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "Could not load library" ); return ODBCINST_ERROR; } pODBCINSTGetProperties = (int(*)(struct tODBCINSTPROPERTY*)) lt_dlsym( hDLL, "ODBCINSTGetProperties" ); /* PAH - This can be true even when we found the symbol. if ( lt_dlerror() != NULL ) */ if ( pODBCINSTGetProperties == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "Could not find ODBCINSTGetProperties()" ); return ODBCINST_ERROR; } /* MANDATORY PROPERTIES */ (*hFirstProperty) = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); memset( (*hFirstProperty), 0, sizeof(ODBCINSTPROPERTY) ); (*hFirstProperty)->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; (*hFirstProperty)->pNext = NULL; (*hFirstProperty)->bRefresh = 0; (*hFirstProperty)->hDLL = hDLL; (*hFirstProperty)->pWidget = NULL; (*hFirstProperty)->pszHelp = NULL; (*hFirstProperty)->aPromptData = NULL; strncpy( (*hFirstProperty)->szName, "Name", INI_MAX_PROPERTY_NAME ); strcpy( (*hFirstProperty)->szValue, "" ); hLastProperty = (*hFirstProperty); (*hFirstProperty)->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = (*hFirstProperty)->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = hDLL; hLastProperty->pWidget = NULL; (*hFirstProperty)->pszHelp = NULL; (*hFirstProperty)->aPromptData = NULL; strncpy( hLastProperty->szName, "Description", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, pszDriver, INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LABEL; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = hDLL; hLastProperty->pWidget = NULL; (*hFirstProperty)->pszHelp = NULL; (*hFirstProperty)->aPromptData = NULL; strncpy( hLastProperty->szName, "Driver", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, pszDriver, INI_MAX_PROPERTY_VALUE ); /* hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof(aYesNo) ); memcpy( hLastProperty->aPromptData, aYesNo, sizeof(aYesNo) ); strncpy( hLastProperty->szName, "Trace", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "No" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; strncpy( hLastProperty->szName, "TraceFile", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); */ /* APPEND OTHERS */ pODBCINSTGetProperties( hLastProperty ); return ODBCINST_SUCCESS; } unixODBC-2.2.14-p2/odbcinst/ODBCINSTDestructProperties.c0100644000076400007640000000271707363332176021167 0ustar nicknick/************************************************** * ODBCINSTDestructProperties * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include int ODBCINSTDestructProperties( HODBCINSTPROPERTY *hFirstProperty ) { HODBCINSTPROPERTY hNextProperty; HODBCINSTPROPERTY hCurProperty; int nData; /* SANITY CHECKS */ if ( (*hFirstProperty) == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "Invalid property list handle" ); return ODBCINST_ERROR; } /* FREE MEMORY */ for ( hCurProperty = (*hFirstProperty); hCurProperty != NULL; hCurProperty = hNextProperty ) { hNextProperty = hCurProperty->pNext; /* FREE ANY PROMPT DATA (ie pick list options and such) */ if ( hCurProperty->aPromptData != NULL ) free( hCurProperty->aPromptData ); /* 1st PROPERTY HAS HANDLE TO DriverSetup DLL; LETS LET THE O/S KNOW WE ARE DONE WITH IT */ if ( hCurProperty == (*hFirstProperty) && hCurProperty->hDLL != NULL ) lt_dlclose( hCurProperty->hDLL ); /* FREE OTHER STUFF */ if ( hCurProperty->pszHelp != NULL ) free( hCurProperty->pszHelp ); free( hCurProperty ); } (*hFirstProperty) = NULL; return ODBCINST_SUCCESS; } unixODBC-2.2.14-p2/odbcinst/ODBCINSTSetProperty.c0100644000076400007640000000454007406123161017577 0ustar nicknick/************************************************** * ODBCINSTSetProperty * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include int ODBCINSTSetProperty( HODBCINSTPROPERTY hFirstProperty, char *pszProperty, char *pszValue ) { char szError[LOG_MSG_MAX+1]; HODBCINSTPROPERTY hCurProperty; /* SANITY CHECKS */ if ( hFirstProperty == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "Invalid property list handle" ); return ODBCINST_ERROR; } if ( pszProperty == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "Invalid Property Name" ); return ODBCINST_ERROR; } if ( pszValue == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "Invalid Value buffer" ); return ODBCINST_ERROR; } /* FIND pszProperty */ for ( hCurProperty = hFirstProperty; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { if ( strcasecmp( pszProperty, hCurProperty->szName ) == 0 ) { /* CHANGE IT */ strncpy( hCurProperty->szValue, pszValue, INI_MAX_PROPERTY_VALUE ); return ODBCINST_SUCCESS; } } sprintf( szError, "Could not find property (%s)", pszProperty ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_WARNING, ODBC_ERROR_GENERAL_ERR, szError ); return ODBCINST_ERROR; } int ODBCINSTAddProperty( HODBCINSTPROPERTY hFirstProperty, char *pszProperty, char *pszValue ) { HODBCINSTPROPERTY hNew; hNew = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); memset(hNew, 0, sizeof(ODBCINSTPROPERTY)); hNew->nPromptType = ODBCINST_PROMPTTYPE_HIDDEN; hNew->pNext = NULL; hNew->bRefresh = 0; hNew->hDLL = hFirstProperty->hDLL; hNew->pWidget = NULL; hNew->pszHelp = NULL; hNew->aPromptData = NULL; strcpy(hNew->szName, pszProperty ); strcpy( hNew->szValue, pszValue ); /* * add to end of list */ while ( hFirstProperty -> pNext ) { hFirstProperty = hFirstProperty -> pNext; } hNew -> pNext = NULL; hFirstProperty -> pNext = hNew; return 0; } unixODBC-2.2.14-p2/odbcinst/ODBCINSTValidateProperties.c0100644000076400007640000000110307363332176021107 0ustar nicknick/************************************************** * ODBCINSTValidateProperties * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include int ODBCINSTValidateProperties( HODBCINSTPROPERTY hFirstProperty, HODBCINSTPROPERTY hBadProperty, char *pszMessage ) { return ODBCINST_SUCCESS; } unixODBC-2.2.14-p2/odbcinst/ODBCINSTValidateProperty.c0100644000076400007640000000106007363332176020601 0ustar nicknick/************************************************** * ODBCINSTValidateProperty * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include int ODBCINSTValidateProperty( HODBCINSTPROPERTY hFirstProperty, char *pszProperty, char *pszMessage ) { return ODBCINST_SUCCESS; } unixODBC-2.2.14-p2/odbcinst/SQLConfigDataSource.c0100644000076400007640000001531711057740263017722 0ustar nicknick/************************************************** * SQLConfigDataSource * * Determine the DriverSetup file name and then try to pass * the work along to its ConfigDSN(). * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include static BOOL SQLConfigDataSourceWide( HWND hWnd, WORD nRequest, LPCSTR pszDriver, /* USER FRIENDLY NAME (not file name) */ LPCSTR pszAttributes, LPCWSTR pszDriverW, LPCWSTR pszAttributesW ) { BOOL (*pFunc)( HWND, WORD, LPCSTR, LPCSTR ); BOOL (*pFuncW)( HWND, WORD, LPCWSTR, LPCWSTR ); BOOL nReturn; void *hDLL = FALSE; HINI hIni; char szDriverSetup[INI_MAX_PROPERTY_VALUE+1]; char szIniName[ INI_MAX_OBJECT_NAME + 1 ]; char b1[ 256 ], b2[ 256 ]; /* SANITY CHECKS */ if ( pszDriver == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } if ( pszDriver[0] == '\0' ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } switch ( nRequest ) { case ODBC_ADD_DSN: case ODBC_CONFIG_DSN: case ODBC_REMOVE_DSN: case ODBC_ADD_SYS_DSN: case ODBC_CONFIG_SYS_DSN: case ODBC_REMOVE_SYS_DSN: case ODBC_REMOVE_DEFAULT_DSN: break; default: inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_REQUEST_TYPE, "" ); return FALSE; } #ifdef VMS sprintf( szIniName, "%s:%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) ); #else sprintf( szIniName, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) ); #endif /* OK */ #ifdef __OS2__ if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } /* * initialize libtool */ lt_dlinit(); #ifdef PLATFORM64 if ( iniPropertySeek( hIni, (char *)pszDriver, "Setup64", "" ) == INI_SUCCESS || iniPropertySeek( hIni, (char *)pszDriver, "Setup", "" ) == INI_SUCCESS ) #else if ( iniPropertySeek( hIni, (char *)pszDriver, "Setup", "" ) == INI_SUCCESS ) #endif { iniValue( hIni, szDriverSetup ); iniClose( hIni ); if ( szDriverSetup[ 0 ] == '\0' ) { char szError[ 512 ]; sprintf( szError, "Could not find Setup property for (%s) in system information", pszDriver ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, szError ); __set_config_mode( ODBC_BOTH_DSN ); return FALSE; } nReturn = FALSE; if ( (hDLL = lt_dlopen( szDriverSetup )) ) { pFunc = (BOOL (*)(HWND, WORD, LPCSTR, LPCSTR )) lt_dlsym( hDLL, "ConfigDSN" ); pFuncW = (BOOL (*)(HWND, WORD, LPCWSTR, LPCWSTR )) lt_dlsym( hDLL, "ConfigDSNW" ); if ( pFunc ) { /* * set the mode */ switch ( nRequest ) { case ODBC_ADD_DSN: case ODBC_CONFIG_DSN: case ODBC_REMOVE_DSN: case ODBC_REMOVE_DEFAULT_DSN: __set_config_mode( ODBC_USER_DSN ); break; case ODBC_ADD_SYS_DSN: __set_config_mode( ODBC_SYSTEM_DSN ); nRequest = ODBC_ADD_DSN; break; case ODBC_CONFIG_SYS_DSN: __set_config_mode( ODBC_SYSTEM_DSN ); nRequest = ODBC_CONFIG_DSN; break; case ODBC_REMOVE_SYS_DSN: __set_config_mode( ODBC_SYSTEM_DSN ); nRequest = ODBC_REMOVE_DSN; break; } nReturn = pFunc( hWnd, nRequest, pszDriver, pszAttributes ); } else if ( pFuncW ) { /* * set the mode */ switch ( nRequest ) { case ODBC_ADD_DSN: case ODBC_CONFIG_DSN: case ODBC_REMOVE_DSN: case ODBC_REMOVE_DEFAULT_DSN: __set_config_mode( ODBC_USER_DSN ); break; case ODBC_ADD_SYS_DSN: __set_config_mode( ODBC_SYSTEM_DSN ); nRequest = ODBC_ADD_DSN; break; case ODBC_CONFIG_SYS_DSN: __set_config_mode( ODBC_SYSTEM_DSN ); nRequest = ODBC_CONFIG_DSN; break; case ODBC_REMOVE_SYS_DSN: __set_config_mode( ODBC_SYSTEM_DSN ); nRequest = ODBC_REMOVE_DSN; break; } nReturn = pFuncW( hWnd, nRequest, pszDriverW, pszAttributesW ); } else { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); } } else inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); __set_config_mode( ODBC_BOTH_DSN ); return nReturn; } inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); iniClose( hIni ); __set_config_mode( ODBC_BOTH_DSN ); return FALSE; } BOOL INSTAPI SQLConfigDataSourceW (HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszAttributes) { char *drv, *attr; BOOL ret; inst_logClear(); drv = _single_string_alloc_and_copy( lpszDriver ); attr = _multi_string_alloc_and_copy( lpszAttributes ); ret = SQLConfigDataSourceWide( hwndParent, fRequest, drv, attr, lpszDriver, lpszAttributes ); free( drv ); free( attr ); return ret; } BOOL INSTAPI SQLConfigDataSource (HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszAttributes) { SQLWCHAR *drv, *attr; BOOL ret; inst_logClear(); drv = _single_string_alloc_and_expand( lpszDriver ); attr = _multi_string_alloc_and_expand( lpszAttributes ); ret = SQLConfigDataSourceWide( hwndParent, fRequest, lpszDriver, lpszAttributes, drv, attr ); free( drv ); free( attr ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLConfigDriver.c0100644000076400007640000001453111057740333017116 0ustar nicknick/************************************************** * SQLConfigDriver * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include static BOOL SQLConfigDriverWide( HWND hWnd, WORD nRequest, LPCSTR pszDriver, LPCSTR pszArgs, LPSTR pszMsg, WORD nMsgMax, WORD *pnMsgOut, LPCWSTR pszDriverW, LPCWSTR pszArgsW, LPWSTR pszMsgW, int *iswide ) { BOOL nReturn; void *hDLL; BOOL (*pConfigDriver)( HWND, WORD, LPCSTR, LPCSTR, LPCSTR, WORD, WORD * ); BOOL (*pConfigDriverW)( HWND, WORD, LPCWSTR, LPCWSTR, LPCWSTR, WORD, WORD * ); char szDriverSetup[ODBC_FILENAME_MAX+1]; HINI hIni; char szIniName[ INI_MAX_OBJECT_NAME + 1 ]; char b1[ 256 ], b2[ 256 ]; *iswide = 0; /* SANITY CHECKS */ nReturn = FALSE; if ( pszDriver == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_NAME, "" ); return FALSE; } if ( nRequest > ODBC_CONFIG_DRIVER ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_REQUEST_TYPE, "" ); return FALSE; } /* OK */ #ifdef VMS sprintf( szIniName, "%s:%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 )); #else sprintf( szIniName, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 )); #endif /* lets get driver setup file name from odbcinst.ini */ #ifdef __OS2__ if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_NAME, "" ); return FALSE; } #ifdef PLATFORM64 if ( iniPropertySeek( hIni, (char *)pszDriver, "Setup64", "" ) == INI_SUCCESS || iniPropertySeek( hIni, (char *)pszDriver, "Setup", "" ) == INI_SUCCESS ) #else if ( iniPropertySeek( hIni, (char *)pszDriver, "Setup", "" ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_NAME, "" ); iniClose( hIni ); return FALSE; } iniValue( hIni, szDriverSetup ); iniClose( hIni ); /* * initialize libtool */ lt_dlinit(); /* process request */ switch ( nRequest ) { case ODBC_CONFIG_DRIVER: /* WHAT OPTIONS CAN WE EXPECT IN pszArgs?? * Sounds like just connection pooling options * In anycase, the spec says handle this in the * odbcinst so we probably want to make some calls here... * How common are Driver config options (not DSN options) anyway? * - Peter */ break; case ODBC_INSTALL_DRIVER: case ODBC_REMOVE_DRIVER: default : /* DRIVER SEPCIFIC are default; HANDLE AS PER INSTALL & REMOVE */ /* errors in here are ignored, according to the spec; perhaps I should ret error and let app ignore? */ if ( (hDLL = lt_dlopen( szDriverSetup )) ) { pConfigDriver = (BOOL (*)(HWND, WORD, LPCSTR, LPCSTR, LPCSTR, WORD, WORD * )) lt_dlsym( hDLL, "ConfigDriver" ); pConfigDriverW = (BOOL (*)(HWND, WORD, LPCWSTR, LPCWSTR, LPCWSTR, WORD, WORD * )) lt_dlsym( hDLL, "ConfigDriverW" ); /* if ( lt_dlerror() == NULL ) */ if ( pConfigDriver ) nReturn = pConfigDriver( hWnd, nRequest, pszDriver, pszArgs, pszMsg, nMsgMax, pnMsgOut); else if ( pConfigDriverW ) { nReturn = pConfigDriverW( hWnd, nRequest, pszDriverW, pszArgsW, pszMsgW, nMsgMax, pnMsgOut); *iswide = 1; } else inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); } else inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); } return TRUE; } BOOL INSTAPI SQLConfigDriver(HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut) { SQLWCHAR *drv; SQLWCHAR *args; SQLWCHAR *msg; BOOL ret; WORD len; int iswide; inst_logClear(); drv = lpszDriver ? _single_string_alloc_and_expand( lpszDriver ) : (SQLWCHAR*)NULL; args = lpszArgs ? _multi_string_alloc_and_expand( lpszArgs ) : (SQLWCHAR*)NULL; if ( lpszMsg ) { if ( cbMsgMax > 0 ) { msg = calloc( cbMsgMax + 1, sizeof( SQLWCHAR )); } else { msg = NULL; } } else { msg = NULL; } ret = SQLConfigDriverWide( hwndParent, fRequest, lpszDriver, lpszArgs, lpszMsg, cbMsgMax, &len, drv, args, msg, &iswide ); if ( drv ) free( drv ); if ( args ) free( args ); if ( iswide ) { if ( ret && msg ) { _single_copy_from_wide((SQLCHAR*) lpszMsg, msg, len + 1 ); } } else { /* * the output is already in the right buffer */ } if ( msg ) free( msg ); if ( pcbMsgOut ) *pcbMsgOut = len; return ret; } BOOL INSTAPI SQLConfigDriverW(HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszArgs, LPWSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut) { char *drv; char *args; char *msg; BOOL ret; WORD len; int iswide; inst_logClear(); drv = lpszDriver ? _single_string_alloc_and_copy( lpszDriver ) : (char*)NULL; args = lpszArgs ? _multi_string_alloc_and_copy( lpszArgs ) : (char*)NULL; if ( lpszMsg ) { if ( cbMsgMax > 0 ) { msg = calloc( cbMsgMax + 1, 1 ); } else { msg = NULL; } } else { msg = NULL; } ret = SQLConfigDriverWide( hwndParent, fRequest, drv, args, msg, cbMsgMax, &len, lpszDriver, lpszArgs, lpszMsg, &iswide ); if ( drv ) free( drv ); if ( args ) free( args ); if ( iswide ) { /* * the output is already in the right buffer */ } else { if ( ret && msg ) { _single_copy_to_wide( lpszMsg, msg, len + 1 ); } } if ( msg ) free( msg ); if ( pcbMsgOut ) *pcbMsgOut = len; return ret; } unixODBC-2.2.14-p2/odbcinst/SQLCreateDataSource.c0100644000076400007640000001350510724310434017706 0ustar nicknick/************************************************** * SQLCreateDataSource * * This is a 100% UI so simply pass it on to odbcinst's UI * shadow share. * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include /* * Take a wide string consisting of null terminated sections, and copy to a ASCII version */ char* _multi_string_alloc_and_copy( LPCWSTR in ) { char *chr; int len = 0; while ( in[ len ] != 0 || in[ len + 1 ] != 0 ) { len ++; } chr = malloc( len + 2 ); len = 0; while ( in[ len ] != 0 || in[ len + 1 ] != 0 ) { chr[ len ] = 0xFF & in[ len ]; len ++; } chr[ len ++ ] = '\0'; chr[ len ++ ] = '\0'; return chr; } char* _single_string_alloc_and_copy( LPCWSTR in ) { char *chr; int len = 0; while ( in[ len ] != 0 ) { len ++; } chr = malloc( len + 1 ); len = 0; while ( in[ len ] != 0 ) { chr[ len ] = 0xFF & in[ len ]; len ++; } chr[ len ++ ] = '\0'; return chr; } SQLWCHAR* _multi_string_alloc_and_expand( LPCSTR in ) { SQLWCHAR *chr; int len = 0; while ( in[ len ] != 0 || in[ len + 1 ] != 0 ) { len ++; } chr = malloc(sizeof( SQLWCHAR ) * ( len + 2 )); len = 0; while ( in[ len ] != 0 || in[ len + 1 ] != 0 ) { chr[ len ] = in[ len ]; len ++; } chr[ len ++ ] = 0; chr[ len ++ ] = 0; return chr; } SQLWCHAR* _single_string_alloc_and_expand( LPCSTR in ) { SQLWCHAR *chr; int len = 0; while ( in[ len ] != 0 ) { len ++; } chr = malloc( sizeof( SQLWCHAR ) * ( len + 1 )); len = 0; while ( in[ len ] != 0 ) { chr[ len ] = in[ len ]; len ++; } chr[ len ++ ] = 0; return chr; } void _single_string_copy_to_wide( SQLWCHAR *out, LPCSTR in, int len ) { while ( len > 0 && *in ) { *out = *in; out++; in++; len --; } *out = 0; } void _single_copy_to_wide( SQLWCHAR *out, LPCSTR in, int len ) { while ( len >= 0 ) { *out = *in; out++; in++; len --; } } void _single_copy_from_wide( SQLCHAR *out, LPCWSTR in, int len ) { while ( len >= 0 ) { *out = *in; out++; in++; len --; } } void _multi_string_copy_to_wide( SQLWCHAR *out, LPCSTR in, int len ) { while ( len > 0 && ( in[ 0 ] || in[ 1 ] )) { *out = *in; out++; in++; len --; } *out++ = 0; *out++ = 0; } /*! * \brief Invokes a UI (a wizard) to walk User through creating a DSN. * * \param hWnd Input. Parent window handle. This is HWND as per the ODBC * specification but in unixODBC we use a generic window * handle. Caller must cast a HODBCINSTWND to HWND at call. * \param pszDS Input. Data Source Name. This can be a NULL pointer. * * \return BOOL * * \sa ODBCINSTWND */ BOOL SQLCreateDataSource( HWND hWnd, LPCSTR pszDS ) { HODBCINSTWND hODBCInstWnd = (HODBCINSTWND)hWnd; char szName[FILENAME_MAX]; char szNameAndExtension[FILENAME_MAX]; char szPathAndName[FILENAME_MAX]; void * hDLL; BOOL (*pSQLCreateDataSource)(HWND, LPCSTR); inst_logClear(); /* ODBC specification states that hWnd is mandatory. */ if ( !hWnd ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_HWND, "" ); return FALSE; } /* initialize libtool */ if ( lt_dlinit() ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "lt_dlinit() failed" ); return FALSE; } /* get plugin name */ _appendUIPluginExtension( szNameAndExtension, _getUIPluginName( szName, hODBCInstWnd->szUI ) ); /* lets try loading the plugin using an implicit path */ hDLL = lt_dlopen( szNameAndExtension ); if ( hDLL ) { /* change the name, as it avoids it finding it in the calling lib */ pSQLCreateDataSource = (BOOL (*)(HWND, LPCSTR))lt_dlsym( hDLL, "ODBCCreateDataSource" ); if ( pSQLCreateDataSource ) return pSQLCreateDataSource( ( *(hODBCInstWnd->szUI) ? hODBCInstWnd->hWnd : NULL ), pszDS ); else inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, (char*)lt_dlerror() ); } else { /* try with explicit path */ _prependUIPluginPath( szPathAndName, szNameAndExtension ); hDLL = lt_dlopen( szPathAndName ); if ( hDLL ) { /* change the name, as it avoids linker finding it in the calling lib */ pSQLCreateDataSource = (BOOL (*)(HWND,LPCSTR))lt_dlsym( hDLL, "ODBCCreateDataSource" ); if ( pSQLCreateDataSource ) return pSQLCreateDataSource( ( *(hODBCInstWnd->szUI) ? hODBCInstWnd->hWnd : NULL ), pszDS ); else inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, (char*)lt_dlerror() ); } } /* report failure to caller */ inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } /*! * \brief A wide char version of \sa SQLCreateDataSource. * * \sa SQLCreateDataSource */ BOOL INSTAPI SQLCreateDataSourceW( HWND hwndParent, LPCWSTR lpszDSN ) { BOOL ret; char *ms = _multi_string_alloc_and_copy( lpszDSN ); inst_logClear(); ret = SQLCreateDataSource( hwndParent, ms ); free( ms ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLGetAvailableDrivers.c0100644000076400007640000000165310437351747020425 0ustar nicknick/************************************************** * SQLGetAvailableDrivers * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLGetAvailableDrivers( LPCSTR pszInfFile, LPSTR pszBuf, WORD nBufMax, WORD *pnBufOut) { return SQLGetInstalledDrivers( pszBuf, nBufMax, pnBufOut ); } BOOL INSTAPI SQLGetAvailableDriversW (LPCWSTR lpszInfFile, LPWSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut) { return SQLGetInstalledDriversW( lpszBuf, cbBufMax, pcbBufOut ); } unixODBC-2.2.14-p2/odbcinst/SQLGetConfigMode.c0100644000076400007640000000114310723054571017203 0ustar nicknick/************************************************** * SQLGetConfigMode * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com * Nick Gorham - nick@easysoft.com **************************************************/ #include #include BOOL SQLGetConfigMode( UWORD *pnConfigMode ) { inst_logClear(); *pnConfigMode = __get_config_mode(); return TRUE; } unixODBC-2.2.14-p2/odbcinst/SQLGetInstalledDrivers.c0100644000076400007640000000444211057740713020455 0ustar nicknick/************************************************** * SQLGetInstalledDrivers * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLGetInstalledDrivers( LPSTR pszBuf, WORD nBufMax, WORD *pnBufOut ) { HINI hIni; WORD nBufPos = 0; WORD nToCopySize = 0; char szObjectName[INI_MAX_OBJECT_NAME+1]; char szIniName[ INI_MAX_OBJECT_NAME + 1 ]; char b1[ 256 ], b2[ 256 ]; inst_logClear(); #ifdef VMS sprintf( szIniName, "%s:%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) ); #else sprintf( szIniName, "%s/%d", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) ); #endif #ifdef __OS2__ if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_COMPONENT_NOT_FOUND, "" ); return FALSE; } memset( pszBuf, '\0', nBufMax ); iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { iniObject( hIni, szObjectName ); if ( strcmp( szObjectName, "ODBC" ) == 0 ) { iniObjectNext( hIni ); continue; } if ( (strlen( szObjectName )+1) > (nBufMax - nBufPos) ) { nToCopySize = nBufMax - nBufPos; strncpy( &(pszBuf[nBufPos]), szObjectName, nToCopySize ); nBufPos = nBufMax; break; } else { strcpy( &(pszBuf[nBufPos]), szObjectName ); nBufPos += strlen( szObjectName )+1; } iniObjectNext( hIni ); } iniClose( hIni ); if ( pnBufOut ) *pnBufOut = nBufPos-1; return TRUE; } BOOL INSTAPI SQLGetInstalledDriversW (LPWSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut) { char *path; BOOL ret; inst_logClear(); path = calloc( cbBufMax, 1 ); ret = SQLGetInstalledDrivers( path, cbBufMax, pcbBufOut ); if ( ret ) { _multi_string_copy_to_wide( lpszBuf, path, cbBufMax ); } free( path ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLGetPrivateProfileString.c0100644000076400007640000004040611060200754021307 0ustar nicknick/**************************************************** * SQLGetPrivateProfileString * * Mostly used with odbc.ini files but can be used for odbcinst.ini * * IF pszFileName[0] == '/' THEN * use pszFileName * ELSE * use _odbcinst_ConfigModeINI() to get the complete file name for the current mode. * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include #include #ifdef ENABLE_INI_CACHING #ifdef HAVE_LIBPTH #include static pth_mutex_t mutex_ini = PTH_MUTEX_INIT; static int pth_init_called = 0; static int mutex_entry( pth_mutex_t *mutex ) { if ( !pth_init_called ) { pth_init(); pth_init_called = 1; } return pth_mutex_acquire( mutex, 0, NULL ); } static int mutex_exit( pth_mutex_t *mutex ) { return pth_mutex_release( mutex ); } #elif HAVE_LIBPTHREAD #include static pthread_mutex_t mutex_ini = PTHREAD_MUTEX_INITIALIZER; static int mutex_entry( pthread_mutex_t *mutex ) { return pthread_mutex_lock( mutex ); } static int mutex_exit( pthread_mutex_t *mutex ) { return pthread_mutex_unlock( mutex ); } #elif HAVE_LIBTHREAD #include static mutex_t mutex_ini; static int mutex_entry( mutex_t *mutex ) { return mutex_lock( mutex ); } static int mutex_exit( mutex_t *mutex ) { return mutex_unlock( mutex ); } #else #define mutex_entry(x) #define mutex_exit(x) #endif static struct ini_cache *ini_cache_head = NULL; static int _check_ini_cache( int *ret, LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszDefault, LPSTR pRetBuffer, int nRetBuffer, LPCSTR pszFileName ) { struct ini_cache *ini_cache = ini_cache_head, *prev = NULL; UWORD config_mode; long tstamp = time( NULL ); if ( pszSection == NULL || pszEntry == NULL ) { return 0; } config_mode = __get_config_mode(); /* * look for expired entries, remove one each call */ for ( prev = NULL, ini_cache = ini_cache_head; ini_cache; ini_cache = ini_cache -> next ) { if ( ini_cache -> timestamp < tstamp ) { if ( prev ) { prev -> next = ini_cache -> next; } else { ini_cache_head = ini_cache -> next; } if ( ini_cache -> fname ) free( ini_cache -> fname ); if ( ini_cache -> section ) free( ini_cache -> section ); if ( ini_cache -> entry ) free( ini_cache -> entry ); if ( ini_cache -> value ) free( ini_cache -> value ); if ( ini_cache -> default_value ) free( ini_cache -> default_value ); free( ini_cache ); break; } prev = ini_cache; } for ( ini_cache = ini_cache_head; ini_cache; ini_cache = ini_cache -> next ) { if ( !pszFileName && ini_cache -> fname ) continue; if ( pszFileName && !ini_cache -> fname ) continue; if ( pszFileName && ini_cache -> fname && strcmp( pszFileName, ini_cache -> fname )) continue; if ( ini_cache -> config_mode != config_mode ) continue; if ( !pszSection && ini_cache -> section ) continue; if ( pszSection && !ini_cache -> section ) continue; if ( pszSection && ini_cache -> section && strcmp( pszSection, ini_cache -> section )) continue; if ( !pszEntry && ini_cache -> entry ) continue; if ( pszEntry && !ini_cache -> entry ) continue; if ( pszEntry && ini_cache -> entry && strcmp( pszEntry, ini_cache -> entry )) continue; if ( !pszDefault && ini_cache -> default_value ) continue; if ( pszDefault && !ini_cache -> default_value ) continue; if ( pszDefault && ini_cache -> default_value && strcmp( pszDefault, ini_cache -> default_value )) continue; if ( !pRetBuffer && ini_cache -> value ) continue; if ( pRetBuffer && !ini_cache -> value ) continue; if ( nRetBuffer != ini_cache -> buffer_size ) continue; if ( pRetBuffer ) { if ( ini_cache -> value ) strcpy( pRetBuffer, ini_cache -> value ); *ret = ini_cache -> ret_value; return 1; } } return 0; } static int _save_ini_cache( int ret, LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszDefault, LPSTR pRetBuffer, int nRetBuffer, LPCSTR pszFileName ) { struct ini_cache *ini_cache; UWORD config_mode; long tstamp = time( NULL ) + 20; /* expiry every 20 seconds */ ini_cache = calloc( sizeof( struct ini_cache ), 1 ); if ( !ini_cache ) { return 0; } if ( pszFileName ) ini_cache -> fname = strdup( pszFileName ); if ( pszSection ) ini_cache -> section = strdup( pszSection ); if ( pszEntry ) ini_cache -> entry = strdup( pszEntry ); if ( pRetBuffer && ret >= 0 ) ini_cache -> value = strdup( pRetBuffer ); if ( pszDefault ) ini_cache -> default_value = strdup( pszDefault ); ini_cache -> buffer_size = nRetBuffer; ini_cache -> ret_value = ret; config_mode = __get_config_mode(); ini_cache -> config_mode = config_mode; ini_cache -> timestamp = tstamp; ini_cache -> next = ini_cache_head; ini_cache_head = ini_cache; return 0; } /* * wrappers to provide therad safety */ static int check_ini_cache( int *ret, LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszDefault, LPSTR pRetBuffer, int nRetBuffer, LPCSTR pszFileName ) { int rval; mutex_entry( &mutex_ini ); rval = _check_ini_cache( ret, pszSection, pszEntry, pszDefault, pRetBuffer, nRetBuffer, pszFileName ); mutex_exit( &mutex_ini ); return rval; } static int save_ini_cache( int ret, LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszDefault, LPSTR pRetBuffer, int nRetBuffer, LPCSTR pszFileName ) { int rval, cval; mutex_entry( &mutex_ini ); /* * check its not been inserted since the last check */ if ( !_check_ini_cache( &cval, pszSection, pszEntry, pszDefault, pRetBuffer, nRetBuffer, pszFileName )) { rval = _save_ini_cache( ret, pszSection, pszEntry, pszDefault, pRetBuffer, nRetBuffer, pszFileName ); } mutex_exit( &mutex_ini ); return rval; } #else static int check_ini_cache( int *ret, LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszDefault, LPSTR pRetBuffer, int nRetBuffer, LPCSTR pszFileName ) { return 0; } static int save_ini_cache( int ret, LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszDefault, LPSTR pRetBuffer, int nRetBuffer, LPCSTR pszFileName ) { return 0; } #endif int SQLGetPrivateProfileString( LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszDefault, LPSTR pRetBuffer, int nRetBuffer, LPCSTR pszFileName ) { HINI hIni; int nBufPos = 0; char szValue[INI_MAX_PROPERTY_VALUE+1]; char szFileName[ODBC_FILENAME_MAX+1]; UWORD nConfigMode; int ini_done = 0; int ret; inst_logClear(); if ( check_ini_cache( &ret, pszSection, pszEntry, pszDefault, pRetBuffer, nRetBuffer, pszFileName )) { return ret; } /* SANITY CHECKS */ if ( pRetBuffer == NULL || nRetBuffer < 2 ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return -1; } if ( pszSection != NULL && pszEntry != NULL && pszDefault == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "need default value - try empty string" ); return -1; } *pRetBuffer = '\0'; /***************************************************** * SOME MS CODE (ie some drivers) MAY USE THIS FUNCTION TO GET ODBCINST INFO SO... *****************************************************/ if ( pszFileName != NULL ) { if ( strstr( pszFileName, "odbcinst" ) || strstr( pszFileName, "ODBCINST" ) ) { ret = _SQLGetInstalledDrivers( pszSection, pszEntry, pszDefault, pRetBuffer, nRetBuffer ); if ( ret == -1 ) { /* try to use any default provided */ if ( pRetBuffer && nRetBuffer > 0 ) { if ( pszDefault ) { strncpy( pRetBuffer, pszDefault, nRetBuffer ); pRetBuffer[ nRetBuffer - 1 ] = '\0'; } } } else { save_ini_cache( ret, pszSection, pszEntry, pszDefault, pRetBuffer, nRetBuffer, pszFileName ); } return ret; } } /***************************************************** * GATHER ALL RELEVANT DSN INFORMATION INTO AN hIni *****************************************************/ if ( pszFileName != 0 && pszFileName[0] == '/' ) { #ifdef __OS2__ if ( iniOpen( &hIni, (char*)pszFileName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, (char*)pszFileName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_COMPONENT_NOT_FOUND, "" ); return -1; } } else { nConfigMode = __get_config_mode(); nBufPos = 0; szFileName[0] = '\0'; switch ( nConfigMode ) { case ODBC_BOTH_DSN: if ( _odbcinst_UserINI( szFileName, TRUE )) { #ifdef __OS2__ if ( iniOpen( &hIni, (char*) szFileName, "#;", '[', ']', '=', TRUE, 1L ) == INI_SUCCESS ) #else if ( iniOpen( &hIni, (char*) szFileName, "#;", '[', ']', '=', TRUE ) == INI_SUCCESS ) #endif { ini_done = 1; } } _odbcinst_SystemINI( szFileName, TRUE ); if ( !ini_done ) { #ifdef __OS2__ if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_COMPONENT_NOT_FOUND, "" ); return -1; } } else { iniAppend( hIni, szFileName ); } break; case ODBC_USER_DSN: _odbcinst_UserINI( szFileName, TRUE ); #ifdef __OS2__ if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_COMPONENT_NOT_FOUND, "" ); return -1; } break; case ODBC_SYSTEM_DSN: _odbcinst_SystemINI( szFileName, TRUE ); #ifdef __OS2__ if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_COMPONENT_NOT_FOUND, "" ); return -1; } break; default: inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "Invalid Config Mode" ); return -1; } } /***************************************************** * EXTRACT SECTIONS *****************************************************/ if ( pszSection == NULL ) { _odbcinst_GetSections( hIni, pRetBuffer, nRetBuffer, &nBufPos ); } /***************************************************** * EXTRACT ENTRIES *****************************************************/ else if ( pszEntry == NULL ) { _odbcinst_GetEntries( hIni, pszSection, pRetBuffer, nRetBuffer, &nBufPos ); } /***************************************************** * EXTRACT AN ENTRY *****************************************************/ else { if ( pszSection == NULL || pszEntry == NULL || pszDefault == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return -1; } /* TRY TO GET THE ONE ITEM MATCHING Section & Entry */ if ( iniPropertySeek( hIni, (char *)pszSection, (char *)pszEntry, "" ) != INI_SUCCESS ) { /* * (NG) this seems to be ignoring the length of pRetBuffer !!! */ /* strncpy( pRetBuffer, pszDefault, INI_MAX_PROPERTY_VALUE ); */ if ( pRetBuffer && nRetBuffer > 0 && pszDefault ) { strncpy( pRetBuffer, pszDefault, nRetBuffer ); pRetBuffer[ nRetBuffer - 1 ] = '\0'; } } else { iniValue( hIni, szValue ); if ( pRetBuffer ) { strncpy( pRetBuffer, szValue, nRetBuffer ); pRetBuffer[ nRetBuffer - 1 ] = '\0'; } nBufPos = strlen( szValue ); } } iniClose( hIni ); ret = strlen( pRetBuffer ); save_ini_cache( ret, pszSection, pszEntry, pszDefault, pRetBuffer, nRetBuffer, pszFileName ); return ret; } int INSTAPI SQLGetPrivateProfileStringW( LPCWSTR lpszSection, LPCWSTR lpszEntry, LPCWSTR lpszDefault, LPWSTR lpszRetBuffer, int cbRetBuffer, LPCWSTR lpszFilename) { int ret; char *sect; char *entry; char *def; char *buf; char *name; inst_logClear(); sect = lpszSection ? _single_string_alloc_and_copy( lpszSection ) : (char*)NULL; entry = lpszEntry ? _single_string_alloc_and_copy( lpszEntry ) : (char*)NULL; def = lpszDefault ? _single_string_alloc_and_copy( lpszDefault ) : (char*)NULL; name = lpszFilename ? _single_string_alloc_and_copy( lpszFilename ) : (char*)NULL; if ( lpszRetBuffer ) { if ( cbRetBuffer > 0 ) { buf = calloc( cbRetBuffer + 1, 1 ); } else { buf = NULL; } } else { buf = NULL; } ret = SQLGetPrivateProfileString( sect, entry, def, buf, cbRetBuffer, name ); if ( sect ) free( sect ); if ( entry ) free( entry ); if ( def ) free( def ); if ( name ) free( name ); if ( ret > 0 ) { if ( buf && lpszRetBuffer ) { _single_copy_to_wide( lpszRetBuffer, buf, ret + 1 ); } } if ( buf ) { free( buf ); } return ret; } unixODBC-2.2.14-p2/odbcinst/SQLGetTranslator.c0100644000076400007640000000221210723054571017320 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLGetTranslator( HWND hWnd, LPSTR pszName, WORD nNameMax, WORD *pnNameOut, LPSTR pszPath, WORD nPathMax, WORD *pnPathOut, DWORD *pnOption ) { inst_logClear(); return FALSE; } BOOL INSTAPI SQLGetTranslatorW (HWND hwnd, LPWSTR lpszName, WORD cbNameMax, WORD *pcbNameOut, LPWSTR lpszPath, WORD cbPathMax, WORD *pcbPathOut, DWORD *pvOption) { inst_logClear(); return FALSE; } unixODBC-2.2.14-p2/odbcinst/SQLInstallDriverEx.c0100644000076400007640000001567011057741055017623 0ustar nicknick/************************************************* * SQLInstallDriverEx * * pnUsageCount UsageCount is incremented and decremented * only in this lib. This is done whenever * a request is made to install or remove * a driver. * This differs slightly from the MS spec. * see UsageCount entries in odbcinst.ini * * pszPathOut This lacks some smarts. I will pass pszPathIn * back here or, if pszPathIn=NULL, I will default * to /usr/lib * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLInstallDriverEx( LPCSTR pszDriver, LPCSTR pszPathIn, LPSTR pszPathOut, WORD nPathOutMax, WORD *pnPathOut, WORD nRequest, LPDWORD pnUsageCount ) { HINI hIni; char szObjectName[INI_MAX_OBJECT_NAME+1]; char szNameValue[INI_MAX_PROPERTY_NAME+INI_MAX_PROPERTY_VALUE+3]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szValue[INI_MAX_PROPERTY_VALUE+1]; char szIniName[ INI_MAX_OBJECT_NAME + 1 ]; BOOL bInsertUsageCount; int nElement; int nUsageCount = 0; /* SHOULD GET THIS FROM SOMEWHERE ? */ char b1[ 256 ], b2[ 256 ]; inst_logClear(); /* SANITY CHECKS */ if ( pszDriver == NULL || pszPathOut == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } if ( nRequest != ODBC_INSTALL_INQUIRY && nRequest != ODBC_INSTALL_COMPLETE ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_REQUEST_TYPE, "" ); return FALSE; } memset( pszPathOut, '\0', nPathOutMax ); if ( pszPathIn ) { #ifdef VMS sprintf( szIniName, "%s:%s", pszPathIn, odbcinst_system_file_name( b2 ) ); #else sprintf( szIniName, "%s/%s", pszPathIn, odbcinst_system_file_name( b2 ) ); #endif } else { #ifdef VMS sprintf( szIniName, "%s:%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) ); #else sprintf( szIniName, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) ); #endif } /* PROCESS ODBC INST INI FILE */ #ifdef __OS2__ if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_COMPONENT_NOT_FOUND, "" ); return FALSE; } if ( iniElement( (char *)pszDriver, '\0', '\0', 0, szObjectName, INI_MAX_OBJECT_NAME ) != INI_SUCCESS ) { iniClose( hIni ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_KEYWORD_VALUE, "" ); return FALSE; } /* LETS GET ITS FILE USAGE VALUE (if any) */ if ( iniPropertySeek( hIni, szObjectName, "UsageCount", "" ) == INI_SUCCESS ) { iniValue( hIni, szValue ); nUsageCount = atoi( szValue ); } /* DOES THE OBJECT ALREADY EXIST? (also ensures that we have correct current object) */ if ( iniObjectSeek( hIni, szObjectName ) == INI_SUCCESS ) { if ( nUsageCount == 0 ) nUsageCount = 1; if ( nRequest == ODBC_INSTALL_COMPLETE ) { iniObjectDelete( hIni ); } } /* LETS ADD THE SECTION AND ENTRY */ nUsageCount++; if ( nRequest == ODBC_INSTALL_COMPLETE ) { bInsertUsageCount = TRUE; iniObjectInsert( hIni, szObjectName ); for ( nElement=1; iniElement( (char *)pszDriver, '\0', '\0', nElement, szNameValue, INI_MAX_PROPERTY_NAME+INI_MAX_PROPERTY_VALUE+3 ) == INI_SUCCESS; nElement++ ) { iniElement( szNameValue, '=', '\0', 0, szPropertyName, INI_MAX_PROPERTY_NAME ); iniElementEOL( szNameValue, '=', '\0', 1, szValue, INI_MAX_PROPERTY_VALUE ); if ( szPropertyName[0] != '\0' ) { /* OVERRIDE ANY USAGE COUNT CHANGES */ if ( strcasecmp( szPropertyName, "UsageCount" ) == 0 ) { bInsertUsageCount = FALSE; sprintf( szValue, "%d", nUsageCount ); } iniPropertyInsert( hIni, szPropertyName, szValue ); } else { iniClose( hIni ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_KEYWORD_VALUE, "" ); return FALSE; } } /* for */ if ( bInsertUsageCount ) { /* LETS INSERT USAGE COUNT */ sprintf( szValue, "%d", nUsageCount ); iniPropertyInsert( hIni, "UsageCount", szValue ); } if ( iniCommit( hIni ) != INI_SUCCESS ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_PATH, "" ); iniClose( hIni ); return FALSE; } } iniClose( hIni ); /* OK, SO WHATS LEFT? */ if ( pszPathIn == NULL ) { if ( pszPathOut ) { if ( strlen( odbcinst_system_file_path( b1 )) < nPathOutMax ) { strcpy( pszPathOut, odbcinst_system_file_path( b1 )); } else { strncpy( pszPathOut, odbcinst_system_file_path( b1 ), nPathOutMax ); pszPathOut[ nPathOutMax - 1 ] = '\0'; } } } else { if ( pszPathOut ) { if ( strlen( pszPathIn ) < nPathOutMax ) { strcpy( pszPathOut, pszPathIn ); } else { strncpy( pszPathOut, pszPathIn, nPathOutMax ); pszPathOut[ nPathOutMax - 1 ] = '\0'; } } } if ( pnPathOut != NULL ) { if ( pszPathIn == NULL ) { *pnPathOut = strlen( odbcinst_system_file_path( b1 )); } else { *pnPathOut = strlen( pszPathIn ); } } if ( pnUsageCount != NULL ) { *pnUsageCount = nUsageCount; } return TRUE; } BOOL INSTAPI SQLInstallDriverExW(LPCWSTR lpszDriver, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount) { char *drv; char *pth; char *pout; WORD len; BOOL ret; inst_logClear(); drv = lpszDriver ? _multi_string_alloc_and_copy( lpszDriver ) : (char*)NULL; pth = lpszPathIn ? _single_string_alloc_and_copy( lpszPathIn ) : (char*)NULL; if ( lpszPathOut ) { if ( cbPathOutMax > 0 ) { pout = calloc( cbPathOutMax + 1, 1 ); } else { pout = NULL; } } else { pout = NULL; } ret = SQLInstallDriverEx( drv, pth, pout, cbPathOutMax, &len, fRequest, lpdwUsageCount ); if ( ret ) { if ( pout && lpszPathOut ) { _single_copy_to_wide( lpszPathOut, pout, len + 1 ); } } if ( pcbPathOut ) { *pcbPathOut = len; } if ( drv ) free( drv ); if ( pth ) free( pth ); if ( pout ) free( pout ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLInstallDriverManager.c0100644000076400007640000000301411057741114020602 0ustar nicknick/************************************************* * SQLInstallDriverManager * * I return the default dir for core components.. but * thats it. * This may differ slightly from the spec. * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLInstallDriverManager( LPSTR pszPath, WORD nPathMax, WORD *pnPathOut ) { char szIniName[ INI_MAX_OBJECT_NAME + 1 ]; char b1[ 256 ]; inst_logClear(); /* SANITY CHECKS */ if ( pszPath == NULL || nPathMax < 2 ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return 0; } sprintf( szIniName, "%s", odbcinst_system_file_path( b1 ) ); /* DO SOMETHING */ strncpy( pszPath, szIniName, nPathMax ); if ( pnPathOut != NULL ) *pnPathOut = strlen( pszPath ); return TRUE; } BOOL INSTAPI SQLInstallDriverManagerW (LPWSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut) { char *path; BOOL ret; inst_logClear(); path = calloc( cbPathMax, 1 ); ret = SQLInstallDriverManager( path, cbPathMax, pcbPathOut ); if ( ret ) { _single_string_copy_to_wide( lpszPath, path, cbPathMax ); } free( path ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLInstallTranslatorEx.c0100644000076400007640000000207110723054571020507 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLInstallTranslatorEx( LPCSTR pszTranslator, LPCSTR pszPathIn, LPSTR pszPathOut, WORD nPathOutMax, WORD *pnPathOut, WORD nRequest, LPDWORD pnUsageCount ) { inst_logClear(); return FALSE; } BOOL INSTAPI SQLInstallTranslatorExW(LPCWSTR lpszTranslator, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount) { inst_logClear(); return FALSE; } unixODBC-2.2.14-p2/odbcinst/SQLInstallerError.c0100644000076400007640000001451710723054571017511 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include /*! * \brief Standard installer error. */ typedef struct tODBCINSTErrorMsg { int nCode; /*!< error code */ char * szMsg; /*!< error text */ } ODBCINSTErrorMsg; /*! * \brief A lookup for all standard installer (odbcinst) error codes and * corresponding message text. * * An odd thing that we do here is that we assume the values of error codes * (ODBC_ERROR_GENERAL_ERR, ODBC_ERROR_INVALID_BUFF_LEN, etc) are in the same * sequence we have layed out here... ascending order starting at 1. We then * can index into here using the standard error code and get the standard error * text. This is why we have 0,"Filler" in here. */ static ODBCINSTErrorMsg aODBCINSTErrorMsgs[] = { 0, "Filler", ODBC_ERROR_GENERAL_ERR, "General installer error", ODBC_ERROR_INVALID_BUFF_LEN, "Invalid buffer length", ODBC_ERROR_INVALID_HWND, "Invalid window handle", ODBC_ERROR_INVALID_STR, "Invalid string", ODBC_ERROR_INVALID_REQUEST_TYPE, "Invalid type of request", ODBC_ERROR_COMPONENT_NOT_FOUND, "Unable to find component name", ODBC_ERROR_INVALID_NAME, "Invalid driver or translator name", ODBC_ERROR_INVALID_KEYWORD_VALUE, "Invalid keyword-value pairs", ODBC_ERROR_INVALID_DSN, "Invalid DSN", ODBC_ERROR_INVALID_INF, "Invalid INF", ODBC_ERROR_REQUEST_FAILED, "General error request failed", ODBC_ERROR_INVALID_PATH, "Invalid install path", ODBC_ERROR_LOAD_LIB_FAILED, "Could not load the driver or translator setup library", ODBC_ERROR_INVALID_PARAM_SEQUENCE, "Invalid parameter sequence", ODBC_ERROR_INVALID_LOG_FILE, "INvalid log file", ODBC_ERROR_USER_CANCELED, "User canceled operation", ODBC_ERROR_USAGE_UPDATE_FAILED, "Could not increment or decrement the component usage count", ODBC_ERROR_CREATE_DSN_FAILED, "Could not create the requested DSN", ODBC_ERROR_WRITING_SYSINFO_FAILED, "Error writing sysinfo", ODBC_ERROR_REMOVE_DSN_FAILED, "Removing DSN failed", ODBC_ERROR_OUT_OF_MEM, "Out of memory", ODBC_ERROR_OUTPUT_STRING_TRUNCATED, "String right truncated" }; /*! * \brief Returns error information from odbcinst. * * All calls to odbcinst, except SQLInstallerError and SQLPostInstallerError, may * post/log messages. An application checks the return value of a call and then * calls SQLInstallerError, as needed, to get any error information. * * All calls to odbcinst, except SQLInstallerError and SQLPostInstallerError, will * start by clearing out existing messages. * * \param nError Input. Messages are enumerated starting with 1 as the oldest. The * ODBC specification states that there are a max 8 messages stored at * any time but unixODBC may provide more than that. * \param pnErrorCode Output. The odbcinst error code as per the ODBC specification. * \param pszErrorMsg Output. The error text. In general this is the error text from * the ODBC specification but unixODBC may provide an alternate, more * meaningfull text. * \param nErrorMsgMax Input. Max chars which can be returned in pszErrorMsg. * \param pnErrorMsg Output. strlen of error text available to be returned. * * \return RETCODE * \retval SQL_NO_DATA No data to be returned for nError. * \retval SQL_ERROR Something went wrong - most likley bad args in call. * \retval SQL_SUCCESS_WITH_INFO Text was truncated. * \retval SQL_SUCCESS Error information was returned. * * \sa SQLPostInstallerError * ODBCINSTErrorMsg */ RETCODE SQLInstallerError( WORD nError, DWORD *pnErrorCode, LPSTR pszErrorMsg, WORD nErrorMsgMax, WORD *pnErrorMsg ) { HLOGMSG hLogMsg = NULL; WORD nErrorMsg = 0; char * pszText = NULL; /* these are mandatory so... */ if ( pnErrorCode == NULL || pszErrorMsg == NULL ) return SQL_ERROR; /* this is optional so... */ if ( !nErrorMsg ) pnErrorMsg = &nErrorMsg; /* get our message */ if ( inst_logPeekMsg( nError, &hLogMsg ) != LOG_SUCCESS ) return SQL_NO_DATA; /* return code */ *pnErrorCode = hLogMsg->nCode; /* any custom message has precedence over the standard messages since its probably more meaningfull */ if ( *(hLogMsg->pszMessage) ) pszText = hLogMsg->pszMessage; else pszText = aODBCINSTErrorMsgs[hLogMsg->nCode].szMsg; /* how many chars in error text? */ *pnErrorMsg = strlen( pszText ); /* are we going to have to truncate the text due to lack of buffer space? */ if ( *pnErrorMsg > nErrorMsgMax ) { strncpy( pszErrorMsg, pszText, nErrorMsgMax ); pszErrorMsg[ nErrorMsgMax ] = '\0'; return SQL_SUCCESS_WITH_INFO; } /* success without further complications :) */ strcpy( pszErrorMsg, pszText ); return SQL_SUCCESS; } /*! * \brief A wide char version of SQLInstallerError. * * \sa SQLInstallerError */ SQLRETURN INSTAPI SQLInstallerErrorW(WORD iError, DWORD *pfErrorCode, LPWSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD *pcbErrorMsg) { char *msg; SQLRETURN ret; WORD len; if ( lpszErrorMsg ) { if ( cbErrorMsgMax > 0 ) { msg = calloc( cbErrorMsgMax + 1, 1 ); } else { msg = NULL; } } else { msg = NULL; } ret = SQLInstallerError( iError, pfErrorCode, msg, cbErrorMsgMax, &len ); if ( ret == SQL_SUCCESS ) { if ( pcbErrorMsg ) *pcbErrorMsg = len; if ( msg && lpszErrorMsg ) { _single_copy_to_wide( lpszErrorMsg, msg, len + 1 ); } } else if ( ret == SQL_SUCCESS_WITH_INFO ) { if ( pcbErrorMsg ) *pcbErrorMsg = len; if ( msg && lpszErrorMsg ) { _single_copy_to_wide( lpszErrorMsg, msg, cbErrorMsgMax ); } } return ret; } unixODBC-2.2.14-p2/odbcinst/SQLManageDataSources.c0100644000076400007640000001412311057736764020075 0ustar nicknick/************************************************** * SQLManageDataSources * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include /*! * \brief Get the short name of the UI plugin. * * The short name is the file name without path or file extension. * * We silently prepend "lib" here as well. * * \param pszName Place to put short name. Should be FILENAME_MAX bytes. * \param pszUI Our generic window handle. * * \return char* pszName returned for convenience. */ char *_getUIPluginName( char *pszName, char *pszUI ) { *pszName = '\0'; /* is it being provided by caller? */ if ( *pszUI ) { sprintf( pszName, "lib%s", pszUI ); return pszName; } /* is it being provided by env var? */ { char *pEnvVar = getenv( "ODBCINSTUI" ); if ( pEnvVar ) { sprintf( pszName, "lib%s", pEnvVar ); return pszName; } } /* is it being provided by odbcinst.ini? */ { char sz[FILENAME_MAX]; *sz='\0'; SQLGetPrivateProfileString( "ODBC", "ODBCINSTUI", "", sz, FILENAME_MAX, "odbcinst.ini" ); if ( *sz ) { sprintf( pszName, "lib%s", sz ); return pszName; } } /* default to qt3 */ strcpy( pszName, "libodbcinstQ" ); return pszName; } /*! * \brief Append the file extension used by the OS for plugins. * * We use SHLIBEXT which is picked up at configure/build time. * * \param pszNameAndExtension Output. Needs to be FILENAME_MAX bytes. * \param pszName Input. * * \return char* pszNameAndExtension returned for convenience. */ char *_appendUIPluginExtension( char *pszNameAndExtension, char *pszName ) { if ( strlen( SHLIBEXT ) > 0 ) sprintf( pszNameAndExtension, "%s%s", pszName, SHLIBEXT ); else sprintf( pszNameAndExtension, "%s.so", pszName ); return pszName; } /*! * \brief Prepends the path used for the plugins. * * We use DEFLIB_PATH and if it is not available... * path may not get prepended. * * \param pszPathAndName Output. Needs to be FILENAME_MAX bytes. * \param pszName Input. * * \return char* pszPathAndName is returned for convenience. */ char *_prependUIPluginPath( char *pszPathAndName, char *pszName ) { if ( strlen( DEFLIB_PATH ) > 0 ) sprintf( pszPathAndName, "%s/%s", DEFLIB_PATH, pszName ); else sprintf( pszPathAndName, "%s", pszName ); return pszPathAndName; } /*! * \brief UI to manage most ODBC system information. * * This calls into the UI plugin library to do our work for us. The caller can provide * the name (base name) of the library or let us determine which library to use. * See \sa _getUIPluginName for details on how the choice is made. * * \param hWnd Input. Parent window handle. This is HWND as per the ODBC * specification but in unixODBC we use a generic window * handle. Caller must cast a HODBCINSTWND to HWND at call. * * \return BOOL * * \sa ODBCINSTWND */ BOOL SQLManageDataSources( HWND hWnd ) { HODBCINSTWND hODBCInstWnd = (HODBCINSTWND)hWnd; char szName[FILENAME_MAX]; char szNameAndExtension[FILENAME_MAX]; char szPathAndName[FILENAME_MAX]; void * hDLL; BOOL (*pSQLManageDataSources)(HWND); inst_logClear(); /* ODBC specification states that hWnd is mandatory. */ if ( !hWnd ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_HWND, "No hWnd" ); return FALSE; } /* initialize libtool */ if ( lt_dlinit() ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "lt_dlinit() failed" ); return FALSE; } /* get plugin name */ _appendUIPluginExtension( szNameAndExtension, _getUIPluginName( szName, hODBCInstWnd->szUI ) ); /* lets try loading the plugin using an implicit path */ hDLL = lt_dlopen( szNameAndExtension ); if ( hDLL ) { /* change the name (SQLManageDataSources to ODBCManageDataSources) to prevent us from calling ourself */ pSQLManageDataSources = (BOOL (*)(HWND))lt_dlsym( hDLL, "ODBCManageDataSources" ); if ( pSQLManageDataSources ) return pSQLManageDataSources( ( *(hODBCInstWnd->szUI) ? hODBCInstWnd->hWnd : NULL ) ); else inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, (char*)lt_dlerror() ); } else { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_WARNING, ODBC_ERROR_GENERAL_ERR, (char*)lt_dlerror() ); /* try with explicit path */ _prependUIPluginPath( szPathAndName, szNameAndExtension ); hDLL = lt_dlopen( szPathAndName ); if ( hDLL ) { /* change the name (SQLManageDataSources to ODBCManageDataSources) to prevent us from calling ourself */ /* its only safe to use hWnd if szUI was specified by the caller */ pSQLManageDataSources = (BOOL (*)(HWND))lt_dlsym( hDLL, "ODBCManageDataSources" ); if ( pSQLManageDataSources ) return pSQLManageDataSources( ( *(hODBCInstWnd->szUI) ? hODBCInstWnd->hWnd : NULL ) ); else inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, (char*)lt_dlerror() ); } else inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, (char*)lt_dlerror() ); } /* report failure to caller */ inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "Failed to load/use a UI plugin." ); return FALSE; } unixODBC-2.2.14-p2/odbcinst/SQLPostInstallerError.c0100644000076400007640000000234510437351747020362 0ustar nicknick/********************************************** * SQLPostInstallerError * * Drivers can call me to let me know there was a * problem. This can be retreived by the app using * SQLInstallerError. * * Does not currently use szErrorMsg due to extreme * limitations of logging here. This should be corrected. * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include RETCODE SQLPostInstallerError( DWORD nErrorCode, LPCSTR szErrorMsg ) { if ( nErrorCode > ODBC_ERROR_OUTPUT_STRING_TRUNCATED ) return SQL_ERROR; inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, nErrorCode, (char *)szErrorMsg ); return SQL_SUCCESS; } SQLRETURN INSTAPI SQLPostInstallerErrorW(DWORD dwErrorCode, LPCWSTR lpszErrorMsg) { char *msg = lpszErrorMsg ? _single_string_alloc_and_copy( lpszErrorMsg ) : (char*)NULL; SQLRETURN ret; ret = SQLPostInstallerError( dwErrorCode, msg ); if ( msg ) free( msg ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLReadFileDSN.c0100644000076400007640000001664611025444222016557 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include static void GetEntries( HINI hIni, LPCSTR pszSection, LPSTR pRetBuffer, int nRetBuffer ) { char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szValueName[INI_MAX_PROPERTY_NAME+1]; /* COLLECT ALL ENTRIES FOR THE GIVEN SECTION */ iniObjectSeek( hIni, (char *)pszSection ); iniPropertyFirst( hIni ); *pRetBuffer = '\0'; while ( iniPropertyEOL( hIni ) != TRUE ) { iniProperty( hIni, szPropertyName ); iniValue( hIni, szValueName ); if ( strlen( pRetBuffer ) + strlen( szPropertyName ) < nRetBuffer ) { strcat( pRetBuffer, szPropertyName ); if ( strlen( pRetBuffer ) + 1 < nRetBuffer ) { strcat( pRetBuffer, "=" ); if ( strlen( pRetBuffer ) + strlen( szValueName ) < nRetBuffer ) { strcat( pRetBuffer, szValueName ); if ( strlen( pRetBuffer ) + 1 < nRetBuffer ) { strcat( pRetBuffer, ";" ); } } } } iniPropertyNext( hIni ); } } static void GetSections( HINI hIni, LPSTR pRetBuffer, int nRetBuffer ) { int nStrToCopy; char szObjectName[INI_MAX_OBJECT_NAME+1]; *pRetBuffer = '\0'; /* JUST COLLECT SECTION NAMES */ iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) != TRUE ) { iniObject( hIni, szObjectName ); if ( strcasecmp( szObjectName, "ODBC Data Sources" ) != 0 ) { if ( strlen( pRetBuffer ) + strlen( szObjectName ) + 1 < nRetBuffer ) { strcat( pRetBuffer, szObjectName ); strcat( pRetBuffer, ";" ); } } iniObjectNext( hIni ); } } BOOL SQLReadFileDSN( LPCSTR pszFileName, LPCSTR pszAppName, LPCSTR pszKeyName, LPSTR pszString, WORD nString, WORD *pnString ) { HINI hIni; int nBufPos = 0; char szValue[INI_MAX_PROPERTY_VALUE+1]; char szFileName[ODBC_FILENAME_MAX+1]; UWORD nConfigMode; int ini_done = 0; inst_logClear(); /* SANITY CHECKS */ if ( pszString == NULL || nString < 1 ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_BUFF_LEN, "" ); return FALSE; } if ( pszFileName == NULL && pszAppName == NULL && pszKeyName == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } if ( pszAppName == NULL && pszKeyName != NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_REQUEST_TYPE, "" ); return FALSE; } *pszString = '\0'; /***************************************************** * GATHER ALL RELEVANT DSN INFORMATION INTO AN hIni *****************************************************/ if ( pszFileName && pszFileName[0] == '/' ) { strcpy( szFileName, pszFileName ); if ( strlen( szFileName ) < 4 || strcmp( szFileName + strlen( szFileName ) - 4, ".dsn" )) { strcat( szFileName, ".dsn" ); } /* on OS/2 the file DSN is a text file */ #ifdef __OS2__ if ( iniOpen( &hIni, (char*)szFileName, "#;", '[', ']', '=', TRUE, 0L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, (char*)szFileName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_PATH, "" ); return FALSE; } } else if ( pszFileName ) { char szPath[ODBC_FILENAME_MAX+1]; *szPath = '\0'; _odbcinst_FileINI( szPath ); sprintf( szFileName, "%s/%s", szPath, pszFileName ); if ( strlen( szFileName ) < 4 || strcmp( szFileName + strlen( szFileName ) - 4, ".dsn" )) { strcat( szFileName, ".dsn" ); } /* on OS/2 the file DSN is a text file */ #ifdef __OS2__ if ( iniOpen( &hIni, (char*) szFileName, "#;", '[', ']', '=', TRUE, 0L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, (char*) szFileName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_PATH, "" ); return FALSE; } } if ( pszAppName == NULL && pszKeyName == NULL ) { GetSections( hIni, pszString, nString ); } else if ( pszAppName != NULL && pszKeyName == NULL ) { GetEntries( hIni, pszAppName, pszString, nString ); } else { /* TRY TO GET THE ONE ITEM MATCHING Section & Entry */ if ( iniPropertySeek( hIni, (char *)pszAppName, (char *)pszKeyName, "" ) != INI_SUCCESS ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" ); return FALSE; } else { iniValue( hIni, szValue ); strncpy( pszString, szValue, nString ); pszString[ nString - 1 ] = '\0'; nBufPos = strlen( szValue ); } } if ( pszFileName ) { iniClose( hIni ); } if ( pnString ) { *pnString = strlen( pszString ); } return TRUE; } BOOL INSTAPI SQLReadFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName, LPCWSTR lpszKeyName, LPWSTR lpszString, WORD cbString, WORD *pcbString) { char *file; char *app; char *key; char *str; WORD len; BOOL ret; inst_logClear(); file = lpszFileName ? _single_string_alloc_and_copy( lpszFileName ) : (char*)NULL; app = lpszAppName ? _single_string_alloc_and_copy( lpszAppName ) : (char*)NULL; key = lpszKeyName ? _single_string_alloc_and_copy( lpszKeyName ) : (char*)NULL; if ( lpszString ) { if ( cbString > 0 ) { str = calloc( cbString + 1, 1 ); } else { str = NULL; } } else { str = NULL; } ret = SQLReadFileDSN( file, app, key, str, cbString, &len ); if ( ret ) { if ( str && lpszString ) { _single_copy_to_wide( lpszString, str, len + 1 ); } } if ( file ) free( file ); if ( app ) free( app ); if ( key ) free( key ); if ( str ) free( str ); if ( pcbString ) *pcbString = len; return ret; } unixODBC-2.2.14-p2/odbcinst/SQLRemoveDSNFromIni.c0100644000076400007640000000372010723054571017622 0ustar nicknick/******************************************** * SQLRemoveDSNFromIni * * Use the current Config Mode to determine the * odbc.ini we will use. * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLRemoveDSNFromIni(LPCSTR pszDSN ) { HINI hIni; char szINIFileName[ODBC_FILENAME_MAX+1]; inst_logClear(); /* SANITY CHECKS */ if ( pszDSN == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_DSN, "" ); return FALSE; } if ( pszDSN[0] == '\0' ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_DSN, "" ); return FALSE; } /* GET ODBC INI FILE NAME */ if ( _odbcinst_ConfigModeINI( szINIFileName ) == FALSE ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_COMPONENT_NOT_FOUND, "" ); return FALSE; } #ifdef __OS2__ if ( iniOpen( &hIni, szINIFileName, "#;", '[', ']', '=', FALSE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szINIFileName, "#;", '[', ']', '=', FALSE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_COMPONENT_NOT_FOUND, "" ); return FALSE; } if ( iniObjectSeek( hIni, (char *)pszDSN ) == INI_SUCCESS ) { iniObjectDelete( hIni ); if ( iniCommit( hIni ) != INI_SUCCESS ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); iniClose( hIni ); return FALSE; } } iniClose( hIni ); return TRUE; } BOOL INSTAPI SQLRemoveDSNFromIniW(LPCWSTR lpszDSN) { char *dsn; BOOL ret; inst_logClear(); dsn = _single_string_alloc_and_copy( lpszDSN ); ret = SQLRemoveDSNFromIni( dsn ); free( dsn ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLRemoveDriver.c0100644000076400007640000000647511057741173017161 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLRemoveDriver( LPCSTR pszDriver, BOOL nRemoveDSN, LPDWORD pnUsageCount ) { HINI hODBCInstIni; HINI hODBCIni; char szValue[INI_MAX_PROPERTY_VALUE+1]; char szODBCFile[ODBC_FILENAME_MAX+1]; char szIniName[ INI_MAX_OBJECT_NAME + 1 ]; char b1[ 256 ], b2[ 256 ]; inst_logClear(); /* SANITY CHECKS */ if ( pszDriver == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_NAME, "" ); return FALSE; } if ( pszDriver[0] == '\0' ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_NAME, "" ); return FALSE; } if ( nRemoveDSN != TRUE && nRemoveDSN != FALSE ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } (*pnUsageCount) = 0; #ifdef VMS sprintf( szIniName, "%s:%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) ); #else sprintf( szIniName, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) ); #endif /* PROCESS ODBC INST INI FILE */ #ifdef __OS2__ if ( iniOpen( &hODBCInstIni, szIniName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hODBCInstIni, szIniName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_COMPONENT_NOT_FOUND, "" ); return FALSE; } /* LETS GET ITS FILE USAGE VALUE (if any) */ if ( iniPropertySeek( hODBCInstIni, (char *)pszDriver, "UsageCount", "" ) == INI_SUCCESS ) { iniValue( hODBCInstIni, szValue ); (*pnUsageCount) = atoi( szValue ); } /* DOES THE OBJECT ALREADY EXIST? (also ensures that we have correct current object) */ if ( iniObjectSeek( hODBCInstIni, (char *)pszDriver ) == INI_SUCCESS ) { if ( (*pnUsageCount) == 0 ) (*pnUsageCount) = 1; (*pnUsageCount)--; if ( (*pnUsageCount) == 0 ) { iniObjectDelete( hODBCInstIni ); if ( nRemoveDSN ) { /*********************************** * TO DO ***********************************/ } } else { if ( iniPropertySeek( hODBCInstIni, (char *)pszDriver, "UsageCount", "" ) == INI_SUCCESS ) { sprintf( szValue, "%d", (*pnUsageCount) ); iniPropertyUpdate( hODBCInstIni, "UsageCount", szValue ); } else { iniPropertyInsert( hODBCInstIni, "UsageCount", szValue ); } } if ( iniCommit( hODBCInstIni ) != INI_SUCCESS ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); iniClose( hODBCInstIni ); return FALSE; } } iniClose( hODBCInstIni ); return TRUE; } BOOL INSTAPI SQLRemoveDriverW(LPCWSTR lpszDriver, BOOL fRemoveDSN, LPDWORD lpdwUsageCount) { BOOL ret; char *drv = _single_string_alloc_and_copy( lpszDriver ); inst_logClear(); ret = SQLRemoveDriver( drv, fRemoveDSN, lpdwUsageCount ); free( drv ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLRemoveDriverManager.c0100644000076400007640000000123410723054571020436 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLRemoveDriverManager( LPDWORD pnUsageCount ) { inst_logClear(); if ( pnUsageCount == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } *pnUsageCount = 1; return TRUE; } unixODBC-2.2.14-p2/odbcinst/SQLRemoveTranslator.c0100644000076400007640000000124510723054571020043 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLRemoveTranslator( LPCSTR pszTranslator, LPDWORD pnUsageCount ) { inst_logClear(); return FALSE; } BOOL INSTAPI SQLRemoveTranslatorW(LPCWSTR lpszTranslator, LPDWORD lpdwUsageCount) { inst_logClear(); return FALSE; } unixODBC-2.2.14-p2/odbcinst/SQLSetConfigMode.c0100644000076400007640000000245210723054571017223 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com * Nick Gorham - nick@easysoft.com **************************************************/ #include #include /* * This avoids all sorts of problems with using putenv, we need to check * that drivers can see this as well though.... */ static int __config_mode = ODBC_BOTH_DSN; void __set_config_mode( int mode ) { __config_mode = mode; } int __get_config_mode( void ) { char *p; /* * if the environment var is set then it overrides the flag */ p = getenv( "ODBCSEARCH" ); if ( p ) { if ( strcmp( p, "ODBC_SYSTEM_DSN" ) == 0 ) { __config_mode = ODBC_SYSTEM_DSN; } else if ( strcmp( p, "ODBC_USER_DSN" ) == 0 ) { __config_mode = ODBC_USER_DSN; } else if ( strcmp( p, "ODBC_BOTH_DSN" ) == 0 ) { __config_mode = ODBC_BOTH_DSN; } } return __config_mode; } BOOL SQLSetConfigMode( UWORD nConfigMode ) { inst_logClear(); __set_config_mode( nConfigMode ); return TRUE; } unixODBC-2.2.14-p2/odbcinst/SQLValidDSN.c0100644000076400007640000000310310723054571016133 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include #define SQL_MAX_DSN_LENGTH 32 BOOL SQLValidDSN( LPCSTR pszDSN ) { inst_logClear(); if ( pszDSN == NULL ) return FALSE; if ( strlen( pszDSN ) < 1 || strlen( pszDSN ) > SQL_MAX_DSN_LENGTH ) return FALSE; if ( strstr( pszDSN, "[" ) != NULL ) return FALSE; if ( strstr( pszDSN, "]" ) != NULL ) return FALSE; if ( strstr( pszDSN, "{" ) != NULL ) return FALSE; if ( strstr( pszDSN, "}" ) != NULL ) return FALSE; if ( strstr( pszDSN, "(" ) != NULL ) return FALSE; if ( strstr( pszDSN, ")" ) != NULL ) return FALSE; if ( strstr( pszDSN, "," ) != NULL ) return FALSE; if ( strstr( pszDSN, ";" ) != NULL ) return FALSE; if ( strstr( pszDSN, "?" ) != NULL ) return FALSE; if ( strstr( pszDSN, "*" ) != NULL ) return FALSE; if ( strstr( pszDSN, "=" ) != NULL ) return FALSE; if ( strstr( pszDSN, "!" ) != NULL ) return FALSE; if ( strstr( pszDSN, "@" ) != NULL ) return FALSE; if ( strstr( pszDSN, "\\" ) != NULL ) return FALSE; return TRUE; } BOOL INSTAPI SQLValidDSNW(LPCWSTR lpszDSN) { char *dsn; BOOL ret; inst_logClear(); dsn = _single_string_alloc_and_copy( lpszDSN ); ret = SQLValidDSN( dsn ); free( dsn ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLWriteDSNToIni.c0100644000076400007640000000511310437351747017143 0ustar nicknick/************************************************** * SQLWriteDSNToIni * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLWriteDSNToIni( LPCSTR pszDSN, LPCSTR pszDriver ) { HINI hIni; char szFileName[ODBC_FILENAME_MAX+1]; SQLRemoveDSNFromIni( pszDSN ); /* SANITY CHECKS */ if ( pszDSN == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } if ( pszDSN[0] == '\0' ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } if ( (strcasecmp( pszDSN, "DEFAULT" ) != 0 ) && (pszDriver == NULL ) ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_NAME, "" ); return FALSE; } if ( (strcasecmp( pszDSN, "DEFAULT" ) != 0 ) && (pszDriver[0] == '\0') ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_NAME, "" ); return FALSE; } if ( SQLValidDSN( pszDSN ) == FALSE ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_DSN, "" ); return FALSE; } /* OK */ if ( _odbcinst_ConfigModeINI( szFileName ) == FALSE ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" ); return FALSE; } #ifdef __OS2__ if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" ); return FALSE; } iniObjectInsert( hIni, (char *)pszDSN ); if ( pszDriver != NULL ) { iniPropertyInsert( hIni, "Driver", (char *)pszDriver ); } if ( iniCommit( hIni ) != INI_SUCCESS ) { iniClose( hIni ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" ); return FALSE; } iniClose( hIni ); return TRUE; } BOOL INSTAPI SQLWriteDSNToIniW (LPCWSTR lpszDSN, LPCWSTR lpszDriver) { char *drv, *dsn; BOOL ret; dsn = _single_string_alloc_and_copy( lpszDSN ); drv = _single_string_alloc_and_copy( lpszDriver ); ret = SQLWriteDSNToIni( dsn, drv ); free( dsn ); free( drv ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLWriteFileDSN.c0100644000076400007640000000617511025444222016772 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLWriteFileDSN( LPCSTR pszFileName, LPCSTR pszAppName, LPCSTR pszKeyName, LPCSTR pszString ) { HINI hIni; char szFileName[ODBC_FILENAME_MAX+1]; if ( pszFileName[0] == '/' ) { strcpy( szFileName, pszFileName ); } else { char szPath[ODBC_FILENAME_MAX+1]; *szPath = '\0'; _odbcinst_FileINI( szPath ); sprintf( szFileName, "%s/%s", szPath, pszFileName ); } if ( strlen( szFileName ) < 4 || strcmp( szFileName + strlen( szFileName ) - 4, ".dsn" )) { strcat( szFileName, ".dsn" ); } #ifdef __OS2__ if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE, 0L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_PATH, "" ); return FALSE; } /* delete section */ if ( pszString == NULL && pszKeyName == NULL ) { if ( iniObjectSeek( hIni, (char *)pszAppName ) == INI_SUCCESS ) { iniObjectDelete( hIni ); } } /* delete entry */ else if ( pszString == NULL ) { if ( iniPropertySeek( hIni, (char *)pszAppName, (char *)pszKeyName, "" ) == INI_SUCCESS ) { iniPropertyDelete( hIni ); } } else { /* add section */ if ( iniObjectSeek( hIni, (char *)pszAppName ) != INI_SUCCESS ) { iniObjectInsert( hIni, (char *)pszAppName ); } /* update entry */ if ( iniPropertySeek( hIni, (char *)pszAppName, (char *)pszKeyName, "" ) == INI_SUCCESS ) { iniObjectSeek( hIni, (char *)pszAppName ); iniPropertyUpdate( hIni, (char *)pszKeyName, (char *)pszString ); } /* add entry */ else { iniObjectSeek( hIni, (char *)pszAppName ); iniPropertyInsert( hIni, (char *)pszKeyName, (char *)pszString ); } } if ( iniCommit( hIni ) != INI_SUCCESS ) { iniClose( hIni ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" ); return FALSE; } iniClose( hIni ); return TRUE; } BOOL INSTAPI SQLWriteFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName, LPCWSTR lpszKeyName, LPCWSTR lpszString) { BOOL ret; char *file; char *app; char *key; char *str; file = lpszFileName ? _single_string_alloc_and_copy( lpszFileName ) : (char*)NULL; app = lpszAppName ? _single_string_alloc_and_copy( lpszAppName ) : (char*)NULL; key = lpszKeyName ? _single_string_alloc_and_copy( lpszKeyName ) : (char*)NULL; str = lpszString ? _single_string_alloc_and_copy( lpszString ) : (char*)NULL; ret = SQLWriteFileDSN( file, app, key, str ); if ( file ) free( file ); if ( app ) free( app ); if ( key ) free( key ); if ( str ) free( str ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLWritePrivateProfileString.c0100644000076400007640000001007610723574454021702 0ustar nicknick/************************************************** * SQLWritePrivateProfileString * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL SQLWritePrivateProfileString( LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszString, LPCSTR pszFileName ) { HINI hIni; char szFileName[ODBC_FILENAME_MAX+1]; inst_logClear(); /* SANITY CHECKS */ if ( pszSection == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } if ( pszSection[0] == '\0' ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } if ( pszFileName == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } /***************************************************** * SOME MS CODE (ie some drivers) MAY USE THIS FUNCTION TO WRITE ODBCINST INFO SO... *****************************************************/ if ( strstr( pszFileName, "odbcinst" ) || strstr( pszFileName, "ODBCINST" ) ) return _SQLWriteInstalledDrivers( pszSection, pszEntry, pszString ); if ( pszFileName[0] == '/' ) { strcpy( szFileName, pszFileName ); } else { if ( _odbcinst_ConfigModeINI( szFileName ) == FALSE ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" ); return FALSE; } } #ifdef __OS2__ if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" ); return FALSE; } /* delete section */ if ( pszEntry == NULL ) { if ( iniObjectSeek( hIni, (char *)pszSection ) == INI_SUCCESS ) iniObjectDelete( hIni ); } /* delete entry */ else if ( pszString == NULL ) { if ( iniPropertySeek( hIni, (char *)pszSection, (char *)pszEntry, "" ) == INI_SUCCESS ) { iniPropertyDelete( hIni ); } } else { /* add section */ if ( iniObjectSeek( hIni, (char *)pszSection ) != INI_SUCCESS ) iniObjectInsert( hIni, (char *)pszSection ); /* update entry */ if ( iniPropertySeek( hIni, (char *)pszSection, (char *)pszEntry, "" ) == INI_SUCCESS ) { iniObjectSeek( hIni, (char *)pszSection ); /* * Get the correct property to update */ iniPropertySeek( hIni, (char *)pszSection, (char *)pszEntry, "" ); iniPropertyUpdate( hIni, (char *)pszEntry, (char *)pszString ); } /* add entry */ else { iniObjectSeek( hIni, (char *)pszSection ); iniPropertyInsert( hIni, (char *)pszEntry, (char *)pszString ); } } if ( iniCommit( hIni ) != INI_SUCCESS ) { iniClose( hIni ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" ); return FALSE; } iniClose( hIni ); return TRUE; } BOOL INSTAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry, LPCWSTR lpszString, LPCWSTR lpszFilename) { char *sect; char *entry; char *string; char *file; BOOL ret; sect = lpszSection ? _single_string_alloc_and_copy( lpszSection ) : (char*)NULL; entry = lpszEntry ? _single_string_alloc_and_copy( lpszEntry ) : (char*)NULL; string = lpszString ? _single_string_alloc_and_copy( lpszString ) : (char*)NULL; file = lpszFilename ? _single_string_alloc_and_copy( lpszFilename ) : (char*)NULL; ret = SQLWritePrivateProfileString( sect, entry, string, file ); if ( sect ) free( sect ); if ( entry ) free( entry ); if ( string ) free( string ); if ( file ) free( file ); return ret; } unixODBC-2.2.14-p2/odbcinst/SQLInstallODBC.c0100644000076400007640000000422110723054571016567 0ustar nicknick/************************************************* * SQLInstallODBC * * Just provide stub for ODBC 2 installer functions * **************************************************/ #include BOOL INSTAPI SQLInstallODBC(HWND hwndParent, LPCSTR lpszInfFile, LPCSTR lpszSrcPath, LPCSTR lpszDrivers) { return FALSE; } BOOL INSTAPI SQLInstallDriver (LPCSTR lpszInfFile, LPCSTR lpszDriver, LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut) { return FALSE; } BOOL INSTAPI SQLInstallTranslator( LPCSTR lpszInfFile, LPCSTR pszTranslator, LPCSTR pszPathIn, LPSTR pszPathOut, WORD nPathOutMax, WORD *pnPathOut, WORD nRequest, LPDWORD pnUsageCount ) { inst_logClear(); return FALSE; } BOOL INSTAPI SQLRemoveDefaultDataSource( void ) { inst_logClear(); return SQLConfigDataSource (NULL, ODBC_REMOVE_DEFAULT_DSN, NULL, NULL); } BOOL INSTAPI SQLInstallDriverW (LPCWSTR lpszInfFile, LPCWSTR lpszDriver, LPWSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut) { return FALSE; } BOOL INSTAPI SQLInstallODBCW (HWND hwndParent, LPCWSTR lpszInfFile, LPCWSTR lpszSrcPath, LPCWSTR lpszDrivers) { return FALSE; } BOOL INSTAPI SQLInstallTranslatorW(LPCWSTR lpszInfFile, LPCWSTR lpszTranslator, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount) { inst_logClear(); return FALSE; } unixODBC-2.2.14-p2/odbcinst/_logging.c0100644000076400007640000001076311012040411015722 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: _logging.c,v 1.4 2008/05/12 13:07:21 lurcher Exp $ * * $Log: _logging.c,v $ * Revision 1.4 2008/05/12 13:07:21 lurcher * Push a couple of small changes back into CVS, ready for new release * * Revision 1.3 2008/02/15 15:47:12 lurcher * Add thread protection around ini caching * * Revision 1.2 2007/11/27 17:52:57 peteralexharvey * - changes made during QT4 implementation * * Revision 1.1.1.1 2001/10/17 16:40:30 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.1 1999/07/15 06:23:39 ngorham * * Added functions to remove the need for _init and _fini * * *********************************************************************/ #include #include #ifdef HAVE_LIBPTH #include static pth_mutex_t mutex_log = PTH_MUTEX_INIT; static int pth_init_called = 0; static int mutex_entry( void ) { if ( !pth_init_called ) { pth_init(); pth_init_called = 1; } return pth_mutex_acquire( &mutex_log, 0, NULL ); } static int mutex_exit( void ) { return pth_mutex_release( &mutex_log ); } #elif HAVE_LIBPTHREAD #include static pthread_mutex_t mutex_log = PTHREAD_MUTEX_INITIALIZER; static int mutex_entry( void ) { return pthread_mutex_lock( &mutex_log ); } static int mutex_exit( void ) { return pthread_mutex_unlock( &mutex_log ); } #elif HAVE_LIBTHREAD #include static mutex_t mutex_log; static int mutex_entry( void ) { return mutex_lock( &mutex_log ); } static int mutex_exit( void ) { return mutex_unlock( &mutex_log ); } #else #define mutex_entry() #define mutex_exit() #endif /* * I don't like these statics but not sure what else we can do... * * Indeed, access to these statics was in fact not thread safe ! * So they are now protected by mutex_log... */ static HLOG hODBCINSTLog = NULL; static int log_tried = 0; int inst_logPushMsg( char *pszModule, char *pszFunctionName, int nLine, int nSeverity, int nCode, char *pszMessage ) { int ret = LOG_ERROR; mutex_entry(); if ( !log_tried ) { long nMaxMessages = 10; /* \todo ODBC spec says 8 max. We would make it 0 (unlimited) but at the moment logPeekMsg would be slow if many messages. Revisit when opt is made to log storage. */ log_tried = 1; if ( logOpen( &hODBCINSTLog, "odbcinst", NULL, nMaxMessages ) != LOG_SUCCESS ) { hODBCINSTLog = NULL; } else { logOn( hODBCINSTLog, 1 ); } } if ( hODBCINSTLog ) { ret = logPushMsg( hODBCINSTLog, pszModule, pszFunctionName, nLine, nSeverity, nCode, pszMessage ); } mutex_exit(); return ret; } /*! * \brief Get a reference to a message in the log. * * The caller (SQLInstallerError) could call logPeekMsg directly * but we would have to extern hODBCINSTLog and I have not given * any thought to that at this time. * * \param nMsg * \param phMsg * * \return int */ int inst_logPeekMsg( long nMsg, HLOGMSG *phMsg ) { int ret = LOG_NO_DATA; mutex_entry(); if ( hODBCINSTLog ) ret = logPeekMsg( hODBCINSTLog, nMsg, phMsg ); mutex_exit(); return ret; } int inst_logClear( void ) { int ret = LOG_ERROR; mutex_entry(); if ( hODBCINSTLog ) ret = logClear( hODBCINSTLog ); mutex_exit(); return ret; } unixODBC-2.2.14-p2/odbcinst/_odbcinst_ConfigModeINI.c0100644000076400007640000000234010723054571020547 0ustar nicknick/******************************************************* * _odbcinst_ConfigModeINI * * Get first valid INI file name. If we can open it for read then we assume its valid. * 1. ODBC_SYSTEM_DSN * - /etc/odbc.ini * 2. ODBC_USER_DSN * - ODBCINI * - ~/.odbc.ini * - /home/.odbc.ini * 3. ODBC_BOTH_DSN * - ODBC_USER_DSN * - ODBC_SYSTEM_DSN * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL _odbcinst_ConfigModeINI( char *pszFileName ) { UWORD nConfigMode = __get_config_mode(); pszFileName[0] = '\0'; switch ( nConfigMode ) { case ODBC_SYSTEM_DSN: if ( !_odbcinst_SystemINI( pszFileName, TRUE ) ) return FALSE; break; case ODBC_USER_DSN: if ( !_odbcinst_UserINI( pszFileName, TRUE ) ) return FALSE; break; case ODBC_BOTH_DSN: if ( !_odbcinst_UserINI( pszFileName, TRUE ) ) { if ( !_odbcinst_SystemINI( pszFileName, TRUE ) ) return FALSE; } break; default: return FALSE; } return TRUE; } unixODBC-2.2.14-p2/odbcinst/_odbcinst_UserINI.c0100644000076400007640000000541211060006503017441 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifdef HAVE_PWD_H #include #endif #include #ifdef VMS BOOL _odbcinst_UserINI( char *pszFileName, BOOL bVerify ) { FILE *hFile; char *szEnv_INIUSER = getvmsenv("ODBCINI"); struct passwd *pPasswd = NULL; char *pHomeDir = NULL; pszFileName[0] = '\0'; if ( szEnv_INIUSER ) { strncpy( pszFileName, szEnv_INIUSER, ODBC_FILENAME_MAX ); } else { sprintf( pszFileName, "SYS$LOGIN:ODBC.INI" ); } if ( bVerify ) { hFile = uo_fopen( pszFileName, "r" ); if ( hFile ) uo_fclose( hFile ); else return FALSE; } return TRUE; } #else BOOL _odbcinst_UserINI( char *pszFileName, BOOL bVerify ) { FILE *hFile; char *szEnv_INIUSER = getenv("ODBCINI"); uid_t nUserID = getuid(); struct passwd *pPasswd = NULL; char *pHomeDir = NULL; pHomeDir = "/home"; pPasswd = (struct passwd *)getpwuid(nUserID); pszFileName[0] = '\0'; if ( pPasswd != NULL ) if ( ( char *)pPasswd->pw_dir != NULL ) pHomeDir = pPasswd->pw_dir; if ( szEnv_INIUSER ) { strncpy( pszFileName, szEnv_INIUSER, ODBC_FILENAME_MAX ); } if ( pszFileName[0] == '\0' ) { sprintf( pszFileName, "%s%s", pHomeDir, "/.odbc.ini" ); } #ifdef DHAVE_ENDPWENT /* * close the password file */ endpwent(); #endif if ( bVerify ) { /* * create it of it doesn't exist */ hFile = uo_fopen( pszFileName, "a" ); if ( hFile ) uo_fclose( hFile ); else return FALSE; } return TRUE; } #endif BOOL _odbcinst_FileINI( char *pszPath ) { char b1[ 256 ]; /* we need a viable buffer (with space for FILENAME_MAX chars)... */ if ( !pszPath ) return FALSE; /* system configured to use a special location... */ *pszPath = '\0'; SQLGetPrivateProfileString( "ODBC", "FileDSNPath", "", pszPath, FILENAME_MAX - 2, "odbcinst.ini" ); if ( *pszPath ) return TRUE; /* default location... */ sprintf( pszPath, "%s/ODBCDataSources", odbcinst_system_file_path( b1 )); return TRUE; } unixODBC-2.2.14-p2/odbcinst/_odbcinst_SystemINI.c0100644000076400007640000000654511060015317020022 0ustar nicknick/************************************************** * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include /* * Add the historic ODBCINI value, mainly for applix. */ #ifdef VMS char *odbcinst_system_file_path( char *buffer ) { char *path; if (( path = getvmsenv( "ODBCSYSINI" ))) { strcpy( buffer, path ); return buffer; } #ifdef SYSTEM_FILE_PATH else { return SYSTEM_FILE_PATH; } #else else { return "ODBC_LIBDIR:"; } #endif } char *odbcinst_system_file_name( char *buffer ) { char *path; if (( path = getvmsenv( "ODBCINSTINI" ))) { strcpy( buffer, path ); return path; } else { return "ODBCINST.INI"; } } char *odbcinst_user_file_path( char *buffer ) { return "ODBC_LIBDIR:"; } char *odbcinst_user_file_name( char *buffer ) { return "ODBCINST.INI"; } BOOL _odbcinst_SystemINI( char *pszFileName, BOOL bVerify ) { FILE *hFile; char b1[ 256 ]; sprintf( pszFileName, "%s:odbc.ini", odbcinst_system_file_path( b1 )); if ( bVerify ) { hFile = uo_fopen( pszFileName, "r" ); if ( hFile ) uo_fclose( hFile ); else return FALSE; } return TRUE; } #else char *odbcinst_system_file_name( char *buffer ) { char *path; static char save_path[ 512 ]; static int saved = 0; if ( saved ) { return save_path; } if (( path = getenv( "ODBCINSTINI" ))) { strcpy( buffer, path ); strcpy( save_path, buffer ); saved = 1; return buffer; } else { strcpy( save_path, "odbcinst.ini" ); saved = 1; return "odbcinst.ini"; } } char *odbcinst_system_file_path( char *buffer ) { char *path; static char save_path[ 512 ]; static int saved = 0; if ( saved ) { return save_path; } if (( path = getenv( "ODBCSYSINI" ))) { strcpy( buffer, path ); strcpy( save_path, buffer ); saved = 1; return buffer; } #ifdef SYSTEM_FILE_PATH else { strcpy( save_path, SYSTEM_FILE_PATH ); saved = 1; return SYSTEM_FILE_PATH; } #else else { strcpy( save_path, "/etc" ); saved = 1; return "/etc"; } #endif } char *odbcinst_user_file_name( char *buffer ) { return ".odbcinst.ini"; } char *odbcinst_user_file_path( char *buffer ) { char *path; static char save_path[ 512 ]; static int saved = 0; struct passwd *pPasswd = NULL; if ( saved ) { return save_path; } if (( path = getenv( "HOME" ))) { strcpy( buffer, path ); strcpy( save_path, buffer ); saved = 1; return buffer; } else { return "/home"; } } BOOL _odbcinst_SystemINI( char *pszFileName, BOOL bVerify ) { FILE *hFile; char b1[ 256 ]; sprintf( pszFileName, "%s/odbc.ini", odbcinst_system_file_path( b1 )); if ( bVerify ) { /* try opening for read */ hFile = uo_fopen( pszFileName, "r" ); if ( hFile ) uo_fclose( hFile ); else { /* does not exist so try creating it */ hFile = uo_fopen( pszFileName, "w" ); if ( hFile ) uo_fclose( hFile ); else return FALSE; } } return TRUE; } #endif unixODBC-2.2.14-p2/odbcinst/_odbcinst_GetSections.c0100644000076400007640000000260210007421046020413 0ustar nicknick/**************************************************** * _odbcinst_GetSections * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include int _odbcinst_GetSections( HINI hIni, LPSTR pRetBuffer, int nRetBuffer, int *pnBufPos /* SET TO 0 IF RESULT DATA IS EMPTY */ ) { char szObjectName[INI_MAX_OBJECT_NAME+1]; char *ptr; *pnBufPos = 0; *pRetBuffer = '\0'; ptr = pRetBuffer; /* JUST COLLECT SECTION NAMES */ for( iniObjectFirst( hIni ); iniObjectEOL( hIni ) != TRUE; iniObjectNext( hIni )) { iniObject( hIni, szObjectName ); if ( strcasecmp( szObjectName, "ODBC Data Sources" ) == 0 ) { continue; } else if ( *pnBufPos + 1 + strlen( szObjectName ) >= nRetBuffer ) { break; } else { strcpy( ptr, szObjectName ); ptr += strlen( ptr ) + 1; (*pnBufPos) += strlen( szObjectName ) + 1; } } /* * Add final NULL */ if ( *pnBufPos == 0 ) { ptr ++; } *ptr = '\0'; return (*pnBufPos); } unixODBC-2.2.14-p2/odbcinst/_odbcinst_GetEntries.c0100644000076400007640000000247110007421046020241 0ustar nicknick/**************************************************** * _odbcinst_GetEntries * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include int _odbcinst_GetEntries( HINI hIni, LPCSTR pszSection, LPSTR pRetBuffer, int nRetBuffer, int *pnBufPos ) { char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char *ptr; *pnBufPos = 0; *pRetBuffer = '\0'; ptr = pRetBuffer; iniObjectSeek( hIni, (char *)pszSection ); /* COLLECT ALL ENTRIES FOR THE GIVEN SECTION */ for( iniPropertyFirst( hIni ); iniPropertyEOL( hIni ) != TRUE; iniPropertyNext( hIni )) { iniProperty( hIni, szPropertyName ); if ( *pnBufPos + 1 + strlen( szPropertyName ) >= nRetBuffer ) { break; } else { strcpy( ptr, szPropertyName ); ptr += strlen( ptr ) + 1; (*pnBufPos) += strlen( szPropertyName ) + 1; } } /* * Add final NULL */ if ( *pnBufPos == 0 ) { ptr ++; } *ptr = '\0'; return (*pnBufPos); } unixODBC-2.2.14-p2/odbcinst/_SQLGetInstalledDrivers.c0100644000076400007640000001233411060210066020576 0ustar nicknick/************************************************** * _SQLGetInstalledDrivers * * Added to allow ODBC Config programs and the ODBC * driver manager to access system information without * having to worry about where it is... just like accessing * Data Source information. So no surprise... its just * like SQLGetPrivateProfileString()! * * see SQLGetPrivateProfileString to see how this is called. * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include int _SQLGetInstalledDrivers( LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszDefault, LPCSTR pRetBuffer, int nRetBuffer ) { HINI hIni; int nBufPos = 0; int nStrToCopy; char szObjectName[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szValue[INI_MAX_PROPERTY_VALUE+1]; char szIniName[ INI_MAX_OBJECT_NAME + 1 ]; char *ptr; char b1[ 256 ], b2[ 256 ]; /* SANITY CHECKS */ if ( pRetBuffer == NULL || nRetBuffer < 2 ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return -1; } /* * first try in the system odbcinst.ini */ #ifdef VMS sprintf( szIniName, "%s:%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 )); #else sprintf( szIniName, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 )); #endif /* PROCESS ODBC INI FILE */ #ifdef __OS2__ if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', 1, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', 1 ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_COMPONENT_NOT_FOUND, "" ); return -1; } /* * now try the user odbcinst.ini if it exists */ #ifdef VMS sprintf( szIniName, "%s:%s", odbcinst_user_file_path( b1 ), odbcinst_user_file_name( b2 )); #else sprintf( szIniName, "%s/%s", odbcinst_user_file_path( b1 ), odbcinst_user_file_name( b2 )); #endif /* PROCESS .ODBCINST INI FILE */ iniAppend( hIni, szIniName ); nBufPos = 0; if ( pszSection == NULL ) { ptr = (char*) pRetBuffer; *ptr = '\0'; /* JUST COLLECT SECTION NAMES */ for( iniObjectFirst( hIni ); iniObjectEOL( hIni ) != TRUE; iniObjectNext( hIni )) { iniObject( hIni, szObjectName ); if ( strcasecmp( szObjectName, "ODBC" ) == 0 ) { continue; } else if ( nBufPos + 1 + strlen( szObjectName ) >= nRetBuffer ) { break; } else { strcpy( ptr, szObjectName ); ptr += strlen( ptr ) + 1; nBufPos += strlen( szObjectName ) + 1; } } /* * Add final NULL */ if ( nBufPos == 0 ) { ptr ++; } *ptr = '\0'; } else if ( pszEntry == NULL ) { ptr = (char*) pRetBuffer; *ptr = '\0'; iniObjectSeek( hIni, (char *)pszSection ); /* COLLECT ALL ENTRIES FOR THE GIVEN SECTION */ for( iniPropertyFirst( hIni ); iniPropertyEOL( hIni ) != TRUE; iniPropertyNext( hIni )) { iniProperty( hIni, szPropertyName ); if ( nBufPos + 1 + strlen( szPropertyName ) >= nRetBuffer ) { break; } else { strcpy( ptr, szPropertyName ); ptr += strlen( ptr ) + 1; nBufPos += strlen( szPropertyName ) + 1; } } /* * Add final NULL */ if ( nBufPos == 0 ) { ptr ++; } } else { /* TRY TO GET THE ONE ITEM MATCHING Section & Entry */ if ( iniPropertySeek( hIni, (char *)pszSection, (char *)pszEntry, "" ) != INI_SUCCESS ) { /* try to use any default provided */ if ( pRetBuffer && nRetBuffer > 0 ) { if ( pszDefault ) { strncpy( (char *)pRetBuffer, pszDefault, nRetBuffer ); ((char*)pRetBuffer)[ nRetBuffer - 1 ] = '\0'; } } } else { iniValue( hIni, szValue ); nStrToCopy = strlen( szValue ) + 1; /* factor NULL terminator for string */ if ( nBufPos + nStrToCopy + 1 > nRetBuffer ) /* factor NULL terminator for buffer */ nStrToCopy = nRetBuffer - nBufPos - 2; strncpy( (char *)&(pRetBuffer[nBufPos]), szValue, nStrToCopy ); nBufPos += nStrToCopy; /* * length doesn't include NULL */ nBufPos--; } } /* CLOSE */ iniClose( hIni ); return nBufPos; } unixODBC-2.2.14-p2/odbcinst/_SQLWriteInstalledDrivers.c0100644000076400007640000000545411057753062021174 0ustar nicknick/************************************************** * _SQLWriteInstalledDrivers * * Added to allow ODBC Config programs and the iODBC * driver manager to access system information without * having to worry about where it is... just like accessing * Data Source information. So no surprise... its just * like SQLWritePrivateProfileString()! ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include BOOL _SQLWriteInstalledDrivers( LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszString ) { HINI hIni; char szIniName[ INI_MAX_OBJECT_NAME + 1 ]; char b1[ 256 ], b2[ 256 ]; /* SANITY CHECKS */ if ( pszSection == NULL ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } if ( pszSection[0] == '\0' ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_GENERAL_ERR, "" ); return FALSE; } /* OK */ #ifdef VMS sprintf( szIniName, "%s:%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) ); #else sprintf( szIniName, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) ); #endif #ifdef __OS2__ if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', TRUE, 1L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS ) #endif { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" ); return FALSE; } /* delete section */ if ( pszEntry == NULL ) { if ( iniObjectSeek( hIni, (char *)pszSection ) == INI_SUCCESS ) iniObjectDelete( hIni ); } /* delete entry */ else if ( pszString == NULL ) { if ( iniPropertySeek( hIni, (char *)pszSection, (char *)pszEntry, "" ) == INI_SUCCESS ) iniPropertyDelete( hIni ); } else { /* add section */ if ( iniObjectSeek( hIni, (char *)pszSection ) != INI_SUCCESS ) { iniObjectInsert( hIni, (char *)pszSection ); } /* update entry */ if ( iniPropertySeek( hIni, (char *)pszSection, (char *)pszEntry, "" ) == INI_SUCCESS ) { /* iniObjectSeek( hIni, (char *)pszSection ); */ iniPropertyUpdate( hIni, (char *)pszEntry, (char *)pszString ); } /* add entry */ else { iniObjectSeek( hIni, (char *)pszSection ); iniPropertyInsert( hIni, (char *)pszEntry, (char *)pszString ); } } if ( iniCommit( hIni ) != INI_SUCCESS ) { iniClose( hIni ); inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" ); return FALSE; } iniClose( hIni ); return TRUE; } unixODBC-2.2.14-p2/odbcinst/odbcinst.exp0100644000076400007640000000255311060015313016320 0ustar nicknickSQLInstallODBC SQLManageDataSources SQLCreateDataSource SQLGetTranslator SQLInstallDriver SQLInstallDriverManager SQLGetInstalledDrivers SQLGetAvailableDrivers SQLConfigDataSource SQLRemoveDefaultDataSource SQLWriteDSNToIni SQLRemoveDSNFromIni SQLValidDSN SQLWritePrivateProfileString SQLGetPrivateProfileString SQLRemoveDriverManager SQLInstallTranslator SQLRemoveTranslator SQLRemoveDriver SQLConfigDriver SQLInstallerError SQLPostInstallerError SQLWriteFileDSN SQLReadFileDSN SQLInstallDriverEx SQLInstallTranslatorEx SQLGetConfigMode SQLSetConfigMode SQLInstallODBCW SQLCreateDataSourceW SQLGetTranslatorW SQLInstallDriverW SQLInstallDriverManagerW SQLGetInstalledDriversW SQLGetAvailableDriversW SQLConfigDataSourceW SQLWriteDSNToIniW SQLRemoveDSNFromIniW SQLValidDSNW SQLWritePrivateProfileStringW SQLGetPrivateProfileStringW SQLInstallTranslatorW SQLRemoveTranslatorW SQLRemoveDriverW SQLConfigDriverW SQLInstallerErrorW SQLPostInstallerErrorW SQLReadFileDSNW SQLWriteFileDSNW SQLInstallDriverExW SQLInstallTranslatorExW ODBCINSTConstructProperties ODBCINSTSetProperty ODBCINSTDestructProperties ODBCINSTAddProperty ODBCINSTValidateProperty ODBCINSTValidateProperties odbcinst_system_file_path odbcinst_system_file_name odbcinst_user_file_path odbcinst_user_file_name _odbcinst_SystemINI _odbcinst_UserINI _odbcinst_FileINI inst_logPushMsg unixODBC-2.2.14-p2/DriverManager/0040755000076400007640000000000011150523334014723 5ustar nicknickunixODBC-2.2.14-p2/DriverManager/Makefile.am0100644000076400007640000000655011111034663016761 0ustar nicknicklib_LTLIBRARIES = libodbc.la INCLUDES = -I@top_srcdir@/include \ $(LTDLINCL) \ -DSHLIBEXT=\"@SHLIBEXT@\" \ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" \ -DSYSTEM_LIB_PATH=\"@libdir@\" \ -DUNICODE_ENCODING=\"@ICONV_UNICODE_ENCODING@\" \ -DUNIXODBC_SOURCE \ -DASCII_ENCODING=\"@ICONV_CHAR_ENCODING@\" EXTRA_DIST = \ drivermanager.h \ DriverManager.exp \ __stats.h \ drivermanager_axp.opt libodbc_la_LIBADD = \ ../lst/liblstlc.la \ ../log/libloglc.la \ ../ini/libinilc.la \ ../odbcinst/libodbcinstlc.la \ $(LIBLTDL) $(LIBADD_DL) \ $(LIBICONV) libodbc_la_LDFLAGS = \ -version-info @LIB_VERSION@ \ -no-undefined \ -export-dynamic \ -export-symbols @srcdir@/DriverManager.exp if WITHLT libodbc_la_DEPENDENCIES = $(LIBLTDL) \ ../lst/liblstlc.la \ ../log/libloglc.la \ ../ini/libinilc.la \ ../odbcinst/libodbcinstlc.la else libodbc_la_DEPENDENCIES = \ ../lst/liblstlc.la \ ../log/libloglc.la \ ../ini/libinilc.la \ ../odbcinst/libodbcinstlc.la endif libodbc_la_SOURCES = \ SQLAllocConnect.c \ SQLAllocEnv.c \ SQLAllocHandle.c \ SQLAllocHandleStd.c \ SQLAllocStmt.c \ SQLBindCol.c \ SQLBindParam.c \ SQLBindParameter.c \ SQLBrowseConnect.c \ SQLBulkOperations.c \ SQLCancel.c \ SQLCloseCursor.c \ SQLColAttribute.c \ SQLColAttributes.c \ SQLColumnPrivileges.c \ SQLColumns.c \ SQLConnect.c \ SQLCopyDesc.c \ SQLDataSources.c \ SQLDescribeCol.c \ SQLDescribeParam.c \ SQLDisconnect.c \ SQLDriverConnect.c \ SQLDrivers.c \ SQLEndTran.c \ SQLError.c \ SQLExecDirect.c \ SQLExecute.c \ SQLExtendedFetch.c \ SQLFetch.c \ SQLFetchScroll.c \ SQLForeignKeys.c \ SQLFreeConnect.c \ SQLFreeEnv.c \ SQLFreeHandle.c \ SQLFreeStmt.c \ SQLGetConnectAttr.c \ SQLGetConnectOption.c \ SQLGetCursorName.c \ SQLGetData.c \ SQLGetDescField.c \ SQLGetDescRec.c \ SQLGetDiagField.c \ SQLGetDiagRec.c \ SQLGetEnvAttr.c \ SQLGetFunctions.c \ SQLGetInfo.c \ SQLGetStmtAttr.c \ SQLGetStmtOption.c \ SQLGetTypeInfo.c \ SQLMoreResults.c \ SQLNativeSql.c \ SQLNumParams.c \ SQLNumResultCols.c \ SQLParamData.c \ SQLParamOptions.c \ SQLPrepare.c \ SQLPrimaryKeys.c \ SQLProcedureColumns.c \ SQLProcedures.c \ SQLPutData.c \ SQLRowCount.c \ SQLSetConnectAttr.c \ SQLSetConnectOption.c \ SQLSetCursorName.c \ SQLSetDescField.c \ SQLSetDescRec.c \ SQLSetEnvAttr.c \ SQLSetParam.c \ SQLSetPos.c \ SQLSetScrollOptions.c \ SQLSetStmtAttr.c \ SQLSetStmtOption.c \ SQLSpecialColumns.c \ SQLStatistics.c \ SQLTablePrivileges.c \ SQLTables.c \ SQLTransact.c \ SQLBrowseConnectW.c \ SQLColAttributeW.c \ SQLColAttributesW.c \ SQLColumnPrivilegesW.c \ SQLColumnsW.c \ SQLConnectW.c \ SQLDataSourcesW.c \ SQLDescribeColW.c \ SQLDriverConnectW.c \ SQLDriversW.c \ SQLErrorW.c \ SQLExecDirectW.c \ SQLForeignKeysW.c \ SQLGetConnectAttrW.c \ SQLGetConnectOptionW.c \ SQLGetCursorNameW.c \ SQLGetDescFieldW.c \ SQLGetDescRecW.c \ SQLGetDiagFieldW.c \ SQLGetDiagRecW.c \ SQLGetInfoW.c \ SQLGetStmtAttrW.c \ SQLGetTypeInfoW.c \ SQLNativeSqlW.c \ SQLPrepareW.c \ SQLPrimaryKeysW.c \ SQLProcedureColumnsW.c \ SQLProceduresW.c \ SQLSetConnectAttrW.c \ SQLSetConnectOptionW.c \ SQLSetCursorNameW.c \ SQLSetDescFieldW.c \ SQLSetStmtAttrW.c \ SQLSetStmtOptionW.c \ SQLSpecialColumnsW.c \ SQLStatisticsW.c \ SQLTablePrivilegesW.c \ SQLTablesW.c \ __connection.c \ __handles.c \ __info.c \ __stats.c \ __attribute.c unixODBC-2.2.14-p2/DriverManager/Makefile.in0100644000076400007640000007460611111035224016773 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DriverManager DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog \ TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = am_libodbc_la_OBJECTS = SQLAllocConnect.lo SQLAllocEnv.lo \ SQLAllocHandle.lo SQLAllocHandleStd.lo SQLAllocStmt.lo \ SQLBindCol.lo SQLBindParam.lo SQLBindParameter.lo \ SQLBrowseConnect.lo SQLBulkOperations.lo SQLCancel.lo \ SQLCloseCursor.lo SQLColAttribute.lo SQLColAttributes.lo \ SQLColumnPrivileges.lo SQLColumns.lo SQLConnect.lo \ SQLCopyDesc.lo SQLDataSources.lo SQLDescribeCol.lo \ SQLDescribeParam.lo SQLDisconnect.lo SQLDriverConnect.lo \ SQLDrivers.lo SQLEndTran.lo SQLError.lo SQLExecDirect.lo \ SQLExecute.lo SQLExtendedFetch.lo SQLFetch.lo \ SQLFetchScroll.lo SQLForeignKeys.lo SQLFreeConnect.lo \ SQLFreeEnv.lo SQLFreeHandle.lo SQLFreeStmt.lo \ SQLGetConnectAttr.lo SQLGetConnectOption.lo \ SQLGetCursorName.lo SQLGetData.lo SQLGetDescField.lo \ SQLGetDescRec.lo SQLGetDiagField.lo SQLGetDiagRec.lo \ SQLGetEnvAttr.lo SQLGetFunctions.lo SQLGetInfo.lo \ SQLGetStmtAttr.lo SQLGetStmtOption.lo SQLGetTypeInfo.lo \ SQLMoreResults.lo SQLNativeSql.lo SQLNumParams.lo \ SQLNumResultCols.lo SQLParamData.lo SQLParamOptions.lo \ SQLPrepare.lo SQLPrimaryKeys.lo SQLProcedureColumns.lo \ SQLProcedures.lo SQLPutData.lo SQLRowCount.lo \ SQLSetConnectAttr.lo SQLSetConnectOption.lo \ SQLSetCursorName.lo SQLSetDescField.lo SQLSetDescRec.lo \ SQLSetEnvAttr.lo SQLSetParam.lo SQLSetPos.lo \ SQLSetScrollOptions.lo SQLSetStmtAttr.lo SQLSetStmtOption.lo \ SQLSpecialColumns.lo SQLStatistics.lo SQLTablePrivileges.lo \ SQLTables.lo SQLTransact.lo SQLBrowseConnectW.lo \ SQLColAttributeW.lo SQLColAttributesW.lo \ SQLColumnPrivilegesW.lo SQLColumnsW.lo SQLConnectW.lo \ SQLDataSourcesW.lo SQLDescribeColW.lo SQLDriverConnectW.lo \ SQLDriversW.lo SQLErrorW.lo SQLExecDirectW.lo \ SQLForeignKeysW.lo SQLGetConnectAttrW.lo \ SQLGetConnectOptionW.lo SQLGetCursorNameW.lo \ SQLGetDescFieldW.lo SQLGetDescRecW.lo SQLGetDiagFieldW.lo \ SQLGetDiagRecW.lo SQLGetInfoW.lo SQLGetStmtAttrW.lo \ SQLGetTypeInfoW.lo SQLNativeSqlW.lo SQLPrepareW.lo \ SQLPrimaryKeysW.lo SQLProcedureColumnsW.lo SQLProceduresW.lo \ SQLSetConnectAttrW.lo SQLSetConnectOptionW.lo \ SQLSetCursorNameW.lo SQLSetDescFieldW.lo SQLSetStmtAttrW.lo \ SQLSetStmtOptionW.lo SQLSpecialColumnsW.lo SQLStatisticsW.lo \ SQLTablePrivilegesW.lo SQLTablesW.lo __connection.lo \ __handles.lo __info.lo __stats.lo __attribute.lo libodbc_la_OBJECTS = $(am_libodbc_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbc_la_SOURCES) DIST_SOURCES = $(libodbc_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbc.la INCLUDES = -I@top_srcdir@/include \ $(LTDLINCL) \ -DSHLIBEXT=\"@SHLIBEXT@\" \ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" \ -DSYSTEM_LIB_PATH=\"@libdir@\" \ -DUNICODE_ENCODING=\"@ICONV_UNICODE_ENCODING@\" \ -DUNIXODBC_SOURCE \ -DASCII_ENCODING=\"@ICONV_CHAR_ENCODING@\" EXTRA_DIST = \ drivermanager.h \ DriverManager.exp \ __stats.h \ drivermanager_axp.opt libodbc_la_LIBADD = \ ../lst/liblstlc.la \ ../log/libloglc.la \ ../ini/libinilc.la \ ../odbcinst/libodbcinstlc.la \ $(LIBLTDL) $(LIBADD_DL) \ $(LIBICONV) libodbc_la_LDFLAGS = \ -version-info @LIB_VERSION@ \ -no-undefined \ -export-dynamic \ -export-symbols @srcdir@/DriverManager.exp @WITHLT_FALSE@libodbc_la_DEPENDENCIES = \ @WITHLT_FALSE@ ../lst/liblstlc.la \ @WITHLT_FALSE@ ../log/libloglc.la \ @WITHLT_FALSE@ ../ini/libinilc.la \ @WITHLT_FALSE@ ../odbcinst/libodbcinstlc.la @WITHLT_TRUE@libodbc_la_DEPENDENCIES = $(LIBLTDL) \ @WITHLT_TRUE@ ../lst/liblstlc.la \ @WITHLT_TRUE@ ../log/libloglc.la \ @WITHLT_TRUE@ ../ini/libinilc.la \ @WITHLT_TRUE@ ../odbcinst/libodbcinstlc.la libodbc_la_SOURCES = \ SQLAllocConnect.c \ SQLAllocEnv.c \ SQLAllocHandle.c \ SQLAllocHandleStd.c \ SQLAllocStmt.c \ SQLBindCol.c \ SQLBindParam.c \ SQLBindParameter.c \ SQLBrowseConnect.c \ SQLBulkOperations.c \ SQLCancel.c \ SQLCloseCursor.c \ SQLColAttribute.c \ SQLColAttributes.c \ SQLColumnPrivileges.c \ SQLColumns.c \ SQLConnect.c \ SQLCopyDesc.c \ SQLDataSources.c \ SQLDescribeCol.c \ SQLDescribeParam.c \ SQLDisconnect.c \ SQLDriverConnect.c \ SQLDrivers.c \ SQLEndTran.c \ SQLError.c \ SQLExecDirect.c \ SQLExecute.c \ SQLExtendedFetch.c \ SQLFetch.c \ SQLFetchScroll.c \ SQLForeignKeys.c \ SQLFreeConnect.c \ SQLFreeEnv.c \ SQLFreeHandle.c \ SQLFreeStmt.c \ SQLGetConnectAttr.c \ SQLGetConnectOption.c \ SQLGetCursorName.c \ SQLGetData.c \ SQLGetDescField.c \ SQLGetDescRec.c \ SQLGetDiagField.c \ SQLGetDiagRec.c \ SQLGetEnvAttr.c \ SQLGetFunctions.c \ SQLGetInfo.c \ SQLGetStmtAttr.c \ SQLGetStmtOption.c \ SQLGetTypeInfo.c \ SQLMoreResults.c \ SQLNativeSql.c \ SQLNumParams.c \ SQLNumResultCols.c \ SQLParamData.c \ SQLParamOptions.c \ SQLPrepare.c \ SQLPrimaryKeys.c \ SQLProcedureColumns.c \ SQLProcedures.c \ SQLPutData.c \ SQLRowCount.c \ SQLSetConnectAttr.c \ SQLSetConnectOption.c \ SQLSetCursorName.c \ SQLSetDescField.c \ SQLSetDescRec.c \ SQLSetEnvAttr.c \ SQLSetParam.c \ SQLSetPos.c \ SQLSetScrollOptions.c \ SQLSetStmtAttr.c \ SQLSetStmtOption.c \ SQLSpecialColumns.c \ SQLStatistics.c \ SQLTablePrivileges.c \ SQLTables.c \ SQLTransact.c \ SQLBrowseConnectW.c \ SQLColAttributeW.c \ SQLColAttributesW.c \ SQLColumnPrivilegesW.c \ SQLColumnsW.c \ SQLConnectW.c \ SQLDataSourcesW.c \ SQLDescribeColW.c \ SQLDriverConnectW.c \ SQLDriversW.c \ SQLErrorW.c \ SQLExecDirectW.c \ SQLForeignKeysW.c \ SQLGetConnectAttrW.c \ SQLGetConnectOptionW.c \ SQLGetCursorNameW.c \ SQLGetDescFieldW.c \ SQLGetDescRecW.c \ SQLGetDiagFieldW.c \ SQLGetDiagRecW.c \ SQLGetInfoW.c \ SQLGetStmtAttrW.c \ SQLGetTypeInfoW.c \ SQLNativeSqlW.c \ SQLPrepareW.c \ SQLPrimaryKeysW.c \ SQLProcedureColumnsW.c \ SQLProceduresW.c \ SQLSetConnectAttrW.c \ SQLSetConnectOptionW.c \ SQLSetCursorNameW.c \ SQLSetDescFieldW.c \ SQLSetStmtAttrW.c \ SQLSetStmtOptionW.c \ SQLSpecialColumnsW.c \ SQLStatisticsW.c \ SQLTablePrivilegesW.c \ SQLTablesW.c \ __connection.c \ __handles.c \ __info.c \ __stats.c \ __attribute.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DriverManager/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DriverManager/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbc.la: $(libodbc_la_OBJECTS) $(libodbc_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbc_la_LDFLAGS) $(libodbc_la_OBJECTS) $(libodbc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocEnv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocHandleStd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindParameter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBrowseConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBrowseConnectW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBulkOperations.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCancel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCloseCursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColAttribute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColAttributeW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColAttributes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColAttributesW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColumnPrivileges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColumnPrivilegesW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColumnsW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLConnectW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCopyDesc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDataSources.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDataSourcesW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDescribeCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDescribeColW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDescribeParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDisconnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDriverConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDriverConnectW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDrivers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDriversW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLEndTran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLError.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLErrorW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExecDirect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExecDirectW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExecute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExtendedFetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFetchScroll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLForeignKeys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLForeignKeysW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeEnv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConnectAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConnectAttrW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConnectOptionW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetCursorName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetCursorNameW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDescField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDescFieldW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDescRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDescRecW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDiagField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDiagFieldW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDiagRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDiagRecW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetEnvAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetFunctions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetInfoW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetStmtAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetStmtAttrW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetStmtOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetTypeInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetTypeInfoW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLMoreResults.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNativeSql.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNativeSqlW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNumParams.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNumResultCols.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLParamData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLParamOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPrepare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPrepareW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPrimaryKeys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPrimaryKeysW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLProcedureColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLProcedureColumnsW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLProcedures.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLProceduresW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPutData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLRowCount.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetConnectAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetConnectAttrW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetConnectOptionW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetCursorName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetCursorNameW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetDescField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetDescFieldW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetDescRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetEnvAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetPos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetScrollOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetStmtAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetStmtAttrW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetStmtOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetStmtOptionW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSpecialColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSpecialColumnsW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLStatistics.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLStatisticsW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTablePrivileges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTablePrivilegesW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTables.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTablesW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTransact.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/__attribute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/__connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/__handles.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/__info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/__stats.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DriverManager/ChangeLog0100644000076400007640000000135407363332142016503 0ustar nicknick1999-05-19 Peter Harvey * ALL: Added logging for Top and Bottom of funcs... errors still need to go to log * ALL: numcols now calced for catalog funcs 1999-05-10 Peter Harvey * SQLPrepare: Code, here and elsewhere, dependent upon num result cols being known before execute has been commented out. * SQLConnect: Used to try to search-a-path for DSN but now lets odbcinst do this. 1999-05-09 Nick Gorham * ALL: Total rewrite by Nick. Has much more functionality and compliance. 1999-04-14 Peter Harvey * sqltypes.h: Changed ODBCINT64 to long long 1999-03-30 Peter Harvey * SQLDrivers.c: added unixODBC-2.2.14-p2/DriverManager/TODO0100644000076400007640000000104407363332145015420 0ustar nicknickAdd explicit descriptor allocation and release. Keep track of bound columns to check if SQLGetData is valid. (may not be posible). Pass any connect and env attr onto driver when connected. Handle Env attrs (Set/Get EnvAttr). GetDescField needs finishing. Manage file DSN's. Interface to Cursor and Translator libs. Clear errors at the start of each function. Handle SQLCopyDesc where the source and destination is on different connections. SQLBulkoperations needs some conditions testing. SQLBrowseConnect needs some conditions testing. unixODBC-2.2.14-p2/DriverManager/SQLAllocConnect.c0100644000076400007640000000553607363332143020030 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLAllocConnect.c,v 1.1.1.1 2001/10/17 16:40:03 lurcher Exp $ * * $Log: SQLAllocConnect.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:03 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.1.1.1 1999/05/29 13:41:04 sShandyb * first go at it * * Revision 1.4 1999/06/02 23:48:45 ngorham * * Added more 3-2 mapping * * * Revision 1.3 1999/06/02 20:01:00 ngorham * * Attempt to fix previous botched log message * * Revision 1.2 1999/06/02 19:57:20 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.1 1999/04/25 23:02:41 nick * Initial revision * * **********************************************************************/ #ifdef __cplusplus #error "This code must be compiled with a C compiler," #error "not a C++ one, this is due in part to Microsoft" #error "defining SQLCHAR as unsigned, this means all the" #error "standard library code confilicts." #error "" #error "Alter the compiler line in Common.mk to ecgs or" #error "gcc and remake. This will correctly compile" #error "the C++ elements" #error "" #endif #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLAllocConnect.c,v $ $Revision: 1.1.1.1 $"; SQLRETURN SQLAllocConnect( SQLHENV environment_handle, SQLHDBC *connection_handle ) { return __SQLAllocHandle( SQL_HANDLE_DBC, environment_handle, connection_handle, SQL_OV_ODBC2 ); } unixODBC-2.2.14-p2/DriverManager/SQLAllocEnv.c0100644000076400007640000000403407363332143017157 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLAllocEnv.c,v 1.1.1.1 2001/10/17 16:40:03 lurcher Exp $ * * $Log: SQLAllocEnv.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:03 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.1 1999/04/25 23:02:41 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLAllocEnv.c,v $ $Revision: 1.1.1.1 $"; SQLRETURN SQLAllocEnv( SQLHENV *environment_handle ) { return __SQLAllocHandle( SQL_HANDLE_ENV, SQL_NULL_HENV, environment_handle, SQL_OV_ODBC2 ); } unixODBC-2.2.14-p2/DriverManager/SQLAllocHandle.c0100644000076400007640000012300610731472737017632 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLAllocHandle.c,v 1.12 2007/12/17 13:13:03 lurcher Exp $ * * $Log: SQLAllocHandle.c,v $ * Revision 1.12 2007/12/17 13:13:03 lurcher * Fix a couple of descriptor typo's * * Revision 1.11 2007/02/12 11:49:34 lurcher * Add QT4 support to existing GUI parts * * Revision 1.10 2006/06/28 08:08:41 lurcher * Add timestamp with timezone to Postgres7.1 driver * * Revision 1.9 2005/11/21 17:25:43 lurcher * A few DM fixes for Oracle's ODBC driver * * Revision 1.8 2005/11/08 09:37:10 lurcher * Allow the driver and application to have different length handles * * Revision 1.7 2005/10/06 08:50:58 lurcher * Fix problem with SQLDrivers not returning first entry * * Revision 1.6 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2003/02/25 13:28:21 lurcher * * Allow errors on the drivers AllocHandle to be reported * Fix a problem that caused errors to not be reported in the log * Remove a redundant line from the spec file * * Revision 1.4 2002/12/12 18:21:21 lurcher * * Fix bug where if a SQLAllocHandle in the driver failed, the driver manager * seg faulted * * Revision 1.3 2002/08/12 13:17:52 lurcher * * Replicate the way the MS DM handles loading of driver libs, and allocating * handles in the driver. usage counting in the driver means that dlopen is * only called for the first use, and dlclose for the last. AllocHandle for * the driver environment is only called for the first time per driver * per application environment. * * Revision 1.2 2002/07/25 09:30:26 lurcher * * Additional unicode and iconv changes * * Revision 1.1.1.1 2001/10/17 16:40:03 lurcher * * First upload to SourceForge * * Revision 1.13 2001/09/27 17:05:48 nick * * Assorted fixes and tweeks * * Revision 1.12 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.11 2001/08/03 15:19:00 nick * * Add changes to set values before connect * * Revision 1.10 2001/07/31 12:03:46 nick * * Fix how the DM gets the CLI year for SQLGetInfo * Fix small bug in strncasecmp * * Revision 1.9 2001/06/04 15:24:49 nick * * Add port to MAC OSX and QT3 changes * * Revision 1.8 2001/05/15 13:33:44 jason * * Wrapped calls to stats with COLLECT_STATS * * Revision 1.7 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.6 2000/12/18 11:03:58 martin * * Add support for the collection and retrieval of handle statistics. * * Revision 1.5 2000/12/14 18:10:18 nick * * Add connection pooling * * Revision 1.4 2000/11/22 19:03:40 nick * * Fix problem with error status in SQLSpecialColumns * * Revision 1.3 2000/11/22 18:35:43 nick * * Check input handle before touching output handle * * Revision 1.2 2000/11/14 10:15:27 nick * * Add test for localtime_r * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.19 2000/06/21 11:07:35 ngorham * * Stop Errors from SQLAllocHandle being lost * * Revision 1.18 2000/05/22 17:10:34 ngorham * * Fix problems with the FetchScroll -> ExtendedFetch Mapping * * Revision 1.17 2000/05/21 21:49:18 ngorham * * Assorted fixes * * Revision 1.16 2001/04/27 01:29:35 ngorham * * Added a couple of fixes from Tim Roepken * * Revision 1.15 2000/01/03 14:24:01 ngorham * * Fix bug where a failed alloc of a statement would dump core * * Revision 1.14 2000/01/01 18:21:16 ngorham * * Fix small bug where a invalid input handle to SQLAllocHandle can cause * a seg fault. * * Revision 1.13 1999/12/01 09:20:07 ngorham * * Fix some threading problems * * Revision 1.12 1999/11/15 21:42:52 ngorham * * Remove some debug info * * Revision 1.11 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.10 1999/11/10 03:51:33 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.9 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.8 1999/10/20 23:01:41 ngorham * * Fixed problem with the connection counting * * Revision 1.7 1999/09/26 18:55:03 ngorham * * Fixed a problem where the cursor lib was being used by default * * Revision 1.6 1999/09/21 22:34:23 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/09/19 22:24:33 ngorham * * Added support for the cursor library * * Revision 1.4 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:20 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.4 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:02:41 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) #include "__stats.h" #include #endif static char const rcsid[]= "$RCSfile: SQLAllocHandle.c,v $ $Revision: 1.12 $"; /* * connection pooling stuff */ extern int pooling_enabled; /* * this is used so that it can be called without falling * fowl of any other instances in any other modules. */ SQLRETURN __SQLAllocHandle( SQLSMALLINT handle_type, SQLHANDLE input_handle, SQLHANDLE *output_handle, SQLINTEGER requested_version ) { switch( handle_type ) { case SQL_HANDLE_ENV: { DMHENV environment; char pooling_string[ 128 ]; if ( !output_handle ) return SQL_ERROR; /* * check connection pooling attributes */ SQLGetPrivateProfileString( "ODBC", "Pooling", "0", pooling_string, sizeof( pooling_string ), "ODBCINST.INI" ); if ( pooling_string[ 0 ] == '1' || toupper( pooling_string[ 0 ] ) == 'Y' || ( toupper( pooling_string[ 0 ] ) == 'O' && toupper( pooling_string[ 1 ] ) == 'N' )) { pooling_enabled = 1; } else { pooling_enabled = 0; } if ( !( environment = __alloc_env())) { *output_handle = SQL_NULL_HENV; return SQL_ERROR; } *output_handle = (SQLHANDLE) environment; /* * setup environment state */ environment -> state = STATE_E1; environment -> requested_version = requested_version; environment -> sql_driver_count = -1; /* * if SQLAllocEnv is called then it's probable that * the application wants ODBC2.X type behaviour * * In this case we don't need to set the version via * SQLSetEnvAttr() * */ environment -> connection_count = 0; return SQL_SUCCESS; } break; case SQL_HANDLE_DBC: { DMHENV environment = (DMHENV) input_handle; DMHDBC connection; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } if ( output_handle ) *output_handle = SQL_NULL_HDBC; thread_protect( SQL_HANDLE_ENV, environment ); function_entry(( void * ) input_handle ); if ( log_info.log_flag ) { /* * log that we are here */ sprintf( environment -> msg, "\n\t\tEntry:\n\t\t\tHandle Type = %d\n\t\t\tInput Handle = %p", handle_type, (void*)input_handle ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } if ( !output_handle ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY009" ); __post_internal_error( &environment -> error, ERROR_HY009, NULL, SQL_OV_ODBC3 ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } /* * check that a version has been requested */ if ( environment -> requested_version == 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &environment -> error, ERROR_HY010, NULL, SQL_OV_ODBC3 ); *output_handle = SQL_NULL_HDBC; return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } connection = __alloc_dbc(); if ( !connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY013" ); __post_internal_error( &environment -> error, ERROR_HY013, NULL, environment -> requested_version ); *output_handle = SQL_NULL_HDBC; return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } /* * sort out the states */ connection -> state = STATE_C2; if ( environment -> state == STATE_E1 ) { environment -> state = STATE_E2; } environment -> connection_count ++; connection -> environment = environment; connection -> cursors = SQL_CUR_DEFAULT; connection -> login_timeout = SQL_LOGIN_TIMEOUT_DEFAULT; connection -> login_timeout_set = 0; connection -> auto_commit = 0; connection -> auto_commit_set = 0; connection -> auto_commit = 0; connection -> auto_commit_set = 0; connection -> async_enable = 0; connection -> async_enable_set = 0; connection -> auto_ipd = 0; connection -> auto_ipd_set = 0; connection -> connection_timeout = 0; connection -> connection_timeout_set = 0; connection -> metadata_id = 0; connection -> metadata_id_set = 0; connection -> packet_size = 0; connection -> packet_size_set = 0; connection -> quite_mode = 0; connection -> quite_mode_set = 0; connection -> txn_isolation = 0; connection -> txn_isolation_set = 0; strcpy( connection -> cli_year, "1995" ); connection -> env_attribute.count = 0; connection -> env_attribute.list = NULL; connection -> dbc_attribute.count = 0; connection -> dbc_attribute.list = NULL; connection -> stmt_attribute.count = 0; connection -> stmt_attribute.list = NULL; connection -> save_attr = NULL; #ifdef HAVE_ICONV connection -> iconv_cd_uc_to_ascii = (iconv_t)-1; connection -> iconv_cd_ascii_to_uc = (iconv_t)-1; strcpy( connection -> unicode_string, DEFAULT_ICONV_ENCODING ); #endif *output_handle = (SQLHANDLE) connection; if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tExit:[SQL_SUCCESS]\n\t\t\tOutput Handle = %p", connection ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) uodbc_update_stats(environment->sh, UODBC_STATS_TYPE_HDBC, (void *)1); #endif thread_release( SQL_HANDLE_ENV, environment ); return SQL_SUCCESS; } break; case SQL_HANDLE_STMT: { SQLRETURN ret, ret1; DMHDBC connection = (DMHDBC) input_handle; DMHSTMT statement; if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } if ( output_handle ) *output_handle = SQL_NULL_HSTMT; thread_protect( SQL_HANDLE_DBC, connection ); function_entry(( void * ) input_handle ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\n\t\t\tHandle Type = %d\n\t\t\tInput Handle = %p", handle_type, (void*)input_handle ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } if ( !output_handle ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY009" ); __post_internal_error( &connection -> error, ERROR_HY009, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection , SQL_ERROR ); } if ( connection -> state == STATE_C1 || connection -> state == STATE_C2 || connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); *output_handle = SQL_NULL_HSTMT; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } statement = __alloc_stmt(); if ( !statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY013" ); __post_internal_error( &connection -> error, ERROR_HY013, NULL, connection -> environment -> requested_version ); *output_handle = SQL_NULL_HSTMT; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * pass the call on */ if ( requested_version == SQL_OV_ODBC3 ) { if ( CHECK_SQLALLOCHANDLE( connection )) { ret = SQLALLOCHANDLE( connection, SQL_HANDLE_STMT, connection -> driver_dbc, &statement -> driver_stmt, statement ); if ( !SQL_SUCCEEDED( ret )) __release_stmt( statement ); } else if ( CHECK_SQLALLOCSTMT( connection )) { ret = SQLALLOCSTMT( connection, connection -> driver_dbc, &statement -> driver_stmt, statement ); if ( !SQL_SUCCEEDED( ret )) __release_stmt( statement ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM003" ); __post_internal_error( &connection -> error, ERROR_IM003, NULL, connection -> environment -> requested_version ); __release_stmt( statement ); *output_handle = SQL_NULL_HSTMT; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { if ( CHECK_SQLALLOCSTMT( connection )) { ret = SQLALLOCSTMT( connection, connection -> driver_dbc, &statement -> driver_stmt, statement ); if ( !SQL_SUCCEEDED( ret )) __release_stmt( statement ); } else if ( CHECK_SQLALLOCHANDLE( connection )) { ret = SQLALLOCHANDLE( connection, SQL_HANDLE_STMT, connection -> driver_dbc, &statement -> driver_stmt, statement ); if ( !SQL_SUCCEEDED( ret )) __release_stmt( statement ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM003" ); __post_internal_error( &connection -> error, ERROR_IM003, NULL, connection -> environment -> requested_version ); __release_stmt( statement ); *output_handle = SQL_NULL_HSTMT; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } if ( SQL_SUCCEEDED( ret )) { /* * sort out the states */ statement -> state = STATE_S1; if ( connection -> state == STATE_C4 ) connection -> state = STATE_C5; connection -> statement_count ++; statement -> connection = connection; *output_handle = (SQLHANDLE) statement; statement -> metadata_id = SQL_FALSE; /* * if we are connected to a 3 driver then * we need to get the 4 implicit descriptors * so we know that they are valid */ if ( connection -> driver_act_ver == 3 && CHECK_SQLGETSTMTATTR( connection )) { DRV_SQLHDESC desc; /* * ARD */ ret1 = SQLGETSTMTATTR( connection, statement -> driver_stmt, SQL_ATTR_APP_ROW_DESC, &desc, sizeof( desc ), NULL ); if ( SQL_SUCCEEDED( ret1 )) { /* * allocate one of our descriptors * to wrap around this */ statement -> ard = __alloc_desc(); if ( !statement -> ard ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY013" ); __post_internal_error( &connection -> error, ERROR_HY013, NULL, connection -> environment -> requested_version ); __release_stmt( statement ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } statement -> implicit_ard = statement -> ard; statement -> ard -> implicit = 1; statement -> ard -> state = STATE_D1i; statement -> ard -> driver_desc = desc; statement -> ard -> connection = connection; } /* * APD */ ret1 = SQLGETSTMTATTR( connection, statement -> driver_stmt, SQL_ATTR_APP_PARAM_DESC, &desc, sizeof( desc ), NULL ); if ( SQL_SUCCEEDED( ret1 )) { /* * allocate one of our descriptors * to wrap around this */ statement -> apd = __alloc_desc(); if ( !statement -> apd ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY013" ); __post_internal_error( &connection -> error, ERROR_HY013, NULL, connection -> environment -> requested_version ); __release_stmt( statement ); *output_handle = SQL_NULL_HSTMT; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } statement -> implicit_apd = statement -> apd; statement -> apd -> implicit = 1; statement -> apd -> state = STATE_D1i; statement -> apd -> driver_desc = desc; statement -> apd -> connection = connection; } /* * IRD */ ret1 = SQLGETSTMTATTR( connection, statement -> driver_stmt, SQL_ATTR_IMP_ROW_DESC, &desc, sizeof( desc ), NULL ); if ( SQL_SUCCEEDED( ret1 )) { /* * allocate one of our descriptors * to wrap around this */ statement -> ird = __alloc_desc(); if ( !statement -> ird ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY013" ); __post_internal_error( &connection -> error, ERROR_HY013, NULL, connection -> environment -> requested_version ); __release_stmt( statement ); *output_handle = SQL_NULL_HSTMT; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } statement -> implicit_ird = statement -> ird; statement -> ird -> implicit = 1; statement -> ird -> state = STATE_D1i; statement -> ird -> driver_desc = desc; statement -> ird -> connection = connection; } /* * IPD */ ret1 = SQLGETSTMTATTR( connection, statement -> driver_stmt, SQL_ATTR_IMP_PARAM_DESC, &desc, sizeof( desc ), NULL ); if ( SQL_SUCCEEDED( ret1 )) { /* * allocate one of our descriptors * to wrap around this */ statement -> ipd = __alloc_desc(); if ( !statement -> ipd ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY013" ); __post_internal_error( &connection -> error, ERROR_HY013, NULL, connection -> environment -> requested_version ); *output_handle = SQL_NULL_HSTMT; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } statement -> implicit_ipd = statement -> ipd; statement -> ipd -> implicit = 1; statement -> ipd -> state = STATE_D1i; statement -> ipd -> driver_desc = desc; statement -> ipd -> connection = connection; } } /* Driver may only have unicode API's */ else if ( CHECK_SQLGETSTMTATTRW( connection )) { DRV_SQLHDESC desc; /* * ARD */ ret1 = SQLGETSTMTATTRW( connection, statement -> driver_stmt, SQL_ATTR_APP_ROW_DESC, &desc, sizeof( desc ), NULL ); if ( SQL_SUCCEEDED( ret1 )) { /* * allocate one of our descriptors * to wrap around this */ statement -> ard = __alloc_desc(); if ( !statement -> ard ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY013" ); __post_internal_error( &connection -> error, ERROR_HY013, NULL, connection -> environment -> requested_version ); __release_stmt( statement ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } statement -> implicit_ard = statement -> ard; statement -> ard -> implicit = 1; statement -> ard -> state = STATE_D1i; statement -> ard -> driver_desc = desc; statement -> ard -> connection = connection; } /* * APD */ ret1 = SQLGETSTMTATTRW( connection, statement -> driver_stmt, SQL_ATTR_APP_PARAM_DESC, &desc, sizeof( desc ), NULL ); if ( SQL_SUCCEEDED( ret1 )) { /* * allocate one of our descriptors * to wrap around this */ statement -> apd = __alloc_desc(); if ( !statement -> apd ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY013" ); __post_internal_error( &connection -> error, ERROR_HY013, NULL, connection -> environment -> requested_version ); __release_stmt( statement ); *output_handle = SQL_NULL_HSTMT; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } statement -> implicit_apd = statement -> apd; statement -> apd -> implicit = 1; statement -> apd -> state = STATE_D1i; statement -> apd -> driver_desc = desc; statement -> apd -> connection = connection; } /* * IRD */ ret1 = SQLGETSTMTATTRW( connection, statement -> driver_stmt, SQL_ATTR_IMP_ROW_DESC, &desc, sizeof( desc ), NULL ); if ( SQL_SUCCEEDED( ret1 )) { /* * allocate one of our descriptors * to wrap around this */ statement -> ird = __alloc_desc(); if ( !statement -> ird ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY013" ); __post_internal_error( &connection -> error, ERROR_HY013, NULL, connection -> environment -> requested_version ); __release_stmt( statement ); *output_handle = SQL_NULL_HSTMT; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } statement -> implicit_ird = statement -> ird; statement -> ird -> implicit = 1; statement -> ird -> state = STATE_D1i; statement -> ird -> driver_desc = desc; statement -> ird -> connection = connection; } /* * IPD */ ret1 = SQLGETSTMTATTRW( connection, statement -> driver_stmt, SQL_ATTR_IMP_PARAM_DESC, &desc, sizeof( desc ), NULL ); if ( SQL_SUCCEEDED( ret1 )) { /* * allocate one of our descriptors * to wrap around this */ statement -> ipd = __alloc_desc(); if ( !statement -> ipd ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY013" ); __post_internal_error( &connection -> error, ERROR_HY013, NULL, connection -> environment -> requested_version ); *output_handle = SQL_NULL_HSTMT; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } statement -> implicit_ipd = statement -> ipd; statement -> ipd -> implicit = 1; statement -> ipd -> state = STATE_D1i; statement -> ipd -> driver_desc = desc; statement -> ipd -> connection = connection; } } } /* * set any preset statement attributes */ if ( SQL_SUCCEEDED( ret )) { __set_attributes( statement, SQL_HANDLE_STMT ); } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[SQL_SUCCESS]\n\t\t\tOutput Handle = %p", statement ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) uodbc_update_stats(connection->environment->sh, UODBC_STATS_TYPE_HSTMT, (void *)1); #endif return function_return( SQL_HANDLE_DBC, connection, ret ); } break; case SQL_HANDLE_DESC: { SQLRETURN ret; DMHDBC connection = (DMHDBC) input_handle; DMHDESC descriptor; if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } if ( output_handle ) *output_handle = SQL_NULL_HDESC; thread_protect( SQL_HANDLE_DBC, connection ); function_entry(( void * ) input_handle ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\n\t\t\tHandle Type = %d\n\t\t\tInput Handle = %p", handle_type, (void*)input_handle ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } if ( !output_handle ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY009" ); __post_internal_error( &connection -> error, ERROR_HY009, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection , SQL_ERROR ); } if ( connection -> state == STATE_C1 || connection -> state == STATE_C2 || connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); *output_handle = SQL_NULL_HDESC; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } descriptor = __alloc_desc(); if ( !descriptor ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY013" ); __post_internal_error( &connection -> error, ERROR_HY013, NULL, connection -> environment -> requested_version ); *output_handle = SQL_NULL_HDESC; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * pass the call on */ if ( CHECK_SQLALLOCHANDLE( connection )) { ret = SQLALLOCHANDLE( connection, SQL_HANDLE_DESC, connection -> driver_dbc, &descriptor -> driver_desc, NULL ); if ( !SQL_SUCCEEDED( ret )) __release_desc( descriptor ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM003" ); __post_internal_error( &connection -> error, ERROR_IM003, NULL, connection -> environment -> requested_version ); __release_desc( descriptor ); *output_handle = SQL_NULL_HDESC; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( SQL_SUCCEEDED( ret )) { /* * sort out the states */ descriptor -> state = STATE_D1e; descriptor -> implicit = 0; connection -> statement_count ++; descriptor -> connection = connection; *output_handle = (SQLHANDLE) descriptor; } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[SQL_SUCCESS]\n\t\t\tOutput Handle = %p", descriptor ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) uodbc_update_stats(connection->environment->sh, UODBC_STATS_TYPE_HDESC, (void *)1); #endif return function_return( SQL_HANDLE_DBC, connection, ret ); } break; default: if ( __validate_env( (DMHENV) input_handle )) { DMHENV environment = (DMHENV) input_handle; __post_internal_error( &environment -> error, ERROR_HY092, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } else if ( __validate_dbc( (DMHDBC) input_handle )) { DMHDBC connection = (DMHDBC) input_handle; __post_internal_error( &connection -> error, ERROR_HY092, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else { return SQL_ERROR; } break; } } SQLRETURN SQLAllocHandle( SQLSMALLINT handle_type, SQLHANDLE input_handle, SQLHANDLE *output_handle ) { /* * setting a requested version to 0 * indicates that we are ODBC3 and the application must * select ODBC2 or 3 explicitly */ return __SQLAllocHandle( handle_type, input_handle, output_handle, 0 ); } unixODBC-2.2.14-p2/DriverManager/SQLAllocHandleStd.c0100644000076400007640000000521207363332145020276 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLAllocHandleStd.c,v 1.1.1.1 2001/10/17 16:40:05 lurcher Exp $ * * $Log: SQLAllocHandleStd.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.4 1999/07/07 18:51:54 ngorham * * Add missing '*' * * Revision 1.3 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/21 19:59:04 ngorham * * Fix bug in SQLAllocHandleStd.c, the wrong handle was being used to * return the allocated env handle * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:02:41 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLAllocHandleStd.c,v $ $Revision: 1.1.1.1 $"; SQLRETURN SQLAllocHandleStd( SQLSMALLINT handle_type, SQLHANDLE input_handle, SQLHANDLE *output_handle ) { SQLRETURN ret; ret = __SQLAllocHandle( handle_type, input_handle, output_handle, 0 ); if ( handle_type == SQL_HANDLE_ENV && SQL_SUCCEEDED( ret )) { DMHENV environment = (DMHENV) *output_handle; environment -> requested_version = SQL_OV_ODBC3; } return ret; } unixODBC-2.2.14-p2/DriverManager/SQLAllocStmt.c0100644000076400007640000000426007363332145017361 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLAllocStmt.c,v 1.1.1.1 2001/10/17 16:40:05 lurcher Exp $ * * $Log: SQLAllocStmt.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.3 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.2 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.1 1999/04/25 23:02:41 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLAllocStmt.c,v $ $Revision: 1.1.1.1 $"; SQLRETURN SQLAllocStmt( SQLHDBC connection_handle, SQLHSTMT *statement_handle ) { return __SQLAllocHandle( SQL_HANDLE_STMT, connection_handle, statement_handle, SQL_OV_ODBC2 ); } unixODBC-2.2.14-p2/DriverManager/SQLBindCol.c0100644000076400007640000002200010572763643016770 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLBindCol.c,v 1.7 2007/03/05 09:49:23 lurcher Exp $ * * $Log: SQLBindCol.c,v $ * Revision 1.7 2007/03/05 09:49:23 lurcher * Get it to build on VMS again * * Revision 1.6 2006/04/11 10:22:56 lurcher * Fix a data type check * * Revision 1.5 2006/03/08 11:22:13 lurcher * Add check for valid C_TYPE * * Revision 1.4 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.2 2001/12/13 13:00:31 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.9 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.7 1999/10/09 00:56:16 ngorham * * Added Manush's patch to map ODBC 3-2 datetime values * * Revision 1.6 1999/10/09 00:15:58 ngorham * * Add mapping from SQL_TYPE_X to SQL_X and SQL_C_TYPE_X to SQL_C_X * when the driver is a ODBC 2 one * * Revision 1.5 1999/09/21 22:34:23 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:02:41 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLBindCol.c,v $ $Revision: 1.7 $"; int check_target_type( int c_type ) { switch( c_type ) { case SQL_C_CHAR: case SQL_C_LONG: case SQL_C_SHORT: case SQL_C_FLOAT: case SQL_C_NUMERIC: case SQL_C_DEFAULT: case SQL_C_DATE: case SQL_C_TIME: case SQL_C_TIMESTAMP: case SQL_C_TYPE_DATE: case SQL_C_TYPE_TIME: case SQL_C_TYPE_TIMESTAMP: case SQL_C_INTERVAL_YEAR: case SQL_C_INTERVAL_MONTH: case SQL_C_INTERVAL_DAY: case SQL_C_INTERVAL_HOUR: case SQL_C_INTERVAL_MINUTE: case SQL_C_INTERVAL_SECOND: case SQL_C_INTERVAL_YEAR_TO_MONTH: case SQL_C_INTERVAL_DAY_TO_HOUR: case SQL_C_INTERVAL_DAY_TO_MINUTE: case SQL_C_INTERVAL_DAY_TO_SECOND: case SQL_C_INTERVAL_HOUR_TO_MINUTE: case SQL_C_INTERVAL_HOUR_TO_SECOND: case SQL_C_INTERVAL_MINUTE_TO_SECOND: case SQL_C_BINARY: case SQL_C_BIT: case SQL_C_SBIGINT: case SQL_C_UBIGINT: case SQL_C_TINYINT: case SQL_C_SLONG: case SQL_C_SSHORT: case SQL_C_STINYINT: case SQL_C_ULONG: case SQL_C_USHORT: case SQL_C_UTINYINT: case SQL_C_GUID: case SQL_C_WCHAR: case SQL_ARD_TYPE: case SQL_C_DOUBLE: /* case SQL_C_XML: still trying to find what value this is */ return 1; default: return 0; } } SQLRETURN SQLBindCol( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLSMALLINT target_type, SQLPOINTER target_value, SQLLEN buffer_length, SQLLEN *strlen_or_ind ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tColumn Number = %d\ \n\t\t\tTarget Type = %d %s\ \n\t\t\tTarget Value = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tStrLen Or Ind = %p", statement, column_number, target_type, __sql_as_text( target_type ), target_value, (int)buffer_length, (void*)strlen_or_ind ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( buffer_length < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * TO_DO * Check the type against a bookmark * check that the length is 4 for a odbc 2 bookmark * remember thats its bound for SQLGetData checks */ /* * check states */ if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check valid C_TYPE */ if ( !check_target_type( target_type )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY003" ); __post_internal_error( &statement -> error, ERROR_HY003, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( !CHECK_SQLBINDCOL( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLBINDCOL( statement -> connection , statement -> driver_stmt, column_number, __map_type(MAP_C_DM2D,statement->connection,target_type), target_value, buffer_length, strlen_or_ind ); if ( log_info.log_flag ) { SQLCHAR buf[ 128 ]; sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, buf )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLBindParam.c0100644000076400007640000002304310572763643017323 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLBindParam.c,v 1.8 2007/03/05 09:49:23 lurcher Exp $ * * $Log: SQLBindParam.c,v $ * Revision 1.8 2007/03/05 09:49:23 lurcher * Get it to build on VMS again * * Revision 1.7 2006/04/11 10:22:56 lurcher * Fix a data type check * * Revision 1.6 2006/03/08 11:22:13 lurcher * Add check for valid C_TYPE * * Revision 1.5 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/19 09:11:49 lurcher * * Fix Maxor ineffiecny in Postgres Drivers, and fix a return state * * Revision 1.2 2001/12/13 13:00:31 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.9 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.7 1999/10/09 00:56:16 ngorham * * Added Manush's patch to map ODBC 3-2 datetime values * * Revision 1.6 1999/10/09 00:15:58 ngorham * * Add mapping from SQL_TYPE_X to SQL_X and SQL_C_TYPE_X to SQL_C_X * when the driver is a ODBC 2 one * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.3 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:02:41 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLBindParam.c,v $ $Revision: 1.8 $"; SQLRETURN SQLBindParam( SQLHSTMT statement_handle, SQLUSMALLINT parameter_number, SQLSMALLINT value_type, SQLSMALLINT parameter_type, SQLULEN length_precision, SQLSMALLINT parameter_scale, SQLPOINTER parameter_value, SQLLEN *strlen_or_ind) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tParam Number = %d\ \n\t\t\tValue Type = %d %s\ \n\t\t\tParameter Type = %d %s\ \n\t\t\tLength Precision = %d\ \n\t\t\tParameter Scale = %d\ \n\t\t\tParameter Value = %p\ \n\t\t\tStrLen Or Ind = %p", statement, parameter_number, value_type, __c_as_text( value_type ), parameter_type, __sql_as_text( parameter_type ), (int)length_precision, (int)parameter_scale, (void*)parameter_value, (void*)strlen_or_ind ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( parameter_number < 1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error_api( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version, SQL_API_SQLBINDPARAM ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( parameter_value == NULL && strlen_or_ind == NULL ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY009" ); __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check valid C_TYPE */ if ( !check_target_type( value_type )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY003" ); __post_internal_error( &statement -> error, ERROR_HY003, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( CHECK_SQLBINDPARAM( statement -> connection )) { ret = SQLBINDPARAM( statement -> connection, statement -> driver_stmt, parameter_number, __map_type(MAP_C_DM2D,statement->connection,value_type), __map_type(MAP_SQL_DM2D,statement->connection,parameter_type), length_precision, parameter_scale, parameter_value, strlen_or_ind ); } else { /* * map to odbc 3 operation */ if ( !CHECK_SQLBINDPARAMETER( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * this probably needs to work out the * buffer length */ ret = SQLBINDPARAMETER( statement -> connection, statement -> driver_stmt, parameter_number, SQL_PARAM_INPUT, __map_type(MAP_C_DM2D,statement->connection,value_type), __map_type(MAP_SQL_DM2D,statement->connection,parameter_type), length_precision, parameter_scale, parameter_value, 0, strlen_or_ind ); } if ( log_info.log_flag ) { SQLCHAR buf[ 128 ]; sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, buf )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLBindParameter.c0100644000076400007640000002656710572763643020221 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLBindParameter.c,v 1.11 2007/03/05 09:49:23 lurcher Exp $ * * $Log: SQLBindParameter.c,v $ * Revision 1.11 2007/03/05 09:49:23 lurcher * Get it to build on VMS again * * Revision 1.10 2006/04/18 10:24:47 lurcher * Add a couple of changes from Mark Vanderwiel * * Revision 1.9 2006/04/11 10:22:56 lurcher * Fix a data type check * * Revision 1.8 2006/03/08 11:22:13 lurcher * Add check for valid C_TYPE * * Revision 1.7 2005/09/05 09:49:48 lurcher * New QT detection macros added * * Revision 1.6 2005/04/26 08:40:35 lurcher * * Add data type mapping for SQLSetPos. * Remove out of date macro in sqlext.h * * Revision 1.5 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/19 09:11:49 lurcher * * Fix Maxor ineffiecny in Postgres Drivers, and fix a return state * * Revision 1.2 2001/12/13 13:00:31 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.9 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.7 1999/10/09 00:56:16 ngorham * * Added Manush's patch to map ODBC 3-2 datetime values * * Revision 1.6 1999/10/09 00:15:58 ngorham * * Add mapping from SQL_TYPE_X to SQL_X and SQL_C_TYPE_X to SQL_C_X * when the driver is a ODBC 2 one * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:20 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:02:41 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLBindParameter.c,v $ $Revision: 1.11 $"; SQLRETURN SQLBindParameter( SQLHSTMT statement_handle, SQLUSMALLINT ipar, SQLSMALLINT f_param_type, SQLSMALLINT f_c_type, SQLSMALLINT f_sql_type, SQLULEN cb_col_def, SQLSMALLINT ib_scale, SQLPOINTER rgb_value, SQLLEN cb_value_max, SQLLEN *pcb_value ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tParam Number = %d\ \n\t\t\tParam Type = %d\ \n\t\t\tC Type = %d %s\ \n\t\t\tSQL Type = %d %s\ \n\t\t\tCol Def = %d\ \n\t\t\tScale = %d\ \n\t\t\tRgb Value = %p\ \n\t\t\tValue Max = %d\ \n\t\t\tStrLen Or Ind = %p", statement, ipar, f_param_type, f_c_type, __c_as_text( f_c_type ), f_sql_type, __sql_as_text( f_sql_type ), (int)cb_col_def, (int)ib_scale, (void*)rgb_value, (int)cb_value_max, (void*)pcb_value ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( ipar < 1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error_api( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version, SQL_API_SQLBINDPARAMETER ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( cb_value_max < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( rgb_value == NULL && pcb_value == NULL && f_param_type != SQL_PARAM_OUTPUT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY009" ); __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( f_param_type != SQL_PARAM_INPUT && f_param_type != SQL_PARAM_INPUT_OUTPUT && f_param_type != SQL_PARAM_OUTPUT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY105" ); __post_internal_error( &statement -> error, ERROR_HY105, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * Alter the types, this is a special to cope with a AllBase bug... */ if ( f_c_type == SQL_C_SLONG && 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Map from SQL_C_SLONG,SQL_C_CHAR to SQL_C_LONG,SQL_INTEGER" ); f_c_type = SQL_C_LONG; f_sql_type = SQL_INTEGER; } /* * check states */ if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check valid C_TYPE */ if ( !check_target_type( f_c_type )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY003" ); __post_internal_error( &statement -> error, ERROR_HY003, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( CHECK_SQLBINDPARAMETER( statement -> connection )) { ret = SQLBINDPARAMETER( statement -> connection, statement -> driver_stmt, ipar, f_param_type, __map_type(MAP_C_DM2D,statement->connection,f_c_type), __map_type(MAP_SQL_DM2D,statement->connection,f_sql_type), cb_col_def, ib_scale, rgb_value, cb_value_max, pcb_value ); } else if ( CHECK_SQLBINDPARAM( statement -> connection )) { ret = SQLBINDPARAM( statement -> connection, statement -> driver_stmt, ipar, __map_type(MAP_C_DM2D,statement->connection,f_c_type), __map_type(MAP_SQL_DM2D,statement->connection,f_sql_type), cb_col_def, ib_scale, rgb_value, pcb_value ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( log_info.log_flag ) { SQLCHAR buf[ 128 ]; sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, buf )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLBrowseConnect.c0100644000076400007640000004272310706101555020232 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLBrowseConnect.c,v 1.13 2007/10/19 10:14:05 lurcher Exp $ * * $Log: SQLBrowseConnect.c,v $ * Revision 1.13 2007/10/19 10:14:05 lurcher * Pull errors from SQLBrowseConnect when it returns SQL_NEED_DATA * * Revision 1.12 2005/11/21 17:25:43 lurcher * A few DM fixes for Oracle's ODBC driver * * Revision 1.11 2005/10/06 08:50:58 lurcher * Fix problem with SQLDrivers not returning first entry * * Revision 1.10 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.9 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.8 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.7 2002/08/15 08:10:33 lurcher * * Couple of small fixes from John L Miller * * Revision 1.6 2002/07/25 09:30:26 lurcher * * Additional unicode and iconv changes * * Revision 1.5 2002/02/08 17:59:40 lurcher * * Fix threading problem in SQLBrowseConnect * * Revision 1.4 2002/02/07 20:50:04 lurcher * * Fix small bug in SQLBrowseConnect * * Revision 1.3 2002/01/21 18:00:50 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.2 2001/12/13 13:00:31 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.9 2001/07/20 12:35:09 nick * * Fix SQLBrowseConnect operation * * Revision 1.8 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.7 2001/05/15 10:57:44 nick * * Add initial support for VMS * * Revision 1.6 2001/04/16 22:35:10 nick * * More tweeks to the AutoTest code * * Revision 1.5 2001/04/16 15:41:24 nick * * Fix some problems calling non existing error funcs * * Revision 1.4 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.3 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.2 2000/10/13 15:18:49 nick * * Change string length parameter from SQLINTEGER to SQLSMALLINT * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 2000/05/21 21:49:19 ngorham * * Assorted fixes * * Revision 1.7 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/08/03 21:47:39 shandyb * Moving to automake: changed files in DriverManager * * Revision 1.3 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.2 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:02:41 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLBrowseConnect.c,v $ $Revision: 1.13 $"; #define BUFFER_LEN 4095 SQLRETURN SQLBrowseConnectA( SQLHDBC hdbc, SQLCHAR *conn_str_in, SQLSMALLINT len_conn_str_in, SQLCHAR *conn_str_out, SQLSMALLINT conn_str_out_max, SQLSMALLINT *ptr_conn_str_out ) { return SQLBrowseConnect( hdbc, conn_str_in, len_conn_str_in, conn_str_out, conn_str_out_max, ptr_conn_str_out ); } SQLRETURN SQLBrowseConnect( SQLHDBC hdbc, SQLCHAR *conn_str_in, SQLSMALLINT len_conn_str_in, SQLCHAR *conn_str_out, SQLSMALLINT conn_str_out_max, SQLSMALLINT *ptr_conn_str_out ) { DMHDBC connection = (DMHDBC) hdbc; struct con_struct con_struct; char *driver, *dsn; char lib_name[ INI_MAX_PROPERTY_VALUE + 1 ]; char driver_name[ INI_MAX_PROPERTY_VALUE + 1 ]; char in_str[ BUFFER_LEN ]; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN]; SQLWCHAR *uc_in_str; int warnings; /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tStr In = %s\ \n\t\t\tStr Out = %p\ \n\t\t\tStr Out Max = %d\ \n\t\t\tPtr Conn Str Out = %p", connection, __string_with_length( s1, conn_str_in, len_conn_str_in ), conn_str_out, conn_str_out_max, ptr_conn_str_out ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } /* * check the state of the connection */ if ( connection -> state == STATE_C4 || connection -> state == STATE_C5 || connection -> state == STATE_C6 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( -1, connection, SQL_ERROR ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( len_conn_str_in < 0 && len_conn_str_in != SQL_NTS) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * are we at the start of a connection */ if ( connection -> state == STATE_C2 ) { /* * parse the connection string */ __parse_connection_string( &con_struct, (char*)conn_str_in, len_conn_str_in ); /* * look for some keywords * have we got a DRIVER= attribute */ driver = __get_attribute_value( &con_struct, "DRIVER" ); if ( driver ) { /* * look up the driver in the ini file */ SQLGetPrivateProfileString( driver, "Driver", "", lib_name, sizeof( lib_name ), "ODBCINST.INI" ); if ( lib_name[ 0 ] == '\0' ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); __release_conn( &con_struct ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } __generate_connection_string( &con_struct, in_str, sizeof( in_str )); strcpy( connection -> dsn, "" ); } else { dsn = __get_attribute_value( &con_struct, "DSN" ); if ( !dsn ) { dsn = "DEFAULT"; __append_pair( &con_struct, "DSN", "DEFAULT" ); } if ( strlen( dsn ) > SQL_MAX_DSN_LENGTH ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM012" ); __post_internal_error( &connection -> error, ERROR_IM012, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } __generate_connection_string( &con_struct, in_str, sizeof( in_str )); /* * look up the dsn in the ini file */ if ( !__find_lib_name( dsn, lib_name, driver_name )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); __release_conn( &con_struct ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } strcpy( connection -> dsn, dsn ); } __release_conn( &con_struct ); /* * we now have a driver to connect to */ if ( !__connect_part_one( connection, lib_name, driver_name, &warnings )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: connect_part_one fails" ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( !CHECK_SQLBROWSECONNECT( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __disconnect_part_one( connection ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { if ( len_conn_str_in == SQL_NTS ) { strcpy( in_str, (char*)conn_str_in ); } else { memcpy( in_str, conn_str_in, len_conn_str_in ); in_str[ len_conn_str_in ] = '\0'; } } if (CHECK_SQLBROWSECONNECT( connection )) { ret = SQLBROWSECONNECT( connection, connection -> driver_dbc, in_str, strlen( in_str ), conn_str_out, conn_str_out_max, ptr_conn_str_out ); connection->unicode_driver = 0; } else if (CHECK_SQLBROWSECONNECTW( connection )) { uc_in_str = ansi_to_unicode_alloc((SQLCHAR*)in_str,SQL_NTS,connection); ret = SQLBROWSECONNECTW( connection, connection -> driver_dbc, uc_in_str, strlen( in_str ), conn_str_out, conn_str_out_max, ptr_conn_str_out ); if(uc_in_str) free(uc_in_str); connection->unicode_driver = 1; } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __disconnect_part_one( connection ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( !SQL_SUCCEEDED( ret ) || ret == SQL_NEED_DATA ) { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN eret; char buf[ 128 ]; /* * get the error from the driver before * looseing the connection */ if ( CHECK_SQLERROR( connection )) { do { eret = SQLERROR( connection, SQL_NULL_HENV, connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( eret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, message_text ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( eret )); } else if ( CHECK_SQLGETDIAGREC( connection )) { int rec = 1; do { eret = SQLGETDIAGREC( connection, SQL_HANDLE_DBC, connection -> driver_dbc, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( eret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, message_text ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( eret )); } if ( ret != SQL_NEED_DATA ) { __disconnect_part_one( connection ); connection -> state = STATE_C2; } else { connection -> state = STATE_C3; } } else { /* * we should be connected now */ connection -> state = STATE_C4; if( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_DBC, connection, ret, TRUE ); } if ( !__connect_part_two( connection )) { __disconnect_part_two( connection ); __disconnect_part_one( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tconnect_part_two fails", __get_return_status( SQL_ERROR, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tPtr Conn Str Out = %s", __get_return_status( ret, s2 ), __sptr_as_string( s1, ptr_conn_str_out )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } connection -> unicode_driver = 0; if ( warnings && ret == SQL_SUCCESS ) { ret = SQL_SUCCESS_WITH_INFO; } return function_return( SQL_HANDLE_DBC, connection, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLBulkOperations.c0100644000076400007640000002055307750253175020430 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLBulkOperations.c,v 1.3 2003/10/30 18:20:45 lurcher Exp $ * * $Log: SQLBulkOperations.c,v $ * Revision 1.3 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.2 1999/06/02 23:48:45 ngorham * * Added more 3-2 mapping * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:02:41 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLBulkOperations.c,v $ $Revision: 1.3 $"; SQLRETURN SQLBulkOperations( SQLHSTMT statement_handle, SQLSMALLINT operation ) { DMHSTMT statement = (DMHSTMT)statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tOption = %d", statement, operation ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S7 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLBULKOPERATIONS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * there are a lot of conditions that should be tested here */ if ( CHECK_SQLBULKOPERATIONS( statement -> connection )) { ret = SQLBULKOPERATIONS( statement -> connection, statement -> driver_stmt, operation ); } else if ( CHECK_SQLSETPOS( statement -> connection ) && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && operation == SQL_ADD ) { ret = SQLSETPOS( statement -> connection, statement -> driver_stmt, 0, SQL_ADD, SQL_LOCK_NO_CHANGE ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLBULKOPERATIONS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( ret == SQL_NEED_DATA ) { statement -> interupted_func = SQL_API_SQLBULKOPERATIONS; statement -> interupted_state = statement -> state; statement -> state = STATE_S8; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLCancel.c0100644000076400007640000001502307750253175016650 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLCancel.c,v 1.3 2003/10/30 18:20:45 lurcher Exp $ * * $Log: SQLCancel.c,v $ * Revision 1.3 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.1 1999/04/25 23:02:41 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLCancel.c,v $ $Revision: 1.3 $"; SQLRETURN SQLCancel( SQLHSTMT statement_handle ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p", statement ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( !CHECK_SQLCANCEL( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLCANCEL( statement -> connection, statement -> driver_stmt ); if ( SQL_SUCCEEDED( ret )) { if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { if ( statement -> interupted_func == SQL_API_SQLEXECDIRECT ) { statement -> state = STATE_S1; } else if ( statement -> interupted_func == SQL_API_SQLEXECUTE ) { if ( statement -> hascols ) { statement -> state = STATE_S3; } else { statement -> state = STATE_S2; } } else if ( statement -> interupted_func == SQL_API_SQLBULKOPERATIONS ) { if ( statement -> interupted_state == STATE_S5 || statement -> interupted_state == STATE_S6 || statement -> interupted_state == STATE_S7 ) { statement -> state = STATE_S6; } else { statement -> state = STATE_S6; } } else if ( statement -> interupted_func == SQL_API_SQLSETPOS ) { if ( statement -> interupted_state == STATE_S5 || statement -> interupted_state == STATE_S6 ) { statement -> state = STATE_S6; } else if ( statement -> interupted_state == STATE_S7 ) { statement -> state = STATE_S7; } } } else if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { statement -> state = STATE_S12; } } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLCloseCursor.c0100644000076400007640000001473207750253175017734 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLCloseCursor.c,v 1.4 2003/10/30 18:20:45 lurcher Exp $ * * $Log: SQLCloseCursor.c,v $ * Revision 1.4 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/08/15 08:10:33 lurcher * * Couple of small fixes from John L Miller * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:06 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLCloseCursor.c,v $ $Revision: 1.4 $"; SQLRETURN SQLCloseCursor( SQLHSTMT statement_handle ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p", statement ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 || statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( !CHECK_SQLCLOSECURSOR( statement -> connection )) { if ( !CHECK_SQLFREESTMT( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else { ret = SQLFREESTMT( statement -> connection, statement -> driver_stmt, SQL_CLOSE ); } } else { ret = SQLCLOSECURSOR( statement -> connection, statement -> driver_stmt ); } if ( SQL_SUCCEEDED( ret )) { if ( statement -> prepared ) statement -> state = STATE_S3; else statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLColAttribute.c0100644000076400007640000004752511070160003020051 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColAttribute.c,v 1.17 2008/09/29 14:02:43 lurcher Exp $ * * $Log: SQLColAttribute.c,v $ * Revision 1.17 2008/09/29 14:02:43 lurcher * Fix missing dlfcn group option * * Revision 1.16 2007/04/02 10:50:17 lurcher * Fix some 64bit problems (only when sizeof(SQLLEN) == 8 ) * * Revision 1.15 2006/03/08 09:18:41 lurcher * fix silly typo that was using sizeof( SQL_WCHAR ) instead of SQLWCHAR * * Revision 1.14 2004/11/22 17:02:48 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.13 2004/10/30 20:19:21 peteralexharvey * ODBC spec says last arg for SQLColAttribute() is SQLPOINTER not (SQLEN*). * So switched back to SQLPOINTER. * * Revision 1.12 2004/10/29 10:00:35 lurcher * Fix SQLColAttribute protype * * Revision 1.11 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.10 2003/04/10 13:45:51 lurcher * * Alter the way that SQLDataSources returns the description field (again) * * Revision 1.9 2003/04/09 08:42:18 lurcher * * Allow setting of odbcinstQ lib from odbcinst.ini and Environment * * Revision 1.8 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.7 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.6 2002/11/11 17:10:06 lurcher * * VMS changes * * Revision 1.5 2002/08/19 09:11:49 lurcher * * Fix Maxor ineffiecny in Postgres Drivers, and fix a return state * * Revision 1.4 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.3 2002/04/25 15:16:46 lurcher * * Fix bug with SQLCOlAttribute(s)(W) where a column of zero could not be * used to get the count value * * Revision 1.2 2001/11/16 11:39:17 lurcher * * Add mapping between ODBC 2 and ODBC 3 types for SQLColAttribute(s)(W) * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.6 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.5 2001/07/02 17:09:37 nick * * Add some portability changes * * Revision 1.4 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.3 2001/04/03 16:34:12 nick * * Add support for strangly broken unicode drivers * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 2000/06/20 13:30:07 ngorham * * Fix problems when using bookmarks * * Revision 1.7 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/10/09 00:56:16 ngorham * * Added Manush's patch to map ODBC 3-2 datetime values * * Revision 1.4 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.3 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.2 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.2 1999/06/03 22:20:25 ngorham * * Finished off the ODBC3-2 mapping * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLColAttribute.c,v $ $Revision: 1.17 $"; SQLINTEGER map_ca_odbc3_to_2( SQLINTEGER field_identifier ) { switch( field_identifier ) { case SQL_DESC_COUNT: field_identifier = SQL_COLUMN_COUNT; break; case SQL_DESC_TYPE: field_identifier = SQL_COLUMN_TYPE; break; case SQL_DESC_LENGTH: field_identifier = SQL_COLUMN_LENGTH; break; case SQL_DESC_PRECISION: field_identifier = SQL_COLUMN_PRECISION; break; case SQL_DESC_SCALE: field_identifier = SQL_COLUMN_SCALE; break; case SQL_DESC_NULLABLE: field_identifier = SQL_COLUMN_NULLABLE; break; case SQL_DESC_NAME: field_identifier = SQL_COLUMN_NAME; break; default: break; } return field_identifier; } SQLRETURN SQLColAttributeA( SQLHSTMT statement_handle, SQLSMALLINT column_number, SQLSMALLINT field_identifier, SQLPOINTER character_attribute, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLLEN *numeric_attribute ) { return SQLColAttribute( statement_handle, (SQLUSMALLINT) column_number, (SQLUSMALLINT) field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } SQLRETURN SQLColAttribute ( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLUSMALLINT field_identifier, SQLPOINTER character_attribute, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLLEN *numeric_attribute ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret = 0; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tColumn Number = %d\ \n\t\t\tField Identifier = %s\ \n\t\t\tCharacter Attr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Length = %p\ \n\t\t\tNumeric Attribute = %p", statement, column_number, __col_attr_as_string( s1, field_identifier ), character_attribute, buffer_length, string_length, numeric_attribute ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( column_number == 0 && statement -> bookmarks_on == SQL_UB_OFF && statement -> connection -> bookmarks_on == SQL_UB_OFF && field_identifier != SQL_DESC_COUNT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error_api( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version, SQL_API_SQLCOLATTRIBUTE ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * Commented out for now because most drivers can not calc num cols * before Execute (they have no parse). - PAH * if ( field_identifier != SQL_DESC_COUNT && statement -> numcols < column_number ) { __post_internal_error( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version ); return function_return( statement, SQL_ERROR ); } */ /* * check states */ if ( statement -> state == STATE_S1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S2 && field_identifier != SQL_DESC_COUNT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07005" ); __post_internal_error( &statement -> error, ERROR_07005, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLCOLATTRIBUTE ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver ) { if ( !CHECK_SQLCOLATTRIBUTEW( statement -> connection )) { if ( ret = CHECK_SQLCOLATTRIBUTESW( statement -> connection )) { SQLWCHAR *s1 = NULL; /* * map to the ODBC2 function */ field_identifier = map_ca_odbc3_to_2( field_identifier ); switch( field_identifier ) { case SQL_COLUMN_QUALIFIER_NAME: case SQL_COLUMN_NAME: case SQL_COLUMN_LABEL: case SQL_COLUMN_OWNER_NAME: case SQL_COLUMN_TABLE_NAME: case SQL_COLUMN_TYPE_NAME: case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: if ( SQL_SUCCEEDED( ret ) && character_attribute && buffer_length > 0 ) { s1 = calloc( sizeof( SQLWCHAR ) * ( buffer_length + 1 ), 1); } break; default: break; } ret = SQLCOLATTRIBUTESW( statement -> connection, statement -> driver_stmt, column_number, field_identifier, s1 ? s1 : character_attribute, buffer_length, string_length, numeric_attribute ); switch( field_identifier ) { case SQL_COLUMN_QUALIFIER_NAME: case SQL_COLUMN_NAME: case SQL_COLUMN_LABEL: case SQL_COLUMN_OWNER_NAME: case SQL_COLUMN_TABLE_NAME: case SQL_COLUMN_TYPE_NAME: case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: if ( SQL_SUCCEEDED( ret ) && character_attribute && s1 ) { unicode_to_ansi_copy( character_attribute, buffer_length, s1, SQL_NTS, statement -> connection ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length /= sizeof( SQLWCHAR ); } break; default: break; } if ( s1 ) { free( s1 ); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } else { SQLWCHAR *s1 = NULL; switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: case SQL_COLUMN_NAME: if ( SQL_SUCCEEDED( ret ) && character_attribute && buffer_length > 0 ) { s1 = calloc( sizeof( SQLWCHAR ) * ( buffer_length + 1 ), 1); } break; default: break; } ret = SQLCOLATTRIBUTEW( statement -> connection, statement -> driver_stmt, column_number, field_identifier, s1 ? s1 : character_attribute, buffer_length, string_length, numeric_attribute ); switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: case SQL_COLUMN_NAME: if ( SQL_SUCCEEDED( ret ) && character_attribute && s1 ) { unicode_to_ansi_copy( character_attribute, buffer_length, s1, SQL_NTS, statement -> connection ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length /= sizeof( SQLWCHAR ); } break; default: break; } if ( s1 ) { free( s1 ); } } } else { if ( !CHECK_SQLCOLATTRIBUTE( statement -> connection )) { /* * map ODBC 3 types to ODBC 2 */ if ( CHECK_SQLCOLATTRIBUTES( statement -> connection )) { /* * map to the ODBC2 function */ field_identifier = map_ca_odbc3_to_2( field_identifier ); ret = SQLCOLATTRIBUTES( statement -> connection, statement -> driver_stmt, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } else { ret = SQLCOLATTRIBUTE( statement -> connection, statement -> driver_stmt, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } } if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLCOLATTRIBUTE; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( SQL_SUCCEEDED( ret )) { /* * map ODBC 3 datetime fields to ODBC2 */ if ( field_identifier == SQL_COLUMN_TYPE && numeric_attribute ) { *(SQLINTEGER*)numeric_attribute= __map_type(MAP_SQL_D2DM, statement->connection, *(SQLINTEGER*)numeric_attribute); } } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLColAttributes.c0100644000076400007640000004302411070160003020222 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColAttributes.c,v 1.14 2008/09/29 14:02:43 lurcher Exp $ * * $Log: SQLColAttributes.c,v $ * Revision 1.14 2008/09/29 14:02:43 lurcher * Fix missing dlfcn group option * * Revision 1.13 2006/03/08 09:18:41 lurcher * fix silly typo that was using sizeof( SQL_WCHAR ) instead of SQLWCHAR * * Revision 1.12 2006/01/06 18:44:35 lurcher * Couple of unicode fixes * * Revision 1.11 2004/11/22 17:02:48 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.10 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.9 2003/08/15 17:34:43 lurcher * * Remove some unneeded ODBC2->3 attribute conversions * * Revision 1.8 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.7 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.6 2002/08/19 09:11:49 lurcher * * Fix Maxor ineffiecny in Postgres Drivers, and fix a return state * * Revision 1.5 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.4 2002/04/25 15:16:46 lurcher * * Fix bug with SQLCOlAttribute(s)(W) where a column of zero could not be * used to get the count value * * Revision 1.3 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.2 2001/11/16 11:39:17 lurcher * * Add mapping between ODBC 2 and ODBC 3 types for SQLColAttribute(s)(W) * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.11 2000/07/31 20:48:01 ngorham * * Fix bugs in SQLGetDiagField and with SQLColAttributes * * Revision 1.10 2000/07/28 16:34:52 ngorham * * Fix problems with SQLColAttributes, and SQLDescribeParam * * Revision 1.9 2000/06/20 13:30:09 ngorham * * Fix problems when using bookmarks * * Revision 1.8 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/11/10 03:51:33 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.6 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.2 1999/06/03 22:20:25 ngorham * * Finished off the ODBC3-2 mapping * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLColAttributes.c,v $ $Revision: 1.14 $"; SQLINTEGER map_ca_odbc2_to_3( SQLINTEGER field_identifier ) { switch( field_identifier ) { case SQL_COLUMN_COUNT: field_identifier = SQL_DESC_COUNT; break; /* case SQL_COLUMN_TYPE: field_identifier = SQL_DESC_TYPE; break; case SQL_COLUMN_LENGTH: field_identifier = SQL_DESC_LENGTH; break; case SQL_COLUMN_PRECISION: field_identifier = SQL_DESC_PRECISION; break; case SQL_COLUMN_SCALE: field_identifier = SQL_DESC_SCALE; break; */ case SQL_COLUMN_NULLABLE: field_identifier = SQL_DESC_NULLABLE; break; case SQL_COLUMN_NAME: field_identifier = SQL_DESC_NAME; break; default: break; } return field_identifier; } SQLRETURN SQLColAttributesA( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLUSMALLINT field_identifier, SQLPOINTER character_attribute, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLLEN *numeric_attribute ) { return SQLColAttributes( statement_handle, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } SQLRETURN SQLColAttributes( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLUSMALLINT field_identifier, SQLPOINTER character_attribute, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLLEN *numeric_attribute ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tColumn Number = %d\ \n\t\t\tField Identifier = %s\ \n\t\t\tCharacter Attr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Length = %p\ \n\t\t\tNumeric Attribute = %p", statement, column_number, __col_attr_as_string( s1, field_identifier ), character_attribute, buffer_length, string_length, numeric_attribute ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( column_number == 0 && statement -> bookmarks_on == SQL_UB_OFF && statement -> connection -> bookmarks_on == SQL_UB_OFF && field_identifier != SQL_DESC_COUNT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error_api( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version, SQL_API_SQLCOLATTRIBUTES ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * Commented out for now because most drivers can not calc num cols * before Execute (they have no parse). - PAH * if ( field_identifier != SQL_DESC_COUNT && statement -> numcols < column_number ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } */ /* * check states */ if ( statement -> state == STATE_S1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S2 && field_identifier != SQL_DESC_COUNT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07005" ); __post_internal_error( &statement -> error, ERROR_07005, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLCOLATTRIBUTES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver ) { if ( !CHECK_SQLCOLATTRIBUTESW( statement -> connection )) { if ( CHECK_SQLCOLATTRIBUTEW( statement -> connection )) { SQLWCHAR *s1 = NULL; /* * map to the ODBC3 function */ field_identifier = map_ca_odbc2_to_3( field_identifier ); if ( character_attribute && buffer_length > 0 ) { s1 = calloc( sizeof( SQLWCHAR ) * ( buffer_length + 1 ), 1); } ret = SQLCOLATTRIBUTEW( statement -> connection, statement -> driver_stmt, column_number, field_identifier, s1 ? s1 : character_attribute, buffer_length, string_length, numeric_attribute ); if ( SQL_SUCCEEDED( ret ) && character_attribute && s1 ) { unicode_to_ansi_copy( character_attribute, buffer_length, s1, SQL_NTS, statement -> connection ); } if ( SQL_SUCCEEDED( ret ) && string_length && character_attribute ) { *string_length = strlen(character_attribute); } if ( s1 ) { free( s1 ); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } else { SQLWCHAR *s1 = NULL; if ( character_attribute && buffer_length > 0 ) { s1 = calloc( sizeof( SQLWCHAR ) * ( buffer_length + 1 ), 1); } ret = SQLCOLATTRIBUTESW( statement -> connection, statement -> driver_stmt, column_number, field_identifier, s1 ? s1 : character_attribute, buffer_length, string_length, numeric_attribute ); if ( SQL_SUCCEEDED( ret ) && character_attribute ) { unicode_to_ansi_copy( character_attribute, buffer_length, s1, SQL_NTS, statement -> connection ); } if ( SQL_SUCCEEDED( ret ) && string_length && character_attribute ) { *string_length /= sizeof( SQLWCHAR ); } if ( s1 ) { free( s1 ); } } } else { if ( !CHECK_SQLCOLATTRIBUTES( statement -> connection )) { if ( CHECK_SQLCOLATTRIBUTE( statement -> connection )) { /* * map to the ODBC3 function */ field_identifier = map_ca_odbc2_to_3( field_identifier ); ret = SQLCOLATTRIBUTE( statement -> connection, statement -> driver_stmt, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } else { ret = SQLCOLATTRIBUTES( statement -> connection, statement -> driver_stmt, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } } if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLCOLATTRIBUTES; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( SQL_SUCCEEDED( ret )) { /* * map ODBC 3 datetime fields to ODBC2 */ if ( field_identifier == SQL_COLUMN_TYPE && numeric_attribute && statement -> connection -> driver_version == SQL_OV_ODBC2 ) { SQLINTEGER na; memcpy( &na, numeric_attribute, sizeof( na )); switch( na ) { case SQL_TYPE_TIME: na = SQL_TIME; memcpy( numeric_attribute, &na, sizeof( na )); break; case SQL_TYPE_DATE: na = SQL_DATE; memcpy( numeric_attribute, &na, sizeof( na )); break; case SQL_TYPE_TIMESTAMP: na = SQL_TIMESTAMP; memcpy( numeric_attribute, &na, sizeof( na )); break; } } } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLColumnPrivileges.c0100644000076400007640000002715510340401427020743 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColumnPrivileges.c,v 1.7 2005/11/21 17:25:43 lurcher Exp $ * * $Log: SQLColumnPrivileges.c,v $ * Revision 1.7 2005/11/21 17:25:43 lurcher * A few DM fixes for Oracle's ODBC driver * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLColumnPrivileges.c,v $ $Revision: 1.7 $"; SQLRETURN SQLColumnPrivilegesA( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *column_name, SQLSMALLINT name_length4 ) { return SQLColumnPrivileges( statement_handle, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, column_name, name_length4 ); } SQLRETURN SQLColumnPrivileges( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *column_name, SQLSMALLINT name_length4 ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s\ \n\t\t\tColumn Name = %s", statement, __string_with_length( s1, catalog_name, name_length1 ), __string_with_length( s2, schema_name, name_length2 ), __string_with_length( s3, table_name, name_length3 ), __string_with_length( s4, column_name, name_length4 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length2 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS ) || ( name_length4 < 0 && name_length4 != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLCOLUMNPRIVILEGES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1, *s2, *s3, *s4; if ( !CHECK_SQLCOLUMNPRIVILEGESW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( catalog_name, name_length1, statement -> connection ); s2 = ansi_to_unicode_alloc( schema_name, name_length2, statement -> connection ); s3 = ansi_to_unicode_alloc( table_name, name_length3, statement -> connection ); s4 = ansi_to_unicode_alloc( column_name, name_length4, statement -> connection ); ret = SQLCOLUMNPRIVILEGESW( statement -> connection , statement -> driver_stmt, s1, name_length1, s2, name_length2, s3, name_length3, s4, name_length4 ); if( s1 ) free( s1 ); if( s2 ) free( s2 ); if( s3 ) free( s3 ); if( s4 ) free( s4 ); } else { if ( !CHECK_SQLCOLUMNPRIVILEGES( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLCOLUMNPRIVILEGES( statement -> connection , statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, column_name, name_length4 ); } if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLCOLUMNPRIVILEGES; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLColumns.c0100644000076400007640000003001511055726342017073 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColumns.c,v 1.7 2008/08/29 08:01:38 lurcher Exp $ * * $Log: SQLColumns.c,v $ * Revision 1.7 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.9 2000/06/20 12:43:58 ngorham * * Fix bug that caused a success with info message from SQLExecute or * SQLExecDirect to be lost if used with a ODBC 3 driver and the application * called SQLGetDiagRec * * Revision 1.8 2000/06/16 16:52:16 ngorham * * Stop info messages being lost when calling SQLExecute etc on ODBC 3 * drivers, the SQLNumResultCols were clearing the error before * function return had a chance to get to them * * Revision 1.7 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.2 1999/06/07 01:29:30 pharvey * *** empty log message *** * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLColumns.c,v $ $Revision: 1.7 $"; SQLRETURN SQLColumnsA( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *column_name, SQLSMALLINT name_length4 ) { return SQLColumns( statement_handle, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, column_name, name_length4 ); } SQLRETURN SQLColumns( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *column_name, SQLSMALLINT name_length4 ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s\ \n\t\t\tColumn Name = %s", statement, __string_with_length( s1, catalog_name, name_length1 ), __string_with_length( s2, schema_name, name_length2 ), __string_with_length( s3, table_name, name_length3 ), __string_with_length( s4, column_name, name_length4 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length2 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS ) || ( name_length4 < 0 && name_length4 != SQL_NTS )) { __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLCOLUMNS ) { __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1, *s2, *s3, *s4; if ( !CHECK_SQLCOLUMNSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( catalog_name, name_length1, statement -> connection ); s2 = ansi_to_unicode_alloc( schema_name, name_length2, statement -> connection ); s3 = ansi_to_unicode_alloc( table_name, name_length3, statement -> connection ); s4 = ansi_to_unicode_alloc( column_name, name_length4, statement -> connection ); ret = SQLCOLUMNSW( statement -> connection , statement -> driver_stmt, s1, name_length1, s2, name_length2, s3, name_length3, s4, name_length4 ); if( s1 ) free( s1 ); if( s2 ) free( s2 ); if( s3 ) free( s3 ); if( s4 ) free( s4 ); } else { if ( !CHECK_SQLCOLUMNS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLCOLUMNS( statement -> connection , statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, column_name, name_length4 ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); } SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); /******/ #endif statement -> state = STATE_S5; statement -> hascols = 1; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLCOLUMNS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLConnect.c0100644000076400007640000036541011070160003017035 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLConnect.c,v 1.60 2008/09/29 14:02:43 lurcher Exp $ * * $Log: SQLConnect.c,v $ * Revision 1.60 2008/09/29 14:02:43 lurcher * Fix missing dlfcn group option * * Revision 1.59 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.58 2008/06/17 16:14:13 lurcher * Fix for iconv memory leak and some fixes for CYGWIN * * Revision 1.57 2008/05/30 12:04:55 lurcher * Fix a couple of build problems and get ready for the next release * * Revision 1.56 2007/07/13 14:01:18 lurcher * Fix problem when not using iconv * * Revision 1.55 2007/03/13 10:35:38 lurcher * clear the iconv handles after use * * Revision 1.54 2007/03/07 22:53:29 lurcher * Fix pooling iconv leak, and try and allow the W entry point in a setup lib to be used * * Revision 1.53 2007/01/02 10:27:50 lurcher * Fix descriptor leak with unicode only driver * * Revision 1.52 2006/10/13 08:43:10 lurcher * * * Remove debug printf * * Revision 1.51 2006/06/28 08:08:41 lurcher * Add timestamp with timezone to Postgres7.1 driver * * Revision 1.50 2006/04/11 10:22:56 lurcher * Fix a data type check * * Revision 1.49 2005/11/08 09:37:10 lurcher * Allow the driver and application to have different length handles * * Revision 1.48 2005/10/06 08:50:58 lurcher * Fix problem with SQLDrivers not returning first entry * * Revision 1.47 2005/07/08 12:11:23 lurcher * * Fix a cursor lib problem (it was broken if you did metadata calls) * Alter the params to SQLParamOptions to use SQLULEN * * Revision 1.46 2005/05/24 16:51:57 lurcher * Fix potential for the driver to no have its handle closed * * Revision 1.45 2005/03/01 14:24:40 lurcher * Change DontDLClose default * * Revision 1.44 2005/02/01 10:24:23 lurcher * Cope if SHLIBEXT is not set * * Revision 1.43 2004/12/20 18:06:13 lurcher * Fix small typo in SQLConnect * * Revision 1.42 2004/09/22 09:13:38 lurcher * Replaced crypt auth in postgres with md5 for 7.1 Postgres driver * * Revision 1.41 2004/09/08 16:38:53 lurcher * * Get ready for a 2.2.10 release * * Revision 1.40 2004/07/25 00:42:02 peteralexharvey * for OS2 port * * Revision 1.39 2004/07/24 17:55:37 lurcher * Sync up CVS * * Revision 1.38 2004/06/16 14:42:03 lurcher * * * Fix potential corruption with threaded use and SQLEndTran * * Revision 1.37 2004/05/10 15:58:52 lurcher * * Stop the driver manager calling free handle twice * * Revision 1.36 2004/04/01 12:34:26 lurcher * * Fix minor memory leak * Add support for 64bit HPUX * * Revision 1.35 2004/02/26 15:52:03 lurcher * * Fix potential to call SQLFreeEnv in driver twice * Set default value if call to SQLGetPrivateProfileString fails because * the odbcinst.ini file is not found, and can't be created * * Revision 1.34 2004/02/18 15:47:44 lurcher * * Fix a leak in the iconv code * * Revision 1.33 2004/02/17 11:05:35 lurcher * * 2.2.8 release * * Revision 1.32 2004/02/02 10:10:45 lurcher * * Fix some connection pooling problems * Include sqlucode in sqlext * * Revision 1.31 2003/12/01 16:37:17 lurcher * * Fix a bug in SQLWritePrivateProfileString * * Revision 1.30 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.29 2003/10/06 15:43:46 lurcher * * Fix cursor lib to work with SQLFetch as well as the other fetch calls * Update README.OSX to detail building the cursor lib * * Revision 1.28 2003/09/08 15:34:29 lurcher * * A couple of small but perfectly formed fixes * * Revision 1.27 2003/08/15 17:34:43 lurcher * * Remove some unneeded ODBC2->3 attribute conversions * * Revision 1.26 2003/08/08 11:14:21 lurcher * * Fix UNICODE problem in SQLDriverConnectW * * Revision 1.25 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.24 2003/02/26 13:05:42 lurcher * * Update for new autoconf * * Revision 1.23 2003/02/25 13:28:28 lurcher * * Allow errors on the drivers AllocHandle to be reported * Fix a problem that caused errors to not be reported in the log * Remove a redundant line from the spec file * * Revision 1.22 2003/02/06 18:13:01 lurcher * * Another HP_UX twiddle * * Revision 1.21 2003/02/06 12:58:25 lurcher * * Fix a speeling problem :-) * * Revision 1.20 2002/12/20 11:36:46 lurcher * * Update DMEnvAttr code to allow setting in the odbcinst.ini entry * * Revision 1.19 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.18 2002/11/19 18:52:27 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.17 2002/11/13 15:59:20 lurcher * * More VMS changes * * Revision 1.16 2002/08/27 08:49:02 lurcher * * New version number and fix for cursor lib loading * * Revision 1.15 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.14 2002/08/12 13:17:52 lurcher * * Replicate the way the MS DM handles loading of driver libs, and allocating * handles in the driver. usage counting in the driver means that dlopen is * only called for the first use, and dlclose for the last. AllocHandle for * the driver environment is only called for the first time per driver * per application environment. * * Revision 1.13 2002/07/25 09:30:26 lurcher * * Additional unicode and iconv changes * * Revision 1.12 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.11 2002/07/12 09:01:37 lurcher * * Fix problem, with SAPDB where if the connection specifies ODBC 2, the * don't make use of the ODBC 3 method of SQLGetFunctions * * Revision 1.10 2002/07/04 17:27:56 lurcher * * Small bug fixes * * Revision 1.8 2002/05/24 12:42:49 lurcher * * Alter NEWS and ChangeLog to match their correct usage * Additional UNICODE tweeks * * Revision 1.7 2002/03/26 09:35:46 lurcher * * Extend naming of cursor lib to work on non linux platforms * (it expected a .so) * * Revision 1.6 2002/02/21 18:44:09 lurcher * * Fix bug on 32 bit platforms without long long support * Add option to set environment variables from the ini file * * Revision 1.5 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.4 2001/12/19 15:55:53 lurcher * * Add option to disable calling of SQLGetFunctions in driver * * Revision 1.3 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.2 2001/11/21 16:58:25 lurcher * * Assorted fixes to make the MAX OSX build work nicer * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.31 2001/09/27 17:05:48 nick * * Assorted fixes and tweeks * * Revision 1.30 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.29 2001/08/03 15:19:00 nick * * Add changes to set values before connect * * Revision 1.28 2001/07/31 12:03:46 nick * * Fix how the DM gets the CLI year for SQLGetInfo * Fix small bug in strncasecmp * * Revision 1.27 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.26 2001/06/25 12:55:15 nick * * Fix threading problem with multiple ENV's * * Revision 1.25 2001/06/13 11:23:11 nick * * Fix a couple of portability problems * * Revision 1.24 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.23 2001/05/23 11:44:44 nick * * Fix typo * * Revision 1.22 2001/05/09 11:56:47 nick * * Add support for libtool 1.4 * * Revision 1.21 2001/04/18 15:03:37 nick * * Fix problem when going to DB2 unicode driver * * Revision 1.20 2001/04/16 22:35:10 nick * * More tweeks to the AutoTest code * * Revision 1.19 2001/04/16 15:41:24 nick * * Fix some problems calling non existing error funcs * * Revision 1.18 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.17 2001/04/04 11:30:38 nick * * Fix a memory leak in Postgre7.1 * Fix a problem with timed out pooled connections * Add time to live option for pooled connections * * Revision 1.16 2001/04/03 16:34:12 nick * * Add support for strangly broken unicode drivers * * Revision 1.15 2001/03/30 08:35:39 nick * * Fix a couple of pooling problems * * Revision 1.14 2001/03/02 14:24:23 nick * * Fix thread detection for Solaris * * Revision 1.13 2001/02/12 11:20:22 nick * * Add supoort for calling SQLDriverLoad and SQLDriverUnload * * Revision 1.12 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.11 2000/12/18 13:02:13 nick * * More buf fixes * * Revision 1.10 2000/12/17 11:02:37 nick * * Fix extra '*' * * Revision 1.9 2000/12/17 11:00:32 nick * * Add thread safe bits to pooling * * Revision 1.8 2000/12/14 18:10:19 nick * * Add connection pooling * * Revision 1.7 2000/11/29 11:26:18 nick * * Add unicode bits * * Revision 1.6 2000/11/22 18:35:43 nick * * Check input handle before touching output handle * * Revision 1.5 2000/11/22 17:19:32 nick * * Fix tracing problem in SQLConnect * * Revision 1.4 2000/11/14 10:15:27 nick * * Add test for localtime_r * * Revision 1.3 2000/10/25 08:58:55 nick * * Fix crash when null server and SQL_NTS is passed in * * Revision 1.2 2000/10/13 15:18:49 nick * * Change string length parameter from SQLINTEGER to SQLSMALLINT * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.30 2000/07/28 14:57:29 ngorham * * Don't copy the function pointers for ColAttribute, ColAttributes just * set can_supply * * Revision 1.29 2000/06/27 17:34:09 ngorham * * Fix a problem when the second part of the connect failed a seg fault * was generated in the error reporting * * Revision 1.28 2001/05/26 19:11:37 ngorham * * Add SQLCopyDesc functionality and fix bug that was stopping messages * coming out of SQLConnect * * Revision 1.27 2000/05/21 21:49:19 ngorham * * Assorted fixes * * Revision 1.26 2000/04/27 20:49:03 ngorham * * Fixes to work with Star Office 5.2 * * Revision 1.25 2000/04/19 22:00:57 ngorham * * We can always supply SQLGetFunctions * * Revision 1.24 2000/03/11 15:55:47 ngorham * * A few more changes and bug fixes (see NEWS) * * Revision 1.23 2000/02/25 00:02:00 ngorham * * Add a patch to support IBM DB2, and Solaris threads * * Revision 1.22 2000/02/02 07:55:20 ngorham * * Add flag to disable SQLFetch -> SQLExtendedFetch mapping * * Revision 1.21 1999/12/28 15:05:00 ngorham * * Fix bug that caused StarOffice to fail. A SQLConnect, SQLDisconnect, * followed by another SQLConnect on the same DBC would fail. * * Revision 1.20 1999/12/17 09:40:30 ngorham * * Change a error return from HY004 to IM004 * * Revision 1.19 1999/12/14 19:02:25 ngorham * * Mask out the password fields in the logging * * Revision 1.18 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.17 1999/11/10 03:51:33 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.16 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.15 1999/10/14 06:49:24 ngorham * * Remove @all_includes@ from Drivers/MiniSQL/Makefile.am * * Revision 1.14 1999/10/09 00:15:58 ngorham * * Add mapping from SQL_TYPE_X to SQL_X and SQL_C_TYPE_X to SQL_C_X * when the driver is a ODBC 2 one * * Revision 1.13 1999/10/07 20:39:25 ngorham * * Added .cvsignore files and fixed a couple of bugs in the DM * * Revision 1.12 1999/10/06 07:10:46 ngorham * * As the book says check dlerror after a dl func * * Revision 1.11 1999/10/06 07:01:25 ngorham * * Added more support for non linux platforms * * Revision 1.10 1999/09/26 18:55:03 ngorham * * Fixed a problem where the cursor lib was being used by default * * Revision 1.9 1999/09/24 22:54:52 ngorham * * Fixed some unchanged dlopen,dlsym,dlclose functions * * Revision 1.8 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.7 1999/09/20 21:46:49 ngorham * * Added support for libtld dlopen replace * * Revision 1.6 1999/09/19 22:24:33 ngorham * * Added support for the cursor library * * Revision 1.5 1999/08/03 21:47:39 shandyb * Moving to automake: changed files in DriverManager * * Revision 1.4 1999/07/10 21:10:15 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.4 1999/06/07 01:29:30 pharvey * *** empty log message *** * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:20 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.7 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.6 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.5 1999/05/03 19:50:43 nick * Another check point * * Revision 1.4 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.3 1999/04/29 21:40:58 nick * End of another night :-) * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLConnect.c,v $ $Revision: 1.60 $"; #ifdef __OS2__ #define CURSOR_LIB "ODBCCR" #else #define CURSOR_LIB "libodbccr" #endif #define CURSOR_LIB_VER ".1" /* * structure to contain the loaded lib entry points */ static struct driver_func template_func[] = { /* 00 */ { SQL_API_SQLALLOCCONNECT, "SQLAllocConnect", (void*)SQLAllocConnect }, /* 01 */ { SQL_API_SQLALLOCENV, "SQLAllocEnv", (void*)SQLAllocEnv }, /* 02 */ { SQL_API_SQLALLOCHANDLE, "SQLAllocHandle", (void*)SQLAllocHandle }, /* 03 */ { SQL_API_SQLALLOCSTMT, "SQLAllocStmt", (void*)SQLAllocStmt }, /* 04 */ { SQL_API_SQLALLOCHANDLESTD, "SQLAllocHandleStd", (void*)SQLAllocHandleStd }, /* 05 */ { SQL_API_SQLBINDCOL, "SQLBindCol", (void*)SQLBindCol }, /* 06 */ { SQL_API_SQLBINDPARAM, "SQLBindParam", (void*)SQLBindParam }, /* 07 */ { SQL_API_SQLBINDPARAMETER, "SQLBindParameter", (void*)SQLBindParameter }, /* 08 */ { SQL_API_SQLBROWSECONNECT, "SQLBrowseConnect", (void*)SQLBrowseConnect, (void*)SQLBrowseConnectW }, /* 09 */ { SQL_API_SQLBULKOPERATIONS, "SQLBulkOperations", (void*)SQLBulkOperations }, /* 10 */ { SQL_API_SQLCANCEL, "SQLCancel", (void*)SQLCancel }, /* 11 */ { SQL_API_SQLCLOSECURSOR, "SQLCloseCursor", (void*)SQLCloseCursor }, /* 12 */ { SQL_API_SQLCOLATTRIBUTE, "SQLColAttribute", (void*)SQLColAttribute, (void*)SQLColAttributeW }, /* 13 */ { SQL_API_SQLCOLATTRIBUTES, "SQLColAttributes", (void*)SQLColAttributes, (void*)SQLColAttributesW }, /* 14 */ { SQL_API_SQLCOLUMNPRIVILEGES, "SQLColumnPrivileges", (void*)SQLColumnPrivileges, (void*)SQLColumnPrivilegesW }, /* 15 */ { SQL_API_SQLCOLUMNS, "SQLColumns", (void*)SQLColumns, (void*)SQLColumnsW }, /* 16 */ { SQL_API_SQLCONNECT, "SQLConnect", (void*)SQLConnect, (void*)SQLConnectW }, /* 17 */ { SQL_API_SQLCOPYDESC, "SQLCopyDesc", (void*)SQLCopyDesc }, /* 18 */ { SQL_API_SQLDATASOURCES, "SQLDataSources", (void*)SQLDataSources, (void*)SQLDataSourcesW }, /* 19 */ { SQL_API_SQLDESCRIBECOL, "SQLDescribeCol", (void*)SQLDescribeCol, (void*)SQLDescribeColW }, /* 20 */ { SQL_API_SQLDESCRIBEPARAM, "SQLDescribeParam", (void*)SQLDescribeParam }, /* 21 */ { SQL_API_SQLDISCONNECT, "SQLDisconnect", (void*)SQLDisconnect }, /* 22 */ { SQL_API_SQLDRIVERCONNECT, "SQLDriverConnect", (void*)SQLDriverConnect, (void*)SQLDriverConnectW }, /* 23 */ { SQL_API_SQLDRIVERS, "SQLDrivers", (void*)SQLDrivers, (void*)SQLDriversW }, /* 24 */ { SQL_API_SQLENDTRAN, "SQLEndTran", (void*)SQLEndTran }, /* 25 */ { SQL_API_SQLERROR, "SQLError", (void*)SQLError, (void*)SQLErrorW }, /* 26 */ { SQL_API_SQLEXECDIRECT, "SQLExecDirect", (void*)SQLExecDirect, (void*)SQLExecDirectW }, /* 27 */ { SQL_API_SQLEXECUTE, "SQLExecute", (void*)SQLExecute }, /* 28 */ { SQL_API_SQLEXTENDEDFETCH, "SQLExtendedFetch", (void*)SQLExtendedFetch }, /* 29 */ { SQL_API_SQLFETCH, "SQLFetch", (void*)SQLFetch }, /* 30 */ { SQL_API_SQLFETCHSCROLL, "SQLFetchScroll", (void*)SQLFetchScroll }, /* 31 */ { SQL_API_SQLFOREIGNKEYS, "SQLForeignKeys", (void*)SQLForeignKeys, (void*)SQLForeignKeysW }, /* 32 */ { SQL_API_SQLFREEENV, "SQLFreeEnv", (void*)SQLFreeEnv }, /* 33 */ { SQL_API_SQLFREEHANDLE, "SQLFreeHandle", (void*)SQLFreeHandle }, /* 34 */ { SQL_API_SQLFREESTMT, "SQLFreeStmt", (void*)SQLFreeStmt }, /* 35 */ { SQL_API_SQLFREECONNECT, "SQLFreeConnect", (void*)SQLFreeConnect }, /* 36 */ { SQL_API_SQLGETCONNECTATTR, "SQLGetConnectAttr", (void*)SQLGetConnectAttr, (void*)SQLGetConnectAttrW }, /* 37 */ { SQL_API_SQLGETCONNECTOPTION, "SQLGetConnectOption", (void*)SQLGetConnectOption, (void*)SQLGetConnectOptionW }, /* 38 */ { SQL_API_SQLGETCURSORNAME, "SQLGetCursorName", (void*)SQLGetCursorName, (void*)SQLGetCursorNameW }, /* 39 */ { SQL_API_SQLGETDATA, "SQLGetData", (void*)SQLGetData }, /* 40 */ { SQL_API_SQLGETDESCFIELD, "SQLGetDescField", (void*)SQLGetDescField, (void*)SQLGetDescFieldW }, /* 41 */ { SQL_API_SQLGETDESCREC, "SQLGetDescRec", (void*)SQLGetDescRec, (void*)SQLGetDescRecW }, /* 42 */ { SQL_API_SQLGETDIAGFIELD, "SQLGetDiagField", (void*)SQLGetDiagField, (void*)SQLGetDiagFieldW }, /* 43 */ { SQL_API_SQLGETENVATTR, "SQLGetEnvAttr", (void*)SQLGetEnvAttr }, /* 44 */ { SQL_API_SQLGETFUNCTIONS, "SQLGetFunctions", (void*)SQLGetFunctions }, /* 45 */ { SQL_API_SQLGETINFO, "SQLGetInfo", (void*)SQLGetInfo, (void*)SQLGetInfoW }, /* 46 */ { SQL_API_SQLGETSTMTATTR, "SQLGetStmtAttr", (void*)SQLGetStmtAttr, (void*)SQLGetStmtAttrW }, /* 47 */ { SQL_API_SQLGETSTMTOPTION, "SQLGetStmtOption", (void*)SQLGetStmtOption }, /* 48 */ { SQL_API_SQLGETTYPEINFO, "SQLGetTypeInfo", (void*)SQLGetTypeInfo, (void*)SQLGetTypeInfoW }, /* 49 */ { SQL_API_SQLMORERESULTS, "SQLMoreResults", (void*)SQLMoreResults }, /* 50 */ { SQL_API_SQLNATIVESQL, "SQLNativeSql", (void*)SQLNativeSql, (void*)SQLNativeSqlW }, /* 51 */ { SQL_API_SQLNUMPARAMS, "SQLNumParams", (void*)SQLNumParams }, /* 52 */ { SQL_API_SQLNUMRESULTCOLS, "SQLNumResultCols", (void*)SQLNumResultCols }, /* 53 */ { SQL_API_SQLPARAMDATA, "SQLParamData", (void*)SQLParamData }, /* 54 */ { SQL_API_SQLPARAMOPTIONS, "SQLParamOptions", (void*)SQLParamOptions }, /* 55 */ { SQL_API_SQLPREPARE, "SQLPrepare", (void*)SQLPrepare, (void*)SQLPrepareW }, /* 56 */ { SQL_API_SQLPRIMARYKEYS, "SQLPrimaryKeys", (void*)SQLPrimaryKeys, (void*)SQLPrimaryKeysW }, /* 57 */ { SQL_API_SQLPROCEDURECOLUMNS, "SQLProcedureColumns", (void*)SQLProcedureColumns, (void*)SQLProcedureColumnsW }, /* 58 */ { SQL_API_SQLPROCEDURES, "SQLProcedures", (void*)SQLProcedures, (void*)SQLProceduresW }, /* 59 */ { SQL_API_SQLPUTDATA, "SQLPutData", (void*)SQLPutData }, /* 60 */ { SQL_API_SQLROWCOUNT, "SQLRowCount", (void*)SQLRowCount }, /* 61 */ { SQL_API_SQLSETCONNECTATTR, "SQLSetConnectAttr", (void*)SQLSetConnectAttr, (void*)SQLSetConnectAttrW }, /* 62 */ { SQL_API_SQLSETCONNECTOPTION, "SQLSetConnectOption", (void*)SQLSetConnectOption, (void*)SQLSetConnectOptionW }, /* 63 */ { SQL_API_SQLSETCURSORNAME, "SQLSetCursorName", (void*)SQLSetCursorName, (void*)SQLSetCursorNameW }, /* 64 */ { SQL_API_SQLSETDESCFIELD, "SQLSetDescField", (void*)SQLSetDescField, (void*)SQLSetDescFieldW }, /* 65 */ { SQL_API_SQLSETDESCREC, "SQLSetDescRec", (void*)SQLSetDescRec }, /* 66 */ { SQL_API_SQLSETENVATTR, "SQLSetEnvAttr", (void*)SQLSetEnvAttr }, /* 67 */ { SQL_API_SQLSETPARAM, "SQLSetParam", (void*)SQLSetParam }, /* 68 */ { SQL_API_SQLSETPOS, "SQLSetPos", (void*)SQLSetPos }, /* 69 */ { SQL_API_SQLSETSCROLLOPTIONS, "SQLSetScrollOptions", (void*)SQLSetScrollOptions }, /* 70 */ { SQL_API_SQLSETSTMTATTR, "SQLSetStmtAttr", (void*)SQLSetStmtAttr, (void*)SQLSetStmtAttrW }, /* 71 */ { SQL_API_SQLSETSTMTOPTION, "SQLSetStmtOption", (void*)SQLSetStmtOption }, /* 72 */ { SQL_API_SQLSPECIALCOLUMNS, "SQLSpecialColumns", (void*)SQLSpecialColumns, (void*)SQLSpecialColumnsW }, /* 73 */ { SQL_API_SQLSTATISTICS, "SQLStatistics", (void*)SQLStatistics, (void*)SQLStatisticsW }, /* 74 */ { SQL_API_SQLTABLEPRIVILEGES, "SQLTablePrivileges", (void*)SQLTablePrivileges, (void*)SQLTablePrivilegesW }, /* 75 */ { SQL_API_SQLTABLES, "SQLTables", (void*)SQLTables, (void*)SQLTablesW }, /* 76 */ { SQL_API_SQLTRANSACT, "SQLTransact", (void*)SQLTransact }, /* 77 */ { SQL_API_SQLGETDIAGREC, "SQLGetDiagRec", (void*)SQLGetDiagRec, (void*)SQLGetDiagRecW }, }; /* * connection pooling stuff */ CPOOL *pool_head = NULL; int pooling_enabled = 0; /* * helper function and macro to make setting any values set before connection * simplier */ #define DO_ATTR( connection, value, attr3, attr2 ) \ do_attr( connection, connection -> value, connection -> value##_set, attr3, \ attr2 ) static void do_attr( DMHDBC connection, int value, int value_set, int attr3, int attr2 ) { if ( value_set ) { if (CHECK_SQLSETCONNECTATTR( connection )) { SQLSETCONNECTATTR(connection, connection -> driver_dbc, attr3, value, sizeof( value )); } else if (CHECK_SQLSETCONNECTOPTION(connection) && attr2 ) { SQLSETCONNECTOPTION(connection, connection -> driver_dbc, attr2, value ); } } } /* * implement reference counting for driver libs */ struct lib_count { char *lib_name; int count; void *handle; struct lib_count *next; }; /* * I hate statics, but there is little option here, there can be multiple envs * so I can't save it in them, I do use a single static instance, this avoid * a potential leak if libodbc.so is dynamically loaded */ static struct lib_count *lib_list = NULL; static struct lib_count single_lib_count; static char single_lib_name[ INI_MAX_PROPERTY_VALUE + 1 ]; static void *odbc_dlopen( char *libname ) { void *hand; struct lib_count *list; mutex_lib_entry(); /* * have we already got it ? */ list = lib_list; while( list ) { if ( strcmp( list -> lib_name, libname ) == 0 ) { break; } list = list -> next; } if ( list ) { list -> count ++; hand = list -> handle; } else { hand = lt_dlopen( libname ); if ( hand ) { /* * If only one, then use the static space */ if ( lib_list == NULL ) { list = &single_lib_count; list -> next = lib_list; lib_list = list; list -> count = 1; list -> lib_name = single_lib_name; strcpy( single_lib_name, libname ); list -> handle = hand; } else { list = malloc( sizeof( struct lib_count )); list -> next = lib_list; lib_list = list; list -> count = 1; list -> lib_name = strdup( libname ); list -> handle = hand; } } } mutex_lib_exit(); return hand; } static odbc_dlclose( void *handle ) { struct lib_count *list, *prev; mutex_lib_entry(); /* * look for list entry */ list = lib_list; prev = NULL; while( list ) { if ( list -> handle == handle ) { break; } prev = list; list = list -> next; } /* * it should always be found, but you never know... */ if ( list ) { list -> count --; if ( list -> count < 1 ) { if ( list == &single_lib_count ) { if ( prev ) { prev -> next = list -> next; } else { lib_list = list -> next; } lt_dlclose( list -> handle ); } else { free( list -> lib_name ); lt_dlclose( list -> handle ); if ( prev ) { prev -> next = list -> next; } else { lib_list = list -> next; } free( list ); } } } else { lt_dlclose( handle ); } mutex_lib_exit(); } /* * open the library, extract the names, and do setup * before the actual connect. */ int __connect_part_one( DMHDBC connection, char *driver_lib, char *driver_name, int *warnings ) { int i; int ret; SQLCHAR s0[ 20 ]; int threading_level; char threading_string[ 50 ]; char mapping_string[ 50 ]; char disable_gf[ 50 ]; char fake_string[ 50 ]; int fake_unicode; struct env_lib_struct *env_lib_list, *env_lib_prev; /* * check to see if we want to alter the default threading level * before opening the lib */ *warnings = FALSE; SQLGetPrivateProfileString( driver_name, "Threading", "3", threading_string, sizeof( threading_string ), "ODBCINST.INI" ); threading_level = atoi( threading_string ); if ( threading_level >= 0 && threading_level <= 3 ) { dbc_change_thread_support( connection, threading_level ); } connection -> threading_level = threading_level; /* * do we want to disable the SQLFetch -> SQLExtendedFetch * mapping ? */ SQLGetPrivateProfileString( driver_name, "ExFetchMapping", "1", mapping_string, sizeof( mapping_string ), "ODBCINST.INI" ); connection -> ex_fetch_mapping = atoi( mapping_string ); /* * Does the driver have support for SQLGetFunctions ? */ SQLGetPrivateProfileString( driver_name, "DisableGetFunctions", "0", disable_gf, sizeof( disable_gf ), "ODBCINST.INI" ); connection -> disable_gf = atoi( disable_gf ); /* * do we want to keep hold of the lib handle, DB2 fails if we close */ SQLGetPrivateProfileString( driver_name, "DontDLClose", "1", mapping_string, sizeof( mapping_string ), "ODBCINST.INI" ); connection -> dont_dlclose = atoi( mapping_string ) != 0; /* * can we pool this one */ SQLGetPrivateProfileString( driver_name, "CPTimeout", "0", mapping_string, sizeof( mapping_string ), "ODBCINST.INI" ); connection -> pooling_timeout = atoi( mapping_string ); /* * have we got a time-to-live value for the pooling */ SQLGetPrivateProfileString( driver_name, "CPTimeToLive", "0", mapping_string, sizeof( mapping_string ), "ODBCINST.INI" ); connection -> ttl = atoi( mapping_string ); /* * Is there a check SQL statement */ SQLGetPrivateProfileString( driver_name, "CPProbe", "", connection -> probe_sql, sizeof( connection -> probe_sql ), "ODBCINST.INI" ); /* * if pooling then leave the dlopen */ if ( connection -> pooling_timeout > 0 ) { connection -> dont_dlclose = 1; } SQLGetPrivateProfileString( driver_name, "FakeUnicode", "0", fake_string, sizeof( fake_string ), "ODBCINST.INI" ); fake_unicode = atoi( fake_string ); #ifdef HAVE_ICONV SQLGetPrivateProfileString( driver_name, "IconvEncoding", DEFAULT_ICONV_ENCODING, connection->unicode_string, sizeof( connection->unicode_string ), "ODBCINST.INI" ); #endif /* * initialize unicode */ if ( !unicode_setup( connection )) { char txt[ 256 ]; sprintf( txt, "Can't initiate unicode conversion" ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, txt ); __post_internal_error( &connection -> error, ERROR_IM003, txt, connection -> environment -> requested_version ); *warnings = TRUE; } /* * initialize libtool */ lt_dlinit(); /* * open the lib */ connection -> driver_env = (DRV_SQLHANDLE)NULL; connection -> driver_dbc = (DRV_SQLHANDLE)NULL; connection -> functions = NULL; connection -> dl_handle = NULL; if ( !(connection -> dl_handle = odbc_dlopen( driver_lib ))) { char txt[ 2048 ]; sprintf( txt, "Can't open lib '%s' : %s", driver_lib, lt_dlerror()); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, txt ); __post_internal_error( &connection -> error, ERROR_01000, txt, connection -> environment -> requested_version ); return 0; } /* * try and extract the ini and fini functions, and call ini if its * found */ connection -> ini_func.func = (SQLRETURN (*)()) lt_dlsym( connection -> dl_handle, ODBC_INI_FUNCTION ); connection -> fini_func.func = (SQLRETURN (*)()) lt_dlsym( connection -> dl_handle, ODBC_FINI_FUNCTION ); if ( connection -> ini_func.func ) { connection -> ini_func.func(); } /* * extract all the function entry points */ if ( !(connection -> functions = malloc( sizeof( template_func )))) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_HY001, NULL, connection -> environment -> requested_version ); return 0; } memcpy( connection -> functions, template_func, sizeof( template_func )); for ( i = 0; i < sizeof( template_func ) / sizeof( template_func[ 0 ] ); i ++ ) { char name[ 128 ]; connection -> functions[ i ].func = (SQLRETURN (*)()) lt_dlsym( connection -> dl_handle, connection -> functions[ i ].name ); if ( connection -> functions[ i ].dm_funcW ) { /* * get ANSI version from driver */ if ( fake_unicode ) { sprintf( name, "%sW", connection -> functions[ i ].name ); } else { sprintf( name, "%sA", connection -> functions[ i ].name ); } connection -> functions[ i ].funcA = (SQLRETURN (*)()) lt_dlsym( connection -> dl_handle, name ); if ( connection -> functions[ i ].funcA && !connection -> functions[ i ].func ) { connection -> functions[ i ].func = connection -> functions[ i ].funcA; } else if ( connection -> functions[ i ].func && !connection -> functions[ i ].funcA ) { connection -> functions[ i ].funcA = connection -> functions[ i ].func; } /* * get UNICODE version from driver */ sprintf( name, "%sW", connection -> functions[ i ].name ); connection -> functions[ i ].funcW = (SQLRETURN (*)()) lt_dlsym( connection -> dl_handle, name ); } else { connection -> functions[ i ].funcA = connection -> functions[ i ].funcW = NULL; } /* * blank out ones that are in the DM to fix a big * with glib 2.0.6 */ if ( connection -> functions[ i ].func && (void*)connection -> functions[ i ].func == (void*)connection -> functions[ i ].dm_func ) { connection -> functions[ i ].func = NULL; } if ( connection -> functions[ i ].funcW && (void*)connection -> functions[ i ].funcW == (void*)connection -> functions[ i ].dm_funcW ) { connection -> functions[ i ].funcW = NULL; } connection -> functions[ i ].can_supply = ( connection -> functions[ i ].func != NULL ) || ( connection -> functions[ i ].funcW != NULL ); } /* * check if this is the first time this driver has been loaded under this * lib, if not then reuse the env, else get the env from the driver */ mutex_lib_entry(); env_lib_list = connection -> environment -> env_lib_list; env_lib_prev = NULL; while( env_lib_list ) { if ( strcmp( driver_lib, env_lib_list -> lib_name ) == 0 ) { break; } env_lib_prev = env_lib_list; env_lib_list = env_lib_list -> next; } if ( env_lib_list ) { /* * Fix by qcai@starquest.com */ int actual_version = 0; int ret; env_lib_list -> count ++; connection -> driver_env = env_lib_list -> env_handle; connection -> env_list_ent = env_lib_list; /* * Fix by qcai@starquest.com, Feb 5, 2003 * * Since the driver was already loaded before, the version number * has been properly figured out. This connection just need to get * it from priviously set value. Without it, the version number is * at initial value of 0 which causes this and subsequence connection * to return a warning message "Driver does not support the requested * version". */ /* * Change from Rafie Einstein to check SQLGETENVATTR is valid */ if ((CHECK_SQLGETENVATTR( connection ))) { ret = SQLGETENVATTR( connection, connection -> driver_env, SQL_ATTR_ODBC_VERSION, &actual_version, 0, NULL ); } else { ret = SQL_SUCCESS; actual_version = SQL_OV_ODBC2; } if ( !ret ) { connection -> driver_version = actual_version; } else { connection -> driver_version = connection -> environment -> requested_version; } /* end of fix */ } else { env_lib_list = calloc( 1, sizeof( struct env_lib_struct )); env_lib_list -> count = 1; env_lib_list -> next = connection -> environment -> env_lib_list; env_lib_list -> lib_name = strdup( driver_lib ); connection -> env_list_ent = env_lib_list; connection -> environment -> env_lib_list = env_lib_list; __set_local_attributes( connection, SQL_HANDLE_ENV ); /* * allocate a env handle */ if ( CHECK_SQLALLOCHANDLE( connection )) { ret = SQLALLOCHANDLE( connection, SQL_HANDLE_ENV, SQL_NULL_HENV, &connection -> driver_env, connection ); } else if ( CHECK_SQLALLOCENV( connection )) { ret = SQLALLOCENV( connection, &connection -> driver_env ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM004" ); __post_internal_error( &connection -> error, ERROR_IM004, NULL, connection -> environment -> requested_version ); if ( env_lib_list -> count == 1 ) { if ( env_lib_prev ) { env_lib_prev -> next = env_lib_list -> next; } else { connection -> environment -> env_lib_list = env_lib_list -> next; } free( env_lib_list -> lib_name ); free( env_lib_list ); } else { env_lib_list -> count --; } mutex_lib_exit(); return 0; } env_lib_list -> env_handle = connection -> driver_env; if ( ret ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM004" ); __post_internal_error( &connection -> error, ERROR_IM004, NULL, connection -> environment -> requested_version ); if ( env_lib_list -> count == 1 ) { if ( env_lib_prev ) { env_lib_prev -> next = env_lib_list -> next; } else { connection -> environment -> env_lib_list = env_lib_list -> next; } free( env_lib_list -> lib_name ); free( env_lib_list ); } else { env_lib_list -> count --; } mutex_lib_exit(); return 0; } /* * if it looks like a 3.x driver, try setting the interface type * to 3.x */ if ( CHECK_SQLSETENVATTR( connection )) { ret = SQLSETENVATTR( connection, connection -> driver_env, SQL_ATTR_ODBC_VERSION, connection -> environment -> requested_version, 0 ); /* * if it don't set then assume a 2.x driver */ if ( ret ) { connection -> driver_version = SQL_OV_ODBC2; } else { if ( CHECK_SQLGETENVATTR( connection )) { SQLINTEGER actual_version; ret = SQLGETENVATTR( connection, connection -> driver_env, SQL_ATTR_ODBC_VERSION, &actual_version, 0, NULL ); if ( !ret ) { connection -> driver_version = actual_version; } else { connection -> driver_version = connection -> environment -> requested_version; } } else { connection -> driver_version = connection -> environment -> requested_version; } } } else { connection -> driver_version = SQL_OV_ODBC2; } /* * set any env attributes */ __set_attributes( connection, SQL_HANDLE_ENV ); } mutex_lib_exit(); /* * allocate a connection handle */ if ( connection -> driver_version == SQL_OV_ODBC3 ) { ret = SQL_SUCCESS; if ( CHECK_SQLALLOCHANDLE( connection )) { ret = SQLALLOCHANDLE( connection, SQL_HANDLE_DBC, connection -> driver_env, &connection -> driver_dbc, connection ); if ( ret ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM005" ); __post_internal_error( &connection -> error, ERROR_IM005, NULL, connection -> environment -> requested_version ); } } else if ( CHECK_SQLALLOCCONNECT( connection )) { ret = SQLALLOCCONNECT( connection, connection -> driver_env, &connection -> driver_dbc ); if ( ret ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM005" ); __post_internal_error( &connection -> error, ERROR_IM005, NULL, connection -> environment -> requested_version ); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM005" ); __post_internal_error( &connection -> error, ERROR_IM005, NULL, connection -> environment -> requested_version ); return 0; } if ( ret ) { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; /* * get the errors from the driver before * loseing the connection */ if ( CHECK_SQLGETDIAGREC( connection )) { int rec = 1; do { ret = SQLGETDIAGREC( connection, SQL_HANDLE_ENV, connection -> driver_env, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, message_text ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } else if ( CHECK_SQLERROR( connection )) { do { ret = SQLERROR( connection, connection -> driver_env, SQL_NULL_HDBC, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, message_text ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } return 0; } } else { ret = SQL_SUCCESS; if ( CHECK_SQLALLOCCONNECT( connection )) { ret = SQLALLOCCONNECT( connection, connection -> driver_env, &connection -> driver_dbc ); if ( ret ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM005" ); __post_internal_error( &connection -> error, ERROR_IM005, NULL, connection -> environment -> requested_version ); } } else if ( CHECK_SQLALLOCHANDLE( connection )) { ret = SQLALLOCHANDLE( connection, SQL_HANDLE_DBC, connection -> driver_env, &connection -> driver_dbc, connection ); if ( ret ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM005" ); __post_internal_error( &connection -> error, ERROR_IM005, NULL, connection -> environment -> requested_version ); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM005" ); __post_internal_error( &connection -> error, ERROR_IM005, NULL, connection -> environment -> requested_version ); return 0; } if ( ret ) { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; /* * get the errors from the driver before * loseing the connection */ if ( CHECK_SQLERROR( connection )) { do { ret = SQLERROR( connection, connection -> driver_env, SQL_NULL_HDBC, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, message_text ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } else if ( CHECK_SQLGETDIAGREC( connection )) { int rec = 1; do { ret = SQLGETDIAGREC( connection, SQL_HANDLE_ENV, connection -> driver_env, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, message_text ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } return 0; } } /* * set any connection atributes */ DO_ATTR( connection, access_mode, SQL_ATTR_ACCESS_MODE, SQL_ACCESS_MODE ); DO_ATTR( connection, login_timeout, SQL_ATTR_LOGIN_TIMEOUT, SQL_LOGIN_TIMEOUT ); DO_ATTR( connection, auto_commit, SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT ); DO_ATTR( connection, async_enable, SQL_ATTR_ASYNC_ENABLE, SQL_ASYNC_ENABLE ); DO_ATTR( connection, auto_ipd, SQL_ATTR_AUTO_IPD, 0 ); DO_ATTR( connection, connection_timeout, SQL_ATTR_CONNECTION_TIMEOUT, 0 ); DO_ATTR( connection, metadata_id, SQL_ATTR_METADATA_ID, 0 ); DO_ATTR( connection, packet_size, SQL_ATTR_PACKET_SIZE, SQL_PACKET_SIZE ); DO_ATTR( connection, quite_mode, SQL_ATTR_QUIET_MODE, SQL_QUIET_MODE ); DO_ATTR( connection, txn_isolation, SQL_ATTR_TXN_ISOLATION, SQL_TXN_ISOLATION ); while ( connection -> save_attr ) { struct save_attr *sa; sa = connection -> save_attr; if ( sa -> str_attr ) { if (CHECK_SQLSETCONNECTATTR( connection )) { SQLSETCONNECTATTR(connection, connection -> driver_dbc, sa -> attr_type, sa -> str_attr, sa -> str_len ); } else if (CHECK_SQLSETCONNECTOPTION(connection)) { SQLSETCONNECTOPTION(connection, connection -> driver_dbc, sa -> attr_type, sa -> str_attr ); } free( sa -> str_attr ); } else { if (CHECK_SQLSETCONNECTATTR( connection )) { SQLSETCONNECTATTR(connection, connection -> driver_dbc, sa -> attr_type, sa -> int_attr, sa -> str_len ); } else if (CHECK_SQLSETCONNECTOPTION(connection)) { SQLSETCONNECTOPTION(connection, connection -> driver_dbc, sa -> attr_type, sa -> int_attr ); } } connection -> save_attr = sa -> next; free( sa ); } /* * set any preset connection attributes */ __set_attributes( connection, SQL_HANDLE_DBC ); return 1; } /* * extract the available functions and call SQLSetConnectAttr */ int __connect_part_two( DMHDBC connection ) { int i, use_cursor; SQLCHAR s0[ 20 ]; /* * Call SQLFunctions to get the supported list and * mask out those that are exported but not supported */ if ( CHECK_SQLGETFUNCTIONS( connection ) && !connection -> disable_gf ) { SQLRETURN ret; SQLUSMALLINT supported_funcs[ SQL_API_ODBC3_ALL_FUNCTIONS_SIZE ]; /* * try using fast version, but only if the driver is set to ODBC 3, * some drivers (SAPDB) fail to return the correct values in this situation */ if ( CHECK_SQLALLOCHANDLE( connection ) && connection -> driver_version == SQL_OV_ODBC3 ) { ret = SQLGETFUNCTIONS( connection, connection -> driver_dbc, SQL_API_ODBC3_ALL_FUNCTIONS, supported_funcs ); } else { ret = SQL_ERROR; } if ( ret == SQL_SUCCESS ) { for ( i = 0; i < sizeof( template_func ) / sizeof( template_func[ 0 ] ); i ++ ) { if ( connection -> functions[ i ].func ) { SQLRETURN ret; SQLUSMALLINT supported; if ( i > 100 ) { supported = SQL_FALSE; } else { supported = SQL_FUNC_EXISTS( supported_funcs, connection -> functions[ i ].ordinal ); } if ( supported == SQL_FALSE ) { connection -> functions[ i ].func = NULL; connection -> functions[ i ].can_supply = 0; } } } } else { for ( i = 0; i < sizeof( template_func ) / sizeof( template_func[ 0 ] ); i ++ ) { if ( connection -> functions[ i ].func ) { SQLRETURN ret; SQLUSMALLINT supported; if ( i > 100 ) { supported = SQL_FALSE; } else { ret = SQLGETFUNCTIONS( connection, connection -> driver_dbc, connection -> functions[ i ].ordinal, &supported ); } if ( supported == SQL_FALSE ) { connection -> functions[ i ].func = NULL; connection -> functions[ i ].can_supply = 0; } } } } } /* * CoLAttributes is the same as ColAttribute */ if ( connection -> functions[ DM_SQLCOLATTRIBUTE ].func && !connection -> functions[ DM_SQLCOLATTRIBUTES ].func ) { connection -> functions[ DM_SQLCOLATTRIBUTES ].can_supply = 1; } if ( connection -> functions[ DM_SQLCOLATTRIBUTES ].func && !connection -> functions[ DM_SQLCOLATTRIBUTE ].func ) { connection -> functions[ DM_SQLCOLATTRIBUTE ].can_supply = 1; } /* * mark the functions that the driver manager does */ /* * SQLDatasources */ connection -> functions[ DM_SQLDATASOURCES ].can_supply = 1; /* * SQLDrivers */ connection -> functions[ DM_SQLDRIVERS ].can_supply = 1; /* * SQLAllocHandleStd */ connection -> functions[ DM_SQLALLOCHANDLESTD ].can_supply = 1; /* * add all the functions that are supported via ODBC 2<->3 * issues */ if ( !connection -> functions[ DM_SQLALLOCENV ].func && connection -> functions[ DM_SQLALLOCHANDLE ].func ) { connection -> functions[ DM_SQLALLOCENV ].can_supply = 1; } if ( !connection -> functions[ DM_SQLALLOCCONNECT ].func && connection -> functions[ DM_SQLALLOCHANDLE ].func ) { connection -> functions[ DM_SQLALLOCCONNECT ].can_supply = 1; } if ( !connection -> functions[ DM_SQLALLOCSTMT ].func && connection -> functions[ DM_SQLALLOCHANDLE ].func ) { connection -> functions[ DM_SQLALLOCSTMT ].can_supply = 1; } if ( !connection -> functions[ DM_SQLFREEENV ].func && connection -> functions[ DM_SQLFREEHANDLE ].func ) { connection -> functions[ DM_SQLFREEENV ].can_supply = 1; } if ( !connection -> functions[ DM_SQLFREECONNECT ].func && connection -> functions[ DM_SQLFREEHANDLE ].func ) { connection -> functions[ DM_SQLFREECONNECT ].can_supply = 1; } if ( !connection -> functions[ DM_SQLGETDIAGREC ].func && connection -> functions[ DM_SQLERROR ].func ) { connection -> functions[ DM_SQLGETDIAGREC ].can_supply = 1; } if ( !connection -> functions[ DM_SQLGETDIAGFIELD ].func && connection -> functions[ DM_SQLERROR ].func ) { connection -> functions[ DM_SQLGETDIAGFIELD ].can_supply = 1; } if ( !connection -> functions[ DM_SQLERROR ].func && connection -> functions[ DM_SQLGETDIAGREC ].func ) { connection -> functions[ DM_SQLERROR ].can_supply = 1; } /* * ODBC 3 still needs SQLFreeStmt */ /* * this is only partial, as we can't support a descriptor alloc */ if ( !connection -> functions[ DM_SQLALLOCHANDLE ].func && connection -> functions[ DM_SQLALLOCENV ].func && connection -> functions[ DM_SQLALLOCCONNECT ].func && connection -> functions[ DM_SQLALLOCHANDLE ].func ) { connection -> functions[ DM_SQLALLOCHANDLE ].can_supply = 1; } if ( !connection -> functions[ DM_SQLFREEHANDLE ].func && connection -> functions[ DM_SQLFREEENV ].func && connection -> functions[ DM_SQLFREECONNECT ].func && connection -> functions[ DM_SQLFREEHANDLE ].func ) { connection -> functions[ DM_SQLFREEHANDLE ].can_supply = 1; } if ( !connection -> functions[ DM_SQLBINDPARAM ].func && connection -> functions[ DM_SQLBINDPARAMETER ].func ) { connection -> functions[ DM_SQLBINDPARAM ].can_supply = 1; } else if ( !connection -> functions[ DM_SQLBINDPARAMETER ].func && connection -> functions[ DM_SQLBINDPARAM ].func ) { connection -> functions[ DM_SQLBINDPARAMETER ].can_supply = 1; } if ( !connection -> functions[ DM_SQLGETCONNECTOPTION ].func && connection -> functions[ DM_SQLGETCONNECTATTR ].func ) { connection -> functions[ DM_SQLGETCONNECTOPTION ].can_supply = 1; } else if ( !connection -> functions[ DM_SQLGETCONNECTATTR ].func && connection -> functions[ DM_SQLGETCONNECTOPTION ].func ) { connection -> functions[ DM_SQLGETCONNECTATTR ].can_supply = 1; } if ( !connection -> functions[ DM_SQLGETSTMTOPTION ].func && connection -> functions[ DM_SQLGETSTMTATTR ].func ) { connection -> functions[ DM_SQLGETSTMTOPTION ].can_supply = 1; } else if ( !connection -> functions[ DM_SQLGETSTMTATTR ].func && connection -> functions[ DM_SQLGETSTMTOPTION ].func ) { connection -> functions[ DM_SQLGETSTMTATTR ].can_supply = 1; } if ( !connection -> functions[ DM_SQLPARAMOPTIONS ].func && connection -> functions[ DM_SQLSETSTMTATTR ].func ) { connection -> functions[ DM_SQLPARAMOPTIONS ].can_supply = 1; } if ( !connection -> functions[ DM_SQLSETCONNECTOPTION ].func && connection -> functions[ DM_SQLSETCONNECTATTR ].func ) { connection -> functions[ DM_SQLSETCONNECTOPTION ].can_supply = 1; } else if ( !connection -> functions[ DM_SQLSETCONNECTATTR ].func && connection -> functions[ DM_SQLSETCONNECTOPTION ].func ) { connection -> functions[ DM_SQLSETCONNECTATTR ].can_supply = 1; } if ( !connection -> functions[ DM_SQLSETPARAM ].func && connection -> functions[ DM_SQLBINDPARAMETER ].func ) { connection -> functions[ DM_SQLSETPARAM ].can_supply = 1; } if ( !connection -> functions[ DM_SQLSETSCROLLOPTIONS ].func && connection -> functions[ DM_SQLSETSTMTATTR ].func ) { connection -> functions[ DM_SQLSETSCROLLOPTIONS ].can_supply = 1; } if ( !connection -> functions[ DM_SQLSETSTMTOPTION ].func && connection -> functions[ DM_SQLSETSTMTATTR ].func ) { connection -> functions[ DM_SQLSETSTMTOPTION ].can_supply = 1; } else if ( !connection -> functions[ DM_SQLSETSTMTATTR ].func && connection -> functions[ DM_SQLSETSTMTOPTION ].func ) { connection -> functions[ DM_SQLSETSTMTATTR ].can_supply = 1; } if ( !connection -> functions[ DM_SQLTRANSACT ].func && connection -> functions[ DM_SQLENDTRAN ].func ) { connection -> functions[ DM_SQLTRANSACT ].can_supply = 1; } else if ( !connection -> functions[ DM_SQLENDTRAN ].func && connection -> functions[ DM_SQLTRANSACT ].func ) { connection -> functions[ DM_SQLENDTRAN ].can_supply = 1; } /* * we can always do this */ if ( !connection -> functions[ DM_SQLGETFUNCTIONS ].func ) { connection -> functions[ DM_SQLGETFUNCTIONS ].can_supply = 1; } /* * TO_DO get some driver settings, such as the GETDATA_EXTENSTION * it supports */ /* * see if it's a version 3 driver so we can do descriptor * stuff. */ connection -> driver_act_ver = 0; if ( CHECK_SQLGETINFO( connection ) || CHECK_SQLGETINFOW( connection )) { char txt[ 20 ]; SQLRETURN ret; ret = __SQLGetInfo( connection, SQL_DRIVER_ODBC_VER, txt, sizeof( txt ), NULL ); if ( SQL_SUCCEEDED( ret )) { connection -> driver_act_ver = atoi( txt ); } if ( connection -> driver_act_ver == SQL_OV_ODBC3 ) { ret = __SQLGetInfo( connection, SQL_XOPEN_CLI_YEAR, txt, sizeof( connection -> cli_year ), NULL ); if ( SQL_SUCCEEDED( ret )) { strcpy( connection -> cli_year, txt ); } } } /* * TO_DO now we should pass any SQLSetEnvAttr settings */ /* * now we have a connection handle, and we can check to see if * we need to use the cursor library */ if ( connection -> cursors == SQL_CUR_USE_ODBC ) { use_cursor = 1; } else if ( connection -> cursors == SQL_CUR_USE_IF_NEEDED ) { /* * get scrollable info */ if ( !CHECK_SQLGETINFO( connection ) && !CHECK_SQLGETINFOW( connection )) { /* * bit of a retarded driver, better give up */ use_cursor = 0; } else { SQLRETURN ret; SQLUINTEGER val; /* * check if static cursors support scrolling */ if ( connection -> driver_act_ver == SQL_OV_ODBC3 ) { ret = __SQLGetInfo( connection, SQL_STATIC_CURSOR_ATTRIBUTES1, &val, sizeof( val ), NULL ); if ( ret != SQL_SUCCESS ) { use_cursor = 1; } else { /* * do we need it ? */ if ( !( val & SQL_CA1_ABSOLUTE )) { use_cursor = 1; } else { use_cursor = 0; } } } else { ret = __SQLGetInfo( connection, SQL_FETCH_DIRECTION, &val, sizeof( val ), NULL ); if ( ret != SQL_SUCCESS ) { use_cursor = 1; } else { /* * are we needed */ if ( !( val & SQL_FD_FETCH_PRIOR )) { use_cursor = 1; } else { use_cursor = 0; } } } } } else { use_cursor = 0; } /* * if required connect to the cursor lib */ if ( use_cursor ) { char ext[ 32 ]; char name[ 128 ]; int (*cl_connect)(void*, struct driver_helper_funcs*); struct driver_helper_funcs dh; /* * SHLIBEXT can end up unset on some distributions (suze) */ if ( strlen( SHLIBEXT ) == 0 ) { strcpy( ext, ".so" ); } else { strcpy( ext, SHLIBEXT ); } sprintf( name, "%s%s%s", CURSOR_LIB, ext, CURSOR_LIB_VER ); if ( !(connection -> cl_handle = odbc_dlopen( name ))) { /* * try again */ #ifdef __VMS sprintf( name, "%s:%s%s%s", SYSTEM_LIB_PATH, CURSOR_LIB, ext, CURSOR_LIB_VER ); #else #ifdef __OS2__ /* OS/2 does not use the system_lib_path or version defines to construct a name */ sprintf( name, "%s%s", CURSOR_LIB, ext ); #else sprintf( name, "%s/%s%s%s", SYSTEM_LIB_PATH, CURSOR_LIB, ext, CURSOR_LIB_VER ); #endif #endif if ( !(connection -> cl_handle = odbc_dlopen( name ))) { char txt[ 256 ]; sprintf( txt, "Can't open cursor lib '%s' : %s", CURSOR_LIB, lt_dlerror()); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, txt ); __post_internal_error( &connection -> error, ERROR_01000, txt, connection -> environment -> requested_version ); return 0; } } if ( !( cl_connect = (int(*)(void*, struct driver_helper_funcs* ))lt_dlsym( connection -> cl_handle, "CLConnect" ))) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 01000 Unable to load Cursor Lib" ); __post_internal_error( &connection -> error, ERROR_01000, "Unable to load cursor library", connection -> environment -> requested_version ); odbc_dlclose( connection -> cl_handle ); connection -> cl_handle = NULL; return 0; } /* * setup helper functions */ dh.__post_internal_error_ex = __post_internal_error_ex; dh.__post_internal_error = __post_internal_error; dh.dm_log_write = dm_log_write; if ( cl_connect( connection, &dh ) != SQL_SUCCESS ) { odbc_dlclose( connection -> cl_handle ); connection -> cl_handle = NULL; return 0; } } else { connection -> cl_handle = NULL; } return 1; } static void release_env( DMHDBC connection ) { struct env_lib_struct *env_lib_list, *env_lib_prev; int ret; if ( connection -> driver_env ) { env_lib_prev = env_lib_list = NULL; if ( connection -> env_list_ent ) { env_lib_list = connection -> environment -> env_lib_list; while( env_lib_list ) { if ( env_lib_list == connection -> env_list_ent ) { break; } env_lib_prev = env_lib_list; env_lib_list = env_lib_list -> next; } } if ( env_lib_list && env_lib_list -> count > 1 ) { mutex_lib_entry(); env_lib_list -> count --; mutex_lib_exit(); } else { if ( connection -> driver_version == SQL_OV_ODBC3 ) { ret = SQL_ERROR; if ( CHECK_SQLFREEHANDLE( connection )) { ret = SQLFREEHANDLE( connection, SQL_HANDLE_ENV, connection -> driver_env ); } else if ( CHECK_SQLFREEENV( connection )) { ret = SQLFREEENV( connection, connection -> driver_env ); } if ( !ret ) connection -> driver_env = (DRV_SQLHANDLE)NULL; } else { ret = SQL_ERROR; if ( CHECK_SQLFREEENV( connection )) { ret = SQLFREEENV( connection, connection -> driver_env ); } else if ( CHECK_SQLFREEHANDLE( connection )) { ret = SQLFREEHANDLE( connection, SQL_HANDLE_ENV, connection -> driver_env ); } if ( !ret ) connection -> driver_env = (DRV_SQLHANDLE)NULL; } /* * remove the entry */ mutex_lib_entry(); if ( env_lib_prev ) { env_lib_prev -> next = env_lib_list -> next; } else { if ( env_lib_list ) { connection -> environment -> env_lib_list = env_lib_list -> next; } } if ( env_lib_list ) { free( env_lib_list -> lib_name ); free( env_lib_list ); } mutex_lib_exit(); } } } /* * clean up after the first part of the connect */ void __disconnect_part_one( DMHDBC connection ) { int ret = SQL_ERROR; /* * try a version 3 disconnect first on the connection */ if ( connection -> driver_dbc ) { if ( connection -> driver_version == SQL_OV_ODBC3 ) { if ( CHECK_SQLFREEHANDLE( connection )) { ret = SQLFREEHANDLE( connection, SQL_HANDLE_DBC, connection -> driver_dbc ); } else if ( CHECK_SQLFREECONNECT( connection )) { ret = SQLFREECONNECT( connection, connection -> driver_dbc ); } if ( !ret ) { connection -> driver_dbc = (DRV_SQLHANDLE)NULL; } } else { if ( CHECK_SQLFREECONNECT( connection )) { ret = SQLFREECONNECT( connection, connection -> driver_dbc ); } else if ( CHECK_SQLFREEHANDLE( connection )) { ret = SQLFREEHANDLE( connection, SQL_HANDLE_DBC, connection -> driver_dbc ); } if ( !ret ) { connection -> driver_dbc = (DRV_SQLHANDLE)NULL; } } connection -> driver_dbc = (DRV_SQLHANDLE)NULL; } /* * now disconnect the environment, if its the last usage on the connection */ if ( connection -> driver_env ) { release_env( connection ); } connection -> driver_env = (DRV_SQLHANDLE)NULL; /* * unload the lib */ if ( connection -> cl_handle ) { odbc_dlclose( connection -> cl_handle ); connection -> cl_handle = NULL; } if ( connection -> dl_handle ) { if ( !connection -> dont_dlclose ) { /* * call fini function if found */ if ( connection -> fini_func.func ) { connection -> fini_func.func(); } odbc_dlclose( connection -> dl_handle ); } connection -> dl_handle = NULL; } /* * free some memory */ if ( connection -> functions ) { free( connection -> functions ); connection -> functions = NULL; } } void __disconnect_part_two( DMHDBC connection ) { if ( CHECK_SQLDISCONNECT( connection )) { SQLDISCONNECT( connection, connection -> driver_dbc ); } } /* * final clean up */ void __disconnect_part_four( DMHDBC connection ) { /* * now disconnect the environment, if its the last usage on the connection */ release_env( connection ); connection -> driver_env = (DRV_SQLHANDLE)NULL; /* * unload the lib */ if ( connection -> cl_handle ) { odbc_dlclose( connection -> cl_handle ); connection -> cl_handle = NULL; } if ( connection -> dl_handle ) { /* * this is safe, because the dlopen function will reuse the handle if we * open the same lib again */ if ( !connection -> dont_dlclose ) { if ( connection -> fini_func.func ) { connection -> fini_func.func(); } odbc_dlclose( connection -> dl_handle ); } connection -> dl_handle = NULL; } /* * shutdown unicode */ unicode_shutdown( connection ); /* * free some memory */ if ( connection -> functions ) { free( connection -> functions ); connection -> functions = NULL; } connection -> state = STATE_C2; /* * now clean up any statements that are left about */ __clean_stmt_from_dbc( connection ); __clean_desc_from_dbc( connection ); } /* * normal disconnect */ void __disconnect_part_three( DMHDBC connection ) { struct env_lib_struct *env_lib_list, *env_lib_prev; if ( connection -> driver_version == SQL_OV_ODBC3 ) { if ( CHECK_SQLFREEHANDLE( connection )) { SQLFREEHANDLE( connection, SQL_HANDLE_DBC, connection -> driver_dbc ); } else if ( CHECK_SQLFREECONNECT( connection )) { SQLFREECONNECT( connection, connection -> driver_dbc ); } } else { if ( CHECK_SQLFREECONNECT( connection )) { SQLFREECONNECT( connection, connection -> driver_dbc ); } else if ( CHECK_SQLFREEHANDLE( connection )) { SQLFREEHANDLE( connection, SQL_HANDLE_DBC, connection -> driver_dbc ); } } connection -> driver_dbc = (DRV_SQLHANDLE)NULL; __disconnect_part_four( connection ); } /* * interface for SQLGetFunctions */ void __check_for_function( DMHDBC connection, SQLUSMALLINT function_id, SQLUSMALLINT *supported ) { int i; if ( function_id == SQL_API_ODBC3_ALL_FUNCTIONS ) { for ( i = 0; i < SQL_API_ODBC3_ALL_FUNCTIONS_SIZE; i ++ ) { supported[ i ] = 0x0000; } for ( i = 0; i < sizeof( template_func ) / sizeof( template_func[ 0 ] ); i ++ ) { int id = connection -> functions[ i ].ordinal; if ( connection -> functions[ i ].can_supply ) supported[ id >> 4 ] |= ( 1 << ( id & 0x000F )); } } else if ( function_id == SQL_API_ALL_FUNCTIONS ) { for ( i = 0; i < 100; i ++ ) { supported[ i ] = SQL_FALSE; } for ( i = 0; i < sizeof( template_func ) / sizeof( template_func[ 0 ] ); i ++ ) { if ( connection -> functions[ i ].ordinal < 100 ) { if ( connection -> functions[ i ].can_supply ) supported[ connection -> functions[ i ].ordinal ] = SQL_TRUE; } } } else { *supported = SQL_FALSE; for ( i = 0; i < sizeof( template_func ) / sizeof( template_func[ 0 ] ); i ++ ) { if ( connection->functions[ i ].ordinal == function_id ) { if ( connection -> functions[ i ].can_supply ) *supported = SQL_TRUE; break; } } } } static int sql_strcmp( SQLCHAR *s1, SQLCHAR *s2, SQLSMALLINT l1, SQLSMALLINT l2 ) { if ( l1 != l2 ) { return 1; } if ( l1 == SQL_NTS ) { return strcmp((char*) s1, (char*)s2 ); } else { return memcmp( s1, s1, l1 ); } } static void close_pooled_connection( CPOOL *ptr ) { SQLRETURN ret; /* * disconnect from the driver */ if ( !CHECK_SQLDISCONNECT(( &ptr->connection ))) { return; } ret = SQLDISCONNECT(( &ptr -> connection ), ptr -> connection.driver_dbc ); if ( SQL_SUCCEEDED( ret )) { /* * complete disconnection from driver */ if ( ptr -> connection.driver_version == SQL_OV_ODBC3 ) { if ( CHECK_SQLFREEHANDLE(( &ptr -> connection ))) { SQLFREEHANDLE(( &ptr -> connection ), SQL_HANDLE_DBC, ptr -> connection.driver_dbc ); } else if ( CHECK_SQLFREECONNECT(( &ptr -> connection ))) { SQLFREECONNECT(( &ptr -> connection ), ptr -> connection.driver_dbc ); } } else { if ( CHECK_SQLFREECONNECT(( &ptr -> connection ))) { SQLFREECONNECT(( &ptr -> connection ), ptr -> connection.driver_dbc ); } else if ( CHECK_SQLFREEHANDLE(( &ptr -> connection ))) { SQLFREEHANDLE(( &ptr -> connection ), SQL_HANDLE_DBC, ptr -> connection.driver_dbc ); } } ptr -> connection.driver_dbc = (DRV_SQLHANDLE)NULL; /* * Only call freeenv if its the last connection to the driver */ release_env( &ptr -> connection ); ptr -> connection.driver_env = (DRV_SQLHANDLE)NULL; /* * unload the lib */ if ( ptr -> connection.cl_handle ) { odbc_dlclose( ptr -> connection.cl_handle ); ptr -> connection.cl_handle = NULL; } if ( ptr -> connection.dl_handle ) { /* * this is safe, because the dlopen function will reuse the handle if we * open the same lib again */ if ( !ptr -> connection.dont_dlclose ) { /* * call fini function if found */ if ( ptr -> connection.fini_func.func ) { ptr -> connection.fini_func.func(); } odbc_dlclose( ptr -> connection.dl_handle ); } ptr -> connection.dl_handle = NULL; } /* * shutdown unicode */ unicode_shutdown( &ptr -> connection ); /* * free some memory */ if ( ptr -> connection.functions ) { free( ptr -> connection.functions ); ptr -> connection.functions = NULL; } } else { /* * All we can do is tidy up */ ptr -> connection.driver_dbc = (DRV_SQLHANDLE)NULL; ptr -> connection.driver_env = (DRV_SQLHANDLE)NULL; /* * unload the lib */ if ( ptr -> connection.cl_handle ) { odbc_dlclose( ptr -> connection.cl_handle ); ptr -> connection.cl_handle = NULL; } if ( ptr -> connection.dl_handle ) { /* * this is safe, because the dlopen function will reuse the handle if we * open the same lib again */ if ( !ptr -> connection.dont_dlclose ) { /* * call fini function if found */ if ( ptr -> connection.fini_func.func ) { ptr -> connection.fini_func.func(); } odbc_dlclose( ptr -> connection.dl_handle ); } ptr -> connection.dl_handle = NULL; } /* * shutdown unicode */ unicode_shutdown( &ptr -> connection ); /* * free some memory */ if ( ptr -> connection.functions ) { free( ptr -> connection.functions ); ptr -> connection.functions = NULL; } } /* * now clean up any statements that are left about */ __clean_stmt_from_dbc( &ptr -> connection ); __clean_desc_from_dbc( &ptr -> connection ); } int search_for_pool( DMHDBC connection, SQLCHAR *server_name, SQLSMALLINT name_length1, SQLCHAR *user_name, SQLSMALLINT name_length2, SQLCHAR *authentication, SQLSMALLINT name_length3, SQLCHAR *connect_string, SQLSMALLINT connect_string_length ) { time_t current_time; SQLINTEGER dead; CPOOL *ptr, *prev; static int ij = 0; int has_checked = 0; mutex_pool_entry(); current_time = time( NULL ); /* * look in the list of connections for one that matches */ restart:; for( ptr = pool_head, prev = NULL; ptr; prev = ptr, ptr = ptr -> next ) { has_checked = 0; if ( ptr -> in_use ) { continue; } /* * has it expired ? Do some cleaning up first */ if ( ptr -> expiry_time < current_time ) { /* * disconnect and remove */ close_pooled_connection( ptr ); if ( prev ) { prev -> next = ptr -> next; free( ptr ); } else { pool_head = ptr -> next; free( ptr ); } goto restart; } /* * has the time-to-live got to one ? */ if ( ptr -> ttl == 1 ) { /* * disconnect and remove */ close_pooled_connection( ptr ); if ( prev ) { prev -> next = ptr -> next; free( ptr ); } else { pool_head = ptr -> next; free( ptr ); } goto restart; } else if ( ptr -> ttl > 1 ) { ptr -> ttl --; } if ( server_name ) { if ( ptr -> server_length == 0 ) { continue; } if ( ptr -> server_length != name_length1 || sql_strcmp( server_name, (SQLCHAR*)ptr -> server, name_length1, ptr -> server_length )) { continue; } if ( ptr -> user_length != name_length2 || sql_strcmp( user_name, (SQLCHAR*)ptr -> user, name_length2, ptr -> user_length )) { continue; } if ( ptr -> password_length != name_length3 || sql_strcmp( authentication, (SQLCHAR*)ptr -> password, name_length3, ptr -> password_length )) { continue; } } else { if ( ptr -> dsn_length == 0 ) { continue; } if ( ptr -> dsn_length != connect_string_length || sql_strcmp( connect_string, (SQLCHAR*)ptr -> driver_connect_string, connect_string_length, ptr -> dsn_length )) { continue; } } /* * is it the same cursor usage ? */ if ( ptr -> cursors != connection -> cursors ) { continue; } /* * ok so far, is it still alive ? */ if ( CHECK_SQLGETCONNECTATTR(( &ptr -> connection ))) { SQLRETURN ret; ret = SQLGETCONNECTATTR(( &ptr -> connection ), ptr -> connection.driver_dbc, SQL_ATTR_CONNECTION_DEAD, &dead, 0, 0 ); /* * if it failed assume that its because it doesn't support * it, but its ok */ if ( SQL_SUCCEEDED( ret )) { if ( dead == SQL_CD_TRUE ) { /* * disconnect and remove */ close_pooled_connection( ptr ); if ( prev ) { prev -> next = ptr -> next; free( ptr ); goto restart; } else { pool_head = ptr -> next; free( ptr ); goto restart; } } has_checked = 1; } } if ( !has_checked && CHECK_SQLGETCONNECTOPTION(( &ptr -> connection ))) { SQLRETURN ret; ret = SQLGETCONNECTOPTION(( &ptr->connection ), ptr -> connection.driver_dbc, SQL_ATTR_CONNECTION_DEAD, &dead ); /* * if it failed assume that its because it doesn't support * it, but its ok */ if ( SQL_SUCCEEDED( ret )) { if ( dead == SQL_CD_TRUE ) { /* * disconnect and remove */ close_pooled_connection( ptr ); if ( prev ) { prev -> next = ptr -> next; free( ptr ); goto restart; } else { pool_head = ptr -> next; free( ptr ); goto restart; } } has_checked = 1; } } /* * Need some other way of checking, This isn't safe to pool... * But it needs to be something thats not slower than connecting... * I have put this off, so its after the check that the server_name and all * the rest is ok to avoid waiting time, as the check could take time */ if ( !has_checked ) { if ( strlen( connection -> probe_sql ) > 0 ) { /* * Execute the query, check we have all we need */ if ( CHECK_SQLEXECDIRECT(( &ptr -> connection )) && ( CHECK_SQLALLOCHANDLE(( &ptr -> connection )) || CHECK_SQLALLOCSTMT(( &ptr -> connection ))) && CHECK_SQLNUMRESULTCOLS(( &ptr -> connection )) && CHECK_SQLFETCH(( &ptr -> connection )) && CHECK_SQLFREESTMT(( &ptr -> connection ))) { DMHSTMT statement; int ret; int check_failed = 0; statement = __alloc_stmt(); if ( CHECK_SQLALLOCHANDLE(( &ptr -> connection ))) { ret = SQLALLOCHANDLE(( &ptr -> connection ), SQL_HANDLE_STMT, ptr -> connection.driver_dbc, ( &statement -> driver_stmt ), statement ); } else { ret = SQLALLOCSTMT(( &ptr -> connection ), ptr -> connection.driver_dbc, ( &statement -> driver_stmt ), statement ); } if ( !SQL_SUCCEEDED( ret )) { check_failed = 1; } else { ret = SQLEXECDIRECT(( &ptr -> connection ), statement -> driver_stmt, connection -> probe_sql, SQL_NTS ); if ( !SQL_SUCCEEDED( ret )) { check_failed = 1; } else { SQLSMALLINT column_count; /* * Check if there is a result set */ ret = SQLNUMRESULTCOLS(( &ptr -> connection ), statement -> driver_stmt, &column_count ); if ( !SQL_SUCCEEDED( ret )) { check_failed = 1; } else if ( column_count > 0 ) { do { ret = SQLFETCH(( &ptr -> connection ), statement -> driver_stmt ); } while( SQL_SUCCEEDED( ret )); if ( ret != SQL_NO_DATA ) { check_failed = 1; } ret = SQLFREESTMT(( &ptr -> connection ), statement -> driver_stmt, SQL_CLOSE ); if ( !SQL_SUCCEEDED( ret )) { check_failed = 1; } } } ret = SQLFREESTMT(( &ptr -> connection ), statement -> driver_stmt, SQL_DROP ); if ( !SQL_SUCCEEDED( ret )) { check_failed = 1; } } __release_stmt( statement ); if ( check_failed ) { /* * disconnect and remove */ close_pooled_connection( ptr ); if ( prev ) { prev -> next = ptr -> next; free( ptr ); } else { pool_head = ptr -> next; free( ptr ); } goto restart; } else { has_checked = 1; } } } } if ( !has_checked ) { /* * We can't knwo for sure if the connection is still valid ... */ } /* * at this point we have something that should work, lets use it */ ptr -> in_use = 1; ptr -> expiry_time = current_time + ptr -> timeout; connection -> pooling_timeout = ptr -> timeout; /* * copy all the info over */ connection -> pooled_connection = ptr; connection -> state = ptr -> connection.state; connection -> dl_handle = ptr -> connection.dl_handle; connection -> functions = ptr -> connection.functions; connection -> driver_env = ptr -> connection.driver_env; connection -> driver_dbc = ptr -> connection.driver_dbc; connection -> driver_version = ptr -> connection.driver_version; connection -> driver_act_ver = ptr -> connection.driver_act_ver; connection -> statement_count = 0; connection -> access_mode = ptr -> connection.access_mode; connection -> access_mode_set = ptr -> connection.access_mode_set; connection -> login_timeout = ptr -> connection.login_timeout; connection -> login_timeout_set = ptr -> connection.login_timeout_set; connection -> auto_commit = ptr -> connection.auto_commit; connection -> auto_commit_set = ptr -> connection.auto_commit_set; connection -> async_enable = ptr -> connection.async_enable; connection -> async_enable_set = ptr -> connection.async_enable_set; connection -> auto_ipd = ptr -> connection.auto_ipd; connection -> auto_ipd_set = ptr -> connection.auto_ipd_set; connection -> connection_timeout = ptr -> connection.connection_timeout; connection -> connection_timeout_set = ptr -> connection.connection_timeout_set; connection -> metadata_id = ptr -> connection.metadata_id; connection -> metadata_id_set = ptr -> connection.metadata_id_set; connection -> packet_size = ptr -> connection.packet_size; connection -> packet_size_set = ptr -> connection.packet_size_set; connection -> quite_mode = ptr -> connection.quite_mode; connection -> quite_mode_set = ptr -> connection.quite_mode_set; connection -> txn_isolation = ptr -> connection.txn_isolation; connection -> txn_isolation_set = ptr -> connection.txn_isolation_set; connection -> cursors = ptr -> connection.cursors; connection -> cl_handle = ptr -> connection.cl_handle; #ifdef HAVE_LIBPTHREAD connection -> mutex = ptr -> connection.mutex; connection -> protection_level = ptr -> connection.protection_level; #elif HAVE_LIBTHREAD connection -> mutex = ptr -> connection.mutex; connection -> protection_level = ptr -> connection.protection_level; #endif connection -> env_list_ent = ptr -> connection.env_list_ent; strcpy( connection -> probe_sql, ptr -> connection.probe_sql ); /* * TODO * alter the mutex level here */ connection -> ex_fetch_mapping = ptr -> connection.ex_fetch_mapping; connection -> dont_dlclose = ptr -> connection.dont_dlclose; connection -> bookmarks_on = ptr -> connection.bookmarks_on; connection -> environment = ptr -> connection.environment; strcpy( connection -> dsn, ptr -> connection.dsn ); mutex_pool_exit(); return TRUE; } mutex_pool_exit(); return FALSE; } void return_to_pool( DMHDBC connection ) { CPOOL *ptr; time_t current_time; mutex_pool_entry(); ptr = connection -> pooled_connection; current_time = time( NULL ); /* * is it a old entry ? */ if ( connection -> pooled_connection ) { ptr -> in_use = 0; ptr -> expiry_time = current_time + ptr -> timeout; } else { ptr = calloc( sizeof( CPOOL ), 1 ); if ( !ptr ) { mutex_pool_exit(); return; } /* * copy everything over */ ptr -> in_use = 0; ptr -> expiry_time = current_time + connection -> pooling_timeout; ptr -> timeout = connection -> pooling_timeout; ptr -> ttl = connection -> ttl; ptr -> cursors = connection -> cursors; /* * copy all the info over */ ptr -> connection.state = connection -> state; ptr -> connection.dl_handle = connection -> dl_handle; ptr -> connection.functions = connection -> functions; ptr -> connection.driver_env = connection -> driver_env; ptr -> connection.driver_dbc = connection -> driver_dbc; ptr -> connection.driver_version = connection -> driver_version; ptr -> connection.driver_act_ver = connection -> driver_act_ver; ptr -> connection.access_mode = connection -> access_mode; ptr -> connection.access_mode_set = connection -> access_mode_set; ptr -> connection.login_timeout = connection -> login_timeout; ptr -> connection.login_timeout_set = connection -> login_timeout_set; ptr -> connection.auto_commit = connection -> auto_commit; ptr -> connection.auto_commit_set = connection -> auto_commit_set; ptr -> connection.async_enable = connection -> async_enable; ptr -> connection.async_enable_set = connection -> async_enable_set; ptr -> connection.auto_ipd = connection -> auto_ipd; ptr -> connection.auto_ipd_set = connection -> auto_ipd_set; ptr -> connection.connection_timeout = connection -> connection_timeout; ptr -> connection.connection_timeout_set = connection -> connection_timeout_set; ptr -> connection.metadata_id = connection -> metadata_id; ptr -> connection.metadata_id_set = connection -> metadata_id_set; ptr -> connection.packet_size = connection -> packet_size; ptr -> connection.packet_size_set = connection -> packet_size_set; ptr -> connection.quite_mode = connection -> quite_mode; ptr -> connection.quite_mode_set = connection -> quite_mode_set; ptr -> connection.txn_isolation = connection -> txn_isolation; ptr -> connection.txn_isolation_set = connection -> txn_isolation_set; ptr -> connection.cursors = connection -> cursors; ptr -> connection.cl_handle = connection -> cl_handle; #ifdef HAVE_LIBPTHREAD ptr -> connection.mutex = connection -> mutex; ptr -> connection.protection_level = connection -> protection_level; #elif HAVE_LIBTHREAD ptr -> connection.mutex = connection -> mutex; ptr -> connection.protection_level = connection -> protection_level; #endif ptr -> connection.pooling_timeout = ptr -> timeout; ptr -> connection.ex_fetch_mapping = connection -> ex_fetch_mapping; ptr -> connection.dont_dlclose = connection -> dont_dlclose; ptr -> connection.bookmarks_on = connection -> bookmarks_on; ptr -> connection.env_list_ent = connection -> env_list_ent; ptr -> connection.environment = connection -> environment; strcpy( ptr -> connection.probe_sql, connection -> probe_sql ); #ifdef HAVE_ICONV ptr -> connection.iconv_cd_uc_to_ascii = connection -> iconv_cd_uc_to_ascii; ptr -> connection.iconv_cd_ascii_to_uc = connection -> iconv_cd_ascii_to_uc; connection -> iconv_cd_uc_to_ascii = (iconv_t) -1; connection -> iconv_cd_ascii_to_uc = (iconv_t) -1; #endif if ( connection -> server_length < 0 ) { strcpy( ptr -> server, connection -> server ); } else { memcpy( ptr -> server, connection -> server, connection -> server_length ); } ptr -> server_length = connection -> server_length; if ( connection -> user_length < 0 ) { strcpy( ptr -> user, connection -> user ); } else { memcpy( ptr -> user, connection -> user, connection -> user_length ); } ptr -> user_length = connection -> user_length; if ( connection -> password_length < 0 ) { strcpy( ptr -> password, connection -> password ); } else { memcpy( ptr -> password, connection -> password, connection -> password_length ); } ptr -> password_length = connection -> password_length; if ( connection -> dsn_length < 0 ) { strcpy( ptr -> driver_connect_string, connection -> driver_connect_string ); } else { memcpy( ptr -> driver_connect_string, connection -> driver_connect_string, connection -> dsn_length ); } ptr -> dsn_length = connection -> dsn_length; strcpy( ptr -> connection.dsn, connection -> dsn ); /* * add to the list */ ptr -> next = pool_head; pool_head = ptr; } /* * remove all information from the connection */ connection -> state = STATE_C2; connection -> driver_env = 0; connection -> driver_dbc = 0; connection -> dl_handle = 0; connection -> cl_handle = 0; connection -> functions = 0; connection -> pooled_connection = 0; mutex_pool_exit(); } void __handle_attr_extensions( DMHDBC connection, char *dsn, char *driver_name ) { char txt[ 1024 ]; if ( dsn && strlen( dsn )) { SQLGetPrivateProfileString( dsn, "DMEnvAttr", "", txt, sizeof( txt ), "ODBC.INI" ); if ( strlen( txt )) { __parse_attribute_string( &connection -> env_attribute, txt, strlen( txt )); } SQLGetPrivateProfileString( dsn, "DMConnAttr", "", txt, sizeof( txt ), "ODBC.INI" ); if ( strlen( txt )) { __parse_attribute_string( &connection -> dbc_attribute, txt, strlen( txt )); } SQLGetPrivateProfileString( dsn, "DMStmtAttr", "", txt, sizeof( txt ), "ODBC.INI" ); if ( strlen( txt )) { __parse_attribute_string( &connection -> stmt_attribute, txt, strlen( txt )); } } if ( driver_name && strlen( driver_name )) { SQLGetPrivateProfileString( driver_name, "DMEnvAttr", "", txt, sizeof( txt ), "ODBCINST.INI" ); if ( strlen( txt )) { __parse_attribute_string( &connection -> env_attribute, txt, strlen( txt )); } } } SQLRETURN SQLConnectA( SQLHDBC connection_handle, SQLCHAR *server_name, SQLSMALLINT name_length1, SQLCHAR *user_name, SQLSMALLINT name_length2, SQLCHAR *authentication, SQLSMALLINT name_length3 ) { return SQLConnect( connection_handle, server_name, name_length1, user_name, name_length2, authentication, name_length3 ); } SQLRETURN SQLConnect( SQLHDBC connection_handle, SQLCHAR *server_name, SQLSMALLINT name_length1, SQLCHAR *user_name, SQLSMALLINT name_length2, SQLCHAR *authentication, SQLSMALLINT name_length3 ) { DMHDBC connection = (DMHDBC)connection_handle; int len, ret_from_connect; char dsn[ SQL_MAX_DSN_LENGTH + 1 ]; char lib_name[ INI_MAX_PROPERTY_VALUE + 1 ]; char driver_name[ INI_MAX_PROPERTY_VALUE + 1 ]; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ]; int warnings; /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tServer Name = %s\ \n\t\t\tUser Name = %s\ \n\t\t\tAuthentication = %s", connection, __string_with_length( s1, server_name, name_length1 ), __string_with_length( s2, user_name, name_length2 ), __string_with_length_pass( s3, authentication, name_length3 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length2 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * check the state of the connection */ if ( connection -> state != STATE_C2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( name_length1 && server_name ) { if ( name_length1 == SQL_NTS ) { len = strlen((char*) server_name ); if ( len > SQL_MAX_DSN_LENGTH ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { len = name_length1; if ( len > SQL_MAX_DSN_LENGTH ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } memcpy( dsn, server_name, len ); dsn[ len ] ='\0'; } else if ( name_length1 && !server_name ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM010" ); __post_internal_error( &connection -> error, ERROR_IM010, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else { strcpy( dsn, "DEFAULT" ); } /* * can we find a pooled connection to use here ? */ connection -> pooled_connection = NULL; if ( pooling_enabled && search_for_pool( connection, server_name, name_length1, user_name, name_length2, authentication, name_length3, NULL, 0 )) { ret_from_connect = SQL_SUCCESS; if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } connection -> state = STATE_C4; return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } /* * else safe the info for later */ if ( pooling_enabled ) { connection -> dsn_length = 0; if ( server_name ) { if ( name_length1 < 0 ) { strcpy( connection -> server, (char*)server_name ); } else { memcpy( connection -> server, server_name, name_length1 ); } } else { strcpy( connection -> server, "" ); } connection -> server_length = name_length1; if ( user_name ) { if ( name_length2 < 0 ) { strcpy( connection -> user, (char*)user_name ); } else { memcpy( connection -> user, user_name, name_length2 ); } } else { strcpy( connection -> user, "" ); } connection -> user_length = name_length2; if ( authentication ) { if ( name_length3 ) { strcpy( connection -> password, (char*)authentication ); } else { memcpy( connection -> password, authentication, name_length3 ); } } else { strcpy( connection -> password, "" ); } connection -> password_length = name_length3; } if ( !__find_lib_name( dsn, lib_name, driver_name )) { /* * if not found look for a default */ if ( !__find_lib_name( "DEFAULT", lib_name, driver_name )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } /* * do we have any Environment, Connection, or Statement attributes set in the ini ? */ __handle_attr_extensions( connection, dsn, driver_name ); /* * if necessary change the threading level */ if ( !__connect_part_one( connection, lib_name, driver_name, &warnings )) { return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( !CHECK_SQLCONNECT( connection ) && !CHECK_SQLCONNECTW( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __disconnect_part_one( connection ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( CHECK_SQLCONNECT( connection )) { /* if ( CHECK_SQLSETCONNECTATTR( connection )) { int lret; lret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, SQL_ATTR_ANSI_APP, SQL_AA_TRUE, 0 ); } */ ret_from_connect = SQLCONNECT( connection, connection -> driver_dbc, dsn, SQL_NTS, user_name, name_length2, authentication, name_length3 ); if ( ret_from_connect != SQL_SUCCESS ) { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; /* * get the errors from the driver before * loseing the connection */ if ( CHECK_SQLERROR( connection )) { do { ret = SQLERROR( connection, SQL_NULL_HENV, connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, message_text ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } else if ( CHECK_SQLGETDIAGREC( connection )) { int rec = 1; do { ret = SQLGETDIAGREC( connection, SQL_HANDLE_DBC, connection -> driver_dbc, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, message_text ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } } /* * if it was a error then return now */ if ( !SQL_SUCCEEDED( ret_from_connect )) { __disconnect_part_one( connection ); __disconnect_part_four( connection ); sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } connection -> unicode_driver = 0; } else { SQLWCHAR * uc_dsn, *uc_user, *uc_auth; uc_dsn = ansi_to_unicode_alloc((SQLCHAR*) dsn, SQL_NTS, connection ); uc_user = ansi_to_unicode_alloc( user_name, name_length2, connection ); uc_auth = ansi_to_unicode_alloc( authentication, name_length3, connection ); if ( CHECK_SQLSETCONNECTATTR( connection )) { int lret; lret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, SQL_ATTR_ANSI_APP, SQL_AA_FALSE, 0 ); } ret_from_connect = SQLCONNECTW( connection, connection -> driver_dbc, uc_dsn, SQL_NTS, uc_user, name_length2, uc_auth, name_length3 ); if ( uc_dsn ) free( uc_dsn ); if ( uc_user ) free( uc_user ); if ( uc_auth ) free( uc_auth ); if ( ret_from_connect != SQL_SUCCESS ) { SQLWCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLWCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; /* * get the errors from the driver before * looseing the connection */ if ( CHECK_SQLERRORW( connection )) { do { ret = SQLERRORW( connection, SQL_NULL_HENV, connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { SQLCHAR *as1, *as2; __post_internal_error_ex_w( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); as1 = (SQLCHAR *) unicode_to_ansi_alloc( sqlstate, SQL_NTS, connection ); as2 = (SQLCHAR *) unicode_to_ansi_alloc( message_text, SQL_NTS, connection ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", as1, as2 ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } else if ( CHECK_SQLGETDIAGRECW( connection )) { int rec = 1; do { ret = SQLGETDIAGRECW( connection, SQL_HANDLE_DBC, connection -> driver_dbc, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { SQLCHAR *as1, *as2; __post_internal_error_ex_w( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); as1 = (SQLCHAR *) unicode_to_ansi_alloc( sqlstate, SQL_NTS, connection ); as2 = (SQLCHAR *) unicode_to_ansi_alloc( message_text, SQL_NTS, connection ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", as1, as2 ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } } /* * if it was a error then return now */ if ( !SQL_SUCCEEDED( ret_from_connect )) { __disconnect_part_one( connection ); __disconnect_part_four( connection ); sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } connection -> unicode_driver = 1; } /* * we should be connected now */ connection -> state = STATE_C4; strcpy( connection -> dsn, dsn ); /* * did we get the type we wanted */ if ( connection -> driver_version != connection -> environment -> requested_version ) { connection -> driver_version = connection -> environment -> requested_version; __post_internal_error( &connection -> error, ERROR_01000, "Driver does not support the requested version", connection -> environment -> requested_version ); ret_from_connect = SQL_SUCCESS_WITH_INFO; } if ( !__connect_part_two( connection )) { /* * the cursor lib can kill us here, so be careful */ __disconnect_part_two( connection ); __disconnect_part_one( connection ); __disconnect_part_four( connection ); connection -> state = STATE_C3; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } if ( warnings && ret_from_connect == SQL_SUCCESS ) { ret_from_connect = SQL_SUCCESS_WITH_INFO; } return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } /* * connection pooling setup, just stubs for the moment */ BOOL ODBCSetTryWaitValue ( DWORD dwValue ) { return 0; } #ifdef __cplusplus DWORD ODBCGetTryWaitValue ( ) #else DWORD ODBCGetTryWaitValue ( VOID ) #endif { return 0; } unixODBC-2.2.14-p2/DriverManager/SQLCopyDesc.c0100644000076400007640000004051010032272013017146 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLCopyDesc.c,v 1.6 2004/03/30 13:20:11 lurcher Exp $ * * $Log: SQLCopyDesc.c,v $ * Revision 1.6 2004/03/30 13:20:11 lurcher * * * Fix problem with SQLCopyDesc * Add additional target for iconv * * Revision 1.5 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/09/18 14:49:32 lurcher * * DataManagerII additions and some more threading fixes * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 2001/05/26 19:11:37 ngorham * * Add SQLCopyDesc functionality and fix bug that was stopping messages * coming out of SQLConnect * * Revision 1.7 1999/11/13 23:40:58 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLCopyDesc.c,v $ $Revision: 1.6 $"; struct cdesc { int field_identifier; int field_type; }; /* * note that SQL_VARCHAR indicates a pointer type, not a string */ static struct cdesc header_fields[] = { { SQL_DESC_ARRAY_SIZE, SQL_INTEGER }, { SQL_DESC_ARRAY_STATUS_PTR, SQL_VARCHAR }, { SQL_DESC_BIND_OFFSET_PTR, SQL_VARCHAR }, { SQL_DESC_BIND_TYPE, SQL_VARCHAR }, { SQL_DESC_COUNT, SQL_SMALLINT }, { SQL_DESC_ROWS_PROCESSED_PTR, SQL_VARCHAR } }; static struct cdesc rec_fields[] = { { SQL_DESC_CONCISE_TYPE, SQL_SMALLINT }, { SQL_DESC_LENGTH, SQL_INTEGER }, { SQL_DESC_OCTET_LENGTH, SQL_INTEGER }, { SQL_DESC_PARAMETER_TYPE, SQL_SMALLINT }, { SQL_DESC_NUM_PREC_RADIX, SQL_INTEGER }, { SQL_DESC_PRECISION, SQL_SMALLINT }, { SQL_DESC_SCALE, SQL_SMALLINT }, { SQL_DESC_DATETIME_INTERVAL_CODE, SQL_SMALLINT }, { SQL_DESC_DATETIME_INTERVAL_PRECISION, SQL_SMALLINT }, { SQL_DESC_DATA_PTR, SQL_VARCHAR }, { SQL_DESC_INDICATOR_PTR, SQL_VARCHAR }, { SQL_DESC_OCTET_LENGTH_PTR, SQL_VARCHAR } }; SQLRETURN SQLCopyDesc( SQLHDESC source_desc_handle, SQLHDESC target_desc_handle ) { DMHDESC src_descriptor = (DMHDESC)source_desc_handle; DMHDESC target_descriptor = (DMHDESC)target_desc_handle; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check descriptor */ if ( !__validate_desc( src_descriptor )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } if ( !__validate_desc( target_descriptor )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( src_descriptor ); function_entry( target_descriptor ); if ( log_info.log_flag ) { sprintf( src_descriptor -> msg, "\n\t\tEntry:\ \n\t\t\tSource Descriptor = %p\ \n\t\t\tTarget Descriptor = %p", src_descriptor, target_descriptor ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, src_descriptor -> msg ); } /* * if both descriptors are from the same connection the we can just * pass it on */ if ( src_descriptor -> connection == target_descriptor -> connection && CHECK_SQLCOPYDESC( src_descriptor -> connection )) { SQLRETURN ret; /* * protect the common connection */ thread_protect( SQL_HANDLE_DBC, src_descriptor -> connection ); ret = SQLCOPYDESC( src_descriptor -> connection, src_descriptor -> driver_desc, target_descriptor -> driver_desc ); if ( log_info.log_flag ) { sprintf( src_descriptor -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, src_descriptor -> msg ); } thread_release( SQL_HANDLE_DBC, src_descriptor -> connection ); return function_return( IGNORE_THREAD, target_descriptor, ret ); } else { /* * TODO copy from one to the other * protect the common environment */ SQLRETURN ret = SQL_SUCCESS; SQLSMALLINT count; SQLSMALLINT sval; SQLINTEGER ival; SQLPOINTER pval; if ( src_descriptor -> connection == target_descriptor -> connection ) thread_protect( SQL_HANDLE_DBC, src_descriptor -> connection ); else thread_protect( SQL_HANDLE_ENV, src_descriptor -> connection -> environment ); if ( !CHECK_SQLGETDESCFIELD( src_descriptor -> connection ) || !CHECK_SQLSETDESCFIELD( src_descriptor -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &target_descriptor -> error, ERROR_IM001, NULL, target_descriptor -> connection -> environment -> requested_version ); if ( src_descriptor -> connection == target_descriptor -> connection ) thread_release( SQL_HANDLE_DBC, src_descriptor -> connection ); else thread_release( SQL_HANDLE_ENV, src_descriptor -> connection -> environment ); return function_return( IGNORE_THREAD, target_descriptor, SQL_ERROR ); } /* * get the count from the source field */ ret == SQLGETDESCFIELD( src_descriptor -> connection, src_descriptor -> driver_desc, 0, SQL_DESC_COUNT, &count, sizeof( count ), NULL ); if ( SQL_SUCCEEDED( ret )) { /* * copy the header fields */ int i; for ( i = 0; i < sizeof( header_fields ) / sizeof( header_fields[ 0 ] ); i ++ ) { if ( header_fields[ i ].field_type == SQL_INTEGER ) { ret == SQLGETDESCFIELD( src_descriptor -> connection, src_descriptor -> driver_desc, 0, header_fields[ i ].field_identifier, &ival, sizeof( ival ), NULL ); } else if ( header_fields[ i ].field_type == SQL_SMALLINT ) { ret == SQLGETDESCFIELD( src_descriptor -> connection, src_descriptor -> driver_desc, 0, header_fields[ i ].field_identifier, &sval, sizeof( sval ), NULL ); } if ( header_fields[ i ].field_type == SQL_VARCHAR ) { ret == SQLGETDESCFIELD( src_descriptor -> connection, src_descriptor -> driver_desc, 0, header_fields[ i ].field_identifier, &pval, sizeof( pval ), NULL ); } if ( SQL_SUCCEEDED( ret )) { if ( header_fields[ i ].field_type == SQL_INTEGER ) { ret == SQLSETDESCFIELD( target_descriptor -> connection, target_descriptor -> driver_desc, 0, header_fields[ i ].field_identifier, ival, sizeof( ival )); } else if ( header_fields[ i ].field_type == SQL_SMALLINT ) { ret == SQLSETDESCFIELD( target_descriptor -> connection, target_descriptor -> driver_desc, 0, header_fields[ i ].field_identifier, sval, sizeof( sval )); } else if ( header_fields[ i ].field_type == SQL_VARCHAR ) { ret == SQLSETDESCFIELD( target_descriptor -> connection, target_descriptor -> driver_desc, 0, header_fields[ i ].field_identifier, pval, sizeof( pval )); } } if ( !SQL_SUCCEEDED( ret )) break; } } if ( SQL_SUCCEEDED( ret )) { /* * copy the records */ int i, rec; for ( rec = 0; rec <= count; rec ++ ) { for ( i = 0; i < sizeof( rec_fields ) / sizeof( rec_fields[ 0 ] ); i ++ ) { if ( rec_fields[ i ].field_type == SQL_INTEGER ) { ret == SQLGETDESCFIELD( src_descriptor -> connection, src_descriptor -> driver_desc, rec, rec_fields[ i ].field_identifier, &ival, sizeof( ival ), NULL ); } else if ( rec_fields[ i ].field_type == SQL_SMALLINT ) { ret == SQLGETDESCFIELD( src_descriptor -> connection, src_descriptor -> driver_desc, rec, rec_fields[ i ].field_identifier, &sval, sizeof( sval ), NULL ); } if ( rec_fields[ i ].field_type == SQL_VARCHAR ) { ret == SQLGETDESCFIELD( src_descriptor -> connection, src_descriptor -> driver_desc, rec, rec_fields[ i ].field_identifier, &pval, sizeof( pval ), NULL ); } if ( SQL_SUCCEEDED( ret )) { if ( rec_fields[ i ].field_type == SQL_INTEGER ) { ret == SQLSETDESCFIELD( target_descriptor -> connection, target_descriptor -> driver_desc, rec, rec_fields[ i ].field_identifier, ival, sizeof( ival )); } else if ( rec_fields[ i ].field_type == SQL_SMALLINT ) { ret == SQLSETDESCFIELD( target_descriptor -> connection, target_descriptor -> driver_desc, rec, rec_fields[ i ].field_identifier, sval, sizeof( sval )); } else if ( rec_fields[ i ].field_type == SQL_VARCHAR ) { ret == SQLSETDESCFIELD( target_descriptor -> connection, target_descriptor -> driver_desc, rec, rec_fields[ i ].field_identifier, pval, sizeof( pval )); } } if ( !SQL_SUCCEEDED( ret )) break; } if ( !SQL_SUCCEEDED( ret )) break; } } if ( log_info.log_flag ) { sprintf( src_descriptor -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, src_descriptor -> msg ); } if ( src_descriptor -> connection == target_descriptor -> connection ) thread_release( SQL_HANDLE_DBC, src_descriptor -> connection ); else thread_release( SQL_HANDLE_ENV, src_descriptor -> connection -> environment ); return function_return( IGNORE_THREAD, target_descriptor, ret ); } } unixODBC-2.2.14-p2/DriverManager/SQLDataSources.c0100644000076400007640000002607411032116020017657 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDataSources.c,v 1.8 2008/06/30 08:40:48 lurcher Exp $ * * $Log: SQLDataSources.c,v $ * Revision 1.8 2008/06/30 08:40:48 lurcher * Few more tweeks towards a release * * Revision 1.7 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.6 2003/04/10 13:45:51 lurcher * * Alter the way that SQLDataSources returns the description field (again) * * Revision 1.5 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/07/08 11:40:35 lurcher * * Merge two config tests * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.10 2000/08/10 15:12:17 ngorham * * Fix incorrect return from SQLDataSources * * Revision 1.9 2000/05/04 15:08:29 ngorham * * Update SQLDataSource.c * * Revision 1.8 2000/05/04 12:57:03 ngorham * * Fix problem in SQLDataSource, the description is from the Driver not the * DSN * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLDataSources.c,v $ $Revision: 1.8 $"; #define BUFFERSIZE 1024*4 SQLRETURN SQLDataSourcesA( SQLHENV environment_handle, SQLUSMALLINT direction, SQLCHAR *server_name, SQLSMALLINT buffer_length1, SQLSMALLINT *name_length1, SQLCHAR *description, SQLSMALLINT buffer_length2, SQLSMALLINT *name_length2 ) { return SQLDataSources( environment_handle, direction, server_name, buffer_length1, name_length1, description, buffer_length2, name_length2 ); } SQLRETURN SQLDataSources( SQLHENV environment_handle, SQLUSMALLINT direction, SQLCHAR *server_name, SQLSMALLINT buffer_length1, SQLSMALLINT *name_length1, SQLCHAR *description, SQLSMALLINT buffer_length2, SQLSMALLINT *name_length2 ) { DMHENV environment = (DMHENV) environment_handle; SQLRETURN ret; char buffer[ BUFFERSIZE + 1 ]; char object[ INI_MAX_OBJECT_NAME + 1 ]; char property[ INI_MAX_PROPERTY_VALUE + 1 ]; char driver[ INI_MAX_PROPERTY_VALUE + 1 ]; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p", environment ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_protect( SQL_HANDLE_ENV, environment ); /* * check that a version has been requested */ if ( environment -> requested_version == 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &environment -> error, ERROR_HY010, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( buffer_length1 < 0 || buffer_length2 < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &environment -> error, ERROR_HY090, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( direction != SQL_FETCH_FIRST && direction != SQL_FETCH_FIRST_USER && direction != SQL_FETCH_FIRST_SYSTEM && direction != SQL_FETCH_NEXT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY103" ); __post_internal_error( &environment -> error, ERROR_HY103, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } /* * for this function USER = "~/.odbc.ini" and * SYSTEM = "/usr/odbc.ini */ if ( direction == SQL_FETCH_FIRST ) { environment -> fetch_mode = ODBC_BOTH_DSN; environment -> entry = 0; } else if ( direction == SQL_FETCH_FIRST_USER ) { environment -> fetch_mode = ODBC_USER_DSN; environment -> entry = 0; } else if ( direction == SQL_FETCH_FIRST_SYSTEM ) { environment -> fetch_mode = ODBC_SYSTEM_DSN; environment -> entry = 0; } /* * this is lifted from Peters code */ memset( buffer, 0, sizeof( buffer )); memset( object, 0, sizeof( object )); SQLSetConfigMode( environment -> fetch_mode ); SQLGetPrivateProfileString( NULL, NULL, NULL, buffer, sizeof( buffer ), "ODBC.INI" ); if ( iniElement( buffer, '\0', '\0', environment -> entry, object, sizeof( object )) != INI_SUCCESS ) { ret = SQL_NO_DATA; } else { memset( buffer, 0, sizeof( buffer )); memset( property, 0, sizeof( property )); memset( driver, 0, sizeof( driver )); SQLGetPrivateProfileString( object, "Driver", "", driver, sizeof( driver ), "ODBC.INI" ); if ( strlen( driver ) > 0 ) { /* * Make this return the description from the driver setup, this is * the way its done in Windows SQLGetPrivateProfileString( driver, "Description", driver, property, sizeof( property ), "ODBCINST.INI" ); */ /* * even though the string is called description, it should * actually be the driver name entry from odbcinst.ini on windows * there is no separate Description line */ strcpy( property, driver ); } else { /* * May as well try and get something */ SQLGetPrivateProfileString( object, "Description", "", property, sizeof( property ), "ODBC.INI" ); } environment -> entry++; if (( server_name && buffer_length1 <= strlen( object )) || ( description && buffer_length2 <= strlen( property ))) { __post_internal_error( &environment -> error, ERROR_01004, NULL, environment -> requested_version ); ret = SQL_SUCCESS_WITH_INFO; } else { ret = SQL_SUCCESS; } if ( server_name ) { if ( buffer_length1 <= strlen( object )) { memcpy( server_name, object, buffer_length1 ); server_name[ buffer_length1 - 1 ] = '\0'; } else { strcpy((char*) server_name, object ); } } if ( description ) { if ( buffer_length2 <= strlen( property )) { memcpy( description, property, buffer_length2 ); description[ buffer_length1 - 1 ] = '\0'; } else { strcpy((char*) description, property ); } } if ( name_length1 ) { *name_length1 = strlen( object ); } if ( name_length2 ) { *name_length2 = strlen( property ); } } /* NEVER FORGET TO RESET THIS TO ODBC_BOTH_DSN */ SQLSetConfigMode( ODBC_BOTH_DSN ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } return function_return( SQL_HANDLE_ENV, environment, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLDescribeCol.c0100644000076400007640000003547611070160004017631 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDescribeCol.c,v 1.12 2008/09/29 14:02:44 lurcher Exp $ * * $Log: SQLDescribeCol.c,v $ * Revision 1.12 2008/09/29 14:02:44 lurcher * Fix missing dlfcn group option * * Revision 1.11 2008/05/20 13:43:46 lurcher * Vms fixes * * Revision 1.10 2007/04/02 10:50:18 lurcher * Fix some 64bit problems (only when sizeof(SQLLEN) == 8 ) * * Revision 1.9 2007/01/02 10:27:50 lurcher * Fix descriptor leak with unicode only driver * * Revision 1.8 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.7 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.6 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.5 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.4 2002/08/19 09:11:49 lurcher * * Fix Maxor ineffiecny in Postgres Drivers, and fix a return state * * Revision 1.3 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.5 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.4 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.3 2001/01/02 09:55:04 nick * * More unicode bits * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.10 2000/06/20 13:30:09 ngorham * * Fix problems when using bookmarks * * Revision 1.9 1999/11/28 18:35:50 ngorham * * Add extra ODBC3/2 Date/Time mapping * * Revision 1.8 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/10/09 00:56:16 ngorham * * Added Manush's patch to map ODBC 3-2 datetime values * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 21:40:58 nick * End of another night :-) * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLDescribeCol.c,v $ $Revision: 1.12 $"; SQLRETURN SQLDescribeColA( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLCHAR *column_name, SQLSMALLINT buffer_length, SQLSMALLINT *name_length, SQLSMALLINT *data_type, SQLULEN *column_size, SQLSMALLINT *decimal_digits, SQLSMALLINT *nullable ) { return SQLDescribeCol( statement_handle, column_number, column_name, buffer_length, name_length, data_type, column_size, decimal_digits, nullable ); } SQLRETURN SQLDescribeCol( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLCHAR *column_name, SQLSMALLINT buffer_length, SQLSMALLINT *name_length, SQLSMALLINT *data_type, SQLULEN *column_size, SQLSMALLINT *decimal_digits, SQLSMALLINT *nullable ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s5[ 100 + LOG_MESSAGE_LEN ], s6[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tColumn Number = %d\ \n\t\t\tColumn Name = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tName Length = %p\ \n\t\t\tData Type = %p\ \n\t\t\tColumn Size = %p\ \n\t\t\tDecimal Digits = %p\ \n\t\t\tNullable = %p", statement, column_number, column_name, buffer_length, name_length, data_type, column_size, decimal_digits, nullable ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( column_number == 0 && statement -> bookmarks_on == SQL_UB_OFF && statement -> connection -> bookmarks_on == SQL_UB_OFF ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error_api( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version, SQL_API_SQLDESCRIBECOL ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * sadly we can't truct the numcols value * if ( statement -> numcols < column_number ) { __post_internal_error( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } */ if ( buffer_length < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07005" ); __post_internal_error( &statement -> error, ERROR_07005, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLDESCRIBECOL ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1 = NULL; if ( !CHECK_SQLDESCRIBECOLW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( column_name && buffer_length > 0 ) { s1 = malloc( sizeof( SQLWCHAR ) * ( buffer_length + 1 )); } ret = SQLDESCRIBECOLW( statement -> connection, statement -> driver_stmt, column_number, s1 ? s1 : (SQLWCHAR*)column_name, buffer_length, name_length, data_type, column_size, decimal_digits, nullable ); if ( SQL_SUCCEEDED( ret ) && column_name && s1 ) { unicode_to_ansi_copy((char*) column_name, buffer_length, s1, SQL_NTS, statement -> connection ); } if ( s1 ) { free( s1 ); } } else { if ( !CHECK_SQLDESCRIBECOL( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLDESCRIBECOL( statement -> connection, statement -> driver_stmt, column_number, column_name, buffer_length, name_length, data_type, column_size, decimal_digits, nullable ); } if ( (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) && data_type ) { *data_type=__map_type(MAP_SQL_D2DM,statement->connection, *data_type); } if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLDESCRIBECOL; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } if ( log_info.log_flag ) { if ( !SQL_SUCCEEDED( ret )) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s6 )); } else { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tColumn Name = %s\ \n\t\t\tData Type = %s\ \n\t\t\tColumn Size = %s\ \n\t\t\tDecimal Digits = %s\ \n\t\t\tNullable = %s", __get_return_status( ret, s6 ), __sdata_as_string( s1, SQL_CHAR, name_length, column_name ), __sptr_as_string( s2, data_type ), __ptr_as_string( s3, (SQLLEN*)column_size ), __sptr_as_string( s4, decimal_digits ), __sptr_as_string( s5, nullable )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLDescribeParam.c0100644000076400007640000002414011014552623020150 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDescribeParam.c,v 1.6 2008/05/20 13:43:47 lurcher Exp $ * * $Log: SQLDescribeParam.c,v $ * Revision 1.6 2008/05/20 13:43:47 lurcher * Vms fixes * * Revision 1.5 2007/04/02 10:50:19 lurcher * Fix some 64bit problems (only when sizeof(SQLLEN) == 8 ) * * Revision 1.4 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.10 2000/07/28 16:34:52 ngorham * * Fix problems with SQLColAttributes, and SQLDescribeParam * * Revision 1.9 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/11/10 03:51:33 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.7 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/10/09 00:56:16 ngorham * * Added Manush's patch to map ODBC 3-2 datetime values * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLDescribeParam.c,v $ $Revision: 1.6 $"; SQLRETURN SQLDescribeParam( SQLHSTMT statement_handle, SQLUSMALLINT ipar, SQLSMALLINT *pf_sql_type, SQLULEN *pcb_param_def, SQLSMALLINT *pib_scale, SQLSMALLINT *pf_nullable ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s6[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tParameter Number = %d\ \n\t\t\tSQL Type = %p\ \n\t\t\tParam Def = %p\ \n\t\t\tScale = %p\ \n\t\t\tNullable = %p", statement, ipar, pf_sql_type, pcb_param_def, pib_scale, pf_nullable ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( ipar < 1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if (( statement -> state == STATE_S4 || statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 || statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) && statement -> connection -> environment -> requested_version == SQL_OV_ODBC3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if (( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) && statement -> connection -> environment -> requested_version == SQL_OV_ODBC2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLDESCRIBEPARAM ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( !CHECK_SQLDESCRIBEPARAM( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLDESCRIBEPARAM( statement -> connection, statement -> driver_stmt, ipar, pf_sql_type, pcb_param_def, pib_scale, pf_nullable ); if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLDESCRIBEPARAM; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } if ( (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) && pf_sql_type ) { *pf_sql_type = __map_type(MAP_SQL_D2DM,statement->connection, *pf_sql_type); } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQL Type = %p\ \n\t\t\tParam Def = %p\ \n\t\t\tScale = %p\ \n\t\t\tNullable = %p", __get_return_status( ret, s6 ), __sptr_as_string( s1, pf_sql_type ), __ptr_as_string( s2, (SQLLEN*)pcb_param_def ), __sptr_as_string( s3, pib_scale ), __sptr_as_string( s4, pf_nullable )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLDisconnect.c0100644000076400007640000002230110014704440017530 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDisconnect.c,v 1.8 2004/02/18 15:47:44 lurcher Exp $ * * $Log: SQLDisconnect.c,v $ * Revision 1.8 2004/02/18 15:47:44 lurcher * * Fix a leak in the iconv code * * Revision 1.7 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.6 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.5 2002/08/12 13:17:52 lurcher * * Replicate the way the MS DM handles loading of driver libs, and allocating * handles in the driver. usage counting in the driver means that dlopen is * only called for the first use, and dlclose for the last. AllocHandle for * the driver environment is only called for the first time per driver * per application environment. * * Revision 1.4 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.3 2002/07/04 17:27:56 lurcher * * Small bug fixes * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.8 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.7 2001/03/21 16:12:29 nick * * Alter cleaning of stmt and desc handles if a SQLDisconnect fails * * Revision 1.6 2001/03/02 14:24:23 nick * * Fix thread detection for Solaris * * Revision 1.5 2001/02/12 11:20:22 nick * * Add supoort for calling SQLDriverLoad and SQLDriverUnload * * Revision 1.4 2000/12/18 12:53:29 nick * * More pooling tweeks * * Revision 1.3 2000/12/18 12:32:16 nick * * Fix missing return codes * * Revision 1.2 2000/12/14 18:10:19 nick * * Add connection pooling * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.13 2000/04/27 20:49:03 ngorham * * Fixes to work with Star Office 5.2 * * Revision 1.12 2001/04/27 01:33:40 ngorham * * Fix a problem where handles were not being free'd * * Revision 1.11 2001/04/05 21:15:01 ngorham * * Fix small memory leak in SQLDisconnect and the Postgres driver * * Revision 1.10 2000/02/25 00:02:00 ngorham * * Add a patch to support IBM DB2, and Solaris threads * * Revision 1.9 2000/02/22 22:14:45 ngorham * * Added support for solaris threads * Added check to overcome bug in PHP4 * Fixed bug in descriptors and ODBC 3 drivers * * Revision 1.8 1999/12/28 15:05:01 ngorham * * Fix bug that caused StarOffice to fail. A SQLConnect, SQLDisconnect, * followed by another SQLConnect on the same DBC would fail. * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLDisconnect.c,v $ $Revision: 1.8 $"; extern int pooling_enabled; SQLRETURN SQLDisconnect( SQLHDBC connection_handle ) { DMHDBC connection = (DMHDBC)connection_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p", connection ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); /* * check states */ if ( connection -> state == STATE_C6 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 25000" ); __post_internal_error( &connection -> error, ERROR_25000, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else if ( connection -> state == STATE_C2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * is it a pooled connection, or can it go back */ if ( connection -> pooled_connection ) { __clean_stmt_from_dbc( connection ); __clean_desc_from_dbc( connection ); return_to_pool( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, SQL_SUCCESS ); } else if ( pooling_enabled && connection -> pooling_timeout > 0 ) { __clean_stmt_from_dbc( connection ); __clean_desc_from_dbc( connection ); return_to_pool( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, SQL_SUCCESS ); } /* * disconnect from the driver */ if ( !CHECK_SQLDISCONNECT( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } ret = SQLDISCONNECT( connection, connection -> driver_dbc ); if ( SQL_SUCCEEDED( ret )) { /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_DBC, connection, ret, TRUE ); } /* * complete disconnection from driver */ __disconnect_part_three( connection ); } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLDriverConnect.c0100644000076400007640000012571711070160004020216 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDriverConnect.c,v 1.22 2008/09/29 14:02:44 lurcher Exp $ * * $Log: SQLDriverConnect.c,v $ * Revision 1.22 2008/09/29 14:02:44 lurcher * Fix missing dlfcn group option * * Revision 1.21 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.20 2007/03/05 09:49:23 lurcher * Get it to build on VMS again * * Revision 1.19 2004/10/22 09:10:19 lurcher * Fix a couple of problems with FILEDSN's * * Revision 1.18 2004/09/08 16:38:54 lurcher * * Get ready for a 2.2.10 release * * Revision 1.17 2004/07/27 13:04:41 lurcher * * Strip FILEDSN from connection string before passing to driver * * Revision 1.16 2004/02/18 15:47:44 lurcher * * Fix a leak in the iconv code * * Revision 1.15 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.14 2003/09/08 15:34:29 lurcher * * A couple of small but perfectly formed fixes * * Revision 1.13 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.12 2003/01/23 15:33:24 lurcher * * Fix problems with using putenv() * * Revision 1.11 2002/12/20 11:36:46 lurcher * * Update DMEnvAttr code to allow setting in the odbcinst.ini entry * * Revision 1.10 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.9 2002/10/14 09:46:10 lurcher * * Remove extra return * * Revision 1.8 2002/10/02 09:28:33 lurcher * * Fix uninitialised pointer in SQLDriverConnect.c * * Revision 1.7 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.6 2002/07/25 09:30:26 lurcher * * Additional unicode and iconv changes * * Revision 1.5 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.4 2002/05/24 12:42:50 lurcher * * Alter NEWS and ChangeLog to match their correct usage * Additional UNICODE tweeks * * Revision 1.3 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.22 2001/10/16 10:37:32 nick * * Getting ready for 2.0.10 * * Revision 1.21 2001/10/09 13:23:30 nick * * Add filedsn support to ODBCConfig * * Revision 1.20 2001/10/08 13:38:35 nick * * Add support for FILEDSN's * * Revision 1.19 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.18 2001/07/20 13:20:44 nick * *** empty log message *** * * Revision 1.17 2001/07/20 12:35:09 nick * * Fix SQLBrowseConnect operation * * Revision 1.16 2001/05/15 10:57:44 nick * * Add initial support for VMS * * Revision 1.15 2001/04/18 15:03:37 nick * * Fix problem when going to DB2 unicode driver * * Revision 1.14 2001/04/16 22:35:10 nick * * More tweeks to the AutoTest code * * Revision 1.13 2001/04/16 15:41:24 nick * * Fix some problems calling non existing error funcs * * Revision 1.12 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.11 2001/04/03 16:34:12 nick * * Add support for strangly broken unicode drivers * * Revision 1.10 2001/01/03 12:02:03 nick * * Add missing __ * * Revision 1.9 2001/01/03 11:57:26 nick * * Fix some name collisions * * Revision 1.8 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.7 2000/12/18 13:02:13 nick * * More buf fixes * * Revision 1.6 2000/12/18 12:53:29 nick * * More pooling tweeks * * Revision 1.5 2000/12/18 12:27:50 nick * * Fix missing check for SQL_NTS * * Revision 1.4 2000/12/14 18:10:19 nick * * Add connection pooling * * Revision 1.3 2000/10/13 15:18:49 nick * * Change string length parameter from SQLINTEGER to SQLSMALLINT * * Revision 1.2 2000/10/06 08:49:38 nick * * Fix duplicated error messages on connect * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.15 2000/08/11 12:11:27 ngorham * * Make SQLDriverConnect return all the stacked errors from the driver, not * just one * * Revision 1.14 2000/07/13 13:27:24 ngorham * * remove _ from odbcinst_system_file_path() * * Revision 1.13 2000/06/21 08:58:26 ngorham * * Stop SQLDriverConnect dumping core when passed a null dsn string * * Revision 1.12 2000/02/20 10:18:47 ngorham * * Add support for ODBCINI environment override for Applix. * * Revision 1.11 1999/12/14 19:02:25 ngorham * * Mask out the password fields in the logging * * Revision 1.10 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.9 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.8 1999/10/14 06:49:24 ngorham * * Remove @all_includes@ from Drivers/MiniSQL/Makefile.am * * Revision 1.7 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.6 1999/08/17 06:20:00 ngorham * * Remove posibility of returning without clearing the connection mutex. * * Revision 1.5 1999/08/03 21:47:39 shandyb * Moving to automake: changed files in DriverManager * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:05 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.4 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLDriverConnect.c,v $ $Revision: 1.22 $"; /* * connection pooling stuff */ extern int pooling_enabled; void __generate_connection_string( struct con_struct *con_str, char *str, int str_len ) { struct con_pair *cp; char tmp[ 1024 ]; str[ 0 ] = '\0'; if ( con_str -> count == 0 ) { return; } cp = con_str -> list; while( cp ) { if( strcasecmp( cp -> keyword, "DRIVER" ) == 0 ) { sprintf( tmp, "%s={%s};", cp -> keyword, cp -> attribute ); } else { sprintf( tmp, "%s=%s;", cp -> keyword, cp -> attribute ); } if ( strlen( str ) + strlen( tmp ) > str_len ) { break; } else { strcat( str, tmp ); } cp = cp -> next; } } void __get_attr( char ** cp, char ** keyword, char ** value ) { char * ptr; int len; *keyword = *value = NULL; ptr = *cp; if ( !**cp ) return; /* * To handle the case attribute in which the attribute is of the form * "ATTR;" instead of "ATTR=VALUE;" */ while ( **cp && **cp != ';' && **cp != '=' ) { (*cp)++; } if ( !**cp ) return; len = *cp - ptr; *keyword = malloc( len + 1 ); memcpy( *keyword, ptr, len ); (*keyword)[ len ] = '\0'; (**cp != ';') && (*cp)++; ptr = *cp; if ( strcmp( *keyword, "DRIVER" ) == 0 ) { if ( **cp && **cp == '{' ) { (*cp)++; ptr ++; while ( **cp && **cp != '}' ) (*cp)++; len = *cp - ptr; *value = malloc( len + 1 ); memcpy( *value, ptr , len ); (*value)[ len ] = '\0'; (*cp)++; } else { while ( **cp && **cp != ';' ) (*cp)++; len = *cp - ptr; *value = malloc( len + 1 ); memcpy( *value, ptr, len ); (*value)[ len ] = '\0'; } } else { while ( **cp && **cp != ';' ) (*cp)++; len = *cp - ptr; *value = malloc( len + 1 ); memcpy( *value, ptr, len ); (*value)[ len ] = '\0'; } if ( **cp ) (*cp)++; } struct con_pair * __get_pair( char ** cp ) { char *keyword, *value; struct con_pair * con_p; __get_attr( cp, &keyword, &value ); if ( keyword ) { con_p = malloc( sizeof( *con_p )); con_p -> keyword = keyword; con_p -> attribute = value; return con_p; } else { return NULL; } } int __append_pair( struct con_struct *con_str, char *kword, char *value ) { struct con_pair *ptr, *end; /* check that the keyword is not already in the list */ end = NULL; if ( con_str -> count > 0 ) { ptr = con_str -> list; while( ptr ) { if( strcmp( kword, ptr -> keyword ) == 0 ) { free( ptr -> attribute ); ptr -> attribute = malloc( strlen( value ) + 1 ); strcpy( ptr -> attribute, value ); return 0; } end = ptr; ptr = ptr -> next; } } ptr = malloc( sizeof( *ptr )); ptr -> keyword = malloc( strlen( kword ) + 1 ); strcpy( ptr -> keyword, kword ); ptr -> attribute = malloc( strlen( value ) + 1 ); strcpy( ptr -> attribute, value ); con_str -> count ++; if ( con_str -> list ) { end -> next = ptr; ptr -> next = NULL; } else { ptr -> next = NULL; con_str -> list = ptr; } return 0; } int __parse_connection_string_ex( struct con_struct *con_str, char *str, int str_len, int exclude ) { struct con_pair *cp; char *local_str, *ptr; int got_dsn = 0; /* if we have a DSN then ignore any DRIVER or FILEDSN */ int got_driver = 0; /* if we have a DRIVER or FILEDSN then ignore any DSN */ con_str -> count = 0; con_str -> list = NULL; if ( str_len != SQL_NTS ) { local_str = malloc( str_len + 1 ); memcpy( local_str, str, str_len ); local_str[ str_len ] = '\0'; } else { local_str = str; } if ( !local_str || strlen( local_str ) == 0 || ( strlen( local_str ) == 1 && *local_str == ';' )) { /* connection-string ::= empty-string [;] */ if ( str_len != SQL_NTS ) free( local_str ); __append_pair( con_str, "DSN", "DEFAULT" ); return 0; } ptr = local_str; while(( cp = __get_pair( &ptr )) != NULL ) { if ( strcasecmp( cp -> keyword, "DSN" ) == 0 ) { if ( got_driver && exclude ) continue; got_dsn = 1; } else if ( strcasecmp( cp -> keyword, "DRIVER" ) == 0 || strcmp( cp -> keyword, "FILEDSN" ) == 0 ) { if ( got_dsn && exclude ) continue; got_driver = 1; } __append_pair( con_str, cp -> keyword, cp -> attribute ); free( cp -> keyword ); free( cp -> attribute ); free( cp ); } /* if no dsn or DRIVER, then set DSN=DEFAULT */ if ( !got_driver && !got_dsn ) { __append_pair( con_str, "DSN", "DEFAULT" ); } if ( str_len != SQL_NTS ) free( local_str ); return 0; } int __parse_connection_string( struct con_struct *con_str, char *str, int str_len ) { return __parse_connection_string_ex( con_str, str, str_len, 1 ); } char * __get_attribute_value( struct con_struct * con_str, char * keyword ) { struct con_pair *cp; if ( con_str -> count == 0 ) return NULL; cp = con_str -> list; while( cp ) { if( strcasecmp( keyword, cp -> keyword ) == 0 ) { if ( cp -> attribute ) return cp -> attribute; else return ""; } cp = cp -> next; } return NULL; } void __release_conn( struct con_struct *con_str ) { struct con_pair *cp = con_str -> list; struct con_pair *save; while( cp ) { free( cp -> attribute ); free( cp -> keyword ); save = cp; cp = cp -> next; free( save ); } con_str -> count = 0; } SQLRETURN SQLDriverConnectA( SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR *conn_str_in, SQLSMALLINT len_conn_str_in, SQLCHAR *conn_str_out, SQLSMALLINT conn_str_out_max, SQLSMALLINT *ptr_conn_str_out, SQLUSMALLINT driver_completion ) { return SQLDriverConnect( hdbc, hwnd, conn_str_in, len_conn_str_in, conn_str_out, conn_str_out_max, ptr_conn_str_out, driver_completion ); } SQLRETURN SQLDriverConnect( SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR *conn_str_in, SQLSMALLINT len_conn_str_in, SQLCHAR *conn_str_out, SQLSMALLINT conn_str_out_max, SQLSMALLINT *ptr_conn_str_out, SQLUSMALLINT driver_completion ) { DMHDBC connection = (DMHDBC)hdbc; struct con_struct con_struct; char *driver, *dsn = NULL, *filedsn, *tsavefile, savefile[ 128 ]; char lib_name[ INI_MAX_PROPERTY_VALUE + 1 ]; char driver_name[ INI_MAX_PROPERTY_VALUE + 1 ]; SQLRETURN ret_from_connect; SQLCHAR s1[ 2048 ]; SQLCHAR local_conn_str_in[ 2048 ]; SQLCHAR local_out_conection[ 2048 ]; char save_filedsn[ 128 ]; int warnings; /* * check connection */ strcpy( driver_name, "" ); if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); /* * replace this if not set for use by SAVEFILE */ if ( !conn_str_out ) { conn_str_out = local_out_conection; conn_str_out_max = sizeof( local_out_conection ); } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tWindow Hdl = %p\ \n\t\t\tStr In = %s\ \n\t\t\tStr Out = %p\ \n\t\t\tStr Out Max = %d\ \n\t\t\tStr Out Ptr = %p\ \n\t\t\tCompletion = %d", connection, hwnd, __string_with_length_hide_pwd( s1, conn_str_in, len_conn_str_in ), conn_str_out, conn_str_out_max, ptr_conn_str_out, driver_completion ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( len_conn_str_in < 0 && len_conn_str_in != SQL_NTS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( driver_completion == SQL_DRIVER_PROMPT && hwnd == NULL ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &connection -> error, ERROR_HY092, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( driver_completion != SQL_DRIVER_PROMPT && driver_completion != SQL_DRIVER_COMPLETE && driver_completion != SQL_DRIVER_COMPLETE_REQUIRED && driver_completion != SQL_DRIVER_NOPROMPT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY110" ); __post_internal_error( &connection -> error, ERROR_HY110, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * check the state of the connection */ if ( connection -> state != STATE_C2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * parse the connection string */ if ( !conn_str_in ) { /* * not quite by the book, but better than nothing */ conn_str_in = (SQLCHAR*)"DSN=DEFAULT;"; len_conn_str_in = strlen((char*) conn_str_in ); } /* * can we find a pooled connection to use here ? */ connection -> pooled_connection = NULL; if ( pooling_enabled && search_for_pool( connection, NULL, 0, NULL, 0, NULL, 0, conn_str_in, len_conn_str_in )) { /* * copy the in string to the out string */ ret_from_connect = SQL_SUCCESS; if ( conn_str_out ) { if ( len_conn_str_in < 0 ) { len_conn_str_in = strlen((char*) conn_str_in ); } if ( len_conn_str_in >= conn_str_out_max ) { memcpy( conn_str_out, conn_str_in, conn_str_out_max - 1 ); conn_str_out[ conn_str_out_max - 1 ] = '\0'; if ( ptr_conn_str_out ) { *ptr_conn_str_out = len_conn_str_in; } __post_internal_error( &connection -> error, ERROR_01004, NULL, connection -> environment -> requested_version ); ret_from_connect = SQL_SUCCESS_WITH_INFO; } else { memcpy( conn_str_out, conn_str_in, len_conn_str_in ); conn_str_out[ len_conn_str_in ] = '\0'; if ( ptr_conn_str_out ) { *ptr_conn_str_out = len_conn_str_in; } } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } connection -> state = STATE_C4; return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } /* * else safe the info for later */ if ( pooling_enabled ) { connection -> dsn_length = 0; strcpy( connection -> server, "" ); connection -> server_length = 0; strcpy( connection -> user, "" ); connection -> user_length = 0; strcpy( connection -> password, "" ); connection -> password_length = 0; if ( len_conn_str_in == SQL_NTS ) { strcpy( connection -> driver_connect_string, (char*)conn_str_in ); } else { memcpy( connection -> driver_connect_string, conn_str_in, len_conn_str_in ); } connection -> dsn_length = len_conn_str_in; } __parse_connection_string( &con_struct, (char*)conn_str_in, len_conn_str_in ); /* * get for later */ tsavefile = __get_attribute_value( &con_struct, "SAVEFILE" ); if ( tsavefile ) { strcpy( savefile, tsavefile ); } else { savefile[ 0 ] = '\0'; } /* * open the file dsn, get each entry from it, if its not in the connection * struct, add it */ filedsn = __get_attribute_value( &con_struct, "FILEDSN" ); if ( filedsn ) { char str[ 2048 ]; if ( SQLReadFileDSN( filedsn, "ODBC", NULL, str, sizeof( str ), NULL )) { struct con_struct con_struct1; strcpy( save_filedsn, filedsn ); if ( strlen( str )) { strcpy((char*)local_conn_str_in, (char*)conn_str_in ); conn_str_in = local_conn_str_in; __parse_connection_string( &con_struct1, str, strlen( str )); /* * Get the attributes from the original string */ conn_str_in[ 0 ] = '\0'; if ( con_struct.count ) { struct con_pair *cp; cp = con_struct.list; while( cp ) { char str1[ 256 ]; /* * Don't pass FILEDSN down */ if ( strcmp( cp -> keyword, "FILEDSN" ) && strcmp( cp -> keyword, "FILEDSN" ) ) { if ( strlen((char*) conn_str_in ) > 0 ) { sprintf( str1, ";%s=%s", cp -> keyword, cp -> attribute ); } else { sprintf( str1, "%s=%s", cp -> keyword, cp -> attribute ); } strcat((char*) conn_str_in, str1 ); } cp = cp -> next; } } if ( con_struct1.count ) { struct con_pair *cp; cp = con_struct1.list; while( cp ) { if ( !__get_attribute_value( &con_struct, cp -> keyword )) { char str1[ 256 ]; if ( strlen((char*) conn_str_in ) > 0 ) { sprintf( str1, ";%s=%s", cp -> keyword, cp -> attribute ); } else { sprintf( str1, "%s=%s", cp -> keyword, cp -> attribute ); } strcat((char*) conn_str_in, str1 ); } cp = cp -> next; } } len_conn_str_in = strlen((char*) conn_str_in ); __release_conn( &con_struct1 ); } /* * reparse the string */ __release_conn( &con_struct ); __parse_connection_string( &con_struct, (char*)conn_str_in, len_conn_str_in ); } } else { save_filedsn[ 0 ] = '\0'; } /* * look for some keywords * * have we got a DRIVER= attribute */ driver = __get_attribute_value( &con_struct, "DRIVER" ); if ( driver ) { /* * look up the driver in the ini file */ strcpy( driver_name, driver ); #ifdef PLATFORM64 SQLGetPrivateProfileString( driver, "Driver64", "", lib_name, sizeof( lib_name ), "ODBCINST.INI" ); if ( lib_name[ 0 ] == '\0' ) { SQLGetPrivateProfileString( driver, "Driver", "", lib_name, sizeof( lib_name ), "ODBCINST.INI" ); } #else SQLGetPrivateProfileString( driver, "Driver", "", lib_name, sizeof( lib_name ), "ODBCINST.INI" ); #endif if ( lib_name[ 0 ] == '\0' ) { /* * at this point a box could pop up to allow the selection of a driver * * do this later */ dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); __release_conn( &con_struct ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } strcpy( connection -> dsn, "" ); __handle_attr_extensions( connection, NULL, driver_name ); } else { dsn = __get_attribute_value( &con_struct, "DSN" ); if ( !dsn ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); __release_conn( &con_struct ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( strlen( dsn ) > SQL_MAX_DSN_LENGTH ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM012" ); __post_internal_error( &connection -> error, ERROR_IM012, NULL, connection -> environment -> requested_version ); __release_conn( &con_struct ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * look up the dsn in the ini file */ if ( !__find_lib_name( dsn, lib_name, driver_name )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); __release_conn( &con_struct ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } strcpy( connection -> dsn, dsn ); __handle_attr_extensions( connection, dsn, driver_name ); } if ( dsn ) { /* * do we have any Environment, Connection, or Statement attributes set in the ini ? */ __handle_attr_extensions( connection, dsn, driver_name ); } __release_conn( &con_struct ); /* * we have now got the name of a lib to load */ if ( !__connect_part_one( connection, lib_name, driver_name, &warnings )) { return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( !CHECK_SQLDRIVERCONNECT( connection ) && !CHECK_SQLDRIVERCONNECTW( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __disconnect_part_one( connection ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( CHECK_SQLDRIVERCONNECT( connection )) { /* if ( CHECK_SQLSETCONNECTATTR( connection )) { int lret; lret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, SQL_ATTR_ANSI_APP, SQL_AA_TRUE, 0 ); } */ ret_from_connect = SQLDRIVERCONNECT( connection, connection -> driver_dbc, hwnd, conn_str_in, len_conn_str_in, conn_str_out, conn_str_out_max, ptr_conn_str_out, driver_completion ); if ( ret_from_connect != SQL_SUCCESS ) { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; /* * get the errors from the driver before * loseing the connection */ if ( CHECK_SQLERROR( connection )) { do { ret = SQLERROR( connection, SQL_NULL_HENV, connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, message_text ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } else if ( CHECK_SQLGETDIAGREC( connection )) { int rec = 1; do { ret = SQLGETDIAGREC( connection, SQL_HANDLE_DBC, connection -> driver_dbc, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, message_text ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } } /* * if it was a error then return now */ if ( !SQL_SUCCEEDED( ret_from_connect )) { __disconnect_part_one( connection ); __disconnect_part_four( connection ); sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } connection -> unicode_driver = 0; } else { SQLWCHAR *uc_conn_str_in, *s1 = NULL; SQLCHAR s2[ 128 ]; uc_conn_str_in = ansi_to_unicode_alloc( conn_str_in, len_conn_str_in, connection ); if ( CHECK_SQLSETCONNECTATTR( connection )) { int lret; lret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, SQL_ATTR_ANSI_APP, SQL_AA_FALSE, 0 ); } if ( conn_str_out && conn_str_out_max > 0 ) { s1 = malloc( sizeof( SQLWCHAR ) * ( conn_str_out_max + 1 )); } ret_from_connect = SQLDRIVERCONNECTW( connection, connection -> driver_dbc, hwnd, uc_conn_str_in, len_conn_str_in, s1 ? s1 : (SQLWCHAR*)conn_str_out, conn_str_out_max, ptr_conn_str_out, driver_completion ); if ( uc_conn_str_in ) free( uc_conn_str_in ); if ( ret_from_connect != SQL_SUCCESS ) { SQLWCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLWCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; /* * get the errors from the driver before * loseing the connection */ if ( CHECK_SQLERRORW( connection )) { do { ret = SQLERRORW( connection, SQL_NULL_HENV, connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { SQLCHAR *as1, *as2; __post_internal_error_ex_w( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); as1 = (SQLCHAR*) unicode_to_ansi_alloc( sqlstate, SQL_NTS, connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( message_text, SQL_NTS, connection ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", as1, as2 ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } else if ( CHECK_SQLGETDIAGRECW( connection )) { int rec = 1; do { ret = SQLGETDIAGRECW( connection, SQL_HANDLE_DBC, connection -> driver_dbc, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { SQLCHAR *as1, *as2; __post_internal_error_ex_w( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); as1 = (SQLCHAR*) unicode_to_ansi_alloc( sqlstate, SQL_NTS, connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( message_text, SQL_NTS, connection ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", as1, as2 ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); dm_log_write_diag( connection -> msg ); } } while( SQL_SUCCEEDED( ret )); } } /* * if it was a error then return now */ if ( !SQL_SUCCEEDED( ret_from_connect )) { __disconnect_part_one( connection ); __disconnect_part_four( connection ); sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s2 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } else { if ( conn_str_out && s1 ) { unicode_to_ansi_copy((char*) conn_str_out, conn_str_out_max, s1, SQL_NTS, connection ); } } if ( s1 ) { free( s1 ); } connection -> unicode_driver = 1; } /* * we should be connected now */ connection -> state = STATE_C4; /* * did we get the type we wanted */ if ( connection -> driver_version != connection -> environment -> requested_version ) { connection -> driver_version = connection -> environment -> requested_version; __post_internal_error( &connection -> error, ERROR_01000, "Driver does not support the requested version", connection -> environment -> requested_version ); ret_from_connect = SQL_SUCCESS_WITH_INFO; } if ( !__connect_part_two( connection )) { __disconnect_part_two( connection ); __disconnect_part_one( connection ); __disconnect_part_four( connection ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( log_info.log_flag ) { if ( conn_str_out && strlen((char*) conn_str_out ) > 64 ) { sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tConnection Out [%.64s...]", __get_return_status( ret_from_connect, s1 ), conn_str_out ); } else { sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tConnection Out [%s]", __get_return_status( ret_from_connect, s1 ), __string_with_length_hide_pwd( s1, conn_str_out ? conn_str_out : (SQLCHAR*)"NULL", SQL_NTS )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } /* * If we specified FILEDSN or SAVEFILE these need adding to the * output string */ if ( strlen( savefile )) { char *str = strdup((char*) conn_str_out ); strcpy((char*) conn_str_out, "SAVEFILE=" ); strcat((char*) conn_str_out, savefile ); strcat((char*) conn_str_out, ";" ); strcat((char*) conn_str_out, str ); free( str ); if ( ptr_conn_str_out ) { *ptr_conn_str_out = strlen((char*) conn_str_out ); } } if ( strlen( save_filedsn )) { char *str = strdup((char*) conn_str_out ); strcpy((char*) conn_str_out, "FILEDSN=" ); strcat((char*) conn_str_out, save_filedsn ); strcat((char*) conn_str_out, ";" ); strcat((char*) conn_str_out, str ); free( str ); if ( ptr_conn_str_out ) { *ptr_conn_str_out = strlen((char*) conn_str_out ); } } /* * write the connection string out to a file */ if ( tsavefile ) { if ( SQL_SUCCEEDED( ret_from_connect )) { __parse_connection_string_ex( &con_struct, (char*)conn_str_out, conn_str_out_max, 0 ); /* * remove them */ SQLWriteFileDSN( savefile, "ODBC", NULL, NULL ); if ( con_struct.count ) { int has_driver = 0; struct con_pair *cp; cp = con_struct.list; while( cp ) { if ( strcasecmp( cp -> keyword, "PWD" ) == 0 ) { /* * don't save this */ cp = cp -> next; continue; } else if ( strcasecmp( cp -> keyword, "SAVEFILE" ) == 0 ) { /* * or this */ cp = cp -> next; continue; } else if ( strcasecmp( cp -> keyword, "DSN" ) == 0 ) { /* * don't save this either, there should be enough with the added DRIVER= * to make it work */ cp = cp -> next; continue; } else if ( strcasecmp( cp -> keyword, "DRIVER" ) == 0 ) { has_driver = 1; } SQLWriteFileDSN( savefile, "ODBC", cp -> keyword, cp -> attribute ); cp = cp -> next; } if ( !has_driver ) { SQLWriteFileDSN( savefile, "ODBC", "Driver", driver_name ); } } __release_conn( &con_struct ); } } if ( warnings && ret_from_connect == SQL_SUCCESS ) { ret_from_connect = SQL_SUCCESS_WITH_INFO; } return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } unixODBC-2.2.14-p2/DriverManager/SQLDrivers.c0100644000076400007640000003173011070160005017057 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDrivers.c,v 1.11 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLDrivers.c,v $ * Revision 1.11 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.10 2005/10/06 08:58:19 lurcher * Fix problem with SQLDrivers not returning first entry * * Revision 1.9 2005/07/17 09:11:23 lurcher * Fix bug in SQLDrivers that was stopping the return of the attribute length * * Revision 1.8 2004/07/25 00:42:02 peteralexharvey * for OS2 port * * Revision 1.7 2003/11/13 15:12:53 lurcher * * small change to ODBCConfig to have the password field in the driver * properties hide the password * Make both # and ; comments in ini files * * Revision 1.6 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/05/21 14:19:44 lurcher * * * Update libtool to escape from AIX build problem * * Add fix to avoid file handle limitations * * Add more UNICODE changes, it looks like it is native 16 representation * the old way can be reproduced by defining UCS16BE * * Add iusql, its just the same as isql but uses the wide functions * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/05/15 10:57:44 nick * * Add initial support for VMS * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.12 2000/08/16 13:06:21 ngorham * * Fix invalid return code * * Revision 1.11 2000/07/13 13:27:24 ngorham * * remove _ from odbcinst_system_file_path() * * Revision 1.10 2001/04/04 23:10:34 ngorham * * Fix a SQLDrivers problem * * Revision 1.9 2000/02/20 10:18:47 ngorham * * Add support for ODBCINI environment override for Applix. * * Revision 1.8 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/09/19 22:24:33 ngorham * * Added support for the cursor library * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:06 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.4 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLDrivers.c,v $ $Revision: 1.11 $"; #define BUFFERSIZE 1024 SQLRETURN SQLDriversA( SQLHENV henv, SQLUSMALLINT fdirection, SQLCHAR *sz_driver_desc, SQLSMALLINT cb_driver_desc_max, SQLSMALLINT *pcb_driver_desc, SQLCHAR *sz_driver_attributes, SQLSMALLINT cb_drvr_attr_max, SQLSMALLINT *pcb_drvr_attr ) { return SQLDrivers( henv, fdirection, sz_driver_desc, cb_driver_desc_max, pcb_driver_desc, sz_driver_attributes, cb_drvr_attr_max, pcb_drvr_attr ); } SQLRETURN SQLDrivers( SQLHENV henv, SQLUSMALLINT fdirection, SQLCHAR *sz_driver_desc, SQLSMALLINT cb_driver_desc_max, SQLSMALLINT *pcb_driver_desc, SQLCHAR *sz_driver_attributes, SQLSMALLINT cb_drvr_attr_max, SQLSMALLINT *pcb_drvr_attr ) { DMHENV environment = (DMHENV) henv; char buffer[ BUFFERSIZE + 1 ]; char object[ INI_MAX_OBJECT_NAME + 1 ]; SQLRETURN ret = SQL_SUCCESS; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tDirection = %d", environment, (int)fdirection ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_protect( SQL_HANDLE_ENV, environment ); if ( cb_driver_desc_max < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &environment -> error, ERROR_HY090, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } /* * the DataManager fails if this is in * * if ( cb_drvr_attr_max < 0 || cb_drvr_attr_max == 1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &environment -> error, ERROR_HY090, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } */ /* * check that a version has been requested */ if ( environment -> requested_version == 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &environment -> error, ERROR_HY010, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( fdirection != SQL_FETCH_FIRST && fdirection != SQL_FETCH_NEXT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY103" ); __post_internal_error( &environment -> error, ERROR_HY103, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( fdirection == SQL_FETCH_FIRST ) environment -> sql_driver_count = 0; else environment -> sql_driver_count ++; try_again: memset( buffer, '\0', sizeof( buffer )); memset( object, '\0', sizeof( object )); SQLGetPrivateProfileString( NULL, NULL, NULL, buffer, sizeof( buffer ), "ODBCINST.INI" ); if ( iniElement( buffer, '\0', '\0', environment -> sql_driver_count, object, sizeof( object )) != INI_SUCCESS ) { /* * Set up for the next time */ environment -> sql_driver_count = -1; ret = SQL_NO_DATA; } else { ret = SQL_SUCCESS; /* * this section is used for internal info */ if ( strcmp( object, "ODBC" ) == 0 ) { environment -> sql_driver_count ++; goto try_again; } if ( pcb_driver_desc ) *pcb_driver_desc = strlen( object ); if ( sz_driver_desc ) { if ( strlen( object ) >= cb_driver_desc_max ) { memcpy( sz_driver_desc, object, cb_driver_desc_max - 1 ); sz_driver_desc[ cb_driver_desc_max - 1 ] = '\0'; ret = SQL_SUCCESS_WITH_INFO; } else { strcpy((char*) sz_driver_desc, object ); } } else { ret = SQL_SUCCESS_WITH_INFO; } if ( sz_driver_attributes || pcb_drvr_attr ) { HINI hIni; int string_length = 0; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szValue[INI_MAX_PROPERTY_NAME+1]; char szIniName[ INI_MAX_OBJECT_NAME + 1 ]; char buffer[ 1024 ]; int total_len = 0; char b1[ 256 ], b2[ 256 ]; /* * enumerate the driver attributes */ sprintf( szIniName, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 )); memset( buffer, '\0', sizeof( buffer )); #ifdef __OS2__ if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', FALSE, 1L ) == INI_SUCCESS ) #else if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', FALSE ) == INI_SUCCESS ) #endif { char pRetBuffer[ 256 ]; int nRetBuffer; iniObjectSeek( hIni, (char *)object ); iniPropertyFirst( hIni ); while ( iniPropertyEOL( hIni ) != TRUE ) { iniProperty( hIni, szPropertyName ); iniValue( hIni, szValue ); sprintf( buffer, "%s=%s", szPropertyName, szValue ); if ( total_len + strlen( buffer ) + 1 > cb_drvr_attr_max ) { ret = SQL_SUCCESS_WITH_INFO; break; } else { if ( sz_driver_attributes ) { strcpy((char*) sz_driver_attributes, buffer ); sz_driver_attributes += strlen( buffer ) + 1; } } total_len += strlen( buffer ) + 1; iniPropertyNext( hIni ); } /* * add extra null */ if ( sz_driver_attributes ) *sz_driver_attributes = '\0'; if ( pcb_drvr_attr ) { *pcb_drvr_attr = total_len; } iniClose( hIni ); } } } if ( ret == SQL_SUCCESS_WITH_INFO ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 01004" ); __post_internal_error( &environment -> error, ERROR_01004, NULL, environment -> requested_version ); } if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } return function_return( SQL_HANDLE_ENV, environment, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLEndTran.c0100644000076400007640000003764310437351746017031 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLEndTran.c,v 1.9 2006/05/31 17:35:34 lurcher Exp $ * * $Log: SQLEndTran.c,v $ * Revision 1.9 2006/05/31 17:35:34 lurcher * Add unicode ODBCINST entry points * * Revision 1.8 2004/06/16 14:42:03 lurcher * * * Fix potential corruption with threaded use and SQLEndTran * * Revision 1.7 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.6 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.5 2002/09/18 14:49:32 lurcher * * DataManagerII additions and some more threading fixes * * Revision 1.3 2002/08/20 12:41:07 lurcher * * Fix incorrect return state from SQLEndTran/SQLTransact * * Revision 1.2 2002/08/12 16:20:44 lurcher * * Make it try and find a working iconv set of encodings * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.9 2000/08/16 15:57:51 ngorham * * Fix bug where it falled if called in state C4 * * Revision 1.8 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.4 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.3 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.2 1999/06/19 17:51:40 ngorham * * Applied assorted minor bug fixes * * Revision 1.1.1.1 1999/05/29 13:41:06 sShandyb * first go at it * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:20 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLEndTran.c,v $ $Revision: 1.9 $"; SQLRETURN SQLEndTran( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT completion_type ) { SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; if ( handle_type == SQL_HANDLE_ENV ) { DMHENV environment = (DMHENV) handle; DMHDBC connection; SQLRETURN ret; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tCompletion Type = %d", (void*)environment, (int)completion_type ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_protect( SQL_HANDLE_ENV, environment ); if ( environment -> state == STATE_E1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &environment -> error, ERROR_08003, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( completion_type != SQL_COMMIT && completion_type != SQL_ROLLBACK ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY012" ); __post_internal_error( &environment -> error, ERROR_HY012, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } /* * for each connection on this env */ connection = __get_dbc_root(); while( connection ) { if ( connection -> environment == environment && connection -> state > STATE_C4 ) { if ( CHECK_SQLENDTRAN( connection )) { ret = SQLENDTRAN( connection, SQL_HANDLE_DBC, connection -> driver_dbc, completion_type ); if ( !SQL_SUCCEEDED( ret )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 25S01" ); __post_internal_error( &environment -> error, ERROR_25S01, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } } else if ( CHECK_SQLTRANSACT( connection )) { ret = SQLTRANSACT( connection, SQL_NULL_HENV, connection -> driver_dbc, completion_type ); if ( !SQL_SUCCEEDED( ret )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 25S01" ); __post_internal_error( &environment -> error, ERROR_25S01, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } } connection = connection -> next_class_list; } sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); return function_return( SQL_HANDLE_ENV, environment, SQL_SUCCESS ); } else if ( handle_type == SQL_HANDLE_DBC ) { DMHDBC connection = (DMHDBC) handle; SQLRETURN ret; SQLCHAR s0[ 20 ]; if ( !__validate_dbc( connection )) { return SQL_INVALID_HANDLE; } function_entry( connection ); sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tCompletion Type = %d", (void*)connection, (int)completion_type ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C1 || connection -> state == STATE_C2 || connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( completion_type != SQL_COMMIT && completion_type != SQL_ROLLBACK ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY012" ); __post_internal_error( &connection -> error, ERROR_HY012, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( CHECK_SQLENDTRAN( connection )) { ret = SQLENDTRAN( connection, handle_type, connection -> driver_dbc, completion_type ); } else if ( CHECK_SQLTRANSACT( connection )) { ret = SQLTRANSACT( connection, SQL_NULL_HENV, connection -> driver_dbc, completion_type ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if( SQL_SUCCEEDED(ret) ) { DMHSTMT statement; SQLINTEGER stmt_remaining; SQLSMALLINT cb_value; SQLSMALLINT cb_value_length = sizeof(SQLSMALLINT); SQLRETURN ret1; /* * for each statement belonging to this connection set its state * relative to the commit or rollback behavior */ if ( connection -> cbs_found == 0 ) { /* release thread so we can get the info */ thread_release( SQL_HANDLE_DBC, connection ); ret1 = SQLGetInfo(connection, SQL_CURSOR_COMMIT_BEHAVIOR, &connection -> ccb_value, sizeof( SQLSMALLINT ), &cb_value_length); if ( SQL_SUCCEEDED( ret1 )) { ret1 = SQLGetInfo(connection, SQL_CURSOR_ROLLBACK_BEHAVIOR, &connection -> crb_value, sizeof( SQLSMALLINT ), &cb_value_length); } /* protect thread again */ thread_protect( SQL_HANDLE_DBC, connection ); if ( SQL_SUCCEEDED( ret1 )) { connection -> cbs_found = 1; } } if( completion_type == SQL_COMMIT ) { cb_value = connection -> ccb_value; } else { cb_value = connection -> crb_value; } if( connection -> cbs_found ) { /* * We need to protect this at a higher level than connection * as statements can be coming and going */ mutex_lib_entry(); statement = __get_stmt_root(); stmt_remaining = connection -> statement_count; while ( statement && stmt_remaining > 0 ) { if ( statement -> connection == connection ) { if ( (statement -> state == STATE_S2 || statement -> state == STATE_S3) && cb_value == SQL_CB_DELETE ) { statement -> state = STATE_S1; statement -> prepared = 0; } else if ( statement -> state == STATE_S4 || statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) { if( !statement -> prepared && (cb_value == SQL_CB_DELETE || cb_value == SQL_CB_CLOSE) ) { statement -> state = STATE_S1; } else if( statement -> prepared ) { if( cb_value == SQL_CB_DELETE ) { statement -> state = STATE_S1; statement -> prepared = 0; } else if( cb_value == SQL_CB_CLOSE ) { if ( statement -> state == STATE_S4 ) statement -> state = STATE_S2; else statement -> state = STATE_S3; } } } stmt_remaining --; } statement = statement -> next_class_list; } mutex_lib_exit(); } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } else { /* * the book here indicates that we can return a HY092 error * here, but on what handle ? */ return SQL_INVALID_HANDLE; } } unixODBC-2.2.14-p2/DriverManager/SQLError.c0100644000076400007640000003706011070160005016534 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLError.c,v 1.10 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLError.c,v $ * Revision 1.10 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.9 2008/05/20 13:43:47 lurcher * Vms fixes * * Revision 1.8 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.7 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.6 2002/11/11 17:10:08 lurcher * * VMS changes * * Revision 1.5 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.4 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.3 2002/02/27 11:27:14 lurcher * * Fix bug in error reporting * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.5 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.4 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.3 2001/01/06 15:00:12 nick * * Fix bug in SQLError introduced with UNICODE * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.14 2000/06/23 16:11:35 ngorham * * Map ODBC 2 SQLSTATE values to ODBC 3 * * Revision 1.13 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.12 1999/11/10 22:15:48 ngorham * * Fix some bugs with the DM and error reporting. * * Revision 1.11 1999/11/10 03:51:33 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.10 1999/10/24 23:54:17 ngorham * * First part of the changes to the error reporting * * Revision 1.9 1999/10/14 06:49:24 ngorham * * Remove @all_includes@ from Drivers/MiniSQL/Makefile.am * * Revision 1.8 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.7 1999/08/03 21:47:39 shandyb * Moving to automake: changed files in DriverManager * * Revision 1.6 1999/07/15 06:22:33 ngorham * * Fixed spelling mistake * * Revision 1.5 1999/07/14 19:46:04 ngorham * * Fix the error logging when SQLError or SQLGetDiagRec returns SQL_NO_DATA * * Revision 1.4 1999/07/12 19:42:05 ngorham * * Finished off SQLGetDiagField.c and fixed a but that caused SQLError to * fail with Perl and PHP, connect errors were not being returned because * I was checking to the environment being set, they were setting the * statement and the environment. The order of checking has been changed. * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:06 sShandyb * first go at it * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:20 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 21:40:58 nick * End of another night :-) * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLError.c,v $ $Revision: 1.10 $"; static SQLRETURN extract_sql_error( EHEAD *head, SQLCHAR *sqlstate, SQLINTEGER *native_error, SQLCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length, DMHDBC connection ) { ERROR *err; SQLRETURN ret; char *str; if ( sqlstate ) strcpy((char*) sqlstate, "00000" ); if ( head -> sql_error_head.error_count < 1 ) { return SQL_NO_DATA; } err = head -> sql_error_head.error_list_head; head -> sql_error_head.error_list_head = err -> next; /* * is it the last */ if ( head -> sql_error_head.error_list_tail == err ) head -> sql_error_head.error_list_tail = NULL; /* * not empty yet */ if ( head -> sql_error_head.error_list_head ) { head -> sql_error_head.error_list_head -> prev = NULL; } head -> sql_error_head.error_count --; if ( sqlstate ) { unicode_to_ansi_copy((char*) sqlstate, 6, err -> sqlstate, SQL_NTS, connection ); } str = unicode_to_ansi_alloc( err -> msg, SQL_NTS, connection ); if ( buffer_length < strlen( str ) + 1 ) { ret = SQL_SUCCESS_WITH_INFO; } else { ret = SQL_SUCCESS; } if ( message_text ) { if ( ret == SQL_SUCCESS ) { strcpy((char*) message_text, str ); } else { memcpy( message_text, str, buffer_length ); message_text[ buffer_length - 1 ] = '\0'; } } if ( text_length ) { *text_length = strlen( str ); } if ( native_error ) { *native_error = err -> native_error; } /* * clean up */ free( err -> msg ); free( err ); if ( str ) free( str ); /* * map 3 to 2 if required */ if ( SQL_SUCCEEDED( ret ) && sqlstate ) __map_error_state( (char *)sqlstate, __get_version( head )); return ret; } SQLRETURN SQLErrorA( SQLHENV environment_handle, SQLHDBC connection_handle, SQLHSTMT statement_handle, SQLCHAR *sqlstate, SQLINTEGER *native_error, SQLCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length ) { return SQLError( environment_handle, connection_handle, statement_handle, sqlstate, native_error, message_text, buffer_length, text_length ); } SQLRETURN SQLError( SQLHENV environment_handle, SQLHDBC connection_handle, SQLHSTMT statement_handle, SQLCHAR *sqlstate, SQLINTEGER *native_error, SQLCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length ) { SQLRETURN ret; SQLCHAR s0[ 32 ], s1[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; if ( statement_handle ) { DMHSTMT statement = ( DMHSTMT ) statement_handle; if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_STMT, statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", statement, sqlstate, native_error, message_text, buffer_length, text_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } ret = extract_sql_error( &statement -> error, sqlstate, native_error, message_text, buffer_length, text_length, statement -> connection ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), sqlstate, __iptr_as_string( s0, native_error ), __sdata_as_string( s1, SQL_CHAR, text_length, message_text )); } else { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_release( SQL_HANDLE_STMT, statement ); return ret; } else if ( connection_handle ) { DMHDBC connection = ( DMHDBC ) connection_handle; if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_DBC, connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", connection, sqlstate, native_error, message_text, buffer_length, text_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } ret = extract_sql_error( &connection -> error, sqlstate, native_error, message_text, buffer_length, text_length, connection ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), sqlstate, __iptr_as_string( s0, native_error ), __sdata_as_string( s1, SQL_CHAR, text_length, message_text )); } else { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_release( SQL_HANDLE_DBC, connection ); } else if ( environment_handle ) { DMHENV environment = ( DMHENV ) environment_handle; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_ENV, environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", environment, sqlstate, native_error, message_text, buffer_length, text_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } ret = extract_sql_error( &environment -> error, sqlstate, native_error, message_text, buffer_length, text_length, NULL ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { sprintf( environment -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), sqlstate, __iptr_as_string( s0, native_error ), __sdata_as_string( s1, SQL_CHAR, text_length, message_text )); } else { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_release( SQL_HANDLE_ENV, environment ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } return ret; } unixODBC-2.2.14-p2/DriverManager/SQLExecDirect.c0100644000076400007640000003377410416701600017477 0ustar nicknick/********************************************************************* * * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLExecDirect.c,v 1.10 2006/04/11 10:22:56 lurcher Exp $ * * $Log: SQLExecDirect.c,v $ * Revision 1.10 2006/04/11 10:22:56 lurcher * Fix a data type check * * Revision 1.9 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.8 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.7 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.6 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.5 2002/07/18 15:21:56 lurcher * * Fix problem with SQLExecute/SQLExecDirect returning SQL_NO_DATA * * Revision 1.4 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.3 2002/01/15 14:47:44 lurcher * * Reset stmt->prepared flag after entering a SQLParamData state from * SQLExecDirect * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.5 2001/08/17 11:03:35 nick * * Fix final state from SQLExecute if error happens * * Revision 1.4 2001/04/18 15:03:37 nick * * Fix problem when going to DB2 unicode driver * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.11 2000/06/20 12:43:58 ngorham * * Fix bug that caused a success with info message from SQLExecute or * SQLExecDirect to be lost if used with a ODBC 3 driver and the application * called SQLGetDiagRec * * Revision 1.10 2000/06/16 16:52:16 ngorham * * Stop info messages being lost when calling SQLExecute etc on ODBC 3 * drivers, the SQLNumResultCols were clearing the error before * function return had a chance to get to them * * Revision 1.9 1999/11/18 22:42:09 ngorham * * Fix missing function_entry in SQLExecDirect() * * Revision 1.8 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/11/10 03:51:33 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:06 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.5 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 21:40:58 nick * End of another night :-) * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLExecDirect.c,v $ $Revision: 1.10 $"; SQLRETURN SQLExecDirectA( SQLHSTMT statement_handle, SQLCHAR *statement_text, SQLINTEGER text_length ) { return SQLExecDirect( statement_handle, statement_text, text_length ); } SQLRETURN SQLExecDirect( SQLHSTMT statement_handle, SQLCHAR *statement_text, SQLINTEGER text_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR *s1; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { /* * allocate some space for the buffer */ if ( statement_text && text_length == SQL_NTS ) { s1 = malloc( strlen((char*) statement_text ) + LOG_MESSAGE_LEN ); } else if ( statement_text ) { s1 = malloc( text_length + LOG_MESSAGE_LEN ); } else { s1 = malloc( LOG_MESSAGE_LEN ); } sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tSQL = %s", statement, __string_with_length( s1, statement_text, text_length )); free( s1 ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( !statement_text ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY009" ); __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( text_length <= 0 && text_length != SQL_NTS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLEXECDIRECT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1; #ifdef NR_PROBE if ( !CHECK_SQLEXECDIRECTW( statement -> connection ) || !CHECK_SQLNUMRESULTCOLS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } #else if ( !CHECK_SQLEXECDIRECTW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } #endif s1 = ansi_to_unicode_alloc( statement_text, text_length, statement -> connection ); ret = SQLEXECDIRECTW( statement -> connection, statement -> driver_stmt, s1, text_length ); if ( s1 ) free( s1 ); } else { #ifdef NR_PROBE if ( !CHECK_SQLEXECDIRECT( statement -> connection ) || !CHECK_SQLNUMRESULTCOLS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } #else if ( !CHECK_SQLEXECDIRECT( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } #endif ret = SQLEXECDIRECT( statement -> connection, statement -> driver_stmt, statement_text, text_length ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE SQLRETURN local_ret; /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); } local_ret = SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); if ( statement -> numcols > 0 ) { statement -> state = STATE_S5; } else { statement -> state = STATE_S4; } #else /* * We don't know for sure */ statement -> hascols = 1; statement -> state = STATE_S5; #endif statement -> prepared = 0; /* * there is a issue here with transactions, but for the * moment * statement -> connection -> state = STATE_C6; */ } else if ( ret == SQL_NO_DATA ) { statement -> state = STATE_S4; statement -> prepared = 0; } else if ( ret == SQL_NEED_DATA ) { statement -> interupted_func = SQL_API_SQLEXECDIRECT; statement -> interupted_state = statement -> state; statement -> state = STATE_S8; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLEXECDIRECT; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; statement -> prepared = 0; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLExecute.c0100644000076400007640000002335710100600732017050 0ustar nicknick/********************************************************************e * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLExecute.c,v 1.8 2004/07/25 00:42:02 peteralexharvey Exp $ * * $Log: SQLExecute.c,v $ * Revision 1.8 2004/07/25 00:42:02 peteralexharvey * for OS2 port * * Revision 1.7 2004/07/24 17:55:37 lurcher * Sync up CVS * * Revision 1.6 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/07/18 15:21:57 lurcher * * Fix problem with SQLExecute/SQLExecDirect returning SQL_NO_DATA * * Revision 1.3 2002/04/22 02:03:13 peteralexharvey * - added demo flag to DM because Apple MUST have demo versions of all * software they list on their web * * Revision 1.2 2001/11/21 16:58:25 lurcher * * Assorted fixes to make the MAX OSX build work nicer * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/08/17 11:03:35 nick * * Fix final state from SQLExecute if error happens * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.11 2000/06/20 12:43:58 ngorham * * Fix bug that caused a success with info message from SQLExecute or * SQLExecDirect to be lost if used with a ODBC 3 driver and the application * called SQLGetDiagRec * * Revision 1.10 2000/06/16 16:52:17 ngorham * * Stop info messages being lost when calling SQLExecute etc on ODBC 3 * drivers, the SQLNumResultCols were clearing the error before * function return had a chance to get to them * * Revision 1.9 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/11/10 03:51:33 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.7 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.4 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.3 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.2 1999/06/19 17:51:40 ngorham * * Applied assorted minor bug fixes * * Revision 1.1.1.1 1999/05/29 13:41:06 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.5 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLExecute.c,v $ $Revision: 1.8 $"; SQLRETURN SQLExecute( SQLHSTMT statement_handle ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p", statement ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { if ( statement -> prepared ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); } return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S1 || statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLEXECUTE ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( !CHECK_SQLEXECUTE( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLEXECUTE( statement -> connection , statement -> driver_stmt ); if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE SQLRETURN local_ret; /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); } local_ret = SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); if ( statement -> numcols > 0 ) statement -> state = STATE_S5; else statement -> state = STATE_S4; #else /* * We don't know for sure */ statement -> hascols = 1; statement -> state = STATE_S5; #endif } else if ( ret == SQL_NO_DATA ) { statement -> state = STATE_S4; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLEXECUTE; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( ret == SQL_NEED_DATA ) { statement -> interupted_func = SQL_API_SQLEXECUTE; statement -> interupted_state = statement -> state; statement -> state = STATE_S8; } else { statement -> state = STATE_S2; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLExtendedFetch.c0100644000076400007640000002247111014544637020174 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLExtendedFetch.c,v 1.5 2007/11/29 12:00:30 lurcher Exp $ * * $Log: SQLExtendedFetch.c,v $ * Revision 1.5 2007/11/29 12:00:30 lurcher * Add 64 bit type changes to SQLExtendedFetch etc * * Revision 1.4 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.3 2001/01/14 09:13:21 nick * * Remove stray printf * * Revision 1.2 2000/12/05 16:49:21 nick * * Add missing identifier_type in SQLSpecialColumns log * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:06 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLExtendedFetch.c,v $ $Revision: 1.5 $"; SQLRETURN SQLExtendedFetch( SQLHSTMT statement_handle, SQLUSMALLINT f_fetch_type, SQLLEN irow, SQLULEN *pcrow, SQLUSMALLINT *rgf_row_status ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tFetch Type = %d\ \n\t\t\tRow = %d\ \n\t\t\tPcRow = %p\ \n\t\t\tRow Status = %p", statement, f_fetch_type, (int)irow, pcrow, (void*)rgf_row_status ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( f_fetch_type != SQL_FETCH_NEXT && f_fetch_type != SQL_FETCH_PRIOR && f_fetch_type != SQL_FETCH_FIRST && f_fetch_type != SQL_FETCH_LAST && f_fetch_type != SQL_FETCH_ABSOLUTE && f_fetch_type != SQL_FETCH_RELATIVE && f_fetch_type != SQL_FETCH_BOOKMARK ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY106" ); __post_internal_error( &statement -> error, ERROR_HY106, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S6 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLEXTENDEDFETCH ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( !CHECK_SQLEXTENDEDFETCH( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLEXTENDEDFETCH( statement -> connection, statement -> driver_stmt, f_fetch_type, irow, pcrow, rgf_row_status ); if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLEXTENDEDFETCH; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S7; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLFetch.c0100644000076400007640000002330107750253175016512 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLFetch.c,v 1.3 2003/10/30 18:20:45 lurcher Exp $ * * $Log: SQLFetch.c,v $ * Revision 1.3 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.3 2001/01/14 10:09:39 nick * * Add sqi/test to build * * Revision 1.2 2001/01/09 22:33:13 nick * * Stop passing NULL into SQLExtendedFetch * Further fixes to unicode to ansi conversions * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.9 2000/02/11 00:41:46 ngorham * * Added a couple of fixes for drivers without SQLExtendedFetch * * Revision 1.8 2000/02/02 07:55:21 ngorham * * Add flag to disable SQLFetch -> SQLExtendedFetch mapping * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:06 sShandyb * first go at it * * Revision 1.2 1999/06/02 23:48:45 ngorham * * Added more 3-2 mapping * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLFetch.c,v $ $Revision: 1.3 $"; SQLRETURN SQLFetch( SQLHSTMT statement_handle ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p", statement ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } /* * check states */ thread_protect( SQL_HANDLE_STMT, statement ); if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLFETCH ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( CHECK_SQLFETCH( statement -> connection )) { /* * this is odd, but its in the book */ if ( statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && CHECK_SQLEXTENDEDFETCH( statement -> connection ) && statement -> connection -> ex_fetch_mapping ) { /* * the row_st_arr can't be null */ if ( statement -> row_st_arr ) { ret = SQLEXTENDEDFETCH( statement -> connection, statement -> driver_stmt, SQL_FETCH_NEXT, NULL, statement -> row_ct_ptr, statement -> row_st_arr ); } else { SQLUSMALLINT *row_st_arr; int row_count; SQLUSMALLINT row_status; if ( statement -> row_array_size <= 1 ) { row_count = 1; row_st_arr = &row_status; } else { row_count = statement -> row_array_size; row_st_arr = malloc( sizeof( SQLUSMALLINT ) * row_count ); } ret = SQLEXTENDEDFETCH( statement -> connection, statement -> driver_stmt, SQL_FETCH_NEXT, NULL, statement -> row_ct_ptr, row_st_arr ); if ( row_count > 1 ) { free( row_st_arr ); } } } else { ret = SQLFETCH( statement -> connection, statement -> driver_stmt ); if( statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && statement -> row_ct_ptr ) { if( ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO ) { *statement -> row_ct_ptr = 1; } else { *statement -> row_ct_ptr = 0; } } } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLFETCH; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S6; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLFetchScroll.c0100644000076400007640000002415210723524737017675 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLFetchScroll.c,v 1.5 2007/11/29 12:00:31 lurcher Exp $ * * $Log: SQLFetchScroll.c,v $ * Revision 1.5 2007/11/29 12:00:31 lurcher * Add 64 bit type changes to SQLExtendedFetch etc * * Revision 1.4 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 2000/05/22 17:10:34 ngorham * * Fix problems with the FetchScroll -> ExtendedFetch Mapping * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.2 1999/06/02 23:48:45 ngorham * * Added more 3-2 mapping * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLFetchScroll.c,v $ $Revision: 1.5 $"; SQLRETURN SQLFetchScroll( SQLHSTMT statement_handle, SQLSMALLINT fetch_orientation, SQLLEN fetch_offset ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tFetch Orentation = %d\ \n\t\t\tFetch Offset = %d", statement, fetch_orientation, (int)fetch_offset ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( fetch_orientation != SQL_FETCH_NEXT && fetch_orientation != SQL_FETCH_PRIOR && fetch_orientation != SQL_FETCH_FIRST && fetch_orientation != SQL_FETCH_LAST && fetch_orientation != SQL_FETCH_ABSOLUTE && fetch_orientation != SQL_FETCH_RELATIVE && fetch_orientation != SQL_FETCH_BOOKMARK ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY106" ); __post_internal_error( &statement -> error, ERROR_HY106, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S7 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLFETCHSCROLL ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( CHECK_SQLFETCHSCROLL( statement -> connection )) { ret = SQLFETCHSCROLL( statement -> connection, statement -> driver_stmt, fetch_orientation, fetch_offset ); } else if ( statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && CHECK_SQLEXTENDEDFETCH( statement -> connection )) { /* * map to ODBC 2 call */ SQLINTEGER bm_ptr = 0; if ( fetch_orientation == SQL_FETCH_BOOKMARK ) { if ( statement -> fetch_bm_ptr ) bm_ptr = *statement -> fetch_bm_ptr; ret = SQLEXTENDEDFETCH( statement -> connection, statement -> driver_stmt, fetch_orientation, bm_ptr, statement -> row_ct_ptr, statement -> row_st_arr ); } else { ret = SQLEXTENDEDFETCH( statement -> connection, statement -> driver_stmt, fetch_orientation, fetch_offset, statement -> row_ct_ptr, statement -> row_st_arr ); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLFETCHSCROLL; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S6; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLForeignKeys.c0100644000076400007640000003370210000467337017701 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLForeignKeys.c,v 1.6 2004/01/12 09:54:39 lurcher Exp $ * * $Log: SQLForeignKeys.c,v $ * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.9 2000/06/20 12:44:00 ngorham * * Fix bug that caused a success with info message from SQLExecute or * SQLExecDirect to be lost if used with a ODBC 3 driver and the application * called SQLGetDiagRec * * Revision 1.8 2000/06/16 16:52:18 ngorham * * Stop info messages being lost when calling SQLExecute etc on ODBC 3 * drivers, the SQLNumResultCols were clearing the error before * function return had a chance to get to them * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:54 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLForeignKeys.c,v $ $Revision: 1.6 $"; SQLRETURN SQLForeignKeysA( SQLHSTMT statement_handle, SQLCHAR *szpk_catalog_name, SQLSMALLINT cbpk_catalog_name, SQLCHAR *szpk_schema_name, SQLSMALLINT cbpk_schema_name, SQLCHAR *szpk_table_name, SQLSMALLINT cbpk_table_name, SQLCHAR *szfk_catalog_name, SQLSMALLINT cbfk_catalog_name, SQLCHAR *szfk_schema_name, SQLSMALLINT cbfk_schema_name, SQLCHAR *szfk_table_name, SQLSMALLINT cbfk_table_name ) { return SQLForeignKeys( statement_handle, szpk_catalog_name, cbpk_catalog_name, szpk_schema_name, cbpk_schema_name, szpk_table_name, cbpk_table_name, szfk_catalog_name, cbfk_catalog_name, szfk_schema_name, cbfk_schema_name, szfk_table_name, cbfk_table_name ); } SQLRETURN SQLForeignKeys( SQLHSTMT statement_handle, SQLCHAR *szpk_catalog_name, SQLSMALLINT cbpk_catalog_name, SQLCHAR *szpk_schema_name, SQLSMALLINT cbpk_schema_name, SQLCHAR *szpk_table_name, SQLSMALLINT cbpk_table_name, SQLCHAR *szfk_catalog_name, SQLSMALLINT cbfk_catalog_name, SQLCHAR *szfk_schema_name, SQLSMALLINT cbfk_schema_name, SQLCHAR *szfk_table_name, SQLSMALLINT cbfk_table_name ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s5[ 100 + LOG_MESSAGE_LEN ], s6[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tPK Catalog Name = %s\ \n\t\t\tPK Schema Name = %s\ \n\t\t\tPK Table Name = %s\ \n\t\t\tFK Catalog Name = %s\ \n\t\t\tFK Schema Name = %s\ \n\t\t\tFK Table Name = %s", statement, __string_with_length( s1, szpk_catalog_name, cbpk_catalog_name ), __string_with_length( s2, szpk_schema_name, cbpk_schema_name ), __string_with_length( s3, szpk_table_name, cbpk_table_name ), __string_with_length( s4, szfk_catalog_name, cbfk_catalog_name ), __string_with_length( s5, szfk_schema_name, cbfk_schema_name ), __string_with_length( s6, szfk_table_name, cbfk_table_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( cbpk_catalog_name < 0 && cbpk_catalog_name != SQL_NTS ) || ( cbpk_schema_name < 0 && cbpk_schema_name != SQL_NTS ) || ( cbpk_table_name < 0 && cbpk_table_name != SQL_NTS ) || ( cbfk_catalog_name < 0 && cbfk_catalog_name != SQL_NTS ) || ( cbfk_schema_name < 0 && cbfk_schema_name != SQL_NTS ) || ( cbfk_table_name < 0 && cbfk_table_name != SQL_NTS )) { __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLFOREIGNKEYS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1, *s2, *s3, *s4, *s5, *s6; if ( !CHECK_SQLFOREIGNKEYSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( szpk_catalog_name, cbpk_catalog_name, statement -> connection ); s2 = ansi_to_unicode_alloc( szpk_schema_name, cbpk_schema_name, statement -> connection ); s3 = ansi_to_unicode_alloc( szpk_table_name, cbpk_table_name, statement -> connection ); s4 = ansi_to_unicode_alloc( szfk_catalog_name, cbfk_catalog_name, statement -> connection ); s5 = ansi_to_unicode_alloc( szfk_schema_name, cbfk_schema_name, statement -> connection ); s6 = ansi_to_unicode_alloc( szfk_table_name, cbfk_table_name, statement -> connection ); ret = SQLFOREIGNKEYSW( statement -> connection , statement -> driver_stmt, s1, cbpk_catalog_name, s2, cbpk_schema_name, s3, cbpk_table_name, s4, cbfk_catalog_name, s5, cbfk_schema_name, s6, cbfk_table_name ); if ( s1 ) free( s1 ); if ( s2 ) free( s2 ); if ( s3 ) free( s3 ); if ( s4 ) free( s4 ); if ( s5 ) free( s5 ); if ( s6 ) free( s6 ); } else { if ( !CHECK_SQLFOREIGNKEYS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLFOREIGNKEYS( statement -> connection , statement -> driver_stmt, szpk_catalog_name, cbpk_catalog_name, szpk_schema_name, cbpk_schema_name, szpk_table_name, cbpk_table_name, szfk_catalog_name, cbfk_catalog_name, szfk_schema_name, cbfk_schema_name, szfk_table_name, cbfk_table_name ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); } SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); /******/ #endif statement -> hascols = 1; statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLFOREIGNKEYS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLFreeConnect.c0100644000076400007640000000376007363332145017656 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLFreeConnect.c,v 1.1.1.1 2001/10/17 16:40:05 lurcher Exp $ * * $Log: SQLFreeConnect.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLFreeConnect.c,v $ $Revision: 1.1.1.1 $"; SQLRETURN SQLFreeConnect( SQLHDBC connection_handle ) { return __SQLFreeHandle( SQL_HANDLE_DBC, connection_handle ); } unixODBC-2.2.14-p2/DriverManager/SQLFreeEnv.c0100644000076400007640000000374207363332145017015 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLFreeEnv.c,v 1.1.1.1 2001/10/17 16:40:05 lurcher Exp $ * * $Log: SQLFreeEnv.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLFreeEnv.c,v $ $Revision: 1.1.1.1 $"; SQLRETURN SQLFreeEnv( SQLHENV environment_handle ) { return __SQLFreeHandle( SQL_HANDLE_ENV, environment_handle ); } unixODBC-2.2.14-p2/DriverManager/SQLFreeHandle.c0100644000076400007640000004323610731472737017467 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLFreeHandle.c,v 1.10 2007/12/17 13:13:03 lurcher Exp $ * * $Log: SQLFreeHandle.c,v $ * Revision 1.10 2007/12/17 13:13:03 lurcher * Fix a couple of descriptor typo's * * Revision 1.9 2007/01/02 10:27:50 lurcher * Fix descriptor leak with unicode only driver * * Revision 1.8 2006/04/18 10:24:47 lurcher * Add a couple of changes from Mark Vanderwiel * * Revision 1.7 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.6 2003/05/14 09:42:25 lurcher * * Fix bug in stats collection * * Revision 1.5 2003/04/09 08:42:18 lurcher * * Allow setting of odbcinstQ lib from odbcinst.ini and Environment * * Revision 1.4 2002/09/18 14:49:32 lurcher * * DataManagerII additions and some more threading fixes * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.7 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.6 2001/06/04 15:24:49 nick * * Add port to MAC OSX and QT3 changes * * Revision 1.5 2001/05/15 13:33:44 jason * * Wrapped calls to stats with COLLECT_STATS * * Revision 1.4 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.3 2000/12/19 10:28:29 martin * * Return "not built with stats" in uodbc_error() if stats function called * when stats not built. * Add uodbc_update_stats() calls to SQLFreeHandle. * * Revision 1.2 2000/11/23 09:43:29 nick * * Fix deadlock posibility * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.12 2000/06/27 17:34:10 ngorham * * Fix a problem when the second part of the connect failed a seg fault * was generated in the error reporting * * Revision 1.11 2000/05/21 21:49:19 ngorham * * Assorted fixes * * Revision 1.10 1999/11/17 21:11:59 ngorham * * Fix bug where the check for a valid handle was after the code had * used it. * * Revision 1.9 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.7 1999/10/09 00:15:58 ngorham * * Add mapping from SQL_TYPE_X to SQL_X and SQL_C_TYPE_X to SQL_C_X * when the driver is a ODBC 2 one * * Revision 1.6 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/08/03 21:47:39 shandyb * Moving to automake: changed files in DriverManager * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.2 1999/06/07 01:29:31 pharvey * *** empty log message *** * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.5 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) #include "__stats.h" #include #endif static char const rcsid[]= "$RCSfile: SQLFreeHandle.c,v $ $Revision: 1.10 $"; SQLRETURN __SQLFreeHandle( SQLSMALLINT handle_type, SQLHANDLE handle ) { switch( handle_type ) { case SQL_HANDLE_ENV: { DMHENV environment = (DMHENV)handle; /* * check environment */ if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\n\t\t\tHandle Type = %d\n\t\t\tInput Handle = %p", handle_type, (void*)handle ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_protect( SQL_HANDLE_ENV, environment ); /* * check states */ if ( environment -> state != STATE_E1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &environment -> error, ERROR_HY010, NULL, environment -> requested_version ); thread_release( SQL_HANDLE_ENV, environment ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } thread_release( SQL_HANDLE_ENV, environment ); __release_env( environment ); return SQL_SUCCESS; } break; case SQL_HANDLE_DBC: { DMHDBC connection = (DMHDBC)handle; DMHENV environment; /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); environment = connection -> environment; if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\n\t\t\tHandle Type = %d\n\t\t\tInput Handle = %p", handle_type, (void*)handle ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_ENV, environment ); /* * check states */ if ( connection -> state != STATE_C2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &connection -> error, ERROR_HY010, NULL, connection -> environment -> requested_version ); thread_release( SQL_HANDLE_ENV, environment ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } environment -> connection_count --; if ( environment -> connection_count == 0 ) { environment -> state = STATE_E1; } environment = connection -> environment; __release_attr_str( &connection -> env_attribute ); __release_attr_str( &connection -> dbc_attribute ); __release_attr_str( &connection -> stmt_attribute ); __disconnect_part_one( connection ); __release_dbc( connection ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tExit:[SQL_SUCCESS]" ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) uodbc_update_stats(environment->sh, UODBC_STATS_TYPE_HDBC, (void *)-1); #endif thread_release( SQL_HANDLE_ENV, environment ); return SQL_SUCCESS; } break; case SQL_HANDLE_STMT: { DMHSTMT statement = (DMHSTMT)handle; DMHDBC connection; SQLRETURN ret; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); connection = statement -> connection; if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\n\t\t\tHandle Type = %d\n\t\t\tInput Handle = %p", handle_type, (void*)handle ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); thread_release( SQL_HANDLE_STMT, statement ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( !CHECK_SQLFREEHANDLE( statement -> connection )) { if ( !CHECK_SQLFREESTMT( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else { ret = SQLFREESTMT( statement -> connection, statement -> driver_stmt, SQL_DROP ); } } else { ret = SQLFREEHANDLE( statement -> connection, handle_type, statement -> driver_stmt ); } if ( SQL_SUCCEEDED( ret )) { /* * release the implicit descriptors, * this matches the tests in SQLAllocHandle */ if (( statement -> connection -> driver_act_ver == 3 && CHECK_SQLGETSTMTATTR( connection )) || CHECK_SQLGETSTMTATTRW( connection )) { if ( statement -> implicit_ard ) __release_desc( statement -> implicit_ard ); if ( statement -> implicit_apd ) __release_desc( statement -> implicit_apd ); if ( statement -> implicit_ird ) __release_desc( statement -> implicit_ird ); if ( statement -> implicit_ipd ) __release_desc( statement -> implicit_ipd ); } statement -> connection -> statement_count --; thread_release( SQL_HANDLE_STMT, statement ); #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) uodbc_update_stats(connection->environment->sh, UODBC_STATS_TYPE_HSTMT, (void *)-1); #endif __release_stmt( statement ); } else { thread_release( SQL_HANDLE_STMT, statement ); } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[SQL_SUCCESS]" ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( IGNORE_THREAD, connection, ret ); } break; case SQL_HANDLE_DESC: { DMHDESC descriptor = (DMHDESC)handle; DMHDBC connection; SQLRETURN ret; SQLCHAR s0[ 20 ]; /* * check descriptor */ if ( !__validate_desc( descriptor )) { return SQL_INVALID_HANDLE; } function_entry( descriptor ); connection = descriptor -> connection; if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tEntry:\n\t\t\tHandle Type = %d\n\t\t\tInput Handle = %p", handle_type, (void*)handle ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } if ( descriptor -> implicit ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY017" ); __post_internal_error( &descriptor -> error, ERROR_HY017, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } thread_protect( SQL_HANDLE_DESC, descriptor ); if ( !CHECK_SQLFREEHANDLE( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); thread_release( SQL_HANDLE_DESC, descriptor ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } else { ret = SQLFREEHANDLE( connection, handle_type, descriptor -> driver_desc ); } thread_release( SQL_HANDLE_DESC, descriptor ); __release_desc( descriptor ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[SQL_SUCCESS]" ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) uodbc_update_stats(connection->environment->sh, UODBC_STATS_TYPE_HDESC, (void *)-1); #endif return function_return( IGNORE_THREAD, connection, SQL_SUCCESS ); } break; default: /* * there is nothing to report a error on */ return SQL_ERROR; } } SQLRETURN SQLFreeHandle( SQLSMALLINT handle_type, SQLHANDLE handle ) { return __SQLFreeHandle( handle_type, handle ); } unixODBC-2.2.14-p2/DriverManager/SQLFreeStmt.c0100644000076400007640000001603307750253175017216 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLFreeStmt.c,v 1.5 2003/10/30 18:20:45 lurcher Exp $ * * $Log: SQLFreeStmt.c,v $ * Revision 1.5 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/07/04 17:27:56 lurcher * * Small bug fixes * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLFreeStmt.c,v $ $Revision: 1.5 $"; SQLRETURN SQLFreeStmt( SQLHSTMT statement_handle, SQLUSMALLINT option ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tOption = %d", statement, option ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( !CHECK_SQLFREESTMT( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } switch ( option ) { case SQL_CLOSE: ret = SQLFREESTMT( statement -> connection, statement -> driver_stmt, option ); if ( SQL_SUCCEEDED( ret )) { if ( statement -> state == STATE_S4 ) { if ( statement -> prepared ) statement -> state = STATE_S2; else statement -> state = STATE_S1; } else { if ( statement -> prepared ) statement -> state = STATE_S3; else statement -> state = STATE_S1; } statement -> hascols = 0; } break; case SQL_DROP: /* * call SQLFreeHandle(); */ thread_release( SQL_HANDLE_STMT, statement ); return function_return( IGNORE_THREAD, statement, __SQLFreeHandle( SQL_HANDLE_STMT, statement_handle )); case SQL_RESET_PARAMS: case SQL_UNBIND: ret = SQLFREESTMT( statement -> connection, statement -> driver_stmt, option ); /* * TO_DO reset any information about parameters or bound columns */ break; default: dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &statement -> error, ERROR_HY092, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetConnectAttr.c0100644000076400007640000005155211070160005020331 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetConnectAttr.c,v 1.13 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLGetConnectAttr.c,v $ * Revision 1.13 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.12 2006/03/08 09:18:41 lurcher * fix silly typo that was using sizeof( SQL_WCHAR ) instead of SQLWCHAR * * Revision 1.11 2004/11/22 17:02:48 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.10 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.9 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.8 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.7 2002/11/11 17:10:09 lurcher * * VMS changes * * Revision 1.6 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.5 2002/07/16 13:08:18 lurcher * * Filter attribute values from SQLSetStmtAttr to SQLSetStmtOption to fit * within ODBC 2 * Make DSN's double clickable in ODBCConfig * * Revision 1.4 2002/01/30 12:20:02 lurcher * * Add MyODBC 3 driver source * * Revision 1.3 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.2 2001/12/04 16:46:19 lurcher * * Allow the Unix Domain Socket to be set from the ini file (DSN) * Make the DataManager browser work with drivers that don't support * SQLRowCount * Make the directory selection from odbctest work simplier * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.5 2001/08/03 15:19:00 nick * * Add changes to set values before connect * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/09/21 22:34:24 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/09/19 22:24:33 ngorham * * Added support for the cursor library * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetConnectAttr.c,v $ $Revision: 1.13 $"; SQLRETURN SQLGetConnectAttrA( SQLHDBC connection_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { return SQLGetConnectAttr( connection_handle, attribute, value, buffer_length, string_length ); } SQLRETURN SQLGetConnectAttr( SQLHDBC connection_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { DMHDBC connection = (DMHDBC)connection_handle; int type = 0; char *ptr; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * doesn't require a handle */ if ( attribute == SQL_ATTR_TRACE ) { if ( value ) { if ( log_info.log_flag ) { *((SQLINTEGER*)value) = SQL_OPT_TRACE_ON; } else { *((SQLINTEGER*)value) = SQL_OPT_TRACE_ON; } } return SQL_SUCCESS; } else if ( attribute == SQL_ATTR_TRACEFILE ) { SQLRETURN ret = SQL_SUCCESS; ptr = log_info.log_file_name; if ( log_info.log_file_name ) { if ( string_length ) { *string_length = strlen( ptr ); } if ( value ) { if ( buffer_length > strlen( log_info.log_file_name ) + 1 ) { strcpy( value, ptr ); } else { memcpy( value, log_info.log_file_name, buffer_length - 1 ); ((char*)value)[ buffer_length - 1 ] = '\0'; ret = SQL_SUCCESS_WITH_INFO; } } } else { if ( string_length ) { *string_length = 0; } if ( value ) { if ( buffer_length >= 1 ) { strcpy( value, "" ); } else { ret = SQL_SUCCESS_WITH_INFO; } } } return ret; } /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tAttribute = %s\ \n\t\t\tValue = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tStrLen = %p", connection, __con_attr_as_string( s1, attribute ), value, (int)buffer_length, (void*)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &connection -> error, ERROR_HY010, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( connection -> state == STATE_C2 ) { switch ( attribute ) { case SQL_ATTR_ACCESS_MODE: case SQL_ATTR_AUTOCOMMIT: case SQL_ATTR_LOGIN_TIMEOUT: case SQL_ATTR_ODBC_CURSORS: case SQL_ATTR_TRACE: case SQL_ATTR_TRACEFILE: case SQL_ATTR_ASYNC_ENABLE: case SQL_ATTR_AUTO_IPD: case SQL_ATTR_CONNECTION_TIMEOUT: case SQL_ATTR_METADATA_ID: case SQL_ATTR_PACKET_SIZE: case SQL_ATTR_QUIET_MODE: case SQL_ATTR_TXN_ISOLATION: break; default: dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } switch ( attribute ) { case SQL_ATTR_ACCESS_MODE: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> access_mode; type = 1; } break; case SQL_ATTR_AUTOCOMMIT: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> auto_commit; type = 1; } break; case SQL_ATTR_LOGIN_TIMEOUT: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> login_timeout; type = 1; } break; case SQL_ATTR_ODBC_CURSORS: *((SQLINTEGER*)value) = connection -> cursors; type = 1; break; case SQL_ATTR_TRACE: *((SQLINTEGER*)value) = connection -> trace; type = 1; break; case SQL_ATTR_TRACEFILE: ptr = connection -> tracefile; type = 2; break; case SQL_ATTR_ASYNC_ENABLE: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> async_enable; type = 1; } break; case SQL_ATTR_AUTO_IPD: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> auto_ipd; type = 1; } break; case SQL_ATTR_CONNECTION_TIMEOUT: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> connection_timeout; type = 1; } break; case SQL_ATTR_METADATA_ID: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> metadata_id; type = 1; } break; case SQL_ATTR_PACKET_SIZE: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> packet_size; type = 1; } break; case SQL_ATTR_QUIET_MODE: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLLEN*)value) = connection -> quite_mode; type = 1; } break; case SQL_ATTR_TXN_ISOLATION: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> txn_isolation; type = 1; } break; default: break; } /* * if type has been set we have already set the value, * so just return */ if ( type ) { SQLRETURN ret = SQL_SUCCESS; if ( type == 1 ) { if ( string_length ) { *string_length = sizeof( SQLUINTEGER ); } } else { if ( string_length ) { *string_length = strlen( ptr ); } if ( value ) { if ( buffer_length > strlen( ptr ) + 1 ) { strcpy( value, ptr ); } else { memcpy( value, ptr, buffer_length - 1 ); ((char*)value)[ buffer_length - 1 ] = '\0'; ret = SQL_SUCCESS_WITH_INFO; } } } sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, ret ); } else { SQLRETURN ret = 0; /* * call the driver */ if ( connection -> unicode_driver ) { if ( !CHECK_SQLGETCONNECTATTRW( connection )) { if ( ret = CHECK_SQLGETCONNECTOPTIONW( connection )) { SQLWCHAR *s1 = NULL; /* * Is it in the legal range of values */ if ( attribute < SQL_CONN_DRIVER_MIN && ( attribute > SQL_PACKET_SIZE || attribute < SQL_ACCESS_MODE )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &connection -> error, ERROR_HY092, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( SQL_SUCCEEDED( ret ) && value ) { s1 = malloc( sizeof( SQLWCHAR ) * ( 1024 )); } break; } ret = SQLGETCONNECTOPTIONW( connection, connection -> driver_dbc, attribute, s1 ? s1 : value ); switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( SQL_SUCCEEDED( ret ) && value && s1 ) { unicode_to_ansi_copy( value, buffer_length, s1, SQL_NTS, connection ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length /= sizeof( SQLWCHAR ); } break; } if ( s1 ) { free( s1 ); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { SQLWCHAR *s1 = NULL; switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( SQL_SUCCEEDED( ret ) && value && buffer_length > 0 ) { s1 = malloc( sizeof( SQLWCHAR ) * ( buffer_length + 1 )); } break; } ret = SQLGETCONNECTATTRW( connection, connection -> driver_dbc, attribute, s1 ? s1 : value, buffer_length, string_length ); switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( SQL_SUCCEEDED( ret ) && value && s1 ) { unicode_to_ansi_copy( value, buffer_length, s1, SQL_NTS, connection ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length /= sizeof( SQLWCHAR ); } break; } if ( s1 ) { free( s1 ); } } } else { if ( !CHECK_SQLGETCONNECTATTR( connection )) { if ( CHECK_SQLGETCONNECTOPTION( connection )) { /* * Is it in the legal range of values */ if ( attribute < SQL_CONN_DRIVER_MIN && ( attribute > SQL_PACKET_SIZE || attribute < SQL_ACCESS_MODE )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &connection -> error, ERROR_HY092, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } ret = SQLGETCONNECTOPTION( connection, connection -> driver_dbc, attribute, value ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { ret = SQLGETCONNECTATTR( connection, connection -> driver_dbc, attribute, value, buffer_length, string_length ); } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } } unixODBC-2.2.14-p2/DriverManager/SQLGetConnectOption.c0100644000076400007640000003304011070160005020657 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetConnectOption.c,v 1.7 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLGetConnectOption.c,v $ * Revision 1.7 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/11/11 17:10:10 lurcher * * VMS changes * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.5 2001/08/03 15:19:00 nick * * Add changes to set values before connect * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/09/19 22:24:34 ngorham * * Added support for the cursor library * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:20 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetConnectOption.c,v $ $Revision: 1.7 $"; SQLRETURN SQLGetConnectOptionA( SQLHDBC connection_handle, SQLUSMALLINT option, SQLPOINTER value ) { return SQLGetConnectOption( connection_handle, option, value ); } SQLRETURN SQLGetConnectOption( SQLHDBC connection_handle, SQLUSMALLINT option, SQLPOINTER value ) { DMHDBC connection = (DMHDBC)connection_handle; int type = 0; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * doesn't require a handle */ if ( option == SQL_ATTR_TRACE ) { if ( value ) { if ( log_info.log_flag ) { *((SQLINTEGER*)value) = SQL_OPT_TRACE_ON; } else { *((SQLINTEGER*)value) = SQL_OPT_TRACE_ON; } } return SQL_SUCCESS; } else if ( option == SQL_ATTR_TRACEFILE ) { SQLRETURN ret = SQL_SUCCESS; if ( log_info.log_file_name ) { strcpy( value, log_info.log_file_name ); } else { strcpy( value, "" ); } return ret; } /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tOption = %s\ \n\t\t\tValue = %p", connection, __con_attr_as_string( s1, option ), value ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &connection -> error, ERROR_HY010, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( connection -> state == STATE_C2 ) { switch ( option ) { case SQL_ACCESS_MODE: case SQL_AUTOCOMMIT: break; default: dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } switch ( option ) { case SQL_ACCESS_MODE: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> access_mode; type = 1; } break; case SQL_AUTOCOMMIT: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> auto_commit; type = 1; } break; case SQL_ODBC_CURSORS: *((SQLINTEGER*)value) = connection -> cursors; type = 1; break; default: break; } /* * if type has been set we have already set the value, * so just return */ if ( type ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, SQL_SUCCESS ); } else { SQLRETURN ret = 0; /* * call the driver */ if ( connection -> unicode_driver ) { SQLWCHAR *s1 = NULL; if ( ret = CHECK_SQLGETCONNECTOPTIONW( connection )) { switch( option ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( SQL_SUCCEEDED( ret ) && value ) { /* * guess a length */ if ( value ) { s1 = malloc( sizeof( SQLWCHAR ) * 1024 ); } } break; } ret = SQLGETCONNECTOPTIONW( connection, connection -> driver_dbc, option, s1 ? s1 : value ); switch( option ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( SQL_SUCCEEDED( ret ) && value && s1 ) { unicode_to_ansi_copy( value, 1024, s1, SQL_NTS, connection ); } break; } if ( s1 ) { free( s1 ); } } else if ( CHECK_SQLGETCONNECTATTRW( connection )) { SQLINTEGER length, len; void * ptr; SQLWCHAR txt[ 1024 ]; switch( option ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: length = sizeof( txt ); ptr = txt; break; default: length = sizeof( SQLINTEGER ); ptr = value; break; } ret = SQLGETCONNECTATTRW( connection, connection -> driver_dbc, option, ptr, length, &len ); /* * not much else we can do here, lets assume that * there is enough space */ if ( ptr != value && SQL_SUCCEEDED( ret )) { unicode_to_ansi_copy( value, 1024, ptr, SQL_NTS, connection ); /* * are we still here ? good */ } } else { __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { if ( CHECK_SQLGETCONNECTOPTION( connection )) { ret = SQLGETCONNECTOPTION( connection, connection -> driver_dbc, option, value ); } else if ( CHECK_SQLGETCONNECTATTR( connection )) { SQLINTEGER length, len; void * ptr; char txt[ 1024 ]; switch( option ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: length = sizeof( txt ); ptr = txt; break; default: length = sizeof( SQLINTEGER ); ptr = value; break; } ret = SQLGETCONNECTATTR( connection, connection -> driver_dbc, option, ptr, length, &len ); /* * not much else we can do here, lets assume that * there is enough space */ if ( ptr != value ) { strcpy( value, ptr ); /* * are we still here ? good */ } } else { __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } } unixODBC-2.2.14-p2/DriverManager/SQLGetCursorName.c0100644000076400007640000002123411070160005020155 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetCursorName.c,v 1.7 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLGetCursorName.c,v $ * Revision 1.7 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.5 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.4 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.3 2001/01/04 13:16:25 nick * * Add support for GNU portable threads and tidy up some UNICODE compile * warnings * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetCursorName.c,v $ $Revision: 1.7 $"; SQLRETURN SQLGetCursorNameA( SQLHSTMT statement_handle, SQLCHAR *cursor_name, SQLSMALLINT buffer_length, SQLSMALLINT *name_length ) { return SQLGetCursorName( statement_handle, cursor_name, buffer_length, name_length ); } SQLRETURN SQLGetCursorName( SQLHSTMT statement_handle, SQLCHAR *cursor_name, SQLSMALLINT buffer_length, SQLSMALLINT *name_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCursor Name = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tName Length= %p", statement, cursor_name, buffer_length, name_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( !buffer_length < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1 = NULL; if ( !CHECK_SQLGETCURSORNAMEW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( cursor_name && buffer_length > 0 ) { s1 = malloc( sizeof( SQLWCHAR ) * ( buffer_length + 1 )); } ret = SQLGETCURSORNAMEW( statement -> connection, statement -> driver_stmt, s1 ? s1 : (SQLWCHAR*) cursor_name, buffer_length, name_length ); if ( SQL_SUCCEEDED( ret ) && cursor_name && s1 ) { unicode_to_ansi_copy((char*) cursor_name, buffer_length, s1, SQL_NTS, statement -> connection ); } if ( s1 ) { free( s1 ); } } else { if ( !CHECK_SQLGETCURSORNAME( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLGETCURSORNAME( statement -> connection, statement -> driver_stmt, cursor_name, buffer_length, name_length ); } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tCursor Name = %s", __get_return_status( ret, s1 ), __sdata_as_string( s1, SQL_CHAR, name_length, cursor_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetData.c0100644000076400007640000003452310604157753016777 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetData.c,v 1.14 2007/04/02 10:50:19 lurcher Exp $ * * $Log: SQLGetData.c,v $ * Revision 1.14 2007/04/02 10:50:19 lurcher * Fix some 64bit problems (only when sizeof(SQLLEN) == 8 ) * * Revision 1.13 2006/04/11 10:22:56 lurcher * Fix a data type check * * Revision 1.12 2006/03/08 11:22:13 lurcher * Add check for valid C_TYPE * * Revision 1.11 2004/02/02 10:10:45 lurcher * * Fix some connection pooling problems * Include sqlucode in sqlext * * Revision 1.10 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.9 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.8 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.7 2002/08/19 09:11:49 lurcher * * Fix Maxor ineffiecny in Postgres Drivers, and fix a return state * * Revision 1.6 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.5 2002/07/10 15:05:57 lurcher * * Alter the return code in the Postgres driver, for a warning, it should be * 01000 it was 00000 * Fix a problem in DriverManagerII with the postgres driver as the driver * doesn't return a propper list of schemas * Allow the delimiter to be set in isql to a hex/octal char not just a * printable one * * Revision 1.4 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.3 2001/12/04 10:16:59 lurcher * * Fix SQLSetScrollOption problem * * Revision 1.2 2001/11/22 14:27:02 lurcher * * Add UNICODE conversion fix * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.5 2001/09/27 17:05:48 nick * * Assorted fixes and tweeks * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/01/01 11:04:13 nick * * Add UNICODE conversion to SQLGetData * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.10 2000/06/20 13:30:09 ngorham * * Fix problems when using bookmarks * * Revision 1.9 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.7 1999/10/09 00:56:16 ngorham * * Added Manush's patch to map ODBC 3-2 datetime values * * Revision 1.6 1999/10/09 00:15:58 ngorham * * Add mapping from SQL_TYPE_X to SQL_X and SQL_C_TYPE_X to SQL_C_X * when the driver is a ODBC 2 one * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetData.c,v $ $Revision: 1.14 $"; SQLRETURN SQLGetData( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLSMALLINT target_type, SQLPOINTER target_value, SQLLEN buffer_length, SQLLEN *strlen_or_ind ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ]; int unicode_switch = 0; SQLLEN ind_value; SQLCHAR *as1 = NULL; SQLCHAR s3[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tColumn Number = %d\ \n\t\t\tTarget Type = %d %s\ \n\t\t\tBuffer Length = %d\ \n\t\t\tTarget Value = %p\ \n\t\t\tStrLen Or Ind = %p", statement, column_number, target_type, __sql_as_text( target_type ), (int)buffer_length, target_value, (void*)strlen_or_ind ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( column_number == 0 && statement -> bookmarks_on == SQL_UB_OFF && statement -> connection -> bookmarks_on == SQL_UB_OFF ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error_api( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version, SQL_API_SQLGETDATA ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * can't trust the numcols value * if ( statement -> numcols < column_number ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } */ /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S4 || statement -> state == STATE_S5 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLGETDATA ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO assorted checks need adding here, relating to bound columns * and what sort of SQLGetData extensions the driver supports */ /* * check valid C_TYPE */ if ( !check_target_type( target_type )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY003" ); __post_internal_error( &statement -> error, ERROR_HY003, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( !CHECK_SQLGETDATA( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if (statement -> connection -> driver_act_ver==SQL_OV_ODBC2) { switch( target_type ) { case SQL_WCHAR: target_type = SQL_CHAR; unicode_switch = 1; buffer_length = buffer_length / sizeof( SQLWCHAR ); break; case SQL_WVARCHAR: target_type = SQL_VARCHAR; unicode_switch = 1; buffer_length = buffer_length / sizeof( SQLWCHAR ); break; case SQL_WLONGVARCHAR: target_type = SQL_LONGVARCHAR; unicode_switch = 1; buffer_length = buffer_length / sizeof( SQLWCHAR ); break; } } if ( unicode_switch ) { if ( buffer_length > 0 && target_value ) { as1 = malloc( buffer_length + 1 ); ret = SQLGETDATA( statement -> connection, statement -> driver_stmt, column_number, __map_type(MAP_C_DM2D,statement->connection,target_type), as1, buffer_length, &ind_value ); } else { ret = SQLGETDATA( statement -> connection, statement -> driver_stmt, column_number, __map_type(MAP_C_DM2D,statement->connection,target_type), target_value, buffer_length, &ind_value ); } } else { ret = SQLGETDATA( statement -> connection, statement -> driver_stmt, column_number, __map_type(MAP_C_DM2D,statement->connection,target_type), target_value, buffer_length, strlen_or_ind ); } if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLCOLATTRIBUTE; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( SQL_SUCCEEDED( ret ) && unicode_switch ) { if ( target_value && ind_value >= 0 && as1 ) { if ( ind_value > buffer_length ) { ansi_to_unicode_copy( target_value, (char*) as1, buffer_length, statement -> connection ); } else { ansi_to_unicode_copy( target_value, (char*) as1, ind_value + 1, statement -> connection ); } } if ( as1 ) { free( as1 ); } if ( ind_value > 0 ) { ind_value *= sizeof( SQLWCHAR ); } if ( strlen_or_ind ) { *strlen_or_ind = ind_value; } } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tBuffer = %s\ \n\t\t\tStrlen Or Ind = %s", __get_return_status( ret, s3 ), __data_as_string( s1, target_type, strlen_or_ind, target_value ), __ptr_as_string( s2, strlen_or_ind )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetDescField.c0100644000076400007640000002362111070160005017723 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDescField.c,v 1.9 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLGetDescField.c,v $ * Revision 1.9 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.8 2006/03/08 09:18:41 lurcher * fix silly typo that was using sizeof( SQL_WCHAR ) instead of SQLWCHAR * * Revision 1.7 2004/11/22 17:02:49 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.2 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.5 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.4 2001/04/17 16:29:39 nick * * More checks and autotest fixes * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.3 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetDescField.c,v $ $Revision: 1.9 $"; SQLRETURN SQLGetDescFieldA( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { return SQLGetDescField( descriptor_handle, rec_number, field_identifier, value, buffer_length, string_length ); } SQLRETURN SQLGetDescField( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { /* * not quite sure how the descriptor can be * allocated to a statement, all the documentation talks * about state transitions on statement states, but the * descriptor may be allocated with more than one statement * at one time. Which one should I check ? */ DMHDESC descriptor = (DMHDESC) descriptor_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check descriptor */ if ( !__validate_desc( descriptor )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( descriptor ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tEntry:\ \n\t\t\tDescriptor = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tField Attr = %s\ \n\t\t\tValue = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tStrLen = %p", descriptor, rec_number, __desc_attr_as_string( s1, field_identifier ), value, (int)buffer_length, (void*)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } thread_protect( SQL_HANDLE_DESC, descriptor ); if ( descriptor -> connection -> state < STATE_C4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &descriptor -> error, ERROR_HY010, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } if ( descriptor -> connection -> unicode_driver ) { SQLWCHAR *s1 = NULL; if ( !CHECK_SQLGETDESCFIELDW( descriptor -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: if ( buffer_length > 0 && value ) { s1 = malloc( sizeof( SQLWCHAR ) * ( buffer_length + 1 )); } break; } ret = SQLGETDESCFIELDW( descriptor -> connection, descriptor -> driver_desc, rec_number, field_identifier, s1 ? s1 : value, buffer_length, string_length ); switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: if ( SQL_SUCCEEDED( ret ) && value && s1 ) { unicode_to_ansi_copy( value, buffer_length, s1, SQL_NTS, descriptor -> connection ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length /= sizeof( SQLWCHAR ); } break; } if ( s1 ) { free( s1 ); } } else { if ( !CHECK_SQLGETDESCFIELD( descriptor -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } ret = SQLGETDESCFIELD( descriptor -> connection, descriptor -> driver_desc, rec_number, field_identifier, value, buffer_length, string_length ); } if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } return function_return( SQL_HANDLE_DESC, descriptor, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetDescRec.c0100644000076400007640000002642211070160005017413 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDescRec.c,v 1.12 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLGetDescRec.c,v $ * Revision 1.12 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.11 2007/04/02 10:50:19 lurcher * Fix some 64bit problems (only when sizeof(SQLLEN) == 8 ) * * Revision 1.10 2007/03/05 09:49:23 lurcher * Get it to build on VMS again * * Revision 1.9 2006/01/06 18:44:35 lurcher * Couple of unicode fixes * * Revision 1.8 2004/11/22 17:02:49 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.7 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.6 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.5 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.3 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.5 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.4 2001/04/17 16:29:39 nick * * More checks and autotest fixes * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 2001/04/27 01:29:35 ngorham * * Added a couple of fixes from Tim Roepken * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.3 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetDescRec.c,v $ $Revision: 1.12 $"; SQLRETURN SQLGetDescRecA( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLCHAR *name, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLSMALLINT *type, SQLSMALLINT *sub_type, SQLLEN *length, SQLSMALLINT *precision, SQLSMALLINT *scale, SQLSMALLINT *nullable ) { return SQLGetDescRec( descriptor_handle, rec_number, name, buffer_length, string_length, type, sub_type, length, precision, scale, nullable ); } SQLRETURN SQLGetDescRec( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLCHAR *name, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLSMALLINT *type, SQLSMALLINT *sub_type, SQLLEN *length, SQLSMALLINT *precision, SQLSMALLINT *scale, SQLSMALLINT *nullable ) { /* * not quite sure how the descriptor can be * allocated to a statement, all the documentation talks * about state transitions on statement states, but the * descriptor may be allocated with more than one statement * at one time. Which one should I check ? */ DMHDESC descriptor = (DMHDESC) descriptor_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s5[ 100 + LOG_MESSAGE_LEN ], s6[ 100 + LOG_MESSAGE_LEN ], s7[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s8[ 100 + LOG_MESSAGE_LEN ]; /* * check descriptor */ if ( !__validate_desc( descriptor )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( descriptor ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tEntry:\ \n\t\t\tDescriptor = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tName = %p\ \n\t\t\tBuffer length = %d\ \n\t\t\tString Length = %p\ \n\t\t\tType = %p\ \n\t\t\tSub Type = %p\ \n\t\t\tLength = %p\ \n\t\t\tPrecision = %p\ \n\t\t\tScale = %p\ \n\t\t\tNullable = %p", descriptor, rec_number, name, buffer_length, string_length, type, sub_type, length, precision, scale, nullable ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } thread_protect( SQL_HANDLE_DESC, descriptor ); if ( descriptor -> connection -> state < STATE_C4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &descriptor -> error, ERROR_HY010, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } if ( descriptor -> connection -> unicode_driver ) { SQLWCHAR *s1 = NULL; if ( !CHECK_SQLGETDESCRECW( descriptor -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } if ( name && buffer_length > 0 ) { s1 = malloc( sizeof( SQLWCHAR ) * ( buffer_length + 1 )); } ret = SQLGETDESCRECW( descriptor -> connection, descriptor -> driver_desc, rec_number, s1 ? s1 : (SQLWCHAR*) name, buffer_length, string_length, type, sub_type, length, precision, scale, nullable ); if ( SQL_SUCCEEDED( ret ) && name && s1 ) { unicode_to_ansi_copy((char*) name, buffer_length, s1, SQL_NTS, descriptor -> connection ); } if ( s1 ) { free( s1 ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length = strlen((char*)name); } } else { if ( !CHECK_SQLGETDESCREC( descriptor -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } ret = SQLGETDESCREC( descriptor -> connection, descriptor -> driver_desc, rec_number, name, buffer_length, string_length, type, sub_type, length, precision, scale, nullable ); } if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tExit:[%s]\ \n\t\t\tName = %s\ \n\t\t\tType = %s\ \n\t\t\tSub Type = %s\ \n\t\t\tLength = %s\ \n\t\t\tPrecision = %s\ \n\t\t\tScale = %s\ \n\t\t\tNullable = %s", __get_return_status( ret, s8 ), __sdata_as_string( s1, SQL_CHAR, string_length, name ), __sptr_as_string( s2, type ), __sptr_as_string( s3, sub_type ), __ptr_as_string( s4, length ), __sptr_as_string( s5, precision ), __sptr_as_string( s6, scale ), __sptr_as_string( s7, nullable )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } return function_return( SQL_HANDLE_DESC, descriptor, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetDiagField.c0100644000076400007640000007342011070160005017713 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDiagField.c,v 1.14 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLGetDiagField.c,v $ * Revision 1.14 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.13 2007/03/05 09:49:24 lurcher * Get it to build on VMS again * * Revision 1.12 2006/11/27 14:08:33 lurcher * Sync up dirs * * Revision 1.11 2006/05/31 17:35:34 lurcher * Add unicode ODBCINST entry points * * Revision 1.10 2006/03/08 09:18:41 lurcher * fix silly typo that was using sizeof( SQL_WCHAR ) instead of SQLWCHAR * * Revision 1.9 2005/12/19 18:43:26 lurcher * Add new parts to contrib and alter how the errors are returned from the driver * * Revision 1.8 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.7 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.6 2002/11/11 17:10:12 lurcher * * VMS changes * * Revision 1.5 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.4 2002/01/30 12:20:02 lurcher * * Add MyODBC 3 driver source * * Revision 1.3 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.15 2000/08/22 22:56:27 ngorham * * Add fix to SQLGetDiagField to return the server name on statements and * descriptors * * Revision 1.14 2000/08/21 10:31:58 ngorham * * Add missing line continuation char * * Revision 1.13 2000/08/09 08:48:18 ngorham * * Fix for SQLGetDiagField(SQL_DIAG_SUBCLASS_ORIGIN) returning a null string * * Revision 1.12 2000/08/03 10:49:34 ngorham * * Fix buffer overrun problem in GetDiagField * * Revision 1.11 2000/07/31 20:48:01 ngorham * * Fix bugs in SQLGetDiagField and with SQLColAttributes * * Revision 1.10 2000/06/23 16:11:35 ngorham * * Map ODBC 2 SQLSTATE values to ODBC 3 * * Revision 1.9 2000/05/21 21:49:19 ngorham * * Assorted fixes * * Revision 1.8 1999/11/17 21:08:58 ngorham * * Fix Bug with the ODBC 3 error handling * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/11/10 03:51:33 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/12 19:42:06 ngorham * * Finished off SQLGetDiagField.c and fixed a but that caused SQLError to * fail with Perl and PHP, connect errors were not being returned because * I was checking to the environment being set, they were setting the * statement and the environment. The order of checking has been changed. * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.5 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.4 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetDiagField.c,v $ $Revision: 1.14 $"; #define ODBC30_SUBCLASS "01S00,01S01,01S02,01S06,01S07,07S01,08S01,21S01,\ 21S02,25S01,25S02,25S03,42S01,42S02,42S11,42S12,42S21,42S22,HY095,HY097,HY098,\ HY099,HY100,HY101,HY105,HY107,HY109,HY110,HY111,HYT00,HYT01,IM001,IM002,IM003,\ IM004,IM005,IM006,IM007,IM008,IM010,IM011,IM012" extern int __is_env( EHEAD * head ); static SQLRETURN extract_sql_error_field( EHEAD *head, SQLSMALLINT rec_number, SQLSMALLINT diag_identifier, SQLPOINTER diag_info_ptr, SQLSMALLINT buffer_length, SQLSMALLINT *string_length_ptr ) { ERROR *ptr; /* * check the header fields first */ switch( diag_identifier ) { case SQL_DIAG_CURSOR_ROW_COUNT: case SQL_DIAG_ROW_COUNT: { SQLLEN val; SQLRETURN ret; if ( head -> handle_type != SQL_HANDLE_STMT ) { return SQL_ERROR; } else if ( head -> header_set ) { switch( diag_identifier ) { case SQL_DIAG_CURSOR_ROW_COUNT: if ( SQL_SUCCEEDED( head -> diag_cursor_row_count_ret ) && diag_info_ptr ) { *((SQLLEN*)diag_info_ptr) = head -> diag_cursor_row_count; } return head -> diag_cursor_row_count_ret; case SQL_DIAG_ROW_COUNT: if ( SQL_SUCCEEDED( head -> diag_row_count_ret ) && diag_info_ptr ) { *((SQLLEN*)diag_info_ptr) = head -> diag_row_count; } return head -> diag_row_count_ret; } } else if ( __get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELDW( __get_connection( head ))) { ret = SQLGETDIAGFIELDW( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); return ret; } else if ( !__get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELD( __get_connection( head ))) { ret = SQLGETDIAGFIELD( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); return ret; } else if ( CHECK_SQLROWCOUNT( __get_connection( head ))) { ret = DEF_SQLROWCOUNT( __get_connection( head ), __get_driver_handle( head ), &val ); if ( !SQL_SUCCEEDED( ret )) { return ret; } } else { val = 0; } if ( diag_info_ptr ) { memcpy( diag_info_ptr, &val, sizeof( val )); } } return SQL_SUCCESS; case SQL_DIAG_DYNAMIC_FUNCTION: { SQLRETURN ret; if ( head -> handle_type != SQL_HANDLE_STMT ) { return SQL_ERROR; } else if ( head -> header_set ) { if ( SQL_SUCCEEDED( head -> diag_dynamic_function_ret ) && diag_info_ptr ) { unicode_to_ansi_copy( diag_info_ptr, buffer_length, head -> diag_dynamic_function, buffer_length, __get_connection( head )); if ( string_length_ptr ) { *string_length_ptr = wide_strlen( head -> diag_dynamic_function ); } } return head -> diag_dynamic_function_ret; } else if ( __get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELDW( __get_connection( head ))) { SQLWCHAR *s1; if ( buffer_length > 0 ) { s1 = malloc( sizeof( SQLWCHAR ) * ( buffer_length + 1 )); } ret = SQLGETDIAGFIELDW( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, s1 ? s1 : diag_info_ptr, buffer_length, string_length_ptr ); if ( SQL_SUCCEEDED( ret ) && diag_info_ptr && s1 ) { unicode_to_ansi_copy( diag_info_ptr, buffer_length, s1, buffer_length, __get_connection( head )); } if ( s1 ) { free( s1 ); } return ret; } else if ( !__get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELD( __get_connection( head ))) { ret = SQLGETDIAGFIELD( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); return ret; } if ( diag_info_ptr ) { strcpy( diag_info_ptr, "" ); } } return SQL_SUCCESS; case SQL_DIAG_DYNAMIC_FUNCTION_CODE: { SQLINTEGER val; SQLRETURN ret; if ( head -> handle_type != SQL_HANDLE_STMT ) { return SQL_ERROR; } else if ( head -> header_set ) { if ( SQL_SUCCEEDED( head -> diag_dynamic_function_code_ret ) && diag_info_ptr ) { *((SQLINTEGER*)diag_info_ptr) = head -> diag_dynamic_function_code; } return head -> diag_dynamic_function_code_ret; } else if ( __get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELDW( __get_connection( head ))) { ret = SQLGETDIAGFIELDW( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); return ret; } else if ( !__get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELD( __get_connection( head ))) { ret = SQLGETDIAGFIELD( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); return ret; } else { val = SQL_DIAG_UNKNOWN_STATEMENT; } if ( diag_info_ptr ) { memcpy( diag_info_ptr, &val, sizeof( val )); } } return SQL_SUCCESS; case SQL_DIAG_NUMBER: { SQLINTEGER val; val = head -> sql_diag_head.internal_count + head -> sql_diag_head.error_count; if ( diag_info_ptr ) { memcpy( diag_info_ptr, &val, sizeof( val )); } } return SQL_SUCCESS; case SQL_DIAG_RETURNCODE: { if ( diag_info_ptr ) { memcpy( diag_info_ptr, &head -> return_code, sizeof( head -> return_code )); } } return SQL_SUCCESS; } /* * else check the records */ if ( rec_number < 1 ) { return SQL_ERROR; } if ( rec_number <= head -> sql_diag_head.internal_count ) { /* * local errors */ ptr = head -> sql_diag_head.internal_list_head; while( rec_number > 1 ) { ptr = ptr -> next; rec_number --; } } else if ( !__is_env( head ) && __get_connection( head ) -> state != STATE_C2 ) { rec_number -= head -> sql_diag_head.internal_count; if ( __get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELDW( __get_connection( head ))) { SQLRETURN ret; SQLWCHAR *s1 = NULL; int char_buffer_len = sizeof( SQLWCHAR ) * buffer_length; if ( buffer_length > 0 ) { s1 = malloc( char_buffer_len + sizeof( SQLWCHAR )); } ret = SQLGETDIAGFIELDW( __get_connection( head ), head -> handle_type, __get_driver_handle( head ), rec_number, diag_identifier, s1 ? s1 : diag_info_ptr, char_buffer_len, string_length_ptr ); if ( SQL_SUCCEEDED( ret ) && s1 && diag_info_ptr ) { unicode_to_ansi_copy( diag_info_ptr, buffer_length, s1, SQL_NTS, __get_connection( head )); } if ( s1 ) { free( s1 ); } if ( string_length_ptr && *string_length_ptr > 0 ) { *string_length_ptr /= sizeof( SQLWCHAR ); } if ( SQL_SUCCEEDED( ret ) && diag_identifier == SQL_DIAG_SQLSTATE ) { /* * map 3 to 2 if required */ if ( diag_info_ptr ) { if ( diag_info_ptr ) __map_error_state( diag_info_ptr, __get_version( head )); } } return ret; } else if ( !__get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELD( __get_connection( head ))) { SQLRETURN ret; ret = SQLGETDIAGFIELD( __get_connection( head ), head -> handle_type, __get_driver_handle( head ), rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); if ( SQL_SUCCEEDED( ret ) && diag_identifier == SQL_DIAG_SQLSTATE ) { /* * map 3 to 2 if required */ if ( diag_info_ptr ) { if ( diag_info_ptr ) __map_error_state( diag_info_ptr, __get_version( head )); } } return ret; } else { ptr = head -> sql_diag_head.error_list_head; while( rec_number > 1 ) { ptr = ptr -> next; rec_number --; } } } else { return SQL_NO_DATA; } /* * if we are here ptr should point to the local error * record */ switch( diag_identifier ) { case SQL_DIAG_CLASS_ORIGIN: { if ( SQL_SUCCEEDED( ptr -> diag_class_origin_ret )) { unicode_to_ansi_copy( diag_info_ptr, buffer_length, ptr -> diag_class_origin, buffer_length, __get_connection( head )); if ( string_length_ptr ) { *string_length_ptr = wide_strlen( ptr -> diag_class_origin ); } return ptr -> diag_class_origin_ret; } else { return ptr -> diag_class_origin_ret; } } break; case SQL_DIAG_COLUMN_NUMBER: { if ( diag_info_ptr ) { memcpy( diag_info_ptr, &ptr -> diag_column_number, sizeof( SQLINTEGER )); } return SQL_SUCCESS; } break; case SQL_DIAG_CONNECTION_NAME: { if ( SQL_SUCCEEDED( ptr -> diag_connection_name_ret )) { unicode_to_ansi_copy( diag_info_ptr, buffer_length, ptr -> diag_connection_name, buffer_length, __get_connection( head )); if ( string_length_ptr ) { *string_length_ptr = wide_strlen( ptr -> diag_connection_name ); } return ptr -> diag_connection_name_ret; } else { return ptr -> diag_connection_name_ret; } } break; case SQL_DIAG_MESSAGE_TEXT: { char *str; int ret = SQL_SUCCESS; str = unicode_to_ansi_alloc( ptr -> msg, SQL_NTS, __get_connection( head )); if ( diag_info_ptr ) { if ( buffer_length >= strlen( str ) + 1 ) { strcpy( diag_info_ptr, str ); } else { ret = SQL_SUCCESS_WITH_INFO; memcpy( diag_info_ptr, str, buffer_length - 1 ); (( char * ) diag_info_ptr )[ buffer_length - 1 ] = '\0'; } } if ( string_length_ptr ) { *string_length_ptr = strlen( str ); } if ( str ) { free( str ); } return ret; } break; case SQL_DIAG_NATIVE: { if ( diag_info_ptr ) { memcpy( diag_info_ptr, &ptr -> native_error, sizeof( SQLINTEGER )); } return SQL_SUCCESS; } break; case SQL_DIAG_ROW_NUMBER: { if ( diag_info_ptr ) { memcpy( diag_info_ptr, &ptr -> diag_row_number, sizeof( SQLLEN )); } return SQL_SUCCESS; } break; case SQL_DIAG_SERVER_NAME: { if ( SQL_SUCCEEDED( ptr -> diag_server_name_ret )) { unicode_to_ansi_copy( diag_info_ptr, buffer_length, ptr -> diag_server_name, buffer_length, __get_connection( head )); if ( string_length_ptr ) { *string_length_ptr = wide_strlen( ptr -> diag_server_name ); } return ptr -> diag_server_name_ret; } else { return ptr -> diag_server_name_ret; } } break; case SQL_DIAG_SQLSTATE: { char *str; int ret = SQL_SUCCESS; str = unicode_to_ansi_alloc( ptr -> sqlstate, SQL_NTS, __get_connection( head )); if ( diag_info_ptr ) { if ( buffer_length >= strlen( str ) + 1 ) { strcpy( diag_info_ptr, str ); } else { ret = SQL_SUCCESS_WITH_INFO; memcpy( diag_info_ptr, str, buffer_length - 1 ); (( char * ) diag_info_ptr )[ buffer_length - 1 ] = '\0'; } /* * map 3 to 2 if required */ if ( diag_info_ptr ) __map_error_state( diag_info_ptr, __get_version( head )); } if ( string_length_ptr ) { *string_length_ptr = strlen( str ); } if ( str ) { free( str ); } return ret; } break; case SQL_DIAG_SUBCLASS_ORIGIN: { if ( SQL_SUCCEEDED( ptr -> diag_subclass_origin_ret )) { unicode_to_ansi_copy( diag_info_ptr, buffer_length, ptr -> diag_subclass_origin, buffer_length, __get_connection( head )); if ( string_length_ptr ) { *string_length_ptr = wide_strlen( ptr -> diag_subclass_origin ); } return ptr -> diag_subclass_origin_ret; } else { return ptr -> diag_subclass_origin_ret; } } break; } return SQL_SUCCESS; } SQLRETURN SQLGetDiagFieldA( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT rec_number, SQLSMALLINT diag_identifier, SQLPOINTER diag_info_ptr, SQLSMALLINT buffer_length, SQLSMALLINT *string_length_ptr ) { return SQLGetDiagField( handle_type, handle, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); } SQLRETURN SQLGetDiagField( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT rec_number, SQLSMALLINT diag_identifier, SQLPOINTER diag_info_ptr, SQLSMALLINT buffer_length, SQLSMALLINT *string_length_ptr ) { SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; if ( handle_type == SQL_HANDLE_ENV ) { DMHENV environment = ( DMHENV ) handle; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_ENV, environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tDiag Ident = %d\ \n\t\t\tDiag Info Ptr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Len Ptr = %p", environment, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } ret = extract_sql_error_field( &environment -> error, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_release( SQL_HANDLE_ENV, environment ); return ret; } else if ( handle_type == SQL_HANDLE_DBC ) { DMHDBC connection = ( DMHDBC ) handle; if ( !__validate_dbc( connection )) { return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_DBC, connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tDiag Ident = %d\ \n\t\t\tDiag Info Ptr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Len Ptr = %p", connection, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } ret = extract_sql_error_field( &connection -> error, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_release( SQL_HANDLE_DBC, connection ); return ret; } else if ( handle_type == SQL_HANDLE_STMT ) { DMHSTMT statement = ( DMHSTMT ) handle; if ( !__validate_stmt( statement )) { return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_STMT, statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tDiag Ident = %d\ \n\t\t\tDiag Info Ptr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Len Ptr = %p", statement, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } ret = extract_sql_error_field( &statement -> error, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_release( SQL_HANDLE_STMT, statement ); return ret; } else if ( handle_type == SQL_HANDLE_DESC ) { DMHDESC descriptor = ( DMHDESC ) handle; if ( !__validate_desc( descriptor )) { return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_DESC, descriptor ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tEntry:\ \n\t\t\tDescriptor = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tDiag Ident = %d\ \n\t\t\tDiag Info Ptr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Len Ptr = %p", descriptor, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } ret = extract_sql_error_field( &descriptor -> error, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } thread_release( SQL_HANDLE_DESC, descriptor ); return ret; } return SQL_NO_DATA; } unixODBC-2.2.14-p2/DriverManager/SQLGetDiagRec.c0100644000076400007640000005703211070160005017402 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDiagRec.c,v 1.18 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLGetDiagRec.c,v $ * Revision 1.18 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.17 2008/05/20 13:43:47 lurcher * Vms fixes * * Revision 1.16 2007/02/12 11:49:34 lurcher * Add QT4 support to existing GUI parts * * Revision 1.15 2006/11/27 14:08:34 lurcher * Sync up dirs * * Revision 1.14 2006/05/31 17:35:34 lurcher * Add unicode ODBCINST entry points * * Revision 1.13 2006/04/24 08:42:10 lurcher * Handle resetting statement descriptors to implicit values, by passing in NULL or the implicit descrptor to SQLSetStmtAttr with the attribute SQL_ATTR_APP_PARAM_DESC or SQL_ATTR_APP_ROW_DESC. Also catch trying to call SQLGetDescField on a closed connection * * Revision 1.12 2005/12/19 18:43:26 lurcher * Add new parts to contrib and alter how the errors are returned from the driver * * Revision 1.11 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.10 2003/02/25 13:28:30 lurcher * * Allow errors on the drivers AllocHandle to be reported * Fix a problem that caused errors to not be reported in the log * Remove a redundant line from the spec file * * Revision 1.9 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.8 2002/11/13 15:59:20 lurcher * * More VMS changes * * Revision 1.7 2002/11/11 17:10:15 lurcher * * VMS changes * * Revision 1.6 2002/10/14 09:46:10 lurcher * * Remove extra return * * Revision 1.5 2002/10/08 13:36:07 lurcher * * Fix memory leak * * Revision 1.4 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.3 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.11 2000/06/23 16:11:38 ngorham * * Map ODBC 2 SQLSTATE values to ODBC 3 * * Revision 1.10 1999/12/01 09:20:07 ngorham * * Fix some threading problems * * Revision 1.9 1999/11/17 21:08:58 ngorham * * Fix Bug with the ODBC 3 error handling * * Revision 1.8 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/11/10 22:15:48 ngorham * * Fix some bugs with the DM and error reporting. * * Revision 1.6 1999/11/10 03:51:33 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/14 19:46:04 ngorham * * Fix the error logging when SQLError or SQLGetDiagRec returns SQL_NO_DATA * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.1 1999/04/30 16:22:47 nick * Another checkpoint * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetDiagRec.c,v $ $Revision: 1.18 $"; int __is_env( EHEAD * head ) { int type; memcpy( &type, head -> owning_handle, sizeof( type )); return type == HENV_MAGIC; } DMHDBC __get_connection( EHEAD * head ) { int type; memcpy( &type, head -> owning_handle, sizeof( type )); switch ( type ) { case HDBC_MAGIC: { DMHDBC connection = ( DMHDBC ) head -> owning_handle; return connection; } case HSTMT_MAGIC: { DMHSTMT statement = ( DMHSTMT ) head -> owning_handle; return statement -> connection; } case HDESC_MAGIC: { DMHDESC descriptor = ( DMHDESC ) head -> owning_handle; return descriptor -> connection; } } return NULL; } int __get_version( EHEAD * head ) { int type; memcpy( &type, head -> owning_handle, sizeof( type )); switch ( type ) { case HENV_MAGIC: { DMHENV environment = ( DMHENV ) head -> owning_handle; return environment -> requested_version; } case HDBC_MAGIC: { DMHDBC connection = ( DMHDBC ) head -> owning_handle; return connection -> environment -> requested_version; } case HSTMT_MAGIC: { DMHSTMT statement = ( DMHSTMT ) head -> owning_handle; return statement -> connection -> environment -> requested_version; } case HDESC_MAGIC: { DMHDESC descriptor = ( DMHDESC ) head -> owning_handle; return descriptor -> connection -> environment -> requested_version; } } return 0; } DRV_SQLHANDLE __get_driver_handle( EHEAD * head ) { int type; memcpy( &type, head -> owning_handle, sizeof( type )); switch ( type ) { case HDBC_MAGIC: { DMHDBC connection = ( DMHDBC ) head -> owning_handle; return connection -> driver_dbc; } case HSTMT_MAGIC: { DMHSTMT statement = ( DMHSTMT ) head -> owning_handle; return statement -> driver_stmt; } case HDESC_MAGIC: { DMHDESC descriptor = ( DMHDESC ) head -> owning_handle; return descriptor -> driver_desc; } } return ( SQLHANDLE ) 0; } static SQLRETURN extract_sql_error_rec( EHEAD *head, SQLCHAR *sqlstate, SQLINTEGER rec_number, SQLINTEGER *native_error, SQLCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length ) { SQLRETURN ret; if ( sqlstate ) strcpy((char*) sqlstate, "00000" ); if ( rec_number <= head -> sql_diag_head.internal_count ) { ERROR *ptr; SQLCHAR *as1 = NULL; ptr = head -> sql_diag_head.internal_list_head; while( rec_number > 1 ) { ptr = ptr -> next; rec_number --; } as1 = (SQLCHAR*) unicode_to_ansi_alloc( ptr -> msg, SQL_NTS, __get_connection( head )); if ( sqlstate ) { unicode_to_ansi_copy((char*) sqlstate, 6, ptr -> sqlstate, SQL_NTS, __get_connection( head )); } if ( buffer_length < strlen((char*) as1 ) + 1 ) { ret = SQL_SUCCESS_WITH_INFO; } else { ret = SQL_SUCCESS; } if ( message_text && as1 ) { if ( ret == SQL_SUCCESS ) { strcpy((char*) message_text, (char*) as1 ); } else { memcpy( message_text, as1, buffer_length ); message_text[ buffer_length - 1 ] = '\0'; } } if ( text_length && as1 ) { *text_length = strlen((char*) as1 ); } if ( native_error ) { *native_error = ptr -> native_error; } /* * map 3 to 2 if required */ if ( SQL_SUCCEEDED( ret ) && sqlstate ) __map_error_state( (char*) sqlstate, __get_version( head )); if ( as1 ) { free( as1 ); } return ret; } else if ( !__is_env( head ) && __get_connection( head ) -> state != STATE_C2 ) { ERROR *ptr; SQLCHAR *as1 = NULL; SQLWCHAR *s1 = NULL, *s2 = NULL; rec_number -= head -> sql_diag_head.internal_count; s1 = malloc( sizeof( SQLWCHAR ) * ( 6 + 1 )); if ( buffer_length > 0 ) { s2 = malloc( sizeof( SQLWCHAR ) * ( buffer_length + 1 )); } if ( __get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGRECW( __get_connection( head ))) { ret = SQLGETDIAGRECW( __get_connection( head ), head -> handle_type, __get_driver_handle( head ), rec_number, s1, native_error, s2, buffer_length, text_length ); /* * map 3 to 2 if required */ if ( SQL_SUCCEEDED( ret ) && sqlstate ) { if ( sqlstate ) { unicode_to_ansi_copy((char*) sqlstate, 6, s1, SQL_NTS, __get_connection( head )); __map_error_state((char*) sqlstate, __get_version( head )); } if ( message_text ) { unicode_to_ansi_copy((char*) message_text, buffer_length, s2, SQL_NTS, __get_connection( head )); } } } else if ( !__get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGREC( __get_connection( head ))) { ret = SQLGETDIAGREC( __get_connection( head ), head -> handle_type, __get_driver_handle( head ), rec_number, sqlstate, native_error, message_text, buffer_length, text_length ); /* * map 3 to 2 if required */ if ( SQL_SUCCEEDED( ret ) && sqlstate ) __map_error_state((char*) sqlstate, __get_version( head )); } else { SQLCHAR *as1 = NULL; ptr = head -> sql_diag_head.error_list_head; while( rec_number > 1 ) { ptr = ptr -> next; rec_number --; } as1 = (SQLCHAR*) unicode_to_ansi_alloc( ptr -> msg, SQL_NTS, __get_connection( head )); if ( sqlstate ) { unicode_to_ansi_copy((char*) sqlstate, 6, ptr -> sqlstate, SQL_NTS, __get_connection( head )); } if ( as1 && buffer_length < strlen((char*) as1 ) + 1 ) { ret = SQL_SUCCESS_WITH_INFO; } else { ret = SQL_SUCCESS; } if ( message_text && as1 ) { if ( ret == SQL_SUCCESS ) { strcpy((char*) message_text,(char*) as1 ); } else { memcpy( message_text, as1, buffer_length ); message_text[ buffer_length - 1 ] = '\0'; } } if ( text_length && as1 ) { *text_length = strlen((char*) as1 ); } if ( native_error ) { *native_error = ptr -> native_error; } /* * map 3 to 2 if required */ if ( SQL_SUCCEEDED( ret ) && sqlstate ) __map_error_state((char*) sqlstate, __get_version( head )); if ( as1 ) { free( as1 ); } } if ( s1 ) free( s1 ); if ( s2 ) free( s2 ); return ret; } else { return SQL_NO_DATA; } } SQLRETURN SQLGetDiagRecA( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT rec_number, SQLCHAR *sqlstate, SQLINTEGER *native, SQLCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length_ptr ) { return SQLGetDiagRec( handle_type, handle, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); } SQLRETURN SQLGetDiagRec( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT rec_number, SQLCHAR *sqlstate, SQLINTEGER *native, SQLCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length_ptr ) { SQLRETURN ret; SQLCHAR s0[ 32 ], s1[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; if ( rec_number < 1 ) { return SQL_ERROR; } if ( handle_type == SQL_HANDLE_ENV ) { DMHENV environment = ( DMHENV ) handle; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_ENV, environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", environment, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } ret = extract_sql_error_rec( &environment -> error, sqlstate, rec_number, native, message_text, buffer_length, text_length_ptr ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { sprintf( environment -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), sqlstate, __iptr_as_string( s0, native ), __sdata_as_string( s1, SQL_CHAR, text_length_ptr, message_text )); } else { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_release( SQL_HANDLE_ENV, environment ); return ret; } else if ( handle_type == SQL_HANDLE_DBC ) { DMHDBC connection = ( DMHDBC ) handle; if ( !__validate_dbc( connection )) { return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_DBC, connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", connection, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } ret = extract_sql_error_rec( &connection -> error, sqlstate, rec_number, native, message_text, buffer_length, text_length_ptr ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), sqlstate, __iptr_as_string( s0, native ), __sdata_as_string( s1, SQL_CHAR, text_length_ptr, message_text )); } else { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_release( SQL_HANDLE_DBC, connection ); return ret; } else if ( handle_type == SQL_HANDLE_STMT ) { DMHSTMT statement = ( DMHSTMT ) handle; if ( !__validate_stmt( statement )) { return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_STMT, statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", statement, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } ret = extract_sql_error_rec( &statement -> error, sqlstate, rec_number, native, message_text, buffer_length, text_length_ptr ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), sqlstate, __iptr_as_string( s0, native ), __sdata_as_string( s1, SQL_CHAR, text_length_ptr, message_text )); } else { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_release( SQL_HANDLE_STMT, statement ); return ret; } else if ( handle_type == SQL_HANDLE_DESC ) { DMHDESC descriptor = ( DMHDESC ) handle; if ( !__validate_desc( descriptor )) { return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_DESC, descriptor ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tEntry:\ \n\t\t\tDescriptor = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", descriptor, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } ret = extract_sql_error_rec( &descriptor -> error, sqlstate, rec_number, native, message_text, buffer_length, text_length_ptr ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { sprintf( descriptor -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), sqlstate, __iptr_as_string( s0, native ), __sdata_as_string( s1, SQL_CHAR, text_length_ptr, message_text )); } else { sprintf( descriptor -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } thread_release( SQL_HANDLE_DESC, descriptor ); return ret; } return SQL_NO_DATA; } unixODBC-2.2.14-p2/DriverManager/SQLGetEnvAttr.c0100644000076400007640000001623011070160005017462 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetEnvAttr.c,v 1.5 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLGetEnvAttr.c,v $ * Revision 1.5 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.4 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2001/10/29 09:54:53 lurcher * * Add automake to libodbcinstQ * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetEnvAttr.c,v $ $Revision: 1.5 $"; SQLRETURN SQLGetEnvAttr( SQLHENV environment_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { DMHENV environment = (DMHENV) environment_handle; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check environment */ if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tAttribute = %s\ \n\t\t\tValue = %p\ \n\t\t\tBuffer Len = %d\ \n\t\t\tStrLen = %p", environment, __env_attr_as_string( s1, attribute ), value, (int)buffer_length, (void*)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_protect( SQL_HANDLE_ENV, environment ); switch ( attribute ) { case SQL_ATTR_CONNECTION_POOLING: if ( value ) { memcpy( value, &environment -> connection_pooling, sizeof( environment -> connection_pooling )); } break; case SQL_ATTR_CP_MATCH: if ( value ) { memcpy( value, &environment -> cp_match, sizeof( environment -> cp_match )); } break; case SQL_ATTR_ODBC_VERSION: if ( value ) { memcpy( value, &environment -> requested_version, sizeof( environment -> requested_version )); } break; case SQL_ATTR_OUTPUT_NTS: if ( value ) { SQLINTEGER i = SQL_TRUE; memcpy( value, &i, sizeof( i )); } break; /* * unixODBC additions */ case SQL_ATTR_UNIXODBC_VERSION: if ( value ) { if ( buffer_length >= strlen( VERSION )) { strcpy( value, VERSION ); } else { memcpy( value, VERSION, buffer_length ); ((char*)value)[ buffer_length ] = '\0'; } if ( string_length ) { *string_length = strlen( VERSION ); } } break; case SQL_ATTR_UNIXODBC_SYSPATH: if ( value ) { char b1[ 512 ]; if ( buffer_length >= strlen( odbcinst_system_file_path( b1 ))) { strcpy( value, odbcinst_system_file_path( b1 )); } else { memcpy( value, odbcinst_system_file_path( b1 ), buffer_length ); ((char*)value)[ buffer_length ] = '\0'; } if ( string_length ) { *string_length = strlen( odbcinst_system_file_path( b1 )); } } break; default: dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &environment -> error, ERROR_HY092, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } return function_return( SQL_HANDLE_ENV, environment, SQL_SUCCESS ); } unixODBC-2.2.14-p2/DriverManager/SQLGetFunctions.c0100644000076400007640000001252207750253176020075 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetFunctions.c,v 1.4 2003/10/30 18:20:46 lurcher Exp $ * * $Log: SQLGetFunctions.c,v $ * Revision 1.4 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetFunctions.c,v $ $Revision: 1.4 $"; SQLRETURN SQLGetFunctions( SQLHDBC connection_handle, SQLUSMALLINT function_id, SQLUSMALLINT *supported ) { DMHDBC connection = (DMHDBC)connection_handle; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tId = %s\ \n\t\t\tSupported = %p", connection, __fid_as_string( s1, function_id ), supported ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C3 || connection -> state == STATE_C2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } __check_for_function( connection, function_id, supported ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSupported = %s", __get_return_status( SQL_SUCCESS, s1 ), __sptr_as_string( s1, (short*)supported )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, SQL_SUCCESS ); } unixODBC-2.2.14-p2/DriverManager/SQLGetInfo.c0100644000076400007640000004301111070160005016767 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetInfo.c,v 1.12 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLGetInfo.c,v $ * Revision 1.12 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.11 2007/01/02 10:29:18 lurcher * Fix descriptor leak with unicode only driver * * Revision 1.10 2006/08/31 12:44:52 lurcher * Check in for 2.2.12 release * * Revision 1.9 2006/01/06 18:44:35 lurcher * Couple of unicode fixes * * Revision 1.8 2005/10/06 08:50:58 lurcher * Fix problem with SQLDrivers not returning first entry * * Revision 1.7 2004/11/22 17:02:49 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2003/03/05 09:48:44 lurcher * * Add some 64 bit fixes * * Revision 1.4 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.9 2001/07/31 12:03:46 nick * * Fix how the DM gets the CLI year for SQLGetInfo * Fix small bug in strncasecmp * * Revision 1.8 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.7 2001/04/23 13:58:43 nick * * Assorted tweeks to text driver to get it to work with StarOffice * * Revision 1.6 2001/04/18 15:03:37 nick * * Fix problem when going to DB2 unicode driver * * Revision 1.5 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.4 2001/01/12 19:43:12 nick * * Fixed UNICODE conversion bug in SQLGetInfo * * Revision 1.3 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.2 2000/09/08 08:58:17 nick * * Add SQL_DRIVER_HDESC to SQLGetinfo * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.9 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/11/10 03:51:34 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.7 1999/10/29 21:07:40 ngorham * * Fix some stupid bugs in the DM * Make the postgres driver work via unix sockets * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetInfo.c,v $ $Revision: 1.12 $"; SQLRETURN SQLGetInfoA( SQLHDBC connection_handle, SQLUSMALLINT info_type, SQLPOINTER info_value, SQLSMALLINT buffer_length, SQLSMALLINT *string_length ) { return SQLGetInfo( connection_handle, info_type, info_value, buffer_length, string_length ); } SQLRETURN __SQLGetInfo( SQLHDBC connection_handle, SQLUSMALLINT info_type, SQLPOINTER info_value, SQLSMALLINT buffer_length, SQLSMALLINT *string_length ) { DMHDBC connection = (DMHDBC)connection_handle; SQLRETURN ret = SQL_SUCCESS; int type; SQLUSMALLINT sval; char txt[ 30 ], *cptr; SQLPOINTER *ptr; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; switch ( info_type ) { case SQL_DATA_SOURCE_NAME: type = 1; cptr = connection -> dsn; break; case SQL_DM_VER: type = 1; sprintf( txt, "%02d.%02d.%04d.%04d", SQL_SPEC_MAJOR, SQL_SPEC_MINOR, atoi( VERSION ), atoi( VERSION + 2 )); cptr = txt; break; case SQL_ODBC_VER: type = 1; sprintf( txt, "%02d.%02d", SQL_SPEC_MAJOR, SQL_SPEC_MINOR ); cptr = txt; break; case SQL_DRIVER_HDBC: type = 2; ptr = (SQLPOINTER) connection -> driver_dbc; break; case SQL_DRIVER_HENV: type = 2; ptr = (SQLPOINTER) connection -> driver_env; break; case SQL_DRIVER_HDESC: { DMHDESC hdesc = *((DMHDESC*) info_value); type = 2; if ( __validate_desc( hdesc )) { ptr = (SQLPOINTER) hdesc -> driver_desc; } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY024" ); __post_internal_error( &connection -> error, ERROR_HY024, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } break; case SQL_DRIVER_HLIB: type = 2; ptr = connection -> dl_handle; break; case SQL_DRIVER_HSTMT: { DMHSTMT hstmt = *((DMHSTMT*) info_value); type = 2; if ( __validate_stmt( hstmt )) { ptr = (SQLPOINTER) hstmt -> driver_stmt; } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY024" ); __post_internal_error( &connection -> error, ERROR_HY024, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } break; case SQL_XOPEN_CLI_YEAR: type = 1; cptr = connection -> cli_year; break; case SQL_ATTR_DRIVER_THREADING: type = 3; sval = connection -> threading_level; break; default: /* * pass all the others on */ if ( connection -> unicode_driver ) { SQLWCHAR *s1 = NULL; if ( !CHECK_SQLGETINFOW( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } switch( info_type ) { case SQL_ACCESSIBLE_PROCEDURES: case SQL_ACCESSIBLE_TABLES: case SQL_CATALOG_NAME: case SQL_CATALOG_NAME_SEPARATOR: case SQL_CATALOG_TERM: case SQL_COLLATION_SEQ: case SQL_COLUMN_ALIAS: case SQL_DATA_SOURCE_NAME: case SQL_DATA_SOURCE_READ_ONLY: case SQL_DATABASE_NAME: case SQL_DBMS_NAME: case SQL_DBMS_VER: case SQL_DESCRIBE_PARAMETER: case SQL_DRIVER_NAME: case SQL_DRIVER_ODBC_VER: case SQL_DRIVER_VER: case SQL_ODBC_VER: case SQL_EXPRESSIONS_IN_ORDERBY: case SQL_IDENTIFIER_QUOTE_CHAR: case SQL_INTEGRITY: case SQL_KEYWORDS: case SQL_LIKE_ESCAPE_CLAUSE: case SQL_MAX_ROW_SIZE_INCLUDES_LONG: case SQL_MULT_RESULT_SETS: case SQL_MULTIPLE_ACTIVE_TXN: case SQL_NEED_LONG_DATA_LEN: case SQL_ORDER_BY_COLUMNS_IN_SELECT: case SQL_PROCEDURE_TERM: case SQL_PROCEDURES: case SQL_ROW_UPDATES: case SQL_SCHEMA_TERM: case SQL_SEARCH_PATTERN_ESCAPE: case SQL_SERVER_NAME: case SQL_SPECIAL_CHARACTERS: case SQL_TABLE_TERM: case SQL_USER_NAME: case SQL_XOPEN_CLI_YEAR: case SQL_OUTER_JOINS: if ( info_value && buffer_length > 0 ) { buffer_length = sizeof( SQLWCHAR ) * ( buffer_length + 1 ); s1 = malloc( buffer_length ); } break; } ret = SQLGETINFOW( connection, connection -> driver_dbc, info_type, s1 ? s1 : info_value, buffer_length, string_length ); switch( info_type ) { case SQL_ACCESSIBLE_PROCEDURES: case SQL_ACCESSIBLE_TABLES: case SQL_CATALOG_NAME: case SQL_CATALOG_NAME_SEPARATOR: case SQL_CATALOG_TERM: case SQL_COLLATION_SEQ: case SQL_COLUMN_ALIAS: case SQL_DATA_SOURCE_NAME: case SQL_DATA_SOURCE_READ_ONLY: case SQL_DATABASE_NAME: case SQL_DBMS_NAME: case SQL_DBMS_VER: case SQL_DESCRIBE_PARAMETER: case SQL_DRIVER_NAME: case SQL_DRIVER_ODBC_VER: case SQL_DRIVER_VER: case SQL_ODBC_VER: case SQL_EXPRESSIONS_IN_ORDERBY: case SQL_IDENTIFIER_QUOTE_CHAR: case SQL_INTEGRITY: case SQL_KEYWORDS: case SQL_LIKE_ESCAPE_CLAUSE: case SQL_MAX_ROW_SIZE_INCLUDES_LONG: case SQL_MULT_RESULT_SETS: case SQL_MULTIPLE_ACTIVE_TXN: case SQL_NEED_LONG_DATA_LEN: case SQL_ORDER_BY_COLUMNS_IN_SELECT: case SQL_PROCEDURE_TERM: case SQL_PROCEDURES: case SQL_ROW_UPDATES: case SQL_SCHEMA_TERM: case SQL_SEARCH_PATTERN_ESCAPE: case SQL_SERVER_NAME: case SQL_SPECIAL_CHARACTERS: case SQL_TABLE_TERM: case SQL_USER_NAME: case SQL_XOPEN_CLI_YEAR: case SQL_OUTER_JOINS: if ( SQL_SUCCEEDED( ret ) && info_value && s1 ) { unicode_to_ansi_copy( info_value, buffer_length, s1, SQL_NTS, connection ); } if ( SQL_SUCCEEDED( ret ) && string_length && info_value ) { *string_length = strlen(info_value); } break; } if ( s1 ) { free( s1 ); } } else { if ( !CHECK_SQLGETINFO( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } ret = SQLGETINFO( connection, connection -> driver_dbc, info_type, info_value, buffer_length, string_length ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } if ( type == 1 ) { if ( string_length ) *string_length = strlen( cptr ); if ( info_value ) { if ( buffer_length > strlen( cptr ) + 1 ) { strcpy( info_value, cptr ); } else { memcpy( info_value, cptr, buffer_length - 1 ); ((char*)info_value)[ buffer_length - 1 ] = '\0'; ret = SQL_SUCCESS_WITH_INFO; } } } else if ( type == 2 ) { if ( info_value ) *((void **)info_value) = ptr; if ( string_length ) *string_length = sizeof( SQLPOINTER ); } else if ( type == 3 ) { if ( info_value ) *((SQLUSMALLINT *)info_value) = sval; if ( string_length ) *string_length = sizeof( SQLUSMALLINT ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } SQLRETURN SQLGetInfo( SQLHDBC connection_handle, SQLUSMALLINT info_type, SQLPOINTER info_value, SQLSMALLINT buffer_length, SQLSMALLINT *string_length ) { DMHDBC connection = (DMHDBC)connection_handle; SQLRETURN ret = SQL_SUCCESS; int type; SQLUSMALLINT sval; char txt[ 30 ], *cptr; SQLPOINTER *ptr; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tInfo Type = %s (%d)\ \n\t\t\tInfo Value = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tStrLen = %p", connection, __info_as_string( s1, info_type ), info_type, info_value, (int)buffer_length, (void*)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( info_type != SQL_ODBC_VER && connection -> state == STATE_C2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else if ( connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( buffer_length < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } ret = __SQLGetInfo(connection_handle, info_type, info_value, buffer_length, string_length); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetStmtAttr.c0100644000076400007640000003710007750253176017706 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetStmtAttr.c,v 1.5 2003/10/30 18:20:46 lurcher Exp $ * * $Log: SQLGetStmtAttr.c,v $ * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/16 13:08:18 lurcher * * Filter attribute values from SQLSetStmtAttr to SQLSetStmtOption to fit * within ODBC 2 * Make DSN's double clickable in ODBCConfig * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.5 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.4 2001/04/18 15:03:37 nick * * Fix problem when going to DB2 unicode driver * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.11 2000/06/24 18:45:09 ngorham * * Fix for SQLExtendedFetch on big endian platforms. the row count pointer * was declared as a small not a int. * * Revision 1.10 2000/02/06 23:26:10 ngorham * * Fix bug with missing '&' with SQLGetStmtAttr * * Revision 1.9 1999/11/13 23:40:59 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/10/29 21:07:40 ngorham * * Fix some stupid bugs in the DM * Make the postgres driver work via unix sockets * * Revision 1.7 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.4 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.3 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.2 1999/06/19 17:51:40 ngorham * * Applied assorted minor bug fixes * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.4 1999/06/02 23:48:45 ngorham * * Added more 3-2 mapping * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:20 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetStmtAttr.c,v $ $Revision: 1.5 $"; SQLRETURN SQLGetStmtAttrA( SQLHSTMT statement_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { return SQLGetStmtAttr( statement_handle, attribute, value, buffer_length, string_length ); } SQLRETURN SQLGetStmtAttr( SQLHSTMT statement_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tAttribute = %s\ \n\t\t\tValue = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tStrLen = %p", statement, __stmt_attr_as_string( s1, attribute ), value, (int)buffer_length, (void*)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( attribute == SQL_ATTR_ROW_NUMBER ) { if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 || statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * states S5 - S7 are handled by the driver */ if ( statement -> connection -> unicode_driver ) { if ( !CHECK_SQLGETSTMTATTRW( statement -> connection ) && !CHECK_SQLGETSTMTOPTIONW( statement -> connection ) && !CHECK_SQLGETSTMTATTR( statement -> connection ) && !CHECK_SQLGETSTMTOPTION( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } else { if ( !CHECK_SQLGETSTMTATTR( statement -> connection ) && !CHECK_SQLGETSTMTOPTION( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * map descriptors to our copies */ if ( attribute == SQL_ATTR_APP_ROW_DESC ) { if ( value ) memcpy( value, &statement -> ard, sizeof( statement -> ard )); ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_APP_PARAM_DESC ) { if ( value ) memcpy( value, &statement -> apd, sizeof( SQLHANDLE )); ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_IMP_ROW_DESC ) { if ( value ) memcpy( value, &statement -> ird, sizeof( SQLHANDLE )); ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_IMP_PARAM_DESC ) { if ( value ) memcpy( value, &statement -> ipd, sizeof( SQLHANDLE )); ret = SQL_SUCCESS; } /* * does the call need mapping from 3 to 2 */ else if ( attribute == SQL_ATTR_FETCH_BOOKMARK_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && CHECK_SQLEXTENDEDFETCH( statement -> connection )) { if ( value ) memcpy( value, &statement -> fetch_bm_ptr, sizeof( SQLINTEGER * )); ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_ROW_STATUS_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && CHECK_SQLEXTENDEDFETCH( statement -> connection )) { if ( value ) memcpy( value, &statement -> row_st_arr, sizeof( SQLINTEGER * )); ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_ROWS_FETCHED_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && CHECK_SQLEXTENDEDFETCH( statement -> connection )) { if ( value ) memcpy( value, &statement -> row_ct_ptr, sizeof( SQLUINTEGER * )); ret = SQL_SUCCESS; } else if ( statement -> connection -> unicode_driver && attribute == SQL_ATTR_ROW_ARRAY_SIZE && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 ) { if ( CHECK_SQLGETSTMTATTRW( statement -> connection )) { ret = SQLGETSTMTATTRW( statement -> connection, statement -> driver_stmt, SQL_ROWSET_SIZE, value, buffer_length, string_length ); } else { ret = SQLGETSTMTATTR( statement -> connection, statement -> driver_stmt, SQL_ROWSET_SIZE, value, buffer_length, string_length ); } } else if ( !statement -> connection -> unicode_driver && attribute == SQL_ATTR_ROW_ARRAY_SIZE && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && CHECK_SQLGETSTMTATTR( statement -> connection )) { ret = SQLGETSTMTATTR( statement -> connection, statement -> driver_stmt, SQL_ROWSET_SIZE, value, buffer_length, string_length ); } else if ( attribute == SQL_ATTR_ROW_ARRAY_SIZE && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 ) { if ( statement -> connection -> unicode_driver && CHECK_SQLGETSTMTOPTIONW( statement -> connection )) { ret = SQLGETSTMTOPTIONW( statement -> connection, statement -> driver_stmt, SQL_ROWSET_SIZE, value ); } else { ret = SQLGETSTMTOPTION( statement -> connection, statement -> driver_stmt, SQL_ROWSET_SIZE, value ); } } else if ( statement -> connection -> unicode_driver && CHECK_SQLGETSTMTATTRW( statement -> connection ) || CHECK_SQLGETSTMTATTR( statement -> connection )) { if ( CHECK_SQLGETSTMTATTRW( statement -> connection )) { ret = SQLGETSTMTATTRW( statement -> connection, statement -> driver_stmt, attribute, value, buffer_length, string_length ); } else { ret = SQLGETSTMTATTR( statement -> connection, statement -> driver_stmt, attribute, value, buffer_length, string_length ); } } else if ( !statement -> connection -> unicode_driver && CHECK_SQLGETSTMTATTR( statement -> connection )) { ret = SQLGETSTMTATTR( statement -> connection, statement -> driver_stmt, attribute, value, buffer_length, string_length ); } else if ( statement -> connection -> unicode_driver && CHECK_SQLGETSTMTOPTIONW( statement -> connection )) { /* * Is it in the legal range of values */ if ( attribute < SQL_STMT_DRIVER_MIN && ( attribute > SQL_ROW_NUMBER || attribute < SQL_QUERY_TIMEOUT )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &statement -> error, ERROR_HY092, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLGETSTMTOPTIONW( statement -> connection, statement -> driver_stmt, attribute, value ); } else { /* * Is it in the legal range of values */ if ( attribute < SQL_STMT_DRIVER_MIN && ( attribute > SQL_ROW_NUMBER || attribute < SQL_QUERY_TIMEOUT )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &statement -> error, ERROR_HY092, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLGETSTMTOPTION( statement -> connection, statement -> driver_stmt, attribute, value ); } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetStmtOption.c0100644000076400007640000001652507750253176020254 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetStmtOption.c,v 1.3 2003/10/30 18:20:46 lurcher Exp $ * * $Log: SQLGetStmtOption.c,v $ * Revision 1.3 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:07 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.4 1999/06/03 22:20:25 ngorham * * Finished off the ODBC3-2 mapping * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:20 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetStmtOption.c,v $ $Revision: 1.3 $"; SQLRETURN SQLGetStmtOption( SQLHSTMT statement_handle, SQLUSMALLINT option, SQLPOINTER value ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tOption = %s\ \n\t\t\tValue = %p", statement, __stmt_attr_as_string( s1, option ), value ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * states S5 - S7 are handled by the driver */ if ( CHECK_SQLGETSTMTOPTION( statement -> connection )) { ret = SQLGETSTMTOPTION( statement -> connection, statement -> driver_stmt, option, value ); } else if ( CHECK_SQLGETSTMTATTR( statement -> connection )) { switch ( option ) { case SQL_ATTR_APP_PARAM_DESC: if ( value ) memcpy( value, &statement -> apd, sizeof( statement -> apd )); ret = SQL_SUCCESS; break; case SQL_ATTR_APP_ROW_DESC: if ( value ) memcpy( value, &statement -> ard, sizeof( statement -> ard )); ret = SQL_SUCCESS; break; case SQL_ATTR_IMP_PARAM_DESC: if ( value ) memcpy( value, &statement -> ipd, sizeof( statement -> ipd )); ret = SQL_SUCCESS; break; case SQL_ATTR_IMP_ROW_DESC: if ( value ) memcpy( value, &statement -> ird, sizeof( statement -> ird )); ret = SQL_SUCCESS; break; default: ret = SQLGETSTMTATTR( statement -> connection, statement -> driver_stmt, option, value, SQL_MAX_OPTION_STRING_LENGTH, NULL ); break; } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetTypeInfo.c0100644000076400007640000002160210000467337017645 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetTypeInfo.c,v 1.5 2004/01/12 09:54:39 lurcher Exp $ * * $Log: SQLGetTypeInfo.c,v $ * Revision 1.5 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.4 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.2 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.5 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.4 2001/04/18 15:03:37 nick * * Fix problem when going to DB2 unicode driver * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetTypeInfo.c,v $ $Revision: 1.5 $"; SQLRETURN SQLGetTypeInfoA( SQLHSTMT statement_handle, SQLSMALLINT data_type ) { return SQLGetTypeInfo( statement_handle, data_type ); } SQLRETURN SQLGetTypeInfo( SQLHSTMT statement_handle, SQLSMALLINT data_type ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tData Type = %s", statement, __type_as_string( s1, data_type )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLGETTYPEINFO ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver ) { if ( !CHECK_SQLGETTYPEINFOW( statement -> connection ) && !CHECK_SQLGETTYPEINFO( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( CHECK_SQLGETTYPEINFOW( statement -> connection ) ) { ret = SQLGETTYPEINFOW( statement -> connection , statement -> driver_stmt, data_type ); } else { ret = SQLGETTYPEINFO( statement -> connection , statement -> driver_stmt, data_type ); } } else { if ( !CHECK_SQLGETTYPEINFO( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLGETTYPEINFO( statement -> connection , statement -> driver_stmt, data_type ); } if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLGETTYPEINFO; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLMoreResults.c0100644000076400007640000002135610403520561017736 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLMoreResults.c,v 1.7 2006/03/08 09:18:41 lurcher Exp $ * * $Log: SQLMoreResults.c,v $ * Revision 1.7 2006/03/08 09:18:41 lurcher * fix silly typo that was using sizeof( SQL_WCHAR ) instead of SQLWCHAR * * Revision 1.6 2003/12/19 16:25:38 lurcher * * Fix incorrect state in SQLMoreResults.c * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/01/27 15:01:01 lurcher * * On error from SQLMoreResults DONT change to S1 * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/08/15 08:10:33 lurcher * * Couple of small fixes from John L Miller * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.9 2000/06/20 12:44:00 ngorham * * Fix bug that caused a success with info message from SQLExecute or * SQLExecDirect to be lost if used with a ODBC 3 driver and the application * called SQLGetDiagRec * * Revision 1.8 2000/06/16 16:52:18 ngorham * * Stop info messages being lost when calling SQLExecute etc on ODBC 3 * drivers, the SQLNumResultCols were clearing the error before * function return had a chance to get to them * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:07 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLMoreResults.c,v $ $Revision: 1.7 $"; SQLRETURN SQLMoreResults( SQLHSTMT statement_handle ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p", statement ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_NO_DATA, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); return function_return( SQL_HANDLE_STMT, statement, SQL_NO_DATA ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLMORERESULTS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } #ifdef NR_PROBE if ( !CHECK_SQLMORERESULTS( statement -> connection ) || !CHECK_SQLNUMRESULTCOLS( statement -> connection )) #else if ( !CHECK_SQLMORERESULTS( statement -> connection )) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLMORERESULTS( statement -> connection , statement -> driver_stmt ); if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); } SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); if ( statement -> numcols == 0 ) { statement -> state = STATE_S4; } else { statement -> state = STATE_S5; } #else /* * We don't know for sure */ statement -> hascols = 0; statement -> state = STATE_S5; #endif } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLEXECUTE; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( ret == SQL_NO_DATA ) { if ( statement -> prepared ) { if ( statement -> state == STATE_S4 ) { statement -> state = STATE_S2; } else { statement -> state = STATE_S3; } } else { statement -> state = STATE_S1; } } else { /* * Leave the state where it is */ } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLNativeSql.c0100644000076400007640000002514611070160005017353 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLNativeSql.c,v 1.8 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLNativeSql.c,v $ * Revision 1.8 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.7 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.6 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.5 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.3 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.4 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.3 2001/01/02 09:55:04 nick * * More unicode bits * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 21:40:58 nick * End of another night :-) * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLNativeSql.c,v $ $Revision: 1.8 $"; SQLRETURN SQLNativeSqlA( SQLHDBC hdbc, SQLCHAR *sz_sql_str_in, SQLINTEGER cb_sql_str_in, SQLCHAR *sz_sql_str, SQLINTEGER cb_sql_str_max, SQLINTEGER *pcb_sql_str ) { return SQLNativeSql( hdbc, sz_sql_str_in, cb_sql_str_in, sz_sql_str, cb_sql_str_max, pcb_sql_str ); } SQLRETURN SQLNativeSql( SQLHDBC hdbc, SQLCHAR *sz_sql_str_in, SQLINTEGER cb_sql_str_in, SQLCHAR *sz_sql_str, SQLINTEGER cb_sql_str_max, SQLINTEGER *pcb_sql_str ) { DMHDBC connection = (DMHDBC)hdbc; SQLRETURN ret; SQLCHAR *s1; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { /* * allocate some space for the buffer */ if ( sz_sql_str_in && cb_sql_str_in == SQL_NTS ) { s1 = malloc( strlen((char*) sz_sql_str_in ) + 100 ); } else if ( sz_sql_str_in ) { s1 = malloc( cb_sql_str_in + 100 ); } else { s1 = malloc( 101 ); } sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tSQL In = %s\ \n\t\t\tSQL Out = %p\ \n\t\t\tSQL Out Len = %d\ \n\t\t\tSQL Len Ptr = %p", connection, __string_with_length( s1, sz_sql_str_in, cb_sql_str_in ), sz_sql_str, (int)cb_sql_str_max, pcb_sql_str ); free( s1 ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( !sz_sql_str_in ) { __post_internal_error( &connection -> error, ERROR_HY009, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( cb_sql_str_in < 0 && cb_sql_str_in != SQL_NTS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( sz_sql_str && cb_sql_str_max < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( connection -> state == STATE_C2 || connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( connection -> unicode_driver ) { SQLWCHAR *s1, *s2 = NULL; if ( !CHECK_SQLNATIVESQLW( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( sz_sql_str_in, cb_sql_str_in, connection ); if ( sz_sql_str && cb_sql_str_max > 0 ) { s2 = malloc( sizeof( SQLWCHAR ) * ( cb_sql_str_max + 1 )); } ret = SQLNATIVESQLW( connection, connection -> driver_dbc, s1, cb_sql_str_in, s2, cb_sql_str_max, pcb_sql_str ); if ( SQL_SUCCEEDED( ret ) && s2 && sz_sql_str ) { unicode_to_ansi_copy((char*) sz_sql_str, cb_sql_str_max, s2, SQL_NTS, connection ); } if ( s1 ) free( s1 ); if ( s2 ) free( s2 ); } else { if ( !CHECK_SQLNATIVESQL( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } ret = SQLNATIVESQL( connection, connection -> driver_dbc, sz_sql_str_in, cb_sql_str_in, sz_sql_str, cb_sql_str_max, pcb_sql_str ); } if ( log_info.log_flag ) { /* * allocate some space for the buffer */ if ( sz_sql_str && pcb_sql_str && *pcb_sql_str == SQL_NTS ) { s1 = malloc( strlen((char*) sz_sql_str ) + 100 ); } else if ( sz_sql_str && pcb_sql_str ) { s1 = malloc( *pcb_sql_str + 100 ); } else if ( sz_sql_str ) { s1 = malloc( strlen((char*) sz_sql_str ) + 100 ); } else { s1 = malloc( 101 ); } sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQL Out = %s", __get_return_status( ret, s2 ), __data_as_string( s1, SQL_CHAR, (SQLLEN*)pcb_sql_str, sz_sql_str )); free( s1 ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLNumParams.c0100644000076400007640000001473507750253176017400 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLNumParams.c,v 1.3 2003/10/30 18:20:46 lurcher Exp $ * * $Log: SQLNumParams.c,v $ * Revision 1.3 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLNumParams.c,v $ $Revision: 1.3 $"; SQLRETURN SQLNumParams( SQLHSTMT statement_handle, SQLSMALLINT *pcpar ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tParam Count = %p", statement, pcpar ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLNUMPARAMS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( !CHECK_SQLNUMPARAMS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLNUMPARAMS( statement -> connection, statement -> driver_stmt, pcpar ); if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLNUMPARAMS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tCount = %s", __get_return_status( ret, s2 ), __sptr_as_string( s1, pcpar )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLNumResultCols.c0100644000076400007640000001602210546431646020240 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLNumResultCols.c,v 1.4 2007/01/02 10:27:50 lurcher Exp $ * * $Log: SQLNumResultCols.c,v $ * Revision 1.4 2007/01/02 10:27:50 lurcher * Fix descriptor leak with unicode only driver * * Revision 1.3 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/10/14 06:49:24 ngorham * * Remove @all_includes@ from Drivers/MiniSQL/Makefile.am * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLNumResultCols.c,v $ $Revision: 1.4 $"; SQLRETURN SQLNumResultCols( SQLHSTMT statement_handle, SQLSMALLINT *column_count ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tColumn Count = %p", statement, column_count ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLNUMRESULTCOLS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( !CHECK_SQLNUMRESULTCOLS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, column_count ); if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLNUMRESULTCOLS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tCount = %s", __get_return_status( ret, s2 ), __sptr_as_string( s1, column_count )); } else { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLParamData.c0100644000076400007640000002377710625610770017325 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLParamData.c,v 1.6 2007/05/25 16:42:32 lurcher Exp $ * * $Log: SQLParamData.c,v $ * Revision 1.6 2007/05/25 16:42:32 lurcher * Sync up * * Revision 1.5 2005/11/21 17:25:43 lurcher * A few DM fixes for Oracle's ODBC driver * * Revision 1.4 2004/05/07 09:53:13 lurcher * * * Fix potential problrm in stats if creating a semaphore fails * Alter state after SQLParamData from S4 to S5 * * Revision 1.3 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.10 2000/06/20 12:44:00 ngorham * * Fix bug that caused a success with info message from SQLExecute or * SQLExecDirect to be lost if used with a ODBC 3 driver and the application * called SQLGetDiagRec * * Revision 1.9 2000/06/16 16:52:18 ngorham * * Stop info messages being lost when calling SQLExecute etc on ODBC 3 * drivers, the SQLNumResultCols were clearing the error before * function return had a chance to get to them * * Revision 1.8 2000/05/21 21:49:19 ngorham * * Assorted fixes * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLParamData.c,v $ $Revision: 1.6 $"; SQLRETURN SQLParamData( SQLHSTMT statement_handle, SQLPOINTER *value ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tValue = %p", statement, value ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 || statement -> state == STATE_S4 || statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 || statement -> state == STATE_S9 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLPARAMDATA ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( !CHECK_SQLPARAMDATA( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * When a NULL is passed, driver tries to access this memory and dumps core, * so pass a vaild pointer to the driver. This mirrors what the MS DM does */ if (!value) { statement -> valueptr = NULL; value = &statement -> valueptr; } ret = SQLPARAMDATA( statement -> connection, statement -> driver_stmt, value ); if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLPARAMDATA; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( SQL_SUCCEEDED( ret )) { if ( statement -> interupted_func == SQL_API_SQLEXECDIRECT || statement -> interupted_func == SQL_API_SQLEXECUTE ) { #ifdef NR_PROBE SQLRETURN local_ret; /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); } local_ret = SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> hascols ); if ( statement -> hascols > 0 ) statement -> state = STATE_S5; else statement -> state = STATE_S4; #else statement -> hascols = 1; statement -> state = STATE_S5; #endif } else if ( statement -> interupted_func == SQL_API_SQLSETPOS && statement -> interupted_state == STATE_S7 ) { statement -> state = STATE_S7; } else if ( statement -> interupted_func == SQL_API_SQLBULKOPERATIONS && statement -> interupted_state == STATE_S5 ) { statement -> state = STATE_S5; } else { statement -> state = STATE_S6; } } else if ( ret == SQL_NEED_DATA ) { statement -> state = STATE_S9; } else if ( ret == SQL_NO_DATA ) { statement -> interupted_func = 0; statement -> state = STATE_S4; } else { if ( statement -> interupted_func == SQL_API_SQLEXECDIRECT ) { statement -> state = STATE_S1; } else if ( statement -> interupted_func == SQL_API_SQLEXECUTE && statement -> hascols ) { statement -> state = STATE_S3; } else if ( statement -> interupted_func == SQL_API_SQLEXECUTE ) { statement -> state = STATE_S2; } else if ( statement -> interupted_func == SQL_API_SQLBULKOPERATIONS && statement -> interupted_state == STATE_S5 ) { statement -> state = STATE_S5; } else if ( statement -> interupted_func == SQL_API_SQLSETPOS && statement -> interupted_state == STATE_S7 ) { statement -> state = STATE_S7; } else { statement -> state = STATE_S6; } } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tValue = %p", __get_return_status( ret, s1 ), *value ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLParamOptions.c0100644000076400007640000001734110341024134020061 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLParamOptions.c,v 1.5 2005/11/23 08:29:16 lurcher Exp $ * * $Log: SQLParamOptions.c,v $ * Revision 1.5 2005/11/23 08:29:16 lurcher * Add cleanup in postgres driver * * Revision 1.4 2005/07/08 12:11:23 lurcher * * Fix a cursor lib problem (it was broken if you did metadata calls) * Alter the params to SQLParamOptions to use SQLULEN * * Revision 1.3 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.4 1999/06/03 22:20:25 ngorham * * Finished off the ODBC3-2 mapping * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:20 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLParamOptions.c,v $ $Revision: 1.5 $"; /* * This one is strictly ODBC 2 */ SQLRETURN SQLParamOptions( SQLHSTMT statement_handle, SQLULEN crow, SQLULEN *pirow ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCrow = %d\ \n\t\t\tPirow = %p", statement, (int)crow, (void*)pirow ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( crow == 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1107" ); __post_internal_error( &statement -> error, ERROR_S1107, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1010" ); __post_internal_error( &statement -> error, ERROR_S1010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( CHECK_SQLPARAMOPTIONS( statement -> connection )) { ret = SQLPARAMOPTIONS( statement -> connection, statement -> driver_stmt, crow, pirow ); } else if ( CHECK_SQLSETSTMTATTR( statement -> connection )) { ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, SQL_ATTR_PARAMSET_SIZE, crow, 0 ); if ( SQL_SUCCEEDED( ret )) { ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, SQL_ATTR_PARAMS_PROCESSED_PTR, pirow, 0 ); } } else if ( CHECK_SQLSETSTMTATTRW( statement -> connection )) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, SQL_ATTR_PARAMSET_SIZE, crow, 0 ); if ( SQL_SUCCEEDED( ret )) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, SQL_ATTR_PARAMS_PROCESSED_PTR, pirow, 0 ); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLPrepare.c0100644000076400007640000002447610212071320017046 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLPrepare.c,v 1.6 2005/03/04 14:38:08 lurcher Exp $ * * $Log: SQLPrepare.c,v $ * Revision 1.6 2005/03/04 14:38:08 lurcher * Bump version number * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.4 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.3 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.2 2000/10/25 09:23:53 nick * * Fixed incorrect error return when NULL string passed * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:16 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLPrepare.c,v $ $Revision: 1.6 $"; SQLRETURN SQLPrepareA( SQLHSTMT statement_handle, SQLCHAR *statement_text, SQLINTEGER text_length ) { return SQLPrepare( statement_handle, statement_text, text_length ); } SQLRETURN SQLPrepare( SQLHSTMT statement_handle, SQLCHAR *statement_text, SQLINTEGER text_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR *s1; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { /* * allocate some space for the buffer */ if ( statement_text && text_length == SQL_NTS ) { s1 = malloc( strlen((char*) statement_text ) + 100 ); } else if ( statement_text ) { s1 = malloc( text_length + 100 ); } else { s1 = malloc( 101 ); } sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tSQL = %s", statement, __string_with_length( s1, statement_text, text_length )); free( s1 ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( !statement_text ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY009" ); __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( text_length <= 0 && text_length != SQL_NTS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLPREPARE ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1; if ( !CHECK_SQLPREPAREW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( statement_text, text_length, statement -> connection ); ret = SQLPREPAREW( statement -> connection , statement -> driver_stmt, s1, text_length ); if ( s1 ) free( s1 ); } else { if ( !CHECK_SQLPREPARE( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLPREPARE( statement -> connection , statement -> driver_stmt, statement_text, text_length ); } if ( SQL_SUCCEEDED( ret )) { statement -> hascols = 0; statement -> state = STATE_S3; statement -> prepared = 1; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLPREPARE; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLPrimaryKeys.c0100644000076400007640000002722110000467337017732 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLPrimaryKeys.c,v 1.6 2004/01/12 09:54:39 lurcher Exp $ * * $Log: SQLPrimaryKeys.c,v $ * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.9 2000/06/20 12:44:01 ngorham * * Fix bug that caused a success with info message from SQLExecute or * SQLExecDirect to be lost if used with a ODBC 3 driver and the application * called SQLGetDiagRec * * Revision 1.8 2000/06/16 16:52:18 ngorham * * Stop info messages being lost when calling SQLExecute etc on ODBC 3 * drivers, the SQLNumResultCols were clearing the error before * function return had a chance to get to them * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLPrimaryKeys.c,v $ $Revision: 1.6 $"; SQLRETURN SQLPrimaryKeysA( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_table_name, SQLSMALLINT cb_table_name ) { return SQLPrimaryKeys( statement_handle, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_table_name, cb_table_name ); } SQLRETURN SQLPrimaryKeys( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_table_name, SQLSMALLINT cb_table_name ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Type = %s", statement, __string_with_length( s1, sz_catalog_name, cb_catalog_name ), __string_with_length( s2, sz_schema_name, cb_schema_name ), __string_with_length( s3, sz_table_name, cb_table_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( cb_catalog_name < 0 && cb_catalog_name != SQL_NTS ) || ( cb_schema_name < 0 && cb_schema_name != SQL_NTS ) || ( cb_table_name < 0 && cb_table_name != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLPRIMARYKEYS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1, *s2, *s3; if ( !CHECK_SQLPRIMARYKEYSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( sz_catalog_name, cb_catalog_name, statement -> connection ); s2 = ansi_to_unicode_alloc( sz_schema_name, cb_schema_name, statement -> connection ); s3 = ansi_to_unicode_alloc( sz_table_name, cb_table_name, statement -> connection ); ret = SQLPRIMARYKEYSW( statement -> connection , statement -> driver_stmt, s1, cb_catalog_name, s2, cb_schema_name, s3, cb_table_name ); if ( s1 ) free( s1 ); if ( s2 ) free( s2 ); if ( s3 ) free( s3 ); } else { if ( !CHECK_SQLPRIMARYKEYS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLPRIMARYKEYS( statement -> connection , statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_table_name, cb_table_name ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); } SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); /******/ #endif statement -> hascols = 1; statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLPRIMARYKEYS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLProcedureColumns.c0100644000076400007640000002701210000467337020742 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLProcedureColumns.c,v 1.6 2004/01/12 09:54:39 lurcher Exp $ * * $Log: SQLProcedureColumns.c,v $ * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLProcedureColumns.c,v $ $Revision: 1.6 $"; SQLRETURN SQLProcedureColumnsA( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_proc_name, SQLSMALLINT cb_proc_name, SQLCHAR *sz_column_name, SQLSMALLINT cb_column_name ) { return SQLProcedureColumns( statement_handle, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_proc_name, cb_proc_name, sz_column_name, cb_column_name ); } SQLRETURN SQLProcedureColumns( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_proc_name, SQLSMALLINT cb_proc_name, SQLCHAR *sz_column_name, SQLSMALLINT cb_column_name ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tProc Name = %s\ \n\t\t\tColumn Type = %s", statement, __string_with_length( s1, sz_catalog_name, cb_catalog_name ), __string_with_length( s2, sz_schema_name, cb_schema_name ), __string_with_length( s3, sz_proc_name, cb_proc_name ), __string_with_length( s4, sz_column_name, cb_column_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( cb_catalog_name < 0 && cb_catalog_name != SQL_NTS ) || ( cb_schema_name < 0 && cb_schema_name != SQL_NTS ) || ( cb_proc_name < 0 && cb_proc_name != SQL_NTS ) || ( cb_column_name < 0 && cb_column_name != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLPROCEDURECOLUMNS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1, *s2, *s3, *s4; if ( !CHECK_SQLPROCEDURECOLUMNSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( sz_catalog_name, cb_catalog_name, statement -> connection ); s2 = ansi_to_unicode_alloc( sz_schema_name, cb_schema_name, statement -> connection ); s3 = ansi_to_unicode_alloc( sz_proc_name, cb_proc_name, statement -> connection ); s4 = ansi_to_unicode_alloc( sz_column_name, cb_column_name, statement -> connection ); ret = SQLPROCEDURECOLUMNSW( statement -> connection , statement -> driver_stmt, s1, cb_catalog_name, s2, cb_schema_name, s3, cb_proc_name, s4, cb_column_name ); if ( s1 ) free( s1 ); if ( s2 ) free( s2 ); if ( s3 ) free( s3 ); if ( s4 ) free( s4 ); } else { if ( !CHECK_SQLPROCEDURECOLUMNS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLPROCEDURECOLUMNS( statement -> connection , statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_proc_name, cb_proc_name, sz_column_name, cb_column_name ); } if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLPROCEDURECOLUMNS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLProcedures.c0100644000076400007640000002541410000467337017570 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLProcedures.c,v 1.6 2004/01/12 09:54:39 lurcher Exp $ * * $Log: SQLProcedures.c,v $ * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLProcedures.c,v $ $Revision: 1.6 $"; SQLRETURN SQLProceduresA( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_proc_name, SQLSMALLINT cb_proc_name ) { return SQLProcedures( statement_handle, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_proc_name, cb_proc_name ); } SQLRETURN SQLProcedures( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_proc_name, SQLSMALLINT cb_proc_name ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tProc Name = %s", statement, __string_with_length( s1, sz_catalog_name, cb_catalog_name ), __string_with_length( s2, sz_schema_name, cb_schema_name ), __string_with_length( s3, sz_proc_name, cb_proc_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( cb_catalog_name < 0 && cb_catalog_name != SQL_NTS ) || ( cb_schema_name < 0 && cb_schema_name != SQL_NTS ) || ( cb_proc_name < 0 && cb_proc_name != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLPROCEDURES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1, *s2, *s3; if ( !CHECK_SQLPROCEDURESW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( sz_catalog_name, cb_catalog_name, statement -> connection ); s2 = ansi_to_unicode_alloc( sz_schema_name, cb_schema_name, statement -> connection ); s3 = ansi_to_unicode_alloc( sz_proc_name, cb_proc_name, statement -> connection ); ret = SQLPROCEDURESW( statement -> connection , statement -> driver_stmt, s1, cb_catalog_name, s2, cb_schema_name, s3, cb_proc_name ); if ( s1 ) free( s1 ); if ( s2 ) free( s2 ); if ( s3 ) free( s3 ); } else { if ( !CHECK_SQLPROCEDURES( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLPROCEDURES( statement -> connection , statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_proc_name, cb_proc_name ); } if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLPROCEDURES; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLPutData.c0100644000076400007640000002053607750253176017033 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLPutData.c,v 1.4 2003/10/30 18:20:46 lurcher Exp $ * * $Log: SQLPutData.c,v $ * Revision 1.4 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLPutData.c,v $ $Revision: 1.4 $"; SQLRETURN SQLPutData( SQLHSTMT statement_handle, SQLPOINTER data, SQLLEN strlen_or_ind ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tData = %p\ \n\t\t\tStrLen = %d", statement, data, (int)strlen_or_ind ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 || statement -> state == STATE_S4 || statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 || statement -> state == STATE_S8 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * not the first put for this paramenter and we * try and set a NULL */ if ( statement -> state == STATE_S10 && strlen_or_ind == SQL_NULL_DATA ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY011" ); __post_internal_error( &statement -> error, ERROR_HY011, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLPUTDATA ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( !CHECK_SQLPUTDATA( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLPUTDATA( statement -> connection, statement -> driver_stmt, data, strlen_or_ind ); if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLPUTDATA; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S10; } else { if ( statement -> interupted_func == SQL_API_SQLEXECDIRECT ) { statement -> state = STATE_S1; } else if ( statement -> interupted_func == SQL_API_SQLEXECUTE && statement -> hascols ) { statement -> state = STATE_S3; } else if ( statement -> interupted_func == SQL_API_SQLEXECUTE ) { statement -> state = STATE_S2; } else if ( statement -> interupted_func == SQL_API_SQLBULKOPERATIONS && statement -> interupted_state == STATE_S5 ) { statement -> state = STATE_S5; } else if ( statement -> interupted_func == SQL_API_SQLSETPOS && statement -> interupted_state == STATE_S7 ) { statement -> state = STATE_S7; } else { statement -> state = STATE_S6; } } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLRowCount.c0100644000076400007640000001567410604157753017254 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLRowCount.c,v 1.7 2007/04/02 10:50:19 lurcher Exp $ * * $Log: SQLRowCount.c,v $ * Revision 1.7 2007/04/02 10:50:19 lurcher * Fix some 64bit problems (only when sizeof(SQLLEN) == 8 ) * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.3 2002/08/12 13:17:52 lurcher * * Replicate the way the MS DM handles loading of driver libs, and allocating * handles in the driver. usage counting in the driver means that dlopen is * only called for the first use, and dlclose for the last. AllocHandle for * the driver environment is only called for the first time per driver * per application environment. * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLRowCount.c,v $ $Revision: 1.7 $"; SQLRETURN SQLRowCount( SQLHSTMT statement_handle, SQLLEN *rowcount ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { if ( rowcount ) { *rowcount = -1; } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tRow Count = %p", statement, rowcount ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 || statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( rowcount ) { *rowcount = -1; } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( !CHECK_SQLROWCOUNT( statement -> connection )) { if ( rowcount ) { *rowcount = -1; } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = DEF_SQLROWCOUNT( statement -> connection, statement -> driver_stmt, rowcount ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tRow Count = %s", __get_return_status( ret, s1 ), __ptr_as_string( s1, rowcount )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetConnectAttr.c0100644000076400007640000005045710416701600020355 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetConnectAttr.c,v 1.16 2006/04/11 10:22:56 lurcher Exp $ * * $Log: SQLSetConnectAttr.c,v $ * Revision 1.16 2006/04/11 10:22:56 lurcher * Fix a data type check * * Revision 1.15 2005/03/01 15:50:50 lurcher * Add Eric's SQLSetConnectAttr patch * * Revision 1.14 2004/06/21 10:01:11 lurcher * * Fix a couple of 64 bit issues * * Revision 1.13 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.12 2003/03/05 09:48:44 lurcher * * Add some 64 bit fixes * * Revision 1.11 2003/02/27 12:19:39 lurcher * * Add the A functions as well as the W * * Revision 1.10 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.9 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.8 2002/07/16 13:08:18 lurcher * * Filter attribute values from SQLSetStmtAttr to SQLSetStmtOption to fit * within ODBC 2 * Make DSN's double clickable in ODBCConfig * * Revision 1.7 2002/07/04 17:27:56 lurcher * * Small bug fixes * * Revision 1.5 2002/01/30 12:20:02 lurcher * * Add MyODBC 3 driver source * * Revision 1.4 2002/01/10 11:17:20 lurcher * * Allow SQL_ATTR_LOGIN_TIMEOUT to be set when connected to mirror what the * MS DM does * * Revision 1.3 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.2 2001/11/14 12:33:20 lurcher * * Remove the comments around the tracing code * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.12 2001/09/27 17:05:48 nick * * Assorted fixes and tweeks * * Revision 1.11 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.10 2001/08/03 15:19:00 nick * * Add changes to set values before connect * * Revision 1.9 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.8 2001/04/25 14:29:36 nick * * remove comment * * Revision 1.7 2001/04/23 13:58:43 nick * * Assorted tweeks to text driver to get it to work with StarOffice * * Revision 1.6 2001/04/20 13:58:13 nick * * Add txt driver * * Revision 1.5 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.4 2001/02/06 18:43:38 nick * * Fix problem with SQLSetConnectAttr.c looking for UNICODE versions in * ansi side of call * * Revision 1.3 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.2 2000/11/14 10:15:27 nick * * Add test for localtime_r * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.11 2000/06/20 13:30:09 ngorham * * Fix problems when using bookmarks * * Revision 1.10 2000/05/21 21:49:19 ngorham * * Assorted fixes * * Revision 1.9 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/11/10 03:51:34 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.7 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/09/19 22:24:34 ngorham * * Added support for the cursor library * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetConnectAttr.c,v $ $Revision: 1.16 $"; SQLRETURN SQLSetConnectAttrA( SQLHDBC connection_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER string_length ) { return SQLSetConnectAttr( connection_handle, attribute, value, string_length ); } SQLRETURN SQLSetConnectAttr( SQLHDBC connection_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER string_length ) { DMHDBC connection = (DMHDBC)connection_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * doesn't require a handle */ if ( attribute == SQL_ATTR_TRACE ) { if ((SQLLEN) value == SQL_OPT_TRACE_OFF ) { char force_string[ 30 ]; SQLGetPrivateProfileString( "ODBC", "ForceTrace", "0", force_string, sizeof( force_string ), "ODBCINST.INI" ); if ( force_string[ 0 ] == '1' || toupper( force_string[ 0 ] ) == 'Y' || ( toupper( force_string[ 0 ] ) == 'O' && toupper( force_string[ 1 ] ) == 'N' )) { if ( log_info.log_flag ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Application tried to turn logging off" ); } } else { if ( log_info.log_flag ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Application turning logging off" ); } log_info.log_flag = 0; } } else { log_info.log_flag = 1; } return SQL_SUCCESS; } else if ( attribute == SQL_ATTR_TRACEFILE ) { if ( value ) { if ( log_info.log_file_name ) { free( log_info.log_file_name ); } log_info.log_file_name = strdup( value ); } return SQL_SUCCESS; } /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tAttribute = %s\ \n\t\t\tValue = %p\ \n\t\t\tStrLen = %d", connection, __con_attr_as_string( s1, attribute ), value, (int)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C2 ) { if ( attribute == SQL_ATTR_TRANSLATE_OPTION || attribute == SQL_ATTR_TRANSLATE_LIB ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else if ( connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &connection -> error, ERROR_HY010, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else if ( connection -> state == STATE_C4 || connection -> state == STATE_C5 || connection -> state == STATE_C6 ) { if ( attribute == SQL_ATTR_ODBC_CURSORS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else if ( attribute == SQL_ATTR_PACKET_SIZE ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY011" ); __post_internal_error( &connection -> error, ERROR_HY011, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } /* * is it something overridden */ value = __attr_override( connection, SQL_HANDLE_DBC, attribute, value, &string_length ); /* * we need to save this even if connected so we can use it for the next connetc */ if ( attribute == SQL_ATTR_LOGIN_TIMEOUT ) { connection -> login_timeout = ( SQLLEN ) value; connection -> login_timeout_set = 1; } /* * if connected, call the driver * otherwise we need to save the states and set them when we * do connect */ if ( connection -> state == STATE_C2 ) { /* * is it for us */ if ( attribute == SQL_ATTR_ODBC_CURSORS ) { connection -> cursors = ( SQLLEN ) value; } else if ( attribute == SQL_ATTR_ACCESS_MODE ) { connection -> access_mode = ( SQLLEN ) value; connection -> access_mode_set = 1; } else if ( attribute == SQL_ATTR_ASYNC_ENABLE ) { connection -> async_enable = ( SQLLEN ) value; connection -> async_enable_set = 1; } else if ( attribute == SQL_ATTR_AUTO_IPD ) { connection -> auto_ipd = ( SQLLEN ) value; connection -> auto_ipd_set = 1; } else if ( attribute == SQL_ATTR_AUTOCOMMIT ) { connection -> auto_commit = ( SQLLEN ) value; connection -> auto_commit_set = 1; } else if ( attribute == SQL_ATTR_CONNECTION_TIMEOUT ) { connection -> connection_timeout = ( SQLLEN ) value; connection -> connection_timeout_set = 1; } else if ( attribute == SQL_ATTR_METADATA_ID ) { connection -> metadata_id = ( SQLLEN ) value; connection -> metadata_id_set = 1; } else if ( attribute == SQL_ATTR_PACKET_SIZE ) { connection -> packet_size = ( SQLLEN ) value; connection -> packet_size_set = 1; } else if ( attribute == SQL_ATTR_QUIET_MODE ) { connection -> quite_mode = ( SQLLEN ) value; connection -> quite_mode_set = 1; } else if ( attribute == SQL_ATTR_TXN_ISOLATION ) { connection -> txn_isolation = ( SQLLEN ) value; connection -> txn_isolation_set = 1; } else if ( attribute != SQL_ATTR_LOGIN_TIMEOUT ) { /* * save any unknown attributes untill connect */ struct save_attr *sa = calloc( 1, sizeof( struct save_attr )); sa -> attr_type = attribute; if ( string_length > 0 ) { sa -> str_attr = malloc( string_length ); memcpy( sa -> str_attr, value, string_length ); sa -> str_len = string_length; } else if ( string_length == SQL_NTS ) { sa -> str_attr = strdup( value ); sa -> str_len = string_length; } else { sa -> int_attr = ( SQLLEN ) value; sa -> str_len = string_length; } sa -> next = connection -> save_attr; connection -> save_attr = sa; } sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, SQL_SUCCESS ); } else { if ( !connection -> unicode_driver ) { if ( !CHECK_SQLSETCONNECTATTR( connection )) { if ( CHECK_SQLSETCONNECTOPTION( connection )) { /* * Is it in the legal range of values */ if ( attribute < SQL_CONN_DRIVER_MIN && ( attribute > SQL_PACKET_SIZE || attribute < SQL_ACCESS_MODE )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &connection -> error, ERROR_HY092, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } ret = SQLSETCONNECTOPTION( connection, connection -> driver_dbc, attribute, value ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { ret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, attribute, value, string_length ); } } else { if ( !CHECK_SQLSETCONNECTATTRW( connection )) { if ( CHECK_SQLSETCONNECTOPTIONW( connection )) { SQLWCHAR *s1; /* * Is it in the legal range of values */ if ( attribute < SQL_CONN_DRIVER_MIN && ( attribute > SQL_PACKET_SIZE || attribute < SQL_ACCESS_MODE )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &connection -> error, ERROR_HY092, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: s1 = ansi_to_unicode_alloc( value, SQL_NTS, connection ); ret = SQLSETCONNECTOPTIONW( connection, connection -> driver_dbc, attribute, s1 ); if ( s1 ) free( s1 ); break; default: ret = SQLSETCONNECTOPTIONW( connection, connection -> driver_dbc, attribute, value ); break; } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { SQLWCHAR *s1; switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: s1 = ansi_to_unicode_alloc( value, string_length, connection ); ret = SQLSETCONNECTATTRW( connection, connection -> driver_dbc, attribute, s1, string_length ); if ( s1 ) free( s1 ); break; default: ret = SQLSETCONNECTATTRW( connection, connection -> driver_dbc, attribute, value, string_length ); break; } } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } } /* * catch this */ if ( attribute == SQL_ATTR_USE_BOOKMARKS && SQL_SUCCEEDED( ret )) { connection -> bookmarks_on = (SQLLEN) value; } return function_return( SQL_HANDLE_DBC, connection, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetConnectOption.c0100644000076400007640000003570207750253176020730 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetConnectOption.c,v 1.11 2003/10/30 18:20:46 lurcher Exp $ * * $Log: SQLSetConnectOption.c,v $ * Revision 1.11 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.10 2003/03/05 09:48:45 lurcher * * Add some 64 bit fixes * * Revision 1.9 2003/02/27 12:19:40 lurcher * * Add the A functions as well as the W * * Revision 1.8 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.7 2002/07/25 09:30:26 lurcher * * Additional unicode and iconv changes * * Revision 1.6 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.5 2002/07/04 17:27:56 lurcher * * Small bug fixes * * Revision 1.3 2002/01/30 12:20:02 lurcher * * Add MyODBC 3 driver source * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.8 2001/09/27 17:05:48 nick * * Assorted fixes and tweeks * * Revision 1.7 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.6 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.5 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.4 2001/02/07 11:20:23 nick * * Remove some compile warnings * * Revision 1.3 2001/02/06 18:46:55 nick * * More UNICODE ommissions * * Revision 1.2 2000/11/14 10:15:27 nick * * Add test for localtime_r * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.11 2000/06/20 13:30:10 ngorham * * Fix problems when using bookmarks * * Revision 1.10 2000/05/21 21:49:19 ngorham * * Assorted fixes * * Revision 1.9 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/11/10 03:51:34 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.7 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/09/19 22:24:34 ngorham * * Added support for the cursor library * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.4 1999/06/03 22:20:25 ngorham * * Finished off the ODBC3-2 mapping * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:21 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetConnectOption.c,v $ $Revision: 1.11 $"; SQLRETURN SQLSetConnectOptionA( SQLHDBC connection_handle, SQLUSMALLINT option, SQLULEN value ) { return SQLSetConnectOption( connection_handle, option, value ); } SQLRETURN SQLSetConnectOption( SQLHDBC connection_handle, SQLUSMALLINT option, SQLULEN value ) { DMHDBC connection = (DMHDBC)connection_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * doesn't require a handle */ if ( option == SQL_ATTR_TRACE ) { if ( value == SQL_OPT_TRACE_OFF ) { log_info.log_flag = 0; } else { log_info.log_flag = 1; } return SQL_SUCCESS; } else if ( option == SQL_ATTR_TRACEFILE ) { if ( value ) { if ( log_info.log_file_name ) { free( log_info.log_file_name ); } log_info.log_file_name = (char*)strdup((char*)(void*) value ); } return SQL_SUCCESS; } /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tOption = %s\ \n\t\t\tValue = %d", connection, __con_attr_as_string( s1, option ), (int)value ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C2 ) { if ( option == SQL_TRANSLATE_OPTION || option == SQL_TRANSLATE_DLL ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else if ( connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &connection -> error, ERROR_HY010, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else if ( connection -> state == STATE_C4 || connection -> state == STATE_C5 ) { if ( option == SQL_ODBC_CURSORS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else if ( connection -> state == STATE_C6 ) { if ( option == SQL_ODBC_CURSORS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else if ( option == SQL_TXN_ISOLATION ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1011" ); __post_internal_error( &connection -> error, ERROR_S1011, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } /* * is it something overridden */ value = (SQLULEN) __attr_override( connection, SQL_HANDLE_DBC, option, (void*) value, NULL ); /* * we need to save this even if connected so we can use it for the next connect */ if ( option == SQL_LOGIN_TIMEOUT ) { connection -> login_timeout_set = 1; connection -> login_timeout = value; } if ( option == SQL_ODBC_CURSORS ) { connection -> cursors = value; ret = SQL_SUCCESS; } else if ( connection -> state == STATE_C2 ) { if ( option == SQL_AUTOCOMMIT ) { connection -> auto_commit = ( SQLINTEGER ) value; connection -> auto_commit_set = 1; } else if ( option == SQL_ATTR_QUIET_MODE ) { connection -> quite_mode = ( SQLLEN ) value; connection -> quite_mode_set = 1; } else { /* * save any unknown attributes untill connect */ struct save_attr *sa = calloc( 1, sizeof( struct save_attr )); sa -> attr_type = option; sa -> int_attr = ( SQLINTEGER ) value; sa -> next = connection -> save_attr; connection -> save_attr = sa; } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, SQL_SUCCESS ); } else { /* * call the driver */ if ( connection -> unicode_driver ) { if ( CHECK_SQLSETCONNECTOPTIONW( connection )) { ret = SQLSETCONNECTOPTIONW( connection, connection -> driver_dbc, option, value ); } else if ( CHECK_SQLSETCONNECTATTRW( connection )) { SQLINTEGER string_length; void *ptr = (void *) value; switch( option ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: string_length = SQL_NTS; ptr = (void *) ansi_to_unicode_alloc(( SQLCHAR * ) value, SQL_NTS, connection ); break; default: string_length = 0; break; } ret = SQLSETCONNECTATTRW( connection, connection -> driver_dbc, option, ptr, string_length ); if ( ptr != (void*) value ) { free( ptr ); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { if ( CHECK_SQLSETCONNECTOPTION( connection )) { ret = SQLSETCONNECTOPTION( connection, connection -> driver_dbc, option, value ); } else if ( CHECK_SQLSETCONNECTATTR( connection )) { SQLINTEGER string_length; switch( option ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: string_length = SQL_NTS; break; default: string_length = 0; break; } ret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, option, value, string_length ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } } /* * catch this */ if ( option == SQL_ATTR_USE_BOOKMARKS && SQL_SUCCEEDED( ret )) { connection -> bookmarks_on = (SQLUINTEGER) value; } return function_return( SQL_HANDLE_DBC, connection, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetCursorName.c0100644000076400007640000002013507750253176020216 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetCursorName.c,v 1.5 2003/10/30 18:20:46 lurcher Exp $ * * $Log: SQLSetCursorName.c,v $ * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:40 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:18 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetCursorName.c,v $ $Revision: 1.5 $"; SQLRETURN SQLSetCursorNameA( SQLHSTMT statement_handle, SQLCHAR *cursor_name, SQLSMALLINT name_length ) { return SQLSetCursorName( statement_handle, cursor_name, name_length ); } SQLRETURN SQLSetCursorName( SQLHSTMT statement_handle, SQLCHAR *cursor_name, SQLSMALLINT name_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCursor name = %s", statement, __string_with_length( s1, cursor_name, name_length )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( !cursor_name ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY009" ); __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S4 || statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1; if ( !CHECK_SQLSETCURSORNAMEW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( cursor_name, name_length, statement -> connection ); ret = SQLSETCURSORNAMEW( statement -> connection, statement -> driver_stmt, s1, name_length ); if ( s1 ) free( s1 ); } else { if ( !CHECK_SQLSETCURSORNAME( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLSETCURSORNAME( statement -> connection, statement -> driver_stmt, cursor_name, name_length ); } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetDescField.c0100644000076400007640000001662010625610770017756 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetDescField.c,v 1.6 2007/05/25 16:42:32 lurcher Exp $ * * $Log: SQLSetDescField.c,v $ * Revision 1.6 2007/05/25 16:42:32 lurcher * Sync up * * Revision 1.5 2005/11/21 17:25:43 lurcher * A few DM fixes for Oracle's ODBC driver * * Revision 1.4 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2003/02/27 12:19:40 lurcher * * Add the A functions as well as the W * * Revision 1.2 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/17 16:29:39 nick * * More checks and autotest fixes * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:00 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetDescField.c,v $ $Revision: 1.6 $"; SQLRETURN SQLSetDescFieldA( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length ) { return SQLSetDescField( descriptor_handle, rec_number, field_identifier, value, buffer_length ); } SQLRETURN SQLSetDescField( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length ) { /* * not quite sure how the descriptor can be * allocated to a statement, all the documentation talks * about state transitions on statement states, but the * descriptor may be allocated with more than one statement * at one time. Which one should I check ? */ DMHDESC descriptor = (DMHDESC) descriptor_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check descriptor */ if ( !__validate_desc( descriptor )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( descriptor ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tEntry:\ \n\t\t\tDescriptor = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tField Ident = %s\ \n\t\t\tValue = %p\ \n\t\t\tBuffer Length = %d", descriptor, rec_number, __desc_attr_as_string( s1, field_identifier ), value, (int)buffer_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } thread_protect( SQL_HANDLE_DESC, descriptor ); if ( descriptor -> connection -> state < STATE_C4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &descriptor -> error, ERROR_HY010, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } if ( CHECK_SQLSETDESCFIELD( descriptor -> connection )) { ret = SQLSETDESCFIELD( descriptor -> connection, descriptor -> driver_desc, rec_number, field_identifier, value, buffer_length ); } else if ( CHECK_SQLSETDESCFIELDW( descriptor -> connection )) { SQLWCHAR *s1 = NULL; if (field_identifier == SQL_DESC_NAME) { s1 = ansi_to_unicode_alloc( value, buffer_length, descriptor -> connection); } else { s1 = value; } ret = SQLSETDESCFIELDW( descriptor -> connection, descriptor -> driver_desc, rec_number, field_identifier, s1, buffer_length ); if (field_identifier == SQL_DESC_NAME) { if (s1) free(s1); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } return function_return( SQL_HANDLE_DESC, descriptor, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetDescRec.c0100644000076400007640000001207107750253176017450 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetDescRec.c,v 1.3 2003/10/30 18:20:46 lurcher Exp $ * * $Log: SQLSetDescRec.c,v $ * Revision 1.3 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.3 2001/04/17 16:29:39 nick * * More checks and autotest fixes * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.5 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetDescRec.c,v $ $Revision: 1.3 $"; SQLRETURN SQLSetDescRec( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT type, SQLSMALLINT subtype, SQLLEN length, SQLSMALLINT precision, SQLSMALLINT scale, SQLPOINTER data, SQLLEN *string_length, SQLLEN *indicator ) { /* * not quite sure how the descriptor can be * allocated to a statement, all the documentation talks * about state transitions on statement states, but the * descriptor may be allocated with more than one statement * at one time. Which one should I check ? */ DMHDESC descriptor = (DMHDESC) descriptor_handle; SQLRETURN ret; /* * check descriptor */ if ( !__validate_desc( descriptor )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( descriptor ); thread_protect( SQL_HANDLE_DESC, descriptor ); if ( descriptor -> connection -> state < STATE_C4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &descriptor -> error, ERROR_HY010, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } if ( !CHECK_SQLSETDESCREC( descriptor -> connection )) { __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } ret = SQLSETDESCREC( descriptor -> connection, descriptor -> driver_desc, rec_number, type, subtype, length, precision, scale, data, string_length, indicator ); return function_return( SQL_HANDLE_DESC, descriptor, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetEnvAttr.c0100644000076400007640000002353110065530747017521 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetEnvAttr.c,v 1.7 2004/06/21 10:01:11 lurcher Exp $ * * $Log: SQLSetEnvAttr.c,v $ * Revision 1.7 2004/06/21 10:01:11 lurcher * * Fix a couple of 64 bit issues * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2003/03/05 09:48:45 lurcher * * Add some 64 bit fixes * * Revision 1.4 2003/01/23 15:33:25 lurcher * * Fix problems with using putenv() * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/02/21 18:44:09 lurcher * * Fix bug on 32 bit platforms without long long support * Add option to set environment variables from the ini file * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.5 2001/09/27 17:05:48 nick * * Assorted fixes and tweeks * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/14 18:10:19 nick * * Add connection pooling * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetEnvAttr.c,v $ $Revision: 1.7 $"; SQLRETURN SQLSetEnvAttr( SQLHENV environment_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER string_length ) { DMHENV environment = (DMHENV) environment_handle; SQLCHAR s0[ 20 ], s1[ 100 + LOG_MESSAGE_LEN ]; /* * we may do someting with these later */ if ( !environment_handle && ( attribute == SQL_ATTR_CONNECTION_POOLING || attribute == SQL_ATTR_CP_MATCH )) { return SQL_SUCCESS; } /* * check environment */ if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tAttribute = %s\ \n\t\t\tValue = %p\ \n\t\t\tStrLen = %d", environment, __env_attr_as_string( s1, attribute ), value, (int)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_protect( SQL_HANDLE_ENV, environment ); switch ( attribute ) { case SQL_ATTR_CONNECTION_POOLING: { long int ptr = (long int) value; if ( ptr != SQL_CP_OFF && ptr != SQL_CP_ONE_PER_DRIVER && ptr != SQL_CP_ONE_PER_HENV ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY024" ); __post_internal_error( &environment -> error, ERROR_HY024, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } environment -> connection_pooling = ptr; } break; case SQL_ATTR_CP_MATCH: { long int ptr = (long int) value; if ( ptr != SQL_CP_STRICT_MATCH && ptr != SQL_CP_RELAXED_MATCH ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY024" ); __post_internal_error( &environment -> error, ERROR_HY024, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } environment -> cp_match = ptr; } break; case SQL_ATTR_ODBC_VERSION: { long int ptr = (long int) value; if ( ptr != SQL_OV_ODBC2 && ptr != SQL_OV_ODBC3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY024" ); __post_internal_error( &environment -> error, ERROR_HY024, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } else { if ( environment -> connection_count > 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1010" ); __post_internal_error( &environment -> error, ERROR_S1010, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } environment -> requested_version = ptr; } } break; case SQL_ATTR_OUTPUT_NTS: { long int ptr = (long int) value; /* * this must be one of the most brain dead atribute, * it can be set, but only to TRUE, any other value * (ie FALSE) returns a error. Its almost as if its not * settable :-) */ if ( ptr == SQL_FALSE ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HYC00" ); __post_internal_error( &environment -> error, ERROR_HYC00, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } } break; /* * unixODBC additions */ case SQL_ATTR_UNIXODBC_ENVATTR: if ( value ) { char *str = (char*) value; /* * its a memory leak, but not much I can do, see "man putenv" */ putenv( strdup( str )); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } break; default: dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &environment -> error, ERROR_HY092, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } return function_return( SQL_HANDLE_ENV, environment, SQL_SUCCESS ); } unixODBC-2.2.14-p2/DriverManager/SQLSetParam.c0100644000076400007640000002206010233377203017163 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetParam.c,v 1.6 2005/04/26 08:40:35 lurcher Exp $ * * $Log: SQLSetParam.c,v $ * Revision 1.6 2005/04/26 08:40:35 lurcher * * Add data type mapping for SQLSetPos. * Remove out of date macro in sqlext.h * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/19 09:11:49 lurcher * * Fix Maxor ineffiecny in Postgres Drivers, and fix a return state * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/10/29 21:07:40 ngorham * * Fix some stupid bugs in the DM * Make the postgres driver work via unix sockets * * Revision 1.6 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:25 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.4 1999/06/03 22:20:25 ngorham * * Finished off the ODBC3-2 mapping * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:21 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetParam.c,v $ $Revision: 1.6 $"; SQLRETURN SQLSetParam( SQLHSTMT statement_handle, SQLUSMALLINT parameter_number, SQLSMALLINT value_type, SQLSMALLINT parameter_type, SQLULEN length_precision, SQLSMALLINT parameter_scale, SQLPOINTER parameter_value, SQLLEN *strlen_or_ind ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tParam Number = %d\ \n\t\t\tValue Type = %d %s\ \n\t\t\tParameter Type = %d %s\ \n\t\t\tLength Precision = %d\ \n\t\t\tParameter Scale = %d\ \n\t\t\tParameter Value = %p\ \n\t\t\tStrLen Or Ind = %p", statement, parameter_number, value_type, __c_as_text( value_type ), parameter_type, __sql_as_text( parameter_type ), (int)length_precision, (int)parameter_scale, (void*)parameter_value, (void*)strlen_or_ind ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( parameter_number < 1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error_api( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version, SQL_API_SQLSETPARAM ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( CHECK_SQLSETPARAM( statement -> connection )) { ret = SQLSETPARAM( statement -> connection, statement -> driver_stmt, parameter_number, __map_type(MAP_C_DM2D,statement->connection,value_type), __map_type(MAP_SQL_DM2D,statement->connection,parameter_type), length_precision, parameter_scale, parameter_value, strlen_or_ind ); } else if ( CHECK_SQLBINDPARAMETER( statement -> connection )) { ret = SQLBINDPARAMETER( statement -> connection, statement -> driver_stmt, parameter_number, SQL_PARAM_INPUT_OUTPUT, __map_type(MAP_C_DM2D,statement->connection,value_type), __map_type(MAP_SQL_DM2D,statement->connection,parameter_type), length_precision, parameter_scale, parameter_value, SQL_SETPARAM_VALUE_MAX, strlen_or_ind ); } else if ( CHECK_SQLBINDPARAM( statement -> connection )) { ret = SQLBINDPARAM( statement -> connection, statement -> driver_stmt, parameter_number, __map_type(MAP_C_DM2D,statement->connection,value_type), __map_type(MAP_SQL_DM2D,statement->connection,parameter_type), length_precision, parameter_scale, parameter_value, strlen_or_ind ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetPos.c0100644000076400007640000002214507750253176016704 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetPos.c,v 1.4 2003/10/30 18:20:46 lurcher Exp $ * * $Log: SQLSetPos.c,v $ * Revision 1.4 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/10/29 21:07:40 ngorham * * Fix some stupid bugs in the DM * Make the postgres driver work via unix sockets * * Revision 1.6 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:26 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/05/04 22:41:12 nick * and another night ends * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetPos.c,v $ $Revision: 1.4 $"; SQLRETURN SQLSetPos( SQLHSTMT statement_handle, SQLSETPOSIROW irow, SQLUSMALLINT foption, SQLUSMALLINT flock ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tIrow = %d\ \n\t\t\tFoption = %d\ \n\t\t\tFlock = %d", statement, irow, foption, flock ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( foption != SQL_POSITION && foption != SQL_REFRESH && foption != SQL_UPDATE && foption != SQL_DELETE && foption != SQL_ADD ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &statement -> error, ERROR_HY092, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( flock != SQL_LOCK_NO_CHANGE && flock != SQL_LOCK_EXCLUSIVE && flock != SQL_LOCK_UNLOCK ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &statement -> error, ERROR_HY092, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLSETPOS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( !CHECK_SQLSETPOS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLSETPOS( statement -> connection, statement -> driver_stmt, irow, foption, flock ); if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLSETPOS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( SQL_SUCCEEDED( ret )) { } else if ( ret == SQL_NEED_DATA ) { statement -> interupted_func = SQL_API_SQLSETPOS; statement -> interupted_state = statement -> state; statement -> state = STATE_S8; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetScrollOptions.c0100644000076400007640000004260010546431646020750 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetScrollOptions.c,v 1.8 2007/01/02 10:27:50 lurcher Exp $ * * $Log: SQLSetScrollOptions.c,v $ * Revision 1.8 2007/01/02 10:27:50 lurcher * Fix descriptor leak with unicode only driver * * Revision 1.7 2005/11/23 08:29:16 lurcher * Add cleanup in postgres driver * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/01/15 10:31:34 lurcher * * Fix invalid diag message * * Revision 1.3 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.2 2001/12/04 10:16:59 lurcher * * Fix SQLSetScrollOption problem * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:26 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:08 sShandyb * first go at it * * Revision 1.5 1999/06/03 22:20:25 ngorham * * Finished off the ODBC3-2 mapping * * Revision 1.4 1999/06/02 23:48:45 ngorham * * Added more 3-2 mapping * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:21 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetScrollOptions.c,v $ $Revision: 1.8 $"; SQLRETURN SQLSetScrollOptions( SQLHSTMT statement_handle, SQLUSMALLINT f_concurrency, SQLLEN crow_keyset, SQLUSMALLINT crow_rowset ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tConcurrency = %d\ \n\t\t\tKeyset = %d\ \n\t\t\tRowset = %d", statement, f_concurrency, (int)crow_keyset, crow_rowset ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( statement -> state != STATE_S1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1010" ); __post_internal_error( &statement -> error, ERROR_S1010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( crow_keyset != SQL_SCROLL_FORWARD_ONLY && crow_keyset != SQL_SCROLL_STATIC && crow_keyset != SQL_SCROLL_KEYSET_DRIVEN && crow_keyset != SQL_SCROLL_DYNAMIC ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1107" ); __post_internal_error( &statement -> error, ERROR_S1107, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( f_concurrency != SQL_CONCUR_READ_ONLY && f_concurrency != SQL_CONCUR_LOCK && f_concurrency != SQL_CONCUR_ROWVER && f_concurrency != SQL_CONCUR_VALUES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1108" ); __post_internal_error( &statement -> error, ERROR_S1108, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( CHECK_SQLSETSCROLLOPTIONS( statement -> connection )) { ret = SQLSETSCROLLOPTIONS( statement -> connection, statement -> driver_stmt, f_concurrency, crow_keyset, crow_rowset ); } else if ( statement -> connection -> driver_act_ver == SQL_OV_ODBC3 && (CHECK_SQLGETINFO( statement -> connection ) || CHECK_SQLGETINFOW( statement -> connection )) && (CHECK_SQLSETSTMTATTR( statement -> connection ) || CHECK_SQLSETSTMTATTRW( statement -> connection ))) { SQLINTEGER info_type, ivp; switch( crow_keyset ) { case SQL_SCROLL_FORWARD_ONLY: info_type = SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2; break; case SQL_SCROLL_STATIC: info_type = SQL_STATIC_CURSOR_ATTRIBUTES2; break; case SQL_SCROLL_KEYSET_DRIVEN: info_type = SQL_KEYSET_CURSOR_ATTRIBUTES2; break; case SQL_SCROLL_DYNAMIC: info_type = SQL_DYNAMIC_CURSOR_ATTRIBUTES2; break; default: if ( crow_keyset > crow_rowset ) { info_type = SQL_KEYSET_CURSOR_ATTRIBUTES2; } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1107" ); __post_internal_error( &statement -> error, ERROR_S1107, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } break; } ret = __SQLGetInfo( statement -> connection, info_type, &ivp, sizeof( ivp ), 0 ); if( !SQL_SUCCEEDED( ret )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQLGetInfo fails" ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( f_concurrency == SQL_CONCUR_READ_ONLY && !( ivp & SQL_CA2_READ_ONLY_CONCURRENCY )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1C00" ); __post_internal_error( &statement -> error, ERROR_S1C00, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( f_concurrency == SQL_CONCUR_LOCK && !( ivp & SQL_CA2_LOCK_CONCURRENCY )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1C00" ); __post_internal_error( &statement -> error, ERROR_S1C00, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( f_concurrency == SQL_CONCUR_ROWVER && !( ivp & SQL_CA2_OPT_ROWVER_CONCURRENCY )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1C00" ); __post_internal_error( &statement -> error, ERROR_S1C00, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( f_concurrency == SQL_CONCUR_VALUES && !( ivp & SQL_CA2_OPT_VALUES_CONCURRENCY )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1C00" ); __post_internal_error( &statement -> error, ERROR_S1C00, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( f_concurrency != SQL_CONCUR_READ_ONLY && f_concurrency != SQL_CONCUR_LOCK && f_concurrency != SQL_CONCUR_ROWVER && f_concurrency != SQL_CONCUR_VALUES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1108" ); __post_internal_error( &statement -> error, ERROR_S1108, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if(CHECK_SQLSETSTMTATTR( statement -> connection )) { ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, SQL_ATTR_CONCURRENCY, f_concurrency, 0 ); } else if ( CHECK_SQLSETSTMTATTRW( statement -> connection )) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, SQL_ATTR_CONCURRENCY, f_concurrency, 0 ); } if ( !SQL_SUCCEEDED( ret )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQLSetStmtAttr fails" ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } switch( crow_keyset ) { case SQL_SCROLL_FORWARD_ONLY: info_type = SQL_CURSOR_FORWARD_ONLY; break; case SQL_SCROLL_STATIC: info_type = SQL_CURSOR_STATIC; break; case SQL_SCROLL_KEYSET_DRIVEN: info_type = SQL_CURSOR_KEYSET_DRIVEN; break; case SQL_SCROLL_DYNAMIC: info_type = SQL_CURSOR_DYNAMIC; break; default: if ( crow_keyset > crow_rowset ) { info_type = SQL_CURSOR_KEYSET_DRIVEN; } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1107" ); __post_internal_error( &statement -> error, ERROR_S1107, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } break; } if(CHECK_SQLSETSTMTATTR( statement -> connection )) { ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, SQL_ATTR_CURSOR_TYPE, info_type, 0 ); } else if(CHECK_SQLSETSTMTATTRW( statement -> connection )) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, SQL_ATTR_CURSOR_TYPE, info_type, 0 ); } if ( !SQL_SUCCEEDED( ret )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQLSetStmtAttr fails" ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( crow_keyset > 0 ) { if(CHECK_SQLSETSTMTATTR( statement -> connection )) { ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, SQL_ATTR_KEYSET_SIZE, crow_keyset, 0 ); } else if(CHECK_SQLSETSTMTATTRW( statement -> connection )) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, SQL_ATTR_KEYSET_SIZE, crow_keyset, 0 ); } if ( !SQL_SUCCEEDED( ret )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQLSetStmtAttr fails" ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if(CHECK_SQLSETSTMTATTR( statement -> connection )) { ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, SQL_ROWSET_SIZE, crow_rowset, 0 ); } else if(CHECK_SQLSETSTMTATTRW( statement -> connection )) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, SQL_ROWSET_SIZE, crow_rowset, 0 ); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetStmtAttr.c0100644000076400007640000006341010731472737017724 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetStmtAttr.c,v 1.14 2007/12/17 13:13:03 lurcher Exp $ * * $Log: SQLSetStmtAttr.c,v $ * Revision 1.14 2007/12/17 13:13:03 lurcher * Fix a couple of descriptor typo's * * Revision 1.13 2007/02/12 11:49:34 lurcher * Add QT4 support to existing GUI parts * * Revision 1.12 2006/04/27 16:39:50 lurcher * fix missing return from SQLSetStmtAttr changes * * Revision 1.11 2006/04/24 08:42:10 lurcher * Handle resetting statement descriptors to implicit values, by passing in NULL or the implicit descrptor to SQLSetStmtAttr with the attribute SQL_ATTR_APP_PARAM_DESC or SQL_ATTR_APP_ROW_DESC. Also catch trying to call SQLGetDescField on a closed connection * * Revision 1.10 2005/11/23 08:29:16 lurcher * Add cleanup in postgres driver * * Revision 1.9 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.8 2003/03/05 09:48:45 lurcher * * Add some 64 bit fixes * * Revision 1.7 2003/02/27 12:19:40 lurcher * * Add the A functions as well as the W * * Revision 1.6 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.5 2002/09/18 14:49:32 lurcher * * DataManagerII additions and some more threading fixes * * Revision 1.3 2002/07/16 13:08:18 lurcher * * Filter attribute values from SQLSetStmtAttr to SQLSetStmtOption to fit * within ODBC 2 * Make DSN's double clickable in ODBCConfig * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.8 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.7 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.6 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.5 2001/03/28 14:57:22 nick * * Fix bugs in corsor lib introduced bu UNCODE and other changes * * Revision 1.4 2001/01/09 22:33:13 nick * * Stop passing NULL into SQLExtendedFetch * Further fixes to unicode to ansi conversions * * Revision 1.3 2000/12/18 12:53:29 nick * * More pooling tweeks * * Revision 1.2 2000/11/22 19:03:40 nick * * Fix problem with error status in SQLSpecialColumns * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.11 2000/06/24 18:45:09 ngorham * * Fix for SQLExtendedFetch on big endian platforms. the row count pointer * was declared as a small not a int. * * Revision 1.10 2000/06/20 13:30:10 ngorham * * Fix problems when using bookmarks * * Revision 1.9 2000/02/11 00:41:46 ngorham * * Added a couple of fixes for drivers without SQLExtendedFetch * * Revision 1.8 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.6 1999/09/21 22:34:26 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/09/19 22:24:34 ngorham * * Added support for the cursor library * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:09 sShandyb * first go at it * * Revision 1.6 1999/06/04 16:29:00 ngorham * * Added chack that SQLSetStmtAttr exists in the driver before calling it * * Revision 1.5 1999/06/03 22:20:25 ngorham * * Finished off the ODBC3-2 mapping * * Revision 1.4 1999/06/02 23:48:45 ngorham * * Added more 3-2 mapping * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:21 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetStmtAttr.c,v $ $Revision: 1.14 $"; SQLRETURN SQLSetStmtAttrA( SQLHSTMT statement_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER string_length ) { return SQLSetStmtAttr( statement_handle, attribute, value, string_length ); } SQLRETURN SQLSetStmtAttr( SQLHSTMT statement_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER string_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tAttribute = %s\ \n\t\t\tValue = %p\ \n\t\t\tStrLen = %d", statement, __stmt_attr_as_string( s1, attribute ), value, (int)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( attribute == SQL_ATTR_CONCURRENCY || attribute == SQL_ATTR_CURSOR_TYPE || attribute == SQL_ATTR_SIMULATE_CURSOR || attribute == SQL_ATTR_USE_BOOKMARKS || attribute == SQL_ATTR_CURSOR_SCROLLABLE || attribute == SQL_ATTR_CURSOR_SENSITIVITY ) { if ( statement -> state == STATE_S2 || statement -> state == STATE_S3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY011" ); __post_internal_error( &statement -> error, ERROR_HY011, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S4 || statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> prepared ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY011" ); __post_internal_error( &statement -> error, ERROR_HY011, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } } else { if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( (!CHECK_SQLSETSTMTATTR( statement -> connection ) && !CHECK_SQLSETSTMTATTRW( statement -> connection )) && !CHECK_SQLSETSTMTOPTION( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * map descriptors to our copies */ if ( attribute == SQL_ATTR_APP_ROW_DESC ) { DMHDESC desc = ( DMHDESC ) value; /* * needs to reset to implicit descriptor, this is safe * without a validate, as the value is either null, or the * same as a descriptor we know is valid */ if ( desc == NULL || desc == statement -> implicit_ard ) { DRV_SQLHDESC drv_desc = NULL; ret = SQL_SUCCESS; if ( desc == statement -> implicit_ard ) { drv_desc = statement -> implicit_ard -> driver_desc; } if ( CHECK_SQLSETSTMTATTR( statement -> connection )) { ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, attribute, drv_desc, 0 ); } else if ( CHECK_SQLSETSTMTATTRW( statement -> connection )) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, attribute, statement -> implicit_ard -> driver_desc, 0 ); } else { ret = SQLSETSTMTOPTION( statement -> connection, statement -> driver_stmt, attribute, statement -> implicit_ard -> driver_desc ); } if ( ret != SQL_SUCCESS ) { if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } /* * copy DM descriptor */ statement -> apd = statement -> implicit_apd; if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } if ( !__validate_desc( desc )) { thread_release( SQL_HANDLE_STMT, statement ); sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_INVALID_HANDLE, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); return SQL_INVALID_HANDLE; } if ( desc -> implicit && desc != statement -> implicit_ard ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY017" ); __post_internal_error( &statement -> error, ERROR_HY017, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( desc -> connection != statement -> connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY024" ); __post_internal_error( &statement -> error, ERROR_HY024, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * set the value to the driver descriptor handle */ value = ( SQLPOINTER ) desc -> driver_desc; statement -> ard = desc; } if ( attribute == SQL_ATTR_APP_PARAM_DESC ) { DMHDESC desc = ( DMHDESC ) value; /* * needs to reset to implicit descriptor, this is safe * without a validate, as the value is either null, or the * same as a descriptor we know is valid */ if ( desc == NULL || desc == statement -> implicit_apd ) { DRV_SQLHDESC drv_desc = NULL; ret = SQL_SUCCESS; if ( desc == statement -> implicit_apd ) { drv_desc = statement -> implicit_apd -> driver_desc; } if ( CHECK_SQLSETSTMTATTR( statement -> connection )) { ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, attribute, statement -> implicit_apd -> driver_desc, 0 ); } else if ( CHECK_SQLSETSTMTATTRW( statement -> connection )) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, attribute, statement -> implicit_apd -> driver_desc, 0 ); } else { ret = SQLSETSTMTOPTION( statement -> connection, statement -> driver_stmt, attribute, drv_desc ); } if ( ret != SQL_SUCCESS ) { if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } /* * copy DM descriptor */ statement -> apd = statement -> implicit_apd; if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } if ( !__validate_desc( desc )) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_INVALID_HANDLE, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); thread_release( SQL_HANDLE_STMT, statement ); return SQL_INVALID_HANDLE; } if ( desc -> implicit && desc != statement -> implicit_apd ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY017" ); __post_internal_error( &statement -> error, ERROR_HY017, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( desc -> connection != statement -> connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY024" ); __post_internal_error( &statement -> error, ERROR_HY024, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * set the value to the driver descriptor handle */ value = ( SQLPOINTER ) desc -> driver_desc; statement -> apd = desc; } /* * save for internal use */ if ( attribute == SQL_ATTR_METADATA_ID ) { statement -> metadata_id = (SQLLEN) value; } /* * is it something overridden */ value = __attr_override( statement, SQL_HANDLE_STMT, attribute, value, &string_length ); /* * does the call need mapping from 3 to 2 */ if ( attribute == SQL_ATTR_FETCH_BOOKMARK_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && CHECK_SQLEXTENDEDFETCH( statement -> connection ) && !CHECK_SQLFETCHSCROLL( statement -> connection )) { statement -> fetch_bm_ptr = (SQLUINTEGER*) value; /* * pass on if required */ if ( statement -> connection -> cl_handle ) { if ( CHECK_SQLSETSTMTATTR( statement -> connection )) { SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, attribute, value, string_length ); } else { ret = SQLSETSTMTOPTION( statement -> connection, statement -> driver_stmt, attribute, value ); } } ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_ROW_STATUS_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 ) { statement -> row_st_arr = (SQLUSMALLINT*) value; /* * pass on if required */ if ( statement -> connection -> cl_handle ) { if ( CHECK_SQLSETSTMTATTR( statement -> connection )) { SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, attribute, value, string_length ); } else if ( CHECK_SQLSETSTMTATTRW( statement -> connection )) { SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, attribute, value, string_length ); } else { ret = SQLSETSTMTOPTION( statement -> connection, statement -> driver_stmt, attribute, value ); } } ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_ROWS_FETCHED_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 ) { statement -> row_ct_ptr = (SQLUINTEGER*) value; /* * pass on if required */ if ( statement -> connection -> cl_handle ) { if ( CHECK_SQLSETSTMTATTR( statement -> connection )) { SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, attribute, value, string_length ); } else if ( CHECK_SQLSETSTMTATTRW( statement -> connection )) { SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, attribute, value, string_length ); } else { ret = SQLSETSTMTOPTION( statement -> connection, statement -> driver_stmt, attribute, value ); } } ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_ROW_ARRAY_SIZE && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 ) { /* * save this in case we need it in SQLExtendedFetch */ statement -> row_array_size = (SQLULEN) value; if ( CHECK_SQLSETSTMTATTR( statement -> connection )) { ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, SQL_ROWSET_SIZE, value, string_length ); } else if ( CHECK_SQLSETSTMTATTRW( statement -> connection )) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, SQL_ROWSET_SIZE, value, string_length ); } else { ret = SQLSETSTMTOPTION( statement -> connection, statement -> driver_stmt, SQL_ROWSET_SIZE, value ); } } else if ( CHECK_SQLSETSTMTATTR( statement -> connection )) { ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, attribute, value, string_length ); } else if ( CHECK_SQLSETSTMTATTRW( statement -> connection )) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, attribute, value, string_length ); } else { /* * Is it in the legal range of values */ if ( attribute < SQL_STMT_DRIVER_MIN && ( attribute > SQL_ROW_NUMBER || attribute < SQL_QUERY_TIMEOUT )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &statement -> error, ERROR_HY092, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLSETSTMTOPTION( statement -> connection, statement -> driver_stmt, attribute, value ); } /* * take notice of this */ if ( attribute == SQL_ATTR_USE_BOOKMARKS && SQL_SUCCEEDED( ret )) { statement -> bookmarks_on = (SQLULEN) value; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetStmtOption.c0100644000076400007640000003112210723524737020254 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetStmtOption.c,v 1.8 2007/11/29 12:00:31 lurcher Exp $ * * $Log: SQLSetStmtOption.c,v $ * Revision 1.8 2007/11/29 12:00:31 lurcher * Add 64 bit type changes to SQLExtendedFetch etc * * Revision 1.7 2005/11/23 08:29:16 lurcher * Add cleanup in postgres driver * * Revision 1.6 2005/04/05 09:11:31 lurcher * The config string being passed into ConfigDsn was wrong, removed semicolon, and added terminating double null * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/03/05 09:48:45 lurcher * * Add some 64 bit fixes * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.4 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 2000/06/20 13:30:12 ngorham * * Fix problems when using bookmarks * * Revision 1.7 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:26 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:09 sShandyb * first go at it * * Revision 1.4 1999/06/03 22:20:25 ngorham * * Finished off the ODBC3-2 mapping * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:21 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetStmtOption.c,v $ $Revision: 1.8 $"; SQLRETURN SQLSetStmtOptionA( SQLHSTMT statement_handle, SQLUSMALLINT option, SQLULEN value ) { return SQLSetStmtOption( statement_handle, option, value ); } SQLRETURN SQLSetStmtOption( SQLHSTMT statement_handle, SQLUSMALLINT option, SQLULEN value ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tOption = %s\ \n\t\t\tValue = %d", statement, __stmt_attr_as_string( s1, option ), (int)value ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( option == SQL_CONCURRENCY || option == SQL_CURSOR_TYPE || option == SQL_SIMULATE_CURSOR || option == SQL_USE_BOOKMARKS ) { if ( statement -> state == STATE_S2 || statement -> state == STATE_S3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1011" ); __post_internal_error( &statement -> error, ERROR_S1011, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S4 || statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> prepared ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1011" ); __post_internal_error( &statement -> error, ERROR_S1011, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1010" ); __post_internal_error( &statement -> error, ERROR_S1010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } } else { if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1010" ); __post_internal_error( &statement -> error, ERROR_S1010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * is it something overridden */ value = (SQLULEN) __attr_override( statement, SQL_HANDLE_STMT, option, (void*) value, NULL ); if ( CHECK_SQLSETSTMTOPTION( statement -> connection )) { ret = SQLSETSTMTOPTION( statement -> connection, statement -> driver_stmt, option, value ); } else if ( CHECK_SQLSETSTMTATTR( statement -> connection )) { switch ( option ) { case SQL_ATTR_APP_PARAM_DESC: if ( value ) memcpy( &statement -> apd, (void*)value, sizeof( statement -> apd )); ret = SQL_SUCCESS; break; case SQL_ATTR_APP_ROW_DESC: if ( value ) memcpy( &statement -> ard, (void*)value, sizeof( statement -> ard )); ret = SQL_SUCCESS; break; case SQL_ATTR_IMP_PARAM_DESC: if ( value ) memcpy( &statement -> ipd, (void*)value, sizeof( statement -> ipd )); ret = SQL_SUCCESS; break; case SQL_ATTR_IMP_ROW_DESC: if ( value ) memcpy( &statement -> ird, (void*)value, sizeof( statement -> ird )); ret = SQL_SUCCESS; break; default: ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, option, value, SQL_NTS ); break; } } else if ( CHECK_SQLSETSTMTATTRW( statement -> connection )) { switch ( option ) { case SQL_ATTR_APP_PARAM_DESC: if ( value ) memcpy( &statement -> apd, (void*)value, sizeof( statement -> apd )); ret = SQL_SUCCESS; break; case SQL_ATTR_APP_ROW_DESC: if ( value ) memcpy( &statement -> ard, (void*)value, sizeof( statement -> ard )); ret = SQL_SUCCESS; break; case SQL_ATTR_IMP_PARAM_DESC: if ( value ) memcpy( &statement -> ipd, (void*)value, sizeof( statement -> ipd )); ret = SQL_SUCCESS; break; case SQL_ATTR_IMP_ROW_DESC: if ( value ) memcpy( &statement -> ird, (void*)value, sizeof( statement -> ird )); ret = SQL_SUCCESS; break; default: ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, option, value, SQL_NTS ); break; } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * take notice of this */ if ( option == SQL_USE_BOOKMARKS && SQL_SUCCEEDED( ret )) { statement -> bookmarks_on = (SQLUINTEGER) value; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSpecialColumns.c0100644000076400007640000003335010000467337020374 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSpecialColumns.c,v 1.6 2004/01/12 09:54:39 lurcher Exp $ * * $Log: SQLSpecialColumns.c,v $ * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:40 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.6 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.5 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.4 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.3 2000/12/05 16:49:21 nick * * Add missing identifier_type in SQLSpecialColumns log * * Revision 1.2 2000/11/22 19:03:40 nick * * Fix problem with error status in SQLSpecialColumns * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:26 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:56 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:09 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSpecialColumns.c,v $ $Revision: 1.6 $"; SQLRETURN SQLSpecialColumnsA( SQLHSTMT statement_handle, SQLUSMALLINT identifier_type, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLUSMALLINT scope, SQLUSMALLINT nullable ) { return SQLSpecialColumns( statement_handle, identifier_type, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, scope, nullable ); } SQLRETURN SQLSpecialColumns( SQLHSTMT statement_handle, SQLUSMALLINT identifier_type, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLUSMALLINT scope, SQLUSMALLINT nullable ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tIdentifier Type = %d\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s\ \n\t\t\tScope = %d\ \n\t\t\tNullable = %d", statement, identifier_type, __string_with_length( s1, catalog_name, name_length1 ), __string_with_length( s2, schema_name, name_length2 ), __string_with_length( s3, table_name, name_length3 ), scope, nullable ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> metadata_id == SQL_TRUE && schema_name == NULL ) { __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( table_name == NULL ) { __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length3 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS )) { __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( identifier_type != SQL_BEST_ROWID && identifier_type != SQL_ROWVER ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY097" ); __post_internal_error( &statement -> error, ERROR_HY097, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( scope != SQL_SCOPE_CURROW && scope != SQL_SCOPE_TRANSACTION && scope != SQL_SCOPE_SESSION ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY098" ); __post_internal_error( &statement -> error, ERROR_HY098, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( nullable != SQL_NO_NULLS && nullable != SQL_NULLABLE ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY099" ); __post_internal_error( &statement -> error, ERROR_HY099, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 2400" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLSPECIALCOLUMNS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1, *s2, *s3; if ( !CHECK_SQLSPECIALCOLUMNSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( catalog_name, name_length1, statement -> connection ); s2 = ansi_to_unicode_alloc( schema_name, name_length2, statement -> connection ); s3 = ansi_to_unicode_alloc( table_name, name_length3, statement -> connection ); ret = SQLSPECIALCOLUMNSW( statement -> connection , statement -> driver_stmt, identifier_type, s1, name_length1, s2, name_length2, s3, name_length3, scope, nullable ); if( s1 ) free( s1 ); if( s2 ) free( s2 ); if( s3 ) free( s3 ); } else { if ( !CHECK_SQLSPECIALCOLUMNS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLSPECIALCOLUMNS( statement -> connection , statement -> driver_stmt, identifier_type, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, scope, nullable ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* ret = SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); */ statement -> numcols = 1; /******/ #endif statement -> hascols = 1; statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLSPECIALCOLUMNS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLStatistics.c0100644000076400007640000003063210201674143017603 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLStatistics.c,v 1.7 2005/02/07 14:17:07 lurcher Exp $ * * $Log: SQLStatistics.c,v $ * Revision 1.7 2005/02/07 14:17:07 lurcher * Fix small typo in SQLStatistics * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:40 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:26 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:56 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:09 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLStatistics.c,v $ $Revision: 1.7 $"; SQLRETURN SQLStatisticsA( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLUSMALLINT unique, SQLUSMALLINT reserved ) { return SQLStatistics( statement_handle, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, unique, reserved ); } SQLRETURN SQLStatistics( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLUSMALLINT unique, SQLUSMALLINT reserved ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s\ \n\t\t\tUnique = %d\ \n\t\t\tReserved = %d", statement, __string_with_length( s1, catalog_name, name_length1 ), __string_with_length( s2, schema_name, name_length2 ), __string_with_length( s3, table_name, name_length3 ), unique, reserved ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length2 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( reserved != SQL_ENSURE && reserved != SQL_QUICK ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY101" ); __post_internal_error( &statement -> error, ERROR_HY101, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( unique != SQL_INDEX_UNIQUE && unique != SQL_INDEX_ALL ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY100" ); __post_internal_error( &statement -> error, ERROR_HY100, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLSTATISTICS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1, *s2, *s3; if ( !CHECK_SQLSTATISTICSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( catalog_name, name_length1, statement -> connection ); s2 = ansi_to_unicode_alloc( schema_name, name_length2, statement -> connection ); s3 = ansi_to_unicode_alloc( table_name, name_length3, statement -> connection ); ret = SQLSTATISTICSW( statement -> connection, statement -> driver_stmt, s1, name_length1, s2, name_length2, s3, name_length3, unique, reserved ); if( s1 ) free( s1 ); if( s2 ) free( s2 ); if( s3 ) free( s3 ); } else { if ( !CHECK_SQLSTATISTICS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLSTATISTICS( statement -> connection, statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, unique, reserved ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* ret = SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); */ statement -> numcols = 1; /******/ #endif statement -> hascols = 1; statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLSTATISTICS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLTablePrivileges.c0100644000076400007640000002612610461714174020544 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLTablePrivileges.c,v 1.7 2006/07/26 16:29:48 lurcher Exp $ * * $Log: SQLTablePrivileges.c,v $ * Revision 1.7 2006/07/26 16:29:48 lurcher * Fix unicode translation for SQLTablePrivileges * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:40 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:26 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:56 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:09 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/05/03 19:50:43 nick * Another check point * * Revision 1.2 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLTablePrivileges.c,v $ $Revision: 1.7 $"; SQLRETURN SQLTablePrivilegesA( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_table_name, SQLSMALLINT cb_table_name ) { return SQLTablePrivileges( statement_handle, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_table_name, cb_table_name ); } SQLRETURN SQLTablePrivileges( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_table_name, SQLSMALLINT cb_table_name ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s", statement, __string_with_length( s1, sz_catalog_name, cb_catalog_name ), __string_with_length( s2, sz_schema_name, cb_schema_name ), __string_with_length( s3, sz_table_name, cb_table_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( cb_catalog_name < 0 && cb_catalog_name != SQL_NTS ) || ( cb_schema_name < 0 && cb_schema_name != SQL_NTS ) || ( cb_table_name < 0 && cb_table_name != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLTABLEPRIVILEGES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1, *s2, *s3; if ( !CHECK_SQLTABLEPRIVILEGESW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( sz_catalog_name, cb_catalog_name, statement -> connection ); s2 = ansi_to_unicode_alloc( sz_schema_name, cb_schema_name, statement -> connection ); s3 = ansi_to_unicode_alloc( sz_table_name, cb_table_name, statement -> connection ); ret = SQLTABLEPRIVILEGESW( statement -> connection , statement -> driver_stmt, s1, cb_catalog_name, s2, cb_schema_name, s3, cb_table_name ); if( s1 ) free( s1 ); if( s2 ) free( s2 ); if( s3 ) free( s3 ); } else { if ( !CHECK_SQLTABLEPRIVILEGES( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLTABLEPRIVILEGES( statement -> connection , statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_table_name, cb_table_name ); } if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLTABLEPRIVILEGES; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLTables.c0100644000076400007640000003016410000467337016665 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLTables.c,v 1.6 2004/01/12 09:54:39 lurcher Exp $ * * $Log: SQLTables.c,v $ * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/02/27 12:19:40 lurcher * * Add the A functions as well as the W * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 2000/08/16 14:31:11 ngorham * * Add fix for broken version of EXCEL * * Revision 1.7 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:26 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:56 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:09 sShandyb * first go at it * * Revision 1.2 1999/06/07 01:29:31 pharvey * *** empty log message *** * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.4 1999/05/03 19:50:43 nick * Another check point * * Revision 1.3 1999/04/30 16:22:47 nick * Another checkpoint * * Revision 1.2 1999/04/29 20:47:37 nick * Another checkpoint * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLTables.c,v $ $Revision: 1.6 $"; SQLRETURN SQLTablesA( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *table_type, SQLSMALLINT name_length4 ) { return SQLTables( statement_handle, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, table_type, name_length4 ); } SQLRETURN SQLTables( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *table_type, SQLSMALLINT name_length4 ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s\ \n\t\t\tTable Type = %s", statement, __string_with_length( s1, catalog_name, name_length1 ), __string_with_length( s2, schema_name, name_length2 ), __string_with_length( s3, table_name, name_length3 ), __string_with_length( s4, table_type, name_length4 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * this is a fix for old version of EXCEL */ if ( !catalog_name ) name_length1 = 0; if ( !schema_name ) name_length2 = 0; if ( !table_name ) name_length3 = 0; if ( !table_type ) name_length4 = 0; if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length2 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS ) || ( name_length4 < 0 && name_length4 != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLTABLES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver ) { SQLWCHAR *s1, *s2, *s3, *s4; if ( !CHECK_SQLTABLESW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } s1 = ansi_to_unicode_alloc( catalog_name, name_length1, statement -> connection ); s2 = ansi_to_unicode_alloc( schema_name, name_length2, statement -> connection ); s3 = ansi_to_unicode_alloc( table_name, name_length3, statement -> connection ); s4 = ansi_to_unicode_alloc( table_type, name_length4, statement -> connection ); ret = SQLTABLESW( statement -> connection , statement -> driver_stmt, s1, name_length1, s2, name_length2, s3, name_length3, s4, name_length4 ); if( s1 ) free( s1 ); if( s2 ) free( s2 ); if( s3 ) free( s3 ); if( s4 ) free( s4 ); } else { if ( !CHECK_SQLTABLES( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLTABLES( statement -> connection , statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, table_type, name_length4 ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* * There is no point in doing this as we can't trust the value * from SQLPrepare, so we can't perform checks on the column number * ret = SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); */ statement -> numcols = 1; /******/ #endif statement -> hascols = 1; statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLTABLES; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLTransact.c0100644000076400007640000004156410665536771017260 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLTransact.c,v 1.10 2007/08/30 12:54:17 lurcher Exp $ * * $Log: SQLTransact.c,v $ * Revision 1.10 2007/08/30 12:54:17 lurcher * Add -3 option to isql to use ODBC3 calls * * Revision 1.9 2006/05/31 17:35:34 lurcher * Add unicode ODBCINST entry points * * Revision 1.8 2004/06/16 14:42:03 lurcher * * * Fix potential corruption with threaded use and SQLEndTran * * Revision 1.7 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.6 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.5 2002/09/18 14:49:32 lurcher * * DataManagerII additions and some more threading fixes * * Revision 1.3 2002/08/20 12:41:07 lurcher * * Fix incorrect return state from SQLEndTran/SQLTransact * * Revision 1.2 2002/08/12 16:20:44 lurcher * * Make it try and find a working iconv set of encodings * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.10 2000/08/16 15:57:51 ngorham * * Fix bug where it falled if called in state C4 * * Revision 1.9 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.8 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.7 1999/10/20 19:45:15 ngorham * * Added fix to SQLTransact in the DM * * Revision 1.6 1999/09/21 22:34:26 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.5 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.4 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.3 1999/06/30 23:56:56 ngorham * * Add initial thread safety code * * Revision 1.2 1999/06/19 17:51:40 ngorham * * Applied assorted minor bug fixes * * Revision 1.1.1.1 1999/05/29 13:41:09 sShandyb * first go at it * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:21 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLTransact.c,v $ $Revision: 1.10 $"; SQLRETURN SQLTransact( SQLHENV environment_handle, SQLHDBC connection_handle, SQLUSMALLINT completion_type ) { SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; if ( connection_handle != SQL_NULL_HDBC ) { DMHDBC connection = (DMHDBC) connection_handle; SQLRETURN ret; if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tConnection = %p\ \n\t\t\tCompletion Type = %d", (void*)environment_handle, (void*)connection_handle, (int)completion_type ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C1 || connection -> state == STATE_C2 || connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( completion_type != SQL_COMMIT && completion_type != SQL_ROLLBACK ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY012" ); __post_internal_error( &connection -> error, ERROR_HY012, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( CHECK_SQLTRANSACT( connection )) { ret = SQLTRANSACT( connection, SQL_NULL_HENV, connection -> driver_dbc, completion_type ); } else if ( CHECK_SQLENDTRAN( connection )) { ret = SQLENDTRAN( connection, SQL_HANDLE_DBC, connection -> driver_dbc, completion_type ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if( SQL_SUCCEEDED(ret) ) { DMHSTMT statement; SQLINTEGER stmt_remaining; SQLSMALLINT cb_value; SQLSMALLINT cb_value_length = sizeof(SQLSMALLINT); SQLRETURN ret1; /* * for each statement belonging to this connection set its state * relative to the commit or rollback behavior */ if ( connection -> cbs_found == 0 ) { /* release thread so we can get the info */ thread_release( SQL_HANDLE_DBC, connection ); ret1 = SQLGetInfo(connection, SQL_CURSOR_COMMIT_BEHAVIOR, &connection -> ccb_value, sizeof( SQLSMALLINT ), &cb_value_length); if ( SQL_SUCCEEDED( ret1 )) { ret1 = SQLGetInfo(connection, SQL_CURSOR_ROLLBACK_BEHAVIOR, &connection -> crb_value, sizeof( SQLSMALLINT ), &cb_value_length); } /* protect thread again */ thread_protect( SQL_HANDLE_DBC, connection ); if ( SQL_SUCCEEDED( ret1 )) { connection -> cbs_found = 1; } } if( completion_type == SQL_COMMIT ) { cb_value = connection -> ccb_value; } else { cb_value = connection -> crb_value; } if( connection -> cbs_found ) { /* * We need to protect this at a higher level than connection * as statements can be coming and going */ mutex_lib_entry(); statement = __get_stmt_root(); stmt_remaining = connection -> statement_count; while ( statement && stmt_remaining > 0 ) { if ( statement -> connection == connection ) { if ( (statement -> state == STATE_S2 || statement -> state == STATE_S3) && cb_value == SQL_CB_DELETE ) { statement -> state = STATE_S1; statement -> prepared = 0; } else if ( statement -> state == STATE_S4 || statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) { if( !statement -> prepared && (cb_value == SQL_CB_DELETE || cb_value == SQL_CB_CLOSE) ) { statement -> state = STATE_S1; } else if( statement -> prepared ) { if( cb_value == SQL_CB_DELETE ) { statement -> state = STATE_S1; statement -> prepared = 0; } else if( cb_value == SQL_CB_CLOSE ) { if ( statement -> state == STATE_S4 ) statement -> state = STATE_S2; else statement -> state = STATE_S3; } } } stmt_remaining --; } statement = statement -> next_class_list; } mutex_lib_exit(); } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } else if ( environment_handle != SQL_NULL_HENV ) { DMHENV environment = (DMHENV) environment_handle; DMHDBC connection; SQLRETURN ret; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tConnection = %p\ \n\t\t\tCompletion Type = %d", (void*)environment_handle, (void*)connection_handle, (int)completion_type ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_protect( SQL_HANDLE_ENV, environment ); if ( environment -> state == STATE_E1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &environment -> error, ERROR_08003, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( completion_type != SQL_COMMIT && completion_type != SQL_ROLLBACK ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY012" ); __post_internal_error( &environment -> error, ERROR_HY012, NULL, environment -> requested_version ); thread_release( SQL_HANDLE_ENV, environment ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } /* * for each connection on this env */ connection = __get_dbc_root(); while( connection ) { if ( connection -> environment == environment && connection -> state > STATE_C4 ) { if ( CHECK_SQLTRANSACT( connection )) { ret = SQLTRANSACT( connection, SQL_NULL_HENV, connection -> driver_dbc, completion_type ); if ( !SQL_SUCCEEDED( ret )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24S01" ); __post_internal_error( &environment -> error, ERROR_25S01, NULL, environment -> requested_version ); thread_release( SQL_HANDLE_ENV, environment ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } } else if ( CHECK_SQLENDTRAN( connection )) { ret = SQLENDTRAN( connection, SQL_HANDLE_DBC, connection -> driver_dbc, completion_type ); if ( !SQL_SUCCEEDED( ret )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24S01" ); __post_internal_error( &environment -> error, ERROR_25S01, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &environment -> error, ERROR_IM001, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } } connection = connection -> next_class_list; } if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_release( SQL_HANDLE_ENV, environment ); return SQL_SUCCESS; } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } } unixODBC-2.2.14-p2/DriverManager/SQLBrowseConnectW.c0100644000076400007640000004572310706101555020364 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLBrowseConnectW.c,v 1.12 2007/10/19 10:14:05 lurcher Exp $ * * $Log: SQLBrowseConnectW.c,v $ * Revision 1.12 2007/10/19 10:14:05 lurcher * Pull errors from SQLBrowseConnect when it returns SQL_NEED_DATA * * Revision 1.11 2007/02/28 15:37:46 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.10 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.9 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.8 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.7 2002/08/15 08:10:33 lurcher * * Couple of small fixes from John L Miller * * Revision 1.6 2002/07/25 09:30:26 lurcher * * Additional unicode and iconv changes * * Revision 1.5 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.4 2002/02/08 17:59:40 lurcher * * Fix threading problem in SQLBrowseConnect * * Revision 1.3 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.7 2001/07/20 12:35:09 nick * * Fix SQLBrowseConnect operation * * Revision 1.6 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.5 2001/05/15 10:57:44 nick * * Add initial support for VMS * * Revision 1.4 2001/04/16 15:41:24 nick * * Fix some problems calling non existing error funcs * * Revision 1.3 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/01/02 09:55:04 nick * * More unicode bits * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLBrowseConnectW.c,v $"; #define BUFFER_LEN 4095 SQLRETURN SQLBrowseConnectW( SQLHDBC hdbc, SQLWCHAR *conn_str_in, SQLSMALLINT len_conn_str_in, SQLWCHAR *conn_str_out, SQLSMALLINT conn_str_out_max, SQLSMALLINT *ptr_conn_str_out ) { DMHDBC connection = (DMHDBC) hdbc; struct con_struct con_struct; char *driver, *dsn; char lib_name[ INI_MAX_PROPERTY_VALUE + 1 ]; char driver_name[ INI_MAX_PROPERTY_VALUE + 1 ]; char in_str[ BUFFER_LEN ]; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ]; SQLWCHAR *uc_in_str; int warnings; /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDBC parent_connection; parent_connection = find_parent_handle( connection, SQL_HANDLE_DBC ); if ( parent_connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLBROWSECONNECTW( parent_connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLBROWSECONNECTW( parent_connection, connection, conn_str_in, len_conn_str_in, conn_str_out, conn_str_out_max, ptr_conn_str_out ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tStr In = %s\ \n\t\t\tStr Out = %s\ \n\t\t\tPtr Conn Str Out = %p", connection, __wstring_with_length( s1, conn_str_in, len_conn_str_in ), __wstring_with_length( s2, conn_str_out, conn_str_out_max ), ptr_conn_str_out ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } /* * check the state of the connection */ if ( connection -> state == STATE_C4 || connection -> state == STATE_C5 || connection -> state == STATE_C6 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( IGNORE_THREAD, connection, SQL_ERROR ); } /* * are we at the start of a connection */ thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C2 ) { /* * parse the connection string */ __parse_connection_string_w( &con_struct, conn_str_in, len_conn_str_in ); /* * look for some keywords * have we got a DRIVER= attribute */ driver = __get_attribute_value( &con_struct, "DRIVER" ); if ( driver ) { /* * look up the driver in the ini file */ SQLGetPrivateProfileString( driver, "Driver", "", lib_name, sizeof( lib_name ), "ODBCINST.INI" ); if ( lib_name[ 0 ] == '\0' ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); __release_conn( &con_struct ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } __generate_connection_string( &con_struct, in_str, sizeof( in_str )); strcpy( connection -> dsn, "" ); } else { dsn = __get_attribute_value( &con_struct, "DSN" ); if ( !dsn ) { __append_pair( &con_struct, "DSN", "DEFAULT" ); dsn = "DEFAULT"; } if ( strlen( dsn ) > SQL_MAX_DSN_LENGTH ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM012" ); __post_internal_error( &connection -> error, ERROR_IM012, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } sprintf( in_str, "DSN=%s;", dsn ); /* * look up the dsn in the ini file */ if ( !__find_lib_name( dsn, lib_name, driver_name )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); __release_conn( &con_struct ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } __generate_connection_string( &con_struct, in_str, sizeof( in_str )); strcpy( connection -> dsn, dsn ); } __release_conn( &con_struct ); /* * we now have a driver to connect to */ if ( !__connect_part_one( connection, lib_name, driver_name, &warnings )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: connect_part_one fails" ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( !CHECK_SQLBROWSECONNECTW( connection ) && !CHECK_SQLBROWSECONNECT( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __disconnect_part_one( connection ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { if ( len_conn_str_in == SQL_NTS ) { int i; for( i = 0; conn_str_in[ i ]; i ++ ) { in_str[ i ] = (char) conn_str_in[ i ]; } in_str[ i ] = '\0'; } else { int i; for( i = 0; i < len_conn_str_in; i ++ ) { in_str[ i ] = (char) conn_str_in[ i ]; } in_str[ i ] = '\0'; } } if ( CHECK_SQLBROWSECONNECTW( connection )) { uc_in_str = ansi_to_unicode_alloc((SQLCHAR*) in_str, SQL_NTS, connection ); ret = SQLBROWSECONNECTW( connection, connection -> driver_dbc, uc_in_str, SQL_NTS, conn_str_out, conn_str_out_max, ptr_conn_str_out ); if ( uc_in_str ) free( uc_in_str ); connection -> unicode_driver = 1; } else { if ( conn_str_out ) { if ( conn_str_out_max > 0 ) { SQLCHAR *ob = malloc( conn_str_out_max + 1 ); SQLINTEGER len; ret = SQLBROWSECONNECT( connection, connection -> driver_dbc, in_str, SQL_NTS, ob, conn_str_out_max, &len ); if ( len > 0 ) { ansi_to_unicode_copy( conn_str_out, (char*) ob, len, connection ); } if ( ptr_conn_str_out ) { *ptr_conn_str_out = len; } } else { ret = SQLBROWSECONNECT( connection, connection -> driver_dbc, in_str, SQL_NTS, conn_str_out, conn_str_out_max, ptr_conn_str_out ); } } else { ret = SQLBROWSECONNECT( connection, connection -> driver_dbc, in_str, SQL_NTS, conn_str_out, conn_str_out_max, ptr_conn_str_out ); } connection -> unicode_driver = 0; } if ( !SQL_SUCCEEDED( ret ) || ret == SQL_NEED_DATA ) { if ( connection -> unicode_driver ) { SQLWCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLWCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN eret; /* * get the error from the driver before * loseing the connection */ if ( CHECK_SQLERRORW( connection )) { do { eret = SQLERRORW( connection, SQL_NULL_HENV, connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( eret )) { __post_internal_error_ex_w( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while( SQL_SUCCEEDED( eret )); } else if ( CHECK_SQLGETDIAGRECW( connection )) { int rec = 1; do { eret = SQLGETDIAGRECW( connection, SQL_HANDLE_DBC, connection -> driver_dbc, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( eret )) { __post_internal_error_ex_w( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while( SQL_SUCCEEDED( eret )); } if ( ret != SQL_NEED_DATA ) { __disconnect_part_one( connection ); connection -> state = STATE_C2; } else { connection -> state = STATE_C3; } } else { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN eret; /* * get the error from the driver before * loseing the connection */ if ( CHECK_SQLERROR( connection )) { do { eret = SQLERROR( connection, SQL_NULL_HENV, connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( eret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while( SQL_SUCCEEDED( eret )); } else if ( CHECK_SQLGETDIAGREC( connection )) { int rec = 1; do { eret = SQLGETDIAGRECW( connection, SQL_HANDLE_DBC, connection -> driver_dbc, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( eret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while( SQL_SUCCEEDED( eret )); } if ( ret != SQL_NEED_DATA ) { __disconnect_part_one( connection ); connection -> state = STATE_C2; } else { connection -> state = STATE_C3; } } } else { /* * we should be connected now */ connection -> state = STATE_C4; if( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_DBC, connection, ret, TRUE ); } if ( !__connect_part_two( connection )) { __disconnect_part_two( connection ); __disconnect_part_one( connection ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tPtr Conn Str Out = %s", __get_return_status( ret, s2 ), __sptr_as_string( s1, ptr_conn_str_out )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } if ( warnings && ret == SQL_SUCCESS ) { ret = SQL_SUCCESS_WITH_INFO; } return function_return( SQL_HANDLE_DBC, connection, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLColAttributeW.c0100644000076400007640000004072111057015600020176 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColAttributeW.c,v 1.13 2008/08/29 08:01:38 lurcher Exp $ * * $Log: SQLColAttributeW.c,v $ * Revision 1.13 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.12 2007/04/02 10:50:18 lurcher * Fix some 64bit problems (only when sizeof(SQLLEN) == 8 ) * * Revision 1.11 2004/11/22 17:02:48 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.10 2004/10/30 20:19:21 peteralexharvey * ODBC spec says last arg for SQLColAttribute() is SQLPOINTER not (SQLEN*). * So switched back to SQLPOINTER. * * Revision 1.9 2004/10/29 10:00:36 lurcher * Fix SQLColAttribute protype * * Revision 1.8 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.7 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.6 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.5 2002/08/19 09:11:49 lurcher * * Fix Maxor ineffiecny in Postgres Drivers, and fix a return state * * Revision 1.4 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.3 2002/04/25 15:16:46 lurcher * * Fix bug with SQLCOlAttribute(s)(W) where a column of zero could not be * used to get the count value * * Revision 1.2 2001/11/16 11:39:17 lurcher * * Add mapping between ODBC 2 and ODBC 3 types for SQLColAttribute(s)(W) * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLColAttributeW.c,v $"; SQLRETURN SQLColAttributeW ( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLUSMALLINT field_identifier, SQLPOINTER character_attribute, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLLEN *numeric_attribute ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tColumn Number = %d\ \n\t\t\tField Identifier = %s\ \n\t\t\tCharacter Attr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Length = %p\ \n\t\t\tNumeric Attribute = %p", statement, column_number, __col_attr_as_string( s1, field_identifier ), character_attribute, buffer_length, string_length, numeric_attribute ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( column_number == 0 && statement -> bookmarks_on == SQL_UB_OFF && statement -> connection -> bookmarks_on == SQL_UB_OFF && field_identifier != SQL_DESC_COUNT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error_api( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version, SQL_API_SQLCOLATTRIBUTE ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * Commented out for now because most drivers can not calc num cols * before Execute (they have no parse). - PAH * if ( field_identifier != SQL_DESC_COUNT && statement -> numcols < column_number ) { __post_internal_error( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version ); return function_return( statement, SQL_ERROR ); } */ /* * check states */ if ( statement -> state == STATE_S1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S2 && field_identifier != SQL_DESC_COUNT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07005" ); __post_internal_error( &statement -> error, ERROR_07005, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLCOLATTRIBUTE ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver || CHECK_SQLCOLATTRIBUTEW( statement -> connection ) || CHECK_SQLCOLATTRIBUTESW( statement -> connection )) { if ( !CHECK_SQLCOLATTRIBUTEW( statement -> connection )) { if ( CHECK_SQLCOLATTRIBUTESW( statement -> connection )) { /* * map to the ODBC2 function */ field_identifier = map_ca_odbc3_to_2( field_identifier ); ret = SQLCOLATTRIBUTESW( statement -> connection, statement -> driver_stmt, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } else { ret = SQLCOLATTRIBUTEW( statement -> connection, statement -> driver_stmt, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } } else { if ( !CHECK_SQLCOLATTRIBUTE( statement -> connection )) { if ( CHECK_SQLCOLATTRIBUTES( statement -> connection )) { SQLCHAR *as1 = NULL; /* * map to the ODBC2 function */ field_identifier = map_ca_odbc3_to_2( field_identifier ); switch( field_identifier ) { case SQL_COLUMN_QUALIFIER_NAME: case SQL_COLUMN_NAME: case SQL_COLUMN_LABEL: case SQL_COLUMN_OWNER_NAME: case SQL_COLUMN_TABLE_NAME: case SQL_COLUMN_TYPE_NAME: case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: buffer_length = buffer_length / 2; if ( buffer_length > 0 ) { as1 = malloc( buffer_length + 1 ); } break; } ret = SQLCOLATTRIBUTES( statement -> connection, statement -> driver_stmt, column_number, field_identifier, as1 ? as1 : character_attribute, buffer_length, string_length, numeric_attribute ); switch( field_identifier ) { case SQL_COLUMN_QUALIFIER_NAME: case SQL_COLUMN_NAME: case SQL_COLUMN_LABEL: case SQL_COLUMN_OWNER_NAME: case SQL_COLUMN_TABLE_NAME: case SQL_COLUMN_TYPE_NAME: case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: if ( SQL_SUCCEEDED( ret ) && character_attribute && as1 ) { ansi_to_unicode_copy( character_attribute, (char*) as1, SQL_NTS, statement -> connection ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length *= sizeof( SQLWCHAR ); } if ( as1 ) { free( as1 ); } break; } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } else { SQLCHAR *as1 = NULL; switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: case SQL_COLUMN_NAME: buffer_length = buffer_length / 2; if ( buffer_length > 0 ) { as1 = malloc( buffer_length + 1 ); } break; } ret = SQLCOLATTRIBUTE( statement -> connection, statement -> driver_stmt, column_number, field_identifier, as1 ? as1 : character_attribute, buffer_length, string_length, numeric_attribute ); switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: case SQL_COLUMN_NAME: if ( SQL_SUCCEEDED( ret ) && character_attribute && as1 ) { ansi_to_unicode_copy( character_attribute, (char*) as1, SQL_NTS, statement -> connection ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length *= sizeof( SQLWCHAR ); } if ( as1 ) { free( as1 ); } break; default: break; } } } if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLCOLATTRIBUTE; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( SQL_SUCCEEDED( ret )) { /* * map ODBC 3 datetime fields to ODBC2 */ if ( field_identifier == SQL_COLUMN_TYPE && numeric_attribute ) { *(SQLINTEGER*)numeric_attribute= __map_type(MAP_SQL_D2DM, statement->connection, *(SQLINTEGER*)numeric_attribute); } } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLColAttributesW.c0100644000076400007640000004454711057015212020372 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColAttributesW.c,v 1.12 2008/08/29 08:01:38 lurcher Exp $ * * $Log: SQLColAttributesW.c,v $ * Revision 1.12 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.11 2007/02/28 15:37:47 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.10 2004/11/22 17:02:48 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.9 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.8 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.7 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.6 2002/08/19 09:11:49 lurcher * * Fix Maxor ineffiecny in Postgres Drivers, and fix a return state * * Revision 1.5 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.4 2002/04/25 15:16:46 lurcher * * Fix bug with SQLCOlAttribute(s)(W) where a column of zero could not be * used to get the count value * * Revision 1.3 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.2 2001/11/16 11:39:17 lurcher * * Add mapping between ODBC 2 and ODBC 3 types for SQLColAttribute(s)(W) * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLColAttributesW.c,v $"; SQLRETURN SQLColAttributesW( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLUSMALLINT field_identifier, SQLPOINTER character_attribute, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLLEN *numeric_attribute ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLCOLATTRIBUTEW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLCOLATTRIBUTEW( parent_statement -> connection, statement_handle, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tColumn Number = %d\ \n\t\t\tField Identifier = %s\ \n\t\t\tCharacter Attr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Length = %p\ \n\t\t\tNumeric Attribute = %p", statement, column_number, __col_attr_as_string( s1, field_identifier ), character_attribute, buffer_length, string_length, numeric_attribute ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( column_number == 0 && statement -> bookmarks_on == SQL_UB_OFF && statement -> connection -> bookmarks_on == SQL_UB_OFF && field_identifier != SQL_DESC_COUNT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error_api( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version, SQL_API_SQLCOLATTRIBUTES ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * Commented out for now because most drivers can not calc num cols * before Execute (they have no parse). - PAH * if ( field_identifier != SQL_DESC_COUNT && statement -> numcols < column_number ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } */ /* * check states */ if ( statement -> state == STATE_S1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S2 && field_identifier != SQL_DESC_COUNT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07005" ); __post_internal_error( &statement -> error, ERROR_07005, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLCOLATTRIBUTES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver || CHECK_SQLCOLATTRIBUTESW( statement -> connection ) || CHECK_SQLCOLATTRIBUTEW( statement -> connection )) { if ( !CHECK_SQLCOLATTRIBUTESW( statement -> connection )) { if ( CHECK_SQLCOLATTRIBUTEW( statement -> connection )) { /* * map to the ODBC3 function */ field_identifier = map_ca_odbc2_to_3( field_identifier ); ret = SQLCOLATTRIBUTEW( statement -> connection, statement -> driver_stmt, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } else { ret = SQLCOLATTRIBUTESW( statement -> connection, statement -> driver_stmt, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } } else { if ( !CHECK_SQLCOLATTRIBUTES( statement -> connection )) { if ( CHECK_SQLCOLATTRIBUTE( statement -> connection )) { SQLCHAR *as1; /* * map to the ODBC3 function */ field_identifier = map_ca_odbc2_to_3( field_identifier ); switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: case SQL_COLUMN_NAME: buffer_length = buffer_length / 2; if ( buffer_length > 0 ) { as1 = malloc( buffer_length + 1 ); } break; default: break; } ret = SQLCOLATTRIBUTE( statement -> connection, statement -> driver_stmt, column_number, field_identifier, as1 ? as1 : character_attribute, buffer_length, string_length, numeric_attribute ); switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: case SQL_COLUMN_NAME: if ( SQL_SUCCEEDED( ret ) && character_attribute && as1 ) { ansi_to_unicode_copy( character_attribute, (char*) as1, SQL_NTS, statement -> connection ); } if ( as1 ) { free( as1 ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length *= sizeof( SQLWCHAR ); } break; default: break; } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } else { SQLCHAR *as1; switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: case SQL_COLUMN_NAME: buffer_length = buffer_length / 2; if ( buffer_length > 0 ) { as1 = malloc( buffer_length + 1 ); } break; default: break; } ret = SQLCOLATTRIBUTES( statement -> connection, statement -> driver_stmt, column_number, field_identifier, as1 ? as1 : character_attribute, buffer_length, string_length, numeric_attribute ); switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: case SQL_COLUMN_NAME: if ( SQL_SUCCEEDED( ret ) && character_attribute && as1 ) { ansi_to_unicode_copy( character_attribute, (char*) as1, SQL_NTS, statement -> connection ); } if ( as1 ) { free( as1 ); } if ( SQL_SUCCEEDED( ret ) && string_length && character_attribute ) { *string_length *= sizeof( SQLWCHAR ); } break; default: break; } } } if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLCOLATTRIBUTES; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else if ( SQL_SUCCEEDED( ret )) { /* * map ODBC 3 datetime fields to ODBC2 */ if ( field_identifier == SQL_COLUMN_TYPE && numeric_attribute && statement -> connection -> driver_version == SQL_OV_ODBC2 ) { SQLINTEGER na; memcpy( &na, numeric_attribute, sizeof( na )); switch( na ) { case SQL_TYPE_TIME: na = SQL_TIME; memcpy( numeric_attribute, &na, sizeof( na )); break; case SQL_TYPE_DATE: na = SQL_DATE; memcpy( numeric_attribute, &na, sizeof( na )); break; case SQL_TYPE_TIMESTAMP: na = SQL_TIMESTAMP; memcpy( numeric_attribute, &na, sizeof( na )); break; } } } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLColumnPrivilegesW.c0100644000076400007640000002621111055726342021074 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColumnPrivilegesW.c,v 1.8 2008/08/29 08:01:38 lurcher Exp $ * * $Log: SQLColumnPrivilegesW.c,v $ * Revision 1.8 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:47 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLColumnPrivilegesW.c,v $"; SQLRETURN SQLColumnPrivilegesW( SQLHSTMT statement_handle, SQLWCHAR *catalog_name, SQLSMALLINT name_length1, SQLWCHAR *schema_name, SQLSMALLINT name_length2, SQLWCHAR *table_name, SQLSMALLINT name_length3, SQLWCHAR *column_name, SQLSMALLINT name_length4 ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLCOLUMNPRIVILEGESW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLCOLUMNPRIVILEGESW( parent_statement -> connection, statement_handle, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, column_name, name_length4 ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s\ \n\t\t\tColumn Name = %s", statement, __wstring_with_length( s1, catalog_name, name_length1 ), __wstring_with_length( s2, schema_name, name_length2 ), __wstring_with_length( s3, table_name, name_length3 ), __wstring_with_length( s4, column_name, name_length4 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length2 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS ) || ( name_length4 < 0 && name_length4 != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLCOLUMNPRIVILEGES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver || CHECK_SQLCOLUMNPRIVILEGESW( statement -> connection )) { if ( !CHECK_SQLCOLUMNPRIVILEGESW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLCOLUMNPRIVILEGESW( statement -> connection , statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, column_name, name_length4 ); } else { SQLCHAR *as1, *as2, *as3, *as4; if ( !CHECK_SQLCOLUMNPRIVILEGES( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * The MS book says do this in place, but that causes more problems * than we need */ as1 = (SQLCHAR*) unicode_to_ansi_alloc( catalog_name, name_length1, statement -> connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( schema_name, name_length2, statement -> connection ); as3 = (SQLCHAR*) unicode_to_ansi_alloc( table_name, name_length3, statement -> connection ); as4 = (SQLCHAR*) unicode_to_ansi_alloc( column_name, name_length4, statement -> connection ); ret = SQLCOLUMNPRIVILEGES( statement -> connection , statement -> driver_stmt, as1, name_length1, as2, name_length2, as3, name_length3, as4, name_length4 ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); if ( as3 ) free( as3 ); if ( as4 ) free( as4 ); } if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLCOLUMNPRIVILEGES; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLColumnsW.c0100644000076400007640000002603211055726342017226 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColumnsW.c,v 1.8 2008/08/29 08:01:38 lurcher Exp $ * * $Log: SQLColumnsW.c,v $ * Revision 1.8 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:47 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:35 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLColumnsW.c,v $"; SQLRETURN SQLColumnsW( SQLHSTMT statement_handle, SQLWCHAR *catalog_name, SQLSMALLINT name_length1, SQLWCHAR *schema_name, SQLSMALLINT name_length2, SQLWCHAR *table_name, SQLSMALLINT name_length3, SQLWCHAR *column_name, SQLSMALLINT name_length4 ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLCOLUMNSW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLCOLUMNSW( parent_statement -> connection, statement_handle, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, column_name, name_length4 ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s\ \n\t\t\tColumn Type = %s", statement, __wstring_with_length( s1, catalog_name, name_length1 ), __wstring_with_length( s2, schema_name, name_length2 ), __wstring_with_length( s3, table_name, name_length3 ), __wstring_with_length( s4, column_name, name_length4 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length2 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS ) || ( name_length4 < 0 && name_length4 != SQL_NTS )) { __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLCOLUMNS ) { __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver || CHECK_SQLCOLUMNSW( statement -> connection )) { if ( !CHECK_SQLCOLUMNSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLCOLUMNSW( statement -> connection , statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, column_name, name_length4 ); } else { SQLCHAR *as1, *as2, *as3, *as4; if ( !CHECK_SQLCOLUMNS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( catalog_name, name_length1, statement -> connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( schema_name, name_length2, statement -> connection ); as3 = (SQLCHAR*) unicode_to_ansi_alloc( table_name, name_length3, statement -> connection ); as4 = (SQLCHAR*) unicode_to_ansi_alloc( column_name, name_length4, statement -> connection ); ret = SQLCOLUMNS( statement -> connection , statement -> driver_stmt, as1, name_length1, as2, name_length2, as3, name_length3, as4, name_length4 ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); if ( as3 ) free( as3 ); if ( as4 ) free( as4 ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); } SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); /******/ #endif statement -> hascols = 1; statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLCOLUMNS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLConnectW.c0100644000076400007640000005045111070160004017161 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLConnectW.c,v 1.14 2008/09/29 14:02:44 lurcher Exp $ * * $Log: SQLConnectW.c,v $ * Revision 1.14 2008/09/29 14:02:44 lurcher * Fix missing dlfcn group option * * Revision 1.13 2007/02/28 15:37:47 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.12 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.11 2002/12/20 11:36:46 lurcher * * Update DMEnvAttr code to allow setting in the odbcinst.ini entry * * Revision 1.10 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.9 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.8 2002/07/25 09:30:26 lurcher * * Additional unicode and iconv changes * * Revision 1.7 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.6 2002/05/28 13:30:34 lurcher * * Tidy up for AIX * * Revision 1.5 2002/05/24 12:42:50 lurcher * * Alter NEWS and ChangeLog to match their correct usage * Additional UNICODE tweeks * * Revision 1.4 2002/04/10 11:04:36 lurcher * * Fix endian issue with 4 byte unicode support * * Revision 1.3 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/01/04 13:16:25 nick * * Add support for GNU portable threads and tidy up some UNICODE compile * warnings * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLConnectW.c,v $"; SQLRETURN SQLConnectW( SQLHDBC connection_handle, SQLWCHAR *server_name, SQLSMALLINT name_length1, SQLWCHAR *user_name, SQLSMALLINT name_length2, SQLWCHAR *authentication, SQLSMALLINT name_length3 ) { DMHDBC connection = (DMHDBC)connection_handle; int len, ret_from_connect; SQLWCHAR dsn[ SQL_MAX_DSN_LENGTH + 1 ]; char lib_name[ INI_MAX_PROPERTY_VALUE + 1 ]; char driver_name[ INI_MAX_PROPERTY_VALUE + 1 ]; SQLCHAR ansi_dsn[ SQL_MAX_DSN_LENGTH + 1 ]; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], ansi_user[ SQL_MAX_DSN_LENGTH + 1 ], ansi_pwd[ SQL_MAX_DSN_LENGTH + 1 ]; int warnings; /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDBC parent_connection; parent_connection = find_parent_handle( connection, SQL_HANDLE_DBC ); if ( parent_connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLCONNECTW( parent_connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLCONNECTW( parent_connection, connection_handle, server_name, name_length1, user_name, name_length2, authentication, name_length3 ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tServer Name = %s\ \n\t\t\tUser Name = %s\ \n\t\t\tAuthentication = %s", connection, __wstring_with_length( s1, server_name, name_length1 ), __wstring_with_length( s2, user_name, name_length2 ), __wstring_with_length_pass( s3, authentication, name_length3 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length2 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * check the state of the connection */ if ( connection -> state != STATE_C2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( name_length1 && server_name ) { if ( name_length1 == SQL_NTS ) { len = wide_strlen( server_name ); if ( len > SQL_MAX_DSN_LENGTH ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { len = name_length1; if ( len > SQL_MAX_DSN_LENGTH ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } memcpy( dsn, server_name, sizeof( dsn[ 0 ] ) * len ); dsn[ len ] = (SQLWCHAR) 0; } else if ( name_length1 && !server_name ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM010" ); __post_internal_error( &connection -> error, ERROR_IM010, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else { int i; for ( i = 0; i < 8; i ++ ) dsn[ i ] = "DEFAULT"[i]; } /* * No pooling for UNICODE at the moment */ connection -> pooled_connection = NULL; unicode_to_ansi_copy((char*) ansi_dsn, sizeof( ansi_dsn ), dsn, sizeof( ansi_dsn ), NULL ); if ( !__find_lib_name((char*) ansi_dsn, lib_name, driver_name )) { /* * if not found look for a default */ if ( !__find_lib_name( "DEFAULT", lib_name, driver_name )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } /* * do we have any Environment, Connection, or Statement attributes set in the ini ? */ __handle_attr_extensions( connection, (char*) ansi_dsn, driver_name ); /* * if necessary change the threading level */ if ( !__connect_part_one( connection, lib_name, driver_name, &warnings )) { return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( !CHECK_SQLCONNECTW( connection ) && !CHECK_SQLCONNECT( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __disconnect_part_one( connection ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( CHECK_SQLCONNECTW( connection )) { if ( CHECK_SQLSETCONNECTATTR( connection )) { int lret; lret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, SQL_ATTR_ANSI_APP, SQL_AA_FALSE, 0 ); } ret_from_connect = SQLCONNECTW( connection, connection -> driver_dbc, dsn, SQL_NTS, user_name, name_length2, authentication, name_length3 ); connection -> unicode_driver = 1; } else { if ( user_name ) { if ( name_length2 == SQL_NTS ) unicode_to_ansi_copy((char*) ansi_user, sizeof( ansi_user ),user_name, sizeof( ansi_user ), connection); else unicode_to_ansi_copy((char*) ansi_user, sizeof( ansi_user ),user_name, name_length2, connection ); } if ( authentication ) { if ( name_length3 == SQL_NTS ) unicode_to_ansi_copy((char*) ansi_pwd, sizeof( ansi_pwd ), authentication, sizeof( ansi_pwd ), connection); else unicode_to_ansi_copy((char*) ansi_pwd, sizeof( ansi_pwd ), authentication, name_length3, connection ); } /* if ( CHECK_SQLSETCONNECTATTR( connection )) { int lret; lret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, SQL_ATTR_ANSI_APP, SQL_AA_TRUE, 0 ); } */ ret_from_connect = SQLCONNECT( connection, connection -> driver_dbc, ansi_dsn, SQL_NTS, user_name ? ansi_user : NULL, name_length2, authentication ? ansi_pwd : NULL, name_length3 ); connection -> unicode_driver = 0; } if ( ret_from_connect != SQL_SUCCESS ) { /* * get the errors from the driver before * loseing the connection */ if ( connection -> unicode_driver ) { SQLWCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLWCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; if ( CHECK_SQLERRORW( connection )) { do { ret = SQLERRORW( connection, SQL_NULL_HENV, connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex_w( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } while( SQL_SUCCEEDED( ret )); } else if ( CHECK_SQLGETDIAGRECW( connection )) { int rec = 1; do { ret = SQLGETDIAGRECW( connection, SQL_HANDLE_DBC, connection -> driver_dbc, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex_w( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } while( SQL_SUCCEEDED( ret )); } } else { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; if ( CHECK_SQLERROR( connection )) { do { ret = SQLERROR( connection, SQL_NULL_HENV, connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } while( SQL_SUCCEEDED( ret )); } else if ( CHECK_SQLGETDIAGREC( connection )) { int rec = 1; do { ret = SQLGETDIAGREC( connection, SQL_HANDLE_DBC, connection -> driver_dbc, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } while( SQL_SUCCEEDED( ret )); } } /* * if it was a error then return now */ if ( !SQL_SUCCEEDED( ret_from_connect )) { __disconnect_part_one( connection ); return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } } /* * we should be connected now */ connection -> state = STATE_C4; strcpy( connection -> dsn, (char*)ansi_dsn ); /* * did we get the type we wanted */ if ( connection -> driver_version != connection -> environment -> requested_version ) { connection -> driver_version = connection -> environment -> requested_version; __post_internal_error( &connection -> error, ERROR_01000, "Driver does not support the requested version", connection -> environment -> requested_version ); ret_from_connect = SQL_SUCCESS_WITH_INFO; } if ( !__connect_part_two( connection )) { /* * the cursor lib can kill us here, so be careful */ __disconnect_part_two( connection ); __disconnect_part_one( connection ); connection -> state = STATE_C3; return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } if ( warnings && ret_from_connect == SQL_SUCCESS ) { ret_from_connect = SQL_SUCCESS_WITH_INFO; } return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } unixODBC-2.2.14-p2/DriverManager/SQLDataSourcesW.c0100644000076400007640000002212007750253175020023 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDataSourcesW.c,v 1.5 2003/10/30 18:20:45 lurcher Exp $ * * $Log: SQLDataSourcesW.c,v $ * Revision 1.5 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/01/04 13:16:25 nick * * Add support for GNU portable threads and tidy up some UNICODE compile * warnings * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLDataSourcesW.c,v $"; #define BUFFERSIZE 1024 SQLRETURN SQLDataSourcesW( SQLHENV environment_handle, SQLUSMALLINT direction, SQLWCHAR *server_name, SQLSMALLINT buffer_length1, SQLSMALLINT *name_length1, SQLWCHAR *description, SQLSMALLINT buffer_length2, SQLSMALLINT *name_length2 ) { DMHENV environment = (DMHENV) environment_handle; SQLRETURN ret; char buffer[ BUFFERSIZE + 1 ]; char object[ INI_MAX_OBJECT_NAME + 1 ]; char property[ INI_MAX_PROPERTY_VALUE + 1 ]; char driver[ INI_MAX_PROPERTY_VALUE + 1 ]; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * restrict for unicode */ buffer_length1 = buffer_length1 / 2; buffer_length2 = buffer_length2 / 2; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p", environment ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_protect( SQL_HANDLE_ENV, environment ); /* * check that a version has been requested */ if ( environment -> requested_version == 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &environment -> error, ERROR_HY010, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( buffer_length1 < 0 || buffer_length2 < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &environment -> error, ERROR_HY090, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( direction != SQL_FETCH_FIRST && direction != SQL_FETCH_FIRST_USER && direction != SQL_FETCH_FIRST_SYSTEM && direction != SQL_FETCH_NEXT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY103" ); __post_internal_error( &environment -> error, ERROR_HY103, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } /* * for this function USER = "~/.odbc.ini" and * SYSTEM = "/usr/odbc.ini */ if ( direction == SQL_FETCH_FIRST ) { environment -> fetch_mode = ODBC_BOTH_DSN; environment -> entry = 0; } else if ( direction == SQL_FETCH_FIRST_USER ) { environment -> fetch_mode = ODBC_USER_DSN; environment -> entry = 0; } else if ( direction == SQL_FETCH_FIRST_SYSTEM ) { environment -> fetch_mode = ODBC_SYSTEM_DSN; environment -> entry = 0; } /* * this is lifted from Peters code */ memset( buffer, 0, sizeof( buffer )); memset( object, 0, sizeof( object )); SQLSetConfigMode( environment -> fetch_mode ); SQLGetPrivateProfileString( NULL, NULL, NULL, buffer, sizeof( buffer ), "odbc.ini" ); if ( iniElement( buffer, '\0', '\0', environment -> entry, object, sizeof( object )) != INI_SUCCESS ) { ret = SQL_NO_DATA; } else { memset( buffer, 0, sizeof( buffer )); memset( property, 0, sizeof( property )); memset( driver, 0, sizeof( driver )); SQLGetPrivateProfileString( object, "Driver", "", driver, sizeof( driver ), "odbc.ini" ); if ( strlen( driver ) > 0 ) { /* SQLGetPrivateProfileString( driver, "Description", "", property, sizeof( property ), "odbcinst.ini" ); */ strcpy( property, driver ); } else { strcpy( property, "" ); } environment -> entry++; if (( server_name && buffer_length1 <= strlen( object )) || ( description && buffer_length2 <= strlen( property ))) { __post_internal_error( &environment -> error, ERROR_01004, NULL, environment -> requested_version ); ret = SQL_SUCCESS_WITH_INFO; } else { ret = SQL_SUCCESS; } if ( server_name ) { SQLWCHAR *s1; s1 = ansi_to_unicode_alloc((SQLCHAR*) object, SQL_NTS, NULL ); if ( s1 ) { if ( buffer_length1 <= strlen( object )) { memcpy( server_name, s1, buffer_length1 * 2 ); server_name[ buffer_length1 - 1 ] = 0; } else { wide_strcpy( server_name, s1 ); } free( s1 ); } } if ( description ) { SQLWCHAR *s1; s1 = ansi_to_unicode_alloc((SQLCHAR*) property, SQL_NTS, NULL ); if ( s1 ) { if ( buffer_length2 <= strlen( property )) { memcpy( description, s1, buffer_length2 * 2 ); description[ buffer_length1 - 1 ] = 0; } else { wide_strcpy( description, s1 ); } free( s1 ); } } if ( name_length1 ) { *name_length1 = strlen( object ); } if ( name_length2 ) { *name_length2 = strlen( property ); } } /* NEVER FORGET TO RESET THIS TO ODBC_BOTH_DSN */ SQLSetConfigMode( ODBC_BOTH_DSN ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } return function_return( SQL_HANDLE_ENV, environment, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLDescribeColW.c0100644000076400007640000003404011055726342017762 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDescribeColW.c,v 1.13 2008/08/29 08:01:38 lurcher Exp $ * * $Log: SQLDescribeColW.c,v $ * Revision 1.13 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.12 2008/05/20 13:43:47 lurcher * Vms fixes * * Revision 1.11 2007/04/02 10:50:18 lurcher * Fix some 64bit problems (only when sizeof(SQLLEN) == 8 ) * * Revision 1.10 2007/02/28 15:37:47 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.9 2007/01/02 10:27:50 lurcher * Fix descriptor leak with unicode only driver * * Revision 1.8 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.7 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.6 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.5 2002/08/19 09:11:49 lurcher * * Fix Maxor ineffiecny in Postgres Drivers, and fix a return state * * Revision 1.4 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.3 2002/05/21 14:19:44 lurcher * * * Update libtool to escape from AIX build problem * * Add fix to avoid file handle limitations * * Add more UNICODE changes, it looks like it is native 16 representation * the old way can be reproduced by defining UCS16BE * * Add iusql, its just the same as isql but uses the wide functions * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/03/21 12:26:27 nick * * Alter def for SQLDescribeColW * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLDescribeColW.c,v $"; SQLRETURN SQLDescribeColW( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLWCHAR *column_name, SQLSMALLINT buffer_length, SQLSMALLINT *name_length, SQLSMALLINT *data_type, SQLULEN *column_size, SQLSMALLINT *decimal_digits, SQLSMALLINT *nullable ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s5[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s6[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLDESCRIBECOLW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLDESCRIBECOLW( parent_statement -> connection, statement_handle, column_number, column_name, buffer_length, name_length, data_type, column_size, decimal_digits, nullable ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tColumn Number = %d\ \n\t\t\tColumn Name = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tName Length = %p\ \n\t\t\tData Type = %p\ \n\t\t\tColumn Size = %p\ \n\t\t\tDecimal Digits = %p\ \n\t\t\tNullable = %p", statement, column_number, column_name, buffer_length, name_length, data_type, column_size, decimal_digits, nullable ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( column_number == 0 && statement -> bookmarks_on == SQL_UB_OFF && statement -> connection -> bookmarks_on == SQL_UB_OFF ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07009" ); __post_internal_error_api( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version, SQL_API_SQLDESCRIBECOL ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * sadly we can't trust the numcols value * if ( statement -> numcols < column_number ) { __post_internal_error( &statement -> error, ERROR_07009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } */ if ( buffer_length < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S1 || statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 07005" ); __post_internal_error( &statement -> error, ERROR_07005, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLDESCRIBECOL ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver || CHECK_SQLDESCRIBECOLW( statement -> connection )) { if ( !CHECK_SQLDESCRIBECOLW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLDESCRIBECOLW( statement -> connection, statement -> driver_stmt, column_number, column_name, buffer_length, name_length, data_type, column_size, decimal_digits, nullable ); } else { SQLCHAR *as1 = NULL; if ( !CHECK_SQLDESCRIBECOL( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( buffer_length > 0 && column_name ) { as1 = malloc( buffer_length + 1 ); } ret = SQLDESCRIBECOL( statement -> connection, statement -> driver_stmt, column_number, as1 ? as1 : (SQLCHAR*)column_name, buffer_length, name_length, data_type, column_size, decimal_digits, nullable ); if ( column_name && as1 ) { ansi_to_unicode_copy( column_name, (char*) as1, SQL_NTS, statement -> connection ); } if ( as1 ) { free( as1 ); } } if ( (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) && data_type ) { *data_type=__map_type(MAP_SQL_D2DM,statement->connection, *data_type); } if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLDESCRIBECOL; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } if ( log_info.log_flag ) { if ( !SQL_SUCCEEDED( ret )) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s6 )); } else { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tColumn Name = %s\ \n\t\t\tData Type = %s\ \n\t\t\tColumn Size = %s\ \n\t\t\tDecimal Digits = %s\ \n\t\t\tNullable = %s", __get_return_status( ret, s6 ), __sdata_as_string( s1, SQL_CHAR, name_length, column_name ), __sptr_as_string( s2, data_type ), __ptr_as_string( s3, (SQLLEN*)column_size ), __sptr_as_string( s4, decimal_digits ), __sptr_as_string( s5, nullable )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLDriverConnectW.c0100644000076400007640000006011211070160004020330 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDriverConnectW.c,v 1.15 2008/09/29 14:02:44 lurcher Exp $ * * $Log: SQLDriverConnectW.c,v $ * Revision 1.15 2008/09/29 14:02:44 lurcher * Fix missing dlfcn group option * * Revision 1.14 2007/02/28 15:37:47 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.13 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.12 2003/08/08 11:14:21 lurcher * * Fix UNICODE problem in SQLDriverConnectW * * Revision 1.11 2002/12/20 11:36:46 lurcher * * Update DMEnvAttr code to allow setting in the odbcinst.ini entry * * Revision 1.10 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.9 2002/10/14 09:46:10 lurcher * * Remove extra return * * Revision 1.8 2002/07/25 09:30:26 lurcher * * Additional unicode and iconv changes * * Revision 1.7 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.6 2002/07/04 17:27:56 lurcher * * Small bug fixes * * Revision 1.4 2002/05/24 12:42:50 lurcher * * Alter NEWS and ChangeLog to match their correct usage * Additional UNICODE tweeks * * Revision 1.3 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.5 2001/05/15 10:57:44 nick * * Add initial support for VMS * * Revision 1.4 2001/04/16 15:41:24 nick * * Fix some problems calling non existing error funcs * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/01/03 11:57:27 nick * * Fix some name collisions * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLDriverConnectW.c,v $"; int __parse_connection_string_w( struct con_struct *con_str, SQLWCHAR *str, int str_len ) { struct con_pair *cp; char *local_str, *ptr; int len; int got_dsn = 0; /* if we have a DSN then ignore any DRIVER or FILEDSN */ int got_driver = 0; /* if we have a DRIVER or FILEDSN then ignore any DSN */ con_str -> count = 0; con_str -> list = NULL; if ( str_len == SQL_NTS ) { len = wide_strlen( str ) + 1; local_str = malloc( len ); } else { len = str_len + 1; local_str = malloc( len ); } unicode_to_ansi_copy( local_str, len - 1, str, len - 1, NULL ); if ( !local_str || strlen( local_str ) == 0 || ( strlen( local_str ) == 1 && *local_str == ';' )) { /* connection-string ::= empty-string [;] */ free( local_str ); __append_pair( con_str, "DSN", "DEFAULT" ); return 0; } ptr = local_str; while(( cp = __get_pair( &ptr )) != NULL ) { if ( strcasecmp( cp -> keyword, "DSN" ) == 0 ) { if ( got_driver ) continue; got_dsn = 1; } else if ( strcasecmp( cp -> keyword, "DRIVER" ) == 0 || strcmp( cp -> keyword, "FILEDSN" ) == 0 ) { if ( got_dsn ) continue; got_driver = 1; } __append_pair( con_str, cp -> keyword, cp -> attribute ); free( cp -> keyword ); free( cp -> attribute ); free( cp ); } /* if no dsn or DRIVER, then set DSN=DEFAULT */ if ( !got_driver && !got_dsn ) { __append_pair( con_str, "DSN", "DEFAULT" ); } free( local_str ); return 0; } SQLRETURN SQLDriverConnectW( SQLHDBC hdbc, SQLHWND hwnd, SQLWCHAR *conn_str_in, SQLSMALLINT len_conn_str_in, SQLWCHAR *conn_str_out, SQLSMALLINT conn_str_out_max, SQLSMALLINT *ptr_conn_str_out, SQLUSMALLINT driver_completion ) { DMHDBC connection = (DMHDBC)hdbc; struct con_struct con_struct; char *driver = NULL, *dsn = NULL; char lib_name[ INI_MAX_PROPERTY_VALUE + 1 ]; char driver_name[ INI_MAX_PROPERTY_VALUE + 1 ]; SQLRETURN ret_from_connect; SQLCHAR s1[ 2048 ]; int warnings; /* * check connection */ strcpy( driver_name, "" ); if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDBC parent_connection; parent_connection = find_parent_handle( connection, SQL_HANDLE_DBC ); if ( parent_connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLDRIVERCONNECTW( parent_connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLDRIVERCONNECTW( parent_connection, connection, hwnd, conn_str_in, len_conn_str_in, conn_str_out, conn_str_out_max, ptr_conn_str_out, driver_completion ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tWindow Hdl = %p\ \n\t\t\tStr In = %s\ \n\t\t\tStr Out = %p\ \n\t\t\tStr Out Max = %d\ \n\t\t\tStr Out Ptr = %p\ \n\t\t\tCompletion = %d", connection, hwnd, __wstring_with_length_hide_pwd( s1, conn_str_in, len_conn_str_in ), conn_str_out, conn_str_out_max, ptr_conn_str_out, driver_completion ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( len_conn_str_in < 0 && len_conn_str_in != SQL_NTS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( driver_completion == SQL_DRIVER_PROMPT && hwnd == NULL ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &connection -> error, ERROR_HY092, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( driver_completion != SQL_DRIVER_PROMPT && driver_completion != SQL_DRIVER_COMPLETE && driver_completion != SQL_DRIVER_COMPLETE_REQUIRED && driver_completion != SQL_DRIVER_NOPROMPT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY110" ); __post_internal_error( &connection -> error, ERROR_HY110, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * check the state of the connection */ if ( connection -> state != STATE_C2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * parse the connection string */ if ( !conn_str_in ) { char *ansi_conn_str_in; /* * not quite by the book, but better than nothing */ ansi_conn_str_in = "DSN=DEFAULT;"; len_conn_str_in = strlen( ansi_conn_str_in ); __parse_connection_string( &con_struct, ansi_conn_str_in, len_conn_str_in ); } else { __parse_connection_string_w( &con_struct, conn_str_in, len_conn_str_in ); } /* * look for some keywords * * TO_DO FILEDSN's * * have we got a DRIVER= attribute */ driver = __get_attribute_value( &con_struct, "DRIVER" ); if ( driver ) { /* * look up the driver in the ini file */ strcpy( driver_name, driver ); SQLGetPrivateProfileString( driver, "Driver", "", lib_name, sizeof( lib_name ), "ODBCINST.INI" ); if ( lib_name[ 0 ] == '\0' ) { /* * at this point a box could pop up to allow the selection of a driver * * do this later */ dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); __release_conn( &con_struct ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } strcpy( connection -> dsn, "" ); __handle_attr_extensions( connection, NULL, driver_name ); } else { dsn = __get_attribute_value( &con_struct, "DSN" ); if ( !dsn ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); __release_conn( &con_struct ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( strlen( dsn ) > SQL_MAX_DSN_LENGTH ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM012" ); __post_internal_error( &connection -> error, ERROR_IM012, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } /* * look up the dsn in the ini file */ if ( !__find_lib_name( dsn, lib_name, driver_name )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM002" ); __post_internal_error( &connection -> error, ERROR_IM002, NULL, connection -> environment -> requested_version ); __release_conn( &con_struct ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } strcpy( connection -> dsn, dsn ); __handle_attr_extensions( connection, dsn, driver_name ); } if ( dsn ) { /* * do we have any Environment, Connection, or Statement attributes set in the ini ? */ __handle_attr_extensions( connection, dsn, driver_name ); } __release_conn( &con_struct ); /* * we have now got the name of a lib to load */ if ( !__connect_part_one( connection, lib_name, driver_name, &warnings )) { return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( !CHECK_SQLDRIVERCONNECTW( connection ) && !CHECK_SQLDRIVERCONNECT( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __disconnect_part_one( connection ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( CHECK_SQLDRIVERCONNECTW( connection )) { if ( CHECK_SQLSETCONNECTATTR( connection )) { int lret; lret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, SQL_ATTR_ANSI_APP, SQL_AA_FALSE, 0 ); } ret_from_connect = SQLDRIVERCONNECTW( connection, connection -> driver_dbc, hwnd, conn_str_in, len_conn_str_in, conn_str_out, conn_str_out_max, ptr_conn_str_out, driver_completion ); if ( ret_from_connect != SQL_SUCCESS ) { SQLWCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLWCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; /* * get the errors from the driver before * loseing the connection */ if ( CHECK_SQLERRORW( connection )) { do { ret = SQLERRORW( connection, SQL_NULL_HENV, connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex_w( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while( SQL_SUCCEEDED( ret )); } else if ( CHECK_SQLGETDIAGRECW( connection )) { int rec = 1; do { ret = SQLGETDIAGRECW( connection, SQL_HANDLE_DBC, connection -> driver_dbc, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex_w( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while( SQL_SUCCEEDED( ret )); } /* * if it was a error then return now */ if ( !SQL_SUCCEEDED( ret_from_connect )) { __disconnect_part_one( connection ); sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } } connection -> unicode_driver = 1; } else { char *in_str, *out_str; int len; if ( conn_str_in ) { if ( len_conn_str_in == SQL_NTS ) { len = wide_strlen( conn_str_in ) + sizeof( SQLWCHAR ); } else { len = len_conn_str_in + sizeof( SQLWCHAR ); } in_str = malloc( len ); unicode_to_ansi_copy( in_str, len, conn_str_in, len, connection ); } else { in_str = NULL; } if ( conn_str_out && conn_str_out_max > 0 ) { out_str = malloc( conn_str_out_max + sizeof( SQLWCHAR ) ); } else { out_str = NULL; } ret_from_connect = SQLDRIVERCONNECT( connection, connection -> driver_dbc, hwnd, (SQLCHAR*)in_str, len_conn_str_in, (SQLCHAR*)out_str, conn_str_out_max, ptr_conn_str_out, driver_completion ); if ( in_str ) { free( in_str ); } if ( out_str ) { if ( SQL_SUCCEEDED( ret_from_connect )) { ansi_to_unicode_copy( conn_str_out, out_str, SQL_NTS, connection ); } free( out_str ); } if ( ret_from_connect != SQL_SUCCESS ) { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; /* * get the errors from the driver before * loseing the connection */ if ( CHECK_SQLERROR( connection )) { do { ret = SQLERROR( connection, SQL_NULL_HENV, connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while( SQL_SUCCEEDED( ret )); } else if ( CHECK_SQLGETDIAGREC( connection )) { int rec = 1; do { ret = SQLGETDIAGREC( connection, SQL_HANDLE_DBC, connection -> driver_dbc, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); if ( SQL_SUCCEEDED( ret )) { __post_internal_error_ex( &connection -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while( SQL_SUCCEEDED( ret )); } /* * if it was a error then return now */ if ( !SQL_SUCCEEDED( ret_from_connect )) { __disconnect_part_one( connection ); sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret_from_connect, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } } connection -> unicode_driver = 0; } /* * we should be connected now */ connection -> state = STATE_C4; /* * did we get the type we wanted */ if ( connection -> driver_version != connection -> environment -> requested_version ) { connection -> driver_version = connection -> environment -> requested_version; __post_internal_error( &connection -> error, ERROR_01000, "Driver does not support the requested version", connection -> environment -> requested_version ); ret_from_connect = SQL_SUCCESS_WITH_INFO; } if ( !__connect_part_two( connection )) { __disconnect_part_two( connection ); __disconnect_part_one( connection ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( log_info.log_flag ) { if ( conn_str_out && wide_strlen( conn_str_out ) > 64 ) { sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tConnection Out [%.64s...]", __get_return_status( ret_from_connect, s1 ), __wstring_with_length_hide_pwd( s1, conn_str_out, SQL_NTS )); } else { char null[ 20 ]; strcpy( null, "NULL" ); sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tConnection Out [%s]", __get_return_status( ret_from_connect, s1 ), __wstring_with_length_hide_pwd( s1, conn_str_out, SQL_NTS )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } if ( warnings && ret_from_connect == SQL_SUCCESS ) { ret_from_connect = SQL_SUCCESS_WITH_INFO; } return function_return( SQL_HANDLE_DBC, connection, ret_from_connect ); } unixODBC-2.2.14-p2/DriverManager/SQLDriversW.c0100644000076400007640000002632611070160005017213 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDriversW.c,v 1.10 2008/09/29 14:02:45 lurcher Exp $ * * $Log: SQLDriversW.c,v $ * Revision 1.10 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.9 2005/07/17 09:11:23 lurcher * Fix bug in SQLDrivers that was stopping the return of the attribute length * * Revision 1.8 2004/07/25 00:42:02 peteralexharvey * for OS2 port * * Revision 1.7 2003/11/13 15:12:53 lurcher * * small change to ODBCConfig to have the password field in the driver * properties hide the password * Make both # and ; comments in ini files * * Revision 1.6 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/07/24 08:49:51 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.3 2002/05/21 14:19:44 lurcher * * * Update libtool to escape from AIX build problem * * Add fix to avoid file handle limitations * * Add more UNICODE changes, it looks like it is native 16 representation * the old way can be reproduced by defining UCS16BE * * Add iusql, its just the same as isql but uses the wide functions * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/05/15 10:57:44 nick * * Add initial support for VMS * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/01/02 09:55:04 nick * * More unicode bits * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLDriversW.c,v $"; #define BUFFERSIZE 1024 SQLRETURN SQLDriversW( SQLHENV henv, SQLUSMALLINT fdirection, SQLWCHAR *sz_driver_desc, SQLSMALLINT cb_driver_desc_max, SQLSMALLINT *pcb_driver_desc, SQLWCHAR *sz_driver_attributes, SQLSMALLINT cb_drvr_attr_max, SQLSMALLINT *pcb_drvr_attr ) { DMHENV environment = (DMHENV) henv; char buffer[ BUFFERSIZE + 1 ]; char object[ INI_MAX_OBJECT_NAME + 1 ]; SQLRETURN ret = SQL_SUCCESS; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tDirection = %d", environment, (int)fdirection ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_protect( SQL_HANDLE_ENV, environment ); if ( cb_driver_desc_max < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &environment -> error, ERROR_HY090, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } /* * the DataManager fails if this is in * * if ( cb_drvr_attr_max < 0 || cb_drvr_attr_max == 1 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &environment -> error, ERROR_HY090, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } */ /* * check that a version has been requested */ if ( environment -> requested_version == 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &environment -> error, ERROR_HY010, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( fdirection != SQL_FETCH_FIRST && fdirection != SQL_FETCH_NEXT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY103" ); __post_internal_error( &environment -> error, ERROR_HY103, NULL, environment -> requested_version ); return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); } if ( fdirection == SQL_FETCH_FIRST ) environment -> sql_driver_count = 0; else environment -> sql_driver_count ++; try_again: memset( buffer, '\0', sizeof( buffer )); memset( object, '\0', sizeof( object )); SQLGetPrivateProfileString( NULL, NULL, NULL, buffer, sizeof( buffer ), "ODBCINST.INI" ); if ( iniElement( buffer, '\0', '\0', environment -> sql_driver_count, object, sizeof( object )) != INI_SUCCESS ) { environment -> sql_driver_count = 0; ret = SQL_NO_DATA; } else { ret = SQL_SUCCESS; /* * this section is used for internal info */ if ( strcmp( object, "ODBC" ) == 0 ) { environment -> sql_driver_count ++; goto try_again; } if ( pcb_driver_desc ) *pcb_driver_desc = strlen( object ); if ( sz_driver_desc ) { if ( strlen( object ) >= cb_driver_desc_max ) { memcpy( sz_driver_desc, object, cb_driver_desc_max - 1 ); sz_driver_desc[ cb_driver_desc_max - 1 ] = '\0'; ret = SQL_SUCCESS_WITH_INFO; } else { SQLWCHAR *s1; s1 = ansi_to_unicode_alloc((SQLCHAR*) object, SQL_NTS, NULL ); if ( s1 ) { wide_strcpy( sz_driver_desc, s1 ); free( s1 ); } } } else { ret = SQL_SUCCESS_WITH_INFO; } if ( sz_driver_attributes || pcb_drvr_attr ) { HINI hIni; int string_length = 0; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szValue[INI_MAX_PROPERTY_NAME+1]; char szIniName[ INI_MAX_OBJECT_NAME + 1 ]; char buffer[ 1024 ]; int total_len = 0; char b1[ 512 ], b2[ 512 ]; /* * enumerate the driver attributes */ sprintf( szIniName, "%s/odbcinst.ini", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 )); memset( buffer, '\0', sizeof( buffer )); #ifdef __OS2__ if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', FALSE, 1L ) == INI_SUCCESS ) #else if ( iniOpen( &hIni, szIniName, "#;", '[', ']', '=', FALSE ) == INI_SUCCESS ) #endif { char pRetBuffer[ 256 ]; int nRetBuffer; iniObjectSeek( hIni, (char *)object ); iniPropertyFirst( hIni ); while ( iniPropertyEOL( hIni ) != TRUE ) { iniProperty( hIni, szPropertyName ); iniValue( hIni, szValue ); sprintf( buffer, "%s=%s", szPropertyName, szValue ); if ( total_len + strlen( buffer ) + 1 > cb_drvr_attr_max ) { ret = SQL_SUCCESS_WITH_INFO; break; } else { if ( sz_driver_attributes ) { SQLWCHAR *s1; s1 = ansi_to_unicode_alloc((SQLCHAR*) buffer, SQL_NTS, NULL ); if ( s1 ) { wide_strcpy( sz_driver_attributes, s1 ); free( s1 ); } sz_driver_attributes += strlen( buffer ) + 1; } } total_len += strlen( buffer ) + 1; iniPropertyNext( hIni ); } /* * add extra null */ if ( sz_driver_attributes ) *sz_driver_attributes = '\0'; if ( pcb_drvr_attr ) { *pcb_drvr_attr = total_len; } iniClose( hIni ); } } } if ( ret == SQL_SUCCESS_WITH_INFO ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 01004" ); __post_internal_error( &environment -> error, ERROR_01004, NULL, environment -> requested_version ); } if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } return function_return( SQL_HANDLE_ENV, environment, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLErrorW.c0100644000076400007640000003555611014552623016704 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLErrorW.c,v 1.8 2008/05/20 13:43:47 lurcher Exp $ * * $Log: SQLErrorW.c,v $ * Revision 1.8 2008/05/20 13:43:47 lurcher * Vms fixes * * Revision 1.7 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.5 2002/07/25 09:30:26 lurcher * * Additional unicode and iconv changes * * Revision 1.4 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.3 2002/05/21 14:19:44 lurcher * * * Update libtool to escape from AIX build problem * * Add fix to avoid file handle limitations * * Add more UNICODE changes, it looks like it is native 16 representation * the old way can be reproduced by defining UCS16BE * * Add iusql, its just the same as isql but uses the wide functions * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLErrorW.c,v $"; /* * unicode mapping function */ static SQLRETURN extract_sql_error_w( EHEAD *head, SQLWCHAR *sqlstate, SQLINTEGER *native_error, SQLWCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length ) { ERROR *err; SQLRETURN ret; if ( sqlstate ) { SQLWCHAR *tmp; tmp = ansi_to_unicode_alloc((SQLCHAR*) "00000", SQL_NTS, __get_connection( head )); wide_strcpy( sqlstate, tmp ); free( tmp ); } if ( head -> sql_error_head.error_count < 1 ) { return SQL_NO_DATA; } err = head -> sql_error_head.error_list_head; head -> sql_error_head.error_list_head = err -> next; /* * is it the last */ if ( head -> sql_error_head.error_list_tail == err ) head -> sql_error_head.error_list_tail = NULL; /* * not empty yet */ if ( head -> sql_error_head.error_list_head ) { head -> sql_error_head.error_list_head -> prev = NULL; } head -> sql_error_head.error_count --; if ( sqlstate ) { wide_strcpy( sqlstate, err -> sqlstate ); } if ( buffer_length < wide_strlen( err -> msg ) + 1 ) { ret = SQL_SUCCESS_WITH_INFO; } else { ret = SQL_SUCCESS; } if ( message_text ) { if ( ret == SQL_SUCCESS ) { wide_strcpy( message_text, err -> msg ); } else { memcpy( message_text, err -> msg, buffer_length * 2 ); message_text[ buffer_length - 1 ] = 0; } } if ( text_length ) { *text_length = wide_strlen( err -> msg ); } if ( native_error ) { *native_error = err -> native_error; } /* * clean up */ free( err -> msg ); free( err ); /* * map 3 to 2 if required */ if ( SQL_SUCCEEDED( ret ) && sqlstate ) __map_error_state_w( sqlstate, __get_version( head )); return ret; } SQLRETURN SQLErrorW( SQLHENV environment_handle, SQLHDBC connection_handle, SQLHSTMT statement_handle, SQLWCHAR *sqlstate, SQLINTEGER *native_error, SQLWCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length ) { SQLRETURN ret; SQLCHAR s0[ 32 ], s1[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; if ( statement_handle ) { DMHSTMT statement = ( DMHSTMT ) statement_handle; if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLERRORW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLERRORW( parent_statement -> connection, environment_handle, connection_handle, statement_handle, sqlstate, native_error, message_text, buffer_length, text_length ); } } } #endif return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_STMT, statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", statement, sqlstate, native_error, message_text, buffer_length, text_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } ret = extract_sql_error_w( &statement -> error, sqlstate, native_error, message_text, buffer_length, text_length ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { char *ts1, *ts2; sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), ( ts1 = unicode_to_ansi_alloc( sqlstate, SQL_NTS, statement -> connection )), __iptr_as_string( s0, native_error ), __sdata_as_string( s1, SQL_CHAR, text_length, ( ts2 = unicode_to_ansi_alloc( message_text, SQL_NTS, statement -> connection )))); free( ts1 ); free( ts2 ); } else { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_release( SQL_HANDLE_STMT, statement ); return ret; } else if ( connection_handle ) { DMHDBC connection = ( DMHDBC ) connection_handle; if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDBC parent_connection; parent_connection = find_parent_handle( connection, SQL_HANDLE_DBC ); if ( parent_connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLERRORW( parent_connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLERRORW( parent_connection, environment_handle, connection_handle, statement_handle, sqlstate, native_error, message_text, buffer_length, text_length ); } } } #endif return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_DBC, connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", connection, sqlstate, native_error, message_text, buffer_length, text_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } ret = extract_sql_error_w( &connection -> error, sqlstate, native_error, message_text, buffer_length, text_length ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { char *ts1, *ts2; sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), ts1 = unicode_to_ansi_alloc( sqlstate, SQL_NTS, connection ), __iptr_as_string( s0, native_error ), __sdata_as_string( s1, SQL_CHAR, text_length, ( ts2 = unicode_to_ansi_alloc( message_text, SQL_NTS, connection )))); free( ts1 ); free( ts2 ); } else { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_release( SQL_HANDLE_DBC, connection ); } else if ( environment_handle ) { DMHENV environment = ( DMHENV ) environment_handle; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_ENV, environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", environment, sqlstate, native_error, message_text, buffer_length, text_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } ret = extract_sql_error_w( &environment -> error, sqlstate, native_error, message_text, buffer_length, text_length ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { char *ts1, *ts2; sprintf( environment -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), ts1 = unicode_to_ansi_alloc( sqlstate, SQL_NTS, NULL ), __iptr_as_string( s0, native_error ), __sdata_as_string( s1, SQL_CHAR, text_length, ( ts2 = unicode_to_ansi_alloc( message_text, SQL_NTS, NULL )))); free( ts1 ); free( ts2 ); } else { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_release( SQL_HANDLE_ENV, environment ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } return ret; } unixODBC-2.2.14-p2/DriverManager/SQLExecDirectW.c0100644000076400007640000003064011055726342017625 0ustar nicknick/********************************************************************* * * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLExecDirectW.c,v 1.9 2008/08/29 08:01:38 lurcher Exp $ * * $Log: SQLExecDirectW.c,v $ * Revision 1.9 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.8 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.7 2006/04/11 10:22:56 lurcher * Fix a data type check * * Revision 1.6 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.3 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.2 2002/01/15 14:47:44 lurcher * * Reset stmt->prepared flag after entering a SQLParamData state from * SQLExecDirect * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/01/04 13:16:25 nick * * Add support for GNU portable threads and tidy up some UNICODE compile * warnings * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLExecDirectW.c,v $"; SQLRETURN SQLExecDirectW( SQLHSTMT statement_handle, SQLWCHAR *statement_text, SQLINTEGER text_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR *s1; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLEXECDIRECTW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLEXECDIRECTW( parent_statement -> connection, statement, statement_text, text_length ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { /* * allocate some space for the buffer */ if ( statement_text && text_length == SQL_NTS ) { s1 = malloc( wide_strlen( statement_text ) * 2 + LOG_MESSAGE_LEN * 2 ); } else if ( statement_text ) { s1 = malloc( text_length + LOG_MESSAGE_LEN * 2 ); } else { s1 = malloc( LOG_MESSAGE_LEN * 2 ); } sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tSQL = %s", statement, __wstring_with_length( s1, statement_text, text_length )); free( s1 ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( !statement_text ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY009" ); __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( text_length <= 0 && text_length != SQL_NTS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLEXECDIRECT ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver || CHECK_SQLEXECDIRECTW( statement -> connection )) { #ifdef NR_PROBE if ( !CHECK_SQLEXECDIRECTW( statement -> connection ) || !CHECK_SQLNUMRESULTCOLS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } #else if ( !CHECK_SQLEXECDIRECTW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } #endif ret = SQLEXECDIRECTW( statement -> connection, statement -> driver_stmt, statement_text, text_length ); } else { SQLCHAR *as1 = NULL; #ifdef NR_PROBE if ( !CHECK_SQLEXECDIRECT( statement -> connection ) || !CHECK_SQLNUMRESULTCOLS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } #else if ( !CHECK_SQLEXECDIRECT( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } #endif as1 = (SQLCHAR*) unicode_to_ansi_alloc( statement_text, text_length, statement -> connection ); ret = SQLEXECDIRECT( statement -> connection, statement -> driver_stmt, as1, text_length ); if ( as1 ) free( as1 ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE SQLRETURN local_ret; /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); } local_ret = SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); if ( statement -> numcols > 0 ) { statement -> state = STATE_S5; } else { statement -> state = STATE_S4; } #else /* * We don't know for sure */ statement -> hascols = 1; statement -> state = STATE_S5; #endif statement -> prepared = 0; /* * there is a issue here with transactions, but for the * moment * statement -> connection -> state = STATE_C6; */ } else if ( ret == SQL_NEED_DATA ) { statement -> interupted_func = SQL_API_SQLEXECDIRECT; statement -> interupted_state = statement -> state; statement -> state = STATE_S8; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLEXECDIRECT; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; statement -> prepared = 0; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLForeignKeysW.c0100644000076400007640000003137511055726342020041 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLForeignKeysW.c,v 1.8 2008/08/29 08:01:38 lurcher Exp $ * * $Log: SQLForeignKeysW.c,v $ * Revision 1.8 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLForeignKeysW.c,v $"; SQLRETURN SQLForeignKeysW( SQLHSTMT statement_handle, SQLWCHAR *szpk_catalog_name, SQLSMALLINT cbpk_catalog_name, SQLWCHAR *szpk_schema_name, SQLSMALLINT cbpk_schema_name, SQLWCHAR *szpk_table_name, SQLSMALLINT cbpk_table_name, SQLWCHAR *szfk_catalog_name, SQLSMALLINT cbfk_catalog_name, SQLWCHAR *szfk_schema_name, SQLSMALLINT cbfk_schema_name, SQLWCHAR *szfk_table_name, SQLSMALLINT cbfk_table_name ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s5[ 100 + LOG_MESSAGE_LEN ], s6[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLFOREIGNKEYSW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLFOREIGNKEYSW( parent_statement -> connection, statement, szpk_catalog_name, cbpk_catalog_name, szpk_schema_name, cbpk_schema_name, szpk_table_name, cbpk_table_name, szfk_catalog_name, cbfk_catalog_name, szfk_schema_name, cbfk_schema_name, szfk_table_name, cbfk_table_name ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tPK Catalog Name = %s\ \n\t\t\tPK Schema Name = %s\ \n\t\t\tPK Table Name = %s\ \n\t\t\tFK Catalog Name = %s\ \n\t\t\tFK Schema Name = %s\ \n\t\t\tFK Table Name = %s", statement, __wstring_with_length( s1, szpk_catalog_name, cbpk_catalog_name ), __wstring_with_length( s2, szpk_schema_name, cbpk_schema_name ), __wstring_with_length( s3, szpk_table_name, cbpk_table_name ), __wstring_with_length( s4, szfk_catalog_name, cbfk_catalog_name ), __wstring_with_length( s5, szfk_schema_name, cbfk_schema_name ), __wstring_with_length( s6, szfk_table_name, cbfk_table_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( cbpk_catalog_name < 0 && cbpk_catalog_name != SQL_NTS ) || ( cbpk_schema_name < 0 && cbpk_schema_name != SQL_NTS ) || ( cbpk_table_name < 0 && cbpk_table_name != SQL_NTS ) || ( cbfk_catalog_name < 0 && cbfk_catalog_name != SQL_NTS ) || ( cbfk_schema_name < 0 && cbfk_schema_name != SQL_NTS ) || ( cbfk_table_name < 0 && cbfk_table_name != SQL_NTS )) { __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLFOREIGNKEYS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver || CHECK_SQLFOREIGNKEYSW( statement -> connection )) { if ( !CHECK_SQLFOREIGNKEYSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLFOREIGNKEYSW( statement -> connection , statement -> driver_stmt, szpk_catalog_name, cbpk_catalog_name, szpk_schema_name, cbpk_schema_name, szpk_table_name, cbpk_table_name, szfk_catalog_name, cbfk_catalog_name, szfk_schema_name, cbfk_schema_name, szfk_table_name, cbfk_table_name ); } else { SQLCHAR *as1, *as2, *as3, *as4, *as5, *as6; if ( !CHECK_SQLFOREIGNKEYS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( szpk_catalog_name, cbpk_catalog_name, statement -> connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( szpk_schema_name, cbpk_schema_name, statement -> connection ); as3 = (SQLCHAR*) unicode_to_ansi_alloc( szpk_table_name, cbpk_table_name, statement -> connection ); as4 = (SQLCHAR*) unicode_to_ansi_alloc( szfk_catalog_name, cbfk_catalog_name, statement -> connection ); as5 = (SQLCHAR*) unicode_to_ansi_alloc( szfk_schema_name, cbfk_schema_name, statement -> connection ); as6 = (SQLCHAR*) unicode_to_ansi_alloc( szfk_table_name, cbfk_table_name, statement -> connection ); ret = SQLFOREIGNKEYS( statement -> connection , statement -> driver_stmt, as1, cbpk_catalog_name, as2, cbpk_schema_name, as3, cbpk_table_name, as4, cbfk_catalog_name, as5, cbfk_schema_name, as6, cbfk_table_name ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); if ( as3 ) free( as3 ); if ( as4 ) free( as4 ); if ( as5 ) free( as5 ); if ( as6 ) free( as6 ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); } SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); /******/ #endif statement -> hascols = 1; statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLFOREIGNKEYS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetConnectAttrW.c0100644000076400007640000004763511055726342020506 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetConnectAttrW.c,v 1.12 2008/08/29 08:01:38 lurcher Exp $ * * $Log: SQLGetConnectAttrW.c,v $ * Revision 1.12 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.11 2004/11/22 17:02:48 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.10 2003/10/30 18:20:45 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.9 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.8 2002/11/11 17:10:10 lurcher * * VMS changes * * Revision 1.7 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.6 2002/08/12 13:17:52 lurcher * * Replicate the way the MS DM handles loading of driver libs, and allocating * handles in the driver. usage counting in the driver means that dlopen is * only called for the first use, and dlclose for the last. AllocHandle for * the driver environment is only called for the first time per driver * per application environment. * * Revision 1.5 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.4 2002/07/16 13:08:18 lurcher * * Filter attribute values from SQLSetStmtAttr to SQLSetStmtOption to fit * within ODBC 2 * Make DSN's double clickable in ODBCConfig * * Revision 1.3 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.2 2001/12/04 16:46:19 lurcher * * Allow the Unix Domain Socket to be set from the ini file (DSN) * Make the DataManager browser work with drivers that don't support * SQLRowCount * Make the directory selection from odbctest work simplier * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/08/03 15:19:00 nick * * Add changes to set values before connect * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetConnectAttrW.c,v $"; SQLRETURN SQLGetConnectAttrW( SQLHDBC connection_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { DMHDBC connection = (DMHDBC)connection_handle; int type = 0; char *ptr; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * doesn't require a handle */ if ( attribute == SQL_ATTR_TRACE ) { if ( value ) { if ( log_info.log_flag ) { *((SQLINTEGER*)value) = SQL_OPT_TRACE_ON; } else { *((SQLINTEGER*)value) = SQL_OPT_TRACE_ON; } } return SQL_SUCCESS; } else if ( attribute == SQL_ATTR_TRACEFILE ) { SQLRETURN ret = SQL_SUCCESS; ptr = log_info.log_file_name; if ( ptr ) { int len = strlen( ptr ) * sizeof( SQLWCHAR ); if ( string_length ) { *string_length = len; } if ( value ) { if ( buffer_length > len + sizeof( SQLWCHAR )) { ansi_to_unicode_copy( value, ptr, SQL_NTS, connection ); } else { ansi_to_unicode_copy( value, ptr, buffer_length - 1, connection ); ((SQLWCHAR*)value)[( buffer_length - 1 ) / sizeof( SQLWCHAR )] = 0; ret = SQL_SUCCESS_WITH_INFO; } } } else { if ( string_length ) { *string_length = 0; } if ( value ) { if ( buffer_length > 0 ) { ((SQLWCHAR*)value)[ 0 ] = 0; } else { ret = SQL_SUCCESS_WITH_INFO; } } } return ret; } /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tAttribute = %s\ \n\t\t\tValue = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tStrLen = %p", connection, __con_attr_as_string( s1, attribute ), value, (int)buffer_length, (void*)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &connection -> error, ERROR_HY010, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( connection -> state == STATE_C2 ) { switch ( attribute ) { case SQL_ATTR_ACCESS_MODE: case SQL_ATTR_AUTOCOMMIT: case SQL_ATTR_LOGIN_TIMEOUT: case SQL_ATTR_ODBC_CURSORS: case SQL_ATTR_TRACE: case SQL_ATTR_TRACEFILE: case SQL_ATTR_ASYNC_ENABLE: case SQL_ATTR_AUTO_IPD: case SQL_ATTR_CONNECTION_TIMEOUT: case SQL_ATTR_METADATA_ID: case SQL_ATTR_PACKET_SIZE: case SQL_ATTR_QUIET_MODE: case SQL_ATTR_TXN_ISOLATION: break; default: dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } switch ( attribute ) { case SQL_ATTR_ACCESS_MODE: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> access_mode; type = 1; } break; case SQL_ATTR_AUTOCOMMIT: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> auto_commit; type = 1; } break; case SQL_ATTR_LOGIN_TIMEOUT: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> login_timeout; type = 1; } break; case SQL_ATTR_ODBC_CURSORS: *((SQLINTEGER*)value) = connection -> cursors; type = 1; break; case SQL_ATTR_TRACE: *((SQLINTEGER*)value) = connection -> trace; type = 1; break; case SQL_ATTR_TRACEFILE: ptr = connection -> tracefile; type = 2; break; case SQL_ATTR_ASYNC_ENABLE: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> async_enable; type = 1; } break; case SQL_ATTR_AUTO_IPD: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> auto_ipd; type = 1; } break; case SQL_ATTR_CONNECTION_TIMEOUT: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> connection_timeout; type = 1; } break; case SQL_ATTR_METADATA_ID: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> metadata_id; type = 1; } break; case SQL_ATTR_PACKET_SIZE: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> packet_size; type = 1; } break; case SQL_ATTR_QUIET_MODE: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> quite_mode; type = 1; } break; case SQL_ATTR_TXN_ISOLATION: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> txn_isolation; type = 1; } break; default: break; } /* * if type has been set we have already set the value, * so just return */ if ( type ) { SQLRETURN ret = SQL_SUCCESS; if ( type == 1 ) { if ( string_length ) { *string_length = sizeof( SQLUINTEGER ); } } else { if ( string_length ) { *string_length = strlen( ptr ); } if ( value ) { if ( buffer_length > strlen( ptr ) + 1 ) { strcpy( value, ptr ); } else { memcpy( value, ptr, buffer_length - 1 ); ((char*)value)[ buffer_length - 1 ] = '\0'; ret = SQL_SUCCESS_WITH_INFO; } } } sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, ret ); } else { SQLRETURN ret = 0; /* * call the driver */ if ( connection -> unicode_driver || CHECK_SQLGETCONNECTATTRW( connection ) || CHECK_SQLGETCONNECTOPTIONW( connection )) { if ( !CHECK_SQLGETCONNECTATTRW( connection )) { if ( CHECK_SQLGETCONNECTOPTIONW( connection )) { /* * Is it in the legal range of values */ if ( attribute < SQL_CONN_DRIVER_MIN && ( attribute > SQL_PACKET_SIZE || attribute < SQL_ACCESS_MODE )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &connection -> error, ERROR_HY092, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } ret = SQLGETCONNECTOPTIONW( connection, connection -> driver_dbc, attribute, value ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { ret = SQLGETCONNECTATTRW( connection, connection -> driver_dbc, attribute, value, buffer_length, string_length ); } } else { if ( !CHECK_SQLGETCONNECTATTR( connection )) { if ( ret = CHECK_SQLGETCONNECTOPTION( connection )) { SQLCHAR *as1 = NULL; /* * Is it in the legal range of values */ if ( attribute < SQL_CONN_DRIVER_MIN && ( attribute > SQL_PACKET_SIZE || attribute < SQL_ACCESS_MODE )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &connection -> error, ERROR_HY092, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( SQL_SUCCEEDED( ret ) && value && buffer_length > 0 ) { as1 = malloc( buffer_length + 1 ); } break; } ret = SQLGETCONNECTOPTION( connection, connection -> driver_dbc, attribute, as1 ? as1 : value ); switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( SQL_SUCCEEDED( ret ) && value && buffer_length > 0 && as1 ) { ansi_to_unicode_copy( value, (char*) as1, SQL_NTS, connection ); } if ( as1 ) { free( as1 ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length *= sizeof( SQLWCHAR ); } break; } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { SQLCHAR *as1 = NULL; switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: buffer_length = buffer_length / 2; if ( buffer_length > 0 ) { as1 = malloc( buffer_length + 1 ); } break; } ret = SQLGETCONNECTATTR( connection, connection -> driver_dbc, attribute, as1 ? as1 : value, buffer_length, string_length ); switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( SQL_SUCCEEDED( ret ) && value && buffer_length > 0 && as1 ) { ansi_to_unicode_copy( value, (char*)as1, SQL_NTS, connection ); } if ( as1 ) { free( as1 ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length *= sizeof( SQLWCHAR ); } break; } } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } } unixODBC-2.2.14-p2/DriverManager/SQLGetConnectOptionW.c0100644000076400007640000003224611055726342021034 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetConnectOptionW.c,v 1.8 2008/08/29 08:01:38 lurcher Exp $ * * $Log: SQLGetConnectOptionW.c,v $ * Revision 1.8 2008/08/29 08:01:38 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/11/11 17:10:12 lurcher * * VMS changes * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/08/03 15:19:00 nick * * Add changes to set values before connect * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetConnectOptionW.c,v $"; SQLRETURN SQLGetConnectOptionW( SQLHDBC connection_handle, SQLUSMALLINT option, SQLPOINTER value ) { DMHDBC connection = (DMHDBC)connection_handle; int type = 0; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * doesn't require a handle */ if ( option == SQL_ATTR_TRACE ) { if ( value ) { if ( log_info.log_flag ) { *((SQLINTEGER*)value) = SQL_OPT_TRACE_ON; } else { *((SQLINTEGER*)value) = SQL_OPT_TRACE_ON; } } return SQL_SUCCESS; } else if ( option == SQL_ATTR_TRACEFILE ) { SQLRETURN ret = SQL_SUCCESS; if ( log_info.log_file_name ) { ansi_to_unicode_copy( value, log_info.log_file_name, SQL_NTS, connection ); } else { ansi_to_unicode_copy( value, "", SQL_NTS, connection ); } return ret; } /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDBC parent_connection; parent_connection = find_parent_handle( connection, SQL_HANDLE_DBC ); if ( parent_connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETCONNECTOPTIONW( parent_connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETCONNECTOPTIONW( parent_connection, connection, option, value ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tOption = %s\ \n\t\t\tValue = %p", connection, __con_attr_as_string( s1, option ), value ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &connection -> error, ERROR_HY010, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( connection -> state == STATE_C2 ) { switch ( option ) { case SQL_ACCESS_MODE: case SQL_AUTOCOMMIT: break; default: dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } switch ( option ) { case SQL_ACCESS_MODE: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> access_mode; type = 1; } break; case SQL_AUTOCOMMIT: /* * if connected, call the driver */ if ( connection -> state != STATE_C2 ) { type = 0; } else { *((SQLINTEGER*)value) = connection -> auto_commit; type = 1; } break; case SQL_ODBC_CURSORS: *((SQLINTEGER*)value) = connection -> cursors; type = 1; break; default: break; } /* * if type has been set we have already set the value, * so just return */ if ( type ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, SQL_SUCCESS ); } else { SQLRETURN ret = 0; /* * call the driver */ if ( connection -> unicode_driver || CHECK_SQLGETCONNECTOPTIONW( connection ) || CHECK_SQLGETCONNECTATTRW( connection )) { if ( CHECK_SQLGETCONNECTOPTIONW( connection )) { ret = SQLGETCONNECTOPTIONW( connection, connection -> driver_dbc, option, value ); } else if ( CHECK_SQLGETCONNECTATTRW( connection )) { SQLINTEGER length, len; void * ptr; SQLWCHAR txt[ 1024 ]; switch( option ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: length = sizeof( txt ); ptr = txt; break; default: length = sizeof( SQLINTEGER ); ptr = value; break; } ret = SQLGETCONNECTATTRW( connection, connection -> driver_dbc, option, ptr, length, &len ); /* * not much else we can do here, lets assume that * there is enough space */ if ( ptr != value ) { wide_strcpy( value, ptr ); /* * are we still here ? good */ } } else { __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { if ( ret = CHECK_SQLGETCONNECTOPTION( connection )) { SQLCHAR *as1 = NULL; switch( option ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( SQL_SUCCEEDED( ret ) && value ) { /* * we need to chance out arm here, as we dont know */ as1 = malloc( 1024 ); } break; } ret = SQLGETCONNECTOPTION( connection, connection -> driver_dbc, option, as1 ? as1 : value ); switch( option ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( SQL_SUCCEEDED( ret ) && value && as1 ) { ansi_to_unicode_copy( value, (char*) as1, SQL_NTS, connection ); } if ( as1 ) { free( as1 ); } break; } } else if ( CHECK_SQLGETCONNECTATTR( connection )) { SQLINTEGER length, len; void * ptr; char txt[ 1024 ]; switch( option ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: length = sizeof( txt ); ptr = txt; break; default: length = sizeof( SQLINTEGER ); ptr = value; break; } ret = SQLGETCONNECTATTR( connection, connection -> driver_dbc, option, ptr, length, &len ); /* * not much else we can do here, lets assume that * there is enough space */ if ( ptr != value ) { SQLWCHAR *s1; s1 = ansi_to_unicode_alloc( value, SQL_NTS, connection ); if ( s1 ) { wide_strcpy( value, s1 ); free( s1 ); } /* * are we still here ? good */ } } else { __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } } unixODBC-2.2.14-p2/DriverManager/SQLGetCursorNameW.c0100644000076400007640000002075611055726343020334 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetCursorNameW.c,v 1.8 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLGetCursorNameW.c,v $ * Revision 1.8 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.3 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/01/04 13:16:25 nick * * Add support for GNU portable threads and tidy up some UNICODE compile * warnings * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetCursorNameW.c,v $"; SQLRETURN SQLGetCursorNameW( SQLHSTMT statement_handle, SQLWCHAR *cursor_name, SQLSMALLINT buffer_length, SQLSMALLINT *name_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETCURSORNAMEW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETCURSORNAMEW( parent_statement -> connection, statement_handle, cursor_name, buffer_length, name_length ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCursor Name = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tName Length= %p", statement, cursor_name, buffer_length, name_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( !buffer_length < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> connection -> unicode_driver || CHECK_SQLGETCURSORNAMEW( statement -> connection )) { if ( !CHECK_SQLGETCURSORNAMEW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLGETCURSORNAMEW( statement -> connection, statement -> driver_stmt, cursor_name, buffer_length, name_length ); } else { SQLCHAR *as1 = NULL; if ( !CHECK_SQLGETCURSORNAME( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( cursor_name && buffer_length > 0 ) { as1 = malloc( buffer_length + 1 ); } ret = SQLGETCURSORNAME( statement -> connection, statement -> driver_stmt, as1 ? as1 : (SQLCHAR*) cursor_name, buffer_length, name_length ); if ( SQL_SUCCEEDED( ret ) && cursor_name && as1 ) { ansi_to_unicode_copy( cursor_name, (char*) as1, SQL_NTS, statement -> connection ); } if ( as1 ) { free( as1 ); } } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tCursor Name = %s", __get_return_status( ret, s1 ), __sdata_as_string( s1, SQL_CHAR, name_length, cursor_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetDescFieldW.c0100644000076400007640000002255011055726343020072 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDescFieldW.c,v 1.8 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLGetDescFieldW.c,v $ * Revision 1.8 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2004/11/22 17:02:49 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/17 16:29:39 nick * * More checks and autotest fixes * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetDescFieldW.c,v $"; SQLRETURN SQLGetDescFieldW( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { /* * not quite sure how the descriptor can be * allocated to a statement, all the documentation talks * about state transitions on statement states, but the * descriptor may be allocated with more than one statement * at one time. Which one should I check ? */ DMHDESC descriptor = (DMHDESC) descriptor_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check descriptor */ if ( !__validate_desc( descriptor )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDESC parent_desc; parent_desc = find_parent_handle( descriptor, SQL_HANDLE_DESC ); if ( parent_desc ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETDESCFIELDW( parent_desc -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETDESCFIELDW( parent_desc -> connection, descriptor, rec_number, field_identifier, value, buffer_length, string_length ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( descriptor ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tEntry:\ \n\t\t\tDescriptor = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tField Attr = %s\ \n\t\t\tValue = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tStrLen = %p", descriptor, rec_number, __desc_attr_as_string( s1, field_identifier ), value, (int)buffer_length, (void*)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } thread_protect( SQL_HANDLE_DESC, descriptor ); if ( descriptor -> connection -> state < STATE_C4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &descriptor -> error, ERROR_HY010, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } if ( descriptor -> connection -> unicode_driver || CHECK_SQLGETDESCFIELDW( descriptor -> connection )) { if ( !CHECK_SQLGETDESCFIELDW( descriptor -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } ret = SQLGETDESCFIELDW( descriptor -> connection, descriptor -> driver_desc, rec_number, field_identifier, value, buffer_length, string_length ); } else { SQLCHAR *as1 = NULL; if ( !CHECK_SQLGETDESCFIELD( descriptor -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: if ( buffer_length > 0 && value ) { as1 = malloc( buffer_length + 1 ); } break; } ret = SQLGETDESCFIELD( descriptor -> connection, descriptor -> driver_desc, rec_number, field_identifier, as1 ? as1 : value, buffer_length, string_length ); if ( SQL_SUCCEEDED( ret ) && value ) { switch( field_identifier ) { case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: if ( as1 && buffer_length > 0 && value ) { ansi_to_unicode_copy( value, (char*) as1, SQL_NTS, descriptor -> connection ); } if ( string_length ) { *string_length *= sizeof( SQLWCHAR ); } break; } } if ( as1 ) { free( as1 ); } } if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } return function_return( SQL_HANDLE_DESC, descriptor, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetDescRecW.c0100644000076400007640000002340611055726343017561 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDescRecW.c,v 1.10 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLGetDescRecW.c,v $ * Revision 1.10 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.9 2007/04/02 10:50:19 lurcher * Fix some 64bit problems (only when sizeof(SQLLEN) == 8 ) * * Revision 1.8 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.7 2004/11/22 17:02:49 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.3 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/01/04 13:16:25 nick * * Add support for GNU portable threads and tidy up some UNICODE compile * warnings * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetDescRecW.c,v $"; SQLRETURN SQLGetDescRecW( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLWCHAR *name, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLSMALLINT *type, SQLSMALLINT *sub_type, SQLLEN *length, SQLSMALLINT *precision, SQLSMALLINT *scale, SQLSMALLINT *nullable ) { /* * not quite sure how the descriptor can be * allocated to a statement, all the documentation talks * about state transitions on statement states, but the * descriptor may be allocated with more than one statement * at one time. Which one should I check ? */ DMHDESC descriptor = (DMHDESC) descriptor_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s5[ 100 + LOG_MESSAGE_LEN ], s6[ 100 + LOG_MESSAGE_LEN ], s7[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s8[ 100 + LOG_MESSAGE_LEN ]; /* * check descriptor */ if ( !__validate_desc( descriptor )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDESC parent_desc; parent_desc = find_parent_handle( descriptor, SQL_HANDLE_DESC ); if ( parent_desc ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETDESCRECW( parent_desc -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETDESCRECW( parent_desc -> connection, descriptor, rec_number, name, buffer_length, string_length, type, sub_type, length, precision, scale, nullable ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( descriptor ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tEntry:\ \n\t\t\tDescriptor = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tName = %p\ \n\t\t\tBuffer length = %d\ \n\t\t\tString Length = %p\ \n\t\t\tType = %p\ \n\t\t\tSub Type = %p\ \n\t\t\tLength = %p\ \n\t\t\tPrecision = %p\ \n\t\t\tScale = %p\ \n\t\t\tNullable = %p", descriptor, rec_number, name, buffer_length, string_length, type, sub_type, length, precision, scale, nullable ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } thread_protect( SQL_HANDLE_DESC, descriptor ); if ( descriptor -> connection -> unicode_driver || CHECK_SQLGETDESCRECW( descriptor -> connection )) { if ( !CHECK_SQLGETDESCRECW( descriptor -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } ret = SQLGETDESCRECW( descriptor -> connection, descriptor -> driver_desc, rec_number, name, buffer_length, string_length, type, sub_type, length, precision, scale, nullable ); } else { SQLCHAR *as1 = NULL; if ( !CHECK_SQLGETDESCREC( descriptor -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } if ( name && buffer_length > 0 ) { as1 = malloc( buffer_length + 1 ); } ret = SQLGETDESCREC( descriptor -> connection, descriptor -> driver_desc, rec_number, as1 ? as1 : (SQLCHAR*) name, buffer_length, string_length, type, sub_type, length, precision, scale, nullable ); if ( SQL_SUCCEEDED( ret ) && name && as1 ) { ansi_to_unicode_copy( name, (char*) as1, SQL_NTS, descriptor -> connection ); } if ( as1 ) { free( as1 ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length *= sizeof( SQLWCHAR ); } } if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tExit:[%s]\ \n\t\t\tName = %s\ \n\t\t\tType = %s\ \n\t\t\tSub Type = %s\ \n\t\t\tLength = %s\ \n\t\t\tPrecision = %s\ \n\t\t\tScale = %s\ \n\t\t\tNullable = %s", __get_return_status( ret, s8 ), __sdata_as_string( s1, SQL_CHAR, string_length, name ), __sptr_as_string( s2, type ), __sptr_as_string( s3, sub_type ), __ptr_as_string( s4, length ), __sptr_as_string( s5, precision ), __sptr_as_string( s6, scale ), __sptr_as_string( s7, nullable )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } return function_return( SQL_HANDLE_DESC, descriptor, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetDiagFieldW.c0100644000076400007640000007205710571320714020061 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDiagFieldW.c,v 1.8 2007/02/28 15:37:48 lurcher Exp $ * * $Log: SQLGetDiagFieldW.c,v $ * Revision 1.8 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.7 2002/12/05 17:44:30 lurcher * * Display unknown return values in return logging * * Revision 1.6 2002/11/11 17:10:14 lurcher * * VMS changes * * Revision 1.5 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.4 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.3 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/01/04 13:16:25 nick * * Add support for GNU portable threads and tidy up some UNICODE compile * warnings * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetDiagFieldW.c,v $"; #define ODBC30_SUBCLASS "01S00,01S01,01S02,01S06,01S07,07S01,08S01,21S01,\ 21S02,25S01,25S02,25S03,42S01,42S02,42S11,42S12,42S21,42S22,HY095,HY097,HY098,\ HY099,HY100,HY101,HY105,HY107,HY109,HY110,HY111,HYT00,HYT01,IM001,IM002,IM003,\ IM004,IM005,IM006,IM007,IM008,IM010,IM011,IM012" static SQLRETURN extract_sql_error_field_w( EHEAD *head, SQLSMALLINT rec_number, SQLSMALLINT diag_identifier, SQLPOINTER diag_info_ptr, SQLSMALLINT buffer_length, SQLSMALLINT *string_length_ptr ) { ERROR *ptr; /* * check the header fields first */ switch( diag_identifier ) { case SQL_DIAG_CURSOR_ROW_COUNT: case SQL_DIAG_ROW_COUNT: { SQLINTEGER val; SQLRETURN ret; if ( head -> handle_type != SQL_HANDLE_STMT ) { return SQL_ERROR; } else if ( head -> header_set ) { switch( diag_identifier ) { case SQL_DIAG_CURSOR_ROW_COUNT: if ( SQL_SUCCEEDED( head -> diag_cursor_row_count_ret ) && diag_info_ptr ) { *((SQLINTEGER*)diag_info_ptr) = head -> diag_cursor_row_count; } return head -> diag_cursor_row_count_ret; case SQL_DIAG_ROW_COUNT: if ( SQL_SUCCEEDED( head -> diag_row_count_ret ) && diag_info_ptr ) { *((SQLINTEGER*)diag_info_ptr) = head -> diag_row_count; } return head -> diag_row_count_ret; } } else if ( __get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELDW( __get_connection( head ))) { ret = SQLGETDIAGFIELDW( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); return ret; } else if ( !__get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELD( __get_connection( head ))) { ret = SQLGETDIAGFIELD( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); return ret; } else if ( CHECK_SQLROWCOUNT( __get_connection( head ))) { ret = DEF_SQLROWCOUNT( __get_connection( head ), __get_driver_handle( head ), &val ); if ( !SQL_SUCCEEDED( ret )) { return ret; } } else { val = 0; } if ( diag_info_ptr ) { memcpy( diag_info_ptr, &val, sizeof( val )); } } return SQL_SUCCESS; case SQL_DIAG_DYNAMIC_FUNCTION: { SQLRETURN ret; if ( head -> handle_type != SQL_HANDLE_STMT ) { return SQL_ERROR; } else if ( head -> header_set ) { if ( SQL_SUCCEEDED( head -> diag_dynamic_function_ret ) && diag_info_ptr ) { wide_strncpy( diag_info_ptr, head -> diag_dynamic_function, buffer_length ); if ( string_length_ptr ) { *string_length_ptr = wide_strlen( head -> diag_dynamic_function ); } } return head -> diag_dynamic_function_ret; } else if ( __get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELDW( __get_connection( head ))) { ret = SQLGETDIAGFIELDW( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); return ret; } else if ( !__get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELD( __get_connection( head ))) { ret = SQLGETDIAGFIELDW( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); return ret; } if ( diag_info_ptr ) { strcpy( diag_info_ptr, "" ); } } return SQL_SUCCESS; case SQL_DIAG_DYNAMIC_FUNCTION_CODE: { SQLINTEGER val; SQLRETURN ret; if ( head -> handle_type != SQL_HANDLE_STMT ) { return SQL_ERROR; } else if ( head -> header_set ) { if ( SQL_SUCCEEDED( head -> diag_dynamic_function_code_ret ) && diag_info_ptr ) { *((SQLINTEGER*)diag_info_ptr) = head -> diag_dynamic_function_code; } return head -> diag_dynamic_function_code_ret; } else if ( __get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELDW( __get_connection( head ))) { ret = SQLGETDIAGFIELDW( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); return ret; } else if ( !__get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELD( __get_connection( head ))) { SQLCHAR *as1 = NULL; if ( buffer_length > 0 && diag_info_ptr ) { as1 = malloc( buffer_length + 1 ); } ret = SQLGETDIAGFIELD( __get_connection( head ), SQL_HANDLE_STMT, __get_driver_handle( head ), 0, diag_identifier, as1 ? as1 : diag_info_ptr, buffer_length / 2, string_length_ptr ); if ( SQL_SUCCEEDED( ret ) && as1 && diag_info_ptr ) { ansi_to_unicode_copy( diag_info_ptr, (char*) as1, SQL_NTS, __get_connection( head )); } if ( as1 ) { free( as1 ); } return ret; } else { val = SQL_DIAG_UNKNOWN_STATEMENT; } if ( diag_info_ptr ) { memcpy( diag_info_ptr, &val, sizeof( val )); } } return SQL_SUCCESS; case SQL_DIAG_NUMBER: { SQLINTEGER val; val = head -> sql_diag_head.internal_count + head -> sql_diag_head.error_count; if ( diag_info_ptr ) { memcpy( diag_info_ptr, &val, sizeof( val )); } } return SQL_SUCCESS; case SQL_DIAG_RETURNCODE: { if ( diag_info_ptr ) { memcpy( diag_info_ptr, &head -> return_code, sizeof( head -> return_code )); } } return SQL_SUCCESS; } /* * else check the records */ if ( rec_number < 1 ) { return SQL_ERROR; } if ( rec_number <= head -> sql_diag_head.internal_count ) { /* * local errors */ ptr = head -> sql_diag_head.internal_list_head; while( rec_number > 1 ) { ptr = ptr -> next; rec_number --; } } else if ( rec_number <= head -> sql_diag_head.internal_count + head -> sql_diag_head.error_count ) { rec_number -= head -> sql_diag_head.internal_count; if ( __get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELDW( __get_connection( head ))) { SQLRETURN ret; ret = SQLGETDIAGFIELDW( __get_connection( head ), head -> handle_type, __get_driver_handle( head ), rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); if ( SQL_SUCCEEDED( ret ) && diag_identifier == SQL_DIAG_SQLSTATE ) { /* * map 3 to 2 if required */ if ( diag_info_ptr ) __map_error_state_w( diag_info_ptr, __get_version( head )); } return ret; } else if ( !__get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGFIELD( __get_connection( head ))) { SQLRETURN ret; SQLCHAR *as1 = NULL; if ( diag_identifier == SQL_DIAG_SQLSTATE && diag_info_ptr && buffer_length > 0 ) { as1 = malloc( buffer_length + 1 ); } ret = SQLGETDIAGFIELD( __get_connection( head ), head -> handle_type, __get_driver_handle( head ), rec_number, diag_identifier, as1 ? as1 : diag_info_ptr, buffer_length, string_length_ptr ); if ( SQL_SUCCEEDED( ret ) && diag_identifier == SQL_DIAG_SQLSTATE ) { /* * map 3 to 2 if required */ if ( diag_info_ptr && as1 ) { __map_error_state( (char*) as1, __get_version( head )); ansi_to_unicode_copy( diag_info_ptr, (char*) as1, SQL_NTS, __get_connection( head )); } } if ( as1 ) { free( as1 ); } return ret; } else { ptr = head -> sql_diag_head.error_list_head; while( rec_number > 1 ) { ptr = ptr -> next; rec_number --; } } } else { return SQL_NO_DATA; } /* * if we are here ptr should point to the error * record */ switch( diag_identifier ) { case SQL_DIAG_CLASS_ORIGIN: { if ( SQL_SUCCEEDED( ptr -> diag_class_origin_ret )) { wide_strncpy( diag_info_ptr, ptr -> diag_class_origin, buffer_length ); if ( string_length_ptr ) { *string_length_ptr = wide_strlen( ptr -> diag_class_origin ); } return ptr -> diag_class_origin_ret; } else { return ptr -> diag_class_origin_ret; } } break; case SQL_DIAG_COLUMN_NUMBER: { if ( diag_info_ptr ) { memcpy( diag_info_ptr, &ptr -> diag_column_number, sizeof( SQLINTEGER )); } return SQL_SUCCESS; } break; case SQL_DIAG_CONNECTION_NAME: { if ( SQL_SUCCEEDED( ptr -> diag_connection_name_ret )) { wide_strcpy( diag_info_ptr, ptr -> diag_connection_name ); if ( string_length_ptr ) { *string_length_ptr = wide_strlen( ptr -> diag_connection_name ); } return ptr -> diag_connection_name_ret; } else { return ptr -> diag_connection_name_ret; } } break; case SQL_DIAG_MESSAGE_TEXT: { SQLWCHAR *str; int ret = SQL_SUCCESS; str = ptr -> msg; if ( diag_info_ptr ) { if ( buffer_length >= wide_strlen( str ) + 1 ) { wide_strcpy( diag_info_ptr, str ); } else { ret = SQL_SUCCESS_WITH_INFO; memcpy( diag_info_ptr, str, ( buffer_length - 1 ) * 2 ); (( SQLWCHAR * ) diag_info_ptr )[ buffer_length - 1 ] = '\0'; } } if ( string_length_ptr ) { *string_length_ptr = wide_strlen( str ); } free( str ); return ret; } break; case SQL_DIAG_NATIVE: { if ( diag_info_ptr ) { memcpy( diag_info_ptr, &ptr -> native_error, sizeof( SQLINTEGER )); } return SQL_SUCCESS; } break; case SQL_DIAG_ROW_NUMBER: { if ( diag_info_ptr ) { memcpy( diag_info_ptr, &ptr -> diag_row_number, sizeof( SQLINTEGER )); } return SQL_SUCCESS; } break; case SQL_DIAG_SERVER_NAME: { if ( SQL_SUCCEEDED( ptr -> diag_server_name_ret )) { wide_strcpy( diag_info_ptr, ptr -> diag_server_name ); if ( string_length_ptr ) { *string_length_ptr = wide_strlen( ptr -> diag_server_name ); } return ptr -> diag_server_name_ret; } else { return ptr -> diag_server_name_ret; } } break; case SQL_DIAG_SQLSTATE: { SQLWCHAR *str; int ret = SQL_SUCCESS; str = ptr -> sqlstate; if ( diag_info_ptr ) { if ( buffer_length >= wide_strlen( str ) + 1 ) { wide_strcpy( diag_info_ptr, str ); } else { ret = SQL_SUCCESS_WITH_INFO; memcpy( diag_info_ptr, str, ( buffer_length - 1 ) * 2 ); (( SQLWCHAR * ) diag_info_ptr )[ buffer_length - 1 ] = '\0'; } /* * map 3 to 2 if required */ if ( diag_info_ptr ) __map_error_state_w( diag_info_ptr, __get_version( head )); } if ( string_length_ptr ) { *string_length_ptr = wide_strlen( str ); } return ret; } break; case SQL_DIAG_SUBCLASS_ORIGIN: { if ( SQL_SUCCEEDED( ptr -> diag_subclass_origin_ret )) { wide_strcpy( diag_info_ptr, ptr -> diag_subclass_origin ); if ( string_length_ptr ) { *string_length_ptr = wide_strlen( ptr -> diag_subclass_origin ); } return ptr -> diag_subclass_origin_ret; } else { return ptr -> diag_subclass_origin_ret; } } break; } return SQL_SUCCESS; } SQLRETURN SQLGetDiagFieldW( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT rec_number, SQLSMALLINT diag_identifier, SQLPOINTER diag_info_ptr, SQLSMALLINT buffer_length, SQLSMALLINT *string_length_ptr ) { SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; if ( handle_type == SQL_HANDLE_ENV ) { DMHENV environment = ( DMHENV ) handle; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_ENV, environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tDiag Ident = %d\ \n\t\t\tDiag Info Ptr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Len Ptr = %p", environment, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } ret = extract_sql_error_field_w( &environment -> error, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_release( SQL_HANDLE_ENV, environment ); return ret; } else if ( handle_type == SQL_HANDLE_DBC ) { DMHDBC connection = ( DMHDBC ) handle; if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDBC parent_connection; parent_connection = find_parent_handle( connection, SQL_HANDLE_DBC ); if ( parent_connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETDIAGFIELDW( parent_connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETDIAGFIELDW( parent_connection, handle_type, connection, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); } } } #endif return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_DBC, connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tDiag Ident = %d\ \n\t\t\tDiag Info Ptr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Len Ptr = %p", connection, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } ret = extract_sql_error_field_w( &connection -> error, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_release( SQL_HANDLE_DBC, connection ); return ret; } else if ( handle_type == SQL_HANDLE_STMT ) { DMHSTMT statement = ( DMHSTMT ) handle; if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETDIAGFIELDW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETDIAGFIELDW( parent_statement -> connection, handle_type, statement, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); } } } #endif return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_STMT, statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tDiag Ident = %d\ \n\t\t\tDiag Info Ptr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Len Ptr = %p", statement, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } ret = extract_sql_error_field_w( &statement -> error, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_release( SQL_HANDLE_STMT, statement ); return ret; } else if ( handle_type == SQL_HANDLE_DESC ) { DMHDESC descriptor = ( DMHDESC ) handle; if ( !__validate_desc( descriptor )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDESC parent_desc; parent_desc = find_parent_handle( descriptor, SQL_HANDLE_DESC ); if ( parent_desc ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETDIAGFIELDW( parent_desc -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETDIAGFIELDW( parent_desc -> connection, handle_type, descriptor, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); } } } #endif return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_DESC, descriptor ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tEntry:\ \n\t\t\tDescriptor = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tDiag Ident = %d\ \n\t\t\tDiag Info Ptr = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tString Len Ptr = %p", descriptor, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } ret = extract_sql_error_field_w( &descriptor -> error, rec_number, diag_identifier, diag_info_ptr, buffer_length, string_length_ptr ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } thread_release( SQL_HANDLE_DESC, descriptor ); return ret; } return SQL_NO_DATA; } unixODBC-2.2.14-p2/DriverManager/SQLGetDiagRecW.c0100644000076400007640000005501210722527763017552 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDiagRecW.c,v 1.9 2007/11/26 11:37:23 lurcher Exp $ * * $Log: SQLGetDiagRecW.c,v $ * Revision 1.9 2007/11/26 11:37:23 lurcher * Sync up before tag * * Revision 1.8 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.7 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.6 2002/11/11 17:10:17 lurcher * * VMS changes * * Revision 1.5 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.4 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.3 2002/05/21 14:19:44 lurcher * * * Update libtool to escape from AIX build problem * * Add fix to avoid file handle limitations * * Add more UNICODE changes, it looks like it is native 16 representation * the old way can be reproduced by defining UCS16BE * * Add iusql, its just the same as isql but uses the wide functions * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetDiagRecW.c,v $"; static SQLRETURN extract_sql_error_rec_w( EHEAD *head, SQLWCHAR *sqlstate, SQLINTEGER rec_number, SQLINTEGER *native_error, SQLWCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length ) { SQLRETURN ret; if ( sqlstate ) { SQLWCHAR *tmp; tmp = ansi_to_unicode_alloc((SQLCHAR*) "00000", SQL_NTS, __get_connection( head )); wide_strcpy( sqlstate, tmp ); free( tmp ); } if ( rec_number <= head -> sql_diag_head.internal_count ) { ERROR *ptr; ptr = head -> sql_diag_head.internal_list_head; while( rec_number > 1 ) { ptr = ptr -> next; rec_number --; } if ( sqlstate ) { wide_strcpy( sqlstate, ptr -> sqlstate ); } if ( buffer_length < wide_strlen( ptr -> msg ) + 1 ) { ret = SQL_SUCCESS_WITH_INFO; } else { ret = SQL_SUCCESS; } if ( message_text ) { if ( ret == SQL_SUCCESS ) { wide_strcpy( message_text, ptr -> msg ); } else { memcpy( message_text, ptr -> msg, buffer_length * 2 ); message_text[ buffer_length - 1 ] = '\0'; } } if ( text_length ) { *text_length = wide_strlen( ptr -> msg ); } if ( native_error ) { *native_error = ptr -> native_error; } /* * map 3 to 2 if required */ if ( SQL_SUCCEEDED( ret ) && sqlstate ) __map_error_state((char*) sqlstate, __get_version( head )); return ret; } else if ( rec_number <= head -> sql_diag_head.internal_count + head -> sql_diag_head.error_count ) { ERROR *ptr; rec_number -= head -> sql_diag_head.internal_count; if ( __get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGRECW( __get_connection( head ))) { ret = SQLGETDIAGRECW( __get_connection( head ), head -> handle_type, __get_driver_handle( head ), rec_number, sqlstate, native_error, message_text, buffer_length, text_length ); /* * map 3 to 2 if required */ if ( SQL_SUCCEEDED( ret ) && sqlstate ) { __map_error_state_w( sqlstate, __get_version( head )); } return ret; } else if ( !__get_connection( head ) -> unicode_driver && CHECK_SQLGETDIAGREC( __get_connection( head ))) { SQLCHAR *as1 = NULL, *as2 = NULL; if ( sqlstate ) { as1 = malloc( 7 ); } if ( message_text && buffer_length > 0 ) { as2 = malloc( buffer_length + 1 ); } ret = SQLGETDIAGREC( __get_connection( head ), head -> handle_type, __get_driver_handle( head ), rec_number, as1 ? as1 : (SQLCHAR *)sqlstate, native_error, as2 ? as2 : (SQLCHAR *)message_text, buffer_length, text_length ); /* * map 3 to 2 if required */ if ( SQL_SUCCEEDED( ret ) && sqlstate ) { if ( sqlstate ) { if ( as1 ) { ansi_to_unicode_copy( sqlstate,(char*) as1, SQL_NTS, __get_connection( head )); __map_error_state_w( sqlstate, __get_version( head )); } } if ( message_text ) { if ( as2 ) { ansi_to_unicode_copy( message_text,(char*) as2, SQL_NTS, __get_connection( head )); } } } if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); return ret; } else { ptr = head -> sql_diag_head.error_list_head; while( rec_number > 1 ) { ptr = ptr -> next; rec_number --; } if ( sqlstate ) { wide_strcpy( sqlstate, ptr -> sqlstate ); } if ( buffer_length < wide_strlen( ptr -> msg ) + 1 ) { ret = SQL_SUCCESS_WITH_INFO; } else { ret = SQL_SUCCESS; } if ( message_text ) { if ( ret == SQL_SUCCESS ) { wide_strcpy( message_text, ptr -> msg ); } else { memcpy( message_text, ptr -> msg, buffer_length * 2 ); message_text[ buffer_length - 1 ] = '\0'; } } if ( text_length ) { *text_length = wide_strlen( ptr -> msg ); } if ( native_error ) { *native_error = ptr -> native_error; } /* * map 3 to 2 if required */ if ( SQL_SUCCEEDED( ret ) && sqlstate ) __map_error_state_w( sqlstate, __get_version( head )); return ret; } } else { return SQL_NO_DATA; } } SQLRETURN SQLGetDiagRecW( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT rec_number, SQLWCHAR *sqlstate, SQLINTEGER *native, SQLWCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length_ptr ) { SQLRETURN ret; SQLCHAR s0[ 32 ], s1[ 100 + LOG_MESSAGE_LEN ]; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; if ( rec_number < 1 ) { return SQL_ERROR; } if ( handle_type == SQL_HANDLE_ENV ) { DMHENV environment = ( DMHENV ) handle; if ( !__validate_env( environment )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_ENV, environment ); if ( log_info.log_flag ) { sprintf( environment -> msg, "\n\t\tEntry:\ \n\t\t\tEnvironment = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", environment, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } ret = extract_sql_error_rec_w( &environment -> error, sqlstate, rec_number, native, message_text, buffer_length, text_length_ptr ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { char *ts1, *ts2; sprintf( environment -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), ts1 = unicode_to_ansi_alloc( sqlstate, SQL_NTS, NULL ), __iptr_as_string( s0, native ), __sdata_as_string( s1, SQL_CHAR, text_length_ptr, ts2 = unicode_to_ansi_alloc( message_text, SQL_NTS, NULL ))); free( ts1 ); free( ts2 ); } else { sprintf( environment -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } thread_release( SQL_HANDLE_ENV, environment ); return ret; } else if ( handle_type == SQL_HANDLE_DBC ) { DMHDBC connection = ( DMHDBC ) handle; if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDBC parent_connection; parent_connection = find_parent_handle( connection, SQL_HANDLE_DBC ); if ( parent_connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETDIAGRECW( parent_connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETDIAGRECW( parent_connection, handle_type, connection, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); } } } #endif return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_DBC, connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", connection, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } ret = extract_sql_error_rec_w( &connection -> error, sqlstate, rec_number, native, message_text, buffer_length, text_length_ptr ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { char *ts1, *ts2; sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), ts1 = unicode_to_ansi_alloc( sqlstate, SQL_NTS, connection ), __iptr_as_string( s0, native ), __sdata_as_string( s1, SQL_CHAR, text_length_ptr, ts2 = unicode_to_ansi_alloc( message_text, SQL_NTS, connection ))); free( ts1 ); free( ts2 ); } else { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_release( SQL_HANDLE_DBC, connection ); return ret; } else if ( handle_type == SQL_HANDLE_STMT ) { DMHSTMT statement = ( DMHSTMT ) handle; if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETDIAGRECW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETDIAGRECW( parent_statement -> connection, handle_type, statement, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); } } } #endif return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_STMT, statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", statement, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } ret = extract_sql_error_rec_w( &statement -> error, sqlstate, rec_number, native, message_text, buffer_length, text_length_ptr ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { char *ts1, *ts2; sprintf( statement -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), ts1 = unicode_to_ansi_alloc( sqlstate, SQL_NTS, statement -> connection ), __iptr_as_string( s0, native ), __sdata_as_string( s1, SQL_CHAR, text_length_ptr, ts2 = unicode_to_ansi_alloc( message_text, SQL_NTS, statement -> connection ))); free( ts1 ); free( ts2 ); } else { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_release( SQL_HANDLE_STMT, statement ); return ret; } else if ( handle_type == SQL_HANDLE_DESC ) { DMHDESC descriptor = ( DMHDESC ) handle; if ( !__validate_desc( descriptor )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDESC parent_desc; parent_desc = find_parent_handle( descriptor, SQL_HANDLE_DESC ); if ( parent_desc ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETDIAGRECW( parent_desc -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETDIAGRECW( parent_desc -> connection, handle_type, descriptor, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); } } } #endif return SQL_INVALID_HANDLE; } thread_protect( SQL_HANDLE_DESC, descriptor ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tEntry:\ \n\t\t\tDescriptor = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tSQLState = %p\ \n\t\t\tNative = %p\ \n\t\t\tMessage Text = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tText Len Ptr = %p", descriptor, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } ret = extract_sql_error_rec_w( &descriptor -> error, sqlstate, rec_number, native, message_text, buffer_length, text_length_ptr ); if ( log_info.log_flag ) { if ( SQL_SUCCEEDED( ret )) { char *ts1, *ts2; sprintf( descriptor -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQLState = %s\ \n\t\t\tNative = %s\ \n\t\t\tMessage Text = %s", __get_return_status( ret, s2 ), ts1 = unicode_to_ansi_alloc( sqlstate, SQL_NTS, descriptor -> connection ), __iptr_as_string( s0, native ), __sdata_as_string( s1, SQL_CHAR, text_length_ptr, ts2 = unicode_to_ansi_alloc( message_text, SQL_NTS, descriptor -> connection ))); free( ts1 ); free( ts2 ); } else { sprintf( descriptor -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); } dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } thread_release( SQL_HANDLE_DESC, descriptor ); return ret; } return SQL_NO_DATA; } unixODBC-2.2.14-p2/DriverManager/SQLGetInfoW.c0100644000076400007640000004232511055726343017145 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetInfoW.c,v 1.13 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLGetInfoW.c,v $ * Revision 1.13 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.12 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.11 2005/10/06 08:50:58 lurcher * Fix problem with SQLDrivers not returning first entry * * Revision 1.10 2004/11/22 17:02:49 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.9 2004/11/20 13:21:38 lurcher * Fix unicode bug in SQLGetInfoW * * Revision 1.8 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.7 2003/03/05 09:48:44 lurcher * * Add some 64 bit fixes * * Revision 1.6 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.5 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.4 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.3 2002/05/21 14:19:44 lurcher * * * Update libtool to escape from AIX build problem * * Add fix to avoid file handle limitations * * Add more UNICODE changes, it looks like it is native 16 representation * the old way can be reproduced by defining UCS16BE * * Add iusql, its just the same as isql but uses the wide functions * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:05 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetInfoW.c,v $"; SQLRETURN SQLGetInfoW( SQLHDBC connection_handle, SQLUSMALLINT info_type, SQLPOINTER info_value, SQLSMALLINT buffer_length, SQLSMALLINT *string_length ) { DMHDBC connection = (DMHDBC)connection_handle; SQLRETURN ret = SQL_SUCCESS; int type; char txt[ 30 ], *cptr; SQLPOINTER *ptr; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; SQLUSMALLINT sval; /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDBC parent_connection; parent_connection = find_parent_handle( connection, SQL_HANDLE_DBC ); if ( parent_connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETINFOW( parent_connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETINFOW( parent_connection, connection_handle, info_type, info_value, buffer_length, string_length ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tInfo Type = %s\ \n\t\t\tInfo Value = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tStrLen = %p", connection, __info_as_string( s1, info_type ), info_value, (int)buffer_length, (void*)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( info_type != SQL_ODBC_VER && connection -> state == STATE_C2 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else if ( connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( buffer_length < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } switch ( info_type ) { case SQL_DATA_SOURCE_NAME: type = 1; cptr = connection -> dsn; break; case SQL_DM_VER: type = 1; sprintf( txt, "%02d.%02d.%04d.%04d", SQL_SPEC_MAJOR, SQL_SPEC_MINOR, atoi( VERSION ), atoi( VERSION + 2 )); cptr = txt; break; case SQL_ODBC_VER: type = 1; sprintf( txt, "%02d.%02d", SQL_SPEC_MAJOR, SQL_SPEC_MINOR ); cptr = txt; break; case SQL_DRIVER_HDBC: type = 2; ptr = (SQLPOINTER) connection -> driver_dbc; break; case SQL_DRIVER_HENV: type = 2; ptr = (SQLPOINTER) connection -> driver_env; break; case SQL_DRIVER_HDESC: { DMHDESC hdesc = *((DMHDESC*) info_value); type = 2; if ( __validate_desc( hdesc )) { ptr = (SQLPOINTER) hdesc -> driver_desc; } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY024" ); __post_internal_error( &connection -> error, ERROR_HY024, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } break; case SQL_DRIVER_HLIB: type = 2; ptr = connection -> dl_handle; break; case SQL_DRIVER_HSTMT: { DMHSTMT hstmt = *((DMHSTMT*) info_value); type = 2; if ( __validate_stmt( hstmt )) { ptr = (SQLPOINTER) hstmt -> driver_stmt; } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY024" ); __post_internal_error( &connection -> error, ERROR_HY024, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } break; case SQL_XOPEN_CLI_YEAR: type = 1; cptr = "1994"; break; case SQL_ATTR_DRIVER_THREADING: type = 3; sval = connection -> threading_level; break; default: /* * pass all the others on */ if ( connection -> unicode_driver || CHECK_SQLGETINFOW( connection )) { if ( !CHECK_SQLGETINFOW( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } ret = SQLGETINFOW( connection, connection -> driver_dbc, info_type, info_value, buffer_length, string_length ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } } else { SQLCHAR *as1 = NULL; if ( !CHECK_SQLGETINFO( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } switch( info_type ) { case SQL_ACCESSIBLE_PROCEDURES: case SQL_ACCESSIBLE_TABLES: case SQL_CATALOG_NAME: case SQL_CATALOG_NAME_SEPARATOR: case SQL_CATALOG_TERM: case SQL_COLLATION_SEQ: case SQL_COLUMN_ALIAS: case SQL_DATA_SOURCE_NAME: case SQL_DATA_SOURCE_READ_ONLY: case SQL_DATABASE_NAME: case SQL_DBMS_NAME: case SQL_DBMS_VER: case SQL_DESCRIBE_PARAMETER: case SQL_DRIVER_NAME: case SQL_DRIVER_ODBC_VER: case SQL_DRIVER_VER: case SQL_ODBC_VER: case SQL_EXPRESSIONS_IN_ORDERBY: case SQL_IDENTIFIER_QUOTE_CHAR: case SQL_INTEGRITY: case SQL_KEYWORDS: case SQL_LIKE_ESCAPE_CLAUSE: case SQL_MAX_ROW_SIZE_INCLUDES_LONG: case SQL_MULT_RESULT_SETS: case SQL_MULTIPLE_ACTIVE_TXN: case SQL_NEED_LONG_DATA_LEN: case SQL_ORDER_BY_COLUMNS_IN_SELECT: case SQL_PROCEDURE_TERM: case SQL_PROCEDURES: case SQL_ROW_UPDATES: case SQL_SCHEMA_TERM: case SQL_SEARCH_PATTERN_ESCAPE: case SQL_SERVER_NAME: case SQL_SPECIAL_CHARACTERS: case SQL_TABLE_TERM: case SQL_USER_NAME: case SQL_XOPEN_CLI_YEAR: case SQL_OUTER_JOINS: if ( SQL_SUCCEEDED( ret ) && info_value && buffer_length > 0 ) { as1 = malloc( buffer_length + 1 ); } break; } ret = SQLGETINFO( connection, connection -> driver_dbc, info_type, as1 ? as1 : info_value, buffer_length, string_length ); switch( info_type ) { case SQL_ACCESSIBLE_PROCEDURES: case SQL_ACCESSIBLE_TABLES: case SQL_CATALOG_NAME: case SQL_CATALOG_NAME_SEPARATOR: case SQL_CATALOG_TERM: case SQL_COLLATION_SEQ: case SQL_COLUMN_ALIAS: case SQL_DATA_SOURCE_NAME: case SQL_DATA_SOURCE_READ_ONLY: case SQL_DATABASE_NAME: case SQL_DBMS_NAME: case SQL_DBMS_VER: case SQL_DESCRIBE_PARAMETER: case SQL_DRIVER_NAME: case SQL_DRIVER_ODBC_VER: case SQL_DRIVER_VER: case SQL_ODBC_VER: case SQL_EXPRESSIONS_IN_ORDERBY: case SQL_IDENTIFIER_QUOTE_CHAR: case SQL_INTEGRITY: case SQL_KEYWORDS: case SQL_LIKE_ESCAPE_CLAUSE: case SQL_MAX_ROW_SIZE_INCLUDES_LONG: case SQL_MULT_RESULT_SETS: case SQL_MULTIPLE_ACTIVE_TXN: case SQL_NEED_LONG_DATA_LEN: case SQL_ORDER_BY_COLUMNS_IN_SELECT: case SQL_PROCEDURE_TERM: case SQL_PROCEDURES: case SQL_ROW_UPDATES: case SQL_SCHEMA_TERM: case SQL_SEARCH_PATTERN_ESCAPE: case SQL_SERVER_NAME: case SQL_SPECIAL_CHARACTERS: case SQL_TABLE_TERM: case SQL_USER_NAME: case SQL_XOPEN_CLI_YEAR: case SQL_OUTER_JOINS: if ( SQL_SUCCEEDED( ret ) && info_value && as1 ) { ansi_to_unicode_copy( info_value, (char*) as1, SQL_NTS, connection ); } if ( SQL_SUCCEEDED( ret ) && string_length ) { *string_length *= sizeof( SQLWCHAR ); } break; } if ( as1 ) free( as1 ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } } return function_return( SQL_HANDLE_DBC, connection, ret ); } if ( type == 1 ) { SQLWCHAR *s1; int len; s1 = ansi_to_unicode_alloc((SQLCHAR*) cptr, SQL_NTS, connection ); len = strlen( cptr ) * sizeof( SQLWCHAR ); if ( string_length ) *string_length = len; if ( info_value ) { if ( buffer_length > len + 1 ) { wide_strcpy( info_value, s1 ); } else { memcpy( info_value, s1, ( buffer_length - 1 * sizeof( SQLWCHAR ))); ((SQLWCHAR*)info_value)[ buffer_length - 1 ] = '\0'; ret = SQL_SUCCESS_WITH_INFO; } } if ( s1 ) free( s1 ); } else if ( type == 2 ) { if ( info_value ) *((void **)info_value) = ptr; if ( string_length ) *string_length = sizeof( SQLPOINTER ); } else if ( type == 3 ) { if ( info_value ) *((SQLUSMALLINT *)info_value) = sval; if ( string_length ) *string_length = sizeof( SQLUSMALLINT ); } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetStmtAttrW.c0100644000076400007640000002347211055726343020036 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetStmtAttrW.c,v 1.5 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLGetStmtAttrW.c,v $ * Revision 1.5 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.4 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.3 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetStmtAttrW.c,v $"; SQLRETURN SQLGetStmtAttrW( SQLHSTMT statement_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETSTMTATTRW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETSTMTATTRW( parent_statement -> connection, statement_handle, attribute, value, buffer_length, string_length ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tAttribute = %s\ \n\t\t\tValue = %p\ \n\t\t\tBuffer Length = %d\ \n\t\t\tStrLen = %p", statement, __stmt_attr_as_string( s1, attribute ), value, (int)buffer_length, (void*)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( attribute == SQL_ATTR_ROW_NUMBER ) { if ( statement -> state == STATE_S1 || statement -> state == STATE_S2 || statement -> state == STATE_S3 || statement -> state == STATE_S4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * states S5 - S7 are handled by the driver */ if ( statement -> connection -> unicode_driver || CHECK_SQLGETSTMTATTRW( statement -> connection )) { if ( !CHECK_SQLGETSTMTATTRW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } else { if ( !CHECK_SQLGETSTMTATTR( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * map descriptors to our copies */ if ( attribute == SQL_ATTR_APP_ROW_DESC ) { if ( value ) memcpy( value, &statement -> ard, sizeof( statement -> ard )); ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_APP_PARAM_DESC ) { if ( value ) memcpy( value, &statement -> apd, sizeof( SQLHANDLE )); ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_IMP_ROW_DESC ) { if ( value ) memcpy( value, &statement -> ird, sizeof( SQLHANDLE )); ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_IMP_PARAM_DESC ) { if ( value ) memcpy( value, &statement -> ipd, sizeof( SQLHANDLE )); ret = SQL_SUCCESS; } /* * does the call need mapping from 3 to 2 */ else if ( attribute == SQL_ATTR_FETCH_BOOKMARK_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && CHECK_SQLEXTENDEDFETCH( statement -> connection )) { if ( value ) memcpy( value, &statement -> fetch_bm_ptr, sizeof( SQLINTEGER * )); ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_ROW_STATUS_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && CHECK_SQLEXTENDEDFETCH( statement -> connection )) { if ( value ) memcpy( value, &statement -> row_st_arr, sizeof( SQLINTEGER * )); ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_ROWS_FETCHED_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && CHECK_SQLEXTENDEDFETCH( statement -> connection )) { if ( value ) memcpy( value, &statement -> row_ct_ptr, sizeof( SQLUINTEGER * )); ret = SQL_SUCCESS; } else { if ( statement -> connection -> unicode_driver ) { ret = SQLGETSTMTATTRW( statement -> connection, statement -> driver_stmt, attribute, value, buffer_length, string_length ); } else { /* * don't know if any string attributes to convert... */ ret = SQLGETSTMTATTR( statement -> connection, statement -> driver_stmt, attribute, value, buffer_length, string_length ); } } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLGetTypeInfoW.c0100644000076400007640000002034111055726343020001 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetTypeInfoW.c,v 1.6 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLGetTypeInfoW.c,v $ * Revision 1.6 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.5 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.4 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.3 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLGetTypeInfoW.c,v $"; SQLRETURN SQLGetTypeInfoW( SQLHSTMT statement_handle, SQLSMALLINT data_type ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLGETTYPEINFOW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLGETTYPEINFOW( parent_statement -> connection, statement_handle, data_type ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tData Type = %s", statement, __type_as_string( s1, data_type )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLGETTYPEINFO ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver || CHECK_SQLGETTYPEINFOW( statement -> connection )) { if ( !CHECK_SQLGETTYPEINFOW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLGETTYPEINFOW( statement -> connection , statement -> driver_stmt, data_type ); } else { if ( !CHECK_SQLGETTYPEINFO( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLGETTYPEINFO( statement -> connection , statement -> driver_stmt, data_type ); } if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLGETTYPEINFO; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLNativeSqlW.c0100644000076400007640000002410511055726343017514 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLNativeSqlW.c,v 1.8 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLNativeSqlW.c,v $ * Revision 1.8 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.3 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/01/02 09:55:04 nick * * More unicode bits * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLNativeSqlW.c,v $"; SQLRETURN SQLNativeSqlW( SQLHDBC hdbc, SQLWCHAR *sz_sql_str_in, SQLINTEGER cb_sql_str_in, SQLWCHAR *sz_sql_str, SQLINTEGER cb_sql_str_max, SQLINTEGER *pcb_sql_str ) { DMHDBC connection = (DMHDBC)hdbc; SQLRETURN ret; SQLCHAR *s1; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDBC parent_connection; parent_connection = find_parent_handle( connection, SQL_HANDLE_DBC ); if ( parent_connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLNATIVESQLW( parent_connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLNATIVESQLW( parent_connection, connection, sz_sql_str_in, cb_sql_str_in, sz_sql_str, cb_sql_str_max, pcb_sql_str ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { /* * allocate some space for the buffer */ if ( sz_sql_str_in && cb_sql_str_in == SQL_NTS ) { s1 = malloc(( wide_strlen( sz_sql_str_in ) * 2 ) + 100 ); } else if ( sz_sql_str_in ) { s1 = malloc( cb_sql_str_in + 100 ); } else { s1 = malloc( 101 ); } sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tSQL In = %s\ \n\t\t\tSQL Out = %p\ \n\t\t\tSQL Out Len = %d\ \n\t\t\tSQL Len Ptr = %p", connection, __wstring_with_length( s1, sz_sql_str_in, cb_sql_str_in ), sz_sql_str, (int)cb_sql_str_max, pcb_sql_str ); free( s1 ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( !sz_sql_str_in ) { __post_internal_error( &connection -> error, ERROR_HY009, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( cb_sql_str_in < 0 && cb_sql_str_in != SQL_NTS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( sz_sql_str && cb_sql_str_max < 0 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &connection -> error, ERROR_HY090, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( connection -> state == STATE_C2 || connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( connection -> unicode_driver || CHECK_SQLNATIVESQLW( connection )) { if ( !CHECK_SQLNATIVESQLW( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } ret = SQLNATIVESQLW( connection, connection -> driver_dbc, sz_sql_str_in, cb_sql_str_in, sz_sql_str, cb_sql_str_max, pcb_sql_str ); } else { SQLCHAR *as1 = NULL, *as2 = NULL; if ( !CHECK_SQLNATIVESQL( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( sz_sql_str_in, cb_sql_str_in, connection ); if ( cb_sql_str_max > 0 && sz_sql_str ) { as2 = malloc( cb_sql_str_max + 1 ); } ret = SQLNATIVESQL( connection, connection -> driver_dbc, as1 ? as1 : (SQLCHAR*) sz_sql_str_in, cb_sql_str_in, as2 ? as2 : (SQLCHAR*) sz_sql_str, cb_sql_str_max, pcb_sql_str ); if ( SQL_SUCCEEDED( ret ) && as2 && sz_sql_str ) { ansi_to_unicode_copy( sz_sql_str, (char*) as2, SQL_NTS, connection ); } if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); } if ( log_info.log_flag ) { /* * allocate some space for the buffer */ if ( sz_sql_str && pcb_sql_str && *pcb_sql_str == SQL_NTS ) { s1 = malloc( wide_strlen( sz_sql_str ) * 2 + 100 ); } else if ( sz_sql_str && pcb_sql_str ) { s1 = malloc( *pcb_sql_str + 100 ); } else if ( sz_sql_str ) { s1 = malloc( wide_strlen( sz_sql_str ) * 2 + 100 ); } else { s1 = malloc( 101 ); } sprintf( connection -> msg, "\n\t\tExit:[%s]\ \n\t\t\tSQL Out = %s", __get_return_status( ret, s2 ), __data_as_string( s1, SQL_CHAR, (SQLLEN*)pcb_sql_str, sz_sql_str )); free( s1 ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLPrepareW.c0100644000076400007640000002346311055726343017212 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLPrepareW.c,v 1.7 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLPrepareW.c,v $ * Revision 1.7 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.6 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLPrepareW.c,v $"; SQLRETURN SQLPrepareW( SQLHSTMT statement_handle, SQLWCHAR *statement_text, SQLINTEGER text_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR *s1; SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLPREPAREW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLPREPAREW( parent_statement -> connection, statement_handle, statement_text, text_length ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { /* * allocate some space for the buffer */ if ( statement_text && text_length == SQL_NTS ) { s1 = malloc( wide_strlen( statement_text ) + 100 ); } else if ( statement_text ) { s1 = malloc( text_length + 100 ); } else { s1 = malloc( 101 ); } sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tSQL = %s", statement, __wstring_with_length( s1, statement_text, text_length )); free( s1 ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( !statement_text ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY009" ); __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( text_length <= 0 && text_length != SQL_NTS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLPREPARE ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver || CHECK_SQLPREPAREW( statement -> connection )) { if ( !CHECK_SQLPREPAREW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLPREPAREW( statement -> connection , statement -> driver_stmt, statement_text, text_length ); } else { SQLCHAR *as1; if ( !CHECK_SQLPREPARE( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( statement_text, text_length, statement -> connection ); ret = SQLPREPARE( statement -> connection , statement -> driver_stmt, as1, text_length ); if ( as1 ) free( as1 ); } if ( SQL_SUCCEEDED( ret )) { statement -> hascols = 0; statement -> state = STATE_S3; statement -> prepared = 1; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLPREPARE; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s2 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLPrimaryKeysW.c0100644000076400007640000002574411055726343020077 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLPrimaryKeysW.c,v 1.8 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLPrimaryKeysW.c,v $ * Revision 1.8 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLPrimaryKeysW.c,v $"; SQLRETURN SQLPrimaryKeysW( SQLHSTMT statement_handle, SQLWCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLWCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLWCHAR *sz_table_name, SQLSMALLINT cb_table_name ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLPRIMARYKEYSW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLPRIMARYKEYSW( parent_statement -> connection, statement_handle, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_table_name, cb_table_name ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Type = %s", statement, __wstring_with_length( s1, sz_catalog_name, cb_catalog_name ), __wstring_with_length( s2, sz_schema_name, cb_schema_name ), __wstring_with_length( s3, sz_table_name, cb_table_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( cb_catalog_name < 0 && cb_catalog_name != SQL_NTS ) || ( cb_schema_name < 0 && cb_schema_name != SQL_NTS ) || ( cb_table_name < 0 && cb_table_name != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLPRIMARYKEYS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver || CHECK_SQLPRIMARYKEYSW( statement -> connection )) { if ( !CHECK_SQLPRIMARYKEYSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLPRIMARYKEYSW( statement -> connection , statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_table_name, cb_table_name ); } else { SQLCHAR *as1, *as2, *as3; if ( !CHECK_SQLPRIMARYKEYS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( sz_catalog_name, cb_catalog_name, statement -> connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( sz_schema_name, cb_schema_name, statement -> connection ); as3 = (SQLCHAR*) unicode_to_ansi_alloc( sz_table_name, cb_table_name, statement -> connection ); ret = SQLPRIMARYKEYS( statement -> connection , statement -> driver_stmt, as1, cb_catalog_name, as2, cb_schema_name, as3, cb_table_name ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); if ( as3 ) free( as3 ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* * grab any errors */ if ( ret == SQL_SUCCESS_WITH_INFO ) { function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); } SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); /******/ #endif statement -> hascols = 1; statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLPRIMARYKEYS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLProcedureColumnsW.c0100644000076400007640000002621611055726343021104 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLProcedureColumnsW.c,v 1.8 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLProcedureColumnsW.c,v $ * Revision 1.8 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLProcedureColumnsW.c,v $"; SQLRETURN SQLProcedureColumnsW( SQLHSTMT statement_handle, SQLWCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLWCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLWCHAR *sz_proc_name, SQLSMALLINT cb_proc_name, SQLWCHAR *sz_column_name, SQLSMALLINT cb_column_name ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLPROCEDURECOLUMNSW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLPROCEDURECOLUMNSW( parent_statement -> connection, statement_handle, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_proc_name, cb_proc_name, sz_column_name, cb_column_name ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tProc Name = %s\ \n\t\t\tColumn Type = %s", statement, __wstring_with_length( s1, sz_catalog_name, cb_catalog_name ), __wstring_with_length( s2, sz_schema_name, cb_schema_name ), __wstring_with_length( s3, sz_proc_name, cb_proc_name ), __wstring_with_length( s4, sz_column_name, cb_column_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( cb_catalog_name < 0 && cb_catalog_name != SQL_NTS ) || ( cb_schema_name < 0 && cb_schema_name != SQL_NTS ) || ( cb_proc_name < 0 && cb_proc_name != SQL_NTS ) || ( cb_column_name < 0 && cb_column_name != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLPROCEDURECOLUMNS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver || CHECK_SQLPROCEDURECOLUMNSW( statement -> connection )) { if ( !CHECK_SQLPROCEDURECOLUMNSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLPROCEDURECOLUMNSW( statement -> connection , statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_proc_name, cb_proc_name, sz_column_name, cb_column_name ); } else { SQLCHAR *as1, *as2, *as3, *as4; if ( !CHECK_SQLPROCEDURECOLUMNS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( sz_catalog_name, cb_catalog_name, statement -> connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( sz_schema_name, cb_schema_name, statement -> connection ); as3 = (SQLCHAR*) unicode_to_ansi_alloc( sz_proc_name, cb_proc_name, statement -> connection ); as4 = (SQLCHAR*) unicode_to_ansi_alloc( sz_column_name, cb_column_name, statement -> connection ); ret = SQLPROCEDURECOLUMNS( statement -> connection , statement -> driver_stmt, as1, cb_catalog_name, as2, cb_schema_name, as3, cb_proc_name, as4, cb_column_name ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); if ( as3 ) free( as3 ); if ( as4 ) free( as4 ); } if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLPROCEDURECOLUMNS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLProceduresW.c0100644000076400007640000002476311055726343017733 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLProceduresW.c,v 1.8 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLProceduresW.c,v $ * Revision 1.8 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:06 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLProceduresW.c,v $ $Revision: 1.8 $"; SQLRETURN SQLProceduresW( SQLHSTMT statement_handle, SQLWCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLWCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLWCHAR *sz_proc_name, SQLSMALLINT cb_proc_name ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLPROCEDURESW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLPROCEDURESW( parent_statement -> connection, statement_handle, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_proc_name, cb_proc_name ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tProc Name = %s", statement, __wstring_with_length( s1, sz_catalog_name, cb_catalog_name ), __wstring_with_length( s2, sz_schema_name, cb_schema_name ), __wstring_with_length( s3, sz_proc_name, cb_proc_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( cb_catalog_name < 0 && cb_catalog_name != SQL_NTS ) || ( cb_schema_name < 0 && cb_schema_name != SQL_NTS ) || ( cb_proc_name < 0 && cb_proc_name != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLPROCEDURES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver || CHECK_SQLPROCEDURESW( statement -> connection )) { if ( !CHECK_SQLPROCEDURESW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLPROCEDURESW( statement -> connection , statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_proc_name, cb_proc_name ); } else { SQLCHAR *as1, *as2, *as3; if ( !CHECK_SQLPROCEDURES( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( sz_catalog_name, cb_catalog_name, statement -> connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( sz_schema_name, cb_schema_name, statement -> connection ); as3 = (SQLCHAR*) unicode_to_ansi_alloc( sz_proc_name, cb_proc_name, statement -> connection ); ret = SQLPROCEDURES( statement -> connection , statement -> driver_stmt, as1, cb_catalog_name, as2, cb_schema_name, as3, cb_proc_name ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); if ( as3 ) free( as3 ); } if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLPROCEDURES; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetConnectAttrW.c0100644000076400007640000004574711055726343020525 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetConnectAttrW.c,v 1.13 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLSetConnectAttrW.c,v $ * Revision 1.13 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.12 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.11 2006/04/18 10:24:47 lurcher * Add a couple of changes from Mark Vanderwiel * * Revision 1.10 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.9 2003/03/05 09:48:44 lurcher * * Add some 64 bit fixes * * Revision 1.8 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.7 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.6 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.5 2002/07/16 13:08:18 lurcher * * Filter attribute values from SQLSetStmtAttr to SQLSetStmtOption to fit * within ODBC 2 * Make DSN's double clickable in ODBCConfig * * Revision 1.4 2002/07/04 17:27:56 lurcher * * Small bug fixes * * Revision 1.3 2002/01/30 12:20:02 lurcher * * Add MyODBC 3 driver source * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.7 2001/09/27 17:05:48 nick * * Assorted fixes and tweeks * * Revision 1.6 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.5 2001/08/03 15:19:00 nick * * Add changes to set values before connect * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/05/23 13:48:37 nick * * Remove unwanted include * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetConnectAttrW.c,v $"; SQLRETURN SQLSetConnectAttrW( SQLHDBC connection_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER string_length ) { DMHDBC connection = (DMHDBC)connection_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; SQLWCHAR buffer[ 512 ]; /* * doesn't require a handle */ if ( attribute == SQL_ATTR_TRACE ) { if ((SQLLEN) value == SQL_OPT_TRACE_OFF ) { char force_string[ 30 ]; SQLGetPrivateProfileString( "ODBC", "ForceTrace", "0", force_string, sizeof( force_string ), "ODBCINST.INI" ); if ( force_string[ 0 ] == '1' || toupper( force_string[ 0 ] ) == 'Y' || ( toupper( force_string[ 0 ] ) == 'O' && toupper( force_string[ 1 ] ) == 'N' )) { if ( log_info.log_flag ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Application tried to turn logging off" ); } } else { if ( log_info.log_flag ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Application turning logging off" ); } log_info.log_flag = 0; } } else { log_info.log_flag = 1; } return SQL_SUCCESS; } else if ( attribute == SQL_ATTR_TRACEFILE ) { if ( value ) { if ( log_info.log_file_name ) { free( log_info.log_file_name ); } log_info.log_file_name = unicode_to_ansi_alloc( value, SQL_NTS, connection ); } return SQL_SUCCESS; } /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDBC parent_connection; parent_connection = find_parent_handle( connection, SQL_HANDLE_DBC ); if ( parent_connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLSETCONNECTATTRW( parent_connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLSETCONNECTATTRW( parent_connection, connection_handle, attribute, value, string_length ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tAttribute = %s\ \n\t\t\tValue = %p\ \n\t\t\tStrLen = %d", connection, __con_attr_as_string( s1, attribute ), value, string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C2 ) { if ( attribute == SQL_ATTR_TRANSLATE_OPTION || attribute == SQL_ATTR_TRANSLATE_LIB ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else if ( connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &connection -> error, ERROR_HY010, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else if ( connection -> state == STATE_C4 || connection -> state == STATE_C5 || connection -> state == STATE_C6 ) { if ( attribute == SQL_ATTR_ODBC_CURSORS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else if ( attribute == SQL_ATTR_PACKET_SIZE ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY011" ); __post_internal_error( &connection -> error, ERROR_HY011, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } /* * is it something overridden */ value = __attr_override_wide( connection, SQL_HANDLE_DBC, attribute, value, &string_length, buffer ); /* * we need to save this even if connected so we can use it for the next connetc */ if ( attribute == SQL_ATTR_LOGIN_TIMEOUT ) { connection -> login_timeout = ( SQLLEN ) value; connection -> login_timeout_set = 1; } /* * if connected, call the driver * otherwise we need to save the states and set them when we * do connect */ if ( connection -> state == STATE_C2 ) { /* * is it for us */ if ( attribute == SQL_ATTR_ODBC_CURSORS ) { connection -> cursors = ( SQLLEN ) value; } else if ( attribute == SQL_ATTR_ACCESS_MODE ) { connection -> access_mode = ( SQLLEN ) value; connection -> access_mode_set = 1; } else if ( attribute == SQL_ATTR_ASYNC_ENABLE ) { connection -> async_enable = ( SQLLEN ) value; connection -> async_enable_set = 1; } else if ( attribute == SQL_ATTR_AUTO_IPD ) { connection -> auto_ipd = ( SQLLEN ) value; connection -> auto_ipd_set = 1; } else if ( attribute == SQL_ATTR_AUTOCOMMIT ) { connection -> auto_commit = ( SQLLEN ) value; connection -> auto_commit_set = 1; } else if ( attribute == SQL_ATTR_CONNECTION_TIMEOUT ) { connection -> connection_timeout = ( SQLLEN ) value; connection -> connection_timeout_set = 1; } else if ( attribute == SQL_ATTR_METADATA_ID ) { connection -> metadata_id = ( SQLLEN ) value; connection -> metadata_id_set = 1; } else if ( attribute == SQL_ATTR_PACKET_SIZE ) { connection -> packet_size = ( SQLLEN ) value; connection -> packet_size_set = 1; } else if ( attribute == SQL_ATTR_QUIET_MODE ) { connection -> quite_mode = ( SQLLEN ) value; connection -> quite_mode_set = 1; } else if ( attribute == SQL_ATTR_TXN_ISOLATION ) { connection -> txn_isolation = ( SQLLEN ) value; connection -> txn_isolation_set = 1; } else { /* * save any unknown attributes untill connect */ struct save_attr *sa = calloc( 1, sizeof( struct save_attr )); sa -> attr_type = attribute; if ( string_length > 0 ) { sa -> str_attr = malloc( string_length ); memcpy( sa -> str_attr, value, string_length ); sa -> str_len = string_length; } else if ( string_length == SQL_NTS ) { sa -> str_attr = strdup( value ); sa -> str_len = string_length; } else { sa -> int_attr = ( SQLLEN ) value; } sa -> next = connection -> save_attr; connection -> save_attr = sa; } sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); return function_return( SQL_HANDLE_DBC, connection, SQL_SUCCESS ); } else { if ( connection -> unicode_driver || CHECK_SQLSETCONNECTATTRW( connection )) { if ( !CHECK_SQLSETCONNECTATTRW( connection )) { if ( CHECK_SQLSETCONNECTOPTIONW( connection )) { /* * Is it in the legal range of values */ if ( attribute < SQL_CONN_DRIVER_MIN && ( attribute > SQL_PACKET_SIZE || attribute < SQL_ACCESS_MODE )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &connection -> error, ERROR_HY092, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } ret = SQLSETCONNECTOPTIONW( connection, connection -> driver_dbc, attribute, value ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { ret = SQLSETCONNECTATTRW( connection, connection -> driver_dbc, attribute, value, string_length ); } } else { if ( !CHECK_SQLSETCONNECTATTR( connection )) { if ( CHECK_SQLSETCONNECTOPTION( connection )) { SQLCHAR *as1 = NULL; /* * Is it in the legal range of values */ if ( attribute < SQL_CONN_DRIVER_MIN && ( attribute > SQL_PACKET_SIZE || attribute < SQL_ACCESS_MODE )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY092" ); __post_internal_error( &connection -> error, ERROR_HY092, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( value ) { as1 = (SQLCHAR*) unicode_to_ansi_alloc( value, SQL_NTS, connection ); } break; } ret = SQLSETCONNECTOPTION( connection, connection -> driver_dbc, attribute, as1 ? as1 : value ); if ( as1 ) free( as1 ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else { SQLCHAR *as1 = NULL; switch( attribute ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if ( value ) { if ( string_length > 0 ) { as1 = (SQLCHAR*) unicode_to_ansi_alloc( value, string_length, connection ); } else if ( string_length == SQL_NTS ) { as1 = (SQLCHAR*) unicode_to_ansi_alloc( value, SQL_NTS, connection ); } } break; } ret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, attribute, as1 ? as1 : value, string_length ); if ( as1 ) free( as1 ); } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } } /* * catch this */ if ( attribute == SQL_ATTR_USE_BOOKMARKS && SQL_SUCCEEDED( ret )) { connection -> bookmarks_on = (SQLULEN) value; } return function_return( SQL_HANDLE_DBC, connection, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetConnectOptionW.c0100644000076400007640000002700310571320714021036 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetConnectOptionW.c,v 1.9 2007/02/28 15:37:48 lurcher Exp $ * * $Log: SQLSetConnectOptionW.c,v $ * Revision 1.9 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.8 2006/04/18 10:24:47 lurcher * Add a couple of changes from Mark Vanderwiel * * Revision 1.7 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.6 2003/03/05 09:48:45 lurcher * * Add some 64 bit fixes * * Revision 1.5 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.3 2002/01/30 12:20:02 lurcher * * Add MyODBC 3 driver source * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.4 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetConnectOptionW.c,v $"; SQLRETURN SQLSetConnectOptionW( SQLHDBC connection_handle, SQLUSMALLINT option, SQLULEN value ) { DMHDBC connection = (DMHDBC)connection_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; SQLWCHAR buffer[ 512 ]; /* * doesn't require a handle */ if ( option == SQL_ATTR_TRACE ) { if ( value == SQL_OPT_TRACE_OFF ) { log_info.log_flag = 0; } else { log_info.log_flag = 1; } return SQL_SUCCESS; } else if ( option == SQL_ATTR_TRACEFILE ) { if ( value ) { if ( log_info.log_file_name ) { free( log_info.log_file_name ); } log_info.log_file_name = unicode_to_ansi_alloc((SQLWCHAR *) value, SQL_NTS, connection ); } return SQL_SUCCESS; } /* * check connection */ if ( !__validate_dbc( connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDBC parent_connection; parent_connection = find_parent_handle( connection, SQL_HANDLE_DBC ); if ( parent_connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLSETCONNECTOPTIONW( parent_connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLSETCONNECTOPTIONW( parent_connection, connection_handle, option, value ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( connection ); if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tEntry:\ \n\t\t\tConnection = %p\ \n\t\t\tOption = %s\ \n\t\t\tValue = %d", connection, __con_attr_as_string( s1, option ), (int)value ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } thread_protect( SQL_HANDLE_DBC, connection ); if ( connection -> state == STATE_C2 ) { if ( option == SQL_TRANSLATE_OPTION || option == SQL_TRANSLATE_DLL ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08003" ); __post_internal_error( &connection -> error, ERROR_08003, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else if ( connection -> state == STATE_C3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &connection -> error, ERROR_HY010, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else if ( connection -> state == STATE_C4 || connection -> state == STATE_C5 ) { if ( option == SQL_ODBC_CURSORS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } else if ( connection -> state == STATE_C6 ) { if ( option == SQL_ODBC_CURSORS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 08002" ); __post_internal_error( &connection -> error, ERROR_08002, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } else if ( option == SQL_TXN_ISOLATION ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1011" ); __post_internal_error( &connection -> error, ERROR_S1011, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } } /* * is it something overridden */ value = (SQLULEN) __attr_override_wide( connection, SQL_HANDLE_DBC, option, (void*) value, NULL, buffer ); if ( option == SQL_ODBC_CURSORS ) { connection -> cursors = value; ret = SQL_SUCCESS; } else if ( option == SQL_LOGIN_TIMEOUT ) { connection -> login_timeout_set = 1; connection -> login_timeout = value; ret = SQL_SUCCESS; } else if ( connection -> state == STATE_C2 ) { if ( option == SQL_AUTOCOMMIT ) { connection -> auto_commit = ( SQLINTEGER ) value; connection -> auto_commit_set = 1; } else if ( option == SQL_ATTR_QUIET_MODE ) { connection -> quite_mode = ( SQLLEN ) value; connection -> quite_mode_set = 1; } else { /* * save any unknown attributes untill connect */ struct save_attr *sa = calloc( 1, sizeof( struct save_attr )); sa -> attr_type = option; sa -> int_attr = ( SQLINTEGER ) value; sa -> next = connection -> save_attr; connection -> save_attr = sa; } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_SUCCESS, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } return function_return( SQL_HANDLE_DBC, connection, SQL_SUCCESS ); } else { /* * call the driver */ if ( CHECK_SQLSETCONNECTOPTIONW( connection )) { ret = SQLSETCONNECTOPTIONW( connection, connection -> driver_dbc, option, value ); } else if ( CHECK_SQLSETCONNECTATTRW( connection )) { SQLINTEGER string_length; switch( option ) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: string_length = SQL_NTS; break; default: string_length = 0; break; } ret = SQLSETCONNECTATTRW( connection, connection -> driver_dbc, option, value, string_length ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &connection -> error, ERROR_IM001, NULL, connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); } if ( log_info.log_flag ) { sprintf( connection -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, connection -> msg ); } } /* * catch this */ if ( option == SQL_ATTR_USE_BOOKMARKS && SQL_SUCCEEDED( ret )) { connection -> bookmarks_on = (SQLUINTEGER) value; } return function_return( SQL_HANDLE_DBC, connection, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetCursorNameW.c0100644000076400007640000001616211055726343020344 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetCursorNameW.c,v 1.6 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLSetCursorNameW.c,v $ * Revision 1.6 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetCursorNameW.c,v $"; SQLRETURN SQLSetCursorNameW( SQLHSTMT statement_handle, SQLWCHAR *cursor_name, SQLSMALLINT name_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCursor name = %s", statement, __wstring_with_length( s1, cursor_name, name_length )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if ( !cursor_name ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY009" ); __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ if ( statement -> state == STATE_S4 || statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> connection -> unicode_driver || CHECK_SQLSETCURSORNAMEW( statement -> connection )) { if ( !CHECK_SQLSETCURSORNAMEW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLSETCURSORNAMEW( statement -> connection, statement -> driver_stmt, cursor_name, name_length ); } else { SQLCHAR *as1; if ( !CHECK_SQLSETCURSORNAME( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( cursor_name, name_length, statement -> connection ); ret = SQLSETCURSORNAME( statement -> connection, statement -> driver_stmt, as1, name_length ); if ( as1 ) free( as1 ); } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetDescFieldW.c0100644000076400007640000001777711055726343020125 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetDescFieldW.c,v 1.7 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLSetDescFieldW.c,v $ * Revision 1.7 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.6 2007/03/05 09:49:24 lurcher * Get it to build on VMS again * * Revision 1.5 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.4 2006/04/18 10:24:47 lurcher * Add a couple of changes from Mark Vanderwiel * * Revision 1.3 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.2 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.3 2001/04/17 16:29:39 nick * * More checks and autotest fixes * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetDescFieldW.c,v $"; SQLRETURN SQLSetDescFieldW( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length ) { /* * not quite sure how the descriptor can be * allocated to a statement, all the documentation talks * about state transitions on statement states, but the * descriptor may be allocated with more than one statement * at one time. Which one should I check ? */ DMHDESC descriptor = (DMHDESC) descriptor_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; /* * check descriptor */ if ( !__validate_desc( descriptor )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHDESC parent_desc; parent_desc = find_parent_handle( descriptor, SQL_HANDLE_DESC ); if ( parent_desc ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLSETDESCFIELDW( parent_desc -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLSETDESCFIELDW( parent_desc -> connection, descriptor, rec_number, field_identifier, value, buffer_length ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( descriptor ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tEntry:\ \n\t\t\tDescriptor = %p\ \n\t\t\tRec Number = %d\ \n\t\t\tField Ident = %s\ \n\t\t\tValue = %p\ \n\t\t\tBuffer Length = %d", descriptor, rec_number, __desc_attr_as_string( s1, field_identifier ), value, (int)buffer_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } thread_protect( SQL_HANDLE_DESC, descriptor ); if ( descriptor -> connection -> state < STATE_C4 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &descriptor -> error, ERROR_HY010, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } if ( descriptor -> connection -> unicode_driver || CHECK_SQLSETDESCFIELDW( descriptor -> connection )) { if ( !CHECK_SQLSETDESCFIELDW( descriptor -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } ret = SQLSETDESCFIELDW( descriptor -> connection, descriptor -> driver_desc, rec_number, field_identifier, value, buffer_length ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } } else { SQLCHAR *ascii_str = NULL; if ( !CHECK_SQLSETDESCFIELD( descriptor -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &descriptor -> error, ERROR_IM001, NULL, descriptor -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); } /* * is it a char arg... */ switch ( field_identifier ) { case SQL_DESC_NAME: /* This is the only R/W SQLCHAR* type */ ascii_str = (SQLCHAR*) unicode_to_ansi_alloc( value, buffer_length, descriptor -> connection ); value = ascii_str; buffer_length = strlen((char*) ascii_str ); break; default: break; } ret = SQLSETDESCFIELD( descriptor -> connection, descriptor -> driver_desc, rec_number, field_identifier, value, buffer_length ); if ( log_info.log_flag ) { sprintf( descriptor -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, descriptor -> msg ); } if ( ascii_str ) { free( ascii_str ); } } return function_return( SQL_HANDLE_DESC, descriptor, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetStmtAttrW.c0100644000076400007640000003571511055726343020055 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetStmtAttrW.c,v 1.8 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLSetStmtAttrW.c,v $ * Revision 1.8 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2006/04/18 10:24:47 lurcher * Add a couple of changes from Mark Vanderwiel * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/03/05 09:48:45 lurcher * * Add some 64 bit fixes * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2002/05/28 13:30:34 lurcher * * Tidy up for AIX * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.4 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetStmtAttrW.c,v $"; SQLRETURN SQLSetStmtAttrW( SQLHSTMT statement_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER string_length ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; SQLWCHAR buffer[ 512 ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLSETSTMTATTRW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLSETSTMTATTRW( parent_statement -> connection, statement_handle, attribute, value, string_length ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tAttribute = %s\ \n\t\t\tValue = %p\ \n\t\t\tStrLen = %d", statement, __stmt_attr_as_string( s1, attribute ), value, (int)string_length ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( attribute == SQL_ATTR_CONCURRENCY || attribute == SQL_ATTR_CURSOR_TYPE || attribute == SQL_ATTR_SIMULATE_CURSOR || attribute == SQL_ATTR_USE_BOOKMARKS || attribute == SQL_ATTR_CURSOR_SCROLLABLE || attribute == SQL_ATTR_CURSOR_SENSITIVITY ) { if ( statement -> state == STATE_S2 || statement -> state == STATE_S3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY011" ); __post_internal_error( &statement -> error, ERROR_HY011, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S4 || statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> prepared ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY011" ); __post_internal_error( &statement -> error, ERROR_HY011, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } } else { if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver || CHECK_SQLSETSTMTATTRW( statement -> connection )) { if ( !CHECK_SQLSETSTMTATTRW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } else { if ( !CHECK_SQLSETSTMTATTR( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * map descriptors to our copies */ if ( attribute == SQL_ATTR_APP_ROW_DESC ) { DMHDESC desc = ( DMHDESC ) value; if ( !__validate_desc( desc )) { thread_release( SQL_HANDLE_STMT, statement ); return SQL_INVALID_HANDLE; } if ( desc -> implicit && desc != statement -> implicit_ard ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY017" ); __post_internal_error( &statement -> error, ERROR_HY017, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( desc -> connection != statement -> connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY024" ); __post_internal_error( &statement -> error, ERROR_HY024, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * set the value to the driver descriptor handle */ value = ( SQLPOINTER ) desc -> driver_desc; statement -> ard = desc; } if ( attribute == SQL_ATTR_APP_PARAM_DESC ) { DMHDESC desc = ( DMHDESC ) value; if ( !__validate_desc( desc )) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( SQL_INVALID_HANDLE, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); thread_release( SQL_HANDLE_STMT, statement ); return SQL_INVALID_HANDLE; } if ( desc -> implicit && desc != statement -> implicit_apd ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY017" ); __post_internal_error( &statement -> error, ERROR_HY017, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( desc -> connection != statement -> connection ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY024" ); __post_internal_error( &statement -> error, ERROR_HY024, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * set the value to the driver descriptor handle */ value = ( SQLPOINTER ) desc -> driver_desc; statement -> apd = desc; } /* * save for internal use */ if ( attribute == SQL_ATTR_METADATA_ID ) { statement -> metadata_id = (long int) value; } /* * is it something overridden */ value = __attr_override_wide( statement, SQL_HANDLE_STMT, attribute, value, &string_length, buffer ); /* * does the call need mapping from 3 to 2 */ if ( attribute == SQL_ATTR_FETCH_BOOKMARK_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 && CHECK_SQLEXTENDEDFETCH( statement -> connection ) && !CHECK_SQLFETCHSCROLL( statement -> connection )) { statement -> fetch_bm_ptr = (SQLUINTEGER*) value; ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_ROW_STATUS_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 ) { statement -> row_st_arr = (SQLUSMALLINT*) value; ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_ROWS_FETCHED_PTR && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 ) { statement -> row_ct_ptr = (SQLUINTEGER*) value; ret = SQL_SUCCESS; } else if ( attribute == SQL_ATTR_ROW_ARRAY_SIZE && statement -> connection -> driver_act_ver == SQL_OV_ODBC2 ) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, SQL_ROWSET_SIZE, value, string_length ); } else { if ( statement -> connection -> unicode_driver ) { ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, attribute, value, string_length ); } else { /* * I can't find any string values, so we don't need to translate */ ret = SQLSETSTMTATTR( statement -> connection, statement -> driver_stmt, attribute, value, string_length ); } } /* * take notice of this */ if ( attribute == SQL_ATTR_USE_BOOKMARKS && SQL_SUCCEEDED( ret )) { statement -> bookmarks_on = (SQLULEN) value; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSetStmtOptionW.c0100644000076400007640000003014010723524737020402 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetStmtOptionW.c,v 1.4 2007/11/29 12:00:31 lurcher Exp $ * * $Log: SQLSetStmtOptionW.c,v $ * Revision 1.4 2007/11/29 12:00:31 lurcher * Add 64 bit type changes to SQLExtendedFetch etc * * Revision 1.3 2007/02/28 15:37:48 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.2 2006/04/18 10:24:47 lurcher * Add a couple of changes from Mark Vanderwiel * * Revision 1.1 2005/05/02 20:37:31 lurcher * Add missing SQLSetStmtOptionW.c * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2003/03/05 09:48:45 lurcher * * Add some 64 bit fixes * * Revision 1.3 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.2 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.4 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.8 2000/06/20 13:30:12 ngorham * * Fix problems when using bookmarks * * Revision 1.7 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.6 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.5 1999/09/21 22:34:26 ngorham * * Improve performance by removing unneeded logging calls when logging is * disabled * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:55 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:09 sShandyb * first go at it * * Revision 1.4 1999/06/03 22:20:25 ngorham * * Finished off the ODBC3-2 mapping * * Revision 1.3 1999/06/02 20:12:10 ngorham * * Fixed botched log entry, and removed the dos \r from the sql header files. * * Revision 1.2 1999/06/02 19:57:21 ngorham * * Added code to check if a attempt is being made to compile with a C++ * Compiler, and issue a message. * Start work on the ODBC2-3 conversions. * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.2 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSetStmtOptionW.c,v $ $Revision: 1.4 $"; SQLRETURN SQLSetStmtOptionW( SQLHSTMT statement_handle, SQLUSMALLINT option, SQLULEN value ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; SQLWCHAR buffer[ 512 ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLSETSTMTOPTIONW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLSETSTMTOPTIONW( parent_statement -> connection, statement_handle, option, value ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tOption = %s\ \n\t\t\tValue = %d", statement, __stmt_attr_as_string( s1, option ), (int)value ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * check states */ if ( option == SQL_CONCURRENCY || option == SQL_CURSOR_TYPE || option == SQL_SIMULATE_CURSOR || option == SQL_USE_BOOKMARKS ) { if ( statement -> state == STATE_S2 || statement -> state == STATE_S3 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1011" ); __post_internal_error( &statement -> error, ERROR_S1011, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S4 || statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> prepared ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1011" ); __post_internal_error( &statement -> error, ERROR_S1011, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1010" ); __post_internal_error( &statement -> error, ERROR_S1010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } } else { if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 || statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: S1010" ); __post_internal_error( &statement -> error, ERROR_S1010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * is it something overridden */ value = (SQLULEN) __attr_override_wide( statement, SQL_HANDLE_STMT, option, (void*) value, NULL, buffer ); if ( CHECK_SQLSETSTMTOPTIONW( statement -> connection )) { ret = SQLSETSTMTOPTIONW( statement -> connection, statement -> driver_stmt, option, value ); } else if ( CHECK_SQLSETSTMTATTRW( statement -> connection )) { switch ( option ) { case SQL_ATTR_APP_PARAM_DESC: if ( value ) memcpy( &statement -> apd, (void*)value, sizeof( statement -> apd )); ret = SQL_SUCCESS; break; case SQL_ATTR_APP_ROW_DESC: if ( value ) memcpy( &statement -> ard, (void*)value, sizeof( statement -> ard )); ret = SQL_SUCCESS; break; case SQL_ATTR_IMP_PARAM_DESC: if ( value ) memcpy( &statement -> ipd, (void*)value, sizeof( statement -> ipd )); ret = SQL_SUCCESS; break; case SQL_ATTR_IMP_ROW_DESC: if ( value ) memcpy( &statement -> ird, (void*)value, sizeof( statement -> ird )); ret = SQL_SUCCESS; break; default: ret = SQLSETSTMTATTRW( statement -> connection, statement -> driver_stmt, option, value, SQL_NTS ); break; } } else { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * take notice of this */ if ( option == SQL_USE_BOOKMARKS && SQL_SUCCEEDED( ret )) { statement -> bookmarks_on = (SQLUINTEGER) value; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLSpecialColumnsW.c0100644000076400007640000003240411055726343020530 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSpecialColumnsW.c,v 1.8 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLSpecialColumnsW.c,v $ * Revision 1.8 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:49 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLSpecialColumnsW.c,v $"; SQLRETURN SQLSpecialColumnsW( SQLHSTMT statement_handle, SQLUSMALLINT identifier_type, SQLWCHAR *catalog_name, SQLSMALLINT name_length1, SQLWCHAR *schema_name, SQLSMALLINT name_length2, SQLWCHAR *table_name, SQLSMALLINT name_length3, SQLUSMALLINT scope, SQLUSMALLINT nullable ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLSPECIALCOLUMNSW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLSPECIALCOLUMNSW( parent_statement -> connection, statement_handle, identifier_type, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, scope, nullable ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tIdentifier Type = %d\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s\ \n\t\t\tScope = %d\ \n\t\t\tNullable = %d", statement, identifier_type, __wstring_with_length( s1, catalog_name, name_length1 ), __wstring_with_length( s2, schema_name, name_length2 ), __wstring_with_length( s3, table_name, name_length3 ), scope, nullable ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> metadata_id == SQL_TRUE && schema_name == NULL ) { __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( table_name == NULL ) { __post_internal_error( &statement -> error, ERROR_HY009, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length3 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS )) { __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( identifier_type != SQL_BEST_ROWID && identifier_type != SQL_ROWVER ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY097" ); __post_internal_error( &statement -> error, ERROR_HY097, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( scope != SQL_SCOPE_CURROW && scope != SQL_SCOPE_TRANSACTION && scope != SQL_SCOPE_SESSION ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY098" ); __post_internal_error( &statement -> error, ERROR_HY098, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( nullable != SQL_NO_NULLS && nullable != SQL_NULLABLE ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY099" ); __post_internal_error( &statement -> error, ERROR_HY099, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 2400" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLSPECIALCOLUMNS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } if ( statement -> connection -> unicode_driver || CHECK_SQLSPECIALCOLUMNSW( statement -> connection )) { if ( !CHECK_SQLSPECIALCOLUMNSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLSPECIALCOLUMNSW( statement -> connection , statement -> driver_stmt, identifier_type, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, scope, nullable ); } else { SQLCHAR *as1, *as2, *as3; if ( !CHECK_SQLSPECIALCOLUMNS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( catalog_name, name_length1, statement -> connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( schema_name, name_length2, statement -> connection ); as3 = (SQLCHAR*) unicode_to_ansi_alloc( table_name, name_length3, statement -> connection ); ret = SQLSPECIALCOLUMNS( statement -> connection , statement -> driver_stmt, identifier_type, as1, name_length1, as2, name_length2, as3, name_length3, scope, nullable ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); if ( as3 ) free( as3 ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* ret = SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); */ statement -> numcols = 1; /******/ #endif statement -> hascols = 1; statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLSPECIALCOLUMNS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLStatisticsW.c0100644000076400007640000003001711055726343017737 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLStatisticsW.c,v 1.8 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLStatisticsW.c,v $ * Revision 1.8 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:49 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLStatisticsW.c,v $"; SQLRETURN SQLStatisticsW( SQLHSTMT statement_handle, SQLWCHAR *catalog_name, SQLSMALLINT name_length1, SQLWCHAR *schema_name, SQLSMALLINT name_length2, SQLWCHAR *table_name, SQLSMALLINT name_length3, SQLUSMALLINT unique, SQLUSMALLINT reserved ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLSTATISTICSW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLSTATISTICSW( parent_statement -> connection, statement_handle, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, unique, reserved ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s\ \n\t\t\tUnique = %d\ \n\t\t\tReserved = %d", statement, __wstring_with_length( s1, catalog_name, name_length1 ), __wstring_with_length( s2, schema_name, name_length2 ), __wstring_with_length( s3, table_name, name_length3 ), unique, reserved ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length2 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( reserved != SQL_ENSURE && reserved != SQL_QUICK ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY101" ); __post_internal_error( &statement -> error, ERROR_HY101, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( reserved != SQL_INDEX_UNIQUE && reserved != SQL_INDEX_ALL ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY100" ); __post_internal_error( &statement -> error, ERROR_HY100, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLSTATISTICS ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver || CHECK_SQLSTATISTICSW( statement -> connection )) { if ( !CHECK_SQLSTATISTICSW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLSTATISTICSW( statement -> connection, statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, unique, reserved ); } else { SQLCHAR *as1, *as2, *as3; if ( !CHECK_SQLSTATISTICS( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( catalog_name, name_length1, statement -> connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( schema_name, name_length2, statement -> connection ); as3 = (SQLCHAR*) unicode_to_ansi_alloc( table_name, name_length3, statement -> connection ); ret = SQLSTATISTICS( statement -> connection, statement -> driver_stmt, as1, name_length1, as2, name_length2, as3, name_length3, unique, reserved ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); if ( as3 ) free( as3 ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* ret = SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); */ statement -> numcols = 1; /******/ #endif statement -> hascols = 1; statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLSTATISTICS; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLTablePrivilegesW.c0100644000076400007640000002516411055726343020675 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLTablePrivilegesW.c,v 1.9 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLTablePrivilegesW.c,v $ * Revision 1.9 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.8 2007/02/28 15:37:49 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.7 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.6 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.5 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.4 2002/11/11 17:10:18 lurcher * * VMS changes * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLTablePrivilegesW.c,v $"; SQLRETURN SQLTablePrivilegesW( SQLHSTMT statement_handle, SQLWCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLWCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLWCHAR *sz_table_name, SQLSMALLINT cb_table_name ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLTABLEPRIVILEGESW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLTABLEPRIVILEGESW( parent_statement -> connection, statement_handle, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_table_name, cb_table_name ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s", statement, __wstring_with_length( s1, sz_catalog_name, cb_catalog_name ), __wstring_with_length( s2, sz_schema_name, cb_schema_name ), __wstring_with_length( s3, sz_table_name, cb_table_name )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); if (( cb_catalog_name < 0 && cb_catalog_name != SQL_NTS ) || ( cb_schema_name < 0 && cb_schema_name != SQL_NTS ) || ( cb_table_name < 0 && cb_table_name != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLTABLEPRIVILEGES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver || CHECK_SQLTABLEPRIVILEGESW( statement -> connection )) { if ( !CHECK_SQLTABLEPRIVILEGESW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLTABLEPRIVILEGESW( statement -> connection , statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_table_name, cb_table_name ); } else { SQLCHAR *as1, *as2, *as3; if ( !CHECK_SQLTABLEPRIVILEGES( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( sz_catalog_name, cb_catalog_name, statement -> connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( sz_schema_name, cb_schema_name, statement -> connection ); as3 = (SQLCHAR*) unicode_to_ansi_alloc( sz_table_name, cb_table_name, statement -> connection ); ret = SQLTABLEPRIVILEGES( statement -> connection , statement -> driver_stmt, as1, cb_catalog_name, as2, cb_schema_name, as3, cb_table_name ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); if ( as3 ) free( as3 ); } if ( SQL_SUCCEEDED( ret )) { statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLTABLEPRIVILEGES; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/SQLTablesW.c0100644000076400007640000002722211055726343017023 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLTablesW.c,v 1.8 2008/08/29 08:01:39 lurcher Exp $ * * $Log: SQLTablesW.c,v $ * Revision 1.8 2008/08/29 08:01:39 lurcher * Alter the way W functions are passed to the driver * * Revision 1.7 2007/02/28 15:37:49 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.6 2004/01/12 09:54:39 lurcher * * Fix problem where STATE_S5 stops metadata calls * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.4 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.3 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.2 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1 2000/12/31 20:30:54 nick * * Add UNICODE support * * **********************************************************************/ #include "drivermanager.h" static char const rcsid[]= "$RCSfile: SQLTablesW.c,v $"; SQLRETURN SQLTablesW( SQLHSTMT statement_handle, SQLWCHAR *catalog_name, SQLSMALLINT name_length1, SQLWCHAR *schema_name, SQLSMALLINT name_length2, SQLWCHAR *table_name, SQLSMALLINT name_length3, SQLWCHAR *table_type, SQLSMALLINT name_length4 ) { DMHSTMT statement = (DMHSTMT) statement_handle; SQLRETURN ret; SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ], s2[ 100 + LOG_MESSAGE_LEN ], s3[ 100 + LOG_MESSAGE_LEN ], s4[ 100 + LOG_MESSAGE_LEN ]; /* * check statement */ if ( !__validate_stmt( statement )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: SQL_INVALID_HANDLE" ); #ifdef WITH_HANDLE_REDIRECT { DMHSTMT parent_statement; parent_statement = find_parent_handle( statement, SQL_HANDLE_STMT ); if ( parent_statement ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: found parent handle" ); if ( CHECK_SQLTABLESW( parent_statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Info: calling redirected driver function" ); return SQLTABLESW( parent_statement -> connection, statement_handle, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, table_type, name_length4 ); } } } #endif return SQL_INVALID_HANDLE; } function_entry( statement ); if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tEntry:\ \n\t\t\tStatement = %p\ \n\t\t\tCatalog Name = %s\ \n\t\t\tSchema Name = %s\ \n\t\t\tTable Name = %s\ \n\t\t\tTable Type = %s", statement, __wstring_with_length( s1, catalog_name, name_length1 ), __wstring_with_length( s2, schema_name, name_length2 ), __wstring_with_length( s3, table_name, name_length3 ), __wstring_with_length( s4, table_type, name_length4 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } thread_protect( SQL_HANDLE_STMT, statement ); /* * this is a fix for old version of EXCEL */ if ( !catalog_name ) name_length1 = 0; if ( !schema_name ) name_length2 = 0; if ( !table_name ) name_length3 = 0; if ( !table_type ) name_length4 = 0; if (( name_length1 < 0 && name_length1 != SQL_NTS ) || ( name_length2 < 0 && name_length2 != SQL_NTS ) || ( name_length3 < 0 && name_length3 != SQL_NTS ) || ( name_length4 < 0 && name_length4 != SQL_NTS )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY090" ); __post_internal_error( &statement -> error, ERROR_HY090, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } /* * check states */ #ifdef NR_PROBE if ( statement -> state == STATE_S5 || statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #else if ( statement -> state == STATE_S6 || statement -> state == STATE_S7 ) #endif { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: 24000" ); __post_internal_error( &statement -> error, ERROR_24000, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } else if ( statement -> state == STATE_S8 || statement -> state == STATE_S9 || statement -> state == STATE_S10 ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } if ( statement -> state == STATE_S11 || statement -> state == STATE_S12 ) { if ( statement -> interupted_func != SQL_API_SQLTABLES ) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: HY010" ); __post_internal_error( &statement -> error, ERROR_HY010, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } } /* * TO_DO Check the SQL_ATTR_METADATA_ID settings */ if ( statement -> connection -> unicode_driver || CHECK_SQLTABLESW( statement -> connection )) { if ( !CHECK_SQLTABLESW( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } ret = SQLTABLESW( statement -> connection , statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, table_type, name_length4 ); } else { SQLCHAR *as1, *as2, *as3, *as4; if ( !CHECK_SQLTABLES( statement -> connection )) { dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); __post_internal_error( &statement -> error, ERROR_IM001, NULL, statement -> connection -> environment -> requested_version ); return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); } as1 = (SQLCHAR*) unicode_to_ansi_alloc( catalog_name, name_length1, statement -> connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( schema_name, name_length2, statement -> connection ); as3 = (SQLCHAR*) unicode_to_ansi_alloc( table_name, name_length3, statement -> connection ); as4 = (SQLCHAR*) unicode_to_ansi_alloc( table_type, name_length4, statement -> connection ); ret = SQLTABLES( statement -> connection , statement -> driver_stmt, as1, name_length1, as2, name_length2, as3, name_length3, as4, name_length4 ); if ( as1 ) free( as1 ); if ( as2 ) free( as2 ); if ( as3 ) free( as3 ); if ( as4 ) free( as4 ); } if ( SQL_SUCCEEDED( ret )) { #ifdef NR_PROBE /******** * Added this to get num cols from drivers which can only tell * us after execute - PAH */ /* * There is no point in doing this as we can't trust the value * from SQLPrepare, so we can't perform checks on the column number * ret = SQLNUMRESULTCOLS( statement -> connection, statement -> driver_stmt, &statement -> numcols ); */ statement -> numcols = 1; /******/ #endif statement -> hascols = 1; statement -> state = STATE_S5; statement -> prepared = 0; } else if ( ret == SQL_STILL_EXECUTING ) { statement -> interupted_func = SQL_API_SQLTABLES; if ( statement -> state != STATE_S11 && statement -> state != STATE_S12 ) statement -> state = STATE_S11; } else { statement -> state = STATE_S1; } if ( log_info.log_flag ) { sprintf( statement -> msg, "\n\t\tExit:[%s]", __get_return_status( ret, s1 )); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, statement -> msg ); } return function_return( SQL_HANDLE_STMT, statement, ret ); } unixODBC-2.2.14-p2/DriverManager/__connection.c0100644000076400007640000001624211070160005017517 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: __connection.c,v 1.5 2008/09/29 14:02:45 lurcher Exp $ * * $Log: __connection.c,v $ * Revision 1.5 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.4 2004/09/08 16:38:54 lurcher * * Get ready for a 2.2.10 release * * Revision 1.3 2003/04/10 13:45:52 lurcher * * Alter the way that SQLDataSources returns the description field (again) * * Revision 1.2 2003/04/09 08:42:18 lurcher * * Allow setting of odbcinstQ lib from odbcinst.ini and Environment * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.2 2001/05/15 10:57:44 nick * * Add initial support for VMS * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.7 1999/11/28 18:35:50 ngorham * * Add extra ODBC3/2 Date/Time mapping * * Revision 1.6 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.5 1999/10/09 00:56:16 ngorham * * Added Manush's patch to map ODBC 3-2 datetime values * * Revision 1.4 1999/08/03 21:47:39 shandyb * Moving to automake: changed files in DriverManager * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/19 17:51:41 ngorham * * Applied assorted minor bug fixes * * Revision 1.1.1.1 1999/05/29 13:41:09 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include "drivermanager.h" /* * list of places to look, a $ at the start indicates * then it following text should be looked in as a env * variable */ static char const rcsid[]= "$RCSfile: __connection.c,v $ $Revision: 1.5 $"; /* * search for the library (.so) that the DSN points to */ char *__find_lib_name( char *dsn, char *lib_name, char *driver_name ) { char driver[ INI_MAX_PROPERTY_VALUE + 1 ]; char driver_lib[ INI_MAX_PROPERTY_VALUE + 1 ]; SQLSetConfigMode( ODBC_USER_DSN ); /* * GET DRIVER FROM ODBC.INI */ SQLGetPrivateProfileString( dsn, "Driver", "", driver_lib, sizeof( driver_lib ), "ODBC.INI" ); if ( driver_lib[ 0 ] == 0 ) { /* * if not found look in system DSN */ SQLSetConfigMode( ODBC_SYSTEM_DSN ); SQLGetPrivateProfileString( dsn, "Driver", "", driver_lib, sizeof( driver_lib ), "ODBC.INI" ); SQLSetConfigMode( ODBC_BOTH_DSN ); if ( driver_lib[ 0 ] == 0 ) return NULL; } /* * GET DRIVER FROM ODBCINST.INI IF ODBC.INI HAD USER FRIENDLY NAME */ strcpy( driver_name, "" ); if ( driver_lib[ 0 ] != '/' ) { strcpy( driver, driver_lib ); /* * allow the use of "User odbcinst files */ #ifdef PLATFORM64 SQLGetPrivateProfileString( driver, "Driver64", "", driver_lib, sizeof( driver_lib ), "ODBCINST.INI" ); if ( driver_lib[ 0 ] == '\0' ) { SQLGetPrivateProfileString( driver, "Driver", "", driver_lib, sizeof( driver_lib ), "ODBCINST.INI" ); } #else SQLGetPrivateProfileString( driver, "Driver", "", driver_lib, sizeof( driver_lib ), "ODBCINST.INI" ); #endif strcpy( driver_name, driver ); if ( driver_lib[ 0 ] == 0 ) { return NULL; } } strcpy( lib_name, driver_lib ); return lib_name; } static SQLSMALLINT sql_old_to_new(SQLSMALLINT type) { switch(type) { case SQL_TIME: type=SQL_TYPE_TIME; break; case SQL_DATE: type=SQL_TYPE_DATE; break; case SQL_TIMESTAMP: type=SQL_TYPE_TIMESTAMP; break; } return type; } static SQLSMALLINT sql_new_to_old(SQLSMALLINT type) { switch(type) { case SQL_TYPE_TIME: type=SQL_TIME; break; case SQL_TYPE_DATE: type=SQL_DATE; break; case SQL_TYPE_TIMESTAMP: type=SQL_TIMESTAMP; break; } return type; } static SQLSMALLINT c_old_to_new(SQLSMALLINT type) { switch(type) { case SQL_C_TIME: type=SQL_C_TYPE_TIME; break; case SQL_C_DATE: type=SQL_C_TYPE_DATE; break; case SQL_C_TIMESTAMP: type=SQL_C_TYPE_TIMESTAMP; break; } return type; } static SQLSMALLINT c_new_to_old(SQLSMALLINT type) { switch(type) { case SQL_C_TYPE_TIME: type=SQL_C_TIME; break; case SQL_C_TYPE_DATE: type=SQL_C_DATE; break; case SQL_C_TYPE_TIMESTAMP: type=SQL_C_TIMESTAMP; break; } return type; } SQLSMALLINT __map_type(int map, DMHDBC connection, SQLSMALLINT type) { int driver_ver=connection->driver_act_ver; int wanted_ver=connection->environment->requested_version; if(driver_ver==SQL_OV_ODBC2 && wanted_ver==SQL_OV_ODBC3) { switch(map) { case MAP_SQL_DM2D: type=sql_new_to_old(type); break; case MAP_SQL_D2DM: type=sql_old_to_new(type); break; case MAP_C_DM2D: type=c_new_to_old(type); break; case MAP_C_D2DM: type=c_old_to_new(type); break; } } else if(driver_ver==SQL_OV_ODBC3 && wanted_ver==SQL_OV_ODBC2) { switch(map) { case MAP_SQL_DM2D: type=sql_old_to_new(type); break; case MAP_SQL_D2DM: type=sql_new_to_old(type); break; case MAP_C_DM2D: type=c_old_to_new(type); break; case MAP_C_D2DM: type=c_new_to_old(type); break; } } else if(driver_ver==SQL_OV_ODBC3 && wanted_ver==SQL_OV_ODBC3) { switch(map) { case MAP_SQL_DM2D: case MAP_SQL_D2DM: type=sql_old_to_new(type); break; case MAP_C_DM2D: case MAP_C_D2DM: type=c_old_to_new(type); break; } } else if(driver_ver==SQL_OV_ODBC2 && wanted_ver==SQL_OV_ODBC2) { switch(map) { case MAP_SQL_DM2D: case MAP_SQL_D2DM: type=sql_new_to_old(type); break; case MAP_C_DM2D: case MAP_C_D2DM: type=c_new_to_old(type); break; } } return type; } unixODBC-2.2.14-p2/DriverManager/__handles.c0100644000076400007640000006757010571320715017023 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: __handles.c,v 1.10 2007/02/28 15:37:49 lurcher Exp $ * * $Log: __handles.c,v $ * Revision 1.10 2007/02/28 15:37:49 lurcher * deal with drivers that call internal W functions and end up in the driver manager. controlled by the --enable-handlemap configure arg * * Revision 1.9 2006/05/31 17:35:34 lurcher * Add unicode ODBCINST entry points * * Revision 1.8 2004/09/28 08:44:46 lurcher * Fix memory leak in pthread descriptor code * * Revision 1.7 2004/07/24 17:55:37 lurcher * Sync up CVS * * Revision 1.6 2003/06/04 12:49:45 lurcher * * Further PID logging tweeks * * Revision 1.5 2003/06/02 16:51:36 lurcher * * Add TracePid option * * Revision 1.4 2002/08/12 16:20:44 lurcher * * Make it try and find a working iconv set of encodings * * Revision 1.3 2002/08/12 13:17:52 lurcher * * Replicate the way the MS DM handles loading of driver libs, and allocating * handles in the driver. usage counting in the driver means that dlopen is * only called for the first use, and dlclose for the last. AllocHandle for * the driver environment is only called for the first time per driver * per application environment. * * Revision 1.2 2002/02/22 10:23:22 lurcher * * s/Trace File/TraceFile * * Revision 1.1.1.1 2001/10/17 16:40:07 lurcher * * First upload to SourceForge * * Revision 1.14 2001/06/25 12:55:15 nick * * Fix threading problem with multiple ENV's * * Revision 1.13 2001/06/04 15:24:49 nick * * Add port to MAC OSX and QT3 changes * * Revision 1.12 2001/05/15 13:33:44 jason * * Wrapped calls to stats with COLLECT_STATS * * Revision 1.11 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.10 2001/03/02 14:24:23 nick * * Fix thread detection for Solaris * * Revision 1.9 2001/01/04 13:16:25 nick * * Add support for GNU portable threads and tidy up some UNICODE compile * warnings * * Revision 1.8 2000/12/18 11:51:59 martin * * stats specific mode to uodbc_open_stats. * * Revision 1.7 2000/12/18 11:03:58 martin * * Add support for the collection and retrieval of handle statistics. * * Revision 1.6 2000/12/17 11:17:22 nick * * Remove typo * * Revision 1.5 2000/12/17 11:00:32 nick * * Add thread safe bits to pooling * * Revision 1.4 2000/11/29 17:53:59 nick * * Fix race condition * * Revision 1.3 2000/10/25 09:39:42 nick * * Clear handles out, to avoid reuse * * Revision 1.2 2000/09/08 08:58:17 nick * * Add SQL_DRIVER_HDESC to SQLGetinfo * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.16 2000/06/29 17:27:52 ngorham * * Add fast validate option * * Revision 1.15 2000/06/27 17:34:12 ngorham * * Fix a problem when the second part of the connect failed a seg fault * was generated in the error reporting * * Revision 1.14 2001/03/28 23:09:57 ngorham * * Fix logging * * Revision 1.13 2000/03/11 15:55:47 ngorham * * A few more changes and bug fixes (see NEWS) * * Revision 1.12 2000/02/25 00:02:00 ngorham * * Add a patch to support IBM DB2, and Solaris threads * * Revision 1.11 2000/02/22 22:14:45 ngorham * * Added support for solaris threads * Added check to overcome bug in PHP4 * Fixed bug in descriptors and ODBC 3 drivers * * Revision 1.10 1999/12/11 13:01:57 ngorham * * Add some fixes to the Postgres driver for long types * * Revision 1.9 1999/12/01 09:20:07 ngorham * * Fix some threading problems * * Revision 1.8 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.7 1999/11/10 03:51:34 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.6 1999/08/05 18:59:49 ngorham * * Typo error found by Greg Bentz * * Revision 1.5 1999/08/03 21:47:39 shandyb * Moving to automake: changed files in DriverManager * * Revision 1.4 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/30 23:56:56 ngorham * * Add initial thread safety code * * Revision 1.1.1.1 1999/05/29 13:41:09 sShandyb * first go at it * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * Revision 1.3 1999/05/09 23:27:11 nick * All the API done now * * Revision 1.2 1999/05/03 19:50:43 nick * Another check point * * Revision 1.1 1999/04/25 23:06:11 nick * Initial revision * * **********************************************************************/ #include #include "drivermanager.h" #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) #include "__stats.h" #include #endif static char const rcsid[]= "$RCSfile: __handles.c,v $ $Revision: 1.10 $"; /* * these are used to enable us to check if a handle is * valid without the danger of a seg-vio. */ static DMHENV enviroment_root; static DMHDBC connection_root; static DMHSTMT statement_root; static DMHDESC descriptor_root; /* * use just one mutex for all the lists, this avoids any issues * with deadlocks, the performance issue should be minimal, if it * turns out to be a problem, we can readdress this * * We also have a mutex to protect the connection pooling code * * If compiled with thread support the DM allows four different * thread strategies * * Level 0 - Only the DM internal structures are protected * the driver is assumed to take care of it's self * * Level 1 - The driver is protected down to the statement level * each statement will be protected, and the same for the connect * level for connect functions, note that descriptors are considered * equal to statements when it comes to thread protection. * * Level 2 - The driver is protected at the connection level. only * one thread can be in a particular driver at one time * * Level 3 - The driver is protected at the env level, only one thing * at a time. * * By default the driver open connections with a lock level of 3, * this can be changed by adding the line * * Threading = N * * to the driver entry in odbcinst.ini, where N is the locking level * (0-3) * */ #ifdef HAVE_LIBPTH #include static pth_mutex_t mutex_lists = PTH_MUTEX_INIT; static pth_mutex_t mutex_env = PTH_MUTEX_INIT; static pth_mutex_t mutex_pool = PTH_MUTEX_INIT; static pth_mutex_t mutex_iconv = PTH_MUTEX_INIT; static int pth_init_called = 0; static int mutex_entry( pth_mutex_t *mutex ) { if ( !pth_init_called ) { pth_init(); pth_init_called = 1; } return pth_mutex_acquire( mutex, 0, NULL ); } static int mutex_exit( pth_mutex_t *mutex ) { return pth_mutex_release( mutex ); } #elif HAVE_LIBPTHREAD #include static pthread_mutex_t mutex_lists = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t mutex_env = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t mutex_pool = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t mutex_iconv = PTHREAD_MUTEX_INITIALIZER; static int mutex_entry( pthread_mutex_t *mutex ) { return pthread_mutex_lock( mutex ); } static int mutex_exit( pthread_mutex_t *mutex ) { return pthread_mutex_unlock( mutex ); } #elif HAVE_LIBTHREAD #include static mutex_t mutex_lists; static mutex_t mutex_env; static mutex_t mutex_pool; static mutex_t mutex_iconv; static int mutex_entry( mutex_t *mutex ) { return mutex_lock( mutex ); } static int mutex_exit( mutex_t *mutex ) { return mutex_unlock( mutex ); } #else #define mutex_entry(x) #define mutex_exit(x) #endif /* * protection for connection pooling */ void mutex_pool_entry( void ) { mutex_entry( &mutex_pool ); } void mutex_pool_exit( void ) { mutex_exit( &mutex_pool ); } /* * protection for iconv */ void mutex_iconv_entry( void ) { mutex_entry( &mutex_iconv ); } void mutex_iconv_exit( void ) { mutex_exit( &mutex_iconv ); } /* * protection for lib loading and counting, reuse the lists mutex as this * is the lowest level protection the DM uses */ void mutex_lib_entry( void ) { mutex_entry( &mutex_lists ); } void mutex_lib_exit( void ) { mutex_exit( &mutex_lists ); } /* * allocate and register a environment handle */ DMHENV __alloc_env( void ) { DMHENV environment = NULL; char s0[ 20 ]; mutex_entry( &mutex_lists ); environment = calloc( sizeof( *environment ), 1 ); if ( environment ) { char tracing_string[ 64 ]; char tracing_file[ 64 ]; #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) if (uodbc_open_stats(&environment->sh, UODBC_STATS_WRITE) != 0) { ; } uodbc_update_stats(environment->sh, UODBC_STATS_TYPE_HENV, (void *)1); #endif /* * add to list of env handles */ environment -> next_class_list = enviroment_root; enviroment_root = environment; environment -> type = HENV_MAGIC; SQLGetPrivateProfileString( "ODBC", "Trace", "No", tracing_string, sizeof( tracing_string ), "odbcinst.ini" ); if ( tracing_string[ 0 ] == '1' || toupper( tracing_string[ 0 ] ) == 'Y' || ( toupper( tracing_string[ 0 ] ) == 'O' && toupper( tracing_string[ 1 ] ) == 'N' )) { SQLGetPrivateProfileString( "ODBC", "TraceFile", "/tmp/sql.log", tracing_file, sizeof( tracing_file ), "odbcinst.ini" ); /* * start logging */ SQLGetPrivateProfileString( "ODBC", "TracePid", "No", tracing_string, sizeof( tracing_string ), "odbcinst.ini" ); if ( tracing_string[ 0 ] == '1' || toupper( tracing_string[ 0 ] ) == 'Y' || ( toupper( tracing_string[ 0 ] ) == 'O' && toupper( tracing_string[ 1 ] ) == 'N' )) { dm_log_open( "ODBC", tracing_file, 1 ); } else { dm_log_open( "ODBC", tracing_file, 0 ); } sprintf( environment -> msg, "\n\t\tExit:[SQL_SUCCESS]\n\t\t\tEnvironment = %p", environment ); dm_log_write( __FILE__, __LINE__, LOG_INFO, LOG_INFO, environment -> msg ); } } setup_error_head( &environment -> error, environment, SQL_HANDLE_ENV ); mutex_exit( &mutex_lists ); return environment; } /* * check that a env is real */ int __validate_env( DMHENV env ) { #ifdef FAST_HANDLE_VALIDATE if ( *(( int * ) env ) == HENV_MAGIC ) return 1; else return 0; #else DMHENV ptr; int ret = 0; mutex_entry( &mutex_lists ); ptr = enviroment_root; while( ptr ) { if ( ptr == env ) { ret = 1; break; } ptr = ptr -> next_class_list; } mutex_exit( &mutex_lists ); return ret; #endif } /* * remove from list */ void __release_env( DMHENV environment ) { DMHENV last = NULL; DMHENV ptr; mutex_entry( &mutex_lists ); ptr = enviroment_root; while( ptr ) { if ( environment == ptr ) { break; } last = ptr; ptr = ptr -> next_class_list; } if ( ptr ) { if ( last ) { last -> next_class_list = ptr -> next_class_list; } else { enviroment_root = ptr -> next_class_list; } } clear_error_head( &environment -> error ); /* * free log */ dm_log_close(); #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) if (environment->sh) uodbc_close_stats(environment->sh); #endif /* * clear just to make sure */ memset( environment, 0, sizeof( *environment )); free( environment ); mutex_exit( &mutex_lists ); } /* * get the root, for use in SQLEndTran and SQLTransact */ DMHDBC __get_dbc_root( void ) { return connection_root; } /* * allocate and register a connection handle */ DMHDBC __alloc_dbc( void ) { DMHDBC connection = NULL; mutex_entry( &mutex_lists ); connection = calloc( sizeof( *connection ), 1 ); if ( connection ) { /* * add to list of connection handles */ connection -> next_class_list = connection_root; connection_root = connection; connection -> type = HDBC_MAGIC; } setup_error_head( &connection -> error, connection, SQL_HANDLE_DBC ); #ifdef HAVE_LIBPTH pth_mutex_init( &connection -> mutex ); /* * for the moment protect on a environment level */ connection -> protection_level = TS_LEVEL3; #elif HAVE_LIBPTHREAD pthread_mutex_init( &connection -> mutex, NULL ); /* * for the moment protect on a environment level */ connection -> protection_level = TS_LEVEL3; #elif HAVE_LIBTHREAD mutex_init( &connection -> mutex, USYNC_THREAD, NULL ); connection -> protection_level = TS_LEVEL3; #endif mutex_exit( &mutex_lists ); return connection; } /* * adjust the threading level */ void dbc_change_thread_support( DMHDBC connection, int level ) { #if defined ( HAVE_LIBPTHREAD ) || defined( HAVE_LIBTHREAD ) || defined( HAVE_LIBPTH ) if ( connection -> protection_level == level ) return; mutex_entry( &mutex_lists ); /* * switch level * If the previous level was at less than connection level, * we need to create a lock at the environment level then release * the connection lock. * * If we are moving from a greater than env lock, the current lock * on the connection will be ok */ if ( level == TS_LEVEL3 ) { mutex_entry( &mutex_env ); mutex_exit( &connection -> mutex ); } else if ( connection -> protection_level == TS_LEVEL3 ) { /* * if we are moving from level 3 we have to create the new * connection lock, and remove the env lock */ mutex_entry( &connection -> mutex ); mutex_exit( &mutex_env ); } connection -> protection_level = level; mutex_exit( &mutex_lists ); #endif } /* * check that a connection is real */ int __validate_dbc( DMHDBC connection ) { #ifdef FAST_HANDLE_VALIDATE if ( *(( int * ) connection ) == HDBC_MAGIC ) return 1; else return 0; #else DMHDBC ptr; int ret = 0; mutex_entry( &mutex_lists ); ptr = connection_root; while( ptr ) { if ( ptr == connection ) { ret = 1; break; } ptr = ptr -> next_class_list; } mutex_exit( &mutex_lists ); return ret; #endif } /* * remove from list */ void __release_dbc( DMHDBC connection ) { DMHDBC last = NULL; DMHDBC ptr; mutex_entry( &mutex_lists ); ptr = connection_root; while( ptr ) { if ( connection == ptr ) { break; } last = ptr; ptr = ptr -> next_class_list; } if ( ptr ) { if ( last ) { last -> next_class_list = ptr -> next_class_list; } else { connection_root = ptr -> next_class_list; } } clear_error_head( &connection -> error ); #ifdef HAVE_LIBPTH #elif HAVE_LIBPTHREAD pthread_mutex_destroy( &connection -> mutex ); #elif HAVE_LIBTHREAD mutex_destroy( &connection -> mutex ); #endif /* * clear just to make sure */ memset( connection, 0, sizeof( *connection )); free( connection ); mutex_exit( &mutex_lists ); } /* * get the statement root, for use in SQLEndTran and SQLTransact */ DMHSTMT __get_stmt_root( void ) { return statement_root; } /* * allocate and register a statement handle */ DMHSTMT __alloc_stmt( void ) { DMHSTMT statement = NULL; mutex_entry( &mutex_lists ); statement = calloc( sizeof( *statement ), 1 ); if ( statement ) { /* * add to list of statement handles */ statement -> next_class_list = statement_root; statement_root = statement; statement -> type = HSTMT_MAGIC; } setup_error_head( &statement -> error, statement, SQL_HANDLE_STMT ); #ifdef HAVE_LIBPTH pth_mutex_init( &statement -> mutex ); #elif HAVE_LIBPTHREAD pthread_mutex_init( &statement -> mutex, NULL ); #elif HAVE_LIBTHREAD mutex_init( &statement -> mutex, USYNC_THREAD, NULL ); #endif mutex_exit( &mutex_lists ); return statement; } /* * clear all statements on a DBC */ int __clean_stmt_from_dbc( DMHDBC connection ) { DMHSTMT ptr, last; int ret = 0; mutex_entry( &mutex_lists ); last = NULL; ptr = statement_root; while( ptr ) { if ( ptr -> connection == connection ) { if ( last ) { last -> next_class_list = ptr -> next_class_list; } else { statement_root = ptr -> next_class_list; } clear_error_head( &ptr -> error ); #ifdef HAVE_LIBPTH #elif HAVE_LIBPTHREAD pthread_mutex_destroy( &ptr -> mutex ); #elif HAVE_LIBTHREAD mutex_destroy( &ptr -> mutex ); #endif free( ptr ); /* * go back to the start */ last = NULL; ptr = statement_root; } else { last = ptr; ptr = ptr -> next_class_list; } } mutex_exit( &mutex_lists ); return ret; } /* * check that a statement is real */ int __validate_stmt( DMHSTMT statement ) { #ifdef FAST_HANDLE_VALIDATE if ( *(( int * ) statement ) == HSTMT_MAGIC ) return 1; else return 0; #else DMHSTMT ptr; int ret = 0; mutex_entry( &mutex_lists ); ptr = statement_root; while( ptr ) { if ( ptr == statement ) { ret = 1; break; } ptr = ptr -> next_class_list; } mutex_exit( &mutex_lists ); return ret; #endif } /* * remove from list */ void __release_stmt( DMHSTMT statement ) { DMHSTMT last = NULL; DMHSTMT ptr; mutex_entry( &mutex_lists ); ptr = statement_root; while( ptr ) { if ( statement == ptr ) { break; } last = ptr; ptr = ptr -> next_class_list; } if ( ptr ) { if ( last ) { last -> next_class_list = ptr -> next_class_list; } else { statement_root = ptr -> next_class_list; } } clear_error_head( &statement -> error ); #ifdef HAVE_LIBPTH #elif HAVE_LIBPTHREAD pthread_mutex_destroy( &statement -> mutex ); #elif HAVE_LIBTHREAD mutex_destroy( &statement -> mutex ); #endif /* * clear just to make sure */ memset( statement, 0, sizeof( *statement )); free( statement ); mutex_exit( &mutex_lists ); } /* * allocate and register a descriptor handle */ DMHDESC __alloc_desc( void ) { DMHDESC descriptor = NULL; mutex_entry( &mutex_lists ); descriptor = calloc( sizeof( *descriptor ), 1 ); if ( descriptor ) { /* * add to list of descriptor handles */ descriptor -> next_class_list = descriptor_root; descriptor_root = descriptor; descriptor -> type = HDESC_MAGIC; } setup_error_head( &descriptor -> error, descriptor, SQL_HANDLE_DESC ); #ifdef HAVE_LIBPTH pth_mutex_init( &descriptor -> mutex ); #elif HAVE_LIBPTHREAD pthread_mutex_init( &descriptor -> mutex, NULL ); #elif HAVE_LIBTHREAD mutex_init( &descriptor -> mutex, USYNC_THREAD, NULL ); #endif mutex_exit( &mutex_lists ); return descriptor; } /* * check that a descriptor is real */ int __validate_desc( DMHDESC descriptor ) { #ifdef FAST_HANDLE_VALIDATE if ( *(( int * ) descriptor ) == HDESC_MAGIC ) return 1; else return 0; #else DMHDESC ptr; int ret = 0; mutex_entry( &mutex_lists ); ptr = descriptor_root; while( ptr ) { if ( ptr == descriptor ) { ret = 1; break; } ptr = ptr -> next_class_list; } mutex_exit( &mutex_lists ); return ret; #endif } /* * clear all descriptors on a DBC */ int __clean_desc_from_dbc( DMHDBC connection ) { DMHDESC ptr, last; int ret = 0; mutex_entry( &mutex_lists ); last = NULL; ptr = descriptor_root; while( ptr ) { if ( ptr -> connection == connection ) { if ( last ) { last -> next_class_list = ptr -> next_class_list; } else { descriptor_root = ptr -> next_class_list; } clear_error_head( &ptr -> error ); #ifdef HAVE_LIBPTH #elif HAVE_LIBPTHREAD pthread_mutex_destroy( &ptr -> mutex ); #elif HAVE_LIBTHREAD mutex_destroy( &ptr -> mutex ); #endif free( ptr ); /* * go back to the start */ last = NULL; ptr = descriptor_root; } else { last = ptr; ptr = ptr -> next_class_list; } } mutex_exit( &mutex_lists ); return ret; } /* * remove from list */ void __release_desc( DMHDESC descriptor ) { DMHDESC last = NULL; DMHDESC ptr; mutex_entry( &mutex_lists ); ptr = descriptor_root; while( ptr ) { if ( descriptor == ptr ) { break; } last = ptr; ptr = ptr -> next_class_list; } if ( ptr ) { if ( last ) { last -> next_class_list = ptr -> next_class_list; } else { descriptor_root = ptr -> next_class_list; } } clear_error_head( &descriptor -> error ); #ifdef HAVE_LIBPTH #elif HAVE_LIBPTHREAD pthread_mutex_destroy( &descriptor -> mutex ); #elif HAVE_LIBTHREAD mutex_destroy( &descriptor -> mutex ); #endif /* * clear just to make sure */ memset( descriptor, 0, sizeof( *descriptor )); free( descriptor ); mutex_exit( &mutex_lists ); } #if defined ( HAVE_LIBPTHREAD ) || defined ( HAVE_LIBTHREAD ) || defined( HAVE_LIBPTH ) void thread_protect( int type, void *handle ) { DMHENV environment; DMHDBC connection; DMHSTMT statement; DMHDESC descriptor; switch( type ) { case SQL_HANDLE_ENV: mutex_entry( &mutex_env ); break; case SQL_HANDLE_DBC: connection = handle; if ( connection -> protection_level == TS_LEVEL3 ) { mutex_entry( &mutex_env ); } else if ( connection -> protection_level == TS_LEVEL2 || connection -> protection_level == TS_LEVEL1 ) { mutex_entry( &connection -> mutex ); } break; case SQL_HANDLE_STMT: statement = handle; if ( statement -> connection -> protection_level == TS_LEVEL3 ) { mutex_entry( &mutex_env ); } else if ( statement -> connection -> protection_level == TS_LEVEL2 ) { mutex_entry( &statement -> connection -> mutex ); } else if ( statement -> connection -> protection_level == TS_LEVEL1 ) { mutex_entry( &statement -> mutex ); } break; case SQL_HANDLE_DESC: descriptor = handle; if ( descriptor -> connection -> protection_level == TS_LEVEL3 ) { mutex_entry( &mutex_env ); } if ( descriptor -> connection -> protection_level == TS_LEVEL2 ) { mutex_entry( &descriptor -> connection -> mutex ); } if ( descriptor -> connection -> protection_level == TS_LEVEL1 ) { mutex_entry( &descriptor -> mutex ); } break; } } void thread_release( int type, void *handle ) { DMHENV environment; DMHDBC connection; DMHSTMT statement; DMHDESC descriptor; switch( type ) { case SQL_HANDLE_ENV: mutex_exit( &mutex_env ); break; case SQL_HANDLE_DBC: connection = handle; if ( connection -> protection_level == TS_LEVEL3 ) { mutex_exit( &mutex_env ); } else if ( connection -> protection_level == TS_LEVEL2 || connection -> protection_level == TS_LEVEL1 ) { mutex_exit( &connection -> mutex ); } break; case SQL_HANDLE_STMT: statement = handle; if ( statement -> connection -> protection_level == TS_LEVEL3 ) { mutex_exit( &mutex_env ); } else if ( statement -> connection -> protection_level == TS_LEVEL2 ) { mutex_exit( &statement -> connection -> mutex ); } else if ( statement -> connection -> protection_level == TS_LEVEL1 ) { mutex_exit( &statement -> mutex ); } break; case SQL_HANDLE_DESC: descriptor = handle; if ( descriptor -> connection -> protection_level == TS_LEVEL3 ) { mutex_exit( &mutex_env ); } else if ( descriptor -> connection -> protection_level == TS_LEVEL2 ) { mutex_exit( &descriptor -> connection -> mutex ); } else if ( descriptor -> connection -> protection_level == TS_LEVEL1 ) { mutex_exit( &descriptor -> mutex ); } break; } } #endif #ifdef WITH_HANDLE_REDIRECT /* * try and find a handle that has the suplied handle as the driver handle * there will be threading issues with this, so be carefull. * However it will normally only get used with "broken" drivers. */ void *find_parent_handle( DRV_SQLHANDLE drv_hand, int type ) { void *found_handle = NULL; mutex_entry( &mutex_lists ); switch( type ) { case SQL_HANDLE_DBC: { DMHDBC hand = connection_root; while( hand ) { if ( hand -> driver_dbc == drv_hand ) { found_handle = hand; break; } hand = hand -> next_class_list; } } break; case SQL_HANDLE_STMT: { DMHSTMT hand = statement_root; while( hand ) { if ( hand -> driver_stmt == drv_hand ) { found_handle = hand; break; } hand = hand -> next_class_list; } } break; case SQL_HANDLE_DESC: { DMHDESC hand = descriptor_root; while( hand ) { if ( hand -> driver_desc == drv_hand ) { found_handle = hand; break; } hand = hand -> next_class_list; } } break; default: break; } mutex_exit( &mutex_lists ); return found_handle; } #endif unixODBC-2.2.14-p2/DriverManager/__info.c0100644000076400007640000043311111070160005016311 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: __info.c,v 1.48 2008/09/29 14:02:45 lurcher Exp $ * * $Log: __info.c,v $ * Revision 1.48 2008/09/29 14:02:45 lurcher * Fix missing dlfcn group option * * Revision 1.47 2008/01/02 15:10:33 lurcher * Fix problems trying to use the cursor lib on a non select statement * * Revision 1.46 2007/11/26 11:37:23 lurcher * Sync up before tag * * Revision 1.45 2007/09/28 13:20:22 lurcher * Add timestamp to logging * * Revision 1.44 2007/04/02 10:50:19 lurcher * Fix some 64bit problems (only when sizeof(SQLLEN) == 8 ) * * Revision 1.43 2007/03/05 09:49:24 lurcher * Get it to build on VMS again * * Revision 1.42 2006/11/27 14:08:34 lurcher * Sync up dirs * * Revision 1.41 2006/03/08 11:22:13 lurcher * Add check for valid C_TYPE * * Revision 1.40 2005/12/19 18:43:26 lurcher * Add new parts to contrib and alter how the errors are returned from the driver * * Revision 1.39 2005/11/08 09:37:10 lurcher * Allow the driver and application to have different length handles * * Revision 1.38 2005/02/07 11:46:45 lurcher * Add missing ODBC2 installer stubs * * Revision 1.37 2004/07/24 17:55:37 lurcher * Sync up CVS * * Revision 1.36 2004/05/17 08:25:00 lurcher * Update the way the libltso is used, and fix a problem with gODBCConfig * not closeing correctly. * * Revision 1.35 2004/03/30 13:20:11 lurcher * * * Fix problem with SQLCopyDesc * Add additional target for iconv * * Revision 1.34 2003/12/01 16:37:17 lurcher * * Fix a bug in SQLWritePrivateProfileString * * Revision 1.33 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.32 2003/09/08 15:34:29 lurcher * * A couple of small but perfectly formed fixes * * Revision 1.31 2003/07/21 11:12:59 lurcher * * Fix corruption in Postgre7.1 driver * Tidy up gODBCconfig * * Revision 1.30 2003/06/24 09:40:58 lurcher * * Extra UNICODE stuff * * Revision 1.29 2003/06/04 12:49:45 lurcher * * Further PID logging tweeks * * Revision 1.28 2003/06/03 13:52:13 lurcher * * Change the mode of PID logfiles to allow the process to change to another * user * * Revision 1.27 2003/06/02 16:51:36 lurcher * * Add TracePid option * * Revision 1.26 2003/02/25 13:28:31 lurcher * * Allow errors on the drivers AllocHandle to be reported * Fix a problem that caused errors to not be reported in the log * Remove a redundant line from the spec file * * Revision 1.25 2003/02/06 12:58:25 lurcher * * Fix a speeling problem :-) * * Revision 1.24 2002/12/05 17:44:31 lurcher * * Display unknown return values in return logging * * Revision 1.23 2002/11/11 17:10:20 lurcher * * VMS changes * * Revision 1.22 2002/11/06 16:08:01 lurcher * * Update missing * * Revision 1.21 2002/08/23 09:42:37 lurcher * * Fix some build warnings with casts, and a AIX linker mod, to include * deplib's on the link line, but not the libtool generated ones * * Revision 1.20 2002/08/20 12:41:07 lurcher * * Fix incorrect return state from SQLEndTran/SQLTransact * * Revision 1.19 2002/08/19 09:11:49 lurcher * * Fix Maxor ineffiecny in Postgres Drivers, and fix a return state * * Revision 1.18 2002/08/15 08:10:33 lurcher * * Couple of small fixes from John L Miller * * Revision 1.17 2002/08/12 16:20:44 lurcher * * Make it try and find a working iconv set of encodings * * Revision 1.16 2002/08/12 13:17:52 lurcher * * Replicate the way the MS DM handles loading of driver libs, and allocating * handles in the driver. usage counting in the driver means that dlopen is * only called for the first use, and dlclose for the last. AllocHandle for * the driver environment is only called for the first time per driver * per application environment. * * Revision 1.15 2002/07/25 09:30:26 lurcher * * Additional unicode and iconv changes * * Revision 1.14 2002/07/24 08:49:52 lurcher * * Alter UNICODE support to use iconv for UNICODE-ANSI conversion * * Revision 1.13 2002/07/10 15:05:57 lurcher * * Alter the return code in the Postgres driver, for a warning, it should be * 01000 it was 00000 * Fix a problem in DriverManagerII with the postgres driver as the driver * doesn't return a propper list of schemas * Allow the delimiter to be set in isql to a hex/octal char not just a * printable one * * Revision 1.12 2002/07/08 16:37:35 lurcher * * Fix bug in unicode_to_ansi_copy * * Revision 1.11 2002/07/04 17:27:56 lurcher * * Small bug fixes * * Revision 1.9 2002/05/28 13:30:34 lurcher * * Tidy up for AIX * * Revision 1.8 2002/05/21 14:19:44 lurcher * * * Update libtool to escape from AIX build problem * * Add fix to avoid file handle limitations * * Add more UNICODE changes, it looks like it is native 16 representation * the old way can be reproduced by defining UCS16BE * * Add iusql, its just the same as isql but uses the wide functions * * Revision 1.7 2002/04/10 11:04:36 lurcher * * Fix endian issue with 4 byte unicode support * * Revision 1.6 2002/02/27 11:27:14 lurcher * * Fix bug in error reporting * * Revision 1.5 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.4 2001/12/13 13:56:31 lurcher * * init a global for Peter * * Revision 1.3 2001/12/13 13:00:32 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.2 2001/11/15 18:38:21 lurcher * * Make the errors returned from SQLError reset after each API call * if the app is expecting ODBC 3 operation * * Revision 1.1.1.1 2001/10/17 16:40:09 lurcher * * First upload to SourceForge * * Revision 1.23 2001/09/27 17:05:48 nick * * Assorted fixes and tweeks * * Revision 1.22 2001/07/03 09:30:41 nick * * Add ability to alter size of displayed message in the log * * Revision 1.21 2001/07/02 17:09:37 nick * * Add some portability changes * * Revision 1.20 2001/06/20 17:25:32 pat * Correct msg1 length in 4 extract diag functions * * Revision 1.19 2001/06/20 08:19:25 nick * * Fix buffer overflow in error handling * * Revision 1.18 2001/04/23 13:58:43 nick * * Assorted tweeks to text driver to get it to work with StarOffice * * Revision 1.17 2001/04/20 16:57:25 nick * * Add extra mapping of data types * * Revision 1.16 2001/04/18 15:03:37 nick * * Fix problem when going to DB2 unicode driver * * Revision 1.15 2001/04/16 22:35:10 nick * * More tweeks to the AutoTest code * * Revision 1.14 2001/04/14 10:42:03 nick * * Extra work on the autotest feature of odbctest * * Revision 1.13 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.12 2001/04/03 16:34:12 nick * * Add support for strangly broken unicode drivers * * Revision 1.11 2001/01/09 23:15:18 nick * * More unicode error fixes * * Revision 1.10 2001/01/09 22:33:13 nick * * Stop passing NULL into SQLExtendedFetch * Further fixes to unicode to ansi conversions * * Revision 1.9 2001/01/09 11:03:32 nick * * Fixed overrun bug * * Revision 1.8 2001/01/06 15:00:12 nick * * Fix bug in SQLError introduced with UNICODE * * Revision 1.7 2000/12/31 20:30:54 nick * * Add UNICODE support * * Revision 1.6 2000/10/25 12:45:51 nick * * Add mapping for both ODBC 2 - 3 and ODBC 3 - 2 error states * * Revision 1.5 2000/10/25 12:32:41 nick * * The mapping was the wrong way around for errors, ODBC3 error are mapped * to ODBC 2 not the other way around * * Revision 1.4 2000/10/25 09:13:26 nick * * Remove some invalid ODBC2-ODBC3 error mappings * * Revision 1.3 2000/10/13 15:18:49 nick * * Change string length parameter from SQLINTEGER to SQLSMALLINT * * Revision 1.2 2000/09/19 13:13:13 nick * * Add display of returned error text in log file * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.28 2000/07/31 08:46:11 ngorham * * Avoid potential buffer overrun * * Revision 1.27 2000/06/23 16:11:38 ngorham * * Map ODBC 2 SQLSTATE values to ODBC 3 * * Revision 1.25 2000/06/21 11:07:36 ngorham * * Stop Errors from SQLAllocHandle being lost * * Revision 1.24 2000/06/20 12:44:01 ngorham * * Fix bug that caused a success with info message from SQLExecute or * SQLExecDirect to be lost if used with a ODBC 3 driver and the application * called SQLGetDiagRec * * Revision 1.23 2000/06/01 11:00:51 ngorham * * return errors from descriptor functions * * Revision 1.22 2001/05/31 23:24:20 ngorham * * Update timestamps * * Revision 1.21 2000/05/21 21:49:19 ngorham * * Assorted fixes * * Revision 1.20 2001/04/11 09:00:05 ngorham * * remove stray printf * * Revision 1.19 2001/04/01 00:06:50 ngorham * * Dont use stderr, if the log file fails to open. * * Revision 1.18 2000/03/14 07:45:35 ngorham * * Fix bug that discarded connection errors * * Revision 1.17 2000/01/18 17:24:50 ngorham * * Add missing [unixODBC] prefix in front of error messages. * * Revision 1.16 1999/12/14 19:02:25 ngorham * * Mask out the password fields in the logging * * Revision 1.15 1999/12/04 17:01:23 ngorham * * Remove C++ comments from the Postgres code * * Revision 1.14 1999/12/01 09:20:07 ngorham * * Fix some threading problems * * Revision 1.13 1999/11/17 21:08:58 ngorham * * Fix Bug with the ODBC 3 error handling * * Revision 1.12 1999/11/13 23:41:01 ngorham * * Alter the way DM logging works * Upgrade the Postgres driver to 6.4.6 * * Revision 1.11 1999/11/10 22:15:48 ngorham * * Fix some bugs with the DM and error reporting. * * Revision 1.10 1999/11/10 03:51:34 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.9 1999/10/24 23:54:19 ngorham * * First part of the changes to the error reporting * * Revision 1.8 1999/10/03 23:05:16 ngorham * * First public outing of the cursor lib * * Revision 1.7 1999/09/19 22:24:34 ngorham * * Added support for the cursor library * * Revision 1.6 1999/08/03 21:47:39 shandyb * Moving to automake: changed files in DriverManager * * Revision 1.5 1999/07/10 21:10:17 ngorham * * Adjust error sqlstate from driver manager, depending on requested * version (ODBC2/3) * * Revision 1.4 1999/07/05 19:54:05 ngorham * * Fix a problem where a long string could crash the DM * * Revision 1.3 1999/07/04 21:05:08 ngorham * * Add LGPL Headers to code * * Revision 1.2 1999/06/19 17:51:41 ngorham * * Applied assorted minor bug fixes * * Revision 1.1.1.1 1999/05/29 13:41:09 sShandyb * first go at it * * Revision 1.2 1999/06/03 22:20:25 ngorham * * Finished off the ODBC3-2 mapping * * Revision 1.1.1.1 1999/05/27 18:23:18 pharvey * Imported sources * * * **********************************************************************/ #include #include #include #if defined( HAVE_GETTIMEOFDAY ) && defined( HAVE_SYS_TIME_H ) #include #elif defined( HAVE_FTIME ) && defined( HAVE_SYS_TIMEB_H ) #include #elif defined( DHAVE_TIME ) && defined( HAVE_TIME_H ) #include #endif #include "drivermanager.h" static char const rcsid[]= "$RCSfile: __info.c,v $ $Revision: 1.48 $"; struct log_structure log_info = { NULL, NULL, 0 }; SQLINTEGER ODBCSharedTraceFlag = 0; /* * unicode setup functions, do them on a connection basis. */ int unicode_setup( DMHDBC connection ) { #ifdef HAVE_ICONV char ascii[ 256 ], unicode[ 256 ]; char *be_ucode[] = { "UCS-2-INTERNAL", "UCS-2BE", "UCS-2", "ucs2", NULL }; char *le_ucode[] = { "UCS-2-INTERNAL", "UCS-2LE", NULL }; char *asc[] = { "char", "ISO8859-1", "ISO-8859-1", "8859-1", "iso8859_1", "ASCII", NULL }; union { long l; char c[sizeof (long)]; } u; int be; /* * is this a bigendian machine ? */ u.l = 1; be = (u.c[sizeof (long) - 1] == 1); mutex_iconv_entry(); /* * if required find a match */ if ( strcmp( ASCII_ENCODING, "auto-search" ) == 0 && strcmp( connection -> unicode_string, "auto-search" ) == 0 ) { /* * look for both */ int i, j, found; iconv_t icvt; ascii[ 0 ] = '\0'; unicode[ 0 ] = '\0'; for ( i = found = 0; ( be ? be_ucode[ i ] : le_ucode[ i ] ) != NULL && !found; i ++ ) { for ( j = 0; asc[ j ] && !found; j ++ ) { if (( icvt = iconv_open( asc[ j ], be ? be_ucode[ i ] : le_ucode[ i ] )) != ((iconv_t) -1 ) ) { strcpy( ascii, asc[ j ] ); strcpy( unicode, be ? be_ucode[ i ] : le_ucode[ i ] ); iconv_close( icvt ); found = 1; } } } } else if ( strcmp( ASCII_ENCODING, "auto-search" ) == 0 ) { /* * look for ascii */ int j; iconv_t icvt; strcpy( unicode, connection -> unicode_string ); for ( j = 0; asc[ j ]; j ++ ) { if (( icvt = iconv_open( asc[ j ], unicode )) != ((iconv_t) -1 ) ) { strcpy( ascii, asc[ j ] ); iconv_close( icvt ); break; } } } else if ( strcmp( connection -> unicode_string, "auto-search" ) == 0 ) { /* * look for unicode */ int i; iconv_t icvt; strcpy( ascii, ASCII_ENCODING ); for ( i = 0; be ? be_ucode[ i ] : le_ucode[ i ]; i ++ ) { if (( icvt = iconv_open( ascii, be ? be_ucode[ i ] : le_ucode[ i ] )) != ((iconv_t) -1 ) ) { strcpy( unicode, be ? be_ucode[ i ] : le_ucode[ i ] ); iconv_close( icvt ); break; } } } else { strcpy( ascii, ASCII_ENCODING ); strcpy( unicode, connection -> unicode_string ); } if ( log_info.log_flag ) { sprintf( connection -> msg, "\t\tUNICODE Using encoding ASCII '%s' and UNICODE '%s'", ascii, unicode ); dm_log_write_diag( connection -> msg ); } connection -> iconv_cd_uc_to_ascii = iconv_open( ascii, unicode ); connection -> iconv_cd_ascii_to_uc = iconv_open( unicode, ascii ); mutex_iconv_exit(); if ( connection -> iconv_cd_uc_to_ascii == (iconv_t)(-1) || connection -> iconv_cd_ascii_to_uc == (iconv_t)(-1)) { return 0; } else { return 1; } #else return 1; #endif } void unicode_shutdown( DMHDBC connection ) { #ifdef HAVE_ICONV mutex_iconv_entry(); if ( connection -> iconv_cd_ascii_to_uc != (iconv_t)(-1) ) { iconv_close( connection -> iconv_cd_ascii_to_uc ); } if ( connection -> iconv_cd_uc_to_ascii != (iconv_t)(-1)) { iconv_close( connection -> iconv_cd_uc_to_ascii ); } connection -> iconv_cd_uc_to_ascii = (iconv_t)(-1); connection -> iconv_cd_ascii_to_uc = (iconv_t)(-1); mutex_iconv_exit(); #endif } /* * returned a malloc'd buffer in unicode converted from the ansi buffer */ SQLWCHAR *ansi_to_unicode_alloc( SQLCHAR *str, SQLINTEGER len, DMHDBC connection ) { SQLWCHAR *ustr; int i; if( !str ) { return NULL; } if ( len == SQL_NTS ) { len = strlen((char*) str ) + 1; } ustr = malloc( sizeof( SQLWCHAR ) * len ); if ( !ustr ) { return NULL; } return ansi_to_unicode_copy( ustr, (char*) str, len, connection ); } /* * return a ansi representation of a unicode buffer, according to * the chosen conversion method */ char *unicode_to_ansi_alloc( SQLWCHAR *str, SQLINTEGER len, DMHDBC connection ) { char *aptr; int i; if ( !str ) { return NULL; } if ( len == SQL_NTS ) { len = wide_strlen( str ) + 1; } aptr = malloc( len ); if ( !aptr ) { return NULL; } return unicode_to_ansi_copy( aptr, len, str, len, connection ); } /* * copy from a unicode buffer to a ansi buffer using the chosen conversion */ char *unicode_to_ansi_copy( char * dest, int dest_len, SQLWCHAR *src, SQLINTEGER buffer_len, DMHDBC connection ) { char *aptr = (char*) src; int i; if ( !src || !dest ) { return NULL; } if ( buffer_len == SQL_NTS ) { buffer_len = wide_strlen( src ) + 1; } #ifdef HAVE_ICONV mutex_iconv_entry(); if ( connection && connection -> iconv_cd_uc_to_ascii != (iconv_t)(-1)) { size_t ret; size_t inbl = buffer_len * sizeof( SQLWCHAR ); size_t obl = dest_len; char *ipt = (char*)src; char *opt = (char*)dest; if (( ret = iconv( connection -> iconv_cd_uc_to_ascii, (ICONV_CONST char**)&ipt, &inbl, &opt, &obl )) != (size_t)(-1)) { mutex_iconv_exit(); return dest; } } mutex_iconv_exit(); #endif for ( i = 0; i < buffer_len && i < dest_len && src[ i ] != 0; i ++ ) { #ifdef SQL_WCHART_CONVERT dest[ i ] = (char)(src[ i ] & 0x000000ff); #else dest[ i ] = src[ i ] & 0x00FF; #endif } dest[ i ] = '\0'; return dest; } /* * copy from a ansi buffer to a unicode buffer using the chosen conversion */ SQLWCHAR *ansi_to_unicode_copy( SQLWCHAR * dest, char *src, SQLINTEGER buffer_len, DMHDBC connection ) { char *aptr = (char*) src; int i; if ( !src || !dest ) { return NULL; } if ( buffer_len == SQL_NTS ) { buffer_len = strlen( src ) + 1; } #ifdef HAVE_ICONV if ( connection && connection -> iconv_cd_ascii_to_uc != (iconv_t)(-1)) { size_t inbl = buffer_len; size_t obl = buffer_len * sizeof( SQLWCHAR ); char *ipt = (char*)src; char *opt = (char*)dest; mutex_iconv_entry(); if ( iconv( connection -> iconv_cd_ascii_to_uc, (ICONV_CONST char**)&ipt, &inbl, &opt, &obl ) != (size_t)(-1)) { mutex_iconv_exit(); return dest; } mutex_iconv_exit(); } #endif for ( i = 0; i < buffer_len && src[ i ] != 0; i ++ ) { #ifdef SQL_WCHART_CONVERT dest[ i ] = src[ i ] & 0x000000ff; #else dest[ i ] = src[ i ] & 0x00FF; #endif } dest[ i ] = 0; return dest; } /* * display a SQLGetTypeInfo type as a astring */ char * __type_as_string( SQLCHAR *s, SQLSMALLINT type ) { switch( type ) { case SQL_DOUBLE: sprintf((char*) s, "SQL_DOUBLE" ); break; case SQL_FLOAT: sprintf((char*) s, "SQL_FLOAT" ); break; case SQL_REAL: sprintf((char*) s, "SQL_REAL" ); break; case SQL_BIT: sprintf((char*) s, "SQL_BIT" ); break; case SQL_CHAR: sprintf((char*) s, "SQL_CHAR" ); break; case SQL_VARCHAR: sprintf((char*) s, "SQL_VARCHAR" ); break; case SQL_LONGVARCHAR: sprintf((char*) s, "SQL_LONGVARCHAR" ); break; case SQL_BINARY: sprintf((char*) s, "SQL_BINARY" ); break; case SQL_VARBINARY: sprintf((char*) s, "SQL_VARBINARY" ); break; case SQL_LONGVARBINARY: sprintf((char*) s, "SQL_LONGVARBINARY" ); break; case SQL_DECIMAL: sprintf((char*) s, "SQL_DECIMAL" ); break; case SQL_NUMERIC: sprintf((char*) s, "SQL_NUMERIC" ); break; case SQL_BIGINT: sprintf((char*) s, "SQL_BIGINT" ); break; case SQL_INTEGER: sprintf((char*) s, "SQL_INTEGER" ); break; case SQL_SMALLINT: sprintf((char*) s, "SQL_SMALLINT" ); break; case SQL_TINYINT: sprintf((char*) s, "SQL_TINYINT" ); break; case SQL_TYPE_DATE: sprintf((char*) s, "SQL_TYPE_DATE" ); break; case SQL_TYPE_TIME: sprintf((char*) s, "SQL_TYPE_TIME" ); break; case SQL_TYPE_TIMESTAMP: sprintf((char*) s, "SQL_TYPE_TIMESTAMP" ); break; case SQL_DATE: sprintf((char*) s, "SQL_DATE" ); break; case SQL_TIME: sprintf((char*) s, "SQL_TIME" ); break; case SQL_TIMESTAMP: sprintf((char*) s, "SQL_TIMESTAMP" ); break; case SQL_INTERVAL_YEAR: sprintf((char*) s, "SQL_INTERVAL_YEAR" ); break; case SQL_INTERVAL_YEAR_TO_MONTH: sprintf((char*) s, "SQL_INTERVAL_YEAR_TO_MONTH" ); break; case SQL_INTERVAL_MONTH: sprintf((char*) s, "SQL_INTERVAL_MONTH" ); break; case SQL_INTERVAL_DAY_TO_SECOND: sprintf((char*) s, "SQL_INTERVAL_DAY_TO_SECOND" ); break; case SQL_INTERVAL_DAY_TO_MINUTE: sprintf((char*) s, "SQL_INTERVAL_DAY_TO_MINUTE" ); break; case SQL_INTERVAL_DAY: sprintf((char*) s, "SQL_INTERVAL_DAY" ); break; case SQL_INTERVAL_HOUR_TO_SECOND: sprintf((char*) s, "SQL_INTERVAL_HOUR_TO_SECOND" ); break; case SQL_INTERVAL_HOUR_TO_MINUTE: sprintf((char*) s, "SQL_INTERVAL_HOUR_TO_MINUTE" ); break; case SQL_INTERVAL_HOUR: sprintf((char*) s, "SQL_INTERVAL_HOUR" ); break; case SQL_INTERVAL_MINUTE_TO_SECOND: sprintf((char*) s, "SQL_INTERVAL_MINUTE_TO_SECOND" ); break; case SQL_INTERVAL_MINUTE: sprintf((char*) s, "SQL_INTERVAL_MINUTE" ); break; case SQL_INTERVAL_SECOND: sprintf((char*) s, "SQL_INTERVAL_SECOND" ); break; case SQL_ALL_TYPES: sprintf((char*) s, "SQL_ALL_TYPES" ); break; default: sprintf((char*) s, "Unknown(%d)", (int)type ); break; } return (char*) s; } /* * display a data field as a string */ char * __sdata_as_string( SQLCHAR *s, SQLINTEGER type, SQLSMALLINT *ptr, SQLPOINTER buf ) { SQLLEN iptr; if ( ptr ) { iptr = *ptr; return __data_as_string( s, type, &iptr, buf ); } else { return __data_as_string( s, type, NULL, buf ); } return (char*) s; } char * __data_as_string( SQLCHAR *s, SQLINTEGER type, SQLLEN *ptr, SQLPOINTER buf ) { if ( ptr && *ptr == SQL_NULL_DATA ) { sprintf((char*) s, "SQL_NULL_DATA" ); } else if ( ptr && *ptr < 0 ) { sprintf((char*) s, "Indicator = %d", (int)*ptr ); } else if ( !buf ) { sprintf((char*) s, "[NULLPTR]" ); } else { switch ( type ) { case SQL_INTEGER: { SQLINTEGER val; memcpy( &val, buf, sizeof( SQLINTEGER )); sprintf((char*) s, "[%d]", (int)val ); } break; case SQL_CHAR: case SQL_VARCHAR: sprintf((char*) s, "[%.*s]", LOG_MESSAGE_LEN, (char*)buf ); break; case SQL_WCHAR: case SQL_WVARCHAR: { int len = LOG_MESSAGE_LEN; signed short *ptr = (signed short*)buf; char *optr; optr = (char*) s; sprintf((char*) s, "[" ); optr ++; while( len > 0 ) { if ( *ptr == 0x0000 ) break; sprintf( optr, "%c", *ptr & 0x00FF ); optr ++; len --; ptr ++; } sprintf( optr, "](unicode)" ); } break; case SQL_DOUBLE: { double val; memcpy( &val, buf, sizeof( double )); sprintf((char*) s, "[%g]", val ); } break; case SQL_FLOAT: case SQL_REAL: { float val; memcpy( &val, buf, sizeof( float )); sprintf((char*) s, "[%g]", val ); } break; case SQL_BIT: { SQLCHAR val; memcpy( &val, buf, sizeof( SQLCHAR )); sprintf((char*) s, "[%d]", (int)val ); } break; case SQL_LONGVARCHAR: sprintf((char*) s, "[LONGVARCHARDATA...]" ); break; case SQL_BINARY: sprintf((char*) s, "[BINARYDATA...]" ); break; case SQL_VARBINARY: sprintf((char*) s, "[VARBINARYDATA...]" ); break; case SQL_LONGVARBINARY: sprintf((char*) s, "[LONGVARBINARYDATA...]" ); break; case SQL_DECIMAL: sprintf((char*) s, "[DECIMAL...]" ); break; case SQL_NUMERIC: sprintf((char*) s, "[NUMERIC...]" ); break; case SQL_BIGINT: sprintf((char*) s, "[BIGINT...]" ); break; case SQL_SMALLINT: { short val; memcpy( &val, buf, sizeof( short )); sprintf((char*) s, "[%d]", (int)val ); } break; case SQL_TINYINT: { char val; memcpy( &val, buf, sizeof( char )); sprintf((char*) s, "[%d]", (int)val ); } break; case SQL_TYPE_DATE: case SQL_DATE: sprintf((char*) s, "[DATE...]" ); break; case SQL_TYPE_TIME: case SQL_TIME: sprintf((char*) s, "[TIME...]" ); break; case SQL_TYPE_TIMESTAMP: case SQL_TIMESTAMP: sprintf((char*) s, "[TIMESTAMP...]" ); break; case SQL_INTERVAL_YEAR: case SQL_INTERVAL_YEAR_TO_MONTH: case SQL_INTERVAL_MONTH: case SQL_INTERVAL_DAY_TO_SECOND: case SQL_INTERVAL_DAY_TO_MINUTE: case SQL_INTERVAL_DAY: case SQL_INTERVAL_HOUR_TO_SECOND: case SQL_INTERVAL_HOUR_TO_MINUTE: case SQL_INTERVAL_HOUR: case SQL_INTERVAL_MINUTE_TO_SECOND: case SQL_INTERVAL_MINUTE: case SQL_INTERVAL_SECOND: sprintf((char*) s, "[INTERVAL...]" ); break; default: sprintf((char*) s, "[Data...]" ); break; } } return (char*) s; } /* * display a pointer to a int */ char * __iptr_as_string( SQLCHAR *s, SQLINTEGER *ptr ) { if ( ptr ) { sprintf((char*) s, "%p -> %d", (void*)ptr, (int)*ptr ); } else { sprintf((char*) s, "NULLPTR" ); } return (char*) s; } char * __ptr_as_string( SQLCHAR *s, SQLLEN *ptr ) { if ( ptr ) { sprintf((char*) s, "%p -> %d", (void*)ptr, (int)*ptr ); } else { sprintf((char*) s, "NULLPTR" ); } return (char*) s; } /* * display a pointer to a int */ char * __sptr_as_string( SQLCHAR *s, SQLSMALLINT *ptr ) { if ( ptr ) { sprintf((char*) s, "%p -> %d", (void*)ptr, (int)*ptr ); } else { sprintf((char*) s, "NULLPTR" ); } return (char*) s; } /* * convert a function id to a string */ char * __fid_as_string( SQLCHAR *s, SQLINTEGER type ) { switch( type ) { case SQL_API_SQLALLOCCONNECT: sprintf((char*) s, "SQLAllocConnect" ); break; case SQL_API_SQLALLOCENV: sprintf((char*) s, "SQLAllocEnv" ); break; case SQL_API_SQLALLOCHANDLE: sprintf((char*) s, "SQLAllocHandle" ); break; case SQL_API_SQLALLOCSTMT: sprintf((char*) s, "SQLAllocStmt" ); break; case SQL_API_SQLALLOCHANDLESTD: sprintf((char*) s, "SQLAllochandleStd" ); break; case SQL_API_SQLBINDCOL: sprintf((char*) s, "SQLBindCol" ); break; case SQL_API_SQLBINDPARAM: sprintf((char*) s, "SQLBindParam" ); break; case SQL_API_SQLBINDPARAMETER: sprintf((char*) s, "SQLBindParameter" ); break; case SQL_API_SQLBROWSECONNECT: sprintf((char*) s, "SQLBrowseConnect" ); break; case SQL_API_SQLBULKOPERATIONS: sprintf((char*) s, "SQLBulkOperations" ); break; case SQL_API_SQLCANCEL: sprintf((char*) s, "SQLCancel" ); break; case SQL_API_SQLCLOSECURSOR: sprintf((char*) s, "SQLCloseCursor" ); break; case SQL_API_SQLCOLATTRIBUTES: sprintf((char*) s, "SQLColAttribute(s)" ); break; case SQL_API_SQLCOLUMNPRIVILEGES: sprintf((char*) s, "SQLColumnPrivileges" ); break; case SQL_API_SQLCOLUMNS: sprintf((char*) s, "SQLColumns" ); break; case SQL_API_SQLCONNECT: sprintf((char*) s, "SQLConnect" ); break; case SQL_API_SQLCOPYDESC: sprintf((char*) s, "SQLCopyDesc" ); break; case SQL_API_SQLDATASOURCES: sprintf((char*) s, "SQLDataSources" ); break; case SQL_API_SQLDESCRIBECOL: sprintf((char*) s, "SQLDescribeCol" ); break; case SQL_API_SQLDESCRIBEPARAM: sprintf((char*) s, "SQLDescribeParam" ); break; case SQL_API_SQLDISCONNECT: sprintf((char*) s, "SQLDisconnect" ); break; case SQL_API_SQLDRIVERCONNECT: sprintf((char*) s, "SQLDriverConnect" ); break; case SQL_API_SQLDRIVERS: sprintf((char*) s, "SQLDrivers" ); break; case SQL_API_SQLENDTRAN: sprintf((char*) s, "SQLEndTran" ); break; case SQL_API_SQLERROR: sprintf((char*) s, "SQLError" ); break; case SQL_API_SQLEXECDIRECT: sprintf((char*) s, "SQLExecDirect" ); break; case SQL_API_SQLEXECUTE: sprintf((char*) s, "SQLExecute" ); break; case SQL_API_SQLEXTENDEDFETCH: sprintf((char*) s, "SQLExtendedFetch" ); break; case SQL_API_SQLFETCH: sprintf((char*) s, "SQLFetch" ); break; case SQL_API_SQLFETCHSCROLL: sprintf((char*) s, "SQLFetchScroll" ); break; case SQL_API_SQLFOREIGNKEYS: sprintf((char*) s, "SQLForeignKeys" ); break; case SQL_API_SQLFREEENV: sprintf((char*) s, "SQLFreeEnv" ); break; case SQL_API_SQLFREEHANDLE: sprintf((char*) s, "SQLFreeHandle" ); break; case SQL_API_SQLFREESTMT: sprintf((char*) s, "SQLFreeStmt" ); break; case SQL_API_SQLFREECONNECT: sprintf((char*) s, "SQLFreeConnect" ); break; case SQL_API_SQLGETCONNECTATTR: sprintf((char*) s, "SQLGetConnectAttr" ); break; case SQL_API_SQLGETCONNECTOPTION: sprintf((char*) s, "SQLGetConnectOption" ); break; case SQL_API_SQLGETCURSORNAME: sprintf((char*) s, "SQLGetCursorName" ); break; case SQL_API_SQLGETDATA: sprintf((char*) s, "SQLGetData" ); break; case SQL_API_SQLGETDESCFIELD: sprintf((char*) s, "SQLGetDescField" ); break; case SQL_API_SQLGETDESCREC: sprintf((char*) s, "SQLGetDescRec" ); break; case SQL_API_SQLGETDIAGFIELD: sprintf((char*) s, "SQLGetDiagField" ); break; case SQL_API_SQLGETENVATTR: sprintf((char*) s, "SQLGetEnvAttr" ); break; case SQL_API_SQLGETFUNCTIONS: sprintf((char*) s, "SQLGetFunctions" ); break; case SQL_API_SQLGETINFO: sprintf((char*) s, "SQLGetInfo" ); break; case SQL_API_SQLGETSTMTATTR: sprintf((char*) s, "SQLGetStmtAttr" ); break; case SQL_API_SQLGETSTMTOPTION: sprintf((char*) s, "SQLGetStmtOption" ); break; case SQL_API_SQLGETTYPEINFO: sprintf((char*) s, "SQLGetTypeInfo" ); break; case SQL_API_SQLMORERESULTS: sprintf((char*) s, "SQLMoreResults" ); break; case SQL_API_SQLNATIVESQL: sprintf((char*) s, "SQLNativeSql" ); break; case SQL_API_SQLNUMPARAMS: sprintf((char*) s, "SQLNumParams" ); break; case SQL_API_SQLNUMRESULTCOLS: sprintf((char*) s, "SQLNumResultCols" ); break; case SQL_API_SQLPARAMDATA: sprintf((char*) s, "SQLParamData" ); break; case SQL_API_SQLPARAMOPTIONS: sprintf((char*) s, "SQLParamOptions" ); break; case SQL_API_SQLPREPARE: sprintf((char*) s, "SQLPrepare" ); break; case SQL_API_SQLPRIMARYKEYS: sprintf((char*) s, "SQLPrimaryKeys" ); break; case SQL_API_SQLPROCEDURECOLUMNS: sprintf((char*) s, "SQLProcedureColumns" ); break; case SQL_API_SQLPROCEDURES: sprintf((char*) s, "SQLProcedures" ); break; case SQL_API_SQLPUTDATA: sprintf((char*) s, "SQLPutData" ); break; case SQL_API_SQLROWCOUNT: sprintf((char*) s, "SQLRowCount" ); break; case SQL_API_SQLSETCONNECTATTR: sprintf((char*) s, "SQLSetConnectAttr" ); break; case SQL_API_SQLSETCONNECTOPTION: sprintf((char*) s, "SQLSetConnectOption" ); break; case SQL_API_SQLSETCURSORNAME: sprintf((char*) s, "SQLSetCursorName" ); break; case SQL_API_SQLSETDESCFIELD: sprintf((char*) s, "SQLSetDescField" ); break; case SQL_API_SQLSETDESCREC: sprintf((char*) s, "SQLSetDescRec" ); break; case SQL_API_SQLSETENVATTR: sprintf((char*) s, "SQLSetEnvAttr" ); break; case SQL_API_SQLSETPARAM: sprintf((char*) s, "SQLSetParam" ); break; case SQL_API_SQLSETPOS: sprintf((char*) s, "SQLSetPos" ); break; case SQL_API_SQLSETSCROLLOPTIONS: sprintf((char*) s, "SQLSetScrollOptions" ); break; case SQL_API_SQLSETSTMTATTR: sprintf((char*) s, "SQLSetStmtAttr" ); break; case SQL_API_SQLSETSTMTOPTION: sprintf((char*) s, "SQLSetStmtOption" ); break; case SQL_API_SQLSPECIALCOLUMNS: sprintf((char*) s, "SQLSpecialColumns" ); break; case SQL_API_SQLSTATISTICS: sprintf((char*) s, "SQLStatistics" ); break; case SQL_API_SQLTABLEPRIVILEGES: sprintf((char*) s, "SQLTablePrivileges" ); break; case SQL_API_SQLTABLES: sprintf((char*) s, "SQLTables" ); break; case SQL_API_SQLTRANSACT: sprintf((char*) s, "SQLTransact" ); break; case SQL_API_SQLGETDIAGREC: sprintf((char*) s, "SQLGetDiagRec" ); break; default: sprintf((char*) s, "%d", (int)type ); } return (char*) s; } /* * convert a column attribute to a string */ char * __col_attr_as_string( SQLCHAR *s, SQLINTEGER type ) { switch( type ) { case SQL_DESC_AUTO_UNIQUE_VALUE: sprintf((char*) s, "SQL_DESC_AUTO_UNIQUE_VALUE" ); break; case SQL_DESC_BASE_COLUMN_NAME: sprintf((char*) s, "SQL_DESC_BASE_COLUMN_NAME" ); break; case SQL_DESC_BASE_TABLE_NAME: sprintf((char*) s, "SQL_DESC_BASE_TABLE_NAME" ); break; case SQL_DESC_CASE_SENSITIVE: sprintf((char*) s, "SQL_DESC_CASE_SENSITIVE" ); break; case SQL_DESC_CATALOG_NAME: sprintf((char*) s, "SQL_DESC_CATALOG_NAME" ); break; case SQL_DESC_CONCISE_TYPE: sprintf((char*) s, "SQL_DESC_CONCISE_TYPE" ); break; case SQL_DESC_DISPLAY_SIZE: sprintf((char*) s, "SQL_DESC_DISPLAY_SIZE" ); break; case SQL_DESC_FIXED_PREC_SCALE: sprintf((char*) s, "SQL_DESC_FIXED_PREC_SCALE" ); break; case SQL_DESC_LABEL: sprintf((char*) s, "SQL_DESC_LABEL" ); break; case SQL_COLUMN_NAME: sprintf((char*) s, "SQL_COLUMN_NAME" ); break; case SQL_DESC_LENGTH: sprintf((char*) s, "SQL_DESC_LENGTH" ); break; case SQL_COLUMN_LENGTH: sprintf((char*) s, "SQL_COLUMN_LENGTH" ); break; case SQL_DESC_LITERAL_PREFIX: sprintf((char*) s, "SQL_DESC_LITERAL_PREFIX" ); break; case SQL_DESC_LITERAL_SUFFIX: sprintf((char*) s, "SQL_DESC_LITERAL_SUFFIX" ); break; case SQL_DESC_LOCAL_TYPE_NAME: sprintf((char*) s, "SQL_DESC_LOCAL_TYPE_NAME" ); break; case SQL_DESC_NAME: sprintf((char*) s, "SQL_DESC_NAME" ); break; case SQL_DESC_NULLABLE: sprintf((char*) s, "SQL_DESC_NULLABLE" ); break; case SQL_COLUMN_NULLABLE: sprintf((char*) s, "SQL_COLUMN_NULLABLE" ); break; case SQL_DESC_NUM_PREC_RADIX: sprintf((char*) s, "SQL_DESC_NUM_PREC_RADIX" ); break; case SQL_DESC_OCTET_LENGTH: sprintf((char*) s, "SQL_DESC_OCTET_LENGTH" ); break; case SQL_DESC_PRECISION: sprintf((char*) s, "SQL_DESC_PRECISION" ); break; case SQL_COLUMN_PRECISION: sprintf((char*) s, "SQL_COLUMN_PRECISION" ); break; case SQL_DESC_SCALE: sprintf((char*) s, "SQL_DESC_SCALE" ); break; case SQL_COLUMN_SCALE: sprintf((char*) s, "SQL_COLUMN_SCALE" ); break; case SQL_DESC_SCHEMA_NAME: sprintf((char*) s, "SQL_DESC_SCHEMA_NAME" ); break; case SQL_DESC_SEARCHABLE: sprintf((char*) s, "SQL_DESC_SEARCHABLE" ); break; case SQL_DESC_TABLE_NAME: sprintf((char*) s, "SQL_DESC_TABLE_NAME" ); break; case SQL_DESC_TYPE: sprintf((char*) s, "SQL_DESC_TYPE" ); break; case SQL_DESC_TYPE_NAME: sprintf((char*) s, "SQL_DESC_TYPE_NAME" ); break; case SQL_DESC_UNNAMED: sprintf((char*) s, "SQL_DESC_UNNAMED" ); break; case SQL_DESC_UNSIGNED: sprintf((char*) s, "SQL_DESC_UNSIGNED" ); break; case SQL_DESC_UPDATABLE: sprintf((char*) s, "SQL_DESC_UPDATABLE" ); break; default: sprintf((char*) s, "%d", (int)type ); } return (char*) s; } /* * convert a connect attribute to a string */ char * __env_attr_as_string( SQLCHAR *s, SQLINTEGER type ) { switch( type ) { case SQL_ATTR_CONNECTION_POOLING: sprintf((char*) s, "SQL_ATTR_CONNECTION_POOLING" ); break; case SQL_ATTR_CP_MATCH: sprintf((char*) s, "SQL_ATTR_CP_MATCH" ); break; case SQL_ATTR_ODBC_VERSION: sprintf((char*) s, "SQL_ATTR_ODBC_VERSION" ); break; case SQL_ATTR_OUTPUT_NTS: sprintf((char*) s, "SQL_ATTR_OUTPUT_NTS" ); break; default: sprintf((char*) s, "%d", (int)type ); } return (char*) s; } /* * convert a connect attribute to a string */ char * __con_attr_as_string( SQLCHAR *s, SQLINTEGER type ) { switch( type ) { case SQL_ATTR_ACCESS_MODE: sprintf((char*) s, "SQL_ATTR_ACCESS_MODE" ); break; case SQL_ATTR_ASYNC_ENABLE: sprintf((char*) s, "SQL_ATTR_ASYNC_ENABLE" ); break; case SQL_ATTR_AUTO_IPD: sprintf((char*) s, "SQL_ATTR_AUTO_IPD" ); break; case SQL_ATTR_AUTOCOMMIT: sprintf((char*) s, "SQL_ATTR_AUTOCOMMIT" ); break; case SQL_ATTR_CONNECTION_TIMEOUT: sprintf((char*) s, "SQL_ATTR_CONNECTION_TIMEOUT" ); break; case SQL_ATTR_CURRENT_CATALOG: sprintf((char*) s, "SQL_ATTR_CURRENT_CATALOG" ); break; case SQL_ATTR_LOGIN_TIMEOUT: sprintf((char*) s, "SQL_ATTR_LOGIN_TIMEOUT" ); break; case SQL_ATTR_METADATA_ID: sprintf((char*) s, "SQL_ATTR_METADATA_ID" ); break; case SQL_ATTR_ODBC_CURSORS: sprintf((char*) s, "SQL_ATTR_ODBC_CURSORS" ); break; case SQL_ATTR_PACKET_SIZE: sprintf((char*) s, "SQL_ATTR_PACKET_SIZE" ); break; case SQL_ATTR_QUIET_MODE: sprintf((char*) s, "SQL_ATTR_QUIET_MODE" ); break; case SQL_ATTR_TRACE: sprintf((char*) s, "SQL_ATTR_TRACE" ); break; case SQL_ATTR_TRACEFILE: sprintf((char*) s, "SQL_ATTR_TRACEFILE" ); break; case SQL_ATTR_TRANSLATE_LIB: sprintf((char*) s, "SQL_ATTR_TRANSLATE_LIB" ); break; case SQL_ATTR_TRANSLATE_OPTION: sprintf((char*) s, "SQL_ATTR_TRANSLATE_OPTION" ); break; case SQL_ATTR_TXN_ISOLATION: sprintf((char*) s, "SQL_ATTR_TXN_ISOLATION" ); break; default: sprintf((char*) s, "%d", (int)type ); } return (char*) s; } /* * convert a diagnostic attribute to a string */ char * __diag_attr_as_string( SQLCHAR *s, SQLINTEGER type ) { switch( type ) { case SQL_DIAG_CURSOR_ROW_COUNT: sprintf((char*) s, "SQL_DIAG_CURSOR_ROW_COUNT" ); break; case SQL_DIAG_DYNAMIC_FUNCTION: sprintf((char*) s, "SQL_DIAG_DYNAMIC_FUNCTION" ); break; case SQL_DIAG_DYNAMIC_FUNCTION_CODE: sprintf((char*) s, "SQL_DIAG_DYNAMIC_FUNCTION_CODE" ); break; case SQL_DIAG_NUMBER: sprintf((char*) s, "SQL_DIAG_NUMBER" ); break; case SQL_DIAG_RETURNCODE: sprintf((char*) s, "SQL_DIAG_RETURNCODE" ); break; case SQL_DIAG_ROW_COUNT: sprintf((char*) s, "SQL_DIAG_ROW_COUNT" ); break; case SQL_DIAG_CLASS_ORIGIN: sprintf((char*) s, "SQL_DIAG_CLASS_ORIGIN" ); break; case SQL_DIAG_COLUMN_NUMBER: sprintf((char*) s, "SQL_DIAG_COLUMN_NUMBER" ); break; case SQL_DIAG_CONNECTION_NAME: sprintf((char*) s, "SQL_DIAG_CONNECTION_NAME" ); break; case SQL_DIAG_MESSAGE_TEXT: sprintf((char*) s, "SQL_DIAG_MESSAGE_TEXT" ); break; case SQL_DIAG_NATIVE: sprintf((char*) s, "SQL_DIAG_NATIVE" ); break; case SQL_DIAG_ROW_NUMBER: sprintf((char*) s, "SQL_DIAG_ROW_NUMBER" ); break; case SQL_DIAG_SERVER_NAME: sprintf((char*) s, "SQL_DIAG_SERVER_NAME" ); break; case SQL_DIAG_SQLSTATE: sprintf((char*) s, "SQL_DIAG_SQLSTATE" ); break; case SQL_DIAG_SUBCLASS_ORIGIN: sprintf((char*) s, "SQL_DIAG_SUBCLASS_ORIGIN" ); break; default: sprintf((char*) s, "%d", (int)type ); } return (char*) s; } /* * convert a descriptor attribute to a string */ char * __desc_attr_as_string( SQLCHAR *s, SQLINTEGER type ) { switch( type ) { case SQL_DESC_ALLOC_TYPE: sprintf((char*) s, "SQL_DESC_ALLOC_TYPE" ); break; case SQL_DESC_ARRAY_SIZE: sprintf((char*) s, "SQL_DESC_ARRAY_SIZE" ); break; case SQL_DESC_ARRAY_STATUS_PTR: sprintf((char*) s, "SQL_DESC_ARRAY_STATUS_PTR" ); break; case SQL_DESC_BIND_OFFSET_PTR: sprintf((char*) s, "SQL_DESC_BIND_OFFSET_PTR" ); break; case SQL_DESC_BIND_TYPE: sprintf((char*) s, "SQL_DESC_BIND_TYPE" ); break; case SQL_DESC_COUNT: sprintf((char*) s, "SQL_DESC_COUNT" ); break; case SQL_DESC_ROWS_PROCESSED_PTR: sprintf((char*) s, "SQL_DESC_ROWS_PROCESSED_PTR" ); break; case SQL_DESC_AUTO_UNIQUE_VALUE: sprintf((char*) s, "SQL_DESC_AUTO_UNIQUE_VALUE" ); break; case SQL_DESC_BASE_COLUMN_NAME: sprintf((char*) s, "SQL_DESC_BASE_COLUMN_NAME" ); break; case SQL_DESC_BASE_TABLE_NAME: sprintf((char*) s, "SQL_DESC_BASE_TABLE_NAME" ); break; case SQL_DESC_CASE_SENSITIVE: sprintf((char*) s, "SQL_DESC_CASE_SENSITIVE" ); break; case SQL_DESC_CATALOG_NAME: sprintf((char*) s, "SQL_DESC_CATALOG_NAME" ); break; case SQL_DESC_CONCISE_TYPE: sprintf((char*) s, "SQL_DESC_CONCISE_TYPE" ); break; case SQL_DESC_DATA_PTR: sprintf((char*) s, "SQL_DESC_DATA_PTR" ); break; case SQL_DESC_DATETIME_INTERVAL_CODE: sprintf((char*) s, "SQL_DESC_DATETIME_INTERVAL_CODE" ); break; case SQL_DESC_DATETIME_INTERVAL_PRECISION: sprintf((char*) s, "SQL_DESC_DATETIME_INTERVAL_PRECISION" ); break; case SQL_DESC_DISPLAY_SIZE: sprintf((char*) s, "SQL_DESC_DISPLAY_SIZE" ); break; case SQL_DESC_FIXED_PREC_SCALE: sprintf((char*) s, "SQL_DESC_FIXED_PREC_SCALE" ); break; case SQL_DESC_INDICATOR_PTR: sprintf((char*) s, "SQL_DESC_INDICATOR_PTR" ); break; case SQL_DESC_LABEL: sprintf((char*) s, "SQL_DESC_LABEL" ); break; case SQL_DESC_LENGTH: sprintf((char*) s, "SQL_DESC_LENGTH" ); break; case SQL_DESC_LITERAL_PREFIX: sprintf((char*) s, "SQL_DESC_LITERAL_PREFIX" ); break; case SQL_DESC_LITERAL_SUFFIX: sprintf((char*) s, "SQL_DESC_LITERAL_SUFFIX" ); break; case SQL_DESC_LOCAL_TYPE_NAME: sprintf((char*) s, "SQL_DESC_LOCAL_TYPE_NAME" ); break; case SQL_DESC_NAME: sprintf((char*) s, "SQL_DESC_NAME" ); break; case SQL_DESC_NULLABLE: sprintf((char*) s, "SQL_DESC_NULLABLE" ); break; case SQL_DESC_NUM_PREC_RADIX: sprintf((char*) s, "SQL_DESC_NUM_PREC_RADIX" ); break; case SQL_DESC_OCTET_LENGTH: sprintf((char*) s, "SQL_DESC_OCTET_LENGTH" ); break; case SQL_DESC_OCTET_LENGTH_PTR: sprintf((char*) s, "SQL_DESC_OCTET_LENGTH_PTR" ); break; case SQL_DESC_PARAMETER_TYPE: sprintf((char*) s, "SQL_DESC_PARAMETER_TYPE" ); break; case SQL_DESC_PRECISION: sprintf((char*) s, "SQL_DESC_PRECISION" ); break; case SQL_DESC_SCALE: sprintf((char*) s, "SQL_DESC_SCALE" ); break; case SQL_DESC_SCHEMA_NAME: sprintf((char*) s, "SQL_DESC_SCHEMA_NAME" ); break; case SQL_DESC_SEARCHABLE: sprintf((char*) s, "SQL_DESC_SEARCHABLE" ); break; case SQL_DESC_TABLE_NAME: sprintf((char*) s, "SQL_DESC_TABLE_NAME" ); break; case SQL_DESC_TYPE: sprintf((char*) s, "SQL_DESC_TYPE" ); break; case SQL_DESC_TYPE_NAME: sprintf((char*) s, "SQL_DESC_TYPE_NAME" ); break; case SQL_DESC_UNNAMED: sprintf((char*) s, "SQL_DESC_UNNAMED" ); break; case SQL_DESC_UNSIGNED: sprintf((char*) s, "SQL_DESC_UNSIGNED" ); break; case SQL_DESC_UPDATABLE: sprintf((char*) s, "SQL_DESC_UPDATABLE" ); break; default: sprintf((char*) s, "%d", (int)type ); } return (char*) s; } /* * convert a statement attribute to a string */ char * __stmt_attr_as_string( SQLCHAR *s, SQLINTEGER type ) { switch( type ) { case SQL_ATTR_APP_PARAM_DESC: sprintf((char*) s, "SQL_ATTR_APP_PARAM_DESC" ); break; case SQL_ATTR_APP_ROW_DESC: sprintf((char*) s, "SQL_ATTR_APP_ROW_DESC" ); break; case SQL_ATTR_ASYNC_ENABLE: sprintf((char*) s, "SQL_ATTR_ASYNC_ENABLE" ); break; case SQL_ATTR_CONCURRENCY: sprintf((char*) s, "SQL_ATTR_CONCURRENCY" ); break; case SQL_ATTR_CURSOR_SCROLLABLE: sprintf((char*) s, "SQL_ATTR_CURSOR_SCROLLABLE" ); break; case SQL_ATTR_CURSOR_SENSITIVITY: sprintf((char*) s, "SQL_ATTR_CURSOR_SENSITIVITY" ); break; case SQL_ATTR_CURSOR_TYPE: sprintf((char*) s, "SQL_ATTR_CURSOR_TYPE" ); break; case SQL_ATTR_ENABLE_AUTO_IPD: sprintf((char*) s, "SQL_ATTR_ENABLE_AUTO_IPD" ); break; case SQL_ATTR_FETCH_BOOKMARK_PTR: sprintf((char*) s, "SQL_ATTR_FETCH_BOOKMARK_PTR" ); break; case SQL_ATTR_IMP_PARAM_DESC: sprintf((char*) s, "SQL_ATTR_IMP_PARAM_DESC" ); break; case SQL_ATTR_IMP_ROW_DESC: sprintf((char*) s, "SQL_ATTR_IMP_ROW_DESC" ); break; case SQL_ATTR_KEYSET_SIZE: sprintf((char*) s, "SQL_ATTR_KEYSET_SIZE" ); break; case SQL_ATTR_MAX_LENGTH: sprintf((char*) s, "SQL_ATTR_MAX_LENGTH" ); break; case SQL_ATTR_MAX_ROWS: sprintf((char*) s, "SQL_ATTR_MAX_ROWS" ); break; case SQL_ATTR_METADATA_ID: sprintf((char*) s, "SQL_ATTR_METADATA_ID" ); break; case SQL_ATTR_NOSCAN: sprintf((char*) s, "SQL_ATTR_NOSCAN" ); break; case SQL_ATTR_PARAM_BIND_OFFSET_PTR: sprintf((char*) s, "SQL_ATTR_PARAM_BIND_OFFSET_PTR" ); break; case SQL_ATTR_PARAM_BIND_TYPE: sprintf((char*) s, "SQL_ATTR_PARAM_BIND_TYPE" ); break; case SQL_ATTR_PARAM_OPERATION_PTR: sprintf((char*) s, "SQL_ATTR_PARAM_OPERATION_PTR" ); break; case SQL_ATTR_PARAM_STATUS_PTR: sprintf((char*) s, "SQL_ATTR_PARAM_STATUS_PTR" ); break; case SQL_ATTR_PARAMS_PROCESSED_PTR: sprintf((char*) s, "SQL_ATTR_PARAMS_PROCESSED_PTR" ); break; case SQL_ATTR_PARAMSET_SIZE: sprintf((char*) s, "SQL_ATTR_PARAMSET_SIZE" ); break; case SQL_ATTR_QUERY_TIMEOUT: sprintf((char*) s, "SQL_ATTR_QUERY_TIMEOUT" ); break; case SQL_ATTR_RETRIEVE_DATA: sprintf((char*) s, "SQL_ATTR_RETRIEVE_DATA" ); break; case SQL_ROWSET_SIZE: sprintf((char*) s, "SQL_ROWSET_SIZE" ); break; case SQL_ATTR_ROW_ARRAY_SIZE: sprintf((char*) s, "SQL_ATTR_ROW_ARRAY_SIZE" ); break; case SQL_ATTR_ROW_BIND_OFFSET_PTR: sprintf((char*) s, "SQL_ATTR_ROW_BIND_OFFSET_PTR" ); break; case SQL_ATTR_ROW_BIND_TYPE: sprintf((char*) s, "SQL_ATTR_ROW_BIND_TYPE" ); break; case SQL_ATTR_ROW_NUMBER: sprintf((char*) s, "SQL_ATTR_ROW_NUMBER" ); break; case SQL_ATTR_ROW_OPERATION_PTR: sprintf((char*) s, "SQL_ATTR_ROW_OPERATION_PTR" ); break; case SQL_ATTR_ROW_STATUS_PTR: sprintf((char*) s, "SQL_ATTR_ROW_STATUS_PTR" ); break; case SQL_ATTR_ROWS_FETCHED_PTR: sprintf((char*) s, "SQL_ATTR_ROWS_FETCHED_PTR" ); break; case SQL_ATTR_SIMULATE_CURSOR: sprintf((char*) s, "SQL_ATTR_SIMULATE_CURSOR" ); break; case SQL_ATTR_USE_BOOKMARKS: sprintf((char*) s, "SQL_ATTR_USE_BOOKMARKS" ); break; default: sprintf((char*) s, "%d", (int)type ); } return (char*) s; } /* * return a SQLGetInfo type as a string */ char * __info_as_string( SQLCHAR *s, SQLINTEGER type ) { switch( type ) { case SQL_ACCESSIBLE_PROCEDURES: sprintf((char*) s, "SQL_ACCESSIBLE_PROCEDURES" ); break; case SQL_ACCESSIBLE_TABLES: sprintf((char*) s, "SQL_ACCESSIBLE_TABLES" ); break; case SQL_ACTIVE_ENVIRONMENTS: sprintf((char*) s, "SQL_ACTIVE_ENVIRONMENTS" ); break; case SQL_AGGREGATE_FUNCTIONS: sprintf((char*) s, "SQL_AGGREGATE_FUNCTIONS" ); break; case SQL_ALTER_DOMAIN: sprintf((char*) s, "SQL_ALTER_DOMAIN" ); break; case SQL_ALTER_TABLE: sprintf((char*) s, "SQL_ALTER_TABLE" ); break; case SQL_ASYNC_MODE: sprintf((char*) s, "SQL_ASYNC_MODE" ); break; case SQL_BATCH_ROW_COUNT: sprintf((char*) s, "SQL_BATCH_ROW_COUNT" ); break; case SQL_BATCH_SUPPORT: sprintf((char*) s, "SQL_BATCH_SUPPORT" ); break; case SQL_BOOKMARK_PERSISTENCE: sprintf((char*) s, "SQL_BOOKMARK_PERSISTENCE" ); break; case SQL_CATALOG_LOCATION: sprintf((char*) s, "SQL_CATALOG_LOCATION" ); break; case SQL_CATALOG_NAME: sprintf((char*) s, "SQL_CATALOG_NAME" ); break; case SQL_CATALOG_NAME_SEPARATOR: sprintf((char*) s, "SQL_CATALOG_NAME_SEPARATOR" ); break; case SQL_CATALOG_TERM: sprintf((char*) s, "SQL_CATALOG_TERM" ); break; case SQL_CATALOG_USAGE: sprintf((char*) s, "SQL_CATALOG_USAGE" ); break; case SQL_COLLATION_SEQ: sprintf((char*) s, "SQL_COLLATION_SEQ" ); break; case SQL_COLUMN_ALIAS: sprintf((char*) s, "SQL_COLUMN_ALIAS" ); break; case SQL_CONCAT_NULL_BEHAVIOR: sprintf((char*) s, "SQL_CONCAT_NULL_BEHAVIOR" ); break; case SQL_CONVERT_BIGINT: sprintf((char*) s, "SQL_CONVERT_BIGINT" ); break; case SQL_CONVERT_BINARY: sprintf((char*) s, "SQL_CONVERT_BINARY" ); break; case SQL_CONVERT_BIT: sprintf((char*) s, "SQL_CONVERT_BIT" ); break; case SQL_CONVERT_CHAR: sprintf((char*) s, "SQL_CONVERT_CHAR" ); break; case SQL_CONVERT_DATE: sprintf((char*) s, "SQL_CONVERT_DATE" ); break; case SQL_CONVERT_DECIMAL: sprintf((char*) s, "SQL_CONVERT_DECIMAL" ); break; case SQL_CONVERT_DOUBLE: sprintf((char*) s, "SQL_CONVERT_DOUBLE" ); break; case SQL_CONVERT_FLOAT: sprintf((char*) s, "SQL_CONVERT_FLOAT" ); break; case SQL_CONVERT_INTEGER: sprintf((char*) s, "SQL_CONVERT_INTEGER" ); break; case SQL_CONVERT_INTERVAL_YEAR_MONTH: sprintf((char*) s, "SQL_CONVERT_INTERVAL_YEAR_MONTH" ); break; case SQL_CONVERT_INTERVAL_DAY_TIME: sprintf((char*) s, "SQL_CONVERT_INTERVAL_DAY_TIME" ); break; case SQL_CONVERT_LONGVARBINARY: sprintf((char*) s, "SQL_CONVERT_LONGVARBINARY" ); break; case SQL_CONVERT_LONGVARCHAR: sprintf((char*) s, "SQL_CONVERT_LONGVARCHAR" ); break; case SQL_CONVERT_NUMERIC: sprintf((char*) s, "SQL_CONVERT_NUMERIC" ); break; case SQL_CONVERT_REAL: sprintf((char*) s, "SQL_CONVERT_REAL" ); break; case SQL_CONVERT_SMALLINT: sprintf((char*) s, "SQL_CONVERT_SMALLINT" ); break; case SQL_CONVERT_TIME: sprintf((char*) s, "SQL_CONVERT_TIME" ); break; case SQL_CONVERT_TIMESTAMP: sprintf((char*) s, "SQL_CONVERT_TIMESTAMP" ); break; case SQL_CONVERT_TINYINT: sprintf((char*) s, "SQL_CONVERT_TINYINT" ); break; case SQL_CONVERT_VARBINARY: sprintf((char*) s, "SQL_CONVERT_VARBINARY" ); break; case SQL_CONVERT_VARCHAR: sprintf((char*) s, "SQL_CONVERT_VARCHAR" ); break; case SQL_CONVERT_FUNCTIONS: sprintf((char*) s, "SQL_CONVERT_FUNCTIONS" ); break; case SQL_CORRELATION_NAME: sprintf((char*) s, "SQL_CORRELATION_NAME" ); break; case SQL_CREATE_ASSERTION: sprintf((char*) s, "SQL_CREATE_ASSERTION" ); break; case SQL_CREATE_CHARACTER_SET: sprintf((char*) s, "SQL_CREATE_CHARACTER_SET" ); break; case SQL_CREATE_COLLATION: sprintf((char*) s, "SQL_CREATE_COLLATION" ); break; case SQL_CREATE_DOMAIN: sprintf((char*) s, "SQL_CREATE_DOMAIN" ); break; case SQL_CREATE_SCHEMA: sprintf((char*) s, "SQL_CREATE_SCHEMA" ); break; case SQL_CREATE_TABLE: sprintf((char*) s, "SQL_CREATE_TABLE" ); break; case SQL_CREATE_TRANSLATION: sprintf((char*) s, "SQL_CREATE_TRANSLATION" ); break; case SQL_CREATE_VIEW: sprintf((char*) s, "SQL_CREATE_VIEW" ); break; case SQL_CURSOR_COMMIT_BEHAVIOR: sprintf((char*) s, "SQL_CURSOR_COMMIT_BEHAVIOR" ); break; case SQL_CURSOR_ROLLBACK_BEHAVIOR: sprintf((char*) s, "SQL_CURSOR_ROLLBACK_BEHAVIOR" ); break; case SQL_CURSOR_SENSITIVITY: sprintf((char*) s, "SQL_CURSOR_SENSITIVITY" ); break; case SQL_DATA_SOURCE_NAME: sprintf((char*) s, "SQL_DATA_SOURCE_NAME" ); break; case SQL_DATA_SOURCE_READ_ONLY: sprintf((char*) s, "SQL_DATA_SOURCE_READ_ONLY" ); break; case SQL_DATABASE_NAME: sprintf((char*) s, "SQL_DATABASE_NAME" ); break; case SQL_DATETIME_LITERALS: sprintf((char*) s, "SQL_DATETIME_LITERALS" ); break; case SQL_DBMS_NAME: sprintf((char*) s, "SQL_DBMS_NAME" ); break; case SQL_DBMS_VER: sprintf((char*) s, "SQL_DBMS_VER" ); break; case SQL_DDL_INDEX: sprintf((char*) s, "SQL_DDL_INDEX" ); break; case SQL_DEFAULT_TXN_ISOLATION: sprintf((char*) s, "SQL_DEFAULT_TXN_ISOLATION" ); break; case SQL_DESCRIBE_PARAMETER: sprintf((char*) s, "SQL_DESCRIBE_PARAMETER" ); break; case SQL_DRIVER_NAME: sprintf((char*) s, "SQL_DRIVER_NAME" ); break; case SQL_DRIVER_HLIB: sprintf((char*) s, "SQL_DRIVER_HLIB" ); break; case SQL_DRIVER_HSTMT: sprintf((char*) s, "SQL_DRIVER_HSTMT" ); break; case SQL_DRIVER_ODBC_VER: sprintf((char*) s, "SQL_DRIVER_ODBC_VER" ); break; case SQL_DRIVER_VER: sprintf((char*) s, "SQL_DRIVER_VER" ); break; case SQL_ODBC_VER: sprintf((char*) s, "SQL_ODBC_VER" ); break; case SQL_DROP_ASSERTION: sprintf((char*) s, "SQL_DROP_ASSERTION" ); break; case SQL_DROP_CHARACTER_SET: sprintf((char*) s, "SQL_DROP_CHARACTER_SET" ); break; case SQL_DROP_COLLATION: sprintf((char*) s, "SQL_DROP_COLLATION" ); break; case SQL_DROP_DOMAIN: sprintf((char*) s, "SQL_DROP_DOMAIN" ); break; case SQL_DROP_SCHEMA: sprintf((char*) s, "SQL_DROP_SCHEMA" ); break; case SQL_DROP_TABLE: sprintf((char*) s, "SQL_DROP_TABLE" ); break; case SQL_DROP_TRANSLATION: sprintf((char*) s, "SQL_DROP_TRANSLATION" ); break; case SQL_DROP_VIEW: sprintf((char*) s, "SQL_DROP_VIEW" ); break; case SQL_DYNAMIC_CURSOR_ATTRIBUTES1: sprintf((char*) s, "SQL_DYNAMIC_CURSOR_ATTRIBUTES1" ); break; case SQL_DYNAMIC_CURSOR_ATTRIBUTES2: sprintf((char*) s, "SQL_EXPRESSIONS_IN_ORDERBY" ); break; case SQL_EXPRESSIONS_IN_ORDERBY: sprintf((char*) s, "SQL_EXPRESSIONS_IN_ORDERBY" ); break; case SQL_FILE_USAGE: sprintf((char*) s, "SQL_FILE_USAGE" ); break; case SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1: sprintf((char*) s, "SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1" ); break; case SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2: sprintf((char*) s, "SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2" ); break; case SQL_GETDATA_EXTENSIONS: sprintf((char*) s, "SQL_GETDATA_EXTENSIONS" ); break; case SQL_GROUP_BY: sprintf((char*) s, "SQL_GROUP_BY" ); break; case SQL_IDENTIFIER_CASE: sprintf((char*) s, "SQL_IDENTIFIER_CASE" ); break; case SQL_IDENTIFIER_QUOTE_CHAR: sprintf((char*) s, "SQL_IDENTIFIER_QUOTE_CHAR" ); break; case SQL_INDEX_KEYWORDS: sprintf((char*) s, "SQL_INDEX_KEYWORDS" ); break; case SQL_INFO_SCHEMA_VIEWS: sprintf((char*) s, "SQL_INFO_SCHEMA_VIEWS" ); break; case SQL_INSERT_STATEMENT: sprintf((char*) s, "SQL_INSERT_STATEMENT" ); break; case SQL_INTEGRITY: sprintf((char*) s, "SQL_INTEGRITY" ); break; case SQL_KEYSET_CURSOR_ATTRIBUTES1: sprintf((char*) s, "SQL_KEYSET_CURSOR_ATTRIBUTES1" ); break; case SQL_KEYSET_CURSOR_ATTRIBUTES2: sprintf((char*) s, "SQL_KEYSET_CURSOR_ATTRIBUTES2" ); break; case SQL_KEYWORDS: sprintf((char*) s, "SQL_KEYWORDS" ); break; case SQL_LIKE_ESCAPE_CLAUSE: sprintf((char*) s, "SQL_LIKE_ESCAPE_CLAUSE" ); break; case SQL_MAX_ASYNC_CONCURRENT_STATEMENTS: sprintf((char*) s, "SQL_MAX_ASYNC_CONCURRENT_STATEMENTS" ); break; case SQL_MAX_BINARY_LITERAL_LEN: sprintf((char*) s, "SQL_MAX_BINARY_LITERAL_LEN" ); break; case SQL_MAX_CATALOG_NAME_LEN: sprintf((char*) s, "SQL_MAX_CATALOG_NAME_LEN" ); break; case SQL_MAX_CHAR_LITERAL_LEN: sprintf((char*) s, "SQL_MAX_CHAR_LITERAL_LEN" ); break; case SQL_MAX_COLUMN_NAME_LEN: sprintf((char*) s, "SQL_MAX_COLUMN_NAME_LEN" ); break; case SQL_MAX_COLUMNS_IN_GROUP_BY: sprintf((char*) s, "SQL_MAX_COLUMNS_IN_GROUP_BY" ); break; case SQL_MAX_COLUMNS_IN_INDEX: sprintf((char*) s, "SQL_MAX_COLUMNS_IN_INDEX" ); break; case SQL_MAX_COLUMNS_IN_SELECT: sprintf((char*) s, "SQL_MAX_COLUMNS_IN_SELECT" ); break; case SQL_MAX_COLUMNS_IN_ORDER_BY: sprintf((char*) s, "SQL_MAX_COLUMNS_IN_ORDER_BY" ); break; case SQL_MAX_COLUMNS_IN_TABLE: sprintf((char*) s, "SQL_MAX_COLUMNS_IN_TABLE" ); break; case SQL_MAX_CONCURRENT_ACTIVITIES: sprintf((char*) s, "SQL_MAX_CONCURRENT_ACTIVITIES" ); break; case SQL_MAX_CURSOR_NAME_LEN: sprintf((char*) s, "SQL_MAX_CURSOR_NAME_LEN" ); break; case SQL_MAX_DRIVER_CONNECTIONS: sprintf((char*) s, "SQL_MAX_DRIVER_CONNECTIONS" ); break; case SQL_MAX_IDENTIFIER_LEN: sprintf((char*) s, "SQL_MAX_IDENTIFIER_LEN" ); break; case SQL_MAX_INDEX_SIZE: sprintf((char*) s, "SQL_MAX_INDEX_SIZE" ); break; case SQL_MAX_PROCEDURE_NAME_LEN: sprintf((char*) s, "SQL_MAX_PROCEDURE_NAME_LEN" ); break; case SQL_MAX_ROW_SIZE: sprintf((char*) s, "SQL_MAX_ROW_SIZE" ); break; case SQL_MAX_ROW_SIZE_INCLUDES_LONG: sprintf((char*) s, "SQL_MAX_ROW_SIZE_INCLUDES_LONG" ); break; case SQL_MAX_SCHEMA_NAME_LEN: sprintf((char*) s, "SQL_MAX_SCHEMA_NAME_LEN" ); break; case SQL_MAX_STATEMENT_LEN: sprintf((char*) s, "SQL_MAX_STATEMENT_LEN" ); break; case SQL_MAX_TABLE_NAME_LEN: sprintf((char*) s, "SQL_MAX_TABLE_NAME_LEN" ); break; case SQL_MAX_TABLES_IN_SELECT: sprintf((char*) s, "SQL_MAX_TABLES_IN_SELECT" ); break; case SQL_MAX_USER_NAME_LEN: sprintf((char*) s, "SQL_MAX_USER_NAME_LEN" ); break; case SQL_MULT_RESULT_SETS: sprintf((char*) s, "SQL_MULT_RESULT_SETS" ); break; case SQL_MULTIPLE_ACTIVE_TXN: sprintf((char*) s, "SQL_MULTIPLE_ACTIVE_TXN" ); break; case SQL_NEED_LONG_DATA_LEN: sprintf((char*) s, "SQL_NEED_LONG_DATA_LEN" ); break; case SQL_NON_NULLABLE_COLUMNS: sprintf((char*) s, "SQL_NON_NULLABLE_COLUMNS" ); break; case SQL_NULL_COLLATION: sprintf((char*) s, "SQL_NULL_COLLATION" ); break; case SQL_NUMERIC_FUNCTIONS: sprintf((char*) s, "SQL_NUMERIC_FUNCTIONS" ); break; case SQL_ODBC_INTERFACE_CONFORMANCE: sprintf((char*) s, "SQL_ODBC_INTERFACE_CONFORMANCE" ); break; case SQL_OJ_CAPABILITIES: sprintf((char*) s, "SQL_OJ_CAPABILITIES" ); break; case SQL_ORDER_BY_COLUMNS_IN_SELECT: sprintf((char*) s, "SQL_ORDER_BY_COLUMNS_IN_SELECT" ); break; case SQL_PARAM_ARRAY_ROW_COUNTS: sprintf((char*) s, "SQL_PARAM_ARRAY_ROW_COUNTS" ); break; case SQL_PARAM_ARRAY_SELECTS: sprintf((char*) s, "SQL_PARAM_ARRAY_SELECTS" ); break; case SQL_PROCEDURE_TERM: sprintf((char*) s, "SQL_PROCEDURE_TERM" ); break; case SQL_PROCEDURES: sprintf((char*) s, "SQL_PROCEDURES" ); break; case SQL_QUOTED_IDENTIFIER_CASE: sprintf((char*) s, "SQL_QUOTED_IDENTIFIER_CASE" ); break; case SQL_ROW_UPDATES: sprintf((char*) s, "SQL_ROW_UPDATES" ); break; case SQL_SCHEMA_TERM: sprintf((char*) s, "SQL_SCHEMA_TERM" ); break; case SQL_SCHEMA_USAGE: sprintf((char*) s, "SQL_SCHEMA_USAGE" ); break; case SQL_SCROLL_OPTIONS: sprintf((char*) s, "SQL_SCROLL_OPTIONS" ); break; case SQL_SEARCH_PATTERN_ESCAPE: sprintf((char*) s, "SQL_SEARCH_PATTERN_ESCAPE" ); break; case SQL_SERVER_NAME: sprintf((char*) s, "SQL_SERVER_NAME" ); break; case SQL_SPECIAL_CHARACTERS: sprintf((char*) s, "SQL_SPECIAL_CHARACTERS" ); break; case SQL_SQL_CONFORMANCE: sprintf((char*) s, "SQL_SQL_CONFORMANCE" ); break; case SQL_SQL92_DATETIME_FUNCTIONS: sprintf((char*) s, "SQL_SQL92_DATETIME_FUNCTIONS" ); break; case SQL_SQL92_FOREIGN_KEY_DELETE_RULE: sprintf((char*) s, "SQL_SQL92_FOREIGN_KEY_DELETE_RULE" ); break; case SQL_SQL92_FOREIGN_KEY_UPDATE_RULE: sprintf((char*) s, "SQL_SQL92_FOREIGN_KEY_UPDATE_RULE" ); break; case SQL_SQL92_GRANT: sprintf((char*) s, "SQL_SQL92_GRANT" ); break; case SQL_SQL92_NUMERIC_VALUE_FUNCTIONS: sprintf((char*) s, "SQL_SQL92_NUMERIC_VALUE_FUNCTIONS" ); break; case SQL_SQL92_PREDICATES: sprintf((char*) s, "SQL_SQL92_PREDICATES" ); break; case SQL_SQL92_RELATIONAL_JOIN_OPERATORS: sprintf((char*) s, "SQL_SQL92_RELATIONAL_JOIN_OPERATORS" ); break; case SQL_SQL92_REVOKE: sprintf((char*) s, "SQL_SQL92_REVOKE" ); break; case SQL_SQL92_ROW_VALUE_CONSTRUCTOR: sprintf((char*) s, "SQL_SQL92_ROW_VALUE_CONSTRUCTOR" ); break; case SQL_SQL92_STRING_FUNCTIONS: sprintf((char*) s, "SQL_SQL92_STRING_EXPRESSIONS" ); break; case SQL_SQL92_VALUE_EXPRESSIONS: sprintf((char*) s, "SQL_SQL92_VALUE_EXPRESSIONS" ); break; case SQL_STANDARD_CLI_CONFORMANCE: sprintf((char*) s, "SQL_STANDARD_CLI_CONFORMANCE" ); break; case SQL_STATIC_CURSOR_ATTRIBUTES1: sprintf((char*) s, "SQL_STATIC_CURSOR_ATTRIBUTES1" ); break; case SQL_STATIC_CURSOR_ATTRIBUTES2: sprintf((char*) s, "SQL_STATIC_CURSOR_ATTRIBUTES2" ); break; case SQL_STRING_FUNCTIONS: sprintf((char*) s, "SQL_STRING_FUNCTIONS" ); break; case SQL_SUBQUERIES: sprintf((char*) s, "SQL_SUBQUERIES" ); break; case SQL_SYSTEM_FUNCTIONS: sprintf((char*) s, "SQL_SYSTEM_FUNCTIONS" ); break; case SQL_TABLE_TERM: sprintf((char*) s, "SQL_TABLE_TERM" ); break; case SQL_TIMEDATE_ADD_INTERVALS: sprintf((char*) s, "SQL_TIMEDATE_ADD_INTERVALS" ); break; case SQL_TIMEDATE_DIFF_INTERVALS: sprintf((char*) s, "SQL_TIMEDATE_DIFF_INTERVALS" ); break; case SQL_TIMEDATE_FUNCTIONS: sprintf((char*) s, "SQL_TIMEDATE_FUNCTIONS" ); break; case SQL_TXN_CAPABLE: sprintf((char*) s, "SQL_TXN_CAPABLE" ); break; case SQL_TXN_ISOLATION_OPTION: sprintf((char*) s, "SQL_TXN_ISOLATION_OPTION" ); break; case SQL_UNION: sprintf((char*) s, "SQL_UNION" ); break; case SQL_USER_NAME: sprintf((char*) s, "SQL_USER_NAME" ); break; case SQL_XOPEN_CLI_YEAR: sprintf((char*) s, "SQL_XOPEN_CLI_YEAR" ); break; case SQL_FETCH_DIRECTION: sprintf((char*) s, "SQL_FETCH_DIRECTION" ); break; case SQL_LOCK_TYPES: sprintf((char*) s, "SQL_LOCK_TYPES" ); break; case SQL_ODBC_API_CONFORMANCE: sprintf((char*) s, "SQL_ODBC_API_CONFORMANCE" ); break; case SQL_ODBC_SQL_CONFORMANCE: sprintf((char*) s, "SQL_ODBC_SQL_CONFORMANCE" ); break; case SQL_POS_OPERATIONS: sprintf((char*) s, "SQL_POS_OPERATIONS" ); break; case SQL_POSITIONED_STATEMENTS: sprintf((char*) s, "SQL_POSITIONED_STATEMENTS" ); break; case SQL_SCROLL_CONCURRENCY: sprintf((char*) s, "SQL_SCROLL_CONCURRENCY" ); break; case SQL_STATIC_SENSITIVITY: sprintf((char*) s, "SQL_STATIC_SENSITIVITY" ); break; case SQL_OUTER_JOINS: sprintf((char*) s, "SQL_OUTER_JOINS" ); break; default: sprintf((char*) s, "%d", (int)type ); } return (char*) s; } /* * convert from type 3 error states to type 2 */ struct state_map { char ver2[6]; char ver3[6]; }; static const struct state_map state_mapping_3_2[] = { { "01S03", "01001" }, { "01S04", "01001" }, { "22003", "HY019" }, { "22005", "22018" }, { "22008", "22007" }, { "24000", "07005" }, { "37000", "42000" }, { "70100", "HY018" }, { "S0001", "42S01" }, { "S0002", "42S02" }, { "S0011", "42S11" }, { "S0012", "42S12" }, { "S0021", "42S21" }, { "S0022", "42S22" }, { "S0023", "42S23" }, { "S1000", "HY000" }, { "S1001", "HY001" }, { "S1002", "07009" }, { "S1003", "HY003" }, { "S1004", "HY004" }, { "S1008", "HY008" }, { "S1009", "HY009" }, { "S1010", "HY010" }, { "S1011", "HY011" }, { "S1012", "HY012" }, { "S1090", "HY090" }, { "S1091", "HY091" }, { "S1092", "HY092" }, { "S1093", "07009" }, { "S1096", "HY096" }, { "S1097", "HY097" }, { "S1098", "HY098" }, { "S1099", "HY099" }, { "S1100", "HY100" }, { "S1101", "HY101" }, { "S1103", "HY103" }, { "S1104", "HY104" }, { "S1105", "HY105" }, { "S1106", "HY106" }, { "S1107", "HY107" }, { "S1108", "HY108" }, { "S1109", "HY109" }, { "S1110", "HY110" }, { "S1111", "HY111" }, { "S1C00", "HYC00" }, { "S1T00", "HYT00" }, { "", "" } }; /* * the book doesn't say that it should map ODBC 2 states to ODBC 3 * but the MS Windows DM can be seen to do just that */ static const struct state_map state_mapping_2_3[] = { { "01S03", "01001" }, { "01S04", "01001" }, { "22005", "22018" }, { "37000", "42000" }, { "70100", "HY018" }, { "S0001", "42S01" }, { "S0002", "42S02" }, { "S0011", "42S11" }, { "S0012", "42S12" }, { "S0021", "42S21" }, { "S0022", "42S22" }, { "S0023", "42S23" }, { "S1000", "HY000" }, { "S1001", "HY001" }, { "S1002", "07009" }, { "S1003", "HY003" }, { "S1004", "HY004" }, { "S1008", "HY008" }, { "S1009", "HY009" }, { "S1010", "HY010" }, { "S1011", "HY011" }, { "S1012", "HY012" }, { "S1090", "HY090" }, { "S1091", "HY091" }, { "S1092", "HY092" }, { "S1093", "07009" }, { "S1096", "HY096" }, { "S1097", "HY097" }, { "S1098", "HY098" }, { "S1099", "HY099" }, { "S1100", "HY100" }, { "S1101", "HY101" }, { "S1103", "HY103" }, { "S1104", "HY104" }, { "S1105", "HY105" }, { "S1106", "HY106" }, { "S1107", "HY107" }, { "S1108", "HY108" }, { "S1109", "HY109" }, { "S1110", "HY110" }, { "S1111", "HY111" }, { "S1C00", "HYC00" }, { "S1T00", "HYT00" }, { "", "" } }; /* * map ODBC3 states to/from ODBC 2 */ void __map_error_state( char * state, int requested_version ) { const struct state_map *ptr; if ( !state ) return; if ( requested_version == SQL_OV_ODBC2 ) { ptr = state_mapping_3_2; while( ptr -> ver3[0] ) { if ( strcmp( ptr -> ver3, state ) == 0 ) { strcpy( state, ptr -> ver2 ); return; } ptr ++; } } else if ( requested_version == SQL_OV_ODBC3 ) { ptr = state_mapping_2_3; while( ptr -> ver2[0] ) { if ( strcmp( ptr -> ver2, state ) == 0 ) { strcpy( state, ptr -> ver3 ); return; } ptr ++; } } } void __map_error_state_w( SQLWCHAR * wstate, int requested_version ) { char state[ 6 ]; unicode_to_ansi_copy( state, 6, wstate, SQL_NTS, NULL ); __map_error_state( state, requested_version ); ansi_to_unicode_copy( wstate, state, SQL_NTS, NULL ); } /* * return the process id as a string */ char * __get_pid( SQLCHAR * str ) { sprintf((char *) str, "%d", getpid()); return (char*)str; } /* * take a SQL string and its length indicator and format it for * display */ char * __string_with_length( SQLCHAR *ostr, SQLCHAR *instr, SQLINTEGER len ) { if ( instr == NULL ) { sprintf((char*) ostr, "[NULL]" ); } else if ( len == SQL_NTS ) { if ( strlen((char*) instr ) > LOG_MESSAGE_LEN ) { sprintf((char*) ostr, "[%.*s...][length = %d (SQL_NTS)]", LOG_MESSAGE_LEN, instr, strlen((char*) instr )); } else { sprintf((char*) ostr, "[%s][length = %d (SQL_NTS)]", instr, strlen((char*) instr )); } } else { if ( len < LOG_MESSAGE_LEN ) sprintf((char*) ostr, "[%.*s][length = %d]", len, instr, (int)len ); else sprintf((char*) ostr, "[%.*s...][length = %d]", LOG_MESSAGE_LEN, instr, (int)len ); } return (char*)ostr; } char * __wstring_with_length( SQLCHAR *ostr, SQLWCHAR *instr, SQLINTEGER len ) { int i = 0; char tmp[ LOG_MESSAGE_LEN ]; char *cptr = (char*) instr; if ( instr == NULL ) { sprintf((char*) ostr, "[NULL]" ); } else if ( len == SQL_NTS ) { if ( ( i = wide_strlen( instr ) ) < LOG_MESSAGE_LEN ) { strcpy((char*) ostr, "[" ); unicode_to_ansi_copy((char*) ostr + 1, LOG_MESSAGE_LEN, instr, LOG_MESSAGE_LEN, NULL ); strcat((char*) ostr, "]" ); } else { strcpy((char*) ostr, "[" ); unicode_to_ansi_copy((char*) ostr + 1, LOG_MESSAGE_LEN, instr, LOG_MESSAGE_LEN, NULL ); strcat((char*) ostr, "...]" ); } sprintf( tmp, "[length = %d (SQL_NTS)]", i ); strcat((char*) ostr, tmp ); } else { if ( len < LOG_MESSAGE_LEN ) { strcpy((char*) ostr, "[" ); unicode_to_ansi_copy((char*) ostr + 1, LOG_MESSAGE_LEN, instr, LOG_MESSAGE_LEN, NULL ); strcat((char*) ostr, "]" ); } else { strcpy((char*) ostr, "[" ); unicode_to_ansi_copy((char*) ostr + 1, LOG_MESSAGE_LEN, instr, LOG_MESSAGE_LEN, NULL ); strcat((char*) ostr, "...]" ); } sprintf( tmp, "[length = %d]", len ); strcat((char*) ostr, tmp ); } return (char*)ostr; } /* * replace password with **** */ char * __string_with_length_pass( SQLCHAR *out, SQLCHAR *str, SQLINTEGER len ) { char *p = __string_with_length( out, str, len ); /* * the string will be of the form [text] */ if ( str ) { char * ptr = p + 1; while ( *ptr && *ptr != ']' ) { *ptr = '*'; ptr ++; } } return p; } char * __wstring_with_length_pass( SQLCHAR *out, SQLWCHAR *str, SQLINTEGER len ) { char *p = __wstring_with_length( out, str, len ); /* * the string will be of the form [text] */ if ( str ) { char * ptr = p + 1; while ( *ptr && *ptr != ']' ) { *ptr = '*'; ptr ++; } } return p; } /* * mask out PWD=str; * wont work on lower case pwd but there you go */ char * __string_with_length_hide_pwd( SQLCHAR *out, SQLCHAR *str, SQLINTEGER len ) { char *p = __string_with_length( out, str, len ); if ( str ) { char *ptr; ptr = strstr( p, "PWD=" ); while ( ptr ) { ptr += 4; while ( *ptr && *ptr != ';' && *ptr != ']' ) { *ptr = '*'; ptr ++; } ptr = strstr( ptr, "PWD=" ); } } return p; } char * __wstring_with_length_hide_pwd( SQLCHAR *out, SQLWCHAR *str, SQLINTEGER len ) { char *p = __wstring_with_length( out, str, len ); return p; } /* * display a C type as a string */ char * __c_as_text( SQLINTEGER type ) { switch( type ) { case SQL_C_CHAR: return "SQL_C_CHAR"; case SQL_C_LONG: return "SQL_C_LONG"; case SQL_C_SHORT: return "SQL_C_SHORT"; case SQL_C_FLOAT: return "SQL_C_FLOAT"; case SQL_C_DOUBLE: return "SQL_C_DOUBLE"; case SQL_C_NUMERIC: return "SQL_C_NUMERIC"; case SQL_C_DEFAULT: return "SQL_C_DEFAULT"; case SQL_C_DATE: return "SQL_C_DATE"; case SQL_C_TIME: return "SQL_C_TIME"; case SQL_C_TIMESTAMP: return "SQL_C_TIMESTAMP"; case SQL_C_TYPE_DATE: return "SQL_C_TYPE_DATE"; case SQL_C_TYPE_TIME: return "SQL_C_TYPE_TIME"; case SQL_C_TYPE_TIMESTAMP: return "SQL_C_TYPE_TIMESTAMP "; case SQL_C_INTERVAL_YEAR: return "SQL_C_INTERVAL_YEAR "; case SQL_C_INTERVAL_MONTH: return "SQL_C_INTERVAL_MONTH"; case SQL_C_INTERVAL_DAY: return "SQL_C_INTERVAL_DAY "; case SQL_C_INTERVAL_HOUR: return "SQL_C_INTERVAL_HOUR"; case SQL_C_INTERVAL_MINUTE: return "SQL_C_INTERVAL_MINUTE"; case SQL_C_INTERVAL_SECOND: return "SQL_C_INTERVAL_SECOND"; case SQL_C_INTERVAL_YEAR_TO_MONTH: return "SQL_C_INTERVAL_YEAR_TO_MONTH"; case SQL_C_INTERVAL_DAY_TO_HOUR: return "SQL_C_INTERVAL_DAY_TO_HOUR "; case SQL_C_INTERVAL_DAY_TO_MINUTE: return "SQL_C_INTERVAL_DAY_TO_MINUTE"; case SQL_C_INTERVAL_DAY_TO_SECOND: return "SQL_C_INTERVAL_DAY_TO_SECOND"; case SQL_C_INTERVAL_HOUR_TO_MINUTE: return "SQL_C_INTERVAL_HOUR_TO_MINUTE"; case SQL_C_INTERVAL_HOUR_TO_SECOND: return "SQL_C_INTERVAL_HOUR_TO_SECOND"; case SQL_C_INTERVAL_MINUTE_TO_SECOND: return "SQL_C_INTERVAL_MINUTE_TO_SECOND"; case SQL_C_BINARY: return "SQL_C_BINARY"; case SQL_C_BIT: return "SQL_C_BIT"; case SQL_C_SBIGINT: return "SQL_C_SBIGINT"; case SQL_C_UBIGINT: return "SQL_C_UBIGINT"; case SQL_C_TINYINT: return "SQL_C_TINYINT"; case SQL_C_SLONG: return "SQL_C_SLONG"; case SQL_C_SSHORT: return "SQL_C_SSHORT"; case SQL_C_STINYINT: return "SQL_C_STINYINT"; case SQL_C_ULONG: return "SQL_C_ULONG"; case SQL_C_USHORT: return "SQL_C_USHORT"; case SQL_C_UTINYINT: return "SQL_C_UTINYINT"; case SQL_C_GUID: return "SQL_C_GUID"; case SQL_C_WCHAR: return "SQL_C_WCHAR"; default: return ""; } } /* * display a SQL type as a string */ char * __sql_as_text( SQLINTEGER type ) { switch( type ) { case SQL_DECIMAL: return "SQL_DECIMAL"; case SQL_VARCHAR: return "SQL_VARCHAR"; case SQL_LONGVARCHAR: return "SQL_LONGVARCHAR"; case SQL_LONGVARBINARY: return "SQL_LONGVARBINARY"; case SQL_C_BINARY: return "SQL_C_BINARY"; case SQL_VARBINARY: return "SQL_VARBINARY"; case SQL_CHAR: return "SQL_CHAR"; case SQL_WCHAR: return "SQL_WCHAR"; case SQL_WVARCHAR: return "SQL_WVARCHAR"; case SQL_INTEGER: return "SQL_INTEGER"; case SQL_C_ULONG: return "SQL_C_ULONG"; case SQL_C_SLONG: return "SQL_C_SLONG"; case SQL_BIGINT: return "SQL_BIGINT"; case SQL_C_UBIGINT: return "SQL_C_SBIGINT"; case SQL_C_SBIGINT: return "SQL_C_SBIGINT"; case SQL_SMALLINT: return "SQL_SMALLINT"; case SQL_C_USHORT: return "SQL_C_USHORT"; case SQL_C_SSHORT: return "SQL_C_SSHORT"; case SQL_TINYINT: return "SQL_TINYINT"; case SQL_C_UTINYINT: return "SQL_C_UTINYINT"; case SQL_C_STINYINT: return "SQL_C_STINYINT"; case SQL_BIT: return "SQL_BIT"; case SQL_NUMERIC: return "SQL_NUMERIC"; case SQL_REAL: return "SQL_REAL"; case SQL_DOUBLE: return "SQL_DOUBLE"; case SQL_FLOAT: return "SQL_FLOAT"; case SQL_TYPE_DATE: return "SQL_TYPE_DATE"; case SQL_DATE: return "SQL_DATE"; case SQL_TYPE_TIME: return "SQL_TYPE_TIME"; case SQL_TIME: return "SQL_TIME"; case SQL_TYPE_TIMESTAMP: return "SQL_TYPE_TIMESTAMP"; case SQL_TIMESTAMP: return "SQL_TIMESTAMP"; case SQL_INTERVAL_YEAR: return "SQL_INTERVAL_YEAR "; case SQL_INTERVAL_MONTH: return "SQL_INTERVAL_MONTH"; case SQL_INTERVAL_DAY: return "SQL_INTERVAL_DAY "; case SQL_INTERVAL_HOUR: return "SQL_INTERVAL_HOUR"; case SQL_INTERVAL_MINUTE: return "SQL_INTERVAL_MINUTE"; case SQL_INTERVAL_SECOND: return "SQL_INTERVAL_SECOND"; case SQL_INTERVAL_YEAR_TO_MONTH: return "SQL_INTERVAL_YEAR_TO_MONTH"; case SQL_INTERVAL_DAY_TO_HOUR: return "SQL_INTERVAL_DAY_TO_HOUR "; case SQL_INTERVAL_DAY_TO_MINUTE: return "SQL_INTERVAL_DAY_TO_MINUTE"; case SQL_INTERVAL_DAY_TO_SECOND: return "SQL_INTERVAL_DAY_TO_SECOND"; case SQL_INTERVAL_HOUR_TO_MINUTE: return "SQL_INTERVAL_HOUR_TO_MINUTE"; case SQL_INTERVAL_HOUR_TO_SECOND: return "SQL_INTERVAL_HOUR_TO_SECOND"; case SQL_INTERVAL_MINUTE_TO_SECOND: return "SQL_INTERVAL_MINUTE_TO_SECOND"; default: return ""; } } /* * convert a return type as a string */ char * __get_return_status( SQLRETURN ret, SQLCHAR *buffer ) { switch ( ret ) { case SQL_SUCCESS: return "SQL_SUCCESS"; case SQL_ERROR: return "SQL_ERROR"; case SQL_SUCCESS_WITH_INFO: return "SQL_SUCCESS_WITH_INFO"; case SQL_NO_DATA: return "SQL_NO_DATA"; case SQL_STILL_EXECUTING: return "SQL_STILL_EXECUTING"; case SQL_INVALID_HANDLE: return "SQL_INVALID_HANDLE"; case SQL_NEED_DATA: return "SQL_NEED_DATA"; default: sprintf((char*) buffer, "UNKNOWN(%d)", ret ); return (char*)buffer; } } int wide_ansi_strncmp( SQLWCHAR *str1, char *str2, int len ) { char c; while( len > 0 ) { if ( *str1 == 0 || *str2 == 0 ) break; c = (char) *str1; if ( c != *str2 ) return *str2 - c; str1 ++; str2 ++; len --; } c = (char) *str1; return *str2 - c; } SQLWCHAR *wide_strcpy( SQLWCHAR *str1, SQLWCHAR *str2 ) { SQLWCHAR *retp = str1; if ( !str1 ) return NULL; while( *str2 ) { *str1 = *str2; str1 ++; str2 ++; } *str1 = 0; return retp; } SQLWCHAR *wide_strncpy( SQLWCHAR *str1, SQLWCHAR *str2, int buffer_length ) { SQLWCHAR *retp = str1; if ( !str1 ) return NULL; while( *str2 && buffer_length > 0 ) { *str1 = *str2; str1 ++; str2 ++; buffer_length --; } *str1 = 0; return retp; } SQLWCHAR *wide_strcat( SQLWCHAR *str1, SQLWCHAR *str2 ) { SQLWCHAR *retp = str1; while( *str1 ) { str1 ++; } while( *str2 ) { *str1 = *str2; str1 ++; str2 ++; } *str1 = 0; return retp; } SQLWCHAR *wide_strdup( SQLWCHAR *str1 ) { SQLWCHAR *ptr; int len = 0; while( str1[ len ] ) len ++; ptr = malloc( sizeof( SQLWCHAR ) * ( len + 1 )); if ( !ptr ) return NULL; return wide_strcpy( ptr, str1 ); } int wide_strlen( SQLWCHAR *str1 ) { int len = 0; while( str1[ len ] ) len ++; return len; } static int check_error_order( ERROR *e1, ERROR *e2, EHEAD *head ) { char *s1, *s2; int i, ret; /* * as far as I can see, a simple strcmp gives the order we need */ s1 = unicode_to_ansi_alloc( e1 -> sqlstate, SQL_NTS, __get_connection( head )); s2 = unicode_to_ansi_alloc( e2 -> sqlstate, SQL_NTS, __get_connection( head )); ret = strcmp( s1, s2 ); free( s1 ); free( s2 ); return ret; } /* * insert the error into the list, making sure its in the correct * order */ static void insert_into_error_list( EHEAD *error_header, ERROR *e1 ) { error_header -> sql_error_head.error_count ++; if ( error_header -> sql_error_head.error_list_head ) { /* * find where in the list it needs to go */ ERROR *curr, *prev; prev = NULL; curr = error_header -> sql_error_head.error_list_head; while ( curr && check_error_order( curr, e1, error_header ) > 0 ) { prev = curr; curr = curr -> next; } if ( curr ) { if ( prev ) { /* * in the middle */ e1 -> next = curr; e1 -> prev = curr -> prev; curr -> prev -> next = e1; curr -> prev = e1; } else { /* * at the beginning */ e1 -> next = error_header -> sql_error_head.error_list_head; e1 -> prev = NULL; e1 -> next -> prev = e1; error_header -> sql_error_head.error_list_head = e1; } } else { /* * at the end */ e1 -> next = NULL; e1 -> prev = error_header -> sql_error_head.error_list_tail; e1 -> prev -> next = e1; error_header -> sql_error_head.error_list_tail = e1; } } else { e1 -> next = e1 -> prev = NULL; error_header -> sql_error_head.error_list_tail = e1; error_header -> sql_error_head.error_list_head = e1; } } static void insert_into_diag_list( EHEAD *error_header, ERROR *e2 ) { error_header -> sql_diag_head.internal_count ++; if ( error_header -> sql_diag_head.internal_list_head ) { /* * find where in the list it needs to go */ ERROR *curr, *prev; prev = NULL; curr = error_header -> sql_diag_head.internal_list_head; while ( curr && check_error_order( curr, e2, error_header ) > 0 ) { prev = curr; curr = curr -> next; } if ( curr ) { if ( prev ) { /* * in the middle */ e2 -> next = curr; e2 -> prev = curr -> prev; curr -> prev -> next = e2; curr -> prev = e2; } else { /* * at the beginning */ e2 -> next = error_header -> sql_diag_head.internal_list_head; e2 -> prev = NULL; e2 -> next -> prev = e2; error_header -> sql_diag_head.internal_list_head = e2; } } else { /* * at the end */ e2 -> next = NULL; e2 -> prev = error_header -> sql_diag_head.internal_list_tail; e2 -> prev -> next = e2; error_header -> sql_diag_head.internal_list_tail = e2; } } else { e2 -> next = e2 -> prev = NULL; error_header -> sql_diag_head.internal_list_tail = e2; error_header -> sql_diag_head.internal_list_head = e2; } } void __post_internal_error_ex( EHEAD *error_header, SQLCHAR *sqlstate, SQLINTEGER native_error, SQLCHAR *message_text, int class_origin, int subclass_origin ) { /* * create a error block and add to the lists, * leave space for the error prefix */ SQLCHAR msg[ SQL_MAX_MESSAGE_LENGTH + 32 ]; ERROR *e1, *e2; SQLWCHAR *tmp; /* * add our prefix */ strcpy((char*) msg, ERROR_PREFIX ); strcat((char*) msg, (char*) message_text ); e1 = malloc( sizeof( ERROR )); e2 = malloc( sizeof( ERROR )); memset( e1, 0, sizeof( *e1 )); memset( e2, 0, sizeof( *e2 )); e1 -> native_error = native_error; e2 -> native_error = native_error; tmp = ansi_to_unicode_alloc( sqlstate, SQL_NTS, __get_connection( error_header )); wide_strcpy( e1 -> sqlstate, tmp ); wide_strcpy( e2 -> sqlstate, tmp ); free( tmp ); tmp = ansi_to_unicode_alloc( msg, SQL_NTS, __get_connection( error_header ) ); e1 -> msg = wide_strdup( tmp ); e2 -> msg = wide_strdup( tmp ); free( tmp ); e1 -> return_val = SQL_ERROR; e2 -> return_val = SQL_ERROR; e1 -> diag_column_number_ret = SQL_NO_COLUMN_NUMBER; e1 -> diag_row_number_ret = SQL_NO_ROW_NUMBER; e1 -> diag_class_origin_ret = SQL_SUCCESS; e1 -> diag_subclass_origin_ret = SQL_SUCCESS; e1 -> diag_connection_name_ret = SQL_SUCCESS; e1 -> diag_server_name_ret = SQL_SUCCESS; e1 -> diag_column_number = 0; e1 -> diag_row_number = 0; e2 -> diag_column_number_ret = SQL_NO_COLUMN_NUMBER; e2 -> diag_row_number_ret = SQL_NO_ROW_NUMBER; e2 -> diag_class_origin_ret = SQL_SUCCESS; e2 -> diag_subclass_origin_ret = SQL_SUCCESS; e2 -> diag_connection_name_ret = SQL_SUCCESS; e2 -> diag_server_name_ret = SQL_SUCCESS; e2 -> diag_column_number = 0; e2 -> diag_row_number = 0; if ( class_origin == SUBCLASS_ODBC ) tmp = ansi_to_unicode_alloc((SQLCHAR*) "ODBC 3.0", SQL_NTS, __get_connection( error_header ) ); else tmp = ansi_to_unicode_alloc((SQLCHAR*) "ISO 9075", SQL_NTS, __get_connection( error_header ) ); wide_strcpy( e1 -> diag_class_origin, tmp ); wide_strcpy( e2 -> diag_class_origin, tmp ); free( tmp ); if ( subclass_origin == SUBCLASS_ODBC ) tmp = ansi_to_unicode_alloc((SQLCHAR*) "ODBC 3.0", SQL_NTS, __get_connection( error_header ) ); else tmp = ansi_to_unicode_alloc((SQLCHAR*) "ISO 9075", SQL_NTS, __get_connection( error_header ) ); wide_strcpy( e1 -> diag_subclass_origin, tmp ); wide_strcpy( e2 -> diag_subclass_origin, tmp ); free( tmp ); tmp = ansi_to_unicode_alloc((SQLCHAR*) "", SQL_NTS, __get_connection( error_header ) ); wide_strcpy( e1 -> diag_connection_name, tmp ); wide_strcpy( e2 -> diag_connection_name, tmp ); free( tmp ); tmp = ansi_to_unicode_alloc((SQLCHAR*) "", SQL_NTS, __get_connection( error_header ) ); wide_strcpy( e1 -> diag_server_name, tmp ); wide_strcpy( e2 -> diag_server_name, tmp ); free( tmp ); /* * the list for SQLError puts both local and driver * errors in the same list */ insert_into_error_list( error_header, e1 ); insert_into_diag_list( error_header, e2 ); } void __post_internal_error_ex_w( EHEAD *error_header, SQLWCHAR *sqlstate, SQLINTEGER native_error, SQLWCHAR *message_text, int class_origin, int subclass_origin ) { /* * create a error block and add to the lists, * leave space for the error prefix */ SQLWCHAR msg[ SQL_MAX_MESSAGE_LENGTH + 32 ], *tmp; ERROR *e1, *e2; /* * add our prefix */ tmp = ansi_to_unicode_alloc((SQLCHAR*) ERROR_PREFIX, SQL_NTS, __get_connection( error_header )); wide_strcpy( msg, tmp ); free( tmp ); wide_strcat( msg, message_text ); e1 = malloc( sizeof( ERROR )); e2 = malloc( sizeof( ERROR )); memset( e1, 0, sizeof( *e1 )); memset( e2, 0, sizeof( *e2 )); e1 -> native_error = native_error; e2 -> native_error = native_error; wide_strcpy( e1 -> sqlstate, sqlstate ); wide_strcpy( e2 -> sqlstate, sqlstate ); e1 -> msg = wide_strdup( msg ); e2 -> msg = wide_strdup( msg ); e1 -> return_val = SQL_ERROR; e2 -> return_val = SQL_ERROR; e1 -> diag_column_number_ret = SQL_NO_COLUMN_NUMBER; e1 -> diag_row_number_ret = SQL_NO_ROW_NUMBER; e1 -> diag_class_origin_ret = SQL_SUCCESS; e1 -> diag_subclass_origin_ret = SQL_SUCCESS; e1 -> diag_connection_name_ret = SQL_SUCCESS; e1 -> diag_server_name_ret = SQL_SUCCESS; e1 -> diag_column_number = 0; e1 -> diag_row_number = 0; e2 -> diag_column_number_ret = SQL_NO_COLUMN_NUMBER; e2 -> diag_row_number_ret = SQL_NO_ROW_NUMBER; e2 -> diag_class_origin_ret = SQL_SUCCESS; e2 -> diag_subclass_origin_ret = SQL_SUCCESS; e2 -> diag_connection_name_ret = SQL_SUCCESS; e2 -> diag_server_name_ret = SQL_SUCCESS; e2 -> diag_column_number = 0; e2 -> diag_row_number = 0; if ( class_origin == SUBCLASS_ODBC ) tmp = ansi_to_unicode_alloc((SQLCHAR*) "ODBC 3.0", SQL_NTS, __get_connection( error_header ) ); else tmp = ansi_to_unicode_alloc((SQLCHAR*) "ISO 9075", SQL_NTS, __get_connection( error_header ) ); wide_strcpy( e1 -> diag_class_origin, tmp ); wide_strcpy( e2 -> diag_class_origin, tmp ); free( tmp ); if ( subclass_origin == SUBCLASS_ODBC ) tmp = ansi_to_unicode_alloc((SQLCHAR*) "ODBC 3.0", SQL_NTS, __get_connection( error_header ) ); else tmp = ansi_to_unicode_alloc((SQLCHAR*) "ISO 9075", SQL_NTS, __get_connection( error_header ) ); wide_strcpy( e1 -> diag_subclass_origin, tmp ); wide_strcpy( e2 -> diag_subclass_origin, tmp ); free( tmp ); e1 -> diag_connection_name[ 0 ] = 0; e2 -> diag_connection_name[ 0 ] = 0; e1 -> diag_server_name[ 0 ] = 0; e2 -> diag_server_name[ 0 ] = 0; error_header -> return_code = SQL_ERROR; /* * the list for SQLError puts both local and driver * errors in the same list */ insert_into_error_list( error_header, e1 ); insert_into_diag_list( error_header, e2 ); } /* * initialise a error header and take note what it belongs to */ void setup_error_head( EHEAD *error_header, void *handle, int type ) { memset( error_header, 0, sizeof( error_header )); error_header -> owning_handle = handle; error_header -> handle_type = type; } /* * free any resources used but the error headers */ void clear_error_head( EHEAD *error_header ) { ERROR *cur, *prev; prev = NULL; cur = error_header -> sql_error_head.error_list_head; while( cur ) { prev = cur; free( prev -> msg ); cur = prev -> next; free( prev ); } error_header -> sql_error_head.error_list_head = NULL; error_header -> sql_error_head.error_list_tail = NULL; prev = NULL; cur = error_header -> sql_diag_head.error_list_head; while( cur ) { prev = cur; free( prev -> msg ); cur = prev -> next; free( prev ); } error_header -> sql_diag_head.error_list_head = NULL; error_header -> sql_diag_head.error_list_tail = NULL; prev = NULL; cur = error_header -> sql_diag_head.internal_list_head; while( cur ) { prev = cur; free( prev -> msg ); cur = prev -> next; free( prev ); } error_header -> sql_diag_head.internal_list_head = NULL; error_header -> sql_diag_head.internal_list_tail = NULL; } /* * get the error values from the handle */ static void extract_diag_error( int htype, DRV_SQLHANDLE handle, DMHDBC connection, EHEAD *head, int return_code, int save_to_diag ) { SQLRETURN ret; SQLCHAR msg[ SQL_MAX_MESSAGE_LENGTH + 32 ]; SQLCHAR msg1[ SQL_MAX_MESSAGE_LENGTH ]; SQLCHAR sqlstate[ 6 ]; SQLINTEGER native, len; SQLINTEGER rec_number; head -> return_code = return_code; head -> header_set = 0; head -> diag_cursor_row_count_ret = SQL_ERROR; head -> diag_dynamic_function_ret = SQL_ERROR; head -> diag_dynamic_function_code_ret = SQL_ERROR; head -> diag_number_ret = SQL_ERROR; head -> diag_row_count_ret = SQL_ERROR; rec_number = 1; do { ret = SQLGETDIAGREC( connection, head -> handle_type, handle, rec_number, sqlstate, &native, msg1, sizeof( msg1 ), &len ); if ( SQL_SUCCEEDED( ret )) { ERROR *e = malloc( sizeof( ERROR )); SQLWCHAR *tmp; SQLINTEGER len; strcpy((char*) msg, ERROR_PREFIX ); strcat((char*) msg, (char*)msg1 ); /* * add to the SQLError list */ e -> native_error = native; tmp = ansi_to_unicode_alloc( sqlstate, SQL_NTS, connection ); wide_strcpy( e -> sqlstate, tmp ); free( tmp ); e -> msg = ansi_to_unicode_alloc( msg, SQL_NTS, connection ); e -> return_val = return_code; insert_into_error_list( head, e ); /* * we do this if called from a DM function that goes on to call * a further driver function before returning */ if ( save_to_diag ) { SQLWCHAR *tmp; e = malloc( sizeof( ERROR )); e -> native_error = native; tmp = ansi_to_unicode_alloc( sqlstate, SQL_NTS, connection ); wide_strcpy( e -> sqlstate, tmp ); free( tmp ); e -> msg = ansi_to_unicode_alloc( msg, SQL_NTS, connection ); e -> return_val = return_code; insert_into_diag_list( head, e ); /* * now we need to do some extra calls to get * extended info */ e -> diag_column_number_ret = SQL_ERROR; e -> diag_row_number_ret = SQL_ERROR; e -> diag_class_origin_ret = SQL_ERROR; e -> diag_subclass_origin_ret = SQL_ERROR; e -> diag_connection_name_ret = SQL_ERROR; e -> diag_server_name_ret= SQL_ERROR; if ( head -> handle_type == SQL_HANDLE_STMT ) { if ( rec_number == 1 ) { head -> header_set = 1; head -> diag_cursor_row_count_ret = SQLGETDIAGFIELD( connection, head -> handle_type, handle, 0, SQL_DIAG_CURSOR_ROW_COUNT, &head->diag_cursor_row_count, 0, NULL ); if ( SQL_SUCCEEDED( head -> diag_dynamic_function_ret = SQLGETDIAGFIELD( connection, head -> handle_type, handle, 0, SQL_DIAG_DYNAMIC_FUNCTION, msg, sizeof( msg ), &len ))) { tmp = ansi_to_unicode_alloc(msg, SQL_NTS, connection ); wide_strcpy( head->diag_dynamic_function, tmp ); free( tmp ); } head -> diag_dynamic_function_code_ret = SQLGETDIAGFIELD( connection, head -> handle_type, handle, 0, SQL_DIAG_DYNAMIC_FUNCTION_CODE, &head->diag_dynamic_function_code, 0, NULL ); head -> diag_number_ret = SQLGETDIAGFIELD( connection, head -> handle_type, handle, 0, SQL_DIAG_NUMBER, &head->diag_number, 0, NULL ); head -> diag_row_count_ret = SQLGETDIAGFIELD( connection, head -> handle_type, handle, 0, SQL_DIAG_ROW_COUNT, &head->diag_row_count, 0, NULL ); } e -> diag_column_number_ret = SQLGETDIAGFIELD( connection, head -> handle_type, handle, rec_number, SQL_DIAG_COLUMN_NUMBER, &e->diag_column_number, 0, NULL ); e -> diag_row_number_ret = SQLGETDIAGFIELD( connection, head -> handle_type, handle, rec_number, SQL_DIAG_ROW_NUMBER, &e->diag_row_number, 0, NULL ); } else { e -> diag_column_number_ret = SQL_ERROR; e -> diag_row_number_ret = SQL_ERROR; e -> diag_class_origin_ret = SQL_ERROR; e -> diag_subclass_origin_ret = SQL_ERROR; e -> diag_connection_name_ret = SQL_ERROR; e -> diag_server_name_ret= SQL_ERROR; if ( SQL_SUCCEEDED( e -> diag_class_origin_ret = SQLGETDIAGFIELD( connection, head -> handle_type, handle, rec_number, SQL_DIAG_CLASS_ORIGIN, msg, sizeof( msg ), &len ))) { tmp = ansi_to_unicode_alloc( msg, SQL_NTS, connection ); wide_strcpy( e->diag_class_origin, tmp ); free( tmp ); } if ( SQL_SUCCEEDED( e -> diag_subclass_origin_ret = SQLGETDIAGFIELD( connection, head -> handle_type, handle, rec_number, SQL_DIAG_SUBCLASS_ORIGIN, msg, sizeof( msg ), &len ))) { tmp = ansi_to_unicode_alloc(msg, SQL_NTS, connection ); wide_strcpy( e->diag_subclass_origin, tmp ); free( tmp ); } if ( SQL_SUCCEEDED( e -> diag_connection_name_ret = SQLGETDIAGFIELD( connection, head -> handle_type, handle, rec_number, SQL_DIAG_CONNECTION_NAME, msg, sizeof( msg ), &len ))) { tmp = ansi_to_unicode_alloc( msg, SQL_NTS, connection ); wide_strcpy( e->diag_connection_name, tmp ); free( tmp ); } if ( SQL_SUCCEEDED( e -> diag_server_name_ret = SQLGETDIAGFIELD( connection, head -> handle_type, handle, rec_number, SQL_DIAG_SERVER_NAME, msg, sizeof( msg ), &len ))) { tmp = ansi_to_unicode_alloc( msg, SQL_NTS, connection ); wide_strcpy( e -> diag_server_name, tmp ); free( tmp ); } } } else { head -> sql_diag_head.error_count ++; } rec_number ++; /* * add to logfile */ if ( log_info.log_flag ) { sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, msg1 ); dm_log_write_diag( connection -> msg ); } } } while( SQL_SUCCEEDED( ret )); } static void extract_sql_error( DRV_SQLHANDLE henv, DRV_SQLHANDLE hdbc, DRV_SQLHANDLE hstmt, DMHDBC connection, EHEAD *head, int return_code ) { SQLRETURN ret; SQLCHAR msg[ SQL_MAX_MESSAGE_LENGTH + 32 ]; SQLCHAR msg1[ SQL_MAX_MESSAGE_LENGTH ]; SQLCHAR sqlstate[ 6 ]; SQLINTEGER native; SQLSMALLINT len; head -> return_code = return_code; head -> header_set = 0; head -> diag_cursor_row_count_ret = SQL_ERROR; head -> diag_dynamic_function_ret = SQL_ERROR; head -> diag_dynamic_function_code_ret = SQL_ERROR; head -> diag_number_ret = SQL_ERROR; head -> diag_row_count_ret = SQL_ERROR; do { ret = SQLERROR( connection, henv, hdbc, hstmt, sqlstate, &native, msg1, sizeof( msg1 ), &len ); if ( SQL_SUCCEEDED( ret )) { SQLWCHAR *tmp; ERROR *e = malloc( sizeof( ERROR )); /* * add to the lists, SQLError list first */ /* * add our prefix */ strcpy((char*) msg, ERROR_PREFIX ); strcat((char*) msg, (char*)msg1 ); e -> native_error = native; tmp = ansi_to_unicode_alloc( sqlstate, SQL_NTS, connection ); wide_strcpy( e -> sqlstate, tmp ); free( tmp ); e -> msg = ansi_to_unicode_alloc( msg, SQL_NTS, connection ); e -> return_val = return_code; insert_into_error_list( head, e ); /* * SQLGetDiagRec list next */ e = malloc( sizeof( ERROR )); e -> diag_column_number_ret = SQL_ERROR; e -> diag_row_number_ret = SQL_ERROR; e -> diag_class_origin_ret = SQL_ERROR; e -> diag_subclass_origin_ret = SQL_ERROR; e -> diag_connection_name_ret = SQL_ERROR; e -> diag_server_name_ret= SQL_ERROR; e -> native_error = native; tmp = ansi_to_unicode_alloc( sqlstate, SQL_NTS, connection ); wide_strcpy( e -> sqlstate, tmp ); free( tmp ); e -> msg = ansi_to_unicode_alloc( msg, SQL_NTS, connection ); e -> return_val = return_code; insert_into_diag_list( head, e ); /* * add to logfile */ if ( log_info.log_flag ) { sprintf( connection -> msg, "\t\tDIAG [%s] %s", sqlstate, msg1 ); dm_log_write_diag( connection -> msg ); } } } while( SQL_SUCCEEDED( ret )); } static void extract_diag_error_w( int htype, DRV_SQLHANDLE handle, DMHDBC connection, EHEAD *head, int return_code, int save_to_diag ) { SQLRETURN ret; SQLWCHAR msg[ SQL_MAX_MESSAGE_LENGTH + 32 ]; SQLWCHAR msg1[ SQL_MAX_MESSAGE_LENGTH ]; SQLWCHAR sqlstate[ 6 ]; SQLINTEGER native, len; SQLINTEGER rec_number; head -> return_code = return_code; head -> header_set = 0; head -> diag_cursor_row_count_ret = SQL_ERROR; head -> diag_dynamic_function_ret = SQL_ERROR; head -> diag_dynamic_function_code_ret = SQL_ERROR; head -> diag_number_ret = SQL_ERROR; head -> diag_row_count_ret = SQL_ERROR; rec_number = 1; do { ret = SQLGETDIAGRECW( connection, head -> handle_type, handle, rec_number, sqlstate, &native, msg1, sizeof( msg1 ), &len ); if ( SQL_SUCCEEDED( ret )) { ERROR *e = malloc( sizeof( ERROR )); SQLWCHAR *tmp; tmp = ansi_to_unicode_alloc((SQLCHAR*) ERROR_PREFIX, SQL_NTS, connection ); wide_strcpy( msg, tmp ); free( tmp ); wide_strcat( msg, msg1 ); /* * add to the SQLError list */ e -> native_error = native; wide_strcpy( e -> sqlstate, sqlstate ); e -> msg = wide_strdup( msg ); e -> return_val = return_code; insert_into_error_list( head, e ); /* * we do this if called from a DM function that goes on to call * a further driver function before returning */ if ( save_to_diag ) { e = malloc( sizeof( ERROR )); e -> native_error = native; wide_strcpy( e -> sqlstate, sqlstate ); e -> msg = wide_strdup( msg ); e -> return_val = return_code; insert_into_diag_list( head, e ); /* * now we need to do some extra calls to get * extended info */ e -> diag_column_number_ret = SQL_ERROR; e -> diag_row_number_ret = SQL_ERROR; e -> diag_class_origin_ret = SQL_ERROR; e -> diag_subclass_origin_ret = SQL_ERROR; e -> diag_connection_name_ret = SQL_ERROR; e -> diag_server_name_ret= SQL_ERROR; if ( head -> handle_type == SQL_HANDLE_STMT ) { if ( rec_number == 1 ) { head -> header_set = 1; head -> diag_cursor_row_count_ret = SQLGETDIAGFIELDW( connection, head -> handle_type, handle, 0, SQL_DIAG_CURSOR_ROW_COUNT, &head->diag_cursor_row_count, 0, NULL ); head -> diag_dynamic_function_ret = SQLGETDIAGFIELDW( connection, head -> handle_type, handle, 0, SQL_DIAG_DYNAMIC_FUNCTION, head->diag_dynamic_function, sizeof( head->diag_dynamic_function ), &len ); head -> diag_dynamic_function_code_ret = SQLGETDIAGFIELDW( connection, head -> handle_type, handle, 0, SQL_DIAG_DYNAMIC_FUNCTION_CODE, &head->diag_dynamic_function_code, 0, NULL ); head -> diag_number_ret = SQLGETDIAGFIELDW( connection, head -> handle_type, handle, 0, SQL_DIAG_NUMBER, &head->diag_number, 0, NULL ); head -> diag_row_count_ret = SQLGETDIAGFIELDW( connection, head -> handle_type, handle, 0, SQL_DIAG_ROW_COUNT, &head->diag_row_count, 0, NULL ); } e -> diag_column_number_ret = SQLGETDIAGFIELDW( connection, head -> handle_type, handle, rec_number, SQL_DIAG_COLUMN_NUMBER, &e->diag_column_number, 0, NULL ); e -> diag_row_number_ret = SQLGETDIAGFIELDW( connection, head -> handle_type, handle, rec_number, SQL_DIAG_ROW_NUMBER, &e->diag_row_number, 0, NULL ); } else { e -> diag_column_number_ret = SQL_ERROR; e -> diag_row_number_ret = SQL_ERROR; e -> diag_class_origin_ret = SQL_ERROR; e -> diag_subclass_origin_ret = SQL_ERROR; e -> diag_connection_name_ret = SQL_ERROR; e -> diag_server_name_ret= SQL_ERROR; e -> diag_class_origin_ret = SQLGETDIAGFIELDW( connection, head -> handle_type, handle, rec_number, SQL_DIAG_CLASS_ORIGIN, e->diag_class_origin, sizeof( e->diag_class_origin ), &len ); e -> diag_subclass_origin_ret = SQLGETDIAGFIELDW( connection, head -> handle_type, handle, rec_number, SQL_DIAG_SUBCLASS_ORIGIN, e->diag_subclass_origin, sizeof( e->diag_subclass_origin ), &len ); e -> diag_connection_name_ret = SQLGETDIAGFIELDW( connection, head -> handle_type, handle, rec_number, SQL_DIAG_CONNECTION_NAME, e->diag_connection_name, sizeof( e->diag_connection_name ), &len ); e -> diag_server_name_ret = SQLGETDIAGFIELDW( connection, head -> handle_type, handle, rec_number, SQL_DIAG_SERVER_NAME, e->diag_server_name, sizeof( e->diag_server_name ), &len ); } } else { head -> sql_diag_head.error_count ++; } rec_number ++; /* * add to logfile */ if ( log_info.log_flag ) { SQLCHAR *as1, *as2; as1 = (SQLCHAR*) unicode_to_ansi_alloc( sqlstate, SQL_NTS, connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( msg1, SQL_NTS, connection ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", as1, as2 ); if( as1 ) free( as1 ); if( as2 ) free( as2 ); dm_log_write_diag( connection -> msg ); } } } while( SQL_SUCCEEDED( ret )); } static void extract_sql_error_w( DRV_SQLHANDLE henv, DRV_SQLHANDLE hdbc, DRV_SQLHANDLE hstmt, DMHDBC connection, EHEAD *head, int return_code ) { SQLRETURN ret; SQLWCHAR msg[ SQL_MAX_MESSAGE_LENGTH + 32 ]; SQLWCHAR msg1[ SQL_MAX_MESSAGE_LENGTH ]; SQLWCHAR sqlstate[ 6 ]; SQLINTEGER native; SQLSMALLINT len; head -> return_code = return_code; do { ret = SQLERRORW( connection, henv, hdbc, hstmt, sqlstate, &native, msg1, sizeof( msg1 ), &len ); if ( SQL_SUCCEEDED( ret )) { SQLWCHAR *tmp; /* * add to the lists, SQLError list first */ ERROR *e = malloc( sizeof( ERROR )); /* * add our prefix */ tmp = ansi_to_unicode_alloc((SQLCHAR*) ERROR_PREFIX, SQL_NTS, connection ); wide_strcpy( msg, tmp ); free( tmp ); wide_strcat( msg, msg1 ); e -> native_error = native; wide_strcpy( e -> sqlstate, sqlstate ); e -> msg = wide_strdup( msg ); e -> return_val = return_code; insert_into_error_list( head, e ); /* * SQLGetDiagRec list next */ e = malloc( sizeof( ERROR )); e -> native_error = native; wide_strcpy( e -> sqlstate, sqlstate ); e -> msg = wide_strdup( msg ); e -> return_val = return_code; insert_into_diag_list( head, e ); /* * add to logfile */ if ( log_info.log_flag ) { SQLCHAR *as1, *as2; as1 = (SQLCHAR*) unicode_to_ansi_alloc( sqlstate, SQL_NTS, connection ); as2 = (SQLCHAR*) unicode_to_ansi_alloc( msg1, SQL_NTS, connection ); sprintf( connection -> msg, "\t\tDIAG [%s] %s", as1, as2 ); if( as1 ) free( as1 ); if( as2 ) free( as2 ); dm_log_write_diag( connection -> msg ); } } } while( SQL_SUCCEEDED( ret )); } /* * capture function returns and check error's if necessary */ int function_return_ex( int level, void * handle, int ret_code, int save_to_diag ) { DMHENV henv; DMHDBC hdbc; DMHSTMT hstmt; DMHDESC hdesc; if ( ret_code == SQL_SUCCESS_WITH_INFO || ret_code == SQL_ERROR ) { /* * find what type of handle it is */ henv = handle; switch ( henv -> type ) { case HENV_MAGIC: { /* * do nothing, it must be local */ } break; case HDBC_MAGIC: { hdbc = handle; /* * are we connected ? */ if ( hdbc -> state >= STATE_C4 ) { if ( hdbc -> unicode_driver ) { if ( CHECK_SQLGETDIAGFIELDW( hdbc ) && CHECK_SQLGETDIAGRECW( hdbc )) { extract_diag_error_w( SQL_HANDLE_DBC, hdbc -> driver_dbc, hdbc, &hdbc -> error, ret_code, save_to_diag ); } else { extract_sql_error_w( SQL_NULL_HENV, hdbc -> driver_dbc, SQL_NULL_HSTMT, hdbc, &hdbc -> error, ret_code ); } } else { if ( CHECK_SQLGETDIAGFIELD( hdbc ) && CHECK_SQLGETDIAGREC( hdbc )) { extract_diag_error( SQL_HANDLE_DBC, hdbc -> driver_dbc, hdbc, &hdbc -> error, ret_code, save_to_diag ); } else { extract_sql_error( SQL_NULL_HENV, hdbc -> driver_dbc, SQL_NULL_HSTMT, hdbc, &hdbc -> error, ret_code ); } } } } break; case HSTMT_MAGIC: { hstmt = handle; /* * how are we to get the error */ if ( hstmt -> connection -> unicode_driver ) { if ( CHECK_SQLGETDIAGFIELDW( hstmt -> connection ) && CHECK_SQLGETDIAGRECW( hstmt -> connection )) { extract_diag_error_w( SQL_HANDLE_STMT, hstmt -> driver_stmt, hstmt -> connection, &hstmt -> error, ret_code, save_to_diag ); } else { extract_sql_error_w( SQL_NULL_HENV, SQL_NULL_HDBC, hstmt -> driver_stmt, hstmt -> connection, &hstmt -> error, ret_code ); } } else { if ( CHECK_SQLGETDIAGFIELD( hstmt -> connection ) && CHECK_SQLGETDIAGREC( hstmt -> connection )) { extract_diag_error( SQL_HANDLE_STMT, hstmt -> driver_stmt, hstmt -> connection, &hstmt -> error, ret_code, save_to_diag ); } else { extract_sql_error( SQL_NULL_HENV, SQL_NULL_HDBC, hstmt -> driver_stmt, hstmt -> connection, &hstmt -> error, ret_code ); } } } break; case HDESC_MAGIC: { hdesc = handle; if ( hdesc -> connection -> unicode_driver ) { if ( CHECK_SQLGETDIAGFIELDW( hdesc -> connection ) && CHECK_SQLGETDIAGRECW( hdesc -> connection )) { extract_diag_error_w( SQL_HANDLE_DESC, hdesc -> driver_desc, hdesc -> connection, &hdesc -> error, ret_code, save_to_diag ); } } else { if ( CHECK_SQLGETDIAGFIELD( hdesc -> connection ) && CHECK_SQLGETDIAGREC( hdesc -> connection )) { extract_diag_error( SQL_HANDLE_DESC, hdesc -> driver_desc, hdesc -> connection, &hdesc -> error, ret_code, save_to_diag ); } } } break; } } /* * release any threads */ if ( level != IGNORE_THREAD ) { thread_release( level, handle ); } return ret_code; } /* * clear errors down at the start of a new statement * only clear for the ODBC lists, the rest stay */ void function_entry( void *handle ) { ERROR *cur, *prev; EHEAD *error_header; DMHENV henv; DMHDBC hdbc; DMHSTMT hstmt; DMHDESC hdesc; int version; /* * find what the handle is */ henv = handle; switch( henv -> type ) { case HENV_MAGIC: error_header = &henv -> error; version = henv -> requested_version; break; case HDBC_MAGIC: hdbc = handle; error_header = &hdbc -> error; version = hdbc -> environment -> requested_version; break; case HSTMT_MAGIC: hstmt = handle; error_header = &hstmt -> error; version = hstmt -> connection -> environment -> requested_version; break; case HDESC_MAGIC: hdesc = handle; error_header = &hdesc -> error; version = hdesc -> connection -> environment -> requested_version; break; } prev = NULL; cur = error_header -> sql_diag_head.error_list_head; while( cur ) { prev = cur; free( prev -> msg ); cur = prev -> next; free( prev ); } error_header -> sql_diag_head.error_list_head = NULL; error_header -> sql_diag_head.error_list_tail = NULL; error_header -> sql_diag_head.error_count = 0; error_header -> header_set = 0; prev = NULL; cur = error_header -> sql_diag_head.internal_list_head; while( cur ) { prev = cur; free( prev -> msg ); cur = prev -> next; free( prev ); } error_header -> sql_diag_head.internal_list_head = NULL; error_header -> sql_diag_head.internal_list_tail = NULL; error_header -> sql_diag_head.internal_count = 0; /* * if version is SQL_OV_ODBC3 then clear the SQLError list * as well */ #ifdef USE_OLD_ODBC2_ERROR_CLEARING if ( version == SQL_OV_ODBC3 ) #endif { prev = NULL; cur = error_header -> sql_error_head.error_list_head; while( cur ) { prev = cur; free( prev -> msg ); cur = prev -> next; free( prev ); } error_header -> sql_error_head.error_list_head = NULL; error_header -> sql_error_head.error_list_tail = NULL; error_header -> sql_error_head.error_count = 0; } } void __post_internal_error( EHEAD *error_handle, error_id id, char *txt, int connection_mode ) { __post_internal_error_api( error_handle, id, txt, connection_mode, 0 ); } void __post_internal_error_api( EHEAD *error_handle, error_id id, char *txt, int connection_mode, int calling_api ) { char sqlstate[ 6 ]; char *message; SQLCHAR msg[ SQL_MAX_MESSAGE_LENGTH ]; SQLRETURN ret = SQL_ERROR; int class, subclass; class = SUBCLASS_ISO; subclass = SUBCLASS_ISO; switch( id ) { case ERROR_01000: strcpy( sqlstate, "01000" ); message = "General warning"; break; case ERROR_01004: strcpy( sqlstate, "01004" ); message = "String data, right truncated"; break; case ERROR_01S02: strcpy( sqlstate, "01S02" ); message = "Option value changed"; subclass = SUBCLASS_ODBC; break; case ERROR_01S06: strcpy( sqlstate, "01S06" ); message = "Attempt to fetch before the result set returned the first rowset"; subclass = SUBCLASS_ODBC; break; case ERROR_07005: strcpy( sqlstate, "07005" ); message = "Prepared statement not a cursor-specification"; break; case ERROR_07009: switch( calling_api ) { case SQL_API_SQLDESCRIBEPARAM: case SQL_API_SQLBINDPARAMETER: case SQL_API_SQLSETPARAM: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "07009" ); else strcpy( sqlstate, "S1093" ); message = "Invalid parameter index"; break; default: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "07009" ); else strcpy( sqlstate, "S1002" ); message = "Invalid descriptor index"; break; } break; case ERROR_08002: strcpy( sqlstate, "08002" ); message = "Connection name in use"; break; case ERROR_08003: strcpy( sqlstate, "08003" ); message = "Connnection does not exist"; break; case ERROR_24000: strcpy( sqlstate, "24000" ); message = "Invalid cursor state"; break; case ERROR_25000: message = "Invalid transaction state"; strcpy( sqlstate, "25000" ); break; case ERROR_25S01: message = "Transaction state unknown"; strcpy( sqlstate, "25S01" ); subclass = SUBCLASS_ODBC; break; case ERROR_S1000: message = "General error"; strcpy( sqlstate, "S1000" ); break; case ERROR_S1003: message = "Program type out of range"; strcpy( sqlstate, "S1003" ); break; case ERROR_S1010: message = "Function sequence error"; strcpy( sqlstate, "S1010" ); break; case ERROR_S1011: message = "Operation invalid at this time"; strcpy( sqlstate, "S1011" ); break; case ERROR_S1107: message = "Row value out of range"; strcpy( sqlstate, "S1107" ); break; case ERROR_S1108: message = "Concurrency option out of range"; strcpy( sqlstate, "S1108" ); break; case ERROR_S1C00: message = "Driver not capable"; strcpy( sqlstate, "S1C00" ); break; case ERROR_HY001: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY001" ); else strcpy( sqlstate, "S1011" ); message = "Memory allocation error"; break; case ERROR_HY003: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY003" ); else strcpy( sqlstate, "S1003" ); message = "Invalid application buffer type"; break; case ERROR_HY004: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY004" ); else strcpy( sqlstate, "S1004" ); message = "Invalid SQL data type"; break; case ERROR_HY009: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY009" ); else strcpy( sqlstate, "S1009" ); message = "Invalid use of null pointer"; break; case ERROR_HY010: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY010" ); else strcpy( sqlstate, "S1010" ); message = "Function sequence error"; break; case ERROR_HY011: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY011" ); else strcpy( sqlstate, "S1011" ); message = "Attribute cannot be set now"; break; case ERROR_HY012: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY012" ); else strcpy( sqlstate, "S1012" ); message = "Invalid transaction operation code"; break; case ERROR_HY013: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY013" ); else strcpy( sqlstate, "S1013" ); message = "Memory management error"; break; case ERROR_HY017: strcpy( sqlstate, "HY017" ); message = "Invalid use of an automatically allocated descriptor handle"; break; case ERROR_HY024: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY024" ); else strcpy( sqlstate, "S1009" ); message = "Invalid attribute value"; break; case ERROR_HY090: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY090" ); else strcpy( sqlstate, "S1090" ); message = "Invalid string or buffer length"; break; case ERROR_HY092: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY092" ); else strcpy( sqlstate, "S1092" ); message = "Invalid attribute/option identifier"; break; case ERROR_HY097: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY097" ); else strcpy( sqlstate, "S1097" ); message = "Column type out of range"; break; case ERROR_HY098: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY098" ); else strcpy( sqlstate, "S1098" ); message = "Scope type out of range"; break; case ERROR_HY099: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY099" ); else strcpy( sqlstate, "S1099" ); message = "Nullable type out of range"; break; case ERROR_HY100: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY100" ); else strcpy( sqlstate, "S1100" ); message = "Uniqueness option type out of range"; break; case ERROR_HY101: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY101" ); else strcpy( sqlstate, "S1101" ); message = "Accuracy option type out of range"; break; case ERROR_HY103: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY103" ); else strcpy( sqlstate, "S1103" ); message = "Invalid retrieval code"; break; case ERROR_HY105: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY105" ); else strcpy( sqlstate, "S1105" ); message = "Invalid parameter type"; break; case ERROR_HY106: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY106" ); else strcpy( sqlstate, "S1106" ); message = "Fetch type out of range"; break; case ERROR_HY110: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY110" ); else strcpy( sqlstate, "S1110" ); message = "Invalid driver completion"; break; case ERROR_HY111: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HY111" ); else strcpy( sqlstate, "S1111" ); message = "Invalid bookmark value"; break; case ERROR_HYC00: if ( connection_mode == SQL_OV_ODBC3 ) strcpy( sqlstate, "HYC00" ); else strcpy( sqlstate, "S1C00" ); message = "Optional featire not implemented"; break; case ERROR_IM001: strcpy( sqlstate, "IM001" ); message = "Driver does not support this function"; subclass = SUBCLASS_ODBC; class = SUBCLASS_ODBC; break; case ERROR_IM002: strcpy( sqlstate, "IM002" ); message = "Data source name not found, and no default driver specified"; subclass = SUBCLASS_ODBC; class = SUBCLASS_ODBC; break; case ERROR_IM003: strcpy( sqlstate, "IM003" ); message = "Specified driver could not be loaded"; subclass = SUBCLASS_ODBC; class = SUBCLASS_ODBC; break; case ERROR_IM004: strcpy( sqlstate, "IM004" ); message = "Driver's SQLAllocHandle on SQL_HANDLE_HENV failed"; subclass = SUBCLASS_ODBC; class = SUBCLASS_ODBC; break; case ERROR_IM005: strcpy( sqlstate, "IM005" ); message = "Driver's SQLAllocHandle on SQL_HANDLE_DBC failed"; subclass = SUBCLASS_ODBC; class = SUBCLASS_ODBC; break; case ERROR_IM010: strcpy( sqlstate, "IM010" ); message = "Data source name too long"; subclass = SUBCLASS_ODBC; class = SUBCLASS_ODBC; break; case ERROR_IM012: strcpy( sqlstate, "IM012" ); message = "DRIVER keyword syntax error"; subclass = SUBCLASS_ODBC; class = SUBCLASS_ODBC; break; case ERROR_SL004: strcpy( sqlstate, "SL004" ); message = "Result set not generated by a SELECT statement"; subclass = SUBCLASS_ODBC; class = SUBCLASS_ODBC; break; case ERROR_SL009: strcpy( sqlstate, "SL009" ); message = "No columns were bound prior to calling SQLFetch or SQLFetchScroll"; subclass = SUBCLASS_ODBC; class = SUBCLASS_ODBC; break; case ERROR_SL010: strcpy( sqlstate, "SL010" ); message = "SQLBindCol returned SQL_ERROR on a attempt to bind a internal buffer"; subclass = SUBCLASS_ODBC; class = SUBCLASS_ODBC; break; case ERROR_SL008: strcpy( sqlstate, "SL008" ); message = "SQLGetData is not allowed on a forward only (non-buffered) cursor"; subclass = SUBCLASS_ODBC; class = SUBCLASS_ODBC; break; default: strcpy( sqlstate, "?????" ); message = "Unknown"; } if ( txt ) message = txt; strcpy((char*) msg, DM_ERROR_PREFIX ); strcat((char*) msg, message ); error_handle -> return_code = ret; __post_internal_error_ex( error_handle, (SQLCHAR*)sqlstate, 0, msg, class, subclass ); } /* * open a log file */ void dm_log_open( char *program_name, char *log_file_name, int pid_logging ) { if ( log_info.program_name ) { free( log_info.program_name ); } if ( log_info.log_file_name ) { free( log_info.log_file_name ); } log_info.program_name = strdup( program_name ); log_info.log_file_name = strdup( log_file_name ); log_info.log_flag = 1; /* * are we doing perprocess logging */ log_info.pid_logging = pid_logging; } void dm_log_write( char *function_name, int line, int type, int severity, char *message ) { FILE *fp; char tmp[ 24 ]; if ( !log_info.log_flag && !ODBCSharedTraceFlag ) return; if ( log_info.pid_logging ) { char file_name[ 256 ], str[ 20 ]; if ( !log_info.log_file_name ) { strcpy( file_name, "/tmp/sql.log" ); } else { sprintf( file_name, "%s/%s", log_info.log_file_name, __get_pid((SQLCHAR*) str )); } fp = uo_fopen( file_name, "a" ); /* * Change the mode to be rw for all */ chmod( file_name, 0666 ); } else { if ( !log_info.log_file_name ) { fp = uo_fopen( "/tmp/sql.log", "a" ); } else { fp = uo_fopen( log_info.log_file_name, "a" ); } } if ( fp ) { char tstamp_str[ 128 ]; #if defined( HAVE_GETTIMEOFDAY ) && defined( HAVE_SYS_TIME_H ) { struct timeval tv; struct timezone tz; gettimeofday( &tv, &tz ); sprintf( tstamp_str, "[%ld.%06ld]", tv.tv_sec, tv.tv_usec ); } #elif defined( HAVE_FTIME ) && defined( HAVE_SYS_TIMEB_H ) { struct timeb tp; ftime( &tp ); sprintf( tstamp_str, "[%ld.%03d]", tp.time, tp.millitm ); } #elif defined( DHAVE_TIME ) && defined( HAVE_TIME_H ) { time_t tv; time( &tv ); sprintf( tstamp_str, "[%ld]", tv ); } #else tstamp_str[ 0 ] = '\0'; #endif if ( !log_info.program_name ) { uo_fprintf( fp, "[ODBC][%s]%s[%s][%d]%s\n", __get_pid((SQLCHAR*) tmp ), tstamp_str, function_name, line, message ); } else { uo_fprintf( fp, "[%s][%s]%s[%s][%d]%s\n", log_info.program_name, __get_pid((SQLCHAR*) tmp ), tstamp_str, function_name, line, message ); } uo_fclose( fp ); } } void dm_log_write_diag( char *message ) { FILE *fp; if ( !log_info.log_flag && !ODBCSharedTraceFlag ) return; if ( log_info.pid_logging ) { char file_name[ 256 ], str[ 20 ]; if ( !log_info.log_file_name ) { strcpy( file_name, "/tmp/sql.log" ); } else { sprintf( file_name, "%s/%s", log_info.log_file_name, __get_pid((SQLCHAR*) str )); } fp = uo_fopen( file_name, "a" ); /* * Change the mode to be rw for all */ chmod( file_name, 0666 ); } else { if ( !log_info.log_file_name ) { fp = uo_fopen( "/tmp/sql.log", "a" ); } else { fp = uo_fopen( log_info.log_file_name, "a" ); } } if ( fp ) { uo_fprintf( fp, "%s\n\n", message ); uo_fclose( fp ); } } void dm_log_close( void ) { free( log_info.program_name ); free( log_info.log_file_name ); log_info.program_name = NULL; log_info.log_file_name = NULL; log_info.log_flag = 0; } unixODBC-2.2.14-p2/DriverManager/__stats.c0100644000076400007640000005522410046656211016534 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: __stats.c,v 1.2 2004/05/07 09:53:13 lurcher Exp $ * * $Log: __stats.c,v $ * Revision 1.2 2004/05/07 09:53:13 lurcher * * * Fix potential problrm in stats if creating a semaphore fails * Alter state after SQLParamData from S4 to S5 * * Revision 1.1.1.1 2001/10/17 16:40:09 lurcher * * First upload to SourceForge * * Revision 1.11 2001/09/27 17:05:48 nick * * Assorted fixes and tweeks * * Revision 1.10 2001/06/04 15:24:49 nick * * Add port to MAC OSX and QT3 changes * * Revision 1.9 2001/05/15 13:56:29 jason * * semaphore header file not requires unless COLLECT_STATS is defined * * Revision 1.8 2001/05/15 13:29:07 jason * * * Moved COLLECT_STATS define to allow compilation on OpenVMS. * * Revision 1.7 2001/01/03 10:15:16 martin * * Fix bug in uodbc_update_stats() which attempted to use the shared memory * ID to release the semaphore if the array of process info full. * Fix bug in release_sem_lock() which called semop saying there were 2 ops * when there was really only one. * * Revision 1.6 2000/12/21 16:18:37 martin * * Add the promised support to return a list of process IDs currently attached * to the DM. * * Revision 1.5 2000/12/21 15:58:35 martin * * Fix problems with any app exiting clearing all stats. * * Revision 1.4 2000/12/20 12:00:52 nick * * Add uodbc_update_stats to the non stats build * * Revision 1.3 2000/12/19 10:28:29 martin * * Return "not built with stats" in uodbc_error() if stats function called * when stats not built. * Add uodbc_update_stats() calls to SQLFreeHandle. * * Revision 1.1 2000/12/18 11:53:51 martin * * handle statistic API. * * **********************************************************************/ #ifdef HAVE_SYS_SEM_H #include #include #include #include #include #include #include #include #endif /* HAVE_SYS_SEM_H */ #ifdef COLLECT_STATS #include #include #include #endif #include #include "__stats.h" #include #include "drivermanager.h" static char const rcsid[]= "$RCSfile: __stats.c,v $ $Revision: 1.2 $"; #ifdef COLLECT_STATS #ifdef HAVE_LIBPTHREAD #include #endif /* * PROJECT_ID is used in the call to ftok(). * The PROJECT_ID reduces the chance of a class between processes using IPC. * Do not change thisnumber as it will make different versions of unixODBC * incompatible. */ #define PROJECT_ID 121 /* * Permssions on sempahore/shared memory * These needs to be world readable/writeable or different apps running under * different users we not be able to update/read the stats. */ #define IPC_ACCESS_MODE (S_IRUSR | S_IWUSR \ | S_IRGRP | S_IWGRP \ | S_IROTH | S_IWOTH) static char errmsg[512]=""; static int release_sem_lock(int sem_id); static int acquire_sem_lock(int sem_id); int uodbc_open_stats( void **rh, unsigned int mode) { key_t ipc_key; uodbc_stats_t *stats; int shm_created = 0; uodbc_stats_handle_t *h = NULL; uodbc_stats_handle_t lh; char odbcini[1024]; unsigned int i; int shmflg; if (!rh) { return -1; } if (!_odbcinst_SystemINI(odbcini, FALSE)) { snprintf(errmsg, sizeof(errmsg), "Failed to find system odbc.ini"); return -1; } memset(&lh, '\0', sizeof(lh)); memcpy(lh.id, UODBC_STATS_ID, 5); lh.shm_id = -1; lh.sem_id = -1; lh.pid = getpid(); /* * Check the odbc.ini file used in ftok() exists. */ if (access(odbcini, F_OK) < 0) { snprintf(errmsg, sizeof(errmsg), "Cannot locate %s", odbcini); return -1; } /* * Get a unique IPC key. */ if ((ipc_key = ftok(odbcini, (char)PROJECT_ID)) < 0) { snprintf(errmsg, sizeof(errmsg), "Failed to obtain IPC key - %s", strerror(errno)); return -1; } /* * See if the semaphore exists and create if it doesn't. */ lh.sem_id = semget(ipc_key, 1, IPC_ACCESS_MODE | IPC_CREAT | IPC_EXCL); if (lh.sem_id < 0) { if (errno != EEXIST) { snprintf(errmsg, sizeof(errmsg), "Failed to get semaphore ID - %s", strerror(errno)); return -1; } lh.sem_id = semget(ipc_key, 1, IPC_ACCESS_MODE | IPC_CREAT); if (lh.sem_id < 0) { snprintf(errmsg, sizeof(errmsg), "Failed to create semaphore - %s", strerror(errno)); return -1; } } /* * Create/map shared memory */ if (mode & UODBC_STATS_WRITE) shmflg = IPC_ACCESS_MODE | IPC_CREAT | IPC_EXCL; else shmflg = IPC_ACCESS_MODE; lh.shm_id = shmget(ipc_key, sizeof(uodbc_stats_t), shmflg); if (lh.shm_id < 0) { if (mode & UODBC_STATS_READ) { snprintf(errmsg, sizeof(errmsg), "No statistics available yet"); return -1; } if (errno == EEXIST) { lh.shm_id = shmget(ipc_key, sizeof(uodbc_stats_t), IPC_ACCESS_MODE); if (lh.shm_id < 0) { snprintf(errmsg, sizeof(errmsg), "Shared memory exists but cannot map it - %s", strerror(errno)); return -1; } } else { snprintf(errmsg, sizeof(errmsg), "Failed to get shared memory ID - %s", strerror(errno)); return -1; } } else { if (mode & UODBC_STATS_WRITE) shm_created = 1; } lh.stats = (uodbc_stats_t *)shmat(lh.shm_id, 0, 0); if (lh.stats == (uodbc_stats_t *)-1) { snprintf(errmsg, sizeof(errmsg), "Failed to attach to shared memory - %s", strerror(errno)); return -1; } else if (shm_created) { unsigned int i; int lk; lk = acquire_sem_lock(lh.sem_id); memset(lh.stats, '\0', sizeof(uodbc_stats_t)); for (i = 0; i < (sizeof(lh.stats->perpid) / sizeof(lh.stats->perpid[0])); i++) { lh.stats->perpid[i].pid = (pid_t)0; } if (lk == 0) release_sem_lock(lh.sem_id); } if ((h = calloc(1, sizeof(uodbc_stats_handle_t))) == NULL) return -1; memcpy(h, &lh, sizeof(uodbc_stats_handle_t)); /* * If caller asked for write access it is assumed it is going to * change the statistics and so it needs an entry in the stats. */ if (mode & UODBC_STATS_WRITE) { int lk; lk = acquire_sem_lock(lh.sem_id); for (i = 0; i < (sizeof(h->stats->perpid) / sizeof(h->stats->perpid[0])); i++) { if (h->stats->perpid[i].pid == (pid_t)0) { h->stats->perpid[i].pid = getpid(); h->stats->perpid[i].n_env = 0; h->stats->perpid[i].n_dbc = 0; h->stats->perpid[i].n_stmt = 0; h->stats->perpid[i].n_desc = 0; break; } } if (lk == 0) release_sem_lock(lh.sem_id); } *(uodbc_stats_handle_t **)rh = h; return 0; } /************************************************************************/ /* */ /* uodbc_close_stats */ /* ================= */ /* */ /************************************************************************/ int uodbc_close_stats( void *h) { uodbc_stats_handle_t *sh; sh = (uodbc_stats_handle_t *)h; if (!sh) { snprintf(errmsg, sizeof(errmsg), "NULL stats handle"); return -1; } if (memcmp(sh->id, UODBC_STATS_ID, sizeof(sh->id)) != 0) { snprintf(errmsg, sizeof(errmsg), "Invalid stats handle %p", sh); return -1; } if ((sh->shm_id != -1) && (sh->stats)) { unsigned int i; for (i = 0; i < (sizeof(sh->stats->perpid) / sizeof(sh->stats->perpid[0])); i++) { if (sh->stats->perpid[i].pid == sh->pid) { sh->stats->perpid[i].pid = (pid_t) 0; break; } } shmdt((char *)sh->stats); sh->stats = NULL; sh->shm_id = -1; } /* * Should we examine attach count and delete shared memory? */ memset(sh->id, '\0', sizeof(sh->id)); free(sh); return 0; } /************************************************************************/ /* */ /* uodbc_update_stats */ /* ================== */ /* */ /************************************************************************/ int uodbc_update_stats(void *h, unsigned int stats_type_mask, void *value) { unsigned long type; unsigned int i; uodbc_stats_handle_t *sh; int lk; sh = (uodbc_stats_handle_t *)h; if (!sh) { snprintf(errmsg, sizeof(errmsg), "NULL stats handle"); return -1; } if (memcmp(sh->id, UODBC_STATS_ID, sizeof(sh->id)) != 0) { snprintf(errmsg, sizeof(errmsg), "Invalid stats handle %p", h); return -1; } if (!sh->stats) { snprintf(errmsg, sizeof(errmsg), "stats memory not mapped"); return -1; } lk = acquire_sem_lock(sh->sem_id); /* * Find this PID in array */ for (i = 0; i < (sizeof(sh->stats->perpid) / sizeof(sh->stats->perpid[0])); i++) { if (sh->stats->perpid[i].pid == sh->pid) break; } /* * Check if array full. */ if ( i >= (sizeof(sh->stats->perpid) / sizeof(sh->stats->perpid[0]))) { /* * array full - process not entered. */ if (lk == 0) release_sem_lock(sh->sem_id); return 0; } type = stats_type_mask & UODBC_STATS_TYPE_TYPE_MASK; switch(type) { case UODBC_STATS_TYPE_HENV: { sh->stats->perpid[i].n_env += (long)value; break; } case UODBC_STATS_TYPE_HDBC: { sh->stats->perpid[i].n_dbc += (long)value; break; } case UODBC_STATS_TYPE_HSTMT: { sh->stats->perpid[i].n_stmt += (long)value; break; } case UODBC_STATS_TYPE_HDESC: { sh->stats->perpid[i].n_desc += (long)value; break; } default: { break; } } if (lk == 0) release_sem_lock(sh->sem_id); return 0; } /************************************************************************/ /* */ /* uodbc_stats_error */ /* ================= */ /* */ /************************************************************************/ char *uodbc_stats_error( char *buf, size_t buflen) { if (!buf) return NULL; if (strlen(errmsg) > buflen) { memcpy(buf, errmsg, buflen - 1); buf[buflen - 1] = '\0'; } else { strcpy(buf, errmsg); } return buf; } /************************************************************************/ /* */ /* uodbc_get_stats */ /* =============== */ /* */ /* This function should be provided with an array of statistic */ /* structures which will be filled with the required statistics */ /* records. */ /* */ /* ret_stats = uodbc_get_stats(h, request_pid, s, n_stats); */ /* */ /* h = a statistics handle returned from uodbc_open_stats(). */ /* request_pid = */ /* -1 = return stats on all attached processes. */ /* n (n > 0) = return stats on specific process request_pid. */ /* 0 = return list of processes attached. */ /* s = ptr to array of statistics structures. */ /* n_stats = number of statistics structures at s. */ /* ret_stats = number of stats structures filled in at s. */ /* */ /************************************************************************/ int uodbc_get_stats( void *h, pid_t request_pid, uodbc_stats_retentry *s, int n_stats) { uodbc_stats_handle_t *sh; unsigned int i; long n_env=0; long n_dbc=0; long n_stmt=0; long n_desc=0; int cur_stat; sh = (uodbc_stats_handle_t *)h; if (!sh) { snprintf(errmsg, sizeof(errmsg), "NULL stats return ptr supplied"); return -1; } if (n_stats < 1) { snprintf(errmsg, sizeof(errmsg), "No stats return structures supplied"); return -1; } if (!sh) { snprintf(errmsg, sizeof(errmsg), "NULL stats handle"); return -1; } if (memcmp(sh->id, UODBC_STATS_ID, sizeof(sh->id)) != 0) { snprintf(errmsg, sizeof(errmsg), "Invalid stats handle %p", sh); return -1; } if (!sh->stats) { snprintf(errmsg, sizeof(errmsg), "stats memory not mapped"); return -1; } cur_stat = 0; for (i = 0; i < (sizeof(sh->stats->perpid) / sizeof(sh->stats->perpid[0])); i++) { if (sh->stats->perpid[i].pid > 0) { int sts; /* * Check this process still exists and if not zero counts. */ sts = kill(sh->stats->perpid[i].pid, 0); if ((sts == 0) || ((sts < 0) && (errno == EPERM))) { ; } else { sh->stats->perpid[i].pid = 0; sh->stats->perpid[i].n_env = 0; sh->stats->perpid[i].n_dbc = 0; sh->stats->perpid[i].n_stmt = 0; sh->stats->perpid[i].n_desc = 0; } } if (((request_pid == (pid_t)-1) && (sh->stats->perpid[i].pid > 0)) || (sh->stats->perpid[i].pid == request_pid)) { n_env += sh->stats->perpid[i].n_env; n_dbc += sh->stats->perpid[i].n_dbc; n_stmt += sh->stats->perpid[i].n_stmt; n_desc += sh->stats->perpid[i].n_desc; } else if (request_pid == (pid_t)0) { s[cur_stat].type = UODBC_STAT_LONG; s[cur_stat].value.l_value = sh->stats->perpid[i].pid; strcpy(s[cur_stat].name, "PID"); if (++cur_stat > n_stats) return cur_stat; } } if (request_pid == (pid_t)0) return cur_stat; s[cur_stat].type = UODBC_STAT_LONG; s[cur_stat].value.l_value = n_env; strcpy(s[cur_stat].name, "Environments"); if (++cur_stat > n_stats) return cur_stat; s[cur_stat].type = UODBC_STAT_LONG; s[cur_stat].value.l_value = n_dbc; strcpy(s[cur_stat].name, "Connections"); if (++cur_stat > n_stats) return cur_stat; s[cur_stat].type = UODBC_STAT_LONG; s[cur_stat].value.l_value = n_stmt; strcpy(s[cur_stat].name, "Statements"); if (++cur_stat > n_stats) return cur_stat; s[cur_stat].type = UODBC_STAT_LONG; s[cur_stat].value.l_value = n_desc; strcpy(s[cur_stat].name, "Descriptors"); if (++cur_stat > n_stats) return cur_stat; return cur_stat; } /************************************************************************/ /* */ /* acquire_sem_lock */ /* ================ */ /* */ /* This function locks other threads/processes out whilst a change to */ /* to the statistics is made. It uses a global semaphore which was */ /* created in uodbc_open_stats(). The semaphore set contains only the */ /* one semaphore which is incremented to 1 when locked. All semops */ /* are performed with SEM_UNDO so if the process unexepctedly exits */ /* sempahore operations are undone. */ /* */ /* NOTE: some older platforms have a kernel limit on the number of */ /* SEM_UNDOs structures that may be used. If you run out, you will */ /* either have to increase the limit or take out the SEM_UNDO in this */ /* function and release_sem_lock() and hope uodbc_update_stats() never */ /* causes a preature exit. */ /* */ /************************************************************************/ static int acquire_sem_lock(int sem_id) { #ifdef NEED_SEMUNDO_UNION union semun { int val; struct semid_ds *buf; unsigned short int *array; struct seminfo *__buf; }semctl_arg; #else union semun semctl_arg; #endif int sts; /* * Semaphore operations: */ /* lock the semaphore */ struct sembuf op_lock[2] = { {0, 0, 0}, /* Wait for [0] (lock) to equal 0 */ {0, 1, SEM_UNDO} /* increment [0] to lock */ }; if (semop(sem_id, &op_lock[0], 2) < 0) { return -1; } return 0; } /************************************************************************/ /* */ /* release_sem_lock */ /* ================ */ /* */ /* This function unlocks the semaphore used to lock other */ /* threads/processes out whilst a change to the statistics is made. */ /* It uses a global semaphore which was created in uodbc_open_stats(). */ /* The semaphore set contains only the one semaphore which is */ /* incremented to 1 when locked and decremented when unlocked. */ /* All semops are performed with SEM_UNDO so if the process */ /* unexepctedly exits sempahore operations are undone. */ /* */ /* NOTE: some older platforms have a kernel limit on the number of */ /* SEM_UNDOs structures that may be used. If you run out, you will */ /* either have to increase the limit or take out the SEM_UNDO in this */ /* function and acquire_sem_lock() and hope uodbc_update_stats() never */ /* causes a preature exit. */ /* */ /************************************************************************/ static int release_sem_lock(int sem_id) { #ifdef NEED_SEMUNDO_UNION union semun { int val; struct semid_ds *buf; unsigned short int *array; struct seminfo *__buf; }semctl_arg; #else union semun semctl_arg; #endif int sts; /* * Semaphore operations: */ /* unlock the semaphore */ struct sembuf op_unlock[1] = { {0, -1, SEM_UNDO}, /* Decrement [0] lock back to zero */ }; if (semop(sem_id, &op_unlock[0], 1) < 0) { return -1; } return 0; } #else int uodbc_open_stats( void **rh, unsigned int mode) { return -1; } int uodbc_close_stats( void *h) { return -1; } char *uodbc_stats_error( char *buf, size_t buflen) { const char *notbuilt="unixODBC not built with statistics code"; if (!buf) return NULL; if (strlen(notbuilt) > buflen) { memcpy(buf, notbuilt, buflen - 1); buf[buflen - 1] = '\0'; } else { strcpy(buf, notbuilt); } return buf; } int uodbc_get_stats( void *h, pid_t request_pid, uodbc_stats_retentry *s, int n_stats) { return -1; } int uodbc_update_stats(void *h, unsigned int stats_type_mask, void *value) { return -1; } #endif /* COLLECT_STATS */ unixODBC-2.2.14-p2/DriverManager/__attribute.c0100644000076400007640000007655311076054647017422 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: __attribute.c,v 1.7 2007/07/13 09:01:08 lurcher Exp $ * * $Log: __attribute.c,v $ * Revision 1.7 2007/07/13 09:01:08 lurcher * Add isql option to quote field data * * Revision 1.6 2006/04/18 10:24:47 lurcher * Add a couple of changes from Mark Vanderwiel * * Revision 1.5 2004/10/27 08:57:57 lurcher * Remove -module from cur Makefile.am, it seems to stop the lib building on HPUX... * * Revision 1.4 2004/06/21 10:01:12 lurcher * * Fix a couple of 64 bit issues * * Revision 1.3 2003/01/23 15:33:25 lurcher * * Fix problems with using putenv() * * Revision 1.2 2002/02/21 18:44:09 lurcher * * Fix bug on 32 bit platforms without long long support * Add option to set environment variables from the ini file * * Revision 1.1.1.1 2001/10/17 16:40:09 lurcher * * First upload to SourceForge * * Revision 1.1 2001/08/08 17:05:17 nick * * Add support for attribute setting in the ini files * * **********************************************************************/ #include #include "drivermanager.h" static char const rcsid[]= "$RCSfile: __attribute.c,v $"; /* * these are taken directly from odbctest/attr.cpp * so any bugs or additions, should be added there also */ typedef struct attr_value { char *text; int value; char *version; int data_type; } attr_value; typedef struct attr_options { char *text; int attr; attr_value values[ 6 ]; char *version; int data_type; int is_bitmap; int is_pointer; } attr_options; static attr_options stmt_options[] = { { "SQL_ATTR_APP_PARAM_DESC", SQL_ATTR_APP_PARAM_DESC, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_APP_ROW_DESC", SQL_ATTR_APP_ROW_DESC, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_ASYNC_ENABLE", SQL_ATTR_ASYNC_ENABLE, { { "SQL_ASYNC_ENABLE_OFF", SQL_ASYNC_ENABLE_OFF }, { "SQL_ASYNC_ENABLE_ON", SQL_ASYNC_ENABLE_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_CONCURRENCY", SQL_ATTR_CONCURRENCY, { { "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY }, { "SQL_CONCUR_LOCK", SQL_CONCUR_LOCK }, { "SQL_CONCUR_ROWVER", SQL_CONCUR_ROWVER }, { "SQL_CONCUR_VALUES", SQL_CONCUR_VALUES }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_CURSOR_SCROLLABLE", SQL_ATTR_CURSOR_SCROLLABLE, { { "SQL_NONSCROLLABLE", SQL_NONSCROLLABLE }, { "SQL_SCROLLABLE", SQL_SCROLLABLE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_CURSOR_SENSITIVITY", SQL_ATTR_CURSOR_SENSITIVITY, { { "SQL_UNSPECIFIED", SQL_UNSPECIFIED }, { "SQL_INSENSITIVE", SQL_INSENSITIVE }, { "SQL_SENSITIVE", SQL_SENSITIVE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_CURSOR_TYPE", SQL_ATTR_CURSOR_TYPE, { { "SQL_CURSOR_FORWARD_ONLY", SQL_CURSOR_FORWARD_ONLY }, { "SQL_CURSOR_STATIC", SQL_CURSOR_STATIC }, { "SQL_CURSOR_KEYSET_DRIVEN", SQL_CURSOR_KEYSET_DRIVEN }, { "SQL_CURSOR_DYNAMIC", SQL_CURSOR_DYNAMIC }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_ENABLE_AUTO_IPD", SQL_ATTR_ENABLE_AUTO_IPD, { { "SQL_FALSE", SQL_FALSE }, { "SQL_TRUE", SQL_TRUE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_FETCH_BOOKMARK_PTR", SQL_ATTR_FETCH_BOOKMARK_PTR, { { NULL } }, "3.0", SQL_INTEGER, FALSE, TRUE }, { "SQL_ATTR_FETCH_IMP_PARAM_DESC", SQL_ATTR_IMP_PARAM_DESC, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_FETCH_IMP_ROW_DESC", SQL_ATTR_IMP_ROW_DESC, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_KEYSET_SIZE", SQL_ATTR_KEYSET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_MAX_LENGTH", SQL_ATTR_MAX_LENGTH, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_MAX_ROWS", SQL_ATTR_MAX_ROWS, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_METADATA_ID", SQL_ATTR_METADATA_ID, { { "SQL_FALSE", SQL_FALSE }, { "SQL_TRUE", SQL_TRUE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_NOSCAN", SQL_ATTR_NOSCAN, { { "SQL_NOSCAN_OFF", SQL_NOSCAN_OFF }, { "SQL_NOSCAN_ON", SQL_NOSCAN_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_PARAM_BIND_OFFSET_PTR", SQL_ATTR_PARAM_BIND_OFFSET_PTR, { { NULL } }, "3.0", SQL_INTEGER, FALSE, TRUE }, { "SQL_ATTR_PARAM_BIND_TYPE", SQL_ATTR_PARAM_BIND_TYPE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_PARAM_OPERATION_PTR", SQL_ATTR_PARAM_OPERATION_PTR, { { NULL } }, "3.0", SQL_SMALLINT, FALSE, TRUE }, { "SQL_ATTR_PARAM_STATUS_PTR", SQL_ATTR_PARAM_STATUS_PTR, { { NULL } }, "3.0", SQL_SMALLINT, FALSE, TRUE }, { "SQL_ATTR_PARAMS_PROCESSED_PTR", SQL_ATTR_PARAMS_PROCESSED_PTR, { { NULL } }, "3.0", SQL_SMALLINT, FALSE, TRUE }, { "SQL_ATTR_PARAMSET_SIZE", SQL_ATTR_PARAMSET_SIZE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_QUERY_TIMEOUT", SQL_ATTR_QUERY_TIMEOUT, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_RETRIEVE_DATA", SQL_ATTR_RETRIEVE_DATA, { { "SQL_RD_ON", SQL_RD_ON }, { "SQL_RD_OFF", SQL_RD_OFF }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_ROW_ARRAY_SIZE", SQL_ATTR_ROW_ARRAY_SIZE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_ROW_BIND_OFFSET_PTR", SQL_ATTR_ROW_BIND_OFFSET_PTR, { { NULL } }, "3.0", SQL_INTEGER, FALSE, TRUE }, { "SQL_ATTR_ROW_BIND_TYPE", SQL_ATTR_ROW_BIND_TYPE, { { "SQL_BIND_BY_COLUMN", SQL_BIND_BY_COLUMN }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_ROW_NUMBER", SQL_ATTR_ROW_NUMBER, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_ROW_OPERATION_PTR", SQL_ATTR_ROW_OPERATION_PTR, { { NULL } }, "3.0", SQL_SMALLINT, FALSE, TRUE }, { "SQL_ATTR_ROW_STATUS_PTR", SQL_ATTR_ROW_STATUS_PTR, { { NULL } }, "3.0", SQL_SMALLINT, FALSE, TRUE }, { "SQL_ATTR_ROWS_FETCHED_PTR", SQL_ATTR_ROWS_FETCHED_PTR, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_SIMULATE_CURSOR", SQL_ATTR_SIMULATE_CURSOR, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_USE_BOOKMARKS", SQL_ATTR_USE_BOOKMARKS, { { NULL } }, "2.0", SQL_INTEGER }, { NULL } }; static attr_options stmt_opt_options[] = { { "SQL_ASYNC_ENABLE", SQL_ASYNC_ENABLE, { { "SQL_ASYNC_ENABLE_OFF", SQL_ASYNC_ENABLE_OFF }, { "SQL_ASYNC_ENABLE_ON", SQL_ASYNC_ENABLE_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_BIND_TYPE", SQL_BIND_TYPE, { { "SQL_BIND_BY_COLUMN", SQL_BIND_BY_COLUMN }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_CONCURRENCY", SQL_CONCURRENCY, { { "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY }, { "SQL_CONCUR_LOCK", SQL_CONCUR_LOCK }, { "SQL_CONCUR_ROWVER", SQL_CONCUR_ROWVER }, { "SQL_CONCUR_VALUES", SQL_CONCUR_VALUES }, { "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_CURSOR_TYPE", SQL_CURSOR_TYPE, { { "SQL_CURSOR_FORWARD_ONLY", SQL_CURSOR_FORWARD_ONLY }, { "SQL_CURSOR_STATIC", SQL_CURSOR_STATIC }, { "SQL_CURSOR_KEYSET_DRIVEN", SQL_CURSOR_KEYSET_DRIVEN }, { "SQL_CURSOR_DYNAMIC", SQL_CURSOR_DYNAMIC }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_KEYSET_SIZE", SQL_KEYSET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_MAX_LENGTH", SQL_MAX_LENGTH, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_MAX_ROWS", SQL_MAX_ROWS, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_NOSCAN", SQL_NOSCAN, { { "SQL_NOSCAN_OFF", SQL_NOSCAN_OFF }, { "SQL_NOSCAN_ON", SQL_NOSCAN_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_QUERY_TIMEOUT", SQL_QUERY_TIMEOUT, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_RETRIEVE_DATA", SQL_RETRIEVE_DATA, { { "SQL_RD_ON", SQL_RD_ON }, { "SQL_RD_OFF", SQL_RD_OFF }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ROWSET_SIZE", SQL_ROWSET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_SIMULATE_CURSOR", SQL_SIMULATE_CURSOR, { { "SQL_SC_NON_UNIQUE", SQL_SC_NON_UNIQUE }, { "SQL_SC_TRY_UNIQUE", SQL_SC_TRY_UNIQUE }, { "SQL_SC_UNIQUE", SQL_SC_UNIQUE }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_USE_BOOKMARKS", SQL_USE_BOOKMARKS, { { "SQL_UB_ON", SQL_UB_ON }, { "SQL_UB_OFF", SQL_UB_OFF }, { NULL } }, "2.0", SQL_INTEGER }, { NULL } }; static attr_options conn_options[] = { { "SQL_ATTR_ACCESS_MODE", SQL_ATTR_ACCESS_MODE, { { "SQL_MODE_READ_WRITE", SQL_MODE_READ_WRITE }, { "SQL_MODE_READ_ONLY", SQL_MODE_READ_ONLY }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_ASYNC_ENABLE", SQL_ATTR_ASYNC_ENABLE, { { "SQL_ASYNC_ENABLE_OFF", SQL_ASYNC_ENABLE_OFF }, { "SQL_ASYNC_ENABLE_ON", SQL_ASYNC_ENABLE_ON }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_AUTO_IPD", SQL_ATTR_AUTO_IPD, { { "SQL_TRUE", SQL_TRUE }, { "SQL_FALSE", SQL_FALSE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_AUTOCOMMIT", SQL_ATTR_AUTOCOMMIT, { { "SQL_AUTOCOMMIT_ON", SQL_AUTOCOMMIT_ON }, { "SQL_AUTOCOMMIT_OFF", SQL_AUTOCOMMIT_OFF }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_CONNECTION_TIMEOUT", SQL_ATTR_CONNECTION_TIMEOUT, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_CURRENT_CATALOG", SQL_ATTR_CURRENT_CATALOG, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_ATTR_LOGIN_TIMEOUT", SQL_ATTR_LOGIN_TIMEOUT, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_METADATA_ID", SQL_ATTR_METADATA_ID, { { "SQL_TRUE", SQL_TRUE }, { "SQL_FALSE", SQL_FALSE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_ODBC_CURSORS", SQL_ATTR_ODBC_CURSORS, { { "SQL_CUR_USE_IF_NEEDED", SQL_CUR_USE_IF_NEEDED }, { "SQL_CUR_USE_ODBC", SQL_CUR_USE_ODBC }, { "SQL_CUR_USE_DRIVER", SQL_CUR_USE_DRIVER }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_PACKET_SIZE", SQL_ATTR_PACKET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_QUIET_MODE", SQL_ATTR_QUIET_MODE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_TRACE", SQL_ATTR_TRACE, { { "SQL_OPT_TRACE_OFF", SQL_OPT_TRACE_OFF }, { "SQL_OPT_TRACE_ON", SQL_OPT_TRACE_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_TRACEFILE", SQL_ATTR_TRACEFILE, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_ATTR_TRANSLATE_LIB", SQL_ATTR_TRANSLATE_LIB, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_ATTR_TRANSLATE_OPTION", SQL_ATTR_TRANSLATE_OPTION, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_TXN_ISOLATION", SQL_ATTR_TXN_ISOLATION, { { "SQL_TXN_READ_UNCOMMITTED", SQL_TXN_READ_UNCOMMITTED }, { "SQL_TXN_READ_COMMITTED", SQL_TXN_READ_COMMITTED }, { "SQL_TXN_REPEATABLE_READ", SQL_TXN_REPEATABLE_READ }, { "SQL_TXN_SERIALIZABLE", SQL_TXN_SERIALIZABLE }, { NULL } }, "1.0", SQL_INTEGER }, { NULL } }; static attr_options conn_opt_options[] = { { "conn: SQL_ACCESS_MODE", SQL_ACCESS_MODE, { { "SQL_MODE_READ_ONLY", SQL_MODE_READ_ONLY }, { "SQL_MODE_READ_WRITE", SQL_MODE_READ_WRITE }, { NULL } }, "1.0", SQL_INTEGER }, { "conn: SQL_AUTOCOMMIT", SQL_AUTOCOMMIT, { { "SQL_AUTOCOMMIT_ON", SQL_AUTOCOMMIT_ON }, { "SQL_AUTOCOMMIT_OFF", SQL_AUTOCOMMIT_OFF }, { NULL } }, "1.0", SQL_INTEGER }, { "conn: SQL_CURRENT_QUALIFIER", SQL_CURRENT_QUALIFIER, { { NULL } }, "2.0", SQL_CHAR }, { "conn: SQL_LOGIN_TIMEOUT", SQL_LOGIN_TIMEOUT, { { NULL } }, "1.0", SQL_INTEGER }, { "conn: SQL_ODBC_CURSORS", SQL_ODBC_CURSORS, { { "SQL_CUR_USE_IF_NEEDED", SQL_CUR_USE_IF_NEEDED }, { "SQL_CUR_USE_ODBC", SQL_CUR_USE_ODBC }, { "SQL_CUR_USE_DRIVER", SQL_CUR_USE_DRIVER }, { NULL } }, "2.0", SQL_INTEGER }, { "conn: SQL_OPT_TRACE", SQL_OPT_TRACE, { { "SQL_OPT_TRACE_ON", SQL_OPT_TRACE_ON }, { "SQL_OPT_TRACE_OFF", SQL_OPT_TRACE_OFF }, { NULL } }, "1.0", SQL_INTEGER }, { "conn: SQL_OPT_TRACEFILE", SQL_OPT_TRACEFILE, { { NULL } }, "1.0", SQL_CHAR }, { "conn: SQL_PACKET_SIZE", SQL_PACKET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "conn: SQL_QUIET_MODE", SQL_QUIET_MODE, { { NULL } }, "2.0", SQL_INTEGER }, { "conn: SQL_TRANSLATE_DLL", SQL_TRANSLATE_DLL, { { NULL } }, "1.0", SQL_CHAR }, { "conn: SQL_TRANSLATE_OPTION", SQL_TRANSLATE_OPTION, { { NULL } }, "1.0", SQL_INTEGER }, { "conn: SQL_TXN_ISOLATION", SQL_TXN_ISOLATION, { { "SQL_TXN_READ_UNCOMMITED", SQL_TXN_READ_UNCOMMITTED }, { "SQL_TXN_READ_COMMITED", SQL_TXN_READ_COMMITTED }, { "SQL_TXN_REPEATABLE_READ", SQL_TXN_REPEATABLE_READ }, { "SQL_TXN_SERIALIZABLE", SQL_TXN_SERIALIZABLE }, { "SQL_TXN_VERSIONING", 0x00000010L }, { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_ASYNC_ENABLE", SQL_ASYNC_ENABLE, { { "SQL_ASYNC_ENABLE_OFF", SQL_ASYNC_ENABLE_OFF }, { "SQL_ASYNC_ENABLE_ON", SQL_ASYNC_ENABLE_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_BIND_TYPE", SQL_BIND_TYPE, { { "SQL_BIND_BY_COLUMN", SQL_BIND_BY_COLUMN }, { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_CONCURRENCY", SQL_CONCURRENCY, { { "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY }, { "SQL_CONCUR_LOCK", SQL_CONCUR_LOCK }, { "SQL_CONCUR_ROWVER", SQL_CONCUR_ROWVER }, { "SQL_CONCUR_VALUES", SQL_CONCUR_VALUES }, { "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY }, { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_CURSOR_TYPE", SQL_CURSOR_TYPE, { { "SQL_CURSOR_FORWARD_ONLY", SQL_CURSOR_FORWARD_ONLY }, { "SQL_CURSOR_STATIC", SQL_CURSOR_STATIC }, { "SQL_CURSOR_KEYSET_DRIVEN", SQL_CURSOR_KEYSET_DRIVEN }, { "SQL_CURSOR_DYNAMIC", SQL_CURSOR_DYNAMIC }, { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_KEYSET_SIZE", SQL_KEYSET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_MAX_LENGTH", SQL_MAX_LENGTH, { { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_MAX_ROWS", SQL_MAX_ROWS, { { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_NOSCAN", SQL_NOSCAN, { { "SQL_NOSCAN_OFF", SQL_NOSCAN_OFF }, { "SQL_NOSCAN_ON", SQL_NOSCAN_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_QUERY_TIMEOUT", SQL_QUERY_TIMEOUT, { { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_RETRIEVE_DATA", SQL_RETRIEVE_DATA, { { "SQL_RD_ON", SQL_RD_ON }, { "SQL_RD_OFF", SQL_RD_OFF }, { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_ROWSET_SIZE", SQL_ROWSET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_SIMULATE_CURSOR", SQL_SIMULATE_CURSOR, { { "SQL_SC_NON_UNIQUE", SQL_SC_NON_UNIQUE }, { "SQL_SC_TRY_UNIQUE", SQL_SC_TRY_UNIQUE }, { "SQL_SC_UNIQUE", SQL_SC_UNIQUE }, { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_USE_BOOKMARKS", SQL_USE_BOOKMARKS, { { "SQL_UB_ON", SQL_UB_ON }, { "SQL_UB_OFF", SQL_UB_OFF }, { NULL } }, "2.0", SQL_INTEGER }, { NULL } }; static attr_options env_options[] = { { "SQL_ATTR_ODBC_VERSION", SQL_ATTR_ODBC_VERSION, { { "SQL_OV_ODBC2", SQL_OV_ODBC2 }, { "SQL_OV_ODBC3", SQL_OV_ODBC3 }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_CP_MATCH", SQL_ATTR_CP_MATCH, { { "SQL_CP_STRICT_MATCH", SQL_CP_STRICT_MATCH }, { "SQL_CP_RELAXED_MATCH", SQL_CP_RELAXED_MATCH }, { "SQL_CP_MATCH_DEFAULT", SQL_CP_MATCH_DEFAULT }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_CONNECTION_POOLING", SQL_ATTR_CONNECTION_POOLING, { { "SQL_CP_OFF", SQL_OV_ODBC2 }, { "SQL_CP_ONE_PER_DRIVER", SQL_CP_ONE_PER_DRIVER }, { "SQL_CP_ONE_PER_HENV", SQL_CP_ONE_PER_HENV }, { "SQL_CP_DEFAULT", SQL_CP_DEFAULT }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_OUTPUT_NTS", SQL_ATTR_OUTPUT_NTS, { { "SQL_TRUE", SQL_TRUE }, { "SQL_FALSE", SQL_FALSE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_UNIXODBC_ENVATTR", SQL_ATTR_UNIXODBC_ENVATTR, { { NULL } }, "3.0", SQL_CHAR }, { NULL } }; static int find_option( char *kw, struct attr_set *as, struct attr_options *opt ) { struct attr_value *val; int found = 0; while( opt -> text && !found ) { if ( strcasecmp( kw, opt -> text ) == 0 ) { found = 1; val = opt -> values; as -> attribute = opt -> attr; while ( val -> text ) { if ( strcasecmp( as -> value, val -> text ) == 0 ) { break; } val ++; } if ( val -> text ) { as -> is_int_type = 1; as -> int_value = val -> value; } else { if ( opt -> data_type != SQL_CHAR ) { as -> is_int_type = 1; as -> int_value = atoi( as -> value ); } } } opt ++; } return found; } struct attr_set * __get_set( char ** cp, int *skip ) { char *ptr, *kw; int len; struct attr_set *as; /* * flag to indicate a non valid option */ *skip = 0; ptr = *cp; if ( !**cp ) return NULL; while ( **cp && **cp != '=' ) { (*cp)++; } if ( !**cp ) return NULL; as = malloc( sizeof( struct attr_set )); if ( !as ) { return NULL; } memset( as, 0, sizeof( struct attr_set )); len = *cp - ptr; as -> keyword = malloc( len + 1 ); memcpy( as -> keyword, ptr, len ); as -> keyword[ len ] = '\0'; (*cp)++; ptr = *cp; if ( **cp && **cp == '{' ) { (*cp)++; ptr ++; while ( **cp && **cp != '}' ) (*cp)++; len = *cp - ptr; as -> value = malloc( len + 1 ); memcpy( as -> value, ptr , len ); as -> value[ len ] = '\0'; (*cp)++; } else { while ( **cp && **cp != ';' ) (*cp)++; len = *cp - ptr; as -> value = malloc( len + 1 ); memcpy( as -> value, ptr, len ); as -> value[ len ] = '\0'; } /* * now we translate the keyword and attribute values */ if ( as -> keyword[ 0 ] == '*' ) { kw = as -> keyword + 1; as -> override = 1; } else { kw = as -> keyword; } if ( !find_option( kw, as, env_options ) && !find_option( kw, as, conn_options ) && !find_option( kw, as, conn_opt_options ) && !find_option( kw, as, stmt_options ) && !find_option( kw, as, stmt_opt_options )) { *skip = 1; } if ( **cp ) (*cp)++; return as; } int __append_set( struct attr_struct *attr_str, struct attr_set *ap ) { struct attr_set *ptr, *end, *nap; /* check that the attribute is not already in the list */ end = NULL; if ( attr_str -> count > 0 ) { ptr = attr_str -> list; while( ptr ) { if( ap -> attribute == ptr -> attribute ) { return 0; } end = ptr; ptr = ptr -> next; } } nap = malloc( sizeof( *ptr )); *nap = *ap; nap -> keyword = malloc( strlen( ap -> keyword ) + 1 ); strcpy( nap -> keyword, ap -> keyword ); nap -> value = malloc( strlen( ap -> value ) + 1 ); strcpy( nap -> value, ap -> value ); attr_str -> count ++; if ( attr_str -> list ) { end -> next = nap; nap -> next = NULL; } else { nap -> next = NULL; attr_str -> list = nap; } return 0; } int __parse_attribute_string( struct attr_struct *attr_str, char *str, int str_len ) { struct attr_set *cp; char *local_str, *ptr; int skip; attr_str -> count = 0; attr_str -> list = NULL; if ( str_len != SQL_NTS ) { local_str = malloc( str_len + 1 ); memcpy( local_str, str, str_len ); local_str[ str_len ] = '\0'; } else { local_str = str; } ptr = local_str; while(( cp = __get_set( &ptr, &skip )) != NULL ) { if ( !skip ) { __append_set( attr_str, cp ); } free( cp -> keyword ); free( cp -> value ); free( cp ); } if ( str_len != SQL_NTS ) free( local_str ); return 0; } void __release_attr_str( struct attr_struct *attr_str ) { struct attr_set *set, *ptr; if ( !attr_str ) { return; } set = attr_str -> list; while ( set ) { ptr = set -> next; free( set -> keyword ); free( set -> value ); free( set ); set = ptr; } attr_str -> list = NULL; attr_str -> count = 0; } static void __set_local_attribute( void *handle, int type, struct attr_set *as ) { SQLRETURN ret = SQL_SUCCESS; if ( type == SQL_HANDLE_ENV ) { DMHDBC connection = (DMHDBC) handle; if ( as -> attribute == SQL_ATTR_UNIXODBC_ENVATTR ) { /* * its a memory leak, but not much I can do, see "man putenv" */ putenv( strdup( as -> value )); } else { return; } if ( log_info.log_flag ) { sprintf( connection -> msg, "\t\tENV ATTR [%s=%s] ret = %d", as -> keyword, as -> value, ret ); dm_log_write_diag( connection -> msg ); } } } static void __set_attribute( void *handle, int type, struct attr_set *as ) { SQLRETURN ret = SQL_ERROR; if ( type == SQL_HANDLE_ENV ) { DMHDBC connection = (DMHDBC) handle; if ( as -> attribute == SQL_ATTR_UNIXODBC_ENVATTR ) { return; } if ( connection -> driver_version == SQL_OV_ODBC3 ) { if ( CHECK_SQLSETENVATTR( connection )) { if ( as -> is_int_type ) { ret = SQLSETENVATTR( connection, connection -> driver_dbc, as -> attribute, as -> int_value, 0 ); } else { ret = SQLSETENVATTR( connection, connection -> driver_dbc, as -> attribute, as -> value, strlen( as -> value )); } } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\t\tENV ATTR [%s=%s] ret = %d", as -> keyword, as -> value, ret ); dm_log_write_diag( connection -> msg ); } } else if ( type == SQL_HANDLE_DBC ) { DMHDBC connection = (DMHDBC) handle; if ( connection -> driver_version == SQL_OV_ODBC3 ) { if ( CHECK_SQLSETCONNECTATTR( connection )) { if ( as -> is_int_type ) { ret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, as -> attribute, as -> int_value, 0 ); } else { ret = SQLSETCONNECTATTR( connection, connection -> driver_dbc, as -> attribute, as -> value, strlen( as -> value )); } } else if ( CHECK_SQLSETCONNECTOPTION( connection )) { if ( as -> is_int_type ) { ret = SQLSETCONNECTOPTION( connection, connection -> driver_dbc, as -> attribute, as -> int_value ); } else { ret = SQLSETCONNECTOPTION( connection, connection -> driver_dbc, as -> attribute, as -> value ); } } } else { if ( CHECK_SQLSETCONNECTOPTION( connection )) { if ( as -> is_int_type ) { ret = SQLSETCONNECTOPTION( connection, connection -> driver_dbc, as -> attribute, as -> int_value ); } else { ret = SQLSETCONNECTOPTION( connection, connection -> driver_dbc, as -> attribute, as -> value ); } } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\t\tCONN ATTR [%s=%s] ret = %d", as -> keyword, as -> value, ret ); dm_log_write_diag( connection -> msg ); } } else if ( type == SQL_HANDLE_STMT ) { DMHSTMT statement = (DMHSTMT) handle; DMHDBC connection = statement -> connection; if ( connection -> driver_version == SQL_OV_ODBC3 ) { if ( CHECK_SQLSETSTMTATTR( connection )) { if ( as -> is_int_type ) { ret = SQLSETSTMTATTR( connection, statement -> driver_stmt, as -> attribute, as -> int_value, 0 ); } else { ret = SQLSETSTMTATTR( connection, statement -> driver_stmt, as -> attribute, as -> value, strlen( as -> value )); } } else if ( CHECK_SQLSETSTMTOPTION( connection )) { if ( as -> is_int_type ) { ret = SQLSETSTMTOPTION( connection, statement -> driver_stmt, as -> attribute, as -> int_value ); } else { ret = SQLSETSTMTOPTION( connection, statement -> driver_stmt, as -> attribute, as -> value ); } } } else { if ( CHECK_SQLSETSTMTOPTION( connection )) { if ( as -> is_int_type ) { ret = SQLSETSTMTOPTION( connection, statement -> driver_stmt, as -> attribute, as -> int_value ); } else { ret = SQLSETSTMTOPTION( connection, statement -> driver_stmt, as -> attribute, as -> value ); } } } if ( log_info.log_flag ) { sprintf( connection -> msg, "\t\tSTMT ATTR [%s=%s] ret = %d", as -> keyword, as -> value, ret ); dm_log_write_diag( connection -> msg ); } } } void __set_local_attributes( void * handle, int type ) { struct attr_set *as; switch( type ) { case SQL_HANDLE_ENV: as = ((DMHDBC) handle ) -> env_attribute.list; break; default: as = NULL; break; } while( as ) { __set_local_attribute( handle, type, as ); as = as -> next; } } void __set_attributes( void * handle, int type ) { struct attr_set *as; switch( type ) { case SQL_HANDLE_ENV: as = ((DMHDBC) handle ) -> env_attribute.list; break; case SQL_HANDLE_DBC: as = ((DMHDBC) handle ) -> dbc_attribute.list; break; case SQL_HANDLE_STMT: as = ((DMHSTMT) handle ) -> connection -> stmt_attribute.list; break; default: as = NULL; break; } while( as ) { __set_attribute( handle, type, as ); as = as -> next; } } void *__attr_override( void *handle, int type, int attribute, void *value, SQLINTEGER *string_length ) { struct attr_set *as; char *msg; switch( type ) { case SQL_HANDLE_DBC: as = ((DMHDBC) handle ) -> dbc_attribute.list; msg = ((DMHDBC) handle ) -> msg; break; case SQL_HANDLE_STMT: as = ((DMHSTMT) handle ) -> connection -> stmt_attribute.list; msg = ((DMHSTMT) handle ) -> msg; break; default: as = NULL; break; } while( as ) { if ( as -> override && as -> attribute == attribute ) { break; } as = as -> next; } if ( as ) { if ( log_info.log_flag ) { sprintf( msg, "\t\tATTR OVERRIDE [%s=%s]", as -> keyword + 1, as -> value ); dm_log_write_diag( msg ); } if ( as -> is_int_type ) { return (void*)(long) as -> int_value; } else { if ( string_length ) { *string_length = strlen( as -> value ); } return as -> value; } } else { return value; } } void *__attr_override_wide( void *handle, int type, int attribute, void *value, SQLINTEGER *string_length, SQLWCHAR *buffer ) { struct attr_set *as; char *msg; switch( type ) { case SQL_HANDLE_DBC: as = ((DMHDBC) handle ) -> dbc_attribute.list; msg = ((DMHDBC) handle ) -> msg; break; case SQL_HANDLE_STMT: as = ((DMHSTMT) handle ) -> connection -> stmt_attribute.list; msg = ((DMHSTMT) handle ) -> msg; break; default: as = NULL; break; } while( as ) { if ( as -> override && as -> attribute == attribute ) { break; } as = as -> next; } if ( as ) { if ( log_info.log_flag ) { sprintf( msg, "\t\tATTR OVERRIDE [%s=%s]", as -> keyword + 1, as -> value ); dm_log_write_diag( msg ); } if ( as -> is_int_type ) { return (void*)(long) as -> int_value; } else { if ( string_length ) { *string_length = strlen( as -> value ) * sizeof( SQLWCHAR ); } switch( type ) { case SQL_HANDLE_DBC: ansi_to_unicode_copy( buffer, as->value, SQL_NTS, (DMHDBC) handle ); break; case SQL_HANDLE_STMT: ansi_to_unicode_copy( buffer, as->value, SQL_NTS, ((DMHSTMT) handle ) -> connection ); break; } return buffer; } } else { return value; } } unixODBC-2.2.14-p2/DriverManager/drivermanager.h0100644000076400007640000015303311066725004017730 0ustar nicknick#ifndef _DRIVERMANAGER_H #define _DRIVERMANAGER_H #define ODBCVER 0x0351 #include #include #include #include #include #ifdef HAVE_SYNCH_H #include #endif #ifdef HAVE_LIBPTH #include #elif HAVE_LIBPTHREAD #include #elif HAVE_LIBTHREAD #include #endif #define SQL_NOUNICODEMAP #define UNICODE #include #include #include #include /* THIS WILL BRING IN sql.h and sqltypes.h AS WELL AS PROVIDE MS EXTENSIONS */ #include #include "__stats.h" /* * iconv support */ #ifdef HAVE_ICONV #include #include #endif #ifdef UNICODE_ENCODING #define DEFAULT_ICONV_ENCODING UNICODE_ENCODING #else #define DEFAULT_ICONV_ENCODING "auto-search" #endif #define ERROR_PREFIX "[unixODBC]" #define DM_ERROR_PREFIX "[Driver Manager]" #define LOG_MESSAGE_LEN 128 /* length of string to display in log */ /* * SQLSetStmt/ConnectionAttr limits */ #define SQL_CONN_DRIVER_MIN 20000 #define SQL_STMT_DRIVER_MIN 20000 /* * its possible that the driver has a different definition of a handle to the driver * manager, DB2 64bit is a example of this */ #define DRV_SQLHANDLE SQLHANDLE #define DRV_SQLHDESC SQLHDESC /* * DEFAULT FILE NAMES * */ /* * magic numbers */ #define HENV_MAGIC 19289 #define HDBC_MAGIC 19290 #define HSTMT_MAGIC 19291 #define HDESC_MAGIC 19292 /* * states */ #define STATE_E0 0 #define STATE_E1 1 #define STATE_E2 2 #define STATE_C0 0 #define STATE_C1 1 #define STATE_C2 2 #define STATE_C3 3 #define STATE_C4 4 #define STATE_C5 5 #define STATE_C6 6 #define STATE_S0 0 #define STATE_S1 1 #define STATE_S2 2 #define STATE_S3 3 #define STATE_S4 4 #define STATE_S5 5 #define STATE_S6 6 #define STATE_S7 7 #define STATE_S8 8 #define STATE_S9 9 #define STATE_S10 10 #define STATE_S11 11 #define STATE_S12 12 #define STATE_D0 0 #define STATE_D1i 1 #define STATE_D1e 2 /* * structure to contain the loaded lib entry points */ struct driver_func { int ordinal; char *name; void *dm_func; /* this is to fix what seems a bug in */ /* some dlopen implemnations where dlsym */ /* will return the driver manager func */ /* not the driver one */ void *dm_funcW; SQLRETURN (*func)(); SQLRETURN (*funcW)(); /* function with a unicode W */ SQLRETURN (*funcA)(); /* function with a unicode A */ int can_supply; /* this is used to indicate that */ /* the DM can execute the function */ /* even if the driver does not */ /* supply it */ }; typedef struct error { SQLWCHAR sqlstate[ 6 ]; SQLWCHAR *msg; SQLINTEGER native_error; int return_val; SQLRETURN diag_column_number_ret; SQLRETURN diag_row_number_ret; SQLRETURN diag_class_origin_ret; SQLRETURN diag_subclass_origin_ret; SQLRETURN diag_connection_name_ret; SQLRETURN diag_server_name_ret; SQLINTEGER diag_column_number; SQLINTEGER diag_row_number; SQLWCHAR diag_class_origin[ 128 ]; SQLWCHAR diag_subclass_origin[ 128 ]; SQLWCHAR diag_connection_name[ 128 ]; SQLWCHAR diag_server_name[ 128 ]; struct error *next; struct error *prev; } ERROR; typedef struct error_header { int error_count; ERROR *error_list_head; ERROR *error_list_tail; int internal_count; ERROR *internal_list_head; ERROR *internal_list_tail; } EHEADER; typedef struct error_head { EHEADER sql_error_head; EHEADER sql_diag_head; void *owning_handle; int handle_type; SQLRETURN return_code; SQLINTEGER header_set; SQLRETURN diag_cursor_row_count_ret; SQLRETURN diag_dynamic_function_ret; SQLRETURN diag_dynamic_function_code_ret; SQLRETURN diag_number_ret; SQLRETURN diag_row_count_ret; SQLLEN diag_cursor_row_count; SQLWCHAR diag_dynamic_function[ 128 ]; SQLINTEGER diag_dynamic_function_code; SQLLEN diag_number; SQLLEN diag_row_count; } EHEAD; struct log_structure { char *program_name; char *log_file_name; int log_flag; int pid_logging; /* the log path specifies a directory, and a */ /* log file per pid is created */ }; extern struct log_structure log_info; /* * save connection attr untill after the connect, and then pass on */ struct save_attr { int attr_type; char *str_attr; int str_len; int int_attr; struct save_attr *next; }; /* * attribute extension support */ struct attr_set { char *keyword; char *value; int override; int attribute; int is_int_type; int int_value; struct attr_set *next; }; struct attr_struct { int count; struct attr_set *list; }; int __parse_attribute_string( struct attr_struct *attr_str, char *str, int str_len ); void __release_attr_str( struct attr_struct *attr_str ); void __set_attributes( void *handle, int type ); void __set_local_attributes( void *handle, int type ); void *__attr_override( void *handle, int type, int attribute, void * value, SQLINTEGER *string_length ); void *__attr_override_wide( void *handle, int type, int attribute, void * value, SQLINTEGER *string_length, SQLWCHAR *buffer ); /* * use this to maintain a list of the drivers that are loaded under this env, * and to decide if we want to call SQLAllocHandle( SQL_ENV ) om them */ struct env_lib_struct { char *lib_name; DRV_SQLHANDLE env_handle; int count; struct env_lib_struct *next; }; typedef struct environment { int type; /* magic number */ struct environment *next_class_list;/* static list of all env handles */ char msg[ LOG_MSG_MAX ]; /* buff to format msgs */ int state; /* state of environment */ SQLINTEGER requested_version; /* SQL_OV_ODBC2 or SQL_OV_ODBC3 */ int connection_count; /* number of hdbc of this env */ int sql_driver_count; /* used for SQLDrivers */ EHEAD error; /* keep track of errors */ SQLINTEGER connection_pooling; /* does connection pooling operate */ SQLINTEGER cp_match; int fetch_mode; /* for SQLDataSources */ int entry; void *sh; /* statistics handle */ struct env_lib_struct *env_lib_list;/* use this to avoid multiple AllocEnv in the driver */ } *DMHENV; /* * connection pooling attributes */ typedef struct connection { int type; /* magic number */ struct connection *next_class_list; /* static list of all dbc handles */ char msg[ LOG_MSG_MAX ]; /* buff to format msgs */ int state; /* state of connection */ DMHENV environment; /* environment that own's the connection */ void *dl_handle; /* handle of the loaded lib */ char dl_name[ 256 ]; /* name of loaded lib */ struct driver_func *functions; /* entry points */ struct driver_func ini_func; /* optinal start end functions */ struct driver_func fini_func; int unicode_driver; /* do we use the W functions in the */ /* driver ? */ DRV_SQLHANDLE driver_env; /* environment handle in client */ DRV_SQLHANDLE driver_dbc; /* connection handle in client */ int driver_version; /* required version of the connected */ /* driver */ int driver_act_ver; /* real version of the driver */ int statement_count; /* number of statements on this dbc */ EHEAD error; /* keep track of errors */ char dsn[ SQL_MAX_DSN_LENGTH + 1 ]; /* where we are connected */ int access_mode; /* variables set via SQLSetConnectAttr */ int access_mode_set; int login_timeout; int login_timeout_set; int auto_commit; int auto_commit_set; int async_enable; int async_enable_set; int auto_ipd; int auto_ipd_set; int connection_timeout; int connection_timeout_set; int metadata_id; int metadata_id_set; int packet_size; int packet_size_set; SQLLEN quite_mode; int quite_mode_set; int txn_isolation; int txn_isolation_set; SQLINTEGER cursors; void *cl_handle; /* handle to the cursor lib */ int trace; char tracefile[ INI_MAX_PROPERTY_VALUE + 1 ]; #ifdef HAVE_LIBPTH pth_mutex_t mutex; /* protect the object */ int protection_level; #elif HAVE_LIBPTHREAD pthread_mutex_t mutex; /* protect the object */ int protection_level; #elif HAVE_LIBTHREAD mutex_t mutex; /* protect the object */ int protection_level; #endif int ex_fetch_mapping; /* disable SQLFetch -> SQLExtendedFetch */ int disable_gf; /* dont call SQLGetFunctions in the driver */ int dont_dlclose; /* disable dlclosing of the handle */ int bookmarks_on; /* bookmarks are set on */ void *pooled_connection; /* points to t connection pool structure */ int pooling_timeout; int ttl; char driver_connect_string[ 1024 ]; int dsn_length; char server[ 128 ]; int server_length; char user[ 128 ]; int user_length; char password[ 128 ]; int password_length; char cli_year[ 5 ]; struct attr_struct env_attribute; /* Extended attribute set info */ struct attr_struct dbc_attribute; struct attr_struct stmt_attribute; struct save_attr *save_attr; /* SQLConnectAttr before connect */ #ifdef HAVE_ICONV iconv_t iconv_cd_uc_to_ascii; /* in and out conversion descriptor */ iconv_t iconv_cd_ascii_to_uc; char unicode_string[ 64 ]; /* name of unicode conversion */ #endif struct env_lib_struct *env_list_ent; /* pointer to reference in the env list */ char probe_sql[ 512 ]; /* SQL to use to check a pool is valid */ int threading_level; /* level of thread protection the DM proves */ int cbs_found; /* Have we queried the driver for the effect of a */ SQLSMALLINT ccb_value; /* COMMIT or a ROLLBACK */ SQLSMALLINT crb_value; } *DMHDBC; typedef struct connection_pool { char driver_connect_string[ 1024 ]; int dsn_length; char server[ 128 ]; int server_length; char user[ 128 ]; int user_length; char password[ 128 ]; int password_length; time_t expiry_time; int ttl; int timeout; int in_use; struct connection_pool *next; struct connection connection; int cursors; } CPOOL; typedef struct descriptor { int type; /* magic number */ struct descriptor *next_class_list; /* static list of all desc handles */ char msg[ LOG_MSG_MAX ]; /* buff to format msgs */ int state; /* state of descriptor */ EHEAD error; /* keep track of errors */ DRV_SQLHDESC driver_desc; /* driver descriptor */ DMHDBC connection; /* DM connection that owns this */ int implicit; /* created by a AllocStmt */ #ifdef HAVE_LIBPTH pth_mutex_t mutex; /* protect the object */ #elif HAVE_LIBPTHREAD pthread_mutex_t mutex; /* protect the object */ #elif HAVE_LIBTHREAD mutex_t mutex; /* protect the object */ #endif } *DMHDESC; typedef struct statement { int type; /* magic number */ struct statement *next_class_list; /* static list of all stmt handles */ char msg[ LOG_MSG_MAX ]; /* buff to format msgs */ int state; /* state of statement */ DMHDBC connection; /* DM connection that owns this */ DRV_SQLHANDLE driver_stmt; /* statement in the driver */ SQLSMALLINT hascols; /* is there a result set */ int prepared; /* the statement has been prepared */ int interupted_func; /* current function running async */ /* or NEED_DATA */ int interupted_state; /* state we went into need data or */ /* still executing from */ int bookmarks_on; /* bookmarks are set on */ EHEAD error; /* keep track of errors */ SQLINTEGER metadata_id; DMHDESC ipd; /* current descriptors */ DMHDESC apd; DMHDESC ird; DMHDESC ard; DMHDESC implicit_ipd; /* implicit descriptors */ DMHDESC implicit_apd; DMHDESC implicit_ird; DMHDESC implicit_ard; SQLUINTEGER *fetch_bm_ptr; /* Saved for ODBC3 to ODBC2 mapping */ SQLUINTEGER *row_ct_ptr; /* row count ptr */ SQLUSMALLINT *row_st_arr; /* row status array */ SQLUINTEGER row_array_size; SQLPOINTER valueptr; /* Default buffer for SQLParamData() */ #ifdef HAVE_LIBPTH pth_mutex_t mutex; /* protect the object */ #elif HAVE_LIBPTHREAD pthread_mutex_t mutex; /* protect the object */ #elif HAVE_LIBTHREAD mutex_t mutex; /* protect the object */ #endif } *DMHSTMT; #if defined ( HAVE_LIBPTHREAD ) || defined ( HAVE_LIBTHREAD ) || defined ( HAVE_LIBPTH ) #define TS_LEVEL0 0 /* no implicit protection, only for */ /* dm internal structures */ #define TS_LEVEL1 1 /* protection on a statement level */ #define TS_LEVEL2 2 /* protection on a connection level */ #define TS_LEVEL3 3 /* protection on a environment level */ #endif void mutex_lib_entry( void ); void mutex_lib_exit( void ); void mutex_pool_entry( void ); void mutex_pool_exit( void ); void mutex_iconv_entry( void ); void mutex_iconv_exit( void ); typedef struct connection_pair { char *name; char *value; struct connection_pair *next; } *connection_attribute; /* * defined down here to get the DMHDBC definition */ void __handle_attr_extensions( DMHDBC connection, char *dsn, char *driver_name ); /* * handle allocation functions */ DMHENV __alloc_env( void ); int __validate_env( DMHENV ); void __release_env( DMHENV environment ); DMHDBC __alloc_dbc( void ); int __validate_dbc( DMHDBC ); void __release_dbc( DMHDBC connection ); DMHSTMT __alloc_stmt( void ); int __validate_stmt( DMHSTMT ); void __release_stmt( DMHSTMT ); DMHDESC __alloc_desc( void ); int __validate_desc( DMHDESC ); void __release_desc( DMHDESC ); /* * generic functions */ SQLRETURN __SQLAllocHandle( SQLSMALLINT handle_type, SQLHANDLE input_handle, SQLHANDLE *output_handle, SQLINTEGER requested_version ); SQLRETURN __SQLFreeHandle( SQLSMALLINT handle_type, SQLHANDLE handle ); SQLRETURN __SQLGetInfo( SQLHDBC connection_handle, SQLUSMALLINT info_type, SQLPOINTER info_value, SQLSMALLINT buffer_length, SQLSMALLINT *string_length ); int __connect_part_one( DMHDBC connection, char *driver_lib, char *driver_name, int *warnings ); void __disconnect_part_one( DMHDBC connection ); int __connect_part_two( DMHDBC connection ); void __disconnect_part_two( DMHDBC connection ); void __disconnect_part_three( DMHDBC connection ); void __disconnect_part_four( DMHDBC connection ); DMHDBC __get_dbc_root( void ); DMHSTMT __get_stmt_root( void ); void __check_for_function( DMHDBC connection, SQLUSMALLINT function_id, SQLUSMALLINT *supported ); int __clean_stmt_from_dbc( DMHDBC connection ); int __clean_desc_from_dbc( DMHDBC connection ); void __map_error_state( char * state, int requested_version ); void __map_error_state_w( SQLWCHAR * wstate, int requested_version ); /* * mapping from ODBC 2 <-> 3 datetime types */ #define MAP_SQL_DM2D 0 #define MAP_SQL_D2DM 1 #define MAP_C_DM2D 2 #define MAP_C_D2DM 3 SQLSMALLINT __map_type( int map, DMHDBC connection, SQLSMALLINT type); /* * error functions */ typedef enum error_id { ERROR_01000, ERROR_01004, ERROR_01S02, ERROR_01S06, ERROR_07005, ERROR_07009, ERROR_08002, ERROR_08003, ERROR_24000, ERROR_25000, ERROR_25S01, ERROR_S1000, ERROR_S1003, ERROR_S1010, ERROR_S1011, ERROR_S1107, ERROR_S1108, ERROR_S1C00, ERROR_HY001, ERROR_HY003, ERROR_HY004, ERROR_HY009, ERROR_HY010, ERROR_HY011, ERROR_HY012, ERROR_HY013, ERROR_HY017, ERROR_HY024, ERROR_HY090, ERROR_HY092, ERROR_HY097, ERROR_HY098, ERROR_HY099, ERROR_HY100, ERROR_HY101, ERROR_HY103, ERROR_HY105, ERROR_HY106, ERROR_HY110, ERROR_HY111, ERROR_HYC00, ERROR_IM001, ERROR_IM002, ERROR_IM003, ERROR_IM004, ERROR_IM005, ERROR_IM010, ERROR_IM012, ERROR_SL004, ERROR_SL009, ERROR_SL010, ERROR_SL008 } error_id; #define IGNORE_THREAD (-1) #define function_return(l,h,r) function_return_ex(l,h,r,FALSE) #define SUBCLASS_ODBC 0 #define SUBCLASS_ISO 1 void __post_internal_error( EHEAD *error_handle, error_id, char *txt, int connection_mode ); void __post_internal_error_api( EHEAD *error_handle, error_id, char *txt, int connection_mode, int calling_api ); void __post_internal_error_ex( EHEAD *error_handle, SQLCHAR *sqlstate, SQLINTEGER native_error, SQLCHAR *message_text, int class_origin, int subclass_origin ); void __post_internal_error_ex_w( EHEAD *error_handle, SQLWCHAR *sqlstate, SQLINTEGER native_error, SQLWCHAR *message_text, int class_origin, int subclass_origin ); int function_return_ex( int level, void * handle, int ret_code, int save_to_diag ); void function_entry( void *handle ); void setup_error_head( EHEAD *error_header, void *handle, int handle_type ); void clear_error_head( EHEAD *error_header ); SQLWCHAR *ansi_to_unicode_copy( SQLWCHAR * dest, char *src, SQLINTEGER buffer_len, DMHDBC connection ); SQLWCHAR *ansi_to_unicode_alloc( SQLCHAR *str, SQLINTEGER len, DMHDBC connection ); char *unicode_to_ansi_copy( char* dest, int dest_len, SQLWCHAR *src, SQLINTEGER len, DMHDBC connection ); char *unicode_to_ansi_alloc( SQLWCHAR *str, SQLINTEGER len, DMHDBC connection ); int unicode_setup( DMHDBC connection ); void unicode_shutdown( DMHDBC connection ); char * __get_return_status( SQLRETURN ret, SQLCHAR *buffer ); char * __sql_as_text( SQLINTEGER type ); char * __c_as_text( SQLINTEGER type ); char * __string_with_length( SQLCHAR *out, SQLCHAR *str, SQLINTEGER len ); char * __string_with_length_pass( SQLCHAR *out, SQLCHAR *str, SQLINTEGER len ); char * __string_with_length_hide_pwd( SQLCHAR *out, SQLCHAR *str, SQLINTEGER len ); char * __wstring_with_length( SQLCHAR *out, SQLWCHAR *str, SQLINTEGER len ); char * __wstring_with_length_pass( SQLCHAR *out, SQLWCHAR *str, SQLINTEGER len ); char * __wstring_with_length_hide_pwd( SQLCHAR *out, SQLWCHAR *str, SQLINTEGER len ); SQLWCHAR *wide_strcpy( SQLWCHAR *str1, SQLWCHAR *str2 ); SQLWCHAR *wide_strncpy( SQLWCHAR *str1, SQLWCHAR *str2, int buffer_length ); SQLWCHAR *wide_strcat( SQLWCHAR *str1, SQLWCHAR *str2 ); SQLWCHAR *wide_strdup( SQLWCHAR *str1 ); int wide_strlen( SQLWCHAR *str1 ); int wide_ansi_strncmp( SQLWCHAR *str1, char *str2, int len ); char * __get_pid( SQLCHAR *str ); char * __iptr_as_string( SQLCHAR *s, SQLINTEGER *ptr ); char * __ptr_as_string( SQLCHAR *s, SQLLEN *ptr ); char * __sptr_as_string( SQLCHAR *s, SQLSMALLINT *ptr ); char * __info_as_string( SQLCHAR *s, SQLINTEGER typ ); void __clear_internal_error( struct error *error_handle ); char * __data_as_string( SQLCHAR *s, SQLINTEGER type, SQLLEN *ptr, SQLPOINTER buf ); char * __sdata_as_string( SQLCHAR *s, SQLINTEGER type, SQLSMALLINT *ptr, SQLPOINTER buf ); char * __col_attr_as_string( SQLCHAR *s, SQLINTEGER type ); char * __fid_as_string( SQLCHAR *s, SQLINTEGER fid ); char * __con_attr_as_string( SQLCHAR *s, SQLINTEGER type ); char * __env_attr_as_string( SQLCHAR *s, SQLINTEGER type ); char * __stmt_attr_as_string( SQLCHAR *s, SQLINTEGER type ); char * __desc_attr_as_string( SQLCHAR *s, SQLINTEGER type ); char * __diag_attr_as_string( SQLCHAR *s, SQLINTEGER type ); char * __type_as_string( SQLCHAR *s, SQLSMALLINT type ); DMHDBC __get_connection( EHEAD * head ); DRV_SQLHANDLE __get_driver_handle( EHEAD * head ); int __get_version( EHEAD * head ); /* * These are passed to the cursor lib as helper functions */ struct driver_helper_funcs { void (*__post_internal_error_ex)( EHEAD *error_header, SQLCHAR *sqlstate, SQLINTEGER native_error, SQLCHAR *message_text, int class_origin, int subclass_origin ); void (*__post_internal_error)( EHEAD *error_handle, error_id id, char *txt, int connection_mode ); void (*dm_log_write)( char *function_name, int line, int type, int severity, char *message ); }; /* * thread protection funcs */ #if defined ( HAVE_LIBPTHREAD ) || defined ( HAVE_LIBTHREAD ) || defined ( HAVE_LIBPTH ) void thread_protect( int type, void *handle ); void thread_release( int type, void *handle ); #else #define thread_protect(a,b) #define thread_release(a,b) #endif void dbc_change_thread_support( DMHDBC connection, int level ); #ifdef WITH_HANDLE_REDIRECT void *find_parent_handle( DRV_SQLHANDLE hand, int type ); #endif /* * lookup functions */ char *__find_lib_name( char *dsn, char *lib_name, char *driver_name ); /* * setup the cursor library */ SQLRETURN SQL_API CLConnect( DMHDBC connection, struct driver_helper_funcs * ); /* * connection string functions */ struct con_pair { char *keyword; char *attribute; char *identifier; struct con_pair *next; }; struct con_struct { int count; struct con_pair *list; }; void __generate_connection_string( struct con_struct *con_str, char *str, int str_len ); int __parse_connection_string( struct con_struct *con_str, char *str, int str_len ); int __parse_connection_string_w( struct con_struct *con_str, SQLWCHAR *str, int str_len ); char * __get_attribute_value( struct con_struct * con_str, char * keyword ); void __release_conn( struct con_struct *con_str ); void __get_attr( char ** cp, char ** keyword, char ** value ); struct con_pair * __get_pair( char ** cp ); int __append_pair( struct con_struct *con_str, char *kword, char *value ); /* * the following two are part of a effort to get a particular unicode driver working */ SQLINTEGER map_ca_odbc3_to_2( SQLINTEGER field_identifier ); SQLINTEGER map_ca_odbc2_to_3( SQLINTEGER field_identifier ); /* * check the type passed to SQLBindCol is a valid C_TYPE */ int check_target_type( int c_type ); /* * entry exit functions in drivers */ #define ODBC_INI_FUNCTION "SQLDriverLoad" #define ODBC_FINI_FUNCTION "SQLDriverUnload" /* * driver manager logging functions */ void dm_log_open( char *program_name, char *log_file, int pid_logging ); void dm_log_write( char *function_name, int line, int type, int severity, char *message ); void dm_log_write_diag( char *message ); void dm_log_close( void ); /* * connection pooling functions */ int search_for_pool( DMHDBC connection, SQLCHAR *server_name, SQLSMALLINT name_length1, SQLCHAR *user_name, SQLSMALLINT name_length2, SQLCHAR *authentication, SQLSMALLINT name_length3, SQLCHAR *connect_string, SQLSMALLINT connect_string_length ); void return_to_pool( DMHDBC connection ); /* * Macros to check and call functions in the driver */ #define DM_SQLALLOCCONNECT 0 #define CHECK_SQLALLOCCONNECT(con) (con->functions[0].func!=NULL) #define SQLALLOCCONNECT(con,env,oh)\ (con->functions[0].func)(env,oh) #define DM_SQLALLOCENV 1 #define CHECK_SQLALLOCENV(con) (con->functions[1].func!=NULL) #define SQLALLOCENV(con,oh)\ (con->functions[1].func)(oh) #define DM_SQLALLOCHANDLE 2 #define CHECK_SQLALLOCHANDLE(con) (con->functions[2].func!=NULL) /* * if the function is in the cursor lib, pass a additional * arg that allows the cursor lib to get the dm handle */ #define SQLALLOCHANDLE(con,ht,ih,oh,dmh)\ (con->cl_handle?\ (con->functions[2].func)(ht,ih,oh,dmh):\ (con->functions[2].func)(ht,ih,oh)) #define DM_SQLALLOCSTMT 3 #define CHECK_SQLALLOCSTMT(con) (con->functions[3].func!=NULL) #define SQLALLOCSTMT(con,dbc,oh,dmh)\ (con->cl_handle?\ (con->functions[3].func)(dbc,oh,dmh):\ (con->functions[3].func)(dbc,oh)) #define DM_SQLALLOCHANDLESTD 4 #define DM_SQLBINDCOL 5 #define CHECK_SQLBINDCOL(con) (con->functions[5].func!=NULL) #define SQLBINDCOL(con,stmt,cn,tt,tvp,bl,sli)\ (con->functions[5].func)\ (stmt,cn,tt,tvp,bl,sli) #define DM_SQLBINDPARAM 6 #define CHECK_SQLBINDPARAM(con) (con->functions[6].func!=NULL) #define SQLBINDPARAM(con,stmt,pn,vt,pt,cs,dd,pvp,ind)\ (con->functions[6].func)\ (stmt,pn,vt,pt,cs,dd,pvp,ind) #define DM_SQLBINDPARAMETER 7 #define CHECK_SQLBINDPARAMETER(con) (con->functions[7].func!=NULL) #define SQLBINDPARAMETER(con,stmt,pn,typ,vt,pt,cs,dd,pvp,bl,ind)\ (con->functions[7].func)\ (stmt,pn,typ,vt,pt,cs,dd,pvp,bl,ind) #define DM_SQLBROWSECONNECT 8 #define CHECK_SQLBROWSECONNECT(con) (con->functions[8].func!=NULL) #define SQLBROWSECONNECT(con,dbc,ics,sl1,ocs,bl,sl2)\ (con->functions[8].func)\ (dbc,ics,sl1,ocs,bl,sl2) #define CHECK_SQLBROWSECONNECTW(con) (con->functions[8].funcW!=NULL) #define SQLBROWSECONNECTW(con,dbc,ics,sl1,ocs,bl,sl2)\ (con->functions[8].funcW)\ (dbc,ics,sl1,ocs,bl,sl2) #define DM_SQLBULKOPERATIONS 9 #define CHECK_SQLBULKOPERATIONS(con) (con->functions[9].func!=NULL) #define SQLBULKOPERATIONS(con,stmt,op)\ (con->functions[9].func)(stmt,op) #define DM_SQLCANCEL 10 #define CHECK_SQLCANCEL(con) (con->functions[10].func!=NULL) #define SQLCANCEL(con,stmt)\ (con->functions[10].func)(stmt) #define DM_SQLCLOSECURSOR 11 #define CHECK_SQLCLOSECURSOR(con) (con->functions[11].func!=NULL) #define SQLCLOSECURSOR(con,stmt)\ (con->functions[11].func)(stmt) #define DM_SQLCOLATTRIBUTE 12 #define CHECK_SQLCOLATTRIBUTE(con) (con->functions[12].func!=NULL) #define SQLCOLATTRIBUTE(con,stmt,cn,fi,cap,bl,slp,nap)\ (con->functions[12].func)\ (stmt,cn,fi,cap,bl,slp,nap) #define CHECK_SQLCOLATTRIBUTEW(con) (con->functions[12].funcW!=NULL) #define SQLCOLATTRIBUTEW(con,stmt,cn,fi,cap,bl,slp,nap)\ (con->functions[12].funcW)\ (stmt,cn,fi,cap,bl,slp,nap) #define DM_SQLCOLATTRIBUTES 13 #define CHECK_SQLCOLATTRIBUTES(con) (con->functions[13].func!=NULL) #define SQLCOLATTRIBUTES(con,stmt,cn,fi,cap,bl,slp,nap)\ (con->functions[13].func)\ (stmt,cn,fi,cap,bl,slp,nap) #define CHECK_SQLCOLATTRIBUTESW(con) (con->functions[13].funcW!=NULL) #define SQLCOLATTRIBUTESW(con,stmt,cn,fi,cap,bl,slp,nap)\ (con->functions[13].funcW)\ (stmt,cn,fi,cap,bl,slp,nap) #define DM_SQLCOLUMNPRIVILEGES 14 #define CHECK_SQLCOLUMNPRIVILEGES(con) (con->functions[14].func!=NULL) #define SQLCOLUMNPRIVILEGES(con,stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4)\ (con->functions[14].func)\ (stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4) #define CHECK_SQLCOLUMNPRIVILEGESW(con) (con->functions[14].funcW!=NULL) #define SQLCOLUMNPRIVILEGESW(con,stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4)\ (con->functions[14].funcW)\ (stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4) #define DM_SQLCOLUMNS 15 #define CHECK_SQLCOLUMNS(con) (con->functions[15].func!=NULL) #define SQLCOLUMNS(con,stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4)\ (con->functions[15].func)\ (stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4) #define CHECK_SQLCOLUMNSW(con) (con->functions[15].funcW!=NULL) #define SQLCOLUMNSW(con,stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4)\ (con->functions[15].funcW)\ (stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4) #define DM_SQLCONNECT 16 #define CHECK_SQLCONNECT(con) (con->functions[16].func!=NULL) #define SQLCONNECT(con,dbc,dsn,l1,uid,l2,at,l3)\ (con->functions[16].func)\ (dbc,dsn,l1,uid,l2,at,l3) #define CHECK_SQLCONNECTW(con) (con->functions[16].funcW!=NULL) #define SQLCONNECTW(con,dbc,dsn,l1,uid,l2,at,l3)\ (con->functions[16].funcW)\ (dbc,dsn,l1,uid,l2,at,l3) #define DM_SQLCOPYDESC 17 #define CHECK_SQLCOPYDESC(con) (con->functions[17].func!=NULL) #define SQLCOPYDESC(con,sd,td)\ (con->functions[17].func)(sd,td) #define DM_SQLDATASOURCES 18 #define DM_SQLDESCRIBECOL 19 #define CHECK_SQLDESCRIBECOL(con) (con->functions[19].func!=NULL) #define SQLDESCRIBECOL(con,stmt,cnum,cn,bli,nl,dt,cs,dd,n)\ (con->functions[19].func)\ (stmt,cnum,cn,bli,nl,dt,cs,dd,n) #define CHECK_SQLDESCRIBECOLW(con) (con->functions[19].funcW!=NULL) #define SQLDESCRIBECOLW(con,stmt,cnum,cn,bli,nl,dt,cs,dd,n)\ (con->functions[19].funcW)\ (stmt,cnum,cn,bli,nl,dt,cs,dd,n) #define DM_SQLDESCRIBEPARAM 20 #define CHECK_SQLDESCRIBEPARAM(con) (con->functions[20].func!=NULL) #define SQLDESCRIBEPARAM(con,stmt,pn,dtp,psp,ddp,np)\ (con->functions[20].func)\ (stmt,pn,dtp,psp,ddp,np) #define DM_SQLDISCONNECT 21 #define CHECK_SQLDISCONNECT(con) (con->functions[21].func!=NULL) #define SQLDISCONNECT(con,dbc)\ (con->functions[21].func)(dbc) #define DM_SQLDRIVERCONNECT 22 #define CHECK_SQLDRIVERCONNECT(con) (con->functions[22].func!=NULL) #define SQLDRIVERCONNECT(con,dbc,wh,ics,sl1,ocs,bl,sl2p,dc)\ (con->functions[22].func)\ (dbc,wh,ics,sl1,ocs,bl,sl2p,dc) #define CHECK_SQLDRIVERCONNECTW(con) (con->functions[22].funcW!=NULL) #define SQLDRIVERCONNECTW(con,dbc,wh,ics,sl1,ocs,bl,sl2p,dc)\ (con->functions[22].funcW)\ (dbc,wh,ics,sl1,ocs,bl,sl2p,dc) #define DM_SQLDRIVERS 23 #define DM_SQLENDTRAN 24 #define CHECK_SQLENDTRAN(con) (con->functions[24].func!=NULL) #define SQLENDTRAN(con,ht,h,op)\ (con->functions[24].func)(ht,h,op) #define DM_SQLERROR 25 #define CHECK_SQLERROR(con) (con->functions[25].func!=NULL) #define SQLERROR(con,env,dbc,stmt,st,nat,msg,mm,pcb)\ (con->functions[25].func)\ (env,dbc,stmt,st,nat,msg,mm,pcb) #define CHECK_SQLERRORW(con) (con->functions[25].funcW!=NULL) #define SQLERRORW(con,env,dbc,stmt,st,nat,msg,mm,pcb)\ (con->functions[25].funcW)\ (env,dbc,stmt,st,nat,msg,mm,pcb) #define DM_SQLEXECDIRECT 26 #define CHECK_SQLEXECDIRECT(con) (con->functions[26].func!=NULL) #define SQLEXECDIRECT(con,stmt,sql,len)\ (con->functions[26].func)(stmt,sql,len) #define CHECK_SQLEXECDIRECTW(con) (con->functions[26].funcW!=NULL) #define SQLEXECDIRECTW(con,stmt,sql,len)\ (con->functions[26].funcW)(stmt,sql,len) #define DM_SQLEXECUTE 27 #define CHECK_SQLEXECUTE(con) (con->functions[27].func!=NULL) #define SQLEXECUTE(con,stmt)\ (con->functions[27].func)(stmt) #define DM_SQLEXTENDEDFETCH 28 #define CHECK_SQLEXTENDEDFETCH(con) (con->functions[28].func!=NULL) #define SQLEXTENDEDFETCH(con,stmt,fo,of,rcp,ssa)\ (con->functions[28].func)\ (stmt,fo,of,rcp,ssa) #define DM_FETCH 29 #define CHECK_SQLFETCH(con) (con->functions[29].func!=NULL) #define SQLFETCH(con,stmt)\ (con->functions[29].func)(stmt) #define DM_SQLFETCHSCROLL 30 #define CHECK_SQLFETCHSCROLL(con) (con->functions[30].func!=NULL) #define SQLFETCHSCROLL(con,stmt,or,of)\ (con->functions[30].func)\ (stmt,or,of) #define DM_SQLFOREIGNKEYS 31 #define CHECK_SQLFOREIGNKEYS(con) (con->functions[31].func!=NULL) #define SQLFOREIGNKEYS(con,stmt,cn,nl1,sn,nl2,tn,nl3,fcn,nl4,fsn,nl5,ftn,nl6)\ (con->functions[31].func)\ (stmt,cn,nl1,sn,nl2,tn,nl3,fcn,nl4,fsn,nl5,ftn,nl6) #define CHECK_SQLFOREIGNKEYSW(con) (con->functions[31].funcW!=NULL) #define SQLFOREIGNKEYSW(con,stmt,cn,nl1,sn,nl2,tn,nl3,fcn,nl4,fsn,nl5,ftn,nl6)\ (con->functions[31].funcW)\ (stmt,cn,nl1,sn,nl2,tn,nl3,fcn,nl4,fsn,nl5,ftn,nl6) #define DM_SQLFREEENV 32 #define CHECK_SQLFREEENV(con) (con->functions[32].func!=NULL) #define SQLFREEENV(con,env)\ (con->functions[32].func)(env) #define DM_SQLFREEHANDLE 33 #define CHECK_SQLFREEHANDLE(con) (con->functions[33].func!=NULL) #define SQLFREEHANDLE(con,typ,env)\ (con->functions[33].func)(typ,env) #define DM_SQLFREESTMT 34 #define CHECK_SQLFREESTMT(con) (con->functions[34].func!=NULL) #define SQLFREESTMT(con,stmt,opt)\ (con->functions[34].func)(stmt,opt) #define DM_SQLFREECONNECT 35 #define CHECK_SQLFREECONNECT(con) (con->functions[35].func!=NULL) #define SQLFREECONNECT(con,dbc)\ (con->functions[35].func)(dbc) #define DM_SQLGETCONNECTATTR 36 #define CHECK_SQLGETCONNECTATTR(con) (con->functions[36].func!=NULL) #define SQLGETCONNECTATTR(con,dbc,at,vp,bl,slp)\ (con->functions[36].func)\ (dbc,at,vp,bl,slp) #define CHECK_SQLGETCONNECTATTRW(con) (con->functions[36].funcW!=NULL) #define SQLGETCONNECTATTRW(con,dbc,at,vp,bl,slp)\ (con->functions[36].funcW)\ (dbc,at,vp,bl,slp) #define DM_SQLGETCONNECTOPTION 37 #define CHECK_SQLGETCONNECTOPTION(con) (con->functions[37].func!=NULL) #define SQLGETCONNECTOPTION(con,dbc,at,val)\ (con->functions[37].func)\ (dbc,at,val) #define CHECK_SQLGETCONNECTOPTIONW(con) (con->functions[37].funcW!=NULL) #define SQLGETCONNECTOPTIONW(con,dbc,at,val)\ (con->functions[37].funcW)\ (dbc,at,val) #define DM_SQLGETCURSORNAME 38 #define CHECK_SQLGETCURSORNAME(con) (con->functions[38].func!=NULL) #define SQLGETCURSORNAME(con,stmt,cn,bl,nlp)\ (con->functions[38].func)\ (stmt,cn,bl,nlp) #define CHECK_SQLGETCURSORNAMEW(con) (con->functions[38].funcW!=NULL) #define SQLGETCURSORNAMEW(con,stmt,cn,bl,nlp)\ (con->functions[38].funcW)\ (stmt,cn,bl,nlp) #define DM_SQLGETDATA 39 #define CHECK_SQLGETDATA(con) (con->functions[39].func!=NULL) #define SQLGETDATA(con,stmt,cn,tt,tvp,bl,sli)\ (con->functions[39].func)\ (stmt,cn,tt,tvp,bl,sli) #define DM_SQLGETDESCFIELD 40 #define CHECK_SQLGETDESCFIELD(con) (con->functions[40].func!=NULL) #define SQLGETDESCFIELD(con,des,rn,fi,vp,bl,slp)\ (con->functions[40].func)\ (des,rn,fi,vp,bl,slp) #define CHECK_SQLGETDESCFIELDW(con) (con->functions[40].funcW!=NULL) #define SQLGETDESCFIELDW(con,des,rn,fi,vp,bl,slp)\ (con->functions[40].funcW)\ (des,rn,fi,vp,bl,slp) #define DM_SQLGETDESCREC 41 #define CHECK_SQLGETDESCREC(con) (con->functions[41].func!=NULL) #define SQLGETDESCREC(con,des,rn,n,bl,slp,tp,stp,lp,pp,sp,np)\ (con->functions[41].func)\ (des,rn,n,bl,slp,tp,stp,lp,pp,sp,np) #define CHECK_SQLGETDESCRECW(con) (con->functions[41].funcW!=NULL) #define SQLGETDESCRECW(con,des,rn,n,bl,slp,tp,stp,lp,pp,sp,np)\ (con->functions[41].funcW)\ (des,rn,n,bl,slp,tp,stp,lp,pp,sp,np) #define DM_SQLGETDIAGFIELD 42 #define CHECK_SQLGETDIAGFIELD(con) (con->functions[42].func!=NULL) #define SQLGETDIAGFIELD(con,typ,han,rn,di,dip,bl,slp)\ (con->functions[42].func)\ (typ,han,rn,di,dip,bl,slp) #define CHECK_SQLGETDIAGFIELDW(con) (con->functions[42].funcW!=NULL) #define SQLGETDIAGFIELDW(con,typ,han,rn,di,dip,bl,slp)\ (con->functions[42].funcW)\ (typ,han,rn,di,dip,bl,slp) #define DM_SQLGETENVATTR 43 #define CHECK_SQLGETENVATTR(con) (con->functions[43].func!=NULL) #define SQLGETENVATTR(con,env,attr,val,len,ol)\ (con->functions[43].func)\ (env,attr,val,len,ol) #define DM_SQLGETFUNCTIONS 44 #define CHECK_SQLGETFUNCTIONS(con) (con->functions[44].func!=NULL) #define SQLGETFUNCTIONS(con,dbc,id,ptr)\ (con->functions[44].func)\ (dbc,id,ptr) #define DM_SQLGETINFO 45 #define CHECK_SQLGETINFO(con) (con->functions[45].func!=NULL) #define SQLGETINFO(con,dbc,it,ivo,bl,slp)\ (con->functions[45].func)\ (dbc,it,ivo,bl,slp) #define CHECK_SQLGETINFOW(con) (con->functions[45].funcW!=NULL) #define SQLGETINFOW(con,dbc,it,ivo,bl,slp)\ (con->functions[45].funcW)\ (dbc,it,ivo,bl,slp) #define DM_SQLGETSTMTATTR 46 #define CHECK_SQLGETSTMTATTR(con) (con->functions[46].func!=NULL) #define SQLGETSTMTATTR(con,stmt,at,vp,bl,slp)\ (con->functions[46].func)\ (stmt,at,vp,bl,slp) #define CHECK_SQLGETSTMTATTRW(con) (con->functions[46].funcW!=NULL) #define SQLGETSTMTATTRW(con,stmt,at,vp,bl,slp)\ (con->functions[46].funcW)\ (stmt,at,vp,bl,slp) #define DM_SQLGETSTMTOPTION 47 #define CHECK_SQLGETSTMTOPTION(con) (con->functions[47].func!=NULL) #define SQLGETSTMTOPTION(con,stmt,op,val)\ (con->functions[47].func)\ (stmt,op,val) #define CHECK_SQLGETSTMTOPTIONW(con) (con->functions[47].funcW!=NULL) #define SQLGETSTMTOPTIONW(con,stmt,op,val)\ (con->functions[47].funcW)\ (stmt,op,val) #define DM_SQLGETTYPEINFO 48 #define CHECK_SQLGETTYPEINFO(con) (con->functions[48].func!=NULL) #define SQLGETTYPEINFO(con,stmt,typ)\ (con->functions[48].func)(stmt,typ) #define CHECK_SQLGETTYPEINFOW(con) (con->functions[48].funcW!=NULL) #define SQLGETTYPEINFOW(con,stmt,typ)\ (con->functions[48].funcW)(stmt,typ) #define DM_SQLMORERESULTS 49 #define CHECK_SQLMORERESULTS(con) (con->functions[49].func!=NULL) #define SQLMORERESULTS(con,stmt)\ (con->functions[49].func)(stmt) #define DM_SQLNATIVESQL 50 #define CHECK_SQLNATIVESQL(con) (con->functions[50].func!=NULL) #define SQLNATIVESQL(con,dbc,ist,tl,ost,bl,tlp)\ (con->functions[50].func)\ (dbc,ist,tl,ost,bl,tlp) #define CHECK_SQLNATIVESQLW(con) (con->functions[50].funcW!=NULL) #define SQLNATIVESQLW(con,dbc,ist,tl,ost,bl,tlp)\ (con->functions[50].funcW)\ (dbc,ist,tl,ost,bl,tlp) #define DM_SQLNUMPARAMS 51 #define CHECK_SQLNUMPARAMS(con) (con->functions[51].func!=NULL) #define SQLNUMPARAMS(con,stmt,cnt)\ (con->functions[51].func)(stmt,cnt) #define DM_SQLNUMRESULTCOLS 52 #define CHECK_SQLNUMRESULTCOLS(con) (con->functions[52].func!=NULL) #define SQLNUMRESULTCOLS(con,stmt,cnt)\ (con->functions[52].func)(stmt,cnt) #define DM_SQLPARAMDATA 53 #define CHECK_SQLPARAMDATA(con) (con->functions[53].func!=NULL) #define SQLPARAMDATA(con,stmt,val)\ (con->functions[53].func)(stmt,val) #define DM_SQLPARAMOPTIONS 54 #define CHECK_SQLPARAMOPTIONS(con) (con->functions[54].func!=NULL) #define SQLPARAMOPTIONS(con,stmt,cr,pi)\ (con->functions[54].func)(stmt,cr,pi) #define DM_SQLPREPARE 55 #define CHECK_SQLPREPARE(con) (con->functions[55].func!=NULL) #define SQLPREPARE(con,stmt,sql,len)\ (con->functions[55].func)(stmt,sql,len) #define CHECK_SQLPREPAREW(con) (con->functions[55].funcW!=NULL) #define SQLPREPAREW(con,stmt,sql,len)\ (con->functions[55].funcW)(stmt,sql,len) #define DM_SQLPRIMARYKEYS 56 #define CHECK_SQLPRIMARYKEYS(con) (con->functions[56].func!=NULL) #define SQLPRIMARYKEYS(con,stmt,cn,nl1,sn,nl2,tn,nl3)\ (con->functions[56].func)\ (stmt,cn,nl1,sn,nl2,tn,nl3) #define CHECK_SQLPRIMARYKEYSW(con) (con->functions[56].funcW!=NULL) #define SQLPRIMARYKEYSW(con,stmt,cn,nl1,sn,nl2,tn,nl3)\ (con->functions[56].funcW)\ (stmt,cn,nl1,sn,nl2,tn,nl3) #define DM_SQLPROCEDURECOLUMNS 57 #define CHECK_SQLPROCEDURECOLUMNS(con) (con->functions[57].func!=NULL) #define SQLPROCEDURECOLUMNS(con,stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4)\ (con->functions[57].func)\ (stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4) #define CHECK_SQLPROCEDURECOLUMNSW(con) (con->functions[57].funcW!=NULL) #define SQLPROCEDURECOLUMNSW(con,stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4)\ (con->functions[57].funcW)\ (stmt,cn,nl1,sn,nl2,tn,nl3,col,nl4) #define DM_SQLPROCEDURES 58 #define CHECK_SQLPROCEDURES(con) (con->functions[58].func!=NULL) #define SQLPROCEDURES(con,stmt,cn,nl1,sn,nl2,tn,nl3)\ (con->functions[58].func)\ (stmt,cn,nl1,sn,nl2,tn,nl3) #define CHECK_SQLPROCEDURESW(con) (con->functions[58].funcW!=NULL) #define SQLPROCEDURESW(con,stmt,cn,nl1,sn,nl2,tn,nl3)\ (con->functions[58].funcW)\ (stmt,cn,nl1,sn,nl2,tn,nl3) #define DM_SQLPUTDATA 59 #define CHECK_SQLPUTDATA(con) (con->functions[59].func!=NULL) #define SQLPUTDATA(con,stmt,d,p)\ (con->functions[59].func)(stmt,d,p) #define DM_SQLROWCOUNT 60 #define CHECK_SQLROWCOUNT(con) (con->functions[60].func!=NULL) #define DEF_SQLROWCOUNT(con,stmt,cnt)\ (con->functions[60].func)(stmt,cnt) #define DM_SQLSETCONNECTATTR 61 #define CHECK_SQLSETCONNECTATTR(con) (con->functions[61].func!=NULL) #define SQLSETCONNECTATTR(con,dbc,at,vp,sl)\ (con->functions[61].func)\ (dbc,at,vp,sl) #define CHECK_SQLSETCONNECTATTRW(con) (con->functions[61].funcW!=NULL) #define SQLSETCONNECTATTRW(con,dbc,at,vp,sl)\ (con->functions[61].funcW)\ (dbc,at,vp,sl) #define DM_SQLSETCONNECTOPTION 62 #define CHECK_SQLSETCONNECTOPTION(con) (con->functions[62].func!=NULL) #define SQLSETCONNECTOPTION(con,dbc,op,p)\ (con->functions[62].func)\ (dbc,op,p) #define CHECK_SQLSETCONNECTOPTIONW(con) (con->functions[62].funcW!=NULL) #define SQLSETCONNECTOPTIONW(con,dbc,op,p)\ (con->functions[62].funcW)\ (dbc,op,p) #define DM_SQLSETCURSORNAME 63 #define CHECK_SQLSETCURSORNAME(con) (con->functions[63].func!=NULL) #define SQLSETCURSORNAME(con,stmt,nam,len)\ (con->functions[63].func)(stmt,nam,len) #define CHECK_SQLSETCURSORNAMEW(con) (con->functions[63].funcW!=NULL) #define SQLSETCURSORNAMEW(con,stmt,nam,len)\ (con->functions[63].funcW)(stmt,nam,len) #define DM_SQLSETDESCFIELD 64 #define CHECK_SQLSETDESCFIELD(con) (con->functions[64].func!=NULL) #define SQLSETDESCFIELD(con,des,rn,fi,vp,bl)\ (con->functions[64].func)\ (des,rn,fi,vp,bl) #define CHECK_SQLSETDESCFIELDW(con) (con->functions[64].funcW!=NULL) #define SQLSETDESCFIELDW(con,des,rn,fi,vp,bl)\ (con->functions[64].funcW)\ (des,rn,fi,vp,bl) #define DM_SQLSETDESCREC 65 #define CHECK_SQLSETDESCREC(con) (con->functions[65].func!=NULL) #define SQLSETDESCREC(con,des,rn,t,st,l,p,sc,dp,slp,ip)\ (con->functions[65].func)\ (des,rn,t,st,l,p,sc,dp,slp,ip) #define DM_SQLSETENVATTR 66 #define CHECK_SQLSETENVATTR(con) (con->functions[66].func!=NULL) #define SQLSETENVATTR(con,env,attr,val,len)\ (con->functions[66].func)(env,attr,val,len) #define DM_SQLSETPARAM 67 #define CHECK_SQLSETPARAM(con) (con->functions[67].func!=NULL) #define SQLSETPARAM(con,stmt,pn,vt,pt,lp,ps,pv,sli)\ (con->functions[67].func)\ (stmt,pn,vt,pt,lp,ps,pv,sli) #define DM_SQLSETPOS 68 #define CHECK_SQLSETPOS(con) (con->functions[68].func!=NULL) #define SQLSETPOS(con,stmt,rn,op,lt)\ (con->functions[68].func)\ (stmt,rn,op,lt) #define DM_SQLSETSCROLLOPTIONS 69 #define CHECK_SQLSETSCROLLOPTIONS(con) (con->functions[69].func!=NULL) #define SQLSETSCROLLOPTIONS(con,stmt,fc,cr,rs)\ (con->functions[69].func)\ (stmt,fc,cr,rs) #define DM_SQLSETSTMTATTR 70 #define CHECK_SQLSETSTMTATTR(con) (con->functions[70].func!=NULL) #define SQLSETSTMTATTR(con,stmt,attr,vp,sl)\ (con->functions[70].func)\ (stmt,attr,vp,sl) #define CHECK_SQLSETSTMTATTRW(con) (con->functions[70].funcW!=NULL) #define SQLSETSTMTATTRW(con,stmt,attr,vp,sl)\ (con->functions[70].funcW)\ (stmt,attr,vp,sl) #define DM_SQLSETSTMTOPTION 71 #define CHECK_SQLSETSTMTOPTION(con) (con->functions[71].func!=NULL) #define SQLSETSTMTOPTION(con,stmt,op,val)\ (con->functions[71].func)\ (stmt,op,val) #define CHECK_SQLSETSTMTOPTIONW(con) (con->functions[71].funcW!=NULL) #define SQLSETSTMTOPTIONW(con,stmt,op,val)\ (con->functions[71].funcW)\ (stmt,op,val) #define DM_SQLSPECIALCOLUMNS 72 #define CHECK_SQLSPECIALCOLUMNS(con) (con->functions[72].func!=NULL) #define SQLSPECIALCOLUMNS(con,stmt,it,cn,nl1,sn,nl2,tn,nl3,s,n)\ (con->functions[72].func)\ (stmt,it,cn,nl1,sn,nl2,tn,nl3,s,n) #define CHECK_SQLSPECIALCOLUMNSW(con) (con->functions[72].funcW!=NULL) #define SQLSPECIALCOLUMNSW(con,stmt,it,cn,nl1,sn,nl2,tn,nl3,s,n)\ (con->functions[72].funcW)\ (stmt,it,cn,nl1,sn,nl2,tn,nl3,s,n) #define DM_SQLSTATISTICS 73 #define CHECK_SQLSTATISTICS(con) (con->functions[73].func!=NULL) #define SQLSTATISTICS(con,stmt,cn,nl1,sn,nl2,tn,nl3,un,res)\ (con->functions[73].func)\ (stmt,cn,nl1,sn,nl2,tn,nl3,un,res) #define CHECK_SQLSTATISTICSW(con) (con->functions[73].funcW!=NULL) #define SQLSTATISTICSW(con,stmt,cn,nl1,sn,nl2,tn,nl3,un,res)\ (con->functions[73].funcW)\ (stmt,cn,nl1,sn,nl2,tn,nl3,un,res) #define DM_SQLTABLEPRIVILEGES 74 #define CHECK_SQLTABLEPRIVILEGES(con) (con->functions[74].func!=NULL) #define SQLTABLEPRIVILEGES(con,stmt,cn,nl1,sn,nl2,tn,nl3)\ (con->functions[74].func)\ (stmt,cn,nl1,sn,nl2,tn,nl3) #define CHECK_SQLTABLEPRIVILEGESW(con) (con->functions[74].funcW!=NULL) #define SQLTABLEPRIVILEGESW(con,stmt,cn,nl1,sn,nl2,tn,nl3)\ (con->functions[74].funcW)\ (stmt,cn,nl1,sn,nl2,tn,nl3) #define DM_SQLTABLES 75 #define CHECK_SQLTABLES(con) (con->functions[75].func!=NULL) #define SQLTABLES(con,stmt,cn,nl1,sn,nl2,tn,nl3,tt,nl4)\ (con->functions[75].func)\ (stmt,cn,nl1,sn,nl2,tn,nl3,tt,nl4) #define CHECK_SQLTABLESW(con) (con->functions[75].funcW!=NULL) #define SQLTABLESW(con,stmt,cn,nl1,sn,nl2,tn,nl3,tt,nl4)\ (con->functions[75].funcW)\ (stmt,cn,nl1,sn,nl2,tn,nl3,tt,nl4) #define DM_SQLTRANSACT 76 #define CHECK_SQLTRANSACT(con) (con->functions[76].func!=NULL) #define SQLTRANSACT(con,eh,ch,op)\ (con->functions[76].func)(eh,ch,op) #define DM_SQLGETDIAGREC 77 #define CHECK_SQLGETDIAGREC(con) (con->functions[77].func!=NULL) #define SQLGETDIAGREC(con,typ,han,rn,st,nat,msg,bl,tlp)\ (con->functions[77].func)\ (typ,han,rn,st,nat,msg,bl,tlp) #define CHECK_SQLGETDIAGRECW(con) (con->functions[77].funcW!=NULL) #define SQLGETDIAGRECW(con,typ,han,rn,st,nat,msg,bl,tlp)\ (con->functions[77].funcW)\ (typ,han,rn,st,nat,msg,bl,tlp) #endif unixODBC-2.2.14-p2/DriverManager/DriverManager.exp0100644000076400007640000000470511015234236020172 0ustar nicknickSQLAllocConnect SQLAllocEnv SQLAllocHandle SQLAllocHandleStd SQLAllocStmt SQLBindCol SQLBindParam SQLBindParameter SQLBrowseConnect SQLBrowseConnectW SQLBrowseConnectA SQLBulkOperations SQLCancel SQLCloseCursor SQLColAttribute SQLColAttributeW SQLColAttributeA SQLColAttributes SQLColAttributesW SQLColAttributesA SQLColumnPrivileges SQLColumnPrivilegesW SQLColumnPrivilegesA SQLColumns SQLColumnsW SQLColumnsA SQLConnect SQLConnectW SQLConnectA SQLCopyDesc SQLDataSources SQLDataSourcesW SQLDataSourcesA SQLDescribeCol SQLDescribeColW SQLDescribeColA SQLDescribeParam SQLDisconnect SQLDriverConnect SQLDriverConnectW SQLDriverConnectA SQLDrivers SQLDriversW SQLDriversA SQLEndTran SQLError SQLErrorW SQLErrorA SQLExecDirect SQLExecDirectW SQLExecDirectA SQLExecute SQLExtendedFetch SQLFetch SQLFetchScroll SQLForeignKeys SQLForeignKeysW SQLForeignKeysA SQLFreeConnect SQLFreeEnv SQLFreeHandle SQLFreeStmt SQLGetConnectAttr SQLGetConnectAttrW SQLGetConnectAttrA SQLGetConnectOption SQLGetConnectOptionW SQLGetConnectOptionA SQLGetCursorName SQLGetCursorNameW SQLGetCursorNameA SQLGetData SQLGetDescField SQLGetDescFieldW SQLGetDescFieldA SQLGetDescRec SQLGetDescRecW SQLGetDescRecA SQLGetDiagField SQLGetDiagFieldW SQLGetDiagFieldA SQLGetDiagRec SQLGetDiagRecW SQLGetDiagRecA SQLGetEnvAttr SQLGetFunctions SQLGetInfo SQLGetInfoW SQLGetInfoA SQLGetStmtAttr SQLGetStmtAttrW SQLGetStmtAttrA SQLGetStmtOption SQLGetTypeInfo SQLGetTypeInfoW SQLGetTypeInfoA SQLMoreResults SQLNativeSql SQLNativeSqlW SQLNativeSqlA SQLNumParams SQLNumResultCols SQLParamData SQLParamOptions SQLPrepare SQLPrepareW SQLPrepareA SQLPrimaryKeys SQLPrimaryKeysW SQLPrimaryKeysA SQLProcedureColumns SQLProcedureColumnsW SQLProcedureColumnsA SQLProcedures SQLProceduresW SQLProceduresA SQLPutData SQLRowCount SQLSetConnectAttr SQLSetConnectAttrW SQLSetConnectAttrA SQLSetConnectOption SQLSetConnectOptionW SQLSetConnectOptionA SQLSetCursorName SQLSetCursorNameW SQLSetCursorNameA SQLSetDescField SQLSetDescFieldW SQLSetDescFieldA SQLSetDescRec SQLSetEnvAttr SQLSetParam SQLSetPos SQLSetScrollOptions SQLSetStmtAttr SQLSetStmtAttrW SQLSetStmtAttrA SQLSetStmtOption SQLSetStmtOptionA SQLSetStmtOptionW SQLSpecialColumns SQLSpecialColumnsW SQLSpecialColumnsA SQLStatistics SQLStatisticsW SQLStatisticsA SQLTablePrivileges SQLTablePrivilegesW SQLTablePrivilegesA SQLTables SQLTablesW SQLTablesA SQLTransact ODBCSharedTraceFlag uodbc_open_stats uodbc_close_stats uodbc_get_stats uodbc_stats_error ODBCSetTryWaitValue ODBCGetTryWaitValue unixODBC-2.2.14-p2/DriverManager/__stats.h0100644000076400007640000000564310177654330016546 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: __stats.h,v 1.2 2005/02/01 10:24:24 lurcher Exp $ * * $Log: __stats.h,v $ * Revision 1.2 2005/02/01 10:24:24 lurcher * Cope if SHLIBEXT is not set * * Revision 1.1.1.1 2001/10/17 16:40:09 lurcher * * First upload to SourceForge * * Revision 1.1 2000/12/18 11:53:51 martin * * handle statistic API. * * **********************************************************************/ #ifndef UNIXODBC__STATS_H #define UNIXODBC__STATS_H 1 #include #include #ifdef HAVE_SYS_STAT_H #include #endif typedef struct uodbc_stats_proc { pid_t pid; /* process ID */ long n_env; /* # of henvs */ long n_dbc; /* # of hdbcs */ long n_stmt; /* # of hstmts */ long n_desc; /* # of hdescs */ } uodbc_stats_proc_t; typedef struct uodbc_stats { int n_pid; /* # of PIDs attached */ uodbc_stats_proc_t perpid[20]; } uodbc_stats_t; typedef struct uodbc_stats_handle { char id[5]; /* identifier */ # define UODBC_STATS_ID "UODBC" int sem_id; /* sempahore ID */ int shm_id; /* shared memory ID */ uodbc_stats_t *stats; /* ptr to stats in shared mem */ pid_t pid; } uodbc_stats_handle_t; int uodbc_update_stats(void *rh, unsigned int type, void *value); #define UODBC_STATS_TYPE_TYPE_MASK 0xffff #define UODBC_STATS_TYPE_HENV 1 #define UODBC_STATS_TYPE_HDBC 2 #define UODBC_STATS_TYPE_HSTMT 3 #define UODBC_STATS_TYPE_HDESC 4 #endif /* UNIXODBC__STATS_H */ unixODBC-2.2.14-p2/DriverManager/drivermanager_axp.opt0100644000076400007640000000444007363332151021152 0ustar nicknickCASE_SENSITIVE=YES SYMBOL_VECTOR = (SQLAllocConnect=PROCEDURE,- SQLAllocEnv=PROCEDURE,- SQLAllocHandle=PROCEDURE,- SQLAllocHandleStd=PROCEDURE,- SQLAllocStmt=PROCEDURE,- SQLBindCol=PROCEDURE,- SQLBindParam=PROCEDURE,- SQLBindParameter=PROCEDURE,- SQLBrowseConnect=PROCEDURE,- SQLBulkOperations=PROCEDURE,- SQLCancel=PROCEDURE,- SQLCloseCursor=PROCEDURE,- SQLColAttribute=PROCEDURE,- SQLColAttributes=PROCEDURE,- SQLColumnPrivileges=PROCEDURE,- SQLColumns=PROCEDURE,- SQLConnect=PROCEDURE,- SQLCopyDesc=PROCEDURE,- SQLDataSources=PROCEDURE,- SQLDescribeCol=PROCEDURE,- SQLDescribeParam=PROCEDURE,- SQLDisconnect=PROCEDURE,- SQLDriverConnect=PROCEDURE,- SQLDrivers=PROCEDURE,- SQLEndTran=PROCEDURE,- SQLError=PROCEDURE,- SQLExecDirect=PROCEDURE,- SQLExecute=PROCEDURE,- SQLExtendedFetch=PROCEDURE,- SQLFetch=PROCEDURE,- SQLFetchScroll=PROCEDURE,- SQLForeignKeys=PROCEDURE,- SQLFreeConnect=PROCEDURE,- SQLFreeEnv=PROCEDURE,- SQLFreeHandle=PROCEDURE,- SQLFreeStmt=PROCEDURE,- SQLGetConnectAttr=PROCEDURE,- SQLGetConnectOption=PROCEDURE,- SQLGetCursorName=PROCEDURE,- SQLGetData=PROCEDURE,- SQLGetDescField=PROCEDURE,- SQLGetDescRec=PROCEDURE,- SQLGetDiagField=PROCEDURE,- SQLGetDiagRec=PROCEDURE,- SQLGetEnvAttr=PROCEDURE,- SQLGetFunctions=PROCEDURE,- SQLGetInfo=PROCEDURE,- SQLGetStmtAttr=PROCEDURE,- SQLGetStmtOption=PROCEDURE,- SQLGetTypeInfo=PROCEDURE,- SQLMoreResults=PROCEDURE,- SQLNativeSql=PROCEDURE,- SQLNumParams=PROCEDURE,- SQLNumResultCols=PROCEDURE,- SQLParamData=PROCEDURE,- SQLParamOptions=PROCEDURE,- SQLPrepare=PROCEDURE,- SQLPrimaryKeys=PROCEDURE,- SQLProcedureColumns=PROCEDURE,- SQLProcedures=PROCEDURE,- SQLPutData=PROCEDURE,- SQLRowCount=PROCEDURE,- SQLSetConnectAttr=PROCEDURE,- SQLSetConnectOption=PROCEDURE,- SQLSetCursorName=PROCEDURE,- SQLSetDescField=PROCEDURE,- SQLSetDescRec=PROCEDURE,- SQLSetEnvAttr=PROCEDURE,- SQLSetParam=PROCEDURE,- SQLSetPos=PROCEDURE,- SQLSetScrollOptions=PROCEDURE,- SQLSetStmtAttr=PROCEDURE,- SQLSetStmtOption=PROCEDURE,- SQLSpecialColumns=PROCEDURE,- SQLStatistics=PROCEDURE,- SQLTablePrivileges=PROCEDURE,- SQLTables=PROCEDURE,- SQLTransact=PROCEDURE) unixODBC-2.2.14-p2/odbcinstQ/0040755000076400007640000000000011163161173014126 5ustar nicknickunixODBC-2.2.14-p2/odbcinstQ/README0100644000076400007640000000460110306116555015006 0ustar nicknick+-------------------------------------------------------------+ | unixODBC | | odbcinstQ | +-------------------------------------------------------------+ README --------------------------------------------------------------- Description: This is the Qt plugin for odbcinst. Problem: The ODBC sub-system, as specified by Microsoft, needs to interact with the User on occasion. For example; to admin the data sources or drivers. Unfortunately for unixODBC; it can not commit itself to a specific method to interact with the User. unixODBC must account for a wide variety of methods - any of which the User may be using. For example; console, native X, Qt, KDE, GTK, none, etc Solution: One possible solution is to conditionaly compile support into the sub-system. But there are two important draw-backs to this; 1) the entire system (and all Users) would only be able to use one method to interact with the sub-system and 2) changing the interaction method would require a recompile. A better solution, and the one used here, is to use a plugin system. This library is a plugin. The plugin 'manager' is the standard odbcinst library. Notes: This library is ONLY used by the odbcinst library. For example; the ODBCConfig tool calls SQLManageDataSources() in the odbcinst library and odbcinst will pass the call to a library (such as this one) to resolve the request. This allows all of the User interaction bits to be a plugin and transparent to the caller. Do not use this library directly. WARNING: If an application calls SQLManageDataSources() for Qt then it must be using the same Qt library with which odbcinstQ was built. Also; do not mix threaded and non-threaded versions of the library. If this sounds scary then consider having your application try to execute the ODBCConfig program rather than call SQLManageDataSources(). License: This code is LGPL. Resources: Home - www.unixodbc.org Icons - mostly from RH 9.0 (gnome & KDE) Qt - www.troll.no +-------------------------------------------------------------+ | Peter Harvey | | 26.OCT.01 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/odbcinstQ/Makefile.am0100644000076400007640000001001411032156700016146 0ustar nicknicklibodbcinstQ_la_LDFLAGS = \ -no-undefined \ -version-info 1:0:0 \ -export-dynamic \ -export-symbols @srcdir@/odbcinstQ.exp \ -module if QT if QTWIZARD else lib_LTLIBRARIES = libodbcinstQ.la INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) \ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" -DDEFLIB_PATH=\"@libdir@\" $(LTDLINCL) libodbcinstQ_la_LIBADD = \ $(QT_LDFLAGS) \ $(QT_LIBS) \ $(LIBLTDL) $(LIBADD_DL) \ ../ini/libinilc.la \ ../DriverManager/libodbc.la \ ../odbcinst/libodbcinst.la libodbcinstQ_la_DEPENDENCIES = \ ../ini/libinilc.la \ ../DriverManager/libodbc.la \ ../odbcinst/libodbcinst.la CLEANFILES = \ mCAbout.cpp \ mCCredits.cpp \ mCDriverPrompt.cpp \ mCDrivers.cpp \ mCDSNList.cpp \ mCFileDSN.cpp \ mCFileList.cpp \ mCFileSelector.cpp \ mCODBCConfig.cpp \ mCODBCCreate.cpp \ mCProperties.cpp \ mCPropertiesFrame.cpp \ mCStatDetails.cpp \ mCStatSummary.cpp \ mCStats.cpp \ mCSystemDSN.cpp \ mCTracing.cpp \ mCUserDSN.cpp libodbcinstQ_la_SOURCES = \ CAbout.cpp \ CCredits.cpp \ CDLL.cpp \ CDSNList.cpp \ CDriverPrompt.cpp \ CDrivers.cpp \ CFileDSN.cpp \ CFileList.cpp \ CFileSelector.cpp \ CODBCConfig.cpp \ CODBCCreate.cpp \ CProperties.cpp \ CPropertiesFrame.cpp \ CSplashDialog.cpp \ CStatDetails.cpp \ CStatSummary.cpp \ CStats.cpp \ CSystemDSN.cpp \ CTracing.cpp \ CUserDSN.cpp \ SQLManageDataSources.cpp \ mCAbout.cpp \ mCCredits.cpp \ mCDriverPrompt.cpp \ mCDrivers.cpp \ mCDSNList.cpp \ mCFileDSN.cpp \ mCFileList.cpp \ mCFileSelector.cpp \ mCODBCConfig.cpp \ mCODBCCreate.cpp \ mCProperties.cpp \ mCPropertiesFrame.cpp \ mCStatDetails.cpp \ mCStatSummary.cpp \ mCStats.cpp \ mCSystemDSN.cpp \ mCTracing.cpp \ mCUserDSN.cpp if QT4 mCDSNList.cpp: @srcdir@/CDSNList4.h @MOC@ @srcdir@/CDSNList4.h -o mCDSNList.cpp else mCDSNList.cpp: @srcdir@/CDSNList.h @MOC@ @srcdir@/CDSNList.h -o mCDSNList.cpp endif mCDrivers.cpp: @srcdir@/CDrivers.h @MOC@ @srcdir@/CDrivers.h -o mCDrivers.cpp mCODBCConfig.cpp: @srcdir@/CODBCConfig.h @MOC@ @srcdir@/CODBCConfig.h -o mCODBCConfig.cpp mCODBCCreate.cpp: @srcdir@/CODBCCreate.h @MOC@ @srcdir@/CODBCCreate.h -o mCODBCCreate.cpp mCSystemDSN.cpp: @srcdir@/CSystemDSN.h @MOC@ @srcdir@/CSystemDSN.h -o mCSystemDSN.cpp mCFileDSN.cpp: @srcdir@/CFileDSN.h @MOC@ @srcdir@/CFileDSN.h -o mCFileDSN.cpp mCUserDSN.cpp: @srcdir@/CUserDSN.h @MOC@ @srcdir@/CUserDSN.h -o mCUserDSN.cpp mCTracing.cpp: @srcdir@/CTracing.h @MOC@ @srcdir@/CTracing.h -o mCTracing.cpp mCStats.cpp: @srcdir@/CStats.h @MOC@ @srcdir@/CStats.h -o mCStats.cpp mCStatSummary.cpp: @srcdir@/CStatSummary.h @MOC@ @srcdir@/CStatSummary.h -o mCStatSummary.cpp mCStatDetails.cpp: @srcdir@/CStatDetails.h @MOC@ @srcdir@/CStatDetails.h -o mCStatDetails.cpp mCAbout.cpp: @srcdir@/CAbout.h @MOC@ @srcdir@/CAbout.h -o mCAbout.cpp mCDriverPrompt.cpp: @srcdir@/CDriverPrompt.h @MOC@ @srcdir@/CDriverPrompt.h -o mCDriverPrompt.cpp mCPropertiesFrame.cpp: @srcdir@/CPropertiesFrame.h @MOC@ @srcdir@/CPropertiesFrame.h -o mCPropertiesFrame.cpp mCProperties.cpp: @srcdir@/CProperties.h @MOC@ @srcdir@/CProperties.h -o mCProperties.cpp mCFileSelector.cpp: @srcdir@/CFileSelector.h @MOC@ @srcdir@/CFileSelector.h -o mCFileSelector.cpp mCFileList.cpp: @srcdir@/CFileList.h @MOC@ @srcdir@/CFileList.h -o mCFileList.cpp mCCredits.cpp: @srcdir@/CCredits.h @MOC@ @srcdir@/CCredits.h -o mCCredits.cpp endif endif EXTRA_DIST = \ CAbout.h \ CTracing.h \ CStats.h \ CStatSummary.h \ CSplashDialog.h \ CStatDetails.h \ CDLL.h \ CDSNList.h \ CDSNList4.h \ CFileList.h \ CDriverPrompt.h \ CDrivers.h \ CFileSelector.h \ CODBCConfig.h \ CODBCCreate.h \ CPropertiesFrame.h \ CProperties.h \ CSystemDSN.h \ CFileDSN.h \ CUserDSN.h \ CCredits.h \ Splash.xpm \ ODBC.xpm \ computer.xpm \ driver.xpm \ info.xpm \ checkOk.xpm \ checkCancel.xpm \ person.xpm \ server.xpm \ smallLinuxODBC.xpm \ about.xpm \ dsn-file.xpm \ dsn-system.xpm \ dsn-user.xpm \ stats.xpm \ ODBC.xpm \ Canada.xpm \ GreatBritain.xpm \ trace.xpm \ NoFlag.xpm \ advanced.xpm \ odbcinstQ.exp unixODBC-2.2.14-p2/odbcinstQ/Makefile.in0100644000076400007640000006567011111035264016200 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = odbcinstQ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ INSTALL ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = am__libodbcinstQ_la_SOURCES_DIST = CAbout.cpp CCredits.cpp CDLL.cpp \ CDSNList.cpp CDriverPrompt.cpp CDrivers.cpp CFileDSN.cpp \ CFileList.cpp CFileSelector.cpp CODBCConfig.cpp \ CODBCCreate.cpp CProperties.cpp CPropertiesFrame.cpp \ CSplashDialog.cpp CStatDetails.cpp CStatSummary.cpp CStats.cpp \ CSystemDSN.cpp CTracing.cpp CUserDSN.cpp \ SQLManageDataSources.cpp mCAbout.cpp mCCredits.cpp \ mCDriverPrompt.cpp mCDrivers.cpp mCDSNList.cpp mCFileDSN.cpp \ mCFileList.cpp mCFileSelector.cpp mCODBCConfig.cpp \ mCODBCCreate.cpp mCProperties.cpp mCPropertiesFrame.cpp \ mCStatDetails.cpp mCStatSummary.cpp mCStats.cpp \ mCSystemDSN.cpp mCTracing.cpp mCUserDSN.cpp @QTWIZARD_FALSE@@QT_TRUE@am_libodbcinstQ_la_OBJECTS = CAbout.lo \ @QTWIZARD_FALSE@@QT_TRUE@ CCredits.lo CDLL.lo CDSNList.lo \ @QTWIZARD_FALSE@@QT_TRUE@ CDriverPrompt.lo CDrivers.lo \ @QTWIZARD_FALSE@@QT_TRUE@ CFileDSN.lo CFileList.lo \ @QTWIZARD_FALSE@@QT_TRUE@ CFileSelector.lo CODBCConfig.lo \ @QTWIZARD_FALSE@@QT_TRUE@ CODBCCreate.lo CProperties.lo \ @QTWIZARD_FALSE@@QT_TRUE@ CPropertiesFrame.lo CSplashDialog.lo \ @QTWIZARD_FALSE@@QT_TRUE@ CStatDetails.lo CStatSummary.lo \ @QTWIZARD_FALSE@@QT_TRUE@ CStats.lo CSystemDSN.lo CTracing.lo \ @QTWIZARD_FALSE@@QT_TRUE@ CUserDSN.lo SQLManageDataSources.lo \ @QTWIZARD_FALSE@@QT_TRUE@ mCAbout.lo mCCredits.lo \ @QTWIZARD_FALSE@@QT_TRUE@ mCDriverPrompt.lo mCDrivers.lo \ @QTWIZARD_FALSE@@QT_TRUE@ mCDSNList.lo mCFileDSN.lo \ @QTWIZARD_FALSE@@QT_TRUE@ mCFileList.lo mCFileSelector.lo \ @QTWIZARD_FALSE@@QT_TRUE@ mCODBCConfig.lo mCODBCCreate.lo \ @QTWIZARD_FALSE@@QT_TRUE@ mCProperties.lo mCPropertiesFrame.lo \ @QTWIZARD_FALSE@@QT_TRUE@ mCStatDetails.lo mCStatSummary.lo \ @QTWIZARD_FALSE@@QT_TRUE@ mCStats.lo mCSystemDSN.lo \ @QTWIZARD_FALSE@@QT_TRUE@ mCTracing.lo mCUserDSN.lo libodbcinstQ_la_OBJECTS = $(am_libodbcinstQ_la_OBJECTS) @QTWIZARD_FALSE@@QT_TRUE@am_libodbcinstQ_la_rpath = -rpath $(libdir) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcinstQ_la_SOURCES) DIST_SOURCES = $(am__libodbcinstQ_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ libodbcinstQ_la_LDFLAGS = \ -no-undefined \ -version-info 1:0:0 \ -export-dynamic \ -export-symbols @srcdir@/odbcinstQ.exp \ -module @QTWIZARD_FALSE@@QT_TRUE@lib_LTLIBRARIES = libodbcinstQ.la @QTWIZARD_FALSE@@QT_TRUE@INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) \ @QTWIZARD_FALSE@@QT_TRUE@ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" -DDEFLIB_PATH=\"@libdir@\" $(LTDLINCL) @QTWIZARD_FALSE@@QT_TRUE@libodbcinstQ_la_LIBADD = \ @QTWIZARD_FALSE@@QT_TRUE@ $(QT_LDFLAGS) \ @QTWIZARD_FALSE@@QT_TRUE@ $(QT_LIBS) \ @QTWIZARD_FALSE@@QT_TRUE@ $(LIBLTDL) $(LIBADD_DL) \ @QTWIZARD_FALSE@@QT_TRUE@ ../ini/libinilc.la \ @QTWIZARD_FALSE@@QT_TRUE@ ../DriverManager/libodbc.la \ @QTWIZARD_FALSE@@QT_TRUE@ ../odbcinst/libodbcinst.la @QTWIZARD_FALSE@@QT_TRUE@libodbcinstQ_la_DEPENDENCIES = \ @QTWIZARD_FALSE@@QT_TRUE@ ../ini/libinilc.la \ @QTWIZARD_FALSE@@QT_TRUE@ ../DriverManager/libodbc.la \ @QTWIZARD_FALSE@@QT_TRUE@ ../odbcinst/libodbcinst.la @QTWIZARD_FALSE@@QT_TRUE@CLEANFILES = \ @QTWIZARD_FALSE@@QT_TRUE@ mCAbout.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCCredits.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCDriverPrompt.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCDrivers.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCDSNList.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCFileDSN.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCFileList.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCFileSelector.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCODBCConfig.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCODBCCreate.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCProperties.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCPropertiesFrame.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCStatDetails.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCStatSummary.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCStats.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCSystemDSN.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCTracing.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCUserDSN.cpp @QTWIZARD_FALSE@@QT_TRUE@libodbcinstQ_la_SOURCES = \ @QTWIZARD_FALSE@@QT_TRUE@ CAbout.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CCredits.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CDLL.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CDSNList.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CDriverPrompt.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CDrivers.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CFileDSN.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CFileList.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CFileSelector.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CODBCConfig.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CODBCCreate.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CProperties.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CPropertiesFrame.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CSplashDialog.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CStatDetails.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CStatSummary.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CStats.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CSystemDSN.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CTracing.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ CUserDSN.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ SQLManageDataSources.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCAbout.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCCredits.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCDriverPrompt.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCDrivers.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCDSNList.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCFileDSN.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCFileList.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCFileSelector.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCODBCConfig.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCODBCCreate.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCProperties.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCPropertiesFrame.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCStatDetails.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCStatSummary.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCStats.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCSystemDSN.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCTracing.cpp \ @QTWIZARD_FALSE@@QT_TRUE@ mCUserDSN.cpp EXTRA_DIST = \ CAbout.h \ CTracing.h \ CStats.h \ CStatSummary.h \ CSplashDialog.h \ CStatDetails.h \ CDLL.h \ CDSNList.h \ CDSNList4.h \ CFileList.h \ CDriverPrompt.h \ CDrivers.h \ CFileSelector.h \ CODBCConfig.h \ CODBCCreate.h \ CPropertiesFrame.h \ CProperties.h \ CSystemDSN.h \ CFileDSN.h \ CUserDSN.h \ CCredits.h \ Splash.xpm \ ODBC.xpm \ computer.xpm \ driver.xpm \ info.xpm \ checkOk.xpm \ checkCancel.xpm \ person.xpm \ server.xpm \ smallLinuxODBC.xpm \ about.xpm \ dsn-file.xpm \ dsn-system.xpm \ dsn-user.xpm \ stats.xpm \ ODBC.xpm \ Canada.xpm \ GreatBritain.xpm \ trace.xpm \ NoFlag.xpm \ advanced.xpm \ odbcinstQ.exp all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu odbcinstQ/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu odbcinstQ/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcinstQ.la: $(libodbcinstQ_la_OBJECTS) $(libodbcinstQ_la_DEPENDENCIES) $(CXXLINK) $(am_libodbcinstQ_la_rpath) $(libodbcinstQ_la_LDFLAGS) $(libodbcinstQ_la_OBJECTS) $(libodbcinstQ_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAbout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CCredits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDLL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDSNList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDriverPrompt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDrivers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CFileDSN.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CFileList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CFileSelector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CODBCConfig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CODBCCreate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CPropertiesFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CSplashDialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CStatDetails.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CStatSummary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CStats.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CSystemDSN.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CTracing.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CUserDSN.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLManageDataSources.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCAbout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCCredits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDSNList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDriverPrompt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDrivers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCFileDSN.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCFileList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCFileSelector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCODBCConfig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCODBCCreate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCPropertiesFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCStatDetails.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCStatSummary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCStats.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCSystemDSN.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCTracing.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCUserDSN.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES @QT4_TRUE@@QTWIZARD_FALSE@@QT_TRUE@mCDSNList.cpp: @srcdir@/CDSNList4.h @QT4_TRUE@@QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CDSNList4.h -o mCDSNList.cpp @QT4_FALSE@@QTWIZARD_FALSE@@QT_TRUE@mCDSNList.cpp: @srcdir@/CDSNList.h @QT4_FALSE@@QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CDSNList.h -o mCDSNList.cpp @QTWIZARD_FALSE@@QT_TRUE@mCDrivers.cpp: @srcdir@/CDrivers.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CDrivers.h -o mCDrivers.cpp @QTWIZARD_FALSE@@QT_TRUE@mCODBCConfig.cpp: @srcdir@/CODBCConfig.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CODBCConfig.h -o mCODBCConfig.cpp @QTWIZARD_FALSE@@QT_TRUE@mCODBCCreate.cpp: @srcdir@/CODBCCreate.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CODBCCreate.h -o mCODBCCreate.cpp @QTWIZARD_FALSE@@QT_TRUE@mCSystemDSN.cpp: @srcdir@/CSystemDSN.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CSystemDSN.h -o mCSystemDSN.cpp @QTWIZARD_FALSE@@QT_TRUE@mCFileDSN.cpp: @srcdir@/CFileDSN.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CFileDSN.h -o mCFileDSN.cpp @QTWIZARD_FALSE@@QT_TRUE@mCUserDSN.cpp: @srcdir@/CUserDSN.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CUserDSN.h -o mCUserDSN.cpp @QTWIZARD_FALSE@@QT_TRUE@mCTracing.cpp: @srcdir@/CTracing.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CTracing.h -o mCTracing.cpp @QTWIZARD_FALSE@@QT_TRUE@mCStats.cpp: @srcdir@/CStats.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CStats.h -o mCStats.cpp @QTWIZARD_FALSE@@QT_TRUE@mCStatSummary.cpp: @srcdir@/CStatSummary.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CStatSummary.h -o mCStatSummary.cpp @QTWIZARD_FALSE@@QT_TRUE@mCStatDetails.cpp: @srcdir@/CStatDetails.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CStatDetails.h -o mCStatDetails.cpp @QTWIZARD_FALSE@@QT_TRUE@mCAbout.cpp: @srcdir@/CAbout.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CAbout.h -o mCAbout.cpp @QTWIZARD_FALSE@@QT_TRUE@mCDriverPrompt.cpp: @srcdir@/CDriverPrompt.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CDriverPrompt.h -o mCDriverPrompt.cpp @QTWIZARD_FALSE@@QT_TRUE@mCPropertiesFrame.cpp: @srcdir@/CPropertiesFrame.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CPropertiesFrame.h -o mCPropertiesFrame.cpp @QTWIZARD_FALSE@@QT_TRUE@mCProperties.cpp: @srcdir@/CProperties.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CProperties.h -o mCProperties.cpp @QTWIZARD_FALSE@@QT_TRUE@mCFileSelector.cpp: @srcdir@/CFileSelector.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CFileSelector.h -o mCFileSelector.cpp @QTWIZARD_FALSE@@QT_TRUE@mCFileList.cpp: @srcdir@/CFileList.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CFileList.h -o mCFileList.cpp @QTWIZARD_FALSE@@QT_TRUE@mCCredits.cpp: @srcdir@/CCredits.h @QTWIZARD_FALSE@@QT_TRUE@ @MOC@ @srcdir@/CCredits.h -o mCCredits.cpp # 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: unixODBC-2.2.14-p2/odbcinstQ/INSTALL0100644000076400007640000000263610306116555015165 0ustar nicknick+-------------------------------------------------------------+ | unixODBC | | odbcinstQ | +-------------------------------------------------------------+ INSTALL --------------------------------------------------------------- Requirements: Qt v3/v4 must be installed on your system. Older versions may work also. What To Do: This will get built and installed along with the rest of unixODBC. However; you can do this manually after core unixODBC stuff is installed. Here are the steps to do it. Step 1 # qmake qmake.pro This uses the Qt qmake utility to build a Makefile for your platform. It is easier than the GNU stuff and should work for any machine with Qt on it. You may have to comment/uncomment some lines for the Mac OSX so Mac OSX users should take a look in qmake.pro. Step 2 # make This is the usual make step. This will generate a set of libs called libodbcinstQ.* Step 3 # cp lib* /usr/local/lib Basically you want to put the lib somewhere. You MUST put it where your libodbcinst.so is. +-------------------------------------------------------------+ | Peter Harvey | | 28.OCT.01 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/odbcinstQ/CAbout.cpp0100644000076400007640000003435011032156643016012 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "CAbout.h" #include "about.xpm" /************************************************************* * *************************************************************/ CAboutDiagram::CAboutDiagram( QWidget *pwidgetParent, const char *pszName ) : QWidget( pwidgetParent, pszName ) { // LINES QFrame* qtarch_Frame_12; qtarch_Frame_12 = new QFrame( this, "Frame_12" ); qtarch_Frame_12->setGeometry( 210, 60, 140, 10 ); qtarch_Frame_12->setMinimumSize( 0, 0 ); qtarch_Frame_12->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT qtarch_Frame_12->setFocusPolicy( Qt::NoFocus ); qtarch_Frame_12->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_Frame_12->setFocusPolicy( QWidget::NoFocus ); qtarch_Frame_12->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_Frame_12->setFrameStyle( 36 ); QFrame* qtarch_Frame_8; qtarch_Frame_8 = new QFrame( this, "Frame_8" ); qtarch_Frame_8->setGeometry( 90, 60, 150, 10 ); qtarch_Frame_8->setMinimumSize( 0, 0 ); qtarch_Frame_8->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT qtarch_Frame_8->setFocusPolicy( Qt::NoFocus ); qtarch_Frame_8->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_Frame_8->setFocusPolicy( QWidget::NoFocus ); qtarch_Frame_8->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_Frame_8->setFrameStyle( 36 ); QFrame* qtarch_Frame_9; qtarch_Frame_9 = new QFrame( this, "Frame_9" ); qtarch_Frame_9->setGeometry( 330, 60, 10, 70 ); qtarch_Frame_9->setMinimumSize( 0, 0 ); qtarch_Frame_9->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT qtarch_Frame_9->setFocusPolicy( Qt::NoFocus ); qtarch_Frame_9->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_Frame_9->setFocusPolicy( QWidget::NoFocus ); qtarch_Frame_9->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_Frame_9->setFrameStyle( 37 ); QFrame* qtarch_Frame_7; qtarch_Frame_7 = new QFrame( this, "Frame_7" ); qtarch_Frame_7->setGeometry( 70, 0, 10, 180 ); qtarch_Frame_7->setMinimumSize( 0, 0 ); qtarch_Frame_7->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT qtarch_Frame_7->setFocusPolicy( Qt::NoFocus ); qtarch_Frame_7->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_Frame_7->setFocusPolicy( QWidget::NoFocus ); qtarch_Frame_7->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_Frame_7->setFrameStyle( 37 ); // PARTS BUTTONS QPushButton* qtarch_pbApplication; qtarch_pbApplication = new QPushButton( this, "pbApplication" ); qtarch_pbApplication->setGeometry( 20, 0, 120, 30 ); qtarch_pbApplication->setMinimumSize( 0, 0 ); qtarch_pbApplication->setMaximumSize( 32767, 32767 ); connect( qtarch_pbApplication, SIGNAL(clicked()), SLOT(pbApplication_Clicked()) ); #ifdef QT_V4LAYOUT qtarch_pbApplication->setFocusPolicy( Qt::TabFocus ); qtarch_pbApplication->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_pbApplication->setFocusPolicy( QWidget::TabFocus ); qtarch_pbApplication->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_pbApplication->setText( "Application" ); qtarch_pbApplication->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT qtarch_pbApplication->setAutoResize( FALSE ); #endif QPushButton* qtarch_pbDriverManager; qtarch_pbDriverManager = new QPushButton( this, "pbDriverManager" ); qtarch_pbDriverManager->setGeometry( 20, 50, 120, 30 ); qtarch_pbDriverManager->setMinimumSize( 0, 0 ); qtarch_pbDriverManager->setMaximumSize( 32767, 32767 ); connect( qtarch_pbDriverManager, SIGNAL(clicked()), SLOT(pbDriverManager_Clicked()) ); #ifdef QT_V4LAYOUT qtarch_pbDriverManager->setFocusPolicy( Qt::TabFocus ); qtarch_pbDriverManager->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_pbDriverManager->setFocusPolicy( QWidget::TabFocus ); qtarch_pbDriverManager->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_pbDriverManager->setText( "Driver Manager" ); qtarch_pbDriverManager->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT qtarch_pbDriverManager->setAutoResize( FALSE ); #endif QPushButton* qtarch_pbDriver; qtarch_pbDriver = new QPushButton( this, "pbDriver" ); qtarch_pbDriver->setGeometry( 20, 100, 120, 30 ); qtarch_pbDriver->setMinimumSize( 0, 0 ); qtarch_pbDriver->setMaximumSize( 32767, 32767 ); connect( qtarch_pbDriver, SIGNAL(clicked()), SLOT(pbDriver_Clicked()) ); #ifdef QT_V4LAYOUT qtarch_pbDriver->setFocusPolicy( Qt::TabFocus ); qtarch_pbDriver->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_pbDriver->setFocusPolicy( QWidget::TabFocus ); qtarch_pbDriver->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_pbDriver->setText( "Driver" ); qtarch_pbDriver->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT qtarch_pbDriver->setAutoResize( FALSE ); #endif QPushButton* qtarch_pbDatabase; qtarch_pbDatabase = new QPushButton( this, "pbDatabase" ); qtarch_pbDatabase->setGeometry( 20, 150, 120, 30 ); qtarch_pbDatabase->setMinimumSize( 0, 0 ); qtarch_pbDatabase->setMaximumSize( 32767, 32767 ); connect( qtarch_pbDatabase, SIGNAL(clicked()), SLOT(pbDatabase_Clicked()) ); #ifdef QT_V4LAYOUT qtarch_pbDatabase->setFocusPolicy( Qt::TabFocus ); qtarch_pbDatabase->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_pbDatabase->setFocusPolicy( QWidget::TabFocus ); qtarch_pbDatabase->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_pbDatabase->setText( "Database System" ); qtarch_pbDatabase->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT qtarch_pbDatabase->setAutoResize( FALSE ); #endif QPushButton* qtarch_pbODBC; qtarch_pbODBC = new QPushButton( this, "pbODBC" ); qtarch_pbODBC->setGeometry( 160, 50, 115, 30 ); qtarch_pbODBC->setMinimumSize( 0, 0 ); qtarch_pbODBC->setMaximumSize( 32767, 32767 ); connect( qtarch_pbODBC, SIGNAL(clicked()), SLOT(pbODBC_Clicked()) ); #ifdef QT_V4LAYOUT qtarch_pbODBC->setFocusPolicy( Qt::TabFocus ); qtarch_pbODBC->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_pbODBC->setFocusPolicy( QWidget::TabFocus ); qtarch_pbODBC->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_pbODBC->setText( "odbc.ini" ); qtarch_pbODBC->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT qtarch_pbODBC->setAutoResize( FALSE ); #endif QPushButton* qtarch_pbODBCDrivers; qtarch_pbODBCDrivers = new QPushButton( this, "pbODBCDrivers" ); qtarch_pbODBCDrivers->setGeometry( 290, 100, 115, 30 ); qtarch_pbODBCDrivers->setMinimumSize( 0, 0 ); qtarch_pbODBCDrivers->setMaximumSize( 32767, 32767 ); connect( qtarch_pbODBCDrivers, SIGNAL(clicked()), SLOT(pbODBCDrivers_Clicked()) ); #ifdef QT_V4LAYOUT qtarch_pbODBCDrivers->setFocusPolicy( Qt::TabFocus ); qtarch_pbODBCDrivers->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_pbODBCDrivers->setFocusPolicy( QWidget::TabFocus ); qtarch_pbODBCDrivers->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_pbODBCDrivers->setText( "odbcinst.ini" ); qtarch_pbODBCDrivers->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT qtarch_pbODBCDrivers->setAutoResize( FALSE ); #endif QPushButton* qtarch_pbConfig; qtarch_pbConfig = new QPushButton( this, "pbConfig" ); qtarch_pbConfig->setGeometry( 290, 50, 115, 30 ); qtarch_pbConfig->setMinimumSize( 0, 0 ); qtarch_pbConfig->setMaximumSize( 32767, 32767 ); connect( qtarch_pbConfig, SIGNAL(clicked()), SLOT(pbODBCConfig_Clicked()) ); #ifdef QT_V4LAYOUT qtarch_pbConfig->setFocusPolicy( Qt::TabFocus ); qtarch_pbConfig->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_pbConfig->setFocusPolicy( QWidget::TabFocus ); qtarch_pbConfig->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_pbConfig->setText( "Config" ); qtarch_pbConfig->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT qtarch_pbConfig->setAutoResize( FALSE ); #endif resize( 400,300 ); } CAboutDiagram::~CAboutDiagram() { } void CAboutDiagram::pbODBC_Clicked() { QString qsMsg; qsMsg = "This is the main configuration file for ODBC.\n"; qsMsg += "It contains Data Source configuration. \n"; qsMsg += "It is used by the Driver Manager to determine, from a given Data\n"; qsMsg += "Source Name, such things as the name of the Driver.\n"; qsMsg += "It is a simple text file but is configured using the ODBCConfig tool.\n"; qsMsg += "The User data sources are typically stored in ~/.odbc.ini while the\n"; qsMsg += "System data sources are stored in /etc/odbc.ini\n"; QMessageBox::information( this, "ODBC Config - odbc.ini", qsMsg ); } void CAboutDiagram::pbODBCConfig_Clicked() { QString qsMsg; qsMsg = "This is the program you are using now. This\n"; qsMsg += "program allows the user to easily configure ODBC.\n"; QMessageBox::information( this, "ODBC Config", qsMsg ); } void CAboutDiagram::pbDatabase_Clicked() { QString qsMsg; qsMsg = "Perhaps the most common type of Database System today is an SQL Server. "; qsMsg += "\n\nSQL Servers with Heavy Functionality;"; qsMsg += "\n ADABAS-D"; qsMsg += "\n Empress"; qsMsg += "\n Informix"; qsMsg += "\n Sybase - www.sybase.com"; qsMsg += "\n Oracle - www.oracle.com"; qsMsg += "\n\nSQL Servers with Lite Functionality;"; qsMsg += "\n MiniSQL"; qsMsg += "\n MySQL"; qsMsg += "\n Solid"; qsMsg += "\n\nThe Database System may be running on the local machine or on a "; qsMsg += "remote machine. It may also store its information in a variety of\n"; qsMsg += "ways. This does not matter to an ODBC application because the Driver\n"; qsMsg += "Manager and the Driver provides a consistent interface to the Database System.\n"; QMessageBox::information( this, "ODBC Config - Database System", qsMsg ); } void CAboutDiagram::pbDriverManager_Clicked() { QString qsMsg; qsMsg = "The Driver Manager carries out a number of functions such as;\n"; qsMsg += "1. resolves Data Source Names (via odbcinst lib)\n"; qsMsg += "2. loads any required drivers\n"; qsMsg += "3. calls the drivers exposed functions to communicate with the database\n"; qsMsg += "Some functionality, such as listing all Data Sources, is only present\n"; qsMsg += "in the Driver Manager (or via odbcinst lib).\n"; qsMsg += "\n"; QMessageBox::information( this, "ODBC Config - Driver Manager", qsMsg ); } void CAboutDiagram::pbDriver_Clicked() { QString qsMsg; qsMsg = "The ODBC Drivers contain code specific to a Database\n"; qsMsg += "System and provides a set of callable functions to the\n"; qsMsg += "Driver Manager.\n"; qsMsg += "Drivers may implement some database functionality when it\n"; qsMsg += "is required by ODBC and is not present in the Database System.\n"; qsMsg += "Drivers may also translate data types.\n"; qsMsg += "\n"; qsMsg += "ODBC Drivers can be obtained from the Internet or directly\n"; qsMsg += "from the Database vendor.\n"; qsMsg += "\n"; qsMsg += "Check http://www.unixodbc.org for drivers\n"; QMessageBox::information( this, "ODBC Config - Drivers", qsMsg ); } void CAboutDiagram::pbODBCDrivers_Clicked() { QString qsMsg; qsMsg = "odbcinst.ini contains a list of all installed ODBC\n"; qsMsg += "Drivers. Each entry also contains some information\n"; qsMsg += "about the driver such as the file name(s) of the driver.\n"; qsMsg += "\n"; qsMsg += "An entry should be made when an ODBC driver is installed\n"; qsMsg += "and removed when the driver is uninstalled. This\n"; qsMsg += "can be done using ODBCConfig or the odbcinst command tool.\n"; QMessageBox::information( this, "ODBC Config - odbcinst.ini", qsMsg ); } void CAboutDiagram::pbApplication_Clicked() { QString qsMsg; qsMsg = "The Application communicates with the Driver Manager\n"; qsMsg += "using the standard ODBC calls.\n"; qsMsg += "The Application does not care; where the data is stored,\n"; qsMsg += "how it is stored or even how the system is configured to\n"; qsMsg += "access the data.\n"; qsMsg += "The Application only needs to know the Data Source Name (DSN).\n"; qsMsg += "\n"; qsMsg += "The Application is NOT hard-wired to a particular Database\n"; qsMsg += "System. This allows the user to choose a different Database\n"; qsMsg += "System using the ODBCConfig tool.\n"; QMessageBox::information( this, "ODBC Config - Application", qsMsg ); } /************************************************************* * *************************************************************/ CAbout::CAbout( QWidget *pwidgetParent, const char *pszName ) : QWidget( pwidgetParent, pszName ) { QVBoxLayout * playoutTop; QHBoxLayout * playoutHelp; CAboutDiagram * pdiagram; QFrame * pframeHelp; QLabel * plabelIcon; QLabel * plabelText; QPushButton * ppushbuttonCredits; playoutTop = new QVBoxLayout( this, 5 ); // DIAGRAM pdiagram = new CAboutDiagram( this ); playoutTop->addWidget( pdiagram, 10 ); // HELP - FRAME pframeHelp = new QFrame( this ); pframeHelp->setFrameStyle( QFrame::Box | QFrame::Raised ); playoutTop->addWidget( pframeHelp ); // playoutHelp = new QHBoxLayout( pframeHelp, 5 ); plabelIcon = new QLabel( pframeHelp ); plabelIcon->setPixmap( xpmAbout ); plabelText = new QLabel( pframeHelp ); plabelText->setText( "Open DataBase Connectivity (ODBC) was developed to be an Open and portable standard for accessing data. unixODBC implements this standard for Linux/UNIX.\nhttp://www.unixodbc.org" ); #ifdef QT_V4LAYOUT plabelText->setAlignment( Qt::AlignLeft | Qt::WordBreak ); plabelText->setWordWrap( true ); #else plabelText->setAlignment( AlignLeft | WordBreak ); #endif ppushbuttonCredits = new QPushButton( pframeHelp ); connect( ppushbuttonCredits, SIGNAL(clicked()), SLOT(pbCredits_Clicked()) ); ppushbuttonCredits->setText( "&Credits" ); playoutHelp->addWidget( plabelIcon ); playoutHelp->addWidget( plabelText, 10 ); playoutHelp->addWidget( ppushbuttonCredits ); } CAbout::~CAbout() { } void CAbout::pbCredits_Clicked() { CCredits *pcredits = new CCredits( this ); pcredits->exec(); delete pcredits; } unixODBC-2.2.14-p2/odbcinstQ/CCredits.cpp0100644000076400007640000001634611032156644016343 0ustar nicknick#include "CCredits.h" #include "NoFlag.xpm" #include "Canada.xpm" #include "GreatBritain.xpm" CCredits::CCredits( QWidget* parent, const char* name ) : QDialog( parent, name, true ) { setSizeGripEnabled( true ); // Qt::WStyle_Customize | Qt::WStyle_NormalBorder /*Qt::WStyle_DialogBorder*/ // Qt::WType_Dialog | Qt::WShowModal QGridLayout *layoutTop = new QGridLayout( this, 2, 1 ); layoutTop->setSpacing( 5 ); #ifdef QT_V4LAYOUT #define QListBoxPixmap Q3ListBoxPixmap Q3ListBox *list = new Q3ListBox( this ); #else QListBox *list = new QListBox( this ); #endif setCaption( "unixODBC - Credits" ); new QListBoxPixmap( list, QPixmap( xpmGreatBritain ), QString( "Nick Gorham - Current Project Lead, Driver Manager, gODBCConfig, odbctest, many fixs" ) ); new QListBoxPixmap( list, QPixmap( xpmCanada ), QString( "Peter Harvey - Original Project Lead, support libs, ODBCConfig, DataManager, isql, odbcinst" ) ); new QListBoxPixmap( list, QPixmap( xpmCanada ), QString( "Jon Pounder" ) ); new QListBoxPixmap( list, QPixmap( xpmGreatBritain ), QString( "Martin Evans" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Lars Doelle" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Manush Dodunekov" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Scott Courtney" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Greg Bentz" ) ); new QListBoxPixmap( list, QPixmap( xpmCanada ), QString( "Shandy J. Brown" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Mark Hessling" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Charles Morrison" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Holger Bischoff" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Charles Overbeck" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Murray Todd Williams" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Jim Ziegler" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Thomas Langen" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Nikolai Afanasiev" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Ralf Fassel" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Tim Roepken" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Zoltan Boszormenyi" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Murad Nayal" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Michael Koch" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Dmitriy Yusupov" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Alex Hornby" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Steve Gilbert" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Max Khon" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Jay Q. Cai" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Bill Bouma" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Steffen Dettmer" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Jens Schlegel" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Venu Anuganti" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Tomas Zellerin" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "James Dugal" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Simon Pepping" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Bard Hustveit" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Ola Sundell" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Christian Werner" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Martin Edlman" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Dave Berry" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Holger Schurig" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Martin Ediman" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Jon Kåre Hellan" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Trond Eivind Glomsrød" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Jürgen Pfeifer" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Jason Crummack" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Bojnourdi Kaikavous" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Martin Hobbs" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Gary Bunting" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Patrice Favre" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "John C. Rood" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Martin Lacko" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Mikko Vierula" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Paul Richardson" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Samuel Cote" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Christian Jullien" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Mark Vanderwiel" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Jeff Garzik" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Keith Woodard" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Steven M. Schultz" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Joel W. Reed" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Jay Van Vark" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Rick Flower" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Artiom Morozov" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Bill Medland" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Per I. Mathisen" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Emile Heitor" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "John L Miller" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Brian Harris" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Craig A Berry" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Stefan Radman" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Jay Cai" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Steve Langasek" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "Stuart Coupe" ) ); new QListBoxPixmap( list, QPixmap( xpmNoFlag ), QString( "David Brown" ) ); layoutTop->addWidget( list, 0, 0 ); layoutTop->setRowStretch( 0, 10 ); // QGridLayout *layoutButtons = new QGridLayout( layoutTop, 1, 2 ); layoutButtons->setSpacing( 5 ); layoutButtons->setMargin( 5 ); QPushButton *ppushbuttonOk = new QPushButton( "Ok", this ); layoutButtons->addWidget( ppushbuttonOk, 0, 1 ); layoutButtons->setColStretch( 0, 10 ); connect( ppushbuttonOk, SIGNAL(clicked()), SLOT(accept()) ); resize( 600, 300 ); } CCredits::~CCredits() { } unixODBC-2.2.14-p2/odbcinstQ/CDLL.cpp0100644000076400007640000000164011032156644015350 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include #include #include "CDLL.h" CDLL::CDLL( char *szFileName ) { szError[0] = '\0'; /* * initialize libtool */ lt_dlinit(); hDLL = lt_dlopen( szFileName ); if ( !hDLL ) strncpy( szError, lt_dlerror(), 200 ); } CDLL::~CDLL() { if ( hDLL ) lt_dlclose( hDLL ); } int CDLL::Symbol( HCBDPROC *hProc, char *szSymbol ) { const char *pError; *hProc = (HCBDPROC) lt_dlsym( hDLL, szSymbol ); pError = lt_dlerror(); if ( pError ) { strncpy( szError, pError, 200 ); return 0; } return 1; } unixODBC-2.2.14-p2/odbcinstQ/CDSNList.cpp0100644000076400007640000003267011106772500016221 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifdef QT_V4LAYOUT #include "CDSNList4.h" #else #include "CDSNList.h" #endif #ifdef HAVE_STRNCASECMP #ifdef HAVE_STRINGS #include #endif #ifdef HAVE_STRING #include #endif #else int strncasecmp( char *, char *, int ); #endif #ifdef QT_V4LAYOUT CDSNList::CDSNList( QWidget* parent, const char* name ) : Q3ListView( parent, name ) #else CDSNList::CDSNList( QWidget* parent, const char* name ) : QListView( parent, name ) #endif { resize( 310,230 ); setMinimumSize( 0, 0 ); setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT setFocusPolicy( Qt::TabFocus ); setBackgroundMode( Qt::PaletteBackground ); #else setFocusPolicy( QWidget::TabFocus ); setBackgroundMode( QWidget::PaletteBackground ); #endif setFrameStyle( QFrame::Box | QFrame::Raised ); #ifdef QT_V4LAYOUT setResizePolicy( Q3ScrollView::Manual ); setVScrollBarMode( Q3ScrollView::Auto ); setHScrollBarMode( Q3ScrollView::Auto ); #else setResizePolicy( QScrollView::Manual ); setVScrollBarMode( QScrollView::Auto ); setHScrollBarMode( QScrollView::Auto ); #endif setTreeStepSize( 20 ); setMultiSelection( FALSE ); setAllColumnsShowFocus( TRUE ); setItemMargin( 1 ); setRootIsDecorated( FALSE ); addColumn( "Name", -1 ); #ifdef QT_V4LAYOUT setColumnWidthMode( 0, Q3ListView::Maximum ); #else setColumnWidthMode( 0, QListView::Maximum ); #endif setColumnAlignment( 0, 1 ); addColumn( "Description", -1 ); #ifdef QT_V4LAYOUT setColumnWidthMode( 1, Q3ListView::Maximum ); #else setColumnWidthMode( 1, QListView::Maximum ); #endif setColumnAlignment( 1, 1 ); addColumn( "Driver", -1 ); #ifdef QT_V4LAYOUT setColumnWidthMode( 2, Q3ListView::Maximum ); #else setColumnWidthMode( 2, QListView::Maximum ); #endif setColumnAlignment( 2, 1 ); } CDSNList::~CDSNList() { } void CDSNList::Load( int nSource ) { #ifdef QT_V4LAYOUT Q3ListViewItem *pListViewItem; #else QListViewItem *pListViewItem; #endif QString qsError; DWORD nErrorCode; char szErrorMsg[101]; char szINI[FILENAME_MAX+1]; char szSectionNames[4096]; char szSectionName[INI_MAX_OBJECT_NAME+1]; char szDriver[INI_MAX_PROPERTY_VALUE+1]; char szDescription[INI_MAX_PROPERTY_VALUE+1]; int nElement; clear(); this->nSource = nSource; // GET SECTION NAMES (Data Sources) strcpy( szINI, "odbc.ini" ); memset( szSectionNames, 0, sizeof(szSectionNames) ); SQLSetConfigMode( nSource ); if ( SQLGetPrivateProfileString( NULL, NULL, NULL, szSectionNames, 4090, "odbc.ini" ) >= 0 ) { for ( nElement = 0; iniElement( szSectionNames, '\0', '\0', nElement, szSectionName, INI_MAX_OBJECT_NAME ) == INI_SUCCESS ; nElement++ ) { // GET DRIVER AND DESCRIPTION szDriver[0] = '\0'; szDescription[0] = '\0'; #ifdef PLATFORM64 SQLGetPrivateProfileString( szSectionName, "Driver64", "", szDriver, INI_MAX_PROPERTY_VALUE, "odbc.ini" ); if ( szDriver[ 0 ] == '\0' ) { SQLGetPrivateProfileString( szSectionName, "Driver", "", szDriver, INI_MAX_PROPERTY_VALUE, "odbc.ini" ); } #else SQLGetPrivateProfileString( szSectionName, "Driver", "", szDriver, INI_MAX_PROPERTY_VALUE, "odbc.ini" ); #endif SQLGetPrivateProfileString( szSectionName, "Description", "", szDescription, INI_MAX_PROPERTY_VALUE, "odbc.ini" ); #ifdef QT_V4LAYOUT pListViewItem = new Q3ListViewItem( this, szSectionName, szDescription, szDriver ); #else pListViewItem = new QListViewItem( this, szSectionName, szDescription, szDriver ); #endif } SQLSetConfigMode( ODBC_BOTH_DSN ); } else { SQLSetConfigMode( ODBC_BOTH_DSN ); qsError.sprintf( "Could not load %s", szINI ); QMessageBox::information( this, "ODBC Config", qsError ); while ( SQLInstallerError( 1, &nErrorCode, szErrorMsg, 100, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); } } void CDSNList::Add() { // odbc.ini INFO QString qsDataSourceName = ""; QString qsDataSourceDescription = ""; QString qsDataSourceDriver = ""; // odbcinst.ini INFO QString qsDriverName = ""; QString qsDriverDescription = ""; QString qsDriverFile = ""; QString qsSetupFile = ""; QString qsError = ""; DWORD nErrorCode; char szErrorMsg[101]; char buffer[ 128 ]; CDriverPrompt *pDriverPrompt; CPropertiesFrame *pProperties; HODBCINSTPROPERTY hFirstProperty = NULL; HODBCINSTPROPERTY hCurProperty = NULL; char szINI[FILENAME_MAX+1]; pDriverPrompt = new CDriverPrompt( this ); if ( pDriverPrompt->exec() ) { qsDriverName = pDriverPrompt->qsDriverName; qsDriverDescription = pDriverPrompt->qsDescription; qsDriverFile = pDriverPrompt->qsDriver; qsSetupFile = pDriverPrompt->qsSetup; qsDataSourceDriver = qsDriverName; delete pDriverPrompt; // // can we call SQLConfigDataSource ? // { int mode; if( nSource == ODBC_USER_DSN ) { sprintf( szINI, "~/.odbc.ini" ); mode = ODBC_ADD_DSN; } else { sprintf( szINI, "%s/odbc.ini", odbcinst_system_file_path( buffer )); mode = ODBC_ADD_SYS_DSN; } if ( SQLConfigDataSource(( HWND ) 1, mode, (char*)qsDataSourceDriver.ascii(), "" )) { Load( nSource ); return; } } // GET PROPERTY LIST FROM DRIVER if ( ODBCINSTConstructProperties( (char*)(qsDataSourceDriver.ascii()), &hFirstProperty ) != ODBCINST_SUCCESS ) { qsError.sprintf( "Could not construct a property list for (%s)", qsDataSourceDriver.ascii() ); QMessageBox::information( this, "ODBC Config", qsError ); return; } // ALLOW USER TO EDIT pProperties = new CPropertiesFrame( this, "Properties", hFirstProperty ); pProperties->setCaption( "Data Source Properties (new)" ); if ( pProperties->exec() ) { /* DELETE ENTIRE SECTION IF IT EXISTS (no entry given) */ SQLSetConfigMode( nSource ); if ( SQLWritePrivateProfileString( hFirstProperty->szValue, NULL, NULL, "odbc.ini" ) == FALSE ) { SQLSetConfigMode( ODBC_BOTH_DSN ); delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); qsError.sprintf( "Could not write to (%s)", szINI ); QMessageBox::information( this, "ODBC Config", qsError ); while ( SQLInstallerError( 1, &nErrorCode, szErrorMsg, 100, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); return; } qsDataSourceName = hFirstProperty->szValue; /* ADD ENTRIES; SECTION CREATED ON FIRST CALL */ QString stringName; for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { stringName = hCurProperty->szName; if ( stringName.upper() == "DESCRIPTION" ) qsDataSourceDescription = hCurProperty->szValue; SQLWritePrivateProfileString( hFirstProperty->szValue, hCurProperty->szName, hCurProperty->szValue, "odbc.ini" ); } SQLSetConfigMode( ODBC_BOTH_DSN ); } delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); } else delete pDriverPrompt; // RELOAD (slow but safe) Load( nSource ); } void CDSNList::Edit() { // odbc.ini INFO QString qsDataSourceName = ""; QString qsDataSourceDescription = ""; QString qsDataSourceDriver = ""; // odbcinst.ini INFO QString qsDriverFile = ""; QString qsSetupFile = ""; QString qsError = ""; char buffer[ 128 ]; CPropertiesFrame *pProperties; HODBCINSTPROPERTY hFirstProperty = NULL; HODBCINSTPROPERTY hCurProperty = NULL; #ifdef QT_V4LAYOUT Q3ListViewItem *pListViewItem; #else QListViewItem *pListViewItem; #endif char szEntryNames[4096]; char szProperty[INI_MAX_PROPERTY_NAME+1]; char szValue[INI_MAX_PROPERTY_VALUE+1]; DWORD nErrorCode; char szErrorMsg[101]; char szINI[FILENAME_MAX+1]; int nElement; // HAS THE USER SELECTED SOMETHING pListViewItem = currentItem(); if ( pListViewItem ) { qsDataSourceName = pListViewItem->text( 0 ); qsDataSourceDescription = pListViewItem->text( 1 ); qsDataSourceDriver = pListViewItem->text( 2 ); } else { QMessageBox::information( this, "ODBC Config", "Please select a Data Source from the list first" ); return; } // // can we call SQLConfigDataSource ? // { char attr[ 128 ]; int mode; sprintf( attr, "DSN=%s", ( const char * ) qsDataSourceName ); /* * add extra null */ attr[ strlen( attr ) ] = '\0'; if( nSource == ODBC_USER_DSN ) { sprintf( szINI, "~/.odbc.ini" ); mode = ODBC_CONFIG_DSN; } else { sprintf( szINI, "%s/odbc.ini", odbcinst_system_file_path( buffer )); mode = ODBC_CONFIG_SYS_DSN; } if ( SQLConfigDataSource(( HWND ) 1, mode, qsDataSourceDriver.ascii(), attr )) { SQLSetConfigMode( ODBC_BOTH_DSN ); Load( nSource ); return; } SQLSetConfigMode( ODBC_BOTH_DSN ); } // GET PROPERTY LIST FROM DRIVER if ( ODBCINSTConstructProperties( (char*) qsDataSourceDriver.ascii(), &hFirstProperty ) != ODBCINST_SUCCESS ) { qsError.sprintf( "Could not construct a property list for (%s)", qsDataSourceDriver.ascii() ); QMessageBox::information( this, "ODBC Config", qsError ); while ( SQLInstallerError( 1, &nErrorCode, szErrorMsg, 100, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); return; } // COPY EXISTING VALUES INTO PROPERTIES LIST SQLSetConfigMode( nSource ); ODBCINSTSetProperty( hFirstProperty, "Name", (char*)(qsDataSourceName.latin1()) ); memset( szEntryNames, 0, sizeof( szEntryNames )); SQLGetPrivateProfileString((char*)qsDataSourceName.ascii(), NULL, NULL, szEntryNames, 4090, "odbc.ini" ); // GET ALL ENTRY NAMES FOR THE SELCTED DATA SOURCE for ( nElement = 0; iniElement( szEntryNames, '\0', '\0', nElement, szProperty, 1000 ) == INI_SUCCESS ; nElement++ ) { SQLGetPrivateProfileString((char*) qsDataSourceName.ascii(), szProperty, "", szValue, INI_MAX_PROPERTY_VALUE, szINI ); // GET VALUE FOR EACH ENTRY if ( ODBCINSTSetProperty( hFirstProperty, szProperty, szValue ) == ODBCINST_ERROR ) { ODBCINSTAddProperty( hFirstProperty, szProperty, szValue ); } } SQLSetConfigMode( ODBC_BOTH_DSN ); // ALLOW USER TO EDIT pProperties = new CPropertiesFrame( this, "Properties", hFirstProperty ); pProperties->setCaption( "Data Source Properties (edit)" ); if ( pProperties->exec() ) { SQLSetConfigMode( nSource ); /* DELETE ENTIRE SECTION IF IT EXISTS (given NULL entry) */ if ( SQLWritePrivateProfileString((char*) qsDataSourceName.ascii(), NULL, NULL, "odbc.ini" ) == FALSE ) { SQLSetConfigMode( ODBC_BOTH_DSN ); delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); qsError.sprintf( "Could not write to (%s)", szINI ); QMessageBox::information( this, "ODBC Config", qsError ); while ( SQLInstallerError( 1, &nErrorCode, szErrorMsg, 100, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); return; } qsDataSourceName = hFirstProperty->szValue; /* ADD ENTRIES; SECTION CREATED ON FIRST CALL */ QString stringName; for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { stringName = hCurProperty->szName; if ( stringName.upper() == "DESCRIPTION" ) qsDataSourceDescription = hCurProperty->szValue; SQLWritePrivateProfileString( hFirstProperty->szValue, hCurProperty->szName, hCurProperty->szValue, szINI ); } SQLSetConfigMode( ODBC_BOTH_DSN ); } delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); // RELOAD (slow but safe) Load( nSource ); } void CDSNList::Delete() { #ifdef QT_V4LAYOUT Q3ListViewItem *pListViewItem; #else QListViewItem *pListViewItem; #endif char szINI[FILENAME_MAX+1]; char *pDataSourceName; QString qsError; DWORD nErrorCode; char szErrorMsg[FILENAME_MAX+1]; // GET SELECT DATA SOURCE NAME pListViewItem = currentItem(); if ( pListViewItem ) { pDataSourceName = (char *)pListViewItem->text( 0 ).ascii(); } else { QMessageBox::information( this, "ODBC Config", "Please select a Data Source from the list first" ); return; } // DELETE ENTIRE SECTION IF IT EXISTS (given NULL entry) SQLSetConfigMode( nSource ); if ( SQLWritePrivateProfileString( pDataSourceName, NULL, NULL, szINI ) == FALSE ) { qsError.sprintf( "Could not write property list for (%s)", pDataSourceName ); QMessageBox::information( this, "ODBC Config", qsError ); while ( SQLInstallerError( 1, &nErrorCode, szErrorMsg, FILENAME_MAX, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); } else QMessageBox::information( this, "ODBC Config", "Done!" ); SQLSetConfigMode( ODBC_BOTH_DSN ); // RELOAD (slow but safe) Load( nSource ); } #ifdef QT_V4LAYOUT void CDSNList::DoubleClick( Q3ListViewItem *itm ) #else void CDSNList::DoubleClick( QListViewItem *itm ) #endif { Edit(); } unixODBC-2.2.14-p2/odbcinstQ/CDriverPrompt.cpp0100644000076400007640000001022211032156645017367 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "CDriverPrompt.h" CDriverPrompt::CDriverPrompt( QWidget* parent, const char* name ) : QDialog( parent, name, TRUE ) { setCaption( "Select a Driver..." ); setSizeGripEnabled( true ); qsDriverName = ""; qsDescription = ""; qsDriver = ""; qsSetup = ""; pDrivers = new CDrivers( this, "Drivers" ); pDrivers->setGeometry( 1, 25, 390, 300 ); pDrivers->setMinimumSize( 0, 0 ); pDrivers->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pDrivers->setFocusPolicy( Qt::NoFocus ); pDrivers->setBackgroundMode( Qt::PaletteBackground ); #else pDrivers->setFocusPolicy( QWidget::NoFocus ); pDrivers->setBackgroundMode( QWidget::PaletteBackground ); #endif pDrivers->show(); QLabel* qtarch_Label_10; qtarch_Label_10 = new QLabel( this, "Label_10" ); qtarch_Label_10->setGeometry( 10, 10, 400, 20 ); qtarch_Label_10->setMinimumSize( 0, 0 ); qtarch_Label_10->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT qtarch_Label_10->setFocusPolicy( Qt::NoFocus ); qtarch_Label_10->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_Label_10->setFocusPolicy( QWidget::NoFocus ); qtarch_Label_10->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_Label_10->setText( "Select the DRIVER to use or Add a new one..." ); qtarch_Label_10->setAlignment( 289 ); qtarch_Label_10->setMargin( -1 ); QFrame *fra = new QFrame( this ); fra->setGeometry( 400, 10, 2, 300 ); fra->setFrameStyle( 33 ); QPushButton* qtarch_pbOk; qtarch_pbOk = new QPushButton( this, "pbOk" ); qtarch_pbOk->setGeometry( 420, 230, 100, 30 ); qtarch_pbOk->setMinimumSize( 0, 0 ); qtarch_pbOk->setMaximumSize( 32767, 32767 ); connect( qtarch_pbOk, SIGNAL(clicked()), SLOT(pbOk_Clicked()) ); #ifdef QT_V4LAYOUT qtarch_pbOk->setFocusPolicy( Qt::TabFocus ); qtarch_pbOk->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_pbOk->setFocusPolicy( QWidget::TabFocus ); qtarch_pbOk->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_pbOk->setText( "&Ok" ); qtarch_pbOk->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT qtarch_pbOk->setAutoResize( FALSE ); #endif QPushButton* qtarch_pbCancel; qtarch_pbCancel = new QPushButton( this, "pbCancel" ); qtarch_pbCancel->setGeometry( 420, 270, 100, 30 ); qtarch_pbCancel->setMinimumSize( 0, 0 ); qtarch_pbCancel->setMaximumSize( 32767, 32767 ); connect( qtarch_pbCancel, SIGNAL(clicked()), SLOT(pbCancel_Clicked()) ); #ifdef QT_V4LAYOUT qtarch_pbCancel->setFocusPolicy( Qt::TabFocus ); qtarch_pbCancel->setBackgroundMode( Qt::PaletteBackground ); #else qtarch_pbCancel->setFocusPolicy( QWidget::TabFocus ); qtarch_pbCancel->setBackgroundMode( QWidget::PaletteBackground ); #endif qtarch_pbCancel->setText( "&Cancel" ); qtarch_pbCancel->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT qtarch_pbCancel->setAutoResize( FALSE ); #endif resize( 530,335 ); setMinimumSize( 0, 0 ); setMaximumSize( 32767, 32767 ); } CDriverPrompt::~CDriverPrompt() { } /******************************************** * protected slots ********************************************/ void CDriverPrompt::pbCancel_Clicked() { reject(); } void CDriverPrompt::pbOk_Clicked() { #ifdef QT_V4LAYOUT Q3ListView *pListView; Q3ListViewItem *pListViewItem; #else QListView *pListView; QListViewItem *pListViewItem; #endif pListView = pDrivers->getListView(); pListViewItem = pListView->currentItem(); if ( pListViewItem ) { qsDriverName = pListViewItem->text( 0 ); qsDescription = pListViewItem->text( 1 ); qsDriver = pListViewItem->text( 2 ); qsSetup = pListViewItem->text( 3 ); if ( qsDriverName == "" ) QMessageBox::information( this, "ODBC Config", "Please select a listing which contains a Driver file name" ); else accept(); } else QMessageBox::information( this, "ODBC Config", "Please select a Driver from the list or click Cancel" ); } unixODBC-2.2.14-p2/odbcinstQ/CDrivers.cpp0100644000076400007640000007431611106772612016366 0ustar nicknick/************************************************** * CDrivers * * see CDrivers.h for doco * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "CDrivers.h" #include "driver.xpm" CDrivers::CDrivers( QWidget* parent, const char* name ) : QWidget( parent, name ) { QVBoxLayout *playoutTop = new QVBoxLayout( this, 5 ); QHBoxLayout *playoutMain = new QHBoxLayout( playoutTop ); #ifdef QT_V4LAYOUT lvwDrivers = new Q3ListView( this, "lvwDrivers" ); #else lvwDrivers = new QListView( this, "lvwDrivers" ); #endif lvwDrivers->setGeometry( 10, 10, 270, 190 ); lvwDrivers->setMinimumSize( 50, 50 ); lvwDrivers->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT lvwDrivers->setFocusPolicy( Qt::TabFocus ); lvwDrivers->setBackgroundMode( Qt::PaletteBackground ); #else lvwDrivers->setFocusPolicy( QWidget::TabFocus ); lvwDrivers->setBackgroundMode( QWidget::PaletteBackground ); #endif lvwDrivers->setFrameStyle( QFrame::Box | QFrame::Raised ); #ifdef QT_V4LAYOUT lvwDrivers->setResizePolicy( Q3ScrollView::Manual ); lvwDrivers->setVScrollBarMode( Q3ScrollView::Auto ); lvwDrivers->setHScrollBarMode( Q3ScrollView::Auto ); #else lvwDrivers->setResizePolicy( QScrollView::Manual ); lvwDrivers->setVScrollBarMode( QScrollView::Auto ); lvwDrivers->setHScrollBarMode( QScrollView::Auto ); #endif lvwDrivers->setTreeStepSize( 20 ); lvwDrivers->setMultiSelection( FALSE ); lvwDrivers->setAllColumnsShowFocus( FALSE ); lvwDrivers->setItemMargin( 1 ); lvwDrivers->setRootIsDecorated( FALSE ); lvwDrivers->addColumn( "Name", -1 ); #ifdef QT_V4LAYOUT lvwDrivers->setColumnWidthMode( 0, Q3ListView::Maximum ); #else lvwDrivers->setColumnWidthMode( 0, QListView::Maximum ); #endif lvwDrivers->setColumnAlignment( 0, 1 ); lvwDrivers->addColumn( "Description", -1 ); #ifdef QT_V4LAYOUT lvwDrivers->setColumnWidthMode( 1, Q3ListView::Maximum ); #else lvwDrivers->setColumnWidthMode( 1, QListView::Maximum ); #endif lvwDrivers->setColumnAlignment( 1, 1 ); lvwDrivers->addColumn( "Driver Lib", -1 ); #ifdef QT_V4LAYOUT lvwDrivers->setColumnWidthMode( 2, Q3ListView::Maximum ); #else lvwDrivers->setColumnWidthMode( 2, QListView::Maximum ); #endif lvwDrivers->setColumnAlignment( 2, 1 ); lvwDrivers->addColumn( "Setup Lib", -1 ); #ifdef QT_V4LAYOUT lvwDrivers->setColumnWidthMode( 3, Q3ListView::Maximum ); #else lvwDrivers->setColumnWidthMode( 3, QListView::Maximum ); #endif lvwDrivers->setColumnAlignment( 3, 1 ); playoutMain->addWidget( lvwDrivers, 10 ); QVBoxLayout *playoutButtons = new QVBoxLayout( playoutMain, 5 ); pbAdd = new QPushButton( this, "pbAdd" ); pbAdd->setGeometry( 290, 10, 100, 30 ); pbAdd->setMinimumSize( 0, 0 ); pbAdd->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbAdd->setFocusPolicy( Qt::TabFocus ); pbAdd->setBackgroundMode( Qt::PaletteBackground ); #else pbAdd->setFocusPolicy( QWidget::TabFocus ); pbAdd->setBackgroundMode( QWidget::PaletteBackground ); #endif pbAdd->setText( "A&dd..." ); pbAdd->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbAdd->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbAdd ); pbRemove = new QPushButton( this, "pbRemove" ); pbRemove->setGeometry( 290, 50, 100, 30 ); pbRemove->setMinimumSize( 0, 0 ); pbRemove->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbRemove->setFocusPolicy( Qt::TabFocus ); pbRemove->setBackgroundMode( Qt::PaletteBackground ); #else pbRemove->setFocusPolicy( QWidget::TabFocus ); pbRemove->setBackgroundMode( QWidget::PaletteBackground ); #endif pbRemove->setText( "&Remove" ); pbRemove->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbRemove->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbRemove ); pbConfigure = new QPushButton( this, "pbConfigure" ); pbConfigure->setGeometry( 290, 90, 100, 30 ); pbConfigure->setMinimumSize( 0, 0 ); pbConfigure->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbConfigure->setFocusPolicy( Qt::TabFocus ); pbConfigure->setBackgroundMode( Qt::PaletteBackground ); #else pbConfigure->setFocusPolicy( QWidget::TabFocus ); pbConfigure->setBackgroundMode( QWidget::PaletteBackground ); #endif pbConfigure->setText( "&Configure..." ); pbConfigure->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbConfigure->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbConfigure ); playoutButtons->addStretch( 10 ); QFrame *pframe; pframe = new QFrame( this, "Frame_2" ); pframe->setGeometry( 10, 204, 380, 90 ); pframe->setMinimumSize( 0, 0 ); pframe->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pframe->setFocusPolicy( Qt::NoFocus ); pframe->setBackgroundMode( Qt::PaletteBackground ); #else pframe->setFocusPolicy( QWidget::NoFocus ); pframe->setBackgroundMode( QWidget::PaletteBackground ); #endif pframe->setFrameStyle( QFrame::Box | QFrame::Raised ); playoutTop->addWidget( pframe ); QGridLayout *playoutHelp = new QGridLayout( pframe, 1, 2, 5 ); QLabel* plabel1; plabel1 = new QLabel( pframe, "Label_1" ); plabel1->setMinimumSize( 32, 32 ); // plabel1->setMaximumSize( 32, 32 ); plabel1->setPixmap( xpmDriver ); QLabel* plabel2; plabel2 = new QLabel( pframe, "Label_2" ); plabel2->setMinimumSize( 0, 0 ); plabel2->setMaximumSize( 32767, 32767 ); plabel2->setText( "These drivers facilitate communication between the Driver Manager and the data server. Many ODBC drivers can be downloaded from the Internet while others are obtained from your database vendor. Typically; you must be a root/adminstrator user to add drivers." ); #ifdef QT_V4LAYOUT plabel2->setAlignment( Qt::AlignLeft | Qt::WordBreak ); plabel2->setWordWrap( true ); #else plabel2->setAlignment( AlignLeft | WordBreak ); #endif playoutHelp->addWidget( plabel1, 0, 0 ); playoutHelp->addWidget( plabel2, 0, 1 ); playoutHelp->setColStretch( 1, 10 ); lvwDrivers->setAllColumnsShowFocus( true ); connect( pbAdd, SIGNAL(clicked()), this, SLOT(Add()) ); connect( pbRemove, SIGNAL(clicked()), this, SLOT(Delete()) ); connect( pbConfigure, SIGNAL(clicked()), this, SLOT(Edit()) ); Load(); } CDrivers::~CDrivers() { if ( hIni != NULL ) iniClose( hIni ); } void CDrivers::Add() { QString qsError = ""; char buffer[ 128 ]; CPropertiesFrame *pProperties; HODBCINSTPROPERTY hFirstProperty = NULL; HODBCINSTPROPERTY hCurProperty = NULL; HODBCINSTPROPERTY hLastProperty; char szINI[FILENAME_MAX+1]; sprintf( szINI, "%s/odbcinst.ini", odbcinst_system_file_path( buffer ) ); // SET UP PROPERTIES LIST hFirstProperty = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); memset( hFirstProperty, 0, sizeof(ODBCINSTPROPERTY) ); hFirstProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hFirstProperty->pNext = NULL; hFirstProperty->bRefresh = 0; hFirstProperty->hDLL = NULL; hFirstProperty->pWidget = NULL; hFirstProperty->pszHelp = strdup( ODBC_HELP_DRIVER_NAME ); hFirstProperty->aPromptData = NULL; strncpy( hFirstProperty->szName, "Name", INI_MAX_PROPERTY_NAME ); strcpy( hFirstProperty->szValue, "" ); hLastProperty = hFirstProperty; hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DESC ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "Description", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "" ); /* * Don't have a deflib for 64 bit, the user may not want a driver entry, just a driver64 */ #ifdef PLATFORM64 #undef DEFLIB_PATH #endif hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DRIVER ); strncpy( hLastProperty->szName, "Driver", INI_MAX_PROPERTY_NAME ); #ifdef DEFLIB_PATH strncpy( hLastProperty->szValue, DEFLIB_PATH, INI_MAX_PROPERTY_VALUE ); #else strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); #endif hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DRIVER64 ); strncpy( hLastProperty->szName, "Driver64", INI_MAX_PROPERTY_NAME ); #ifdef DEFLIB_PATH strncpy( hLastProperty->szValue, DEFLIB_PATH, INI_MAX_PROPERTY_VALUE ); #else strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); #endif hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_SETUP ); strncpy( hLastProperty->szName, "Setup", INI_MAX_PROPERTY_NAME ); #ifdef DEFLIB_PATH strncpy( hLastProperty->szValue, DEFLIB_PATH, INI_MAX_PROPERTY_VALUE ); #else strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); #endif hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_SETUP64 ); strncpy( hLastProperty->szName, "Setup64", INI_MAX_PROPERTY_NAME ); #ifdef DEFLIB_PATH strncpy( hLastProperty->szValue, DEFLIB_PATH, INI_MAX_PROPERTY_VALUE ); #else strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); #endif hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_USAGECOUNT ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "UsageCount", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "1" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_CPTIMEOUT ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "CPTimeout", INI_MAX_PROPERTY_NAME ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_CPREUSE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "CPReuse", INI_MAX_PROPERTY_NAME ); // ALLOW USER TO EDIT pProperties = new CPropertiesFrame( this, "Properties", hFirstProperty ); pProperties->setCaption( "Driver Properties (new)" ); if ( pProperties->exec() ) { /* DELETE ENTIRE SECTION IF IT EXISTS (no entry given) */ if ( SQLWritePrivateProfileString( hFirstProperty->szValue, NULL, NULL, szINI ) == FALSE ) { delete pProperties; FreeProperties( &hFirstProperty ); qsError.sprintf( "Could not write to (%s)", szINI ); QMessageBox::information( this, "ODBC Config", qsError ); return; } /* ADD ENTRIES; SECTION CREATED ON FIRST CALL */ for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { SQLWritePrivateProfileString( hFirstProperty->szValue, hCurProperty->szName, hCurProperty->szValue, szINI ); } } delete pProperties; FreeProperties( &hFirstProperty ); // RELOAD (slow but safe) Load(); } void CDrivers::Edit() { QString qsName = ""; QString qsError = ""; char buffer[ 128 ]; CPropertiesFrame *pProperties; HODBCINSTPROPERTY hFirstProperty = NULL; HODBCINSTPROPERTY hCurProperty = NULL; HODBCINSTPROPERTY hLastProperty; char szINI[FILENAME_MAX+1]; #ifdef QT_V4LAYOUT Q3ListViewItem *pListViewItem; #else QListViewItem *pListViewItem; #endif sprintf( szINI, "%s/odbcinst.ini", odbcinst_system_file_path( buffer ) ); // HAS THE USER SELECTED SOMETHING pListViewItem = lvwDrivers->currentItem(); if ( pListViewItem ) qsName = pListViewItem->text( 0 ); else { QMessageBox::information( this, "ODBC Config", "Please select a Driver from the list first." ); return; } // SET UP PROPERTIES LIST STARTING WITH MANDATORY PROPERTIES hFirstProperty = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); memset( hFirstProperty, 0, sizeof(ODBCINSTPROPERTY) ); hFirstProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hFirstProperty->pNext = NULL; hFirstProperty->bRefresh = 0; hFirstProperty->hDLL = NULL; hFirstProperty->pWidget = NULL; hFirstProperty->pszHelp = strdup( ODBC_HELP_DRIVER_NAME ); hFirstProperty->aPromptData = NULL; strncpy( hFirstProperty->szName, "Name", INI_MAX_PROPERTY_NAME ); strcpy( hFirstProperty->szValue, qsName.ascii()); hLastProperty = hFirstProperty; hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DESC ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "Description", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "" ); SQLGetPrivateProfileString((char*) qsName.ascii(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DRIVER ); strncpy( hLastProperty->szName, "Driver", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); SQLGetPrivateProfileString((char*) qsName.ascii(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DRIVER64 ); strncpy( hLastProperty->szName, "Driver64", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); SQLGetPrivateProfileString((char*) qsName.ascii(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_SETUP ); strncpy( hLastProperty->szName, "Setup", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); SQLGetPrivateProfileString((char*) qsName.ascii(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_SETUP64 ); strncpy( hLastProperty->szName, "Setup64", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); SQLGetPrivateProfileString((char*) qsName.ascii(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->aPromptData = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_USAGECOUNT ); strncpy( hLastProperty->szName, "UsageCount", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "1" ); SQLGetPrivateProfileString((char*) qsName.ascii(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_CPTIMEOUT ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "CPTimeout", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "0" ); SQLGetPrivateProfileString((char*) qsName.ascii(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_CPREUSE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "CPReuse", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "0" ); SQLGetPrivateProfileString((char*) qsName.ascii(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); // ACCEPT ANY DRIVER SPECIFIC PROPERTIES THAT HAVE BEEN TYPED IN MANUALLY OR INSTALLED // NOTE: This is a quick enhancement. Much room to optimize this func. { char szDriverName[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szPropertyNameUpper[INI_MAX_PROPERTY_NAME+1]; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; strcpy( szDriverName, qsName.ascii() ); if ( iniOpen( &hIni, szINI, "#;", '[', ']', '=', TRUE ) != INI_ERROR ) { if ( iniObjectSeek( hIni, szDriverName ) == INI_SUCCESS ) { while ( iniPropertyEOL( hIni ) == FALSE ) { iniProperty( hIni, szPropertyName ); iniProperty( hIni, szPropertyNameUpper ); iniToUpper( szPropertyNameUpper ); if ( strncmp( szPropertyNameUpper, "NAME", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "DESCRIPTION", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "DRIVER", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "DRIVER64", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "SETUP", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "SETUP64", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "CPTIMEOUT", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "CPREUSE", INI_MAX_PROPERTY_NAME ) != 0 && // strncmp( szPropertyNameUpper, "DONTDLCLOSE", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "USAGECOUNT", INI_MAX_PROPERTY_NAME ) != 0 ) { iniValue( hIni, szPropertyValue ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_UNKNOWN ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, szPropertyName, INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, szPropertyValue, sizeof(hLastProperty->szValue)-1 ); } iniPropertyNext( hIni ); } } } } // ALLOW USER TO EDIT pProperties = new CPropertiesFrame( this, "Properties", hFirstProperty ); pProperties->setCaption( "Driver Properties (edit)" ); if ( pProperties->exec() ) { /* DELETE ENTIRE SECTION IF IT EXISTS (no entry given) */ if ( SQLWritePrivateProfileString((char*) qsName.ascii(), NULL, NULL, szINI ) == FALSE ) { delete pProperties; FreeProperties( &hFirstProperty ); qsError.sprintf( "Could not write to (%s)", szINI ); QMessageBox::information( this, "ODBC Config", qsError ); return; } /* ADD ENTRIES; SECTION CREATED ON FIRST CALL */ for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { SQLWritePrivateProfileString( hFirstProperty->szValue, hCurProperty->szName, hCurProperty->szValue, szINI ); } } delete pProperties; FreeProperties( &hFirstProperty ); // RELOAD (slow but safe) Load(); } void CDrivers::Delete() { #ifdef QT_V4LAYOUT Q3ListViewItem *pListViewItem; #else QListViewItem *pListViewItem; #endif char szINI[FILENAME_MAX+1]; char *pszName; QString qsError; DWORD nErrorCode; char szErrorMsg[FILENAME_MAX+1]; char buffer[ 128 ]; sprintf( szINI, "%s/odbcinst.ini", odbcinst_system_file_path( buffer ) ); // GET SELECT DATA SOURCE NAME pListViewItem = lvwDrivers->currentItem(); if ( pListViewItem ) { pszName = (char *)pListViewItem->text( 0 ).ascii(); } else { QMessageBox::information( this, "ODBC Config", "Please select a Driver from the list first" ); return; } // DELETE ENTIRE SECTION IF IT EXISTS (given NULL entry) if ( SQLWritePrivateProfileString( pszName, NULL, NULL, szINI ) == FALSE ) { qsError.sprintf( "Could not write property list for (%s)", pszName ); QMessageBox::information( this, "ODBC Config", qsError ); while ( SQLInstallerError( 1, &nErrorCode, szErrorMsg, FILENAME_MAX, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); } // RELOAD (slow but safe) Load(); } void CDrivers::Load() { lvwDrivers->clear(); /*************************************** * METHOD 1 - Using Driver Manager ***************************************/ /*************************************** * METHOD 2 - Using ODBCINST lib (also see SQLGetInstalledDrivers) ***************************************/ /* QListViewItem *pListViewItem; QString qsError; DWORD nErrorCode; char szErrorMsg[101]; char szINI[FILENAME_MAX+1]; char szSectionNames[4096]; char szSectionName[INI_MAX_OBJECT_NAME+1]; int nElement; char szDriverName[INI_MAX_OBJECT_NAME+1]; char szDescription[INI_MAX_PROPERTY_VALUE+1]; char szDriver[INI_MAX_PROPERTY_VALUE+1]; char szSetup[INI_MAX_PROPERTY_VALUE+1]; sprintf( szINI, "%s/odbcinst.ini", odbcinst_system_file_path() ); memset( szSectionNames, 0, sizeof(szSectionNames) ); if ( SQLGetPrivateProfileString( NULL, NULL, NULL, szSectionNames, 4090, szINI ) >= 0 ) { for ( nElement = 0; iniElement( szSectionNames, '\0', '\0', nElement, szSectionName, INI_MAX_OBJECT_NAME ) == INI_SUCCESS ; nElement++ ) { szDriverName[0] = '\0'; szDescription[0] = '\0'; szDriver[0] = '\0'; szSetup[0] = '\0'; SQLGetPrivateProfileString( szSectionName, "Driver", "", szDriverName, INI_MAX_PROPERTY_VALUE, szINI ); SQLGetPrivateProfileString( szSectionName, "Description", "", szDescription, INI_MAX_PROPERTY_VALUE, szINI ); SQLGetPrivateProfileString( szSectionName, "Driver", "", szDriver, INI_MAX_PROPERTY_VALUE, szINI ); SQLGetPrivateProfileString( szSectionName, "Setup", "", szSetup, INI_MAX_PROPERTY_VALUE, szINI ); pListViewItem = new QListViewItem( lvwDrivers, szDriverName, szDescription, szDriver, szSetup ); } } else { qsError.sprintf( "Could not load %s", szINI ); QMessageBox::information( this, "ODBC Config", qsError ); while ( SQLInstallerError( 1, &nErrorCode, szErrorMsg, 100, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); } */ /*************************************** * METHOD 3 - Using INI lib ***************************************/ char szDriverName[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szDescription[INI_MAX_PROPERTY_VALUE+1]; char szDriver[INI_MAX_PROPERTY_VALUE+1]; char szDriver64[INI_MAX_PROPERTY_VALUE+1]; char szSetup[INI_MAX_PROPERTY_VALUE+1]; char szSetup64[INI_MAX_PROPERTY_VALUE+1]; #ifdef QT_V4LAYOUT Q3ListViewItem *pListViewItem; #else QListViewItem *pListViewItem; #endif QString qsError; char buffer[ 128 ]; sprintf( szINI, "%s/odbcinst.ini", odbcinst_system_file_path( buffer )); if ( iniOpen( &hIni, szINI, "#;", '[', ']', '=', TRUE ) != INI_ERROR ) { iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { szDriverName[0] = '\0'; szDescription[0] = '\0'; szDriver[0] = '\0'; szDriver64[0] = '\0'; szSetup64[0] = '\0'; szSetup[0] = '\0'; iniObject( hIni, szDriverName ); iniPropertyFirst( hIni ); if ( strcmp( szDriverName, "ODBC" ) == 0 ) { iniObjectNext( hIni ); continue; } while ( iniPropertyEOL( hIni ) == FALSE ) { iniProperty( hIni, szPropertyName ); iniToUpper( szPropertyName ); if ( strncmp( szPropertyName, "DESCRIPTION", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDescription ); #ifdef PLATFORM64 if ( strncmp( szPropertyName, "DRIVER64", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDriver64 ); if ( strncmp( szPropertyName, "DRIVER", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDriver ); if ( strncmp( szPropertyName, "SETUP64", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szSetup64 ); if ( strncmp( szPropertyName, "SETUP", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szSetup ); #else if ( strncmp( szPropertyName, "DRIVER", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDriver ); if ( strncmp( szPropertyName, "SETUP", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szSetup ); #endif iniPropertyNext( hIni ); } #ifdef PLATFORM64 if ( szDriver64[ 0 ] != '\0' ) { strcpy( szDriver, szDriver64 ); } if ( szSetup64[ 0 ] != '\0' ) { strcpy( szSetup, szSetup64 ); } #endif #ifdef QT_V4LAYOUT pListViewItem = new Q3ListViewItem( lvwDrivers, szDriverName, szDescription, szDriver, szSetup ); #else pListViewItem = new QListViewItem( lvwDrivers, szDriverName, szDescription, szDriver, szSetup ); #endif iniObjectNext( hIni ); } } else { qsError.sprintf( "Could not open system file at %s", szINI ); QMessageBox::information( this, "ODBC Config", qsError ); } } void CDrivers::FreeProperties( HODBCINSTPROPERTY *hFirstProperty ) { HODBCINSTPROPERTY hNextProperty; HODBCINSTPROPERTY hCurProperty; /* SANITY CHECKS */ if ( (*hFirstProperty) == NULL ) return; /* FREE MEMORY */ for ( hCurProperty = (*hFirstProperty); hCurProperty != NULL; hCurProperty = hNextProperty ) { hNextProperty = hCurProperty->pNext; /* FREE ANY PROMPT DATA (ie pick list options and such) */ if ( hCurProperty->aPromptData != NULL ) free( hCurProperty->aPromptData ); /* FREE OTHER STUFF */ if ( hCurProperty->pszHelp != NULL ) free( hCurProperty->pszHelp ); free( hCurProperty ); } (*hFirstProperty) = NULL; } unixODBC-2.2.14-p2/odbcinstQ/CFileDSN.cpp0100644000076400007640000001345511106772640016172 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com * Nick Gorham - nick@easysoft.com **************************************************/ #include "CFileDSN.h" #include "dsn-file.xpm" void CFileDSN::NewDir() { QString dir; path = pFileList->GetDir(); dir = "Current Path : " + path; dirlab->setText( dir ); SQLWritePrivateProfileString( "ODBC", "FileDSNPath", (char*)path.ascii(), "odbcinst.ini" ); } CFileDSN::CFileDSN( QWidget* parent, const char* name, QString *cwd ) : QWidget( parent, name ) { QVBoxLayout *playoutTop = new QVBoxLayout( this, 5 ); QHBoxLayout *playoutMain = new QHBoxLayout( playoutTop ); QVBoxLayout *playoutLeft = new QVBoxLayout( playoutMain, 5 ); QHBoxLayout *playoutHead = new QHBoxLayout( playoutLeft, 3 ); char buffer[ 128 ]; if ( !cwd ) { char szFilePath[ 256 ]; char szFileName[ 256 ]; sprintf( szFileName, "%s/ODBCDataSources", odbcinst_system_file_path( buffer )); SQLGetPrivateProfileString( "ODBC", "FileDSNPath", szFileName, szFilePath, sizeof( szFilePath ), "odbcinst.ini" ); path.sprintf( "%s", szFilePath ); } else { path = *cwd; } QString dir; dir = "Current Path : " + path; dirlab=new QLabel( dir, this, "cdir" ); dirlab->setGeometry( 10, 10, 300, 20 ); // dirlab->setMaximumSize( 290, 20 ); pFileList = new CFileList( this, "pFileList" ); pFileList->setGeometry( 10, 60, 270, 190 ); pFileList->setMinimumSize( 50, 50 ); pFileList->setMaximumSize( 32767, 32767 ); playoutHead->addWidget( dirlab, 10 ); #ifdef QT_V4LAYOUT dirlab->setAlignment( Qt::AlignLeft ); #else dirlab->setAlignment( AlignLeft ); #endif playoutLeft->addWidget( pFileList, 10 ); pbDir = new QPushButton( this, "pbDir" ); pbDir->setGeometry( 10, 10, 100, 35 ); pbDir->setMinimumSize( 0, 0 ); pbDir->setMaximumSize( 90, 400 ); #ifdef QT_V4LAYOUT pbDir->setFocusPolicy( Qt::TabFocus ); pbDir->setBackgroundMode( Qt::PaletteBackground ); #else pbDir->setFocusPolicy( QWidget::TabFocus ); pbDir->setBackgroundMode( QWidget::PaletteBackground ); #endif pbDir->setText( "&Set Dir..." ); pbDir->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbDir->setAutoResize( FALSE ); #endif playoutHead->addWidget( pbDir, 10 ); QVBoxLayout *playoutButtons = new QVBoxLayout( playoutMain, 5 ); pbAdd = new QPushButton( this, "pbAdd" ); pbAdd->setGeometry( 290, 10, 100, 30 ); pbAdd->setMinimumSize( 0, 0 ); pbAdd->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbAdd->setFocusPolicy( Qt::TabFocus ); pbAdd->setBackgroundMode( Qt::PaletteBackground ); #else pbAdd->setFocusPolicy( QWidget::TabFocus ); pbAdd->setBackgroundMode( QWidget::PaletteBackground ); #endif pbAdd->setText( "A&dd..." ); pbAdd->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbAdd->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbAdd ); pbRemove = new QPushButton( this, "pbRemove" ); pbRemove->setGeometry( 290, 50, 100, 30 ); pbRemove->setMinimumSize( 0, 0 ); pbRemove->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbRemove->setFocusPolicy( Qt::TabFocus ); pbRemove->setBackgroundMode( Qt::PaletteBackground ); #else pbRemove->setFocusPolicy( QWidget::TabFocus ); pbRemove->setBackgroundMode( QWidget::PaletteBackground ); #endif pbRemove->setText( "&Remove" ); pbRemove->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbRemove->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbRemove ); pbConfigure = new QPushButton( this, "pbConfigure" ); pbConfigure->setGeometry( 290, 90, 100, 30 ); pbConfigure->setMinimumSize( 0, 0 ); pbConfigure->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbConfigure->setFocusPolicy( Qt::TabFocus ); pbConfigure->setBackgroundMode( Qt::PaletteBackground ); #else pbConfigure->setFocusPolicy( QWidget::TabFocus ); pbConfigure->setBackgroundMode( QWidget::PaletteBackground ); #endif pbConfigure->setText( "&Configure..." ); pbConfigure->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbConfigure->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbConfigure ); playoutButtons->addStretch( 10 ); QFrame *pframe; pframe = new QFrame( this, "Frame_2" ); pframe->setGeometry( 10, 210, 380, 80 ); pframe->setMinimumSize( 0, 0 ); pframe->setMaximumSize( 32767, 32767 ); pframe->setFrameStyle( QFrame::Box | QFrame::Raised ); playoutTop->addWidget( pframe ); QGridLayout *playoutHelp = new QGridLayout( pframe, 1, 2, 5 ); QLabel* plabel1; plabel1 = new QLabel( pframe, "Label_1" ); plabel1->setMinimumSize( 32, 32 ); // plabel1->setMaximumSize( 32, 32 ); plabel1->setPixmap( xpmDSN_File ); QLabel* plabel2; plabel2 = new QLabel( pframe, "Label_2" ); plabel2->setMinimumSize( 0, 0 ); plabel2->setMaximumSize( 32767, 32767 ); plabel2->setText( "An ODBC File data source can be stored on a file server to be shared among many users on a network. All users should have required drivers installed on their machine." ); #ifdef QT_V4LAYOUT plabel2->setAlignment( Qt::AlignLeft | Qt::WordBreak ); plabel2->setWordWrap( true ); #else plabel2->setAlignment( AlignLeft | WordBreak ); #endif playoutHelp->addWidget( plabel1, 0, 0 ); playoutHelp->addWidget( plabel2, 0, 1 ); playoutHelp->setColStretch( 1, 10 ); pFileList->Load( &path ); connect( pbDir, SIGNAL(clicked()), pFileList, SLOT(NewDir()) ); connect( pbDir, SIGNAL(clicked()), SLOT(NewDir()) ); connect( pbAdd, SIGNAL(clicked()), pFileList, SLOT(Add()) ); connect( pbRemove, SIGNAL(clicked()), pFileList, SLOT(Delete()) ); connect( pbConfigure, SIGNAL(clicked()), pFileList, SLOT(Edit()) ); } CFileDSN::~CFileDSN() { } unixODBC-2.2.14-p2/odbcinstQ/CFileList.cpp0100644000076400007640000003226711032156647016464 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com * Nick Gorham - nick@easysoft.com **************************************************/ #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #else #include #endif #include "CFileList.h" #ifdef HAVE_STRNCASECMP #ifdef HAVE_STRINGS #include #endif #ifdef HAVE_STRING #include #endif #else int strncasecmp( char *, char *, int ); #endif extern int has_started; #ifdef QT_V4LAYOUT CFileList::CFileList( QWidget* parent, const char* name ) : Q3ListView( parent, name ) #else CFileList::CFileList( QWidget* parent, const char* name ) : QListView( parent, name ) #endif { resize( 310,230 ); setMinimumSize( 0, 0 ); setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT setFocusPolicy( Qt::TabFocus ); setBackgroundMode( Qt::PaletteBackground ); #else setFocusPolicy( QWidget::TabFocus ); setBackgroundMode( QWidget::PaletteBackground ); #endif setFrameStyle( QFrame::Box | QFrame::Raised ); #ifdef QT_V4LAYOUT setResizePolicy( Q3ScrollView::Manual ); setVScrollBarMode( Q3ScrollView::Auto ); setHScrollBarMode( Q3ScrollView::Auto ); #else setResizePolicy( QScrollView::Manual ); setVScrollBarMode( QScrollView::Auto ); setHScrollBarMode( QScrollView::Auto ); #endif setTreeStepSize( 20 ); setMultiSelection( FALSE ); setAllColumnsShowFocus( TRUE ); setItemMargin( 1 ); setRootIsDecorated( FALSE ); addColumn( "File Name", -1 ); #ifdef QT_V4LAYOUT setColumnWidthMode( 0, Q3ListView::Maximum ); #else setColumnWidthMode( 0, QListView::Maximum ); #endif setColumnAlignment( 0, 1 ); addColumn( "Permissions", -1 ); #ifdef QT_V4LAYOUT setColumnWidthMode( 1, Q3ListView::Maximum ); #else setColumnWidthMode( 1, QListView::Maximum ); #endif setColumnAlignment( 1, 1 ); addColumn( "Owner", -1 ); #ifdef QT_V4LAYOUT setColumnWidthMode( 2, Q3ListView::Maximum ); #else setColumnWidthMode( 2, QListView::Maximum ); #endif setColumnAlignment( 2, 1 ); addColumn( "Group", -1 ); #ifdef QT_V4LAYOUT setColumnWidthMode( 3, Q3ListView::Maximum ); #else setColumnWidthMode( 3, QListView::Maximum ); #endif setColumnAlignment( 3, 1 ); addColumn( "Size", -1 ); #ifdef QT_V4LAYOUT setColumnWidthMode( 4, Q3ListView::Maximum ); #else setColumnWidthMode( 4, QListView::Maximum ); #endif setColumnAlignment( 4, 1 ); } CFileList::~CFileList() { } void CFileList::Load( QString *in_cwd ) { #ifdef QT_V4LAYOUT Q3ListViewItem *pListViewItem; #else QListViewItem *pListViewItem; #endif QDir d; clear(); if ( in_cwd ) { cwd = *in_cwd; } d.setFilter( QDir::Files | QDir::Hidden ); d.cd( cwd ); d.setNameFilter("*.dsn"); #ifdef QT_V4LAYOUT const QFileInfoList list = d.entryInfoList(); QFileInfo fi; // pointer for traversing for ( int i = 0; i < list.size(); i ++ ) { QString perm, size; char driver[ 128 ]; fi = list.at(i); perm = "-"; perm += fi.permission( QFileInfo::ReadUser ) ? "r" : "-"; perm += fi.permission( QFileInfo::WriteUser ) ? "w" : "-"; perm += fi.permission( QFileInfo::ExeUser ) ? "x" : "-"; perm += fi.permission( QFileInfo::ReadGroup ) ? "r" : "-"; perm += fi.permission( QFileInfo::WriteGroup ) ? "w" : "-"; perm += fi.permission( QFileInfo::ExeGroup ) ? "x" : "-"; perm += fi.permission( QFileInfo::ReadOther ) ? "r" : "-"; perm += fi.permission( QFileInfo::WriteOther ) ? "w" : "-"; perm += fi.permission( QFileInfo::ExeOther ) ? "x" : "-"; size.sprintf( "%d bytes", fi.size()); pListViewItem = new Q3ListViewItem( this, fi.fileName(), perm, fi.owner(), fi.group(), size ); } #else const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); // create list iterator QFileInfo *fi; // pointer for traversing while ( (fi=it.current()) ) { // for each file... QString perm, size; char driver[ 128 ]; perm = "-"; perm += fi->permission( QFileInfo::ReadUser ) ? "r" : "-"; perm += fi->permission( QFileInfo::WriteUser ) ? "w" : "-"; perm += fi->permission( QFileInfo::ExeUser ) ? "x" : "-"; perm += fi->permission( QFileInfo::ReadGroup ) ? "r" : "-"; perm += fi->permission( QFileInfo::WriteGroup ) ? "w" : "-"; perm += fi->permission( QFileInfo::ExeGroup ) ? "x" : "-"; perm += fi->permission( QFileInfo::ReadOther ) ? "r" : "-"; perm += fi->permission( QFileInfo::WriteOther ) ? "w" : "-"; perm += fi->permission( QFileInfo::ExeOther ) ? "x" : "-"; size.sprintf( "%d bytes", fi->size()); pListViewItem = new QListViewItem( this, fi->fileName(), perm, fi->owner(), fi->group(), size ); ++it; // goto next list element } #endif } QString CFileList::GetDir() { return cwd; } void CFileList::NewDir() { QString dir = cwd; cwd = QFileDialog::getExistingDirectory ( dir ); Load(); } void CFileList::Add() { // odbc.ini INFO /* QString qsDataSourceName = ""; QString qsDataSourceDescription = ""; */ QString qsDataSourceDriver = ""; QString qsDriverName = ""; CDriverPrompt *pDriverPrompt; CPropertiesFrame *pProperties; HODBCINSTPROPERTY hFirstProperty = NULL; HODBCINSTPROPERTY hCurProperty = NULL; DWORD nErrorCode; char szErrorMsg[101]; QString qsError = ""; int ret; pDriverPrompt = new CDriverPrompt( this ); if ( pDriverPrompt->exec() ) { qsDriverName = pDriverPrompt->qsDriverName; qsDataSourceDriver = qsDriverName; delete pDriverPrompt; // // can we call SQLDriverConnect // // GET PROPERTY LIST FROM DRIVER if ( ODBCINSTConstructProperties( (char*)qsDataSourceDriver.ascii(), &hFirstProperty ) != ODBCINST_SUCCESS ) { qsError.sprintf( "Could not construct a property list for (%s)", qsDataSourceDriver.ascii() ); QMessageBox::information( this, "ODBC Config", qsError ); return; } // ALLOW USER TO EDIT pProperties = new CPropertiesFrame( this, "Properties", hFirstProperty ); pProperties->setCaption( "Data Source Properties (new)" ); if ( pProperties->exec() ) { char dir[ 256 ]; sprintf( dir, "%s/%s", cwd.ascii(), hFirstProperty->szValue ); ret = SQLWriteFileDSN( dir, "ODBC", NULL, NULL ); if ( !ret ) { qsError.sprintf( "Could not write to (%s)", dir ); QMessageBox::information( this, "ODBC Config", qsError ); int i = 1; while ( SQLInstallerError( i++, &nErrorCode, szErrorMsg, 100, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); return; } /* ADD ENTRIES; SECTION CREATED ON FIRST CALL */ for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { ret = SQLWriteFileDSN( dir, "ODBC", hCurProperty->szName, hCurProperty->szValue ); if ( !ret ) { qsError.sprintf( "Could not write to (%s)", dir ); QMessageBox::information( this, "ODBC Config", qsError ); int i = 1; while ( SQLInstallerError( i++, &nErrorCode, szErrorMsg, 100, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); return; } } } delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); } else delete pDriverPrompt; // RELOAD (slow but safe) Load(); } void CFileList::Edit() { // odbc.ini INFO QString qsDataSourceName = ""; QString qsDataSourceDescription = ""; QString qsDataSourceDriver = ""; // odbcinst.ini INFO QString qsDriverFile = ""; QString qsSetupFile = ""; QString qsError = ""; CPropertiesFrame *pProperties; HODBCINSTPROPERTY hFirstProperty = NULL; HODBCINSTPROPERTY hCurProperty = NULL; #ifdef QT_V4LAYOUT Q3ListViewItem *pListViewItem; #else QListViewItem *pListViewItem; #endif char szEntryNames[4096]; char szProperty[INI_MAX_PROPERTY_NAME+1]; char szValue[INI_MAX_PROPERTY_VALUE+1]; DWORD nErrorCode; char szErrorMsg[101]; char szINI[FILENAME_MAX+1]; int nElement; char dir[ 256 ]; char szDriver[ 256 ]; QString qsFileName; // HAS THE USER SELECTED SOMETHING pListViewItem = currentItem(); if ( pListViewItem ) { qsFileName = pListViewItem->text( 0 ); /* qsDataSourceDescription = pListViewItem->text( 1 ); qsDataSourceDriver = pListViewItem->text( 2 ); */ } else { QMessageBox::information( this, "ODBC Config", "Please select a Data Source from the list first" ); return; } sprintf( dir, "%s/%s", cwd.ascii(), qsFileName.ascii()); szDriver[ 0 ] = '\0'; if ( !SQLReadFileDSN( dir, "ODBC", "DRIVER", szDriver, sizeof( szDriver ), NULL ) || strlen( szDriver ) < 1 ) { char szDsn[ 256 ]; szDsn[ 0 ] = '\0'; if ( SQLReadFileDSN( dir, "ODBC", "DSN", szDsn, sizeof( szDsn ), NULL ) && strlen( szDsn ) >= 1 ) { SQLSetConfigMode( ODBC_BOTH_DSN ); SQLGetPrivateProfileString( szDsn, "Driver", "", szDriver, sizeof( szDriver ), "odbc.ini" ); if ( strlen( szDriver ) < 1 ) { QMessageBox::information( this, "ODBC Config", "Unable to extract driver from FILE DSN" ); return; } } else { QMessageBox::information( this, "ODBC Config", "Unable to extract driver from FILE DSN" ); return; } } // // can we call SQLDriverConnect // // GET PROPERTY LIST FROM DRIVER if ( ODBCINSTConstructProperties( szDriver, &hFirstProperty ) != ODBCINST_SUCCESS ) { qsError.sprintf( "Could not construct a property list for (%s)", szDriver ); QMessageBox::information( this, "ODBC Config", qsError ); int i = 1; while ( SQLInstallerError( i ++, &nErrorCode, szErrorMsg, 100, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); return; } ODBCINSTSetProperty( hFirstProperty, "Name", (char*)qsFileName.ascii()); for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { char szAttr[ 256 ]; szAttr[ 0 ] = '\0'; if ( SQLReadFileDSN( dir, "ODBC", hCurProperty->szName, szAttr, sizeof( szAttr ), NULL )) { ODBCINSTSetProperty( hFirstProperty, hCurProperty->szName, szAttr ); } } // ALLOW USER TO EDIT pProperties = new CPropertiesFrame( this, "Properties", hFirstProperty ); pProperties->setCaption( "Data Source Properties (edit)" ); if ( pProperties->exec() ) { int ret; ret = SQLWriteFileDSN( dir, "ODBC", NULL, NULL ); if ( !ret ) { qsError.sprintf( "Could not write to (%s)", dir ); QMessageBox::information( this, "ODBC Config", qsError ); int i = 1; while ( SQLInstallerError( i++, &nErrorCode, szErrorMsg, 100, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); return; } for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { if ( !SQLWriteFileDSN( dir, "ODBC", hCurProperty->szName, hCurProperty->szValue )) { qsError.sprintf( "Could not write to file dsn (%s)", dir ); QMessageBox::information( this, "ODBC Config", qsError ); int i = 1; while ( SQLInstallerError( i ++, &nErrorCode, szErrorMsg, 100, NULL ) == SQL_SUCCESS ) QMessageBox::information( this, "ODBC Config", szErrorMsg ); return; } } } delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); // RELOAD (slow but safe) Load(); } void CFileList::Delete() { #ifdef QT_V4LAYOUT Q3ListViewItem *pListViewItem; #else QListViewItem *pListViewItem; #endif char szINI[FILENAME_MAX+1]; char *pDataSourceName; QString qsError; DWORD nErrorCode; char szErrorMsg[FILENAME_MAX+1]; // GET SELECT DATA SOURCE NAME pListViewItem = currentItem(); if ( pListViewItem ) { pDataSourceName = (char *)pListViewItem->text( 0 ).ascii(); } else { QMessageBox::information( this, "ODBC Config", "Please select a Data Source from the list first" ); return; } char dir[ 256 ]; sprintf( dir, "%s/%s", cwd.ascii(), pDataSourceName ); // DELETE ENTIRE SECTION IF IT EXISTS (given NULL entry) if ( unlink( dir )) { QString msg; msg.sprintf( "Unable to unlink %s", dir ); QMessageBox::information( this, "ODBC Config", msg ); } else { QMessageBox::information( this, "ODBC Config", "Done!" ); } // RELOAD (slow but safe) Load(); } unixODBC-2.2.14-p2/odbcinstQ/CFileSelector.cpp0100644000076400007640000000206611032156647017323 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "CFileSelector.h" CFileSelector::CFileSelector( QWidget* parent, const char* name ) : QWidget( parent, name ) { QBoxLayout *pTopLayout = new QHBoxLayout( this ); pLineEdit = new QLineEdit( this ); pButton = new QPushButton( ">", this ); pButton->setMaximumSize( 20,20 ); pTopLayout->addWidget( pLineEdit, 2 ); pTopLayout->addWidget( pButton, 0 ); pTopLayout->activate(); connect( pButton, SIGNAL(clicked()), this, SLOT(pButton_Clicked()) ); } CFileSelector::~CFileSelector() { } void CFileSelector::pButton_Clicked() { QString qsFile( QFileDialog::getOpenFileName( pLineEdit->text()) ); if ( qsFile.isNull() ) return; pLineEdit->setText( qsFile ); } unixODBC-2.2.14-p2/odbcinstQ/CODBCConfig.cpp0100644000076400007640000000542511032156650016574 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "CODBCConfig.h" #include "ODBC.xpm" #ifdef QT_V4LAYOUT CODBCConfig::CODBCConfig( QWidget* parent, const char* name, Qt::WFlags nFlags ) : Q3TabDialog( parent, name, nFlags ) #else CODBCConfig::CODBCConfig( QWidget* parent, const char* name, WFlags nFlags ) : QTabDialog( parent, name, nFlags ) #endif { setIcon( QPixmap( xpmODBC ) ); setCaption( "ODBC Data Source Administrator" ); setSizeGripEnabled( true ); pUserDSN = new CUserDSN( this ); addTab( pUserDSN, "&User DSN" ); pSystemDSN = new CSystemDSN( this ); addTab( pSystemDSN, "&System DSN" ); pFileDSN = new CFileDSN( this, NULL ); addTab( pFileDSN, "&File DSN" ); pDrivers = new CDrivers( this ); addTab( pDrivers, "&Drivers" ); pStats = new CStats( this ); addTab( pStats, "St&ats" ); pTracing = new CTracing( this ); addTab( pTracing, "Ad&vanced" ); pAbout = new CAbout( this ); addTab( pAbout, "&About" ); #ifdef QT_V4LAYOUT setOkButton(); setCancelButton(); #endif resize( 500,330 ); setMinimumSize( 0, 0 ); setMaximumSize( 32767, 32767 ); LoadState(); } CODBCConfig::~CODBCConfig() { SaveState(); } void CODBCConfig::LoadState() { #if QT_VERSION>=300 #ifdef QT_V4LAYOUT QSettings settings( "unixODBC", "odbcinstQ" );; #else QSettings settings; #endif // main window { #ifdef Q_WS_X11 int nX = settings.readNumEntry( "/unixODBC/ODBCConfig/x", geometry().x() ); int nY = settings.readNumEntry( "/unixODBC/ODBCConfig/y", geometry().y() ); int nW = settings.readNumEntry( "/unixODBC/ODBCConfig/w", geometry().width() ); int nH = settings.readNumEntry( "/unixODBC/ODBCConfig/h", geometry().height() ); setGeometry( nX, nY, nW, nH ); #else int nW = settings.readNumEntry( "/unixODBC/ODBCConfig/w", geometry().width() ); int nH = settings.readNumEntry( "/unixODBC/ODBCConfig/h", geometry().height() ); resize( nW, nH ); #endif } #endif } void CODBCConfig::SaveState() { #if QT_VERSION>=300 #ifdef QT_V4LAYOUT QSettings settings( "unixODBC", "odbcinstQ" );; #else QSettings settings; #endif // main window settings.writeEntry( "/unixODBC/ODBCConfig/x", x() ); settings.writeEntry( "/unixODBC/ODBCConfig/y", y() ); settings.writeEntry( "/unixODBC/ODBCConfig/w", width() ); settings.writeEntry( "/unixODBC/ODBCConfig/h", height() ); #endif } unixODBC-2.2.14-p2/odbcinstQ/CODBCCreate.cpp0100644000076400007640000004703711106772700016601 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Nick Gorham nick.gorham@easysoft.com * Released under GPL 22.MAY.2006 * * Contributions from... * ----------------------------------------------- * **************************************************/ #include #include "CODBCCreate.h" #if (QT_VERSION<300) QTextEdit::QTextEdit (QWidget *parent, const char *name ) :QMultiLineEdit( parent, name ) { QMultiLineEdit::setMaxLines( 1 ); } QTextEdit::QTextEdit (QWidget *parent ) :QMultiLineEdit( parent ) { QMultiLineEdit::setMaxLines( 1 ); } void QTextEdit::maxLines( int n ) { QMultiLineEdit::setMaxLines( n ); } void QTextEdit::setMaxLength( int x ) { QMultiLineEdit::setMaxLineLength( 1 ); } void QTextEdit::append( const char *str ) { QMultiLineEdit::append( str ); setCursorPosition( numLines() + 1, 0 ); } #endif #ifdef QT_V4LAYOUT CODBCCreate::CODBCCreate( QWidget* parent, const char* name ) : Q3Wizard( parent, name, TRUE ) #else CODBCCreate::CODBCCreate( QWidget* parent, const char* name ) : QWizard( parent, name, TRUE ) #endif { setupPage1(); setupPage2(); setupPage3(); setupPage4(); LoadState(); setNextEnabled( box1, FALSE ); setNextEnabled( box3, FALSE ); connect( this, SIGNAL(selected(const QString &)), SLOT(page_change(const QString &)) ); setCaption( "Create New Data Source" ); extra_keywords = ""; verify = true; ret_code = false; } CODBCCreate::~CODBCCreate() { SaveState(); } void CODBCCreate::setDsn( const char *dsn ) { if ( dsn && strlen( dsn ) > 0 ) { this->dsn = dsn; } else { this->dsn = ""; } } int CODBCCreate::getRetCode() { return ret_code; } void CODBCCreate::LoadState() { #if QT_VERSION>=300 QSettings settings; // main window { #ifdef Q_WS_X11 int nX = settings.readNumEntry( "/unixODBC/ODBCCreate/x", geometry().x() ); int nY = settings.readNumEntry( "/unixODBC/ODBCCreate/y", geometry().y() ); int nW = settings.readNumEntry( "/unixODBC/ODBCCreate/w", geometry().width() ); int nH = settings.readNumEntry( "/unixODBC/ODBCCreate/h", geometry().height() ); setGeometry( nX, nY, nW, nH ); #else int nW = settings.readNumEntry( "/unixODBC/ODBCCreate/w", geometry().width() ); int nH = settings.readNumEntry( "/unixODBC/ODBCCreate/h", geometry().height() ); resize( nW, nH ); #endif } #endif } void CODBCAdvanced::setValid( bool val ) { valid->setChecked( val ); } void CODBCAdvanced::setKeywords( QString kw ) { text_list->setText( kw ); } void CODBCAdvanced::ad_ok() { parent->setValid( valid->isChecked()); parent->setKeywords( text_list->text()); } #ifdef QT_V4LAYOUT CODBCAdvanced::CODBCAdvanced( QWidget* parent, const char* name, Qt::WFlags nFlags ) : QDialog( parent, name, nFlags ) #else CODBCAdvanced::CODBCAdvanced( QWidget* parent, const char* name, WFlags nFlags ) : QDialog( parent, name, nFlags ) #endif { setFixedHeight( 340 ); setFixedWidth( 470 ); setCaption( "Advanced File DSN Creation Settings" ); this->parent = (CODBCCreate*)parent; ok = new QPushButton( "O&K", this ); ok->setGeometry( 370,10, 80,25 ); cancel = new QPushButton( "&Cancel", this ); cancel->setGeometry( 370,45, 80,25 ); lab = new QLabel( this ); #ifdef QT_V4LAYOUT lab -> setAlignment( Qt::AlignTop | Qt::AlignLeft ); #else lab -> setAlignment( AlignTop | AlignLeft ); #endif lab -> setGeometry( 10,10, 330,150 ); lab -> setText( "If you know the driver specific keywords for this data\nsource, you can type them and their values here. Put a\nnew keyword-value pair on each line. For example.\n\n Server=MyServer\n Database=MyDatabase\n\nFor more information on driver-specific keywords, please\nconsult your ODBC driver's documentation" ); lab = new QLabel( this ); #ifdef QT_V4LAYOUT lab -> setAlignment( Qt::AlignTop | Qt::AlignLeft ); #else lab -> setAlignment( AlignTop | AlignLeft ); #endif lab -> setGeometry( 10,175, 350,50 ); lab -> setText( "Enter driver-specific keywords and values:" ); text_list = new QTextEdit( this ); text_list -> setGeometry( 10, 200, 350, 100); valid = new QCheckBox( "Verify this connection {recommended}", this ); valid -> setGeometry( 10,295, 350,50 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(ad_ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } CODBCAdvanced::~CODBCAdvanced() { } void CODBCCreate::ad_click() { CODBCAdvanced odbcad( this, "ODBCAdvanced", Qt::WType_Modal ); odbcad.setKeywords( extra_keywords ); odbcad.setValid( verify ); odbcad.exec(); } void CODBCCreate::setValid( bool val ) { verify = val; } void CODBCCreate::setKeywords( QString kw ) { extra_keywords = kw; } bool CODBCCreate::createDsn() { BOOL ret; QString fname = file_edit->text(); // Make sure it ends with .dsn if ( fname.right( 4 ).lower().compare( ".dsn" )) { fname.append( ".dsn" ); } if ( access( fname, F_OK ) == 0 ) { int replace = QMessageBox::information( NULL, "Save File DSN", "Data source file exists. Overwrite?", QMessageBox::Yes, QMessageBox::No ); if ( replace == QMessageBox::No ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_CREATE_DSN_FAILED, "" ); return false; } } if ( unlink( fname )) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_CREATE_DSN_FAILED, "" ); return false; } ret = SQLWriteFileDSN((const char*) fname, "ODBC", "DRIVER", (const char *)current_driver ); if ( !ret ) { return false; } if ( extra_keywords.length() > 0 ) { int start = 0; int end = 0; int eq; QString str; while( start < extra_keywords.length() ) { end = extra_keywords.find( '\n', start ); if ( end == -1 ) { end = extra_keywords.length(); } str = extra_keywords.mid( start, end-start ) + ";"; eq = str.find( '=', 0 ); if ( eq > 0 ) { ret = SQLWriteFileDSN((const char*) fname, "ODBC", (const char *) str.left( eq ), (const char *) str.right( str.length() - eq - 1 )); if ( !ret ) { return false; } } start = end + 1; } } return true; } void CODBCCreate::SaveState() { #if QT_VERSION>=300 QSettings settings; // main window settings.writeEntry( "/unixODBC/ODBCCreate/x", x() ); settings.writeEntry( "/unixODBC/ODBCCreate/y", y() ); settings.writeEntry( "/unixODBC/ODBCCreate/w", width() ); settings.writeEntry( "/unixODBC/ODBCCreate/h", height() ); #endif } void CODBCCreate::reject() { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_USER_CANCELED, "" ); ret_code = false; #ifdef QT_V4LAYOUT Q3Wizard::reject(); #else QWizard::reject(); #endif } void CODBCCreate::accept() { if ( fds->isOn()) { QString conn_str; char out_str[ 4095 ]; const char *in_str; SQLHENV henv; SQLHDBC hdbc; SQLSMALLINT len; SQLRETURN ret; QString fname = file_edit->text(); // Make sure it ends with .dsn if ( fname.right( 4 ).lower().compare( ".dsn" )) { fname.append( ".dsn" ); file_edit->setText( fname ); } conn_str = "DRIVER={" + current_driver + "};SAVEFILE=" + fname + ";"; if ( extra_keywords.length() > 0 ) { int start = 0; int end = 0; while( start < extra_keywords.length() ) { end = extra_keywords.find( '\n', start ); if ( end == -1 ) { end = extra_keywords.length(); } conn_str += extra_keywords.mid( start, end-start ) + ";"; start = end + 1; } } in_str = (const char*)conn_str; if ( verify ) { SQLAllocEnv( &henv ); SQLAllocConnect( henv, &hdbc ); ret = SQLDriverConnect( hdbc, (SQLHWND)1, (SQLCHAR*)in_str, strlen( in_str ), (SQLCHAR*)out_str, sizeof( out_str ), &len, SQL_DRIVER_COMPLETE ); SQLFreeConnect( hdbc ); SQLFreeEnv( henv ); if ( ret != SQL_SUCCESS ) { int create = QMessageBox::No; create = QMessageBox::information( NULL, "Create Data Source", "A connection could not be made using the file data source parameters entered. Save non-verified file DSN?", QMessageBox::Yes, QMessageBox::No ); if ( create == QMessageBox::No ) { inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_CREATE_DSN_FAILED, "" ); ret_code = false; #ifdef QT_V4LAYOUT Q3Wizard::reject(); #else QWizard::reject(); #endif return; } else { strcpy( out_str, in_str ); if ( !createDsn()) { ret_code = false; #ifdef QT_V4LAYOUT Q3Wizard::reject(); #else QWizard::reject(); #endif return; } } } } else { strcpy( out_str, in_str ); if ( !createDsn()) { ret_code = false; #ifdef QT_V4LAYOUT Q3Wizard::reject(); #else QWizard::reject(); #endif return; } } ret_code = true; } else { int mode; if ( sds -> isOn()) { mode = ODBC_ADD_SYS_DSN; } else { mode = ODBC_ADD_DSN; } if ( dsn.length() > 0 ) { ret_code = SQLConfigDataSource((HWND) 1, mode, current_driver, dsn.prepend( "DSN=" )); } else { ret_code = SQLConfigDataSource((HWND) 1, mode, current_driver, "" ); } } #ifdef QT_V4LAYOUT Q3Wizard::accept(); #else QWizard::accept(); #endif } bool CODBCCreate::appropriate ( QWidget *page ) const { if ( page == box3 ) { return fds->isOn(); } else { return true; } } void CODBCCreate::page_change( const QString &title ) { /* * Load the text list */ arg_list->clear(); if ( currentPage() == box2 ) { QString prefix; if ( fds -> isOn()) { prefix = "File Data Source "; } else if ( sds -> isOn()) { prefix = "System Data Source " + dsn; } else if ( uds -> isOn()) { prefix = "User Data Source " + dsn; } arg_list->append( prefix ); if ( fds -> isOn()) { QString fname = file_edit->text(); // Make sure it ends with .dsn if ( fname.right( 4 ).lower().compare( ".dsn" )) { fname.append( ".dsn" ); file_edit->setText( fname ); } arg_list->append( "File name: " + fname ); } arg_list->append( "Driver: " + current_driver ); if ( fds -> isOn() && extra_keywords.length() > 0 ) { arg_list->append( "Driver-specific Keywords:"); arg_list->append( extra_keywords ); } } else if ( currentPage() == box1 ) { advanced->setEnabled( fds->isOn()); } } void CODBCCreate::file_click() { char path[ 1024 ]; char def[ 1024 ]; char buffer[ 128 ]; sprintf( def, "%s/ODBCDataSources", odbcinst_system_file_path( buffer )); SQLGetPrivateProfileString( "ODBC", "FileDSNPath", def, path, sizeof( path ), "odbcinst.ini" ); #ifdef QT_V4LAYOUT QString s = Q3FileDialog::getSaveFileName( #else QString s = QFileDialog::getSaveFileName( #endif path, "ODBC File Data Sources's (*.dsn)", this, "Select file name", "Choose a filename to save under" ); if ( !s.isNull() ) { file_edit->setText( s ); } } void CODBCCreate::file_changed(const QString &text) { if ( text.length() > 0 ) { setNextEnabled( box3, TRUE ); } else { setNextEnabled( box3, FALSE ); } } #ifdef QT_V4LAYOUT void CODBCCreate::dl_click( Q3ListViewItem *item ) #else void CODBCCreate::dl_click( QListViewItem *item ) #endif { current_driver = item->text( 0 ); setNextEnabled( box1, TRUE ); } void CODBCCreate::fds_click() { lab->setText( "Selecting File Data Source creates a file-based\ndata sourcewhich is shareable between all\nusers with access to the database" ); } void CODBCCreate::uds_click() { lab->setText( "Selecting User Data Source creates a data source\nwhich is specific to this machine, and visable\nonly to you" ); } void CODBCCreate::sds_click() { lab->setText( "Selecting System Data Source creates a data source\nwhich is specific to this machine, and usable\nby any user who logs onto the machine" ); } void CODBCCreate::populate() { char szDriverName[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szDescription[INI_MAX_PROPERTY_VALUE+1]; char szDriver[INI_MAX_PROPERTY_VALUE+1]; char szDriver64[INI_MAX_PROPERTY_VALUE+1]; char szSetup[INI_MAX_PROPERTY_VALUE+1]; char szSetup64[INI_MAX_PROPERTY_VALUE+1]; #ifdef QT_V4LAYOUT Q3ListViewItem *pListViewItem; #else QListViewItem *pListViewItem; #endif QString qsError; char szINI[FILENAME_MAX+1]; HINI hIni; char buffer[ 128 ]; sprintf( szINI, "%s/odbcinst.ini", odbcinst_system_file_path( buffer )); if ( iniOpen( &hIni, szINI, "#;", '[', ']', '=', TRUE ) != INI_ERROR ) { iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { szDriverName[0] = '\0'; szDescription[0] = '\0'; szDriver[0] = '\0'; szDriver64[0] = '\0'; szSetup64[0] = '\0'; szSetup[0] = '\0'; iniObject( hIni, szDriverName ); iniPropertyFirst( hIni ); if ( strcmp( szDriverName, "ODBC" ) == 0 ) { iniObjectNext( hIni ); continue; } while ( iniPropertyEOL( hIni ) == FALSE ) { iniProperty( hIni, szPropertyName ); iniToUpper( szPropertyName ); if ( strncmp( szPropertyName, "DESCRIPTION", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDescription ); #ifdef PLATFORM64 if ( strncmp( szPropertyName, "DRIVER64", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDriver64 ); if ( strncmp( szPropertyName, "DRIVER", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDriver ); if ( strncmp( szPropertyName, "SETUP64", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szSetup64 ); if ( strncmp( szPropertyName, "SETUP", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szSetup ); #else if ( strncmp( szPropertyName, "DRIVER", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDriver ); if ( strncmp( szPropertyName, "SETUP", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szSetup ); #endif iniPropertyNext( hIni ); } #ifdef PLATFORM64 if ( szDriver64[ 0 ] != '\0' ) { strcpy( szDriver, szDriver64 ); } if ( szSetup64[ 0 ] != '\0' ) { strcpy( szSetup, szSetup64 ); } #endif #ifdef QT_V4LAYOUT pListViewItem = new Q3ListViewItem( driver_list, szDriverName, szDescription, szDriver, szSetup ); #else pListViewItem = new QListViewItem( driver_list, szDriverName, szDescription, szDriver, szSetup ); #endif iniObjectNext( hIni ); } iniClose( hIni ); } else { qsError.sprintf( "Could not open system file at %s", szINI ); QMessageBox::information( this, "Create New Data Source", qsError ); } } void CODBCCreate::setupPage3() { #ifdef QT_V4LAYOUT box3 = new Q3HBox( this ); #else box3 = new QHBox( this ); #endif box3->setSpacing( 5 ); file_edit = new QLineEdit( box3 ); file_find = new QPushButton( "Browse", box3, "Browse" ); connect( file_find, SIGNAL(clicked()), SLOT(file_click()) ); connect( file_edit, SIGNAL(textChanged(const QString &)), SLOT(file_changed(const QString &)) ); addPage( box3, "Type the name of the file data source you want to save\nthis connection to. Or, find the location to save to\nby clicking Browse" ); setHelpEnabled( box3, FALSE ); setFinishEnabled( box3, FALSE ); } void CODBCCreate::setupPage4() { #ifdef QT_V4LAYOUT box2 = new Q3VBox( this ); #else box2 = new QVBox( this ); #endif arg_list = new QTextEdit( box2 ); arg_list -> setGeometry( 10, 10, 300, 100); arg_list -> setMinimumSize( 50, 50 ); arg_list -> setMaximumSize( 32767, 32767 ); arg_list -> setReadOnly( true ); addPage( box2, "When you click finish, you will create the data source\nwhich you have just configured. The driver may prompt\nyou for more information" ); setHelpEnabled( box2, FALSE ); setFinishEnabled( box2, TRUE ); } void CODBCCreate::setupPage2() { #ifdef QT_V4LAYOUT box1 = new Q3VBox( this ); #else box1 = new QVBox( this ); #endif box1->setSpacing( 5 ); #ifdef QT_V4LAYOUT driver_list = new Q3ListView( box1 ); #else driver_list = new QListView( box1 ); #endif driver_list -> setGeometry( 10, 10, 300, 100); driver_list -> setMinimumSize( 50, 50 ); driver_list -> setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT driver_list -> setFocusPolicy( Qt::TabFocus ); driver_list -> setBackgroundMode( Qt::PaletteBackground ); #else driver_list -> setFocusPolicy( QWidget::TabFocus ); driver_list -> setBackgroundMode( QWidget::PaletteBackground ); #endif driver_list -> setFrameStyle( QFrame::Box | QFrame::Raised ); #ifdef QT_V4LAYOUT driver_list -> setResizePolicy( Q3ScrollView::Manual ); driver_list -> setVScrollBarMode( Q3ScrollView::Auto ); driver_list -> setHScrollBarMode( Q3ScrollView::Auto ); #else driver_list -> setResizePolicy( QScrollView::Manual ); driver_list -> setVScrollBarMode( QScrollView::Auto ); driver_list -> setHScrollBarMode( QScrollView::Auto ); #endif driver_list -> setTreeStepSize( 20 ); driver_list -> setMultiSelection( FALSE ); driver_list -> setAllColumnsShowFocus( TRUE ); driver_list -> setItemMargin( 1 ); driver_list -> setRootIsDecorated( FALSE ); driver_list -> addColumn( "Name", -1 ); #ifdef QT_V4LAYOUT driver_list -> setColumnWidthMode( 0, Q3ListView::Maximum ); #else driver_list -> setColumnWidthMode( 0, QListView::Maximum ); #endif driver_list -> setColumnAlignment( 0, 1 ); driver_list -> addColumn( "Description", -1 ); #ifdef QT_V4LAYOUT driver_list -> setColumnWidthMode( 1, Q3ListView::Maximum ); #else driver_list -> setColumnWidthMode( 1, QListView::Maximum ); #endif driver_list -> setColumnAlignment( 1, 1 ); driver_list -> addColumn( "Driver Lib", -1 ); #ifdef QT_V4LAYOUT driver_list -> setColumnWidthMode( 2, Q3ListView::Maximum ); #else driver_list -> setColumnWidthMode( 2, QListView::Maximum ); #endif driver_list -> setColumnAlignment( 2, 1 ); driver_list -> addColumn( "Setup Lib", -1 ); #ifdef QT_V4LAYOUT driver_list -> setColumnWidthMode( 3, Q3ListView::Maximum ); #else driver_list -> setColumnWidthMode( 3, QListView::Maximum ); #endif driver_list -> setColumnAlignment( 3, 1 ); #ifdef QT_V4LAYOUT box1a = new Q3HBox( box1 ); #else box1a = new QHBox( box1 ); #endif advanced = new QPushButton( "Advanced...", box1a, "Advanced" ); advanced -> setEnabled( false ); advanced->setFixedWidth( 90 ); populate(); connect( driver_list, SIGNAL(clicked(QListViewItem *)), SLOT(dl_click(QListViewItem *)) ); connect( advanced, SIGNAL(clicked()), SLOT(ad_click()) ); addPage( box1, "Select a driver for which you want to set up a data source" ); setHelpEnabled( box1, FALSE ); setFinishEnabled( box1, FALSE ); } void CODBCCreate::setupPage1() { #ifdef QT_V4LAYOUT box = new Q3VBox( this ); #else box = new QVBox( this ); #endif box->setGeometry( 10,10, 410,75 ); #ifdef QT_V4LAYOUT bg = new Q3VButtonGroup( "", box, "Bgroup" ); #else bg = new QVButtonGroup( "", box, "Bgroup" ); #endif bg -> setGeometry( 10, 10, 300, 100); fds = new QRadioButton( "File Data Source", bg ); uds = new QRadioButton( "User Data Source", bg ); sds = new QRadioButton( "System Data Source", bg ); connect( fds, SIGNAL(clicked()), SLOT(fds_click()) ); connect( uds, SIGNAL(clicked()), SLOT(uds_click()) ); connect( sds, SIGNAL(clicked()), SLOT(sds_click()) ); lab = new QLabel( box ); #ifdef QT_V4LAYOUT lab -> setAlignment( Qt::AlignTop | Qt::AlignLeft ); #else lab -> setAlignment( AlignTop | AlignLeft ); #endif fds -> setChecked( true ); fds_click(); addPage( box, "Select type of data source" ); setHelpEnabled( box, FALSE ); setFinishEnabled( box, FALSE ); } unixODBC-2.2.14-p2/odbcinstQ/CProperties.cpp0100644000076400007640000002075211032156651017074 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "CProperties.h" #ifdef HAVE_STRCASECMP #ifdef HAVE_STRINGS #include #endif #else int strcasecmp( char *, char * ); #endif #include "checkOk.xpm" #include "checkCancel.xpm" #ifdef QT_V4LAYOUT CProperties::CProperties( QWidget* parent, const char* name, HODBCINSTPROPERTY hTheFirstProperty ) : Q3MainWindow( parent, name, 0 ) #else CProperties::CProperties( QWidget* parent, const char* name, HODBCINSTPROPERTY hTheFirstProperty ) : QMainWindow( parent, name, 0 ) #endif { HODBCINSTPROPERTY hProperty; int nProperty; pMainWidget = new QWidget( this ); setCentralWidget( pMainWidget ); pTopLayout = new QVBoxLayout( pMainWidget ); // SETUP TOOLBAR #ifdef QT_V4LAYOUT toolbarMain = new Q3ToolBar( this ); addToolBar( toolbarMain, tr( "ToolBar" ), Qt::Top, FALSE ); #else toolbarMain = new QToolBar( this ); addToolBar( toolbarMain, tr( "ToolBar" ), Top, FALSE ); #endif new QToolButton( QPixmap( checkOk_xpm ), QString(tr("Save and Exit")), QString(""), this, SLOT(pbOk_Clicked()), toolbarMain ); new QToolButton( QPixmap( checkCancel_xpm ), QString(tr("Cancel any changes and Exit")), QString(""), this, SLOT(pbCancel_Clicked()), toolbarMain ); QWhatsThis::whatsThisButton ( toolbarMain ); /* PROPERTIES */ hFirstProperty = hTheFirstProperty; for ( nProperties = 0, hProperty = hFirstProperty; hProperty != NULL; hProperty = hProperty->pNext ) { nProperties++; } pGridLayout = new QGridLayout( nProperties, 2, 2 ); pTopLayout->addLayout( pGridLayout ); pGridLayout->setColStretch ( 0, 0 ); pGridLayout->setColStretch ( 1, 1 ); for ( nProperty = 0, hProperty = hFirstProperty; hProperty != NULL; nProperty++, hProperty = hProperty->pNext ) { QLabel *pLabel = new QLabel( pMainWidget ); // 1ST COLUMN IS ALWAYS A LABEL CONTAINING THE PROPERTY NAME if ( hProperty->nPromptType != ODBCINST_PROMPTTYPE_HIDDEN ) { if ( hProperty->pszHelp ) QWhatsThis::add( pLabel, hProperty->pszHelp ); pLabel->setLineWidth( 1 ); pLabel->setText( hProperty->szName ); pLabel->setMinimumSize( pLabel->sizeHint() ); pLabel->setFixedHeight( pLabel->sizeHint().height() ); pGridLayout->addWidget( pLabel, nProperty, 0 ); } // 2ND COLUMN IS WHERE THE USER ENTERS DATA SO CREATE A WIDGET THAT IS MEANINGFULL switch ( hProperty->nPromptType ) { case ODBCINST_PROMPTTYPE_LABEL: { QLabel *pLabel2 = new QLabel( pMainWidget ); if ( hProperty->pszHelp ) QWhatsThis::add( pLabel2, hProperty->pszHelp ); pLabel2->setFrameStyle( QFrame::Box | QFrame::Sunken ); pLabel2->setLineWidth( 1 ); pLabel2->setText( hProperty->szValue ); pLabel2->setMinimumSize( pLabel2->sizeHint() ); pLabel2->setFixedHeight( pLabel2->sizeHint().height() ); pGridLayout->addWidget( pLabel2, nProperty, 1 ); hProperty->pWidget = pLabel2; if ( hProperty->pszHelp ) QToolTip::add( pLabel2, hProperty->pszHelp ); } break; case ODBCINST_PROMPTTYPE_LISTBOX: { #ifdef QT_V4LAYOUT Q3ComboBox *pComboBox = new Q3ComboBox( pMainWidget ); #else QComboBox *pComboBox = new QComboBox( pMainWidget ); #endif if ( hProperty->pszHelp ) QWhatsThis::add( pComboBox, hProperty->pszHelp ); pComboBox->insertStrList( (const char **)hProperty->aPromptData ); pComboBox->setMinimumSize( pComboBox->sizeHint() ); pComboBox->setFixedHeight( pComboBox->sizeHint().height() ); pGridLayout->addWidget( pComboBox, nProperty, 1 ); hProperty->pWidget = pComboBox; if ( hProperty->pszHelp ) QToolTip::add( pComboBox, hProperty->pszHelp ); setCurrentItem( pComboBox, hProperty->szValue ); } break; case ODBCINST_PROMPTTYPE_COMBOBOX: { #ifdef QT_V4LAYOUT Q3ComboBox *pComboBox = new Q3ComboBox( true, pMainWidget ); #else QComboBox *pComboBox = new QComboBox( true, pMainWidget ); #endif if ( hProperty->pszHelp ) QWhatsThis::add( pComboBox, hProperty->pszHelp ); pComboBox->insertStrList( (const char **)hProperty->aPromptData ); pComboBox->setEditText( hProperty->szValue ); pComboBox->setMinimumSize( pComboBox->sizeHint() ); pComboBox->setFixedHeight( pComboBox->sizeHint().height() ); pGridLayout->addWidget( pComboBox, nProperty, 1 ); hProperty->pWidget = pComboBox; if ( hProperty->pszHelp ) QToolTip::add( pComboBox, hProperty->pszHelp ); } break; case ODBCINST_PROMPTTYPE_FILENAME: { CFileSelector *pFileSelector = new CFileSelector( pMainWidget ); if ( hProperty->pszHelp ) QWhatsThis::add( pFileSelector, hProperty->pszHelp ); pFileSelector->pLineEdit->setText( hProperty->szValue ); pGridLayout->addWidget( pFileSelector, nProperty, 1 ); hProperty->pWidget = pFileSelector; if ( hProperty->pszHelp ) QToolTip::add( pFileSelector, hProperty->pszHelp ); } break; case ODBCINST_PROMPTTYPE_HIDDEN: delete pLabel; break; default: // PROMPTTYPE_TEXTEDIT and PROMPTTYPE_TEXTEDIT_PASSWORD { QLineEdit *pLineEdit = new QLineEdit( pMainWidget ); if ( hProperty->pszHelp ) QWhatsThis::add( pLineEdit, hProperty->pszHelp ); pLineEdit->setText( hProperty->szValue ); pLineEdit->setMinimumHeight( pLineEdit->sizeHint().height() ); pLineEdit->setFixedHeight( pLineEdit->sizeHint().height() ); if (hProperty->nPromptType == ODBCINST_PROMPTTYPE_TEXTEDIT_PASSWORD) pLineEdit->setEchoMode( QLineEdit::Password ) ; pGridLayout->addWidget( pLineEdit, nProperty, 1 ); pLabel->setBuddy( pLineEdit ); hProperty->pWidget = pLineEdit; if ( hProperty->pszHelp ) QToolTip::add( pLineEdit, hProperty->pszHelp ); } } } /* SPACER */ QLabel *pSpacer = new QLabel( pMainWidget ); pTopLayout->addWidget( pSpacer, 11 ); pTopLayout->activate(); pMainWidget->show(); } CProperties::~CProperties() { } /* void resizeEvent( QResizeEvent *p ) { pTopLayout->resize( p->size() ); } */ void CProperties::pbOk_Clicked() { HODBCINSTPROPERTY hProperty; // COLLECT ALL VALUES for ( hProperty = hFirstProperty; hProperty != NULL; hProperty = hProperty->pNext ) { if ( hProperty == hFirstProperty ) { // // check name is filled in // if ( ((QLineEdit *)hProperty->pWidget)->text().isEmpty()) { return; } } switch ( hProperty->nPromptType ) { case ODBCINST_PROMPTTYPE_LABEL: { strncpy( hProperty->szValue, ((QLabel *)hProperty->pWidget)->text(), INI_MAX_PROPERTY_VALUE ); } break; case ODBCINST_PROMPTTYPE_LISTBOX: case ODBCINST_PROMPTTYPE_COMBOBOX: { #ifdef QT_V4LAYOUT strncpy( hProperty->szValue, ((Q3ComboBox *)hProperty->pWidget)->currentText(), INI_MAX_PROPERTY_VALUE ); #else strncpy( hProperty->szValue, ((QComboBox *)hProperty->pWidget)->currentText(), INI_MAX_PROPERTY_VALUE ); #endif } break; case ODBCINST_PROMPTTYPE_FILENAME: { strncpy( hProperty->szValue, ((CFileSelector *)hProperty->pWidget)->pLineEdit->text(), INI_MAX_PROPERTY_VALUE ); } break; case ODBCINST_PROMPTTYPE_HIDDEN: break; default: // PROMPTTYPE_TEXTEDIT and PROMPTTYPE_TEXTEDIT_PASSWORD { strncpy( hProperty->szValue, ((QLineEdit *)hProperty->pWidget)->text(), INI_MAX_PROPERTY_VALUE ); } } } // for // LET CALLER KNOW WHAT TO DO NEXT emit Ok(); } void CProperties::pbCancel_Clicked() { emit Cancel(); } #ifdef QT_V4LAYOUT void CProperties::setCurrentItem( Q3ComboBox *pComboBox, char *pszItem ) #else void CProperties::setCurrentItem( QComboBox *pComboBox, char *pszItem ) #endif { QString stringItem; int n = 0; int nCurItem = 0; stringItem = pszItem; nCurItem = pComboBox->currentItem(); for ( n=0; n < pComboBox->count(); n++ ) { pComboBox->setCurrentItem( n ); if ( stringItem == pComboBox->currentText() ) { return; } } pComboBox->setCurrentItem( nCurItem ); } unixODBC-2.2.14-p2/odbcinstQ/CPropertiesFrame.cpp0100644000076400007640000000321311032156652020041 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "CPropertiesFrame.h" CPropertiesFrame::CPropertiesFrame( QWidget* parent, const char* name, HODBCINSTPROPERTY hTheFirstProperty ) : QDialog( parent, name, true ) { setSizeGripEnabled( true ); QGridLayout *playoutTop = new QGridLayout( this, 2, 1 ); playoutTop->setSpacing( 5 ); playoutTop->setMargin( 5 ); pProperties = new CProperties( this, 0, hTheFirstProperty ); playoutTop->addWidget( pProperties, 0, 0 ); connect( pProperties, SIGNAL(Ok()), this, SLOT(doOk()) ); connect( pProperties, SIGNAL(Cancel()), this, SLOT(doCancel()) ); doLoadState(); } CPropertiesFrame::~CPropertiesFrame() { doSaveState(); } void CPropertiesFrame::doLoadState() { #if QT_VERSION>=300 QSettings settings; int nW = settings.readNumEntry( "/unixODBC/CPropertiesFrame/w", geometry().width() ); int nH = settings.readNumEntry( "/unixODBC/CPropertiesFrame/h", geometry().height() ); resize( nW, nH ); #endif } void CPropertiesFrame::doSaveState() { #if QT_VERSION>=300 QSettings settings; settings.writeEntry( "/unixODBC/CPropertiesFrame/w", width() ); settings.writeEntry( "/unixODBC/CPropertiesFrame/h", height() ); #endif } void CPropertiesFrame::doOk() { accept(); } void CPropertiesFrame::doCancel() { reject(); } unixODBC-2.2.14-p2/odbcinstQ/CSplashDialog.cpp0100644000076400007640000000202011032156653017300 0ustar nicknick#include "CSplashDialog.h" #include "Splash.xpm" CSplashDialog::CSplashDialog( QWidget *pwidgetParent ) : QDialog( pwidgetParent, 0, true, Qt::WStyle_Customize | Qt::WStyle_NoBorder ) { #if defined( OSXHEADER ) setErasePixmap( xpmSplash ); QGridLayout *pgridlayoutTop = new QGridLayout( this, 2, 1, 0 ); QGridLayout *pgridlayout = new QGridLayout( 1, 2, 0 ); pgridlayoutTop->addLayout( pgridlayout, 1, 0 ); pgridlayoutTop->setRowStretch( 0, 10 ); pgridlayout->setColStretch( 0, 10 ); pcheckbox = new QCheckBox( "Never show again", this ); QPushButton *ppushbutton = new QPushButton( "Ok", this ); pgridlayout->addWidget( pcheckbox, 0, 0 ); pgridlayout->addWidget( ppushbutton, 0, 1 ); connect( ppushbutton, SIGNAL(clicked()), SLOT(accept()) ); resize( 360, 240 ); #endif } CSplashDialog::~CSplashDialog() { #if defined( OSXHEADER ) if ( pcheckbox->isChecked() ) { QSettings settings; settings.writeEntry( "/unixODBC/NoSplash", 1 ); } #endif } unixODBC-2.2.14-p2/odbcinstQ/CStatDetails.cpp0100644000076400007640000000510211032156654017154 0ustar nicknick#include "CStatDetails.h" #include "info.xpm" CStatDetails::CStatDetails( QWidget* parent, const char* name ) : QWidget( parent, name, 0 ) { QGridLayout * pLayoutTop = new QGridLayout( this, 1, 1 ); // Table #ifdef QT_V4LAYOUT pTable = new Q3Table( MAXPROCESSES, MAXHANDLES+1, this ); #else pTable = new QTable( MAXPROCESSES, MAXHANDLES+1, this ); #endif pTable->setLeftMargin( 0 ); pTable->verticalHeader()->hide(); #ifdef QT_V4LAYOUT Q3Header * pHeader = pTable->horizontalHeader(); #else QHeader * pHeader = pTable->horizontalHeader(); #endif pHeader->setLabel( 0, "PID" ); pHeader->setLabel( 1, "Environments" ); pHeader->setLabel( 2, "Connections" ); pHeader->setLabel( 3, "Statements" ); pHeader->setLabel( 4, "Descriptors" ); pLayoutTop->addWidget( pTable, 0, 0 ); resize( 400,300 ); setMinimumSize( 0, 0 ); setMaximumSize( 32767, 32767 ); // SHARED MEM hStats = 0; // TIMER pTimer = new QTimer( this ); connect( pTimer, SIGNAL(timeout()), SLOT(showStats()) ); pTimer->start( 700, FALSE ); } CStatDetails::~CStatDetails() { uodbc_close_stats( hStats ); } void CStatDetails::showStats() { int nPIDs = 0; int nPID = 0; int nHandles = 0; int nHandle = 0; QString qs; if ( this->isVisible() ) { if ( !hStats ) if ( uodbc_open_stats( &hStats, UODBC_STATS_READ ) != 0 ); nPIDs = uodbc_get_stats( hStats, 0, aPIDs, MAXPROCESSES ); for ( nPID = 0; nPID < MAXPROCESSES; nPID++ ) { if ( nPID < nPIDs ) { nHandles = uodbc_get_stats( hStats, aPIDs[nPID].value.l_value, aHandles, MAXHANDLES ); if ( nHandles > 0 ) { qs.sprintf( "%d", aPIDs[nPID].value.l_value ); pTable->setText( nPID, 0, qs ); for ( nHandle = 0; nHandle < MAXHANDLES; nHandle++ ) { qs.sprintf( "%d", aHandles[nHandle].value.l_value ); pTable->setText( nPID, nHandle + 1, qs ); } } else clearRow( nPID ); } else clearRow( nPID ); } } /* { char szError[501]; szError[0] = '\0'; uodbc_stats_error( szError, sizeof(szError)-1 ); } */ } void CStatDetails::clearRow( int nRow ) { int nCol; for ( nCol = 0; nCol < pTable->numCols(); nCol++ ) { pTable->setText( nRow, nCol, "" ); } } unixODBC-2.2.14-p2/odbcinstQ/CStatSummary.cpp0100644000076400007640000000744611032156654017241 0ustar nicknick#include "CStatSummary.h" #include "info.xpm" CStatSummary::CStatSummary( QWidget* parent, const char* name ) : QWidget( parent, name, 0 ) { QBoxLayout *playoutTop = new QVBoxLayout( this, 5 ); QGridLayout *playoutSliders = new QGridLayout( playoutTop, 3, 4 ); nSliderMax = 10; pEnv = new QLabel( "0", this ); pCon = new QLabel( "0", this ); pSta = new QLabel( "0", this ); pDes = new QLabel( "0", this ); playoutSliders->addWidget( pEnv, 0, 0 ); playoutSliders->addWidget( pCon, 0, 1 ); playoutSliders->addWidget( pSta, 0, 2 ); playoutSliders->addWidget( pDes, 0, 3 ); pEnvSlider = new QSlider( this ); pConSlider = new QSlider( this ); pStaSlider = new QSlider( this ); pDesSlider = new QSlider( this ); // pEnvSlider->setTickmarks( QSlider::Both ); // pConSlider->setTickmarks( QSlider::Both ); // pStaSlider->setTickmarks( QSlider::Both ); // pDesSlider->setTickmarks( QSlider::Both ); pEnvSlider->setMinValue( 0-nSliderMax ); pConSlider->setMinValue( 0-nSliderMax ); pStaSlider->setMinValue( 0-nSliderMax ); pDesSlider->setMinValue( 0-nSliderMax ); pEnvSlider->setMaxValue( 0 ); pConSlider->setMaxValue( 0 ); pStaSlider->setMaxValue( 0 ); pDesSlider->setMaxValue( 0 ); playoutSliders->addWidget( pEnvSlider, 1, 0 ); playoutSliders->addWidget( pConSlider, 1, 1 ); playoutSliders->addWidget( pStaSlider, 1, 2 ); playoutSliders->addWidget( pDesSlider, 1, 3 ); QLabel *p1 = new QLabel( "Env", this ); QLabel *p2 = new QLabel( "Con", this ); QLabel *p3 = new QLabel( "Sta", this ); QLabel *p4 = new QLabel( "Des", this ); playoutSliders->addWidget( p1, 2, 0 ); playoutSliders->addWidget( p2, 2, 1 ); playoutSliders->addWidget( p3, 2, 2 ); playoutSliders->addWidget( p4, 2, 3 ); resize( 400,300 ); setMinimumSize( 0, 0 ); setMaximumSize( 32767, 32767 ); // SHARED MEM hStats = 0; // TIMER pTimer = new QTimer( this ); connect( pTimer, SIGNAL(timeout()), SLOT(showStats()) ); pTimer->start( 700, FALSE ); } CStatSummary::~CStatSummary() { uodbc_close_stats( hStats ); } void CStatSummary::showStats() { if ( this->isVisible() ) { if ( !hStats ) if ( uodbc_open_stats( &hStats, UODBC_STATS_READ ) != 0 ); if ( uodbc_get_stats( hStats, -1, aStats, 4 ) == 4 ) { QString qs; if ( aStats[0].value.l_value > nSliderMax ) nSliderMax = aStats[0].value.l_value; if ( aStats[1].value.l_value > nSliderMax ) nSliderMax = aStats[1].value.l_value; if ( aStats[2].value.l_value > nSliderMax ) nSliderMax = aStats[2].value.l_value; if ( aStats[3].value.l_value > nSliderMax ) nSliderMax = aStats[3].value.l_value; qs.sprintf( "%d", aStats[0].value.l_value ); pEnv->setText( qs ); pEnvSlider->setMinValue( 0-nSliderMax ); pEnvSlider->setValue( 0-aStats[0].value.l_value ); qs.sprintf( "%d", aStats[1].value.l_value ); pCon->setText( qs ); pConSlider->setMinValue( 0-nSliderMax ); pConSlider->setValue( 0-aStats[1].value.l_value ); qs.sprintf( "%d", aStats[2].value.l_value ); pSta->setText( qs ); pStaSlider->setMinValue( 0-nSliderMax ); pStaSlider->setValue( 0-aStats[2].value.l_value ); qs.sprintf( "%d", aStats[3].value.l_value ); pDes->setText( qs ); pDesSlider->setMinValue( 0-nSliderMax ); pDesSlider->setValue( 0-aStats[3].value.l_value ); } } /* else { char szError[501]; szError[0] = '\0'; pEnv->setText( uodbc_stats_error( szError, sizeof(szError)-1 ) ); } */ } unixODBC-2.2.14-p2/odbcinstQ/CStats.cpp0100644000076400007640000000262311032156655016037 0ustar nicknick#include "CStats.h" #include "stats.xpm" CStats::CStats( QWidget* parent, const char* name ) : QWidget( parent, name, 0 ) { QVBoxLayout * playoutTop; QBoxLayout * playoutContent; QBoxLayout * playoutHelp; QFrame * pframeHelp; QLabel * plabelIcon; QLabel * plabelHelp; playoutTop = new QVBoxLayout( this, 5 ); // main frame playoutContent = new QHBoxLayout( playoutTop, 5 ); pSummary = new CStatSummary( this ); pDetails = new CStatDetails( this ); playoutContent->addWidget( pSummary ); playoutContent->addWidget( pDetails ); // help frame pframeHelp = new QFrame( this, "pframeHelp" ); pframeHelp->setFrameStyle( QFrame::Box | QFrame::Raised ); playoutTop->addWidget( pframeHelp ); // help text playoutHelp = new QHBoxLayout( pframeHelp, 5 ); plabelIcon = new QLabel( pframeHelp, "Label_2" ); plabelIcon->setPixmap( xpmStats ); plabelHelp = new QLabel( pframeHelp, "Label_1" ); plabelHelp->setText( "These are the number of active ODBC; environments, connections, statements and descriptors." ); #ifdef QT_V4LAYOUT plabelHelp->setAlignment( Qt::AlignLeft | Qt::WordBreak ); #else plabelHelp->setAlignment( AlignLeft | WordBreak ); #endif playoutHelp->addWidget( plabelIcon ); playoutHelp->addWidget( plabelHelp, 10 ); } CStats::~CStats() { } unixODBC-2.2.14-p2/odbcinstQ/CSystemDSN.cpp0100644000076400007640000001046011032156656016571 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "CSystemDSN.h" #include "dsn-system.xpm" CSystemDSN::CSystemDSN( QWidget* parent, const char* name ) : QWidget( parent, name ) { QVBoxLayout *playoutTop = new QVBoxLayout( this, 5 ); QHBoxLayout *playoutMain = new QHBoxLayout( playoutTop ); pDSNList = new CDSNList( this, "pDSNList" ); pDSNList->setGeometry( 10, 10, 270, 190 ); pDSNList->setMinimumSize( 50, 50 ); pDSNList->setMaximumSize( 32767, 32767 ); playoutMain->addWidget( pDSNList, 10 ); QVBoxLayout *playoutButtons = new QVBoxLayout( playoutMain, 5 ); pbAdd = new QPushButton( this, "pbAdd" ); pbAdd->setGeometry( 290, 10, 100, 30 ); pbAdd->setMinimumSize( 0, 0 ); pbAdd->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbAdd->setFocusPolicy( Qt::TabFocus ); pbAdd->setBackgroundMode( Qt::PaletteBackground ); #else pbAdd->setFocusPolicy( QWidget::TabFocus ); pbAdd->setBackgroundMode( QWidget::PaletteBackground ); #endif pbAdd->setText( "A&dd..." ); pbAdd->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbAdd->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbAdd ); pbRemove = new QPushButton( this, "pbRemove" ); pbRemove->setGeometry( 290, 50, 100, 30 ); pbRemove->setMinimumSize( 0, 0 ); pbRemove->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbRemove->setFocusPolicy( Qt::TabFocus ); pbRemove->setBackgroundMode( Qt::PaletteBackground ); #else pbRemove->setFocusPolicy( QWidget::TabFocus ); pbRemove->setBackgroundMode( QWidget::PaletteBackground ); #endif pbRemove->setText( "&Remove" ); pbRemove->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbRemove->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbRemove ); pbConfigure = new QPushButton( this, "pbConfigure" ); pbConfigure->setGeometry( 290, 90, 100, 30 ); pbConfigure->setMinimumSize( 0, 0 ); pbConfigure->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbConfigure->setFocusPolicy( Qt::TabFocus ); pbConfigure->setBackgroundMode( Qt::PaletteBackground ); #else pbConfigure->setFocusPolicy( QWidget::TabFocus ); pbConfigure->setBackgroundMode( QWidget::PaletteBackground ); #endif pbConfigure->setText( "&Configure..." ); pbConfigure->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbConfigure->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbConfigure ); playoutButtons->addStretch( 10 ); QFrame *pframe; pframe = new QFrame( this, "Frame_2" ); pframe->setGeometry( 10, 210, 380, 80 ); pframe->setMinimumSize( 0, 0 ); pframe->setMaximumSize( 32767, 32767 ); pframe->setFrameStyle( QFrame::Box | QFrame::Raised ); playoutTop->addWidget( pframe ); QGridLayout *playoutHelp = new QGridLayout( pframe, 1, 2, 5 ); QLabel* plabel1; plabel1 = new QLabel( pframe, "Label_1" ); plabel1->setMinimumSize( 32, 32 ); // plabel1->setMaximumSize( 32, 32 ); plabel1->setPixmap( xpmDSN_System ); QLabel* plabel2; plabel2 = new QLabel( pframe, "Label_2" ); plabel2->setMinimumSize( 0, 0 ); plabel2->setMaximumSize( 32767, 32767 ); plabel2->setText( "System data sources are shared among all users of this machine. These data sources may also be used by system services. Only the administrator can configure system data sources." ); #ifdef QT_V4LAYOUT plabel2->setAlignment( Qt::AlignLeft | Qt::WordBreak ); plabel2->setWordWrap( true ); #else plabel2->setAlignment( AlignLeft | WordBreak ); #endif playoutHelp->addWidget( plabel1, 0, 0 ); playoutHelp->addWidget( plabel2, 0, 1 ); playoutHelp->setColStretch( 1, 10 ); pDSNList->Load( ODBC_SYSTEM_DSN ); connect( pbAdd, SIGNAL(clicked()), pDSNList, SLOT(Add()) ); connect( pbRemove, SIGNAL(clicked()), pDSNList, SLOT(Delete()) ); connect( pbConfigure, SIGNAL(clicked()), pDSNList, SLOT(Edit()) ); #ifdef QT_V4LAYOUT connect( pDSNList, SIGNAL(doubleClicked( Q3ListViewItem * )), pDSNList, SLOT(DoubleClick( Q3ListViewItem * ))); #else connect( pDSNList, SIGNAL(doubleClicked( QListViewItem * )), pDSNList, SLOT(DoubleClick( QListViewItem * ))); #endif } CSystemDSN::~CSystemDSN() { } unixODBC-2.2.14-p2/odbcinstQ/CTracing.cpp0100644000076400007640000001362311032156657016334 0ustar nicknick#include "CTracing.h" #include "advanced.xpm" CTracing::CTracing( QWidget* parent, const char* name ) : QWidget( parent, name, 0 ) { QBoxLayout *playoutTop = new QVBoxLayout( this, 5 ); // Tracing #ifdef QT_V4LAYOUT Q3GroupBox *pgroupbox = new Q3GroupBox( this ); #else QGroupBox *pgroupbox = new QGroupBox( this ); #endif pgroupbox->setFrameStyle( QFrame::Box | QFrame::Raised ); pgroupbox->setTitle( QString("Tracing") ); playoutTop->addWidget( pgroupbox, 5 ); QGridLayout *playoutGrid = new QGridLayout( pgroupbox, 3, 2, 5 ); QLabel *plabel1 = new QLabel( "Enabled", pgroupbox, "plabel1" ); pTracing = new QCheckBox( pgroupbox, "pTracing" ); QLabel *plabel3 = new QLabel( "Force Tracing", pgroupbox, "plabel1" ); pForce = new QCheckBox( pgroupbox, "pForce" ); QLabel *plabel2 = new QLabel( "File", pgroupbox, "plabel2" ); pTraceFile = new CFileSelector( pgroupbox, "pTraceFile" ); playoutGrid->addWidget( plabel1, 1, 0 ); playoutGrid->addWidget( pTracing, 1, 1 ); playoutGrid->addWidget( plabel3, 1, 2 ); playoutGrid->addWidget( pForce, 1, 3 ); playoutGrid->addWidget( plabel2, 2, 0 ); playoutGrid->addWidget( pTraceFile, 2, 1 ); // Connection Pooling #ifdef QT_V4LAYOUT pgroupbox = new Q3GroupBox( this ); #else pgroupbox = new QGroupBox( this ); #endif pgroupbox->setFrameStyle( QFrame::Box | QFrame::Raised ); pgroupbox->setTitle( QString("Connection Pooling") ); playoutTop->addWidget( pgroupbox, 5 ); playoutGrid = new QGridLayout( pgroupbox, 3, 3, 5 ); playoutGrid->setColStretch( 2, 10 ); plabel1 = new QLabel( "Enabled", pgroupbox, "plabel1" ); pPooling = new QCheckBox( pgroupbox, "pPooling" ); playoutGrid->addWidget( plabel1, 1, 0 ); playoutGrid->addWidget( pPooling, 1, 1 ); // Buttons playoutGrid = new QGridLayout( playoutTop, 1, 5, 2 ); QPushButton *pSetDefault = new QPushButton( "De&fault", this ); QPushButton *pApply = new QPushButton( "A&pply", this ); playoutGrid->addWidget( pSetDefault, 1, 1 ); playoutGrid->addWidget( pApply, 1, 3 ); // helpt text QFrame *pframe; pframe = new QFrame( this, "Frame_7" ); pframe->setFrameStyle( QFrame::Box | QFrame::Raised ); playoutTop->addWidget( pframe, 4 ); playoutGrid = new QGridLayout( pframe, 1, 2, 5 ); plabel1 = new QLabel( pframe, "Label_1" ); plabel1->setGeometry( 20, 20, 32, 32 ); plabel1->setPixmap( xpmAdvanced ); plabel1->setMinimumSize( 32, 32 ); // plabel1->setMaximumSize( 32, 32 ); plabel2 = new QLabel( pframe, "Label_2" ); plabel2->setText( "These options are global. As such, they can only be set by the system administrator or someone else with 'root' access. Turn Tracing on to enable logging of calls. Turn Pooling on to enable Driver Pooling options." ); #ifdef QT_V4LAYOUT plabel2->setAlignment( Qt::AlignLeft | Qt::WordBreak ); plabel2->setWordWrap( true ); #else plabel2->setAlignment( AlignLeft | WordBreak ); #endif playoutGrid->addWidget( plabel1, 0, 0 ); playoutGrid->addWidget( plabel2, 0, 1 ); playoutGrid->setColStretch( 1, 10 ); // init values char szTracing[10]; char szForce[10]; char szTracingFile[FILENAME_MAX]; char szPooling[10]; char szGUIPlugin[FILENAME_MAX]; SQLGetPrivateProfileString( "ODBC", "Trace", "No", szTracing, sizeof(szTracing), "odbcinst.ini" ); if ( szTracing[0] == '1' || toupper( szTracing[0] ) == 'Y' || ( toupper( szTracing[0] ) == 'O' && toupper( szForce[0] ) == 'N' )) pTracing->setChecked( true ); SQLGetPrivateProfileString( "ODBC", "ForceTrace", "No", szForce, sizeof(szForce), "odbcinst.ini" ); if ( szForce[0] == '1' || toupper( szForce[0] ) == 'Y' || ( toupper( szForce[0] ) == 'O' && toupper( szForce[0] ) == 'N' )) pForce->setChecked( true ); SQLGetPrivateProfileString( "ODBC", "TraceFile", "/tmp/sql.log", szTracingFile, sizeof(szTracingFile)-1, "odbcinst.ini" ); pTraceFile->pLineEdit->setText( szTracingFile ); SQLGetPrivateProfileString( "ODBC", "Pooling", "No", szPooling, sizeof(szPooling), "odbcinst.ini" ); if ( szPooling[0] == '1' || toupper( szPooling[0] ) == 'Y' || ( toupper( szPooling[0] ) == 'O' && toupper( szForce[0] ) == 'N' )) pPooling->setChecked( true ); connect( pSetDefault, SIGNAL(clicked()), SLOT(setDefault()) ); connect( pApply, SIGNAL(clicked()), SLOT(apply()) ); } CTracing::~CTracing() { } // slots void CTracing::setDefault() { pTracing->setChecked( false ); pTraceFile->pLineEdit->setText( "/tmp/sql.log" ); pPooling->setChecked( false ); } void CTracing::apply() { char szTracing[10]; char szForce[10]; char szTracingFile[FILENAME_MAX+1]; char szPooling[10]; if ( pTracing->isChecked() ) strcpy( szTracing, "Yes" ); else strcpy( szTracing, "No" ); if ( pForce->isChecked() ) strcpy( szForce, "Yes" ); else strcpy( szForce, "No" ); if ( pPooling->isChecked() ) strcpy( szPooling, "Yes" ); else strcpy( szPooling, "No" ); if ( !SQLWritePrivateProfileString( "ODBC", "Trace", szTracing, "odbcinst.ini" ) ) { QMessageBox::warning( this, "ODBC Config", "Could not apply. Ensure that you are operating as 'root' user." ); return; } else { strncpy( szTracingFile, pTraceFile->pLineEdit->text().ascii(), FILENAME_MAX ); SQLWritePrivateProfileString( "ODBC", "TraceFile", szTracingFile, "odbcinst.ini" ); SQLWritePrivateProfileString( "ODBC", "ForceTrace", szForce, "odbcinst.ini" ); SQLWritePrivateProfileString( "ODBC", "Pooling", szPooling, "odbcinst.ini" ); } if ( pTracing->isChecked() ) QMessageBox::information( this, "ODBC Config", "Tracing is turned on.\n\nTracing uses up a lot of disk space as all calls are logged. Ensure that you turn it off as soon as possible." ); if ( pPooling->isChecked() ) QMessageBox::information( this, "ODBC Config", "Connection Pooling is turned on.\n\nMost likely you are intending to use ODBC from a server (such as Apache). If you do not need it; turn it off... it may pose a small security risk." ); } unixODBC-2.2.14-p2/odbcinstQ/CUserDSN.cpp0100644000076400007640000001077411032156657016234 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "CUserDSN.h" #include "dsn-user.xpm" CUserDSN::CUserDSN( QWidget* parent, const char* name ) : QWidget( parent, name ) { QVBoxLayout *playoutTop = new QVBoxLayout( this, 5 ); QHBoxLayout *playoutMain = new QHBoxLayout( playoutTop ); pDSNList = new CDSNList( this, "pDSNList" ); pDSNList->setGeometry( 10, 10, 270, 190 ); pDSNList->setMinimumSize( 50, 50 ); pDSNList->setMaximumSize( 32767, 32767 ); playoutMain->addWidget( pDSNList, 10 ); QVBoxLayout *playoutButtons = new QVBoxLayout( playoutMain, 5 ); pbAdd = new QPushButton( this, "pbAdd" ); pbAdd->setGeometry( 290, 10, 100, 30 ); pbAdd->setMinimumSize( 0, 0 ); pbAdd->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbAdd->setFocusPolicy( Qt::TabFocus ); pbAdd->setBackgroundMode( Qt::PaletteBackground ); #else pbAdd->setFocusPolicy( QWidget::TabFocus ); pbAdd->setBackgroundMode( QWidget::PaletteBackground ); #endif pbAdd->setText( "A&dd..." ); pbAdd->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbAdd->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbAdd ); pbRemove = new QPushButton( this, "pbRemove" ); pbRemove->setGeometry( 290, 50, 100, 30 ); pbRemove->setMinimumSize( 0, 0 ); pbRemove->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbRemove->setFocusPolicy( Qt::TabFocus ); pbRemove->setBackgroundMode( Qt::PaletteBackground ); #else pbRemove->setFocusPolicy( QWidget::TabFocus ); pbRemove->setBackgroundMode( QWidget::PaletteBackground ); #endif pbRemove->setText( "&Remove" ); pbRemove->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbRemove->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbRemove ); pbConfigure = new QPushButton( this, "pbConfigure" ); pbConfigure->setGeometry( 290, 90, 100, 30 ); pbConfigure->setMinimumSize( 0, 0 ); pbConfigure->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pbConfigure->setFocusPolicy( Qt::TabFocus ); pbConfigure->setBackgroundMode( Qt::PaletteBackground ); #else pbConfigure->setFocusPolicy( QWidget::TabFocus ); pbConfigure->setBackgroundMode( QWidget::PaletteBackground ); #endif pbConfigure->setText( "&Configure..." ); pbConfigure->setAutoRepeat( FALSE ); #ifndef QT_V4LAYOUT pbConfigure->setAutoResize( FALSE ); #endif playoutButtons->addWidget( pbConfigure ); playoutButtons->addStretch( 10 ); // help text QFrame *pframe; pframe = new QFrame( this, "Frame_2" ); pframe->setGeometry( 10, 210, 380, 80 ); pframe->setMinimumSize( 0, 0 ); pframe->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT pframe->setFocusPolicy( Qt::NoFocus ); pframe->setBackgroundMode( Qt::PaletteBackground ); #else pframe->setFocusPolicy( QWidget::NoFocus ); pframe->setBackgroundMode( QWidget::PaletteBackground ); #endif pframe->setFrameStyle( QFrame::Box | QFrame::Raised ); playoutTop->addWidget( pframe ); QGridLayout *playoutHelp = new QGridLayout( pframe, 1, 2, 5 ); QLabel* plabel1; plabel1 = new QLabel( pframe, "Label_1" ); plabel1->setMinimumSize( 32, 32 ); // plabel1->setMaximumSize( 32, 32 ); plabel1->setPixmap( xpmDSN_User ); QLabel* plabel2; plabel2 = new QLabel( pframe, "Label_2" ); plabel2->setMinimumSize( 0, 0 ); plabel2->setMaximumSize( 32767, 32767 ); plabel2->setText( "User data source configuration is stored in your home directory. This allows you to configure data access without having to be the system administrator." ); #ifdef QT_V4LAYOUT plabel2->setAlignment( Qt::AlignLeft | Qt::WordBreak ); plabel2->setWordWrap( true ); #else plabel2->setAlignment( AlignLeft | WordBreak ); #endif playoutHelp->addWidget( plabel1, 0, 0 ); playoutHelp->addWidget( plabel2, 0, 1 ); playoutHelp->setColStretch( 1, 10 ); pDSNList->Load( ODBC_USER_DSN ); connect( pbAdd, SIGNAL(clicked()), pDSNList, SLOT(Add()) ); connect( pbRemove, SIGNAL(clicked()), pDSNList, SLOT(Delete()) ); connect( pbConfigure, SIGNAL(clicked()), pDSNList, SLOT(Edit()) ); #ifdef QT_V4LAYOUT connect( pDSNList, SIGNAL(doubleClicked( Q3ListViewItem * )), pDSNList, SLOT(DoubleClick( Q3ListViewItem * ))); #else connect( pDSNList, SIGNAL(doubleClicked( QListViewItem * )), pDSNList, SLOT(DoubleClick( QListViewItem * ))); #endif } CUserDSN::~CUserDSN() { } unixODBC-2.2.14-p2/odbcinstQ/SQLManageDataSources.cpp0100644000076400007640000000430611163161132020533 0ustar nicknick/************************************************** * SQLManageDataSources * ************************************************** * * This library should only be used by odbcinst! * * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 26.OCT.01 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com * Nick Gorham - nick@easysoft.com **************************************************/ #include #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #else #include #include #if QT_VERSION<300 #include #endif #endif #include "CODBCConfig.h" #include "CODBCCreate.h" static BOOL SQLManage( HWND hWnd ) { // // This will allow us to call this from a non QT app // if ( !qApp ) { int argc = 1; char *argv[] = { "odbcinstQ", NULL }; static QApplication a( argc, argv ); } QWidget *pwidget = (QWidget*)hWnd; #if QT_VERSION<300 CODBCConfig odbcconfig( pwidget, "ODBCConfig", Qt::WType_Modal ); #else CODBCConfig odbcconfig( pwidget, "ODBCConfig", Qt::WType_Dialog | Qt::WShowModal ); #endif odbcconfig.exec(); return true; } static BOOL SQLCreate( HWND hWnd, LPCSTR dsn ) { // // This will allow us to call this from a non QT app // if ( !qApp ) { int argc = 1; char *argv[] = { "odbcinstQ", NULL }; static QApplication a( argc, argv ); } QWidget *pwidget = (QWidget*)hWnd; #if QT_VERSION<300 CODBCCreate odbccreate( pwidget, "ODBCCreate" ); #else CODBCCreate odbccreate( pwidget, "ODBCCreate" ); #endif odbccreate.setDsn( dsn ); odbccreate.exec(); return odbccreate.getRetCode(); } #ifdef __cplusplus extern "C" { #endif BOOL QTSQLManageDataSources( HWND hWnd ) { return SQLManage( hWnd ); } BOOL QTSQLCreateDataSources( HWND hWnd, LPCSTR lpszDS ) { return SQLCreate( hWnd, lpszDS ); } BOOL ODBCManageDataSources( HWND hWnd ) { return SQLManage( hWnd ); } BOOL ODBCCreateDataSource( HWND hWnd, LPCSTR lpszDS ) { return SQLCreate( hWnd, lpszDS ); } #ifdef __cplusplus }; #endif unixODBC-2.2.14-p2/odbcinstQ/CAbout.h0100644000076400007640000000273111032156627015457 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CAbout_included #define CAbout_included #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #endif #include "CCredits.h" class CAboutDiagram : public QWidget { Q_OBJECT public: CAboutDiagram( QWidget* pwidgetParent = NULL, const char* pszName = NULL ); virtual ~CAboutDiagram(); protected slots: void pbODBCConfig_Clicked(); void pbODBC_Clicked(); void pbDatabase_Clicked(); void pbDriverManager_Clicked(); void pbDriver_Clicked(); void pbODBCDrivers_Clicked(); void pbApplication_Clicked(); }; class CAbout : public QWidget { Q_OBJECT public: CAbout( QWidget* pwidgetPrent = NULL, const char* pszName = NULL ); virtual ~CAbout(); protected slots: void pbCredits_Clicked(); }; #endif unixODBC-2.2.14-p2/odbcinstQ/CTracing.h0100644000076400007640000000161011032156636015767 0ustar nicknick#ifndef CLASSTRACING_H #define CLASSTRACING_H #include #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #endif #include "CFileSelector.h" class CTracing : public QWidget { Q_OBJECT public: CTracing( QWidget* parent = NULL, const char* name = NULL ); virtual ~CTracing(); public slots: void setDefault(); void apply(); protected: QCheckBox * pTracing; QCheckBox * pForce; CFileSelector * pTraceFile; QCheckBox * pPooling; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CStats.h0100644000076400007640000000124011032156635015474 0ustar nicknick#ifndef CLASSSTATS_H #define CLASSSTATS_H #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include "CStatSummary.h" #include "CStatDetails.h" class CStats : public QWidget { Q_OBJECT public: CStats( QWidget* parent = NULL, const char* name = NULL ); virtual ~CStats(); public slots: protected: protected slots: private: CStatSummary * pSummary; CStatDetails * pDetails; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CStatSummary.h0100644000076400007640000000214311032156635016672 0ustar nicknick#ifndef CLASSSTATSUMMARY_H #define CLASSSTATSUMMARY_H #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #include #include #endif #include class CStatSummary : public QWidget { Q_OBJECT public: CStatSummary( QWidget* parent = NULL, const char* name = NULL ); virtual ~CStatSummary(); QTimer *pTimer; QLabel *pEnv; QLabel *pCon; QLabel *pSta; QLabel *pDes; QSlider *pEnvSlider; QSlider *pConSlider; QSlider *pStaSlider; QSlider *pDesSlider; protected: int nSliderMax; protected slots: void showStats(); private: void *hStats; uodbc_stats_retentry aStats[4]; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CSplashDialog.h0100644000076400007640000000124611032156634016755 0ustar nicknick#ifndef CSPLASHDIALOG_H #define CSPLASHDIALOG_H #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #if (QT_VERSION>=300) #include #endif #endif class CSplashDialog : public QDialog { public: CSplashDialog( QWidget *pwidgetParent ); virtual ~CSplashDialog(); protected: QCheckBox *pcheckbox; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CStatDetails.h0100644000076400007640000000217511032156635016627 0ustar nicknick#ifndef CLASSSTATDETAILS_H #define CLASSSTATDETAILS_H #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #include #include #endif #include #define MAXPROCESSES 10 #define MAXHANDLES 4 class CStatDetails : public QWidget { Q_OBJECT public: CStatDetails( QWidget* parent = NULL, const char* name = NULL ); virtual ~CStatDetails(); QTimer *pTimer; protected: void clearRow( int nRow ); protected slots: void showStats(); private: #ifdef QT_V4LAYOUT Q3Table * pTable; #else QTable * pTable; #endif void * hStats; uodbc_stats_retentry aPIDs[MAXPROCESSES]; uodbc_stats_retentry aHandles[MAXHANDLES]; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CDLL.h0100644000076400007640000000130111032156630015002 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CDLL_included #define CDLL_included #include #include typedef void (*HCBDPROC)( void * ); typedef lt_dlhandle HCBDDLL; class CDLL { public: CDLL( char *szFileName ); ~CDLL(); int Symbol( HCBDPROC *hProc, char *szSymbol ); char szError[501]; private: HCBDDLL hDLL; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CDSNList.h0100644000076400007640000000314211032156630015654 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CDSNList_included #define CDSNList_included #ifdef QT_V4LAYOUT #define QT3_SUPPORT #endif #include #include #include #include #include #include #include #include #include #include #include "CDriverPrompt.h" #include "CPropertiesFrame.h" #include "CDLL.h" #define ODBC_HELP_DSN_NAME "*Unique* DSN name. This is the name you use when using ODBC with applications such as StarOffice. Try to keep unusual characters and spaces out of the name." #define ODBC_HELP_DSN_DESC "DSN description. A long, perhaps more meaningfull name." #define ODBC_HELP_DSN_UNKNOWN "No help for this DSN property. Please check with the vendor of the driver... perhaps their web site" #ifdef QT_V4LAYOUT #define LView Q3ListView #define LViewItem Q3ListViewItem #else #define LView QListView #define LViewItem QListViewItem #endif class CDSNList : public QListView { Q_OBJECT public: CDSNList( QWidget* parent = NULL, const char* name = NULL ); ~CDSNList(); void Load( int nSource ); public slots: void Add(); void Edit(); void Delete(); void DoubleClick( QListViewItem *itm ); private: int nSource; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CDSNList4.h0100644000076400007640000000320711032156630015742 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CDSNList_included #define CDSNList_included #define QT3_SUPPORT #include #include #include #include #include #include #include #include #include #include #include #include #include "CDriverPrompt.h" #include "CPropertiesFrame.h" #include "CDLL.h" #define ODBC_HELP_DSN_NAME "*Unique* DSN name. This is the name you use when using ODBC with applications such as StarOffice. Try to keep unusual characters and spaces out of the name." #define ODBC_HELP_DSN_DESC "DSN description. A long, perhaps more meaningfull name." #define ODBC_HELP_DSN_UNKNOWN "No help for this DSN property. Please check with the vendor of the driver... perhaps their web site" #ifdef QT_V4LAYOUT #define LView Q3ListView #define LViewItem Q3ListViewItem #else #define LView QListView #define LViewItem QListViewItem #endif class CDSNList : public LView { Q_OBJECT public: CDSNList( QWidget* parent = NULL, const char* name = NULL ); ~CDSNList(); void Load( int nSource ); public slots: void Add(); void Edit(); void Delete(); void DoubleClick( Q3ListViewItem *itm ); private: int nSource; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CFileList.h0100644000076400007640000000341111032156632016110 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CFileList_included #define CFileList_included #include #include #include #include #include #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #else #include #include #include #include #include #endif #include "CDriverPrompt.h" #include "CPropertiesFrame.h" #include "CDLL.h" #define ODBC_HELP_DSN_NAME "*Unique* DSN name. This is the name you use when using ODBC with applications such as StarOffice. Try to keep unusual characters and spaces out of the name." #define ODBC_HELP_DSN_DESC "DSN description. A long, perhaps more meaningfull name." #define ODBC_HELP_DSN_UNKNOWN "No help for this DSN property. Please check with the vendor of the driver... perhaps their web site" #ifdef QT_V4LAYOUT #define LView Q3ListView #define LViewItem Q3ListViewItem #else #define LView QListView #define LViewItem QListViewItem #endif class CFileList : public LView { Q_OBJECT public: CFileList( QWidget* parent = NULL, const char* name = NULL ); ~CFileList(); void Load( QString *in_cwd = NULL ); QString GetDir( void ); public slots: void Add(); void Edit(); void Delete(); void NewDir(); private: int nSource; QString cwd; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CDriverPrompt.h0100644000076400007640000000222311032156631017031 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CDriverPrompt_included #define CDriverPrompt_included #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include "CDrivers.h" class CDriverPrompt : public QDialog { Q_OBJECT public: CDriverPrompt( QWidget* parent = NULL, const char* name = NULL ); ~CDriverPrompt(); QString qsDriverName; QString qsDescription; QString qsDriver; QString qsSetup; protected slots: void pbCancel_Clicked(); void pbOk_Clicked(); protected: CDrivers* pDrivers; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CDrivers.h0100644000076400007640000000653311032156631016022 0ustar nicknick/************************************************** * CDrivers * * Drivers can be accessed via at least three methods. I * show all three in use in the constructer but I * recommend using SQLDrivers in the Driver Manager as * the best method. * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CDrivers_included #define CDrivers_included #include #include #include #include #include #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #endif #include "CPropertiesFrame.h" #define ODBC_HELP_DRIVER_NAME "*Unique* driver name." #define ODBC_HELP_DRIVER_DESC "Driver description." #define ODBC_HELP_DRIVER_DRIVER "The driver. Its a share library and the filename will probably have odbc in it and it will probably end with *.so." #define ODBC_HELP_DRIVER_DRIVER64 "The driver for 64 bit environments. Its a share library and the filename will probably have odbc in it and it will probably end with *.so." #define ODBC_HELP_DRIVER_SETUP "The setup routines. Its a share library used to provide this program with DSN properties which can be presented to the user to edit. This library filename usually ends with a *S.so." #define ODBC_HELP_DRIVER_SETUP64 "The setup routines for 64 bit environments. Its a share library used to provide this program with DSN properties which can be presented to the user to edit. This library filename usually ends with a *S.so." #define ODBC_HELP_DRIVER_USAGECOUNT "The number of installs that use this driver. This driver entry should be removed when < 1." #define ODBC_HELP_DRIVER_CPTIMEOUT "Number of seconds before a connection timesout when in a Connection Pool. Leave this value blank to disable Connection Pooling." #define ODBC_HELP_DRIVER_CPREUSE "The maximum number of times a connection can be reused in a Connection Pool. Set to a lower number when dealing with drivers which have stability issues or memory leaks." #define ODBC_HELP_DRIVER_UNKNOWN "No help for this driver specific property. Please check with the vendor of the driver... perhaps their web site" class CDrivers : public QWidget { Q_OBJECT public: CDrivers( QWidget* parent = NULL, const char* name = NULL ); ~CDrivers(); #ifdef QT_V4LAYOUT Q3ListView *getListView() { return lvwDrivers; }; #else QListView *getListView() { return lvwDrivers; }; #endif public slots: void Add(); void Edit(); void Delete(); protected: QPushButton* pbAdd; QPushButton* pbRemove; QPushButton* pbConfigure; #ifdef QT_V4LAYOUT Q3ListView* lvwDrivers; #else QListView* lvwDrivers; #endif private: HINI hIni; char szINI[ODBC_FILENAME_MAX+1]; void Load(); void FreeProperties( HODBCINSTPROPERTY *hFirstProperty ); }; #endif unixODBC-2.2.14-p2/odbcinstQ/CFileSelector.h0100644000076400007640000000176611032156632016770 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CFileSelector_included #define CFileSelector_included #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #else #include #include #include #include #include #endif class CFileSelector : public QWidget { Q_OBJECT public: CFileSelector( QWidget* parent = NULL, const char* name = NULL ); ~CFileSelector(); QLineEdit *pLineEdit; QPushButton *pButton; protected slots: void pButton_Clicked(); protected: }; #endif unixODBC-2.2.14-p2/odbcinstQ/CODBCConfig.h0100644000076400007640000000337111032156633016240 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CODBCConfig_included #define CODBCConfig_included #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #if QT_VERSION>=300 #include #endif #endif #include "CUserDSN.h" #include "CSystemDSN.h" #include "CFileDSN.h" #include "CDrivers.h" #include "CAbout.h" #include "CTracing.h" #include "CStats.h" #ifdef QT_V4LAYOUT #define TDialog Q3TabDialog #else #define TDialog QTabDialog #endif class CODBCConfig : public TDialog { Q_OBJECT public: #ifdef QT_V4LAYOUT CODBCConfig( QWidget* parent = 0, const char* name = 0, Qt::WFlags nFlags = 0 ); #else CODBCConfig( QWidget* parent = 0, const char* name = 0, WFlags nFlags = 0 ); #endif virtual ~CODBCConfig(); protected: CUserDSN *pUserDSN; CSystemDSN *pSystemDSN; CFileDSN *pFileDSN; CDrivers *pDrivers; CStats *pStats; CTracing *pTracing; CAbout *pAbout; virtual void LoadState(); virtual void SaveState(); }; #endif unixODBC-2.2.14-p2/odbcinstQ/CODBCCreate.h0100644000076400007640000000702111032156633016232 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Nick Gorham nick.gorham@easysoft.com * Released under GPL 22.MAY.2006 * * Contributions from... * ----------------------------------------------- * **************************************************/ #ifndef CODBCCreate_included #define CODBCCreate_included #include #include #include #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if QT_VERSION>=300 #include #endif #include #include #if QT_VERSION>=300 #include #endif #endif #ifdef QT_V4LAYOUT #define LView Q3ListView #define LViewItem Q3ListViewItem #define Wiz Q3Wizard #else #define LView QListView #define LViewItem QListViewItem #define Wiz QWizard #endif #if (QT_VERSION<300) class QTextEdit : public QMultiLineEdit { public: QTextEdit (QWidget *, const char *); QTextEdit (QWidget *); void setMaxLength( int x ); void append( const char *str ); void maxLines( int n ); }; #endif class CODBCCreate : public Wiz { Q_OBJECT public: CODBCCreate( QWidget* parent = 0, const char* name = 0 ); virtual ~CODBCCreate(); void setDsn( const char *dsn ); int getRetCode(); void setValid( bool val ); void setKeywords( QString kw ); public slots: void fds_click(); void uds_click(); void sds_click(); void file_click(); void ad_click(); void dl_click(LViewItem*); void page_change(const QString &title ); void file_changed(const QString &text); protected: void setupPage1(); void setupPage2(); void setupPage3(); void setupPage4(); void populate(); bool createDsn(); QLabel *lab; #ifdef QT_V4LAYOUT Q3VBox *box, *box1, *box2; Q3HBox *box3; Q3HBox *box1a; Q3VButtonGroup *bg; #else QVBox *box, *box1, *box2; QHBox *box3; QHBox *box1a; QVButtonGroup *bg; #endif QGroupBox *gb; QPushButton *file_find, *advanced; QRadioButton *fds, *sds, *uds; LView *driver_list; QString current_driver, dsn; QTextEdit *arg_list; QLineEdit *file_edit; QString extra_keywords; SQLRETURN ret_code; bool verify; virtual void LoadState(); virtual void SaveState(); bool appropriate ( QWidget *page ) const; void accept (); void reject (); }; class CODBCAdvanced : public QDialog { Q_OBJECT public: #ifdef QT_V4LAYOUT CODBCAdvanced( QWidget* parent = 0, const char* name = 0, Qt::WFlags nFlags = 0 ); #else CODBCAdvanced( QWidget* parent = 0, const char* name = 0, WFlags nFlags = 0 ); #endif virtual ~CODBCAdvanced(); void setValid( bool val ); void setKeywords( QString kw ); public slots: void ad_ok(); protected: QPushButton *ok, *cancel; CODBCCreate *parent; QLabel *lab; QTextEdit *text_list; QCheckBox *valid; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CPropertiesFrame.h0100644000076400007640000000217711032156634017516 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CPropertiesFrame_included #define CPropertiesFrame_included #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #else #include #include #include #if (QT_VERSION>=300) #include #endif #endif #include #include "CProperties.h" class CPropertiesFrame : public QDialog { Q_OBJECT public: CPropertiesFrame( QWidget* parent = NULL, const char* name = NULL, HODBCINSTPROPERTY hTheFirstProperty = NULL ); ~CPropertiesFrame(); protected: virtual void doLoadState(); virtual void doSaveState(); protected slots: void doOk(); void doCancel(); private: CProperties *pProperties; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CProperties.h0100644000076400007640000000362311032156633016537 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CProperties_included #define CProperties_included #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #include #include #include #endif #include #include "CFileSelector.h" #ifdef QT_V4LAYOUT #define MWindow Q3MainWindow #define TBar Q3ToolBar #define CBox Q3ComboBox #else #define MWindow QMainWindow #define TBar QToolBar #define CBox QComboBox #endif class CProperties : public MWindow { Q_OBJECT public: CProperties( QWidget* parent = NULL, const char* name = NULL, HODBCINSTPROPERTY hTheFirstProperty = NULL ); ~CProperties(); protected: TBar *toolbarMain; // void resizeEvent( QResizeEvent *p ); protected slots: void pbOk_Clicked(); void pbCancel_Clicked(); signals: void Ok(); void Cancel(); private: QWidget *pMainWidget; int nProperties; QBoxLayout *pTopLayout; QGridLayout *pGridLayout; HODBCINSTPROPERTY hFirstProperty; void setCurrentItem( CBox *pComboBox, char *pszItem ); }; #endif unixODBC-2.2.14-p2/odbcinstQ/CSystemDSN.h0100644000076400007640000000177511032156636016245 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CSystemDSN_included #define CSystemDSN_included #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #else #include #include #include #include #endif #ifdef QT_V4LAYOUT #include "CDSNList4.h" #else #include "CDSNList.h" #endif class CSystemDSN : public QWidget { Q_OBJECT public: CSystemDSN( QWidget* parent = NULL, const char* name = NULL ); ~CSystemDSN(); protected: QPushButton* pbAdd; QPushButton* pbRemove; QPushButton* pbConfigure; CDSNList* pDSNList; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CFileDSN.h0100644000076400007640000000213111032156632015617 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com * Nick Gorham - nick@easysoft.com **************************************************/ #ifndef CFileDSN_included #define CFileDSN_included #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #else #include #include #include #include #endif #include "CFileList.h" class CFileDSN : public QWidget { Q_OBJECT public: CFileDSN( QWidget* parent = NULL, const char* name = NULL, QString *cwd = NULL ); ~CFileDSN(); public slots: void NewDir(); protected: QPushButton* pbAdd; QPushButton* pbRemove; QPushButton* pbConfigure; QPushButton* pbDir; CFileList* pFileList; QString path; QLabel* dirlab; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CUserDSN.h0100644000076400007640000000210711032156637015666 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef CUserDSN_included #define CUserDSN_included #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #ifdef QT_V4LAYOUT #include "CDSNList4.h" #else #include "CDSNList.h" #endif class CUserDSN : public QWidget { Q_OBJECT public: CUserDSN( QWidget* parent = NULL, const char* name = NULL ); ~CUserDSN(); protected: QPushButton* pbAdd; QPushButton* pbRemove; QPushButton* pbConfigure; CDSNList* pDSNList; }; #endif unixODBC-2.2.14-p2/odbcinstQ/CCredits.h0100644000076400007640000000074211032156627016002 0ustar nicknick#ifndef CLASSCREDITS_H #define CLASSCREDITS_H #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #include #include #else #include #include #include #include #include #endif class CCredits : public QDialog { Q_OBJECT public: CCredits( QWidget* parent = 0, const char* name = 0 ); virtual ~CCredits(); }; #endif unixODBC-2.2.14-p2/odbcinstQ/Splash.xpm0100644000076400007640000053333507452765231016132 0ustar nicknick/* XPM */ static const char *xpmSplash[] = { /* width height num_colors chars_per_pixel */ " 360 240 248 2", /* colors */ ".. c #040204", ".# c #1c86fc", ".a c #949694", ".b c #2c425b", ".c c #3cc6fc", ".d c #6486a0", ".e c #5ca6fc", ".f c #444244", ".g c #94cefc", ".h c #14222c", ".i c #cccecc", ".j c #7ca6c0", ".k c #0c6adc", ".l c #446280", ".m c #04228c", ".n c #7cb6e4", ".o c #b4eefc", ".p c #24a6fc", ".q c #94b6dc", ".r c #0442a4", ".s c #646264", ".t c #3c86c4", ".u c #b4d6ec", ".v c #848684", ".w c #b4b6b4", ".x c #242225", ".y c #4c62b4", ".z c #d4eafc", ".A c #7ca6dc", ".B c #5496c6", ".C c #2c6abc", ".D c #749dca", ".E c #4c729c", ".F c #040e4c", ".G c #6496bc", ".H c #94c6ed", ".I c #a4defc", ".J c #2c4a9c", ".K c #24323c", ".L c #54e6fc", ".M c #243684", ".N c #7cb6f9", ".O c #0c121c", ".P c #3c5260", ".Q c #74b6fc", ".R c #8ca6cc", ".S c #448efc", ".T c #eceeec", ".U c #6ca6dc", ".V c #a4ceee", ".W c #4c86c4", ".X c #2c76f4", ".Y c #6cd6fc", ".Z c #5c96d6", ".0 c #347ac0", ".1 c #74aeee", ".2 c #7caed4", ".3 c #546278", ".4 c #343234", ".5 c #6c86a1", ".6 c #445267", ".7 c #043294", ".8 c #0c52ae", ".9 c #6caee4", "#. c #6c9af4", "## c #3c4288", "#a c #8cb6dc", "#b c #bceefc", "#c c #acbac4", "#d c #b4defc", "#e c #a4c6e5", "#f c #6c96cc", "#g c #94aab4", "#h c #dcdedc", "#i c #7ca6d4", "#j c #9cbecc", "#k c #747274", "#l c #ccf6fc", "#m c #7caee0", "#n c #5c7294", "#o c #7496b0", "#p c #1c1a1c", "#q c #a4d6fc", "#r c #4c8ec8", "#s c #545254", "#t c #04063c", "#u c #3c4254", "#v c #042e5c", "#w c #446a8c", "#x c #54a6fc", "#y c #7c9eb9", "#z c #bcbebc", "#A c #3c72bc", "#B c #84a2ec", "#C c #2c5a9c", "#D c #2c3a49", "#E c #8cbef4", "#F c #141a1e", "#G c #fcfefc", "#H c #74a6d5", "#I c #84c6fc", "#J c #c0f6fc", "#K c #8caedc", "#L c #040a0c", "#M c #54c6fc", "#N c #5c86b4", "#O c #9cd6fc", "#P c #0c72fc", "#Q c #4c6280", "#R c #448edc", "#S c #2c72c4", "#T c #7c9ecc", "#U c #34328c", "#V c #345274", "#W c #acceec", "#X c #649ed2", "#Y c #445a6f", "#Z c #043aa0", "#0 c #1452ac", "#1 c #94bee4", "#2 c #dcf6fc", "#3 c #8ccefc", "#4 c #9c9e9c", "#5 c #9ccefb", "#6 c #1c2a38", "#7 c #8cfefc", "#8 c #5472d4", "#9 c #249efc", "a. c #6cfafc", "a# c #2cb2fc", "aa c #0c1a7c", "ab c #245ebc", "ac c #0c42dc", "ad c #1c62bc", "ae c #4cd6fc", "af c #a4fefc", "ag c #6c6a94", "ah c #a4a6a4", "ai c #0456dc", "aj c #d4d6d4", "ak c #3c3a3c", "al c #5cd6fc", "am c #2c92fc", "an c #c4ced4", "ao c #c4c6c4", "ap c #345ad4", "aq c #143664", "ar c #7c7a7c", "as c #5c7abc", "at c #e4eef4", "au c #646a74", "av c #3472bc", "aw c #3452ac", "ax c #84beed", "ay c #ecf6fc", "az c #dce6ec", "aA c #549ef1", "aB c #3c5a7c", "aC c #34a6fc", "aD c #24466c", "aE c #6c8adc", "aF c #b4c2d4", "aG c #ccdaec", "aH c #343a4c", "aI c #4c4a4c", "aJ c #084aac", "aK c #8c8e8c", "aL c #547aa0", "aM c #5c5a5c", "aN c #383a84", "aO c #246abf", "aP c #acaeac", "aQ c #44cefc", "aR c #042a90", "aS c #ace6fc", "aT c #546a7f", "aU c #8cbee4", "aV c #b7e6fc", "aW c #cffefc", "aX c #749ebc", "aY c #4c8edc", "aZ c #3c4a5c", "a0 c #c4fefc", "a1 c #e4fefc", "a2 c #34bafc", "a3 c #8cb2f4", "a4 c #0c3294", "a5 c #acc6e4", "a6 c #849aac", "a7 c #8cc6ec", "a8 c #8caed0", "a9 c #6c9ed1", "b. c #5c7a98", "b# c #5c8ebc", "ba c #c4d6dc", "bb c #4c6ab4", "bc c #54aefc", "bd c #4486c8", "be c #346aac", "bf c #6c96b4", "bg c #9cc6e9", "bh c #2c3240", "bi c #6496cc", "bj c #84aedc", "bk c #2c2a2c", "bl c #141a6c", "bm c #9c9a9c", "bn c #8c8a8c", "bo c #2c327c", "bp c #f4f2f4", "bq c #548acc", "br c #0c0a0c", "bs c #3c3e54", "bt c #749ed4", "bu c #3477cc", "bv c #6c8aac", "bw c #0436a4", "bx c #c4ecfc", "by c #a4c2f4", "bz c #8ccafc", "bA c #84a6c1", "bB c #84b6dc", "bC c #141214", "bD c #84aed4", "bE c #74aee4", "bF c #84a6d4", "bG c #5496ec", "bH c #548ec4", "bI c #3472cc", "bJ c #4c5a74", "bK c #9cbedf", "bL c #6c6a6c", "bM c #f4f6f4", "bN c #e4e6e4", "bO c #6486ac", "bP c #1c222c", "bQ c #9cb6dc", "bR c #3c86d4", "bS c #bcd6ec", "bT c #5496d4", "bU c #54729c", "bV c #acdefc", "bW c #24324c", "bX c #6ca6e4", "bY c #8cb6e4", "bZ c #bcdefc", "b0 c #7caeec", "b1 c #acd6fc", /* pixels */ "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..................#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G................#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........................#G#G#G#G#G#G#G#G#G#G..............................#G#G#G#G#G#G#G#G#G#G#G................................#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G........................#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G................................#G#G#G#G#G#G#G#G..................................#G#G#G#G#G#G#G#G#G....................................#G#G#G#G#G#G#G#G#G#G#G................................#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G.iaG#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Ga1#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G......................................#G#G#G#G#G#G#G....................................#G#G#G#G#G#G#G#G......................................#G#G#G#G#G#G#G#G#G....................................#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#GbvaDaDa6#G#GaG#vblaabl.Fbv#G#G#G#GazaM.F.M.M.M#t#Qaz#G#G#G#G#G#G#G#G#G#G#G#G#g#v.F#t.FaD#c#G#G#Ga6#QbUaG#G#G#G#G#G#G#G#G#G#caD#tbl.F.F#v#kbp#G#G#G#G#G#G#G#G#Gbv#v#vaD#g#G#G#G#G#G#G#G..............#G#G#G#G#G..............#G#G#G#G#G#G#G......................................#G#G#G#G#G#G#G......................................#G#G#G#G#G#G#G#G#G............#G#G#G#G#G#G............#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbv#Ca3#B.M#carbw#Bbybya3#..MaqaG#GbU.MaEby.gbya3#.apbl#n#G#G#G#G#G#G#G#G#GaG#vap#Ba3a3aEap.FaDbabvbU#B.X.8aG#G#G#G#G#G#GaG#v#Q#Ba3a3.Q#.#8bwbl#Q#G#G#G#G#G#G#G#G.M#.byaEaDaG#G#G#G#G#G............#G#G#G#G#G#G#G#G#G............#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G..............#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G............#G#G#G#G#G#G#G............#G#G#G#G#G#G#G#G............#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#n.Sb1b1.Mbr#8b1.H.Y#M#M#x.Q.Sap.MaEbyb1#Malae#M#x.Q.S.M#Q#G#G#G#G#G#G#Ga6#Qa3aG.H.Yal.Y.Q#xac#tbsaGb1#Mai#K#G#G#G#G#Ga6#Qbybybz#Mae#M#M.Q.Qamac.FaG#G#G#G#G#G#G#0.gbz#x.Mby#G#G#G#G............#G#G#G#G#G#G#G#G#G#G#G............#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G............#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G............#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#GbU.#a2#9#P#.b1a.afafafa.aQ.paC#.bybz#M.L#7afaf#7a..c#xambw#g#G#G#G#G#Ga6#Qby.Ya2a.#7af#7#7a.#M.X#8.SaC#9ai#T#G#G#G#Gbm#8b1.QaQa.#7#7#7a..Lbc#x.Sac.Faz#G#G#G#G#G.k.La.aQ.8bY#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G............#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.#a2.paCa.#7#7a.a.a.#7a.aQ.paCaC.ca.#7a.a..Y#7#7#7.caCap#C#G#G#G#GaG#Qbya2aQ#7#7#7.Y.Y.L#7a.al#xaC#9.pai.D#G#G#GaFarbyaCaea.#7.Y#M#M#7#7#7aQa2amacaq#G#G#G#G#G.kafaf#7.kby#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.Xa2.paQ.La2.S.Q.Q.Qama2aea2.pa2al.LaC#x.Qbz#xaCae.La#.#blaG#G#G#G#Q#.#xa2a..LaC.S.Q.Q.QamaQ.LaQ#9.p.paibq#G#G#GaM#B#9.c.LaQam.Qbz.H#.a#a.#7a..L.pbwby#G#G#G#Gbzal.Y#M#x#2#G#G#G............#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G............#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.#a#.c.L.#.Sb1bZ#l#2bxbIa2aQa2aQae.kbzb1#l#2a1a3.k.caQ.p.8a6#G#GaFbU#xa#.LaQ.#bzbZa0#2#l.z.S.p.L.ca#a#aiaE#G#G#4bvama2.La2.Xb1bx#2bMa1bz.#a.af#7a.ambx#G#G#G#G#G#2b1aVbx#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.#a2aea2bwb1#2#G#G#G#G#K.kaQa2aQ.#bIbx#G#G#G#Ga1#C#9aQa#aibq#G#Gar#8.paQae#P.Q#2#G#G#G#G#G#l.ka#aea2a#aibq#G#G#n.X.paQ.caib1#2#G#G#G#G#G#q#x#x.Q#xbzay#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G......................................#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.#.cae.##Cbx#G#G#G#G#Gb1.k.caQ.cai.DbM#G#G#G#G#Gbq.#.ca2#Pbe#G#GbU.Xa2ae#9ab#b#G#G#G#G#G#G#Gbz.kaQaQa2aiaE#G#G#C.#a#ae.#.S#2#G#G#G#G#G#G#Ga1#lbx#l#2#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G....................................#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe#P.c.c#P.8#G#G#G#G#G#G.z.8a#aQa#bwa3#G#G#G#G#G#Gbq#P.c.c#Pbe#G#G#Cama2.caiaEa1#G#G#G#G#G#G#G.z#C.paea2aibq#GbS#C.#a2a2ai#B#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G......................................#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.#a2.cai#C#G#G#G#G#G#G.z.8aC.c.pbwaF#G#G#G#G#G#Gbv#P.c.c#Pbe#G#2ab#9.ca2.8#K#G#G#G#G#G#G#G#G#G#C#9aQa2aibq#G.i.8.pa2a##Zb1#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G........................................#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.#.ca2#P#C#G#G#G#G#G#G.z.8a#.c.p#Zby#G#G#G#G#G#Gbv#P.c.c#Pbe#GbMab.p.ca2bwbY#G#G#G#G#G#G#G#G#G#C.#aQa2aibq#Ga5.8.p.c.pbwby#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G............#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.#.c.caibe#G#G#G#G#G#Gat.kaCaQ#9bwby#G#G#G#G#G#G#T#P.c.c.#be#G#Gbu.p.ca#.8bU#G#G#G#G#G#G#G#G#h#C.paQ.caibq#G.z.8a2.ca#bwbY#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G............#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.#.ca2#P#C#G#G#G#G#G#G.zaJa#.c.pbwby#G#G#G#G#G#Gbq#P.c.c#Pbe#G#Gbe#9aQa2#P#v#G#G#G#G#G#G#G#GbvbU.p.ca2ai#8#G#Gaba#aQa#aiaq#G#G#G#G#G#G#G#G#Gbp.Tat#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G............#G#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.#.c.c.k#C#G#G#G#G#G#GataiaCaQ.pbwby#G#G#G#G#G#Gbv#P.c.c#Pab#G#G#K.#aQa2#9bwbv#G#G#G#G#G#GaGar.Sa2.c.caibq#G#Gbq#9aQa2.#blaF#G#G#G#G#G#G.ia6bvbe#CbU#G#G#G#G#G#gaK#ga6aF#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.#.c.c#P#C#G#G#G#G#G#G.z.8a#.c.pbwby#G#G#G#G#G#Gbv#P.c.c#Pbe#G#Gbp.#aeae.p.X.Ma6#G#G#G#GaFbn#8.p.caQ.c.kbq#G#G.z.k.LaQ.papaq#z#G#G#G#GaFbv.SamaC#9aib1#G#G#G#Gbs#BbyaEaDaz#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe#9.c.c#P.C#G#G#G#G#G#G.z.ka#.c.pbwby#G#G#G#G#G#G#T#P.c.c.#be#G#G#G.Da#a.aQ#9#8#Q#ka6.wa6a6aE#9aQ.LaQaQ.k.D#G#G#G.Sa2a..c#9ap#QbvaF#c#T#8.##9.c.Lae#P.z#G#G#G#GbwaCam.#aqby#G#G#G#G............#G#G#G#G#G#G#G#G#G#G#G............#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G............#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G............#G#G#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe.#.c.c#P#C#G#G#G#G#G#G.z.8a#.c.p#Zby#G#G#G#G#G#G.W#P.c.c#Pbe#G#G#G#GbI.La.aQ.#.X.X#8#8aE.XaC.L#7a.aeaQ.kbq#G#G#G#2.X.L#7.camap#8bU#8#P.#.p.c.La..pbqa1#G#G#G#G.k.L.La2.8bY#G#G#G#G#G............#G#G#G#G#G#G#G#G#G............#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G............#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G............#G#G#G#G#G#G............#G#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbe#9.L.L#P#C#G#G#G#G#G#G.z.8.c.La2#0aF#G#G#G#G#G#Gbv.#.L.L.#ab#G#G#G#G.zama.#7a.a2#9.##9#xa.#7a..c.La.a..k#.#G#G#G#GaGama.afa.#Mam#9.#a#a2.La.#7aQambz#G#G#G#G#G.kafa0#7.8#K#G#G#G#G#G#G..............#G#G#G#G#G..............#G#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G..............#G#G#G#G#G#G..........#G#G#G#G#G#G#G#G#G............#G#G#G#G#G#G#G..............#G#G#G#G#G..............#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gbqaea0afa2be#G#G#G#G#G#G.z.k#7a0#7.8b1#G#G#G#G#G#Gbq.cafa0.cbu#G#G#G#G#Gbx#x.L#7af#7#7#7af#7al.SbI.Y#laf.p#B#G#G#G#G#Gb1#xalafaf#7#7#7#7#7#7#7a2#x.Ha1#G#G#G#G#G.Qal.L#MaCbx#G#G#G#G#G#G......................................#G#G#G#G#G#G#G......................................#G#G#G#G#G#G#G........................................#G#G#G#G#G#G#G#G..................................#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#Gb1#Ma.a.aCa3#G#G#G#G#G#G#G.Qal#7aQ.S.z#G#G#G#G#G#Gatbca.a.a2.Q#G#G#G#G#G#Ga1bz.Y.Y#7#7#7.Y#Ebzbx.Q#M#7a.#xbx#G#G#G#G#G#G#2bz.Qbz#7af#7#7.Y.Y.Qbzb1a1#G#G#G#G#G#G#G#2b1b1bx#G#G#G#G#G#G#G#G#G................................#G#G#G#G#G#G#G#G....................................#G#G#G#G#G#G#G#G......................................#G#G#G#G#G#G#G#G#G#G..............................#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#Ga#.#aeambx#G#G#G#G#G#G#G#G#xaeamb1#G#G#G#G#G#G#G#G#xaealbu#l#G#G#G#G#G#G#G#GaybZb1#E#Wb1#la1#GbM.Q.Yal.Ya1#G#G#G#G#G#G#G#G#l#W#7.Y.Y.Ybz#Wbx#l#G#G#G#G#G#G#G#G#G#G#GbM#G#G#G#G#G#G#G#G#G#G#G..........................#G#G#G#G#G#G#G#G#G#G..................................#G#G#G#G#G#G#G#G#G....................................#G#G#G#G#G#G#G#G#G#G#G#G#G........................#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#bb1bxbM#G#G#G#G#G#G#G#G#GaWbxa1#G#G#G#G#G#G#G#G#G#lb1bx#G#G#G#G#G#G#G#G#G#G#G#Ga1#G#G#G#G#G#G#G#2#2#2#G#G#G#G#G#G#G#G#G#G#G#GbMa1#2aya1#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..................#G#G#G#G#G#G#G#G#G#G#G#G..............................#G#G#G#G#G#G#G#G#G#G#G................................#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..............#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#Ga1#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G........#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G........#G#G#G#G......#G#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G..#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G..#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G....#G#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G..#G#G#G#G..#G..#G....#G#G#G....#G#G..#G....#G#G#G#G#G#G..#G#G#G#G..#G......#G#G......#G......#G#G..#G....#G#G......#G#G#G....#G#G#G....#G#G#G#G#G#G..#G#G#G#G#G#G#G......#G#G..#G....#G#G..#G....#G#G#G....#G#G#G....#G#G......#G..#G..#G#G#G..#G..#G......#G..#G#G..#G#G#G#G......#G#G......#G#G..#G..#G#G#G#G......#G..#G....#G#G#G....#G#G#G#G#G#G....#G#G#G....#G......#G#G#G....#G#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G#G#G#G#G..#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G..#G#G#G#G..#G....#G#G..#G..#G#G..#G....#G#G..#G#G#G#G#G..#G#G#G#G..#G#G#G#G..#G#G..#G#G#G#G#G..#G....#G#G..#G#G#G#G..#G..#G#G..#G..#G#G..#G#G#G#G#G..#G#G#G#G#G#G..#G#G#G..#G....#G#G..#G....#G#G..#G..#G#G..#G..#G#G..#G#G..#G#G..#G..#G#G#G..#G..#G#G..#G#G..#G#G..#G#G#G#G#G..#G#G..#G#G#G..#G....#G#G#G#G#G#G..#G#G....#G#G..#G..#G#G..#G#G#G#G#G..#G..#G..#G..#G#G#G#G..#G..#G#G..#G#G#G#G#G..#G#G#G#G..#G#G#G......#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G..#G#G#G#G..#G..#G#G#G..#G........#G..#G#G#G..#G#G#G#G#G..#G#G#G#G..#G#G......#G#G..#G#G#G......#G..#G#G#G..#G#G......#G#G....#G#G........#G#G#G#G#G..#G#G#G#G#G#G..#G#G#G..#G..#G#G#G..#G..#G#G#G..#G........#G..#G#G#G#G#G..#G#G..#G#G..#G..#G#G..#G#G..#G#G..#G..#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G#G#G#G#G..#G#G..#G#G#G..#G........#G#G#G#G#G..#G..#G..#G..#G#G......#G..#G#G#G#G#G#G#G#G..#G#G#G#G..#G#G#G#G#G#G..#G#G#G..#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G..#G#G#G#G..#G..#G#G#G..#G..#G#G#G#G..#G#G#G..#G#G#G#G#G..#G#G#G#G..#G..#G#G..#G#G..#G#G..#G#G..#G..#G#G#G..#G..#G#G..#G#G#G#G..#G..#G#G#G#G#G#G#G#G..#G#G#G#G#G#G..#G#G#G..#G..#G#G#G..#G..#G#G#G..#G..#G#G#G#G..#G#G#G#G#G..#G#G..#G#G..#G..#G#G..#G#G..#G#G..#G..#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G#G#G#G#G#G..#G#G..#G#G..#G..#G#G..#G..#G#G#G#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G#G..#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G..#G#G#G#G..#G....#G#G..#G..#G#G..#G..#G#G#G..#G#G#G#G#G..#G#G#G..#G#G..#G#G..#G#G..#G#G..#G#G..#G....#G#G..#G..#G#G..#G..#G#G..#G..#G#G..#G#G#G#G#G..#G#G#G#G..#G..#G#G#G..#G..#G#G#G..#G..#G#G#G..#G..#G#G..#G..#G#G..#G#G..#G#G..#G#G#G..#G#G#G..#G#G..#G#G#G....#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G..#G#G#G#G#G..#G#G..#G#G..#G..#G#G..#G..#G#G..#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G........#G#G..#G....#G#G#G....#G#G..#G#G#G..#G#G#G#G#G........#G#G#G#G....#G..#G....#G#G....#G....#G....#G#G#G....#G..#G....#G#G#G....#G#G#G#G#G#G#G........#G#G#G......#G#G..#G#G#G..#G..#G#G#G..#G#G....#G#G#G....#G#G#G....#G..#G#G#G..#G#G#G..#G#G....#G#G..#G#G#G#G#G#G#G..#G#G#G......#G#G..#G#G#G#G#G#G#G....#G..#G#G#G..#G#G....#G#G#G#G#G#G..#G#G..#G#G..#G#G....#G..#G....#G#G#G#G#G#G#G........#G#G#G#G......#G#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "..........................................................................................................................................................................................................................................akakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.fakakakakakakakakakakak.fak.fak.f#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.T.TbN.T.T.T.T.T.T.TbNbp.T.T.Tbp.T.TbN.T.T.T.T.T.T.TbNbp.T.T.Tbp.T.TbN.T.T.T.T.T.T.TbNbp.T.T.Tbp.T.TbN.T.T.T.T.T.T.TbNbp.T.T.Tbp.T.TbN.T.T.T.T.T.T.TbNbp.T.T.Tbp.T.TbN.T.T.T.T.T.T.TbNbp.T.T.Tbp.T.TbN.T.T.T.T.T.T.TbNbp.T.T.Tbp.T.TbN.T.T.T.T.T.T.TbNbp.T.T.Tbp.T.TbN.T.T.T.T.T.T.TbNbp.T.T.Tbp.T.TbN.T.T.T.T.T.T.TbNbp.T.T.Tbp.T.TbNbp.T.T.T.T.T.TbN.T.T.T.Tbp.T.TbNbp.T.T.T.T.T.TbN.T.T.T.Tbp.T.TbNbp.T.T.T.T.T.TbN.T.T.T.Tbp.T.TbNbp.T.T.T.T.T.TbN.T.T.T.Tbp.T.TbNbp.T.T.T.T.T.TbN.T.T.T.Tbp.T.TbNbp#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#haj#h#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#haj#h#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.TbpbNbpbp.T.wbLaM#saMbL.wbpbp.TbpbpbNbpbp.Tbpbpaj#zaPaPaP.wajbpbp.T.Tbp.Tbpbp.TbpbpaPbLaM#saMbL.wbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.TbpbNbpbp.Tbpbp.Tbp#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbNbNbNbNbNbNbNaP#sah.TbMbpaP#saPbNbNbNbNbNbNbNbNbN.iah.i#hbpbNaoah.ibNbNbNbNbNbNbNbNbNaP#sahbNbMbpaP#saPbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNajbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbN.ibNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbN#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbpbNbpbpbpbp.i#sbnaoajaj#haobn#sajbNbpbpbpbpbpbp#hahaoaj#h#h#haj#zahbNbpbp.TbpbpbpbN.i#sbnaoajaj#haobn#sajbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbpbpbpbNbpbpbpbpbp#haI#p.4#p.abpbp.vbr#pbC.4.vbpbpao..bCbk#kbpbpbN.sbCakbCbC#hbpbpbpbpakbC#p#p.f#zbpbpbNbpbpbpbpbpbpbpbNbpbp#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GaPaMahaP#z#z#z.wah.saP#G#G#G#G#G#G#G#h#zaj#hbNbN.TbNaj#z#h#G#G#G#G#G#G#GaPaMahaP#z#z#z.wah.saP#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.fbL#G#G#hbC#z#G.aaI#G#G.i.xar#G.ibC#G.i..aj#G.s.fbM#G#GbN#G#G#G#G#Gakah#G#Gbmbr.i#G#G#G#G#G#G#GahaM#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbpar.v.waoaoaj.iao#z.v.vbpbp.Tbp.Tbp.Tao#zajaj#haj#hajaj#z#z.Tbp.Tbp.Tbpbp.v.v.waoaoaj.iao#z.v.vbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp.Tbpbp.Tbpbp.Tbp#z..aobp.TbpaM.4bpar.fbp.Tbp.v..bN#zbr.T#h..ajaj..ahbpbp.Tbpbp.Tbp.T.T.4.a.Tbp.T.4aIbpahak.x#s.T#h#p..bkaoao#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbNbNbN#hbNbNbnbm.iajbN.TbNaj.ibm.vbNbN#hbNbNbNbN#zao#haj#hbN#h#h#hao#z#hbNbNbNbNbNbNarbm.iaj.TbN.Taj.ibm.vbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbNbNbNbNbNbN#hbNbN.abCbNbNbN#h.abrbN.v.fbNbN#h.i..#z.w..bL.4.abNah..#hbNbNbN#hbNbNbNbNbN.4.a#hbNbNar.xbNaoaj#h.4bmbNbnaIbNbNao#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbpbp.TbpbNbnbnajbpbpbpbMbpbN.abnbNbp.T.Tbp.Tbpaoao#h.TbNbpbpbN#h.i.ibp.Tbpbp.TbpbNaKbnaj.TbpbpbMbpbN.abnbNbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.Tbp.T.T.T.abrbpbp.T.Tbmbr.T.v.fbp.Tbp.i...i#z..bm#saI#haP..bNbpbp.Tbp.Tbpbp.Tbp.4aKbpbp.T#kbk.Tbp#hbmbk.vbpbnaIbpbpbp#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbM.w.v#h#G#G#G#G#G#h.v.wbM#G#G#G#G#G#G#h.ibp#G#G#G#G#Gbp.ibN#G#G#G#G#G#GbM.w.v#h#G#G#G#G#G#h.v.wbp#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.i..aj#G#G#G.sak#G.aaI#G#G#G.abC#G.ibr#G#GakbnbN..aP#G#G#G#G#G#G#G#G#Gakah#G#G#Gak.s#GbLaI#zaI.a#G#4#s#G#Gbm#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbpao#k.vbN#G#G#GbN.v#kaobp.Tbp.Tbp.Tbp#h#zaobN.T.T.TbN#z#z#hbp.Tbp.Tbpbpbpao#k.vbN#G#G#GbN.v#kaobpbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.TbpakbLbp.TajbCah.T.v.fbp.T.i.xarbp#zbr.TbN#p#k.TaI.4bNbp.T#zbNbp.Tbp.T.4.a.Tbpbm..aj.TbraobNakarbpbm.4.Tbpak#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbNbNbNbNbNbN.iah.s.s.v.aar.sbLah.ibNbNbNbNbNbNbNbN.iaPaP#zao#zaPaP.ibNbNbNbNbNbNbNbN.iah.s.s.v.aar.sbLah.ibNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNaj.4bk.fbC.vbNbN.v..#p#pbk.abNbN.w..#pbCakajbNajaI..ak#pakajbNbNbNbNbkbC#pbC.f#zbNbNbLbrbkaM#pao#hbP.4ao.a#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp.TajaPar#k.sbLaraPajbp.Tbp.Tbp.Tbp.TbpbNaj#z#z.w.w#zajbNbpbp.Tbp.Tbp.T.TbpajaPar#k.sbLaraPajbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.TbpbN.i.T.Tbp.T.Tbp.T.Tbp.Tbpbp.T.T.T.T.Tbpbp.TbpbN.i.T.Tbp.Tbpbpbpbp.T.Tbp.Tbp.Tbp.TbNbp.T#hbp.Tbp#h.Tbp#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpaj.i#z.i#hbM#G#G#G#G#G#G#G#G#G#G#G#GbpbNbN.Tbp#G#G#G#G#G#G#G#G#G#G#G#Gbpaj.i#z.i#hbM#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G........#G#G#G#G......#G#G#G..#G#G#G..#G#G#G#G#G#G........#G#G#G........#G#G#G#G........#G#G#G#G........#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.Tbpbp.Tbpbpbpbpbpbp.Tbp.Tbp.Tbp.Tbp.T.T.T.T.Tbpbp.Tbp.Tbp.T.Tbp.Tbp.Tbp.Tbp.T.Tbpbpbpbpbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbp.Tbp.T.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbp#G", "#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G..#G#G#G..#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G#G..#G#G#G..#G#G..#G#G#G#G..#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#G", "#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G#G#G#G#G..#G..#G#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G..#G....#G#G......#G#G#G....#G#G#G....#G#G#G....#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T.T.T.T.T.T.T.T.T.Tbp.T.Tbp.T.Tbp.Tbp.Tbp.T.T.T.T.T.Tbp.Tbp.Tbp.Tbp.T.Tbp.Tbp.T.T.T.T.T.T.Tbp.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.Tbp.T.Tbp.Tbp.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.Tbp.T#G", "#G#G#G#G#G..#G#G#G#G..#G#G#G......#G#G#G#G#G..#G#G#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G#G..#G#G........#G#G#G..#G#G#G#G#G#G#G#G#G....#G#G..#G#G#G#G..#G..#G#G..#G..#G#G..#G..#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G..#G#G#G#G..#G#G#G#G#G#G..#G#G#G..#G..#G#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G..#G#G#G..#G#G......#G#G....#G#G........#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbp.Tbp.Tbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbp#G", "#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G#G..#G..#G#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G..#G#G#G..#G..#G#G..#G#G#G#G..#G..#G#G#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.Tbp.T.Tbp.T.Tbp.T.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.T.T.T.T.T.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.T.Tbp#G", "#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G..#G#G#G..#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G#G..#G#G#G..#G#G..#G#G#G#G..#G#G#G#G....#G#G..#G..#G#G..#G..#G#G..#G..#G#G..#G..#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.T.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.T.Tbp.T.Tbp.T.Tbp.T.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.Tbp.Tbp.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.Tbp.Tbp.T#G", "#G#G#G#G#G#G........#G#G#G#G......#G#G#G..#G#G#G..#G#G#G#G#G#G........#G#G#G........#G#G#G#G........#G#G#G#G........#G#G#G#G#G..#G....#G#G#G....#G..#G....#G#G#G....#G#G#G....#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbp.Tbp.Tbp.TbN#h.wag#Uaa.m.m.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.maR.m.m.m.m.maa#Uag.w#hbN.wbn#kbL#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#k#kbL#kaK.wbNbN#h.wbn#kbL#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#k#karar#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.T.Tbp.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.TbpbNbm##.yaE#ibY.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.qbY.q.q.q#a#iaE.JaNbmbNarah#z.iaj#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#hajaj#z.a#kbpbNaharah#z.iaj#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#hbN#h#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.T.T.i##bbbjbK#e#ea5bya5a5a5bya5a5a5bya5a5a5bya5a5a5bya5a5a5bya5a5a5bya5a5a5#ea5a5a5#ea5a5a5#ea5a5a5#ea5a5a5#ea5a5a5#ea5a5a5#ea5a5a5#ea5a5a5#ea5a5a5#ea5a5a5by#e.qa9awaN.iaPaj#h#h#hbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbNbNbN#hbN.T#h#h#h.iahbp.i#kaPaj#h#h#h.T#hbN.TbN#h.TbNbN#h.TbNbN#hbNbNbN#hbNbNbN#hbNbN.T#hbN.TbN#h.TbNbN#h.TbNbN#h#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gaga4bHbYbKbya5a5a5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5a5#W#Wa5#ebKa3bqaRag#zaj#h#h.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbNbN#h#h#haj#zaobn.v#zaj#h#hbNbNbNbNbNbNbNbNbN.TbNbNbNbN.TbN.TbN.TbN.TbN.TbN.TbNbNbNbNbNbNbNbN.TbNbNbNbNbN#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbpbpbobw#Sa9bD#a.qbQ.qbQbKbQ.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbK.qbQbKbQ.q.qa8a9#AbwboaP.i#haj#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#hajaj.i.wahbLbnaPajaj#h#hbN#hbN#h#hbN#h#h#h#hbN#h#h#h#h#h#h#h#h#h#h#h#h#h#hbN#hbN#h#hbN#h#h#h#hbN#h#h#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.T.Tbp.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.maJav.W#f.Dbt#ibt.A#i.A.D.A#i.A.D.A#i.A.D.A#i.A.D.A#i.A.D.A#i.A.D.A#i.Abt.A.A.Abt.A.A.Abt.A.A.Abt.A.A.Abt.A.A.Abt.A.A.Abt.A.A.Abt.A.A.Abt.A.A.Abt.A#i.Abtbta9.W#SaJ.maP#zao.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.iao#zaPbn.sbmaP#zao.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.7#0.t#ra9btbt#ibt#i#i#i#H#i#i#i#H#i#i#i#H#i#i#i#H#i#i#i#H#i#i#i#H.A#i#ibt#i#i#ibt#i#i#ibt#i#i#ibt#i#i#ibt#i#i#ibt#i#i#ibt#i#i#ibt#i#i#ibt#i#i#ibt#i.A#i.Dbt#f.B.t#0.7.waoao.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.iao.iaoao.wbn#kah.waoao.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.iaj#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.raO#rbibtbt#i#i.A#i...2.A#i.A.2...A.2.A#i.A.2.A#i.A.2.A#i.A.2.A#i#i.2.A#i#i.A.2.A#i..........#6.d.A.2.A.d.....l.A#i.A..aZ#i.A.2.A#i...A#i.A.2.2.A#i.2#m#i.AbtbiaY.C.r#zao.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.iao#zar.vaP#zao.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i#G", "#G#G#G#G..#G#G..#G..#G....#G#G#G......#G#G..#G....#G#G#G#G#G......#G..#G....#G#G#G....#G#G#G#G#G..#G....#G#G..#G..#G#G......#G#G..#G#G#G..#G#G....#G#G..#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.TaJ.0#ra9.A#mbDbjbDbj..bDbDbjbjbD..bjbjbDbDbjbjbDbDbjbjbDbDbjbjbDbjbjbjbDbDbjbjbDbDbj..bDbDbjbj#Q..aLbjbD.O#Qa9bhbDbjbj...hbObjbDbDbj..bDbDbjbjbjbDbjbjbjbDbt#ibt.BbuaJ#z.i.i.iajajajahbrbrarajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajbr....br...4ahajajajahbrbrarajajajbr.sajajajajajbrajajajajajajajajaj.i.i.i#z#kbn.w#z.i.i.iajajajbr........ajajbrajajajbrajajajajajajajajajajajajajajbr.........4ahajajaj#G", "#G#G#G#G..#G#G..#G....#G#G..#G..#G#G#G..#G....#G#G..#G#G#G#G#G..#G#G....#G#G..#G..#G#G..#G#G#G#G....#G#G..#G....#G#G..#G#G#G..#G..#G#G#G..#G..#G#G..#G....#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.T.Tbp.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.8.t#XbtbEbjbj#Kbj#K..bjbj#K#Kbj..#K#Kbjbj#K#Kbjbj#B#Kbjbj#K#Kbjbj#B#Kbjbj#K#Kbjbj#K..bjbj#K#Kbj#Y..#Kbj..#K#Kbjbj#K#K..bf.h#Kbjbj#K..bjbj#K#KbFbj#K#Kbjbjbj.A#H.Z.t.8ao.i.iajajajaj#parao.fajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajaj..ajajajajarbrbmajaj#parao.fajajaj..bkahajajajaj..ajajajajajajajajajaj.i.iao#k.a.wao.i.iajajajaj..aj#hajajajajajajajaj..ajajajajajajajajajajajajajaj..aj#hajajarbrbmajaj#G", "#G#G#G#G..#G#G..#G..#G#G#G..#G..#G#G#G..#G..#G#G#G..#G#G#G#G#G..#G#G..#G#G#G..#G........#G#G#G#G..#G#G#G..#G..#G#G#G..#G#G#G..#G#G..#G..#G#G........#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp#0bda9.AbjbY#abY#abY..#abY#KbY#a..#abYb..O......#a#a#T#D..#L#obY#a..bJ#L..bYbY#abY#a..#a#abY#a#abY..aXbY.h.d#abY#abY#a..#abJ#V#K#abY..#abY#KbYbYbY#a#KbYbY#abj#ia9.tad.iajajajajajaj..ajajajajajajajajajajajajajajajajajajajajbrajajajajajajajajajajajajajajajajajajajajajajajajajajaj..ajajajajajbLbrajaj..ajajajajajaj..ajbkajajajaj..ajajajajajajajajajajajaj.iar.a#z.iajajajajajaj..ajajajajajajajajajaj..ajajajajajajajajajajajajajaj..ajajajajajbLbrajaj#G", "#G#G#G#G..#G#G..#G..#G#G#G..#G..#G#G#G..#G..#G#G#G..#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G#G#G#G#G..#G#G#G..#G..#G#G#G..#G#G#G..#G#G..#G..#G#G..#G#G#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gad#R.Ubj#abY#1.q#1#1..#1#1#1.q.q..#1.q...5#1.q.q#1#1#uaZ#1#Q#6#1#1..aH#o#1#1.q.q#1#1..#1#1.q.q#1#1#F.5.q#o#FaHaX#1#1.q..#1#1#F#o#1#1..#1#1#1.q#1#1#1.q#1#1#abY.A.UaYaO.iajajaj#h#h#hbkbm#h#h#h#hbkbm#h#h#haP#p#hbm#p....br#h......br#h#h.iaIbrbr#z#h#hbr#k..br#s#k..brbm#h#h#h#h#h#h#h..#h#h#h#h#h#h..#z#hbkbm#h#h#h#h#h..#h#k.s#h#h#h..#h#h#h#h#h#h#h#h#hajajaj.i#kbmao.iajajaj#h#h#h..#h#h#h#h#h#hbr#h#h#h..#h#h#h.iaIbrbr#z#h#h#h#h#h#h..#h#h#h#h#h#h..#z#h#G", "#G#G#G#G..#G#G..#G....#G#G..#G..#G#G#G..#G..#G#G#G..#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G..#G#G#G#G....#G#G..#G..#G#G#G..#G#G#G..#G#G#G..#G#G#G..#G#G..#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.TaObT#Hbj#E#1#1#1#1#1..#1#1#1#1#1..#1#1.O.6.D#1#1#1#1...2#1#1..#1#1..#1#1#1#1#1#1#1#1..#1#1#1#1#1#1.h.5#1#1#1.5bC#w#1#1..#1#1#T.K#1#1..#1#1#1#1#1#1#1#1#1#1#1bY.n.U#raOajaj#h#h#h#h#haPbkaI#z#h#hbmbk#h#h#haIbn#h..bmbN#h#h#h#h..#h#h#h#h#s#s#h#kak#h#h..#s.iaP..#s.iaPbk#h#h#h#h#h#h#h..#h#h#h#h#h#hbkbm#haPbkaI#z#h#h#h..#h#hbkaP#h#hbr#h#h#h#h#h#h#h#h#h#h#hajajbLahaoajaj#h#h#h#h#h........#h#h#h..#h#h#h..#h#h#h#s#s#h#kak#h#h#h#h#h#h..#h#h#h#h#h#hbkbm#h#G", "#G#G#G#G#G......#G..#G....#G#G#G......#G#G..#G#G#G..#G#G#G#G#G....#G..#G#G#G..#G#G....#G#G#G#G#G..#G....#G#G..#G#G#G#G......#G#G#G#G..#G#G#G#G....#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.T.Tbp.T.T.T.T.T.T.T.T.T.T.T.T.T.Tbp.T.T.T#SbTbEbY#1#1.Hby.Hby..bg.Hby#1bg..by#1#a#Ybr.h#ybgbg..........bgbg..#1bg.Hby#1bg.Hby..bg.Hby#1bgbg..bjbgbgby#1bAbrby#1...Hby#1#YbJbg..bg.Hby.qbg.Hby.qbg#EbK#1aUbE.ZbIaj#h#h#h#h#h#hbNbNbm#pbnbN#hbrao.T.ibrbNbN#p.saobN#h#hbN..#h#hbNbN...ibNbN..#hbN..#h#hbN..#h#hbN..#h#hbN.T#h#h.T..#h#hbN.T#h#hbkah#h#hbNahbCbnbN.T..#hbNaoak#hbN..#h#hbN.T#h#hbN.T#h#h#h#hajbLah.iaj#h#h#h#h#h#h...T#h#h.TbN#h..bNbN#h..bN.T#h..bNbN#h..bN.T#h#hbN.T..#hbN.T#h#h.Tbkbm#h#G", "#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.T.T.Tbpbp.TbI.Zb0#E.H.Hbybgbgby#L.qbgbya7.q..bg.Hbybgbybv..bgby#L#ebg#e.H#ebg...Hbybgby.Hbybg#e..bybgbya7by.3.K.Hbybgby.Hby..#e.H..bg#e.Hby.h.R..bybgbybz#ebybg.Hbgbybya7#E.nbTbuajbNbN.TbN.TbN.TbNbNaobrbNbNbnaIbN.vaIbNbNbNbLbrbk.wbN.T..bN.TbNbNbr.........TbN...TbN.T..bN.TbN...TbN.TbNbNbNbN...TbNbNbNbNbN..bNbN.TbN.TaobrbNbN...TbNbNbL#k.T...TbN.TbNbN.TbNbNbN.TbN#h#h#kaP.iaj#h.TbN.TbNbN..bNbNbNbNbN.T...TbNbNbrbNbNbNbr........bNbNbN.TbNbN...TbNbNbNbNbN..bN.T#G", "#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbu#X.n.H.Hbg#5.V#5.V#YaT#5.V#5aT.P.V#5.V#5.Vbf..#5.V#YbJ#5.V#5.V#5..#5.V#5.V#5.V#5.V...V#5.VbDaT..a8#5.V.KbA#5bJ.h.V#5..#5.V#5.V.j.h...V#5.V#5.V#5.V#5#5#5#5.Ha7bB#.bu#hbNbNbNbNbNbpbNbNbNbp..bNbNbpbraobC#zbNbNbNbpbNah..bpbN..bNbpbN.T...T.TbNbNbpbN..bN.TbN..bN.T.T..bNbpbNbNbNbp.T..bNbpbN.TbNarakbNbNbpbNbNbN..bNbN..bpbNbNbNbkao..bNbpbNbNbNbpbN.TbNbNbN.T#haraP.i#hbNbNbNbNbNbp..bNbNbp.TbNbN..bNbNbN..bNbNbNbrbNbNbNbpbNbNbNbpbNbN..bpbN.TbNbp#kakbNbp#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.TbpbpbR.9ax.H#5.V#W#W#W#W#WbJbP.xbh.P#W#W#W.......ObA#W#W#W.P......#W#W..#W#W#W#W#W#W#W#W..........#ubK#W#W#W.5br...KbK#W#W..#W#W#W#W#WbJ..#W#W#W#W#W#W#W#W#W#W.V#5.HaxbXbRbN.Tbpbpbpbp.Tak#zbpbLbkbpbpbNbn#p#pbpbpbpbp.TbpaP..bp.T..bmbpbp.TbLbL.Tbp.T.Tbp..bp.Tbp..bp.T.T..bpbpbpbpbp.Tbp...Tbpbp.iar...ibpbp.4#zbpbLbkbpbp...Tbpbpbp#zbk...Tbpbpbp.T.Tbp.TbpbpbpbNbN#k.waj.TbNbpbpbpbpbp..bpbpbp.Tbpbp..bpbpbp..bpbpbpbLbLbp.Tbpbpbpbpbpbpbp...Tbpbp.iar...ibp.T#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.T.Tbp.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.SbX#E#5#q#qb1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1bVb1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1bVb1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1#q#q#5#E#H.SbNbpbNbpbpbpbpbmbr...fbNbpbpbpbN..bnbpbpbp......#p#zbMbMbn....bpbpbp.s......bMbp..bpbMbp..bpbpbM...Tbpbpbpbpbpbp........braI.Tbpbpbpbmbr..ak.Tbpbp..bMbpbpbpbp#k..bpbpbpbpbpbpbpbpbpbpbpbpbNbL.w#hbNbpbpbpbp.Tbp..bp.Tbpbpbp.T..bMbp.T..bpbp.Tbp.s......bpbpbpbpbpbp........br#sbNbpbpbM#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp#R.1#E#5#qbVbVbVbVbV#dbVbVbV#d#dbVbV#dbVbVbV#d#dbVbV#dbVbVbV#dbVbVbV#dbVbVbV#dbVbVbV#dbVbVbV#dbVbVbV#d#dbVbV#dbVbVbV#dbVbVbV#d#dbVbV#dbVbV#d#dbV#dbV#d#dbVbV.I#q#E.1aY.TbpbpbpbpbpbpbMbpbMbMbpbMbMbM.TbrbNbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbpbpbpbMbMbMbMbMbMbpbpbMbMbMbpbMbpbMbpbpbMbMbMbMbMbMbMbMbMbMbpbMbpbpbpbpbMbpbpbpbpbpbp#k.w#hbp.TbpbpbpbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbpbpbMbMbMbMbMbMbMbpbMbMbMbMbM#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#R.N.g#qbVaV#d.o#daVaV#d#daVaV#d#daVaV#d#daVaV#d#daVaV#d#daVaV#d#daVaVbZ#daV#b#d#daVaV#d#daVaV#d#daVaV#d#daVaVbZ#daVaV#d#daVaV#d#daVaV#d#daVaV#d#daVaV#d#dbVbV#q.g.1aY.Tbp#G#G#G#G#G#G#G#G#G#G#G#G#G.a#s#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbM#Gbpbp#k#zbNbpbp#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G........#G#G#G........#G#G#G#G........#G#G#G#G........#G#G#G#G#G#G........#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.TbG.N#5b1#daVbZbZbZ#b#bbZbZaVbxbZbZaVbxbZbZaVbxbZbZaVbxbZbZaV#bbZbZaV#bbZbZaV#bbZbZaV#bbZbZaV#bbZbZaV#bbZbZaV#bbZbZaVbxbZbZaV#bbZbZ#b#bbZbZaV#bbZbZ#b#baVbZbZ#db1.g.NaAbM#G#G#G#G#G#G#G#G#G#G#G#G#G#G.xao#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbpbLaobpbp#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G#G..#G#G#G..#G#G..#G#G#G#G..#G#G#G#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.T.Tbp.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.T.TaAax#5#d#bbxbx#Jbxbxbx#bbxbx#J#b#Jbx#J#b#Jbx#J#b#Jbx#J#bbxbx#Jbx#b#lbx#b#b#lbx#b#Jbx#l#bbxbx#l#bbxbx#l#b#b#lbx#b#b#lbx#b#Jbx#l#bbxbxbx#b#Jbx#l#bbxbxbx#l#b#b.obV#OaxaA#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbLao.T#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G..#G#G..#G..#G....#G#G..#G..#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G..#G#G#G..#G..#G..#G#G......#G#G..#G#G....#G#G#G....#G#G......#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.TbpaA#I#q.o#Ja0#J#l#J#la0aWa0#l#JaW#J#l#la0#l#J#la0#l#J#la0a0#l#la0#J#l#JaW#J#l#JaW#J#l#Ja0a0#J#la0a0#J#la0#l#J#la0#J#l#JaW#J#l#Ja0a0#l#JaW#J#l#Ja0a0#l#J#l#J#l#Jbx.I#E#x#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbL.ibp#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G..#G#G..#G....#G#G..#G..#G#G..#G..#G#G#G..#G#G#G#G..#G#G..#G#G#G#G..#G#G........#G#G#G..#G#G#G#G#G#G#G#G#G#G........#G#G....#G#G..#G#G#G..#G..#G..#G#G..#G..#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.e#3bV#b#l#l#l#laW#laWaW#l#laWaW#l#laWaW#l#laWaW#l#laWaW#l#laWaW#l#laWaW#l#laWaW#l#laWaW#l#laWaW#l#laWaW#l#laWaWaW#laWaW#l#laWaW#l#laWaW#l#laWaW#l#laWaWaW#la0#baS#3.ebMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbLan.TbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbMaybMbM#G", "#G#G#G#G..#G#G..#G..#G#G#G..#G..#G#G#G..#G#G#G#G..#G#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G..#G#G#G..#G..#G........#G..#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.e#3aS#JaWaWa1aWaWaWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWa1aWaWaWaWaWaW#JaS#3.e.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8ai.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8#G", "#G#G#G#G..#G#G..#G..#G#G#G..#G..#G#G..#G..#G#G#G..#G#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G..#G#G#G..#G..#G..#G#G#G#G..#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.T.Tbp.T.T.T#e#e#e#e#e#e#e#e#e#e#e#e#e#e#e#ebK.Ha5.V#W.V#W#W#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W.V#W#W#W#W#Wby.V.H#1#e#e.Vbg#ebg.V#ebg.Vbg#ebg.Vbg#e.Vbg#ebg.Vbg#ebg.V#ebg.Vbg#ebg.Vbg#e.Vbg#ebg.Vbg#ebg.V#ebg.Vbg#ebg.Vbg#e.Vbg#ebg.Vbg#ebg.V#ebg.Vbg#ebg.Vbg#e.Vbg#ebg.Vbg#ebg.V#ebg.Vbg#ebg.Vbg#e.Vbg#ebg.Vbg#e#e#e#e#e#e.Vbg#e.Vbg#e.Vbg#ebg.Vbg#ebg.V#ebg.Vbg#ebg.Vbg#e.Vbg#ebg.Vbg#ebg.V#ebg.Vbg#ebg.V#e#G", "#G#G#G#G..#G#G..#G..#G#G#G..#G..#G..#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G..#G#G#G..#G#G#G..#G#G..#G#G#G#G..#G#G#G#G#G..#G#G#G#G#G..#G#G#G..#G#G#G..#G..#G..#G#G..#G..#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.Tbp.T.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubSbSbSbSbS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS.ubS#G", "#G#G#G#G#G......#G..#G#G#G..#G..#G..#G#G#G..#G#G#G........#G#G#G........#G#G#G#G........#G#G#G#G........#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G#G......#G#G..#G#G....#G#G#G....#G#G#G....#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gb0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#b#b#J#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#b#b#J#b#b#b#J#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#b#b#J#b#b#b#J#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#b#b#J#b#b#b#J#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#b#b#J#b#b#b#J#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#b#b#J#b#b#b#J#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#b#b#J#b#b#b#J#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#J#b#b#b#b#b#J#b#b#b#J#b#J#b#b#b#J#b#b#b#J#b#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.TbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLaubLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbLbL#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.T.T.T.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.T.T.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.Tbp.Tbp.T#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.Tbp#G#h.T.Tbp.T.Tbp.T.Tbp.T.Tbp.Tbp.Tbpbp.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.T.Tbp.Tbp.Tbp.T.Tbp.Tbp#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.Tbp.Tbp.Tbp.Tbp.T.Tbp.T.T.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.T.Tbp.T.T.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.T.Tbp.T.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.Tbp.T.Tbp.T.Tbp.Tbp.T.Tbp#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.Tbpbp.T#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T#G#h.T.T.T.T.T#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.Tbp#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#G#hbpbp.Tbpbp#G#G.var.v.v.varbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbnarbn.v.v#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#G#h.T.T.T.T.T#G#G.v.v.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.Jahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahah#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.T#G#hbp.Tbp.Tbp#G#G.v.vasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasahbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmahbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbmbm#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#T#T#T#Tbt#T#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#Tbt#T#TahaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPahaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaPaP#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G........#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbpbp.Tbpbp#G#G.v.v#Ka3#abYbY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abY#abYbYahaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoahaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoaoao#G", "#G#G#G#G#Gbv#v#vaD#g#G#G#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G....#G#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.Tbp#G#h.T.T.T.T.T#G#G.v.vbKbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKbQbKahaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hajaj#hahajaj#hajaj#hajaj#hajaj#hajaj#haj#hajajaj#G", "#G#G#G#G#G.M#.byaEaDaG#G#G#G..#G#G#G#G..#G..#G..#G..#G..#G#G#G..#G#G....#G#G..#G..#G#G#G#G#G....#G#G#G....#G......#G#G..#G....#G#G......#G#G#G....#G..#G#G....#G#G..#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.Tbp#G#Gar.vbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKah#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#hah#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#hbN#G", "#G#G#G#G#G.8.g.gbc.Mby#G#G#G..#G#G#G#G..#G....#G#G..#G..#G#G#G..#G..#G#G..#G....#G#G#G#G#G#G..#G..#G..#G..#G#G#G#G..#G....#G#G..#G#G#G#G..#G..#G#G....#G..#G#G..#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#EbK#E#1#E...6#E#EbK#E..#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#E#EbK#EbKah#h#h#h#h#h........#pbn#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h..#h#h#h#h#h#h#h#h#h#h#h#h#h#h..#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#hah#h#h#h#h#h........#pbn#h#h#h#h#h#h#h#h..#G", "#G#G#G#G#G.k.La..c.8bY#G#G#G..#G#G#G#G..#G..#G#G#G..#G#G..#G..#G#G........#G..#G#G#G#G#G#G#G..#G..#G..#G..#G#G......#G..#G#G#G..#G#G......#G..#G#G#G..#G........#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbpbp.T#G#G.v.vbYbjbBbYbj...haXbjbBbB..#abjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBbYbjbBa3bjah#h#h#h#h#h..#h#h.i#k..bm#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#hbr#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#hah#h#h#h#h#h..#h#h.i#k..bm#h#h#h#h#h#h#h#h#G", "#G#G#G#G#G.kafaf#7.kby#G#G#G..#G#G#G#G..#G..#G#G#G..#G#G..#G..#G#G..#G#G#G#G..#G#G#G#G#G#G#G..#G#G..#G#G..#G..#G#G..#G..#G#G#G..#G..#G#G..#G..#G#G#G..#G..#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T#G#h.T.T.T.Tbp#G#Gar.v.UbX.UbX.U...E.ObXbXbX...UbX#w.O....aBbX.U..#V.....b#V.....E.UbXbibW..#Lb#bX.UbX.UbX.UbX.UbX.UbX.UbX.UbX.UbX.UbX.UbX.UbX.UbX.UbX.UbX.UbX.UbX.UbX.UbXahajajajajaj..ajaj#hajbL.4ajajao.fbrbrajajajar....brajajaobk..brajajbrbLbrbrajbrajajbr.s..brbkaoaj........ajbrajajaobkbrbkaoajajbrbL..brarajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajahajajajajaj..ajaj#hajbL.4ajajbrbLbr..aj..#G", "#G#G#G#G#Gbzal.Y#M#xaW#G#G#G..#G#G#G..#G#G..#G#G#G..#G#G#G..#G#G#G..#G#G..#G..#G#G#G#G#G#G#G..#G#G..#G#G..#G..#G#G..#G..#G#G#G..#G..#G#G..#G..#G#G....#G..#G#G..#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.Tbp#G#Gbn.v.1bE.1.9bE...1.b.l.1bE...9bE#6#N.9aL...1bE...b#X#N...b#X#N.h.9.1.b.b.9#V#6bE.1bEbE.1bEbE.1bEbE.1bEbE.1bEbE.1bEbE.1bEbE.1bEbE.1bEbE.1bEbE.1bEbE.1bE.1ahajajajajaj..ajajajajao..ajaj#s#sajbL.4ajajbrahajajajaj.f.sajajajaj..#sajajaj..ajaj...sajajar.fajaj..ajajaj..ajaj.farajar.fajaj...faoah..ajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajahajajajajaj..ajajajajao..ajaj..#sajajaj..#G", "#G#G#G#G#G#G#lb1bxbx#G#G#G#G........#G#G#G..#G#G#G..#G#G#G..#G#G#G#G....#G#G..#G#G#G#G#G#G#G..#G#G..#G#G..#G#G....#G....#G#G#G..#G#G....#G..#G....#G..#G#G....#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.var.n.n.nb0.n...n.U#L#HbE...n.1.nb0.n.1...nbE...nb0.n...n.nbE...n.n..bt.n.n...n.n.1.n.n.1.n.n.1.n.n.1.n.n.1.n.n.1.n.n.1.n.n.1.n.n.1.n.n.1.n.n.1.n.nbEa3ah#h#h#h#h#h..#h#h#h#hbN..#h#h...i#h#h..#h#hbr#k#h#h#h#h#p#h#h#h#h#h..#h#h#h#h..#h#h..#h#h#h#hbk#h#h..bN#h#h..#h#hbk#h#h#hbk#h#h..#h#h#h..#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#h#hah#h#h#h#h#h..#h#h#h#h#h..#h#h..#h#h#h#h..#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#G#hbpbp.Tbpbp#G#G.v.vaxaxaxaxax..axaxaL#Dax..axax.G.K......axax..axaxax..axaxax..axax..........axaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxaxahbNbN.TbNbN...TbNbNbNao...TbN..........bNbNaoaIbrbmbNbNbkbNbNbNbNbN..bNbNbNbN...TbN..bN.TbNbNbkbN.T..bNbN.T...TbNbkbNbNbNbkbNbN...TbNbN...TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbN.TbNbNah.TbN.TbNbN...TbNbN.Tao...TbN..bN.TbN.T..#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G......#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#E#E#E#E#E..#E#E#E#FbO..#E#E..#QbE#E..#E#E..#E#E#E..#E#E#E..#E#E..#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#E#EahbNbNbNbN.T..bNbNbNbNbLaIbNbNbrbN.TbN.TbNbNbNbN.w..bNbNbkbNbN.TbN.T...TbNbN.T..bNbN..bNbNbNbN#pbNbN..bNbNbN..bNbN#pbNbNbNbkbN.T..bNbN.T..bNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNbNahbNbNbNbN.T..bNbNbNbNbLaIbNbN..bNbNbNbN..#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.T#G#hbp.Tbp.T.T#G#G.v.vbg#5#5#5#5..#5#5#5bj#F..#5#5...j#5#n..aU#5..#5#5#5..#5#5#5..#5#5#Y#w#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5#5ahbpbpbpbpbp..bpbp#hbnbr.ibpbpbLar.T.Tbpbpbpbpbp#z..bpbpaIbLbpbpbpbp...Tbpbp.T..bp.T..bk.ibparaMbp.T..bmbpbp...TbpaIbnbpbnaIbpbp...Tbp.T..bpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpahbpbpbpbpbp..bpbp#hbnbr.ibpbp..bpbp.T.T..#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#q#q#q#q#q..#q#q#q#q.l..#q#qaL....#Q.P..#q..#q#q#q..#q#q#q..#q#q#q.6#6#6#L#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#qb1ahbpbpbpbpbp.........faobMbpbpbp.sbkbkbrbpbp....brbmbpbpbNbk....bpbp..bMbpbpbp..bMbM..aobr..#s.TbpbMbn....bp..bMbpbNbk..bkbNbpbp..bMbpbp..bpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpbpahbpbpbpbpbp.........faobMbpbp..bMbpbMbM..#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#q#qah#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gah#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.vbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbVbV#dbVbV#dah#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gah#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G........#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#Gar.vbZaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVah#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gah#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#Gbv#v#vaD#g#G#G#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v.oaVaVaVaVaVaVaVaVaV.oaVaV.oaVaV.oaVaV.oaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVah#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gah#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G.M#.byaEaDaG#G#G#G..#G#G#G#G..#G..#G..#G..#G..#G#G#G..#G#G....#G#G..#G..#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.vbZ#baVaV#baVaV#baVaVaVaVaVaVaVaVaVaVaVaVaV#baVaV#baVaV#baVaV#baVaV#baVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVaVah#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gah#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G.8.g.gbc.Mby#G#G#G..#G#G#G#G..#G....#G#G..#G..#G#G#G..#G..#G#G..#G....#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T#G#h.T.T.T.Tbp#G#G.v.v#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#jahajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajajahajajajajajajajajajajajajajajajajajajajaj#G", "#G#G#G#G#G.k.La..c.8bY#G#G#G..#G#G#G#G..#G..#G#G#G..#G#G..#G..#G#G........#G..#G#G#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.Tbp#G#G.v.v.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.fah.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.fah.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f#G", "#G#G#G#G#G.kafaf#7.kby#G#G#G..#G#G#G#G..#G..#G#G#G..#G#G..#G..#G#G..#G#G#G#G..#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#Gbzal.Y#M#xaW#G#G#G..#G#G#G..#G#G..#G#G#G..#G#G#G..#G#G#G..#G#G..#G..#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#G#hbpbp.Tbpbp#G#Gar.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#lb1bxbx#G#G#G#G........#G#G#G..#G#G#G..#G#G#G..#G#G#G#G....#G#G..#G#G#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G...a#G#G#G#G#G.w..#G#G#G#G#G#G#G#GaobC...a#G#G#GahbC..bCah#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G...a#G#G#G#G#G.w..#G#G#G#G#G#G#G#GaobC...a#G#G#GahbC..bCah#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G...a#G#G#G#G#G.w..#G#G#G#G#G#G#G#GaobC#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G...4#G#G#G#G#G.4..#G#G#G#G#G#G#G#GbCahbN#s#G#G.w...w#G.w...w#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G...4#G#G#G#G#G.4..#G#G#G#G#G#G#G#GbCahbN#s#G#G.w...w#G.w...w#G#G..#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G...4#G#G#G#G#G.4..#G#G#G#G#G#G#G#GbCah#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.Tbp#G#h.T.T.T.Tbp#G#Gar.v#G...4.w#G#G#G.w.4..#GbCaj#G#G...T#G..#G#G#G#G#G.f.a#G#G#G.a.f#G#G..#G#G#G#G#G#G#G#G#G#G#G........#G.T#s..bCaj#G#G.a......#G........#G#G#G#G#G#G#G#G#G#G...4.w#G#G#G.w.4..#GbCaj#G#G...T#G..#G#G#G#G#G.f.a#G#G#G.a.f#G#G..#G#G#G#G#G#G#G#G........#G.T#s..bCaj#G#G.a......#G........#G#G#G#G#G#G.s....#k..#G#Gah.x.....a#G........#Gah.x.....a#G#G..#k.....4.T#G#Gah.x.....a#G#G.a......#G#G.T#s..bCaj#G#G#G#G#G#G#G#G#G#G#G#G#G...4.w#G#G#G.w.4..#GbCaj#G#G...T#G..#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.Tbp#G#Gbn.v#G...w.4#G#G#G.4.w..#G.s.v#Gah.f#G#G#s.v#G#G#G#G..bN#G#G#GbN..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G.s.s#G.v.f#G#G..ao#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G...w.4#G#G#G.4.w..#G.s.v#Gah.f#G#G#s.v#G#G#G#G..bN#G#G#GbN..#G#G..#G#G#G#G#G#G#G#G#G..#G#G#G.s.s#G.v.f#G#G..ao#G#G#G#G..#G#G#G#G#G#G#G#k.v#Gaj#k..#G#G.fao#G.w..#G#G..#G#G#G.fao#G.w..#G#G..#kaj#G.a#s#G#G.fao#G.w..#G#G..ao#G#G#G#G.s.s#G.v.f#G#G#G#G#G#G#G#G#G#G#G#G#G...w.4#G#G#G.4.w..#G.s.v#Gah.f#G#G#s.v#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G..#G.4.w#G.w.4#G..#Gah.f#G#s.a#G#G#G#k.xao#G#G..#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G..bN#G#G..#G#GbC.v#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G.4.w#G.w.4#G..#Gah.f#G#s.a#G#G#G#k.xao#G#G..#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G..#G#G#G..bN#G#G..#G#GbC.v#G#G#G#G..#G#G#G#G#G#G#G.4#G#G#G#G..#G#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G..#G#G..#G#G#G#G.4#G#G#G#G#G#G..#G#GbC.v#G#G#G#G..bN#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G..#G.4.w#G.w.4#G..#Gah.f#G#s.a#G#G#G#k#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G#G#G#G#G#G......#G#G#G#G........#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbpbp.T#G#G.var#G..#G.w.4#G.4.w#G..#GbN..bNbC#G#G#G#G#Gao.x#G#G..bN#G#G#G.T..#G#G..#G#G#G#G#G..........#G#G..#G#G#G..........#G#Gaj#sbCah#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G.w.4#G.4.w#G..#GbN..bNbC#G#G#G#G#Gao.x#G#G..bN#G#G#G.T..#G#G..#G#G#G#G#G#G#G#G#G..#G#G#G..........#G#Gaj#sbCah#G#G..#G#G#G#G#G#G#G.4#G#G#G#G..#G#Gao.f......#G#G..#G#G#Gao.f......#G#G..#G#G#G#G.4#G#Gao.f......#G#Gaj#sbCah#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G..#G.w.4#G.4.w#G..#GbN..bNbC#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G....#G#G#G....#G#G#G#G#G#G#G..#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T#G#h.T.T.T.Tbp#G#G.vbn#G..#G#Gbr#kbC#G#G..#G#G.4#s#s#G#G#G#G#G#G..#G#G.f.a#G#G#G.a.f#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#GbC#G#G#G#G#G#G#G#Gao..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G#Gbr#kbC#G#G..#G#G.4#s#s#G#G#G#G#G#G..#G#G.f.a#G#G#G.a.f#G#G..#G#G#G#G#G#G#G#G#G..#G#G#GbC#G#G#G#G#G#G#G#Gao..#G#G..#G#G#G#G#G#G#G.4#G#G#G#G..#G#GbC.vbN#G..#G#G..#G#G#GbC.vbN#G..#G#G...T#G#G#G.x#G#GbC.vbN#G..#G#G#G#Gao..#G#GbC#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#Gbr#kbC#G#G..#G#G.4#s#s#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G....#G#G#G....#G..#G#G..#G#G..#G#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.var#G..#G#G.a...a#G#G..#G#G#k..ah#G#G#G#s.TahbC#G#G.w...w#G.w..ao#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..ah#G#G#k.v#G#G#G#G#G#G#Gao..#G#G..ah#G#G#G#G#G#G#G#G#G#G#G..#G#G.a...a#G#G..#G#G#k..ah#G#G#G#s.TahbC#G#G.w...w#G.w..ao#G#G..#G#G#G#G#G#G#G#G#G..ah#G#G#k.v#G#G#G#G#G#G#Gao..#G#G..ah#G#G#G#G#G#G#s.v#Gao.f..#G#G..ao#G.a..bN#G..ah#G#G..ao#G.a..bN#G..bkaj#G.v.s#G#G..ao#G.a..bN#G#G#Gao..#G#G#k.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G.a...a#G#G..#G#G#k..ah#G#G#G#s.T#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G..#G..#G..#G..#G#G..#G#G#G......#G#G#G..#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.vbn#G..#G#G#G#G#G#G#G..#G#G.wbC#G#G#G#G.a..bCao#G#G#G.abC.....a#G#G#G..........#G#G#G#G#G#G#G#G.a....#G#G.s.4.4bC#G#G....bCah#G#G.a....#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G..#G#G.wbC#G#G#G#G.a..bCao#G#G#G.abC.....a#G#G#G..........#G#G#G#G#G.a....#G#G.s.4.4bC#G#G....bCah#G#G.a....#G#G#G#G#GbN.4..bCao..#G#G.a....#k.s..#G.a....#G.a....#k.s..#G..aobC..#s.T#G#G.a....#k.s..#G....bCah#G#G#G.s.4.4bC#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G..#G#G.wbC#G#G#G#G.a..#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G..#G..#G..#G..#G..#G#G#G#G#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#G#hbp.Tbp.Tbp#G#G.var#G#G#G#G#G#G#G#G#G#G#G#G.v.s#G#G#G#G#G#G#G#G#G#G#G#G#G#G.a...v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.v.s#G#G#G#G#G#G#G#G#G#G#G#G#G#G.a...v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.v.s#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G..#G#G..#G..#G..#G#G#G..#G#G#G..#G#G..#G#G..#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#G#h.T.T.T.Tbp#G#G.vbn#G#G#G#G#G#G#G#G#G#G#G#G.xao#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gao.x.4#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.xao#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gao.x.4#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.xao#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G..#G#G..#G#G....#G#G#G..#G#G#G..#G#G..#G#G#G....#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbN#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbN#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G..#G#G..#G#G..#G#G#G#G#G......#G#G#G#G..........#G#G........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T#G#h.T.T.T.Tbp#G#G.v.v#G#G......bC.a#G#G#Gao.f.....x.a#G#GaobC...a#G#G#GahbC..bCah#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G......bC.a#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GaobC...a#G#G#GahbC..bCah#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G......bC.a#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G........#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G......#G#G#G#G........#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G..#G#G.wbC#G#GaobC.v#G#Gah.4#G#GbCahbN#s#G#G.w...w#G.w...w#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G.wbC#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbCahbN#s#G#G.w...w#G.w...w#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G.wbC#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#Gar.v#G#G..#G#G#G.4#G#G.f.v#G#G#G#G#G#G#G..#G#G#G#G#G.f.a#G#G#G.a.f#G#G..#G#G#G#G#G#G#G#G#G#G#G........#G.T#s..bCaj#G#G.a......#G........#G#G#G#G#G#G#G#G#G#G#G..#G#G#G.4#G#GbN.4...4.T#G#G.a......#G........#GbN.4...a..#G#G...vbC..#G.T#s..bCaj#G#G..#G#G#G#G#G.f.a#G#G#G.a.f#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G.4#G#GbN.4...4.T#G#G.a......#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G..#G#G......#G#G#G....#G#G......#G#G....#G..#G..#G..#G#G....#G#G#G..#G#G#G#G#G#G..#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#G#hbp.Tbp.Tbp#G#Gbn.v#G#G..#GbNbn.f#G#G..bN#G#G#G#G#G#G#G#s.v#G#G#G#G..bN#G#G#GbN..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G.s.s#G.v.f#G#G..ao#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G..#GbNbn.f#G#G#s.a#G.a#s#G#G..ao#G#G#G#G..#G#G#G#s.a#G.s..#G#G...saj#G#G.s.s#G.v.f#G#G#s.v#G#G#G#G..bN#G#G#GbN..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#GbNbn.f#G#G#s.a#G.a#s#G#G..ao#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G........#G#G..#G#G#G..#G..#G#G..#G#G..#G#G..#G#G....#G....#G#G..#G#G..#G#G#G......#G#G#G..#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G......#sbN#G#G..#G#G#G#G#G#G#G#G#G#k.xao#G#G..#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G..bN#G#G..#G#GbC.v#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G......#sbN#G#G.4#G#G#G.4#G#GbC.v#G#G#G#G..#G#G#G.4#G#G#G..#G#G..#G#G#G#G..bN#G#G..#G#G#G#k.xao#G#G..#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G......#sbN#G#G.4#G#G#G.4#G#GbC.v#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G..#G#G....#G#G#G..#G#G..#G#G#G..#G..#G#G#G........#G#G#G#G#G#G..#G#G..#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.T#G#hbp.Tbp.Tbp#G#G.var#G#G..#G#G#G#G#G#G..bN#G#G#G#G..#G#G#G#Gao.x#G#G..bN#G#G#G.T..#G#G..#G#G#G#G#G..........#G#G..#G#G#G..........#G#Gaj#sbCah#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G.4#G#G#G.4#G#Gaj#sbCah#G#G..#G#G#G.4#G#G#G..#G#G..#G#G#G#G..........#G#G#G#Gao.x#G#G..bN#G#G#G.T..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G.4#G#G#G.4#G#Gaj#sbCah#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G..#G#G#G#G..#G#G..#G#G..#G#G#G..#G..#G#G#G..#G#G#G#G#G..#G#G#G..#G#G..#G#G..#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.vbn#G#G..#G#G#G#G#G#G.f#k#G#G#G#G..#G#G#G#G#G..#G#G.f.a#G#G#G.a.f#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#GbC#G#G#G#G#G#G#G#Gao..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G.x#G#G#G.4#G#G#G#Gao..#G#G..#G#G#G.4#G#G#G..#G#G..#G#G#G#GbC#G#G#G#G#G#G#G#G#G..#G#G.f.a#G#G#G.a.f#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G.x#G#G#G.4#G#G#G#Gao..#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G..#G..#G#G..#G#G..#G#G..#G#G....#G..#G#G#G..#G#G..#G#G..#G#G#G..#G#G..#G#G#G....#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbpbp.Tbpbp#G#G.v.v#G#G..#G#G#G#G#G#Gao..#kaj#Gaj..#G#G#s.TahbC#G#G.w...w#G.w..ao#G#G..#G#G#G#G#G#G#G#G#G#G#G#G..ah#G#G#k.v#G#G#G#G#G#G#Gao..#G#G..ah#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#s.a#G.a#s#G#G#G#Gao..#G#G..ah#G#G.fao.T.s..#G#G..#G#G#G#G#k.v#G#G#G#G#G#s.TahbC#G#G.w...w#G.w..ao#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#s.a#G.a#s#G#G#G#Gao..#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G......#G#G#G....#G#G#G....#G#G....#G..#G..#G#G#G#G....#G#G#G#G......#G#G#G#G..........#G#G........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G..#G#G#G#G#G#G#Gao.f....bC.f#G#G.a..bCao#G#G#G.abC.....a#G#G#G..........#G#G#G#G#G#G#G#G.a....#G#G.s.4.4bC#G#G....bCah#G#G.a....#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#GbN.4...4bN#G#G....bCah#G#G.a....#G.ibr...a..#G#G..#G#G#G#G#G.s.4.4bC#G#G.a..bCao#G#G#G.abC.....a#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#GbN.4...4bN#G#G....bCah#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.var#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.a...v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#k.f#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.a...v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G......#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.vbn#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gao.x.4#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.......fbN#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gao.x.4#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbN#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#GbN#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G......#G#G......#G..#G....#G#G#G....#G#G..#G..#G#G....#G#G#G#G#G#G....#G#G..#G#G..#G..#G....#G#G..#G....#G#G#G......#G#G..#G..#G......#G#G....#G#G#G....#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G..#G#G..#G#G....#G#G..#G..#G#G..#G....#G#G..#G#G..#G#G#G#G..#G#G..#G..#G#G..#G....#G#G..#G....#G#G..#G..#G#G#G..#G....#G#G#G..#G#G..#G#G..#G..#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G..#G#G..#G#G..#G#G#G..#G........#G..#G#G#G#G....#G#G#G#G#G#G....#G#G..#G#G..#G..#G#G#G..#G..#G#G#G..#G..#G#G#G..#G..#G#G#G#G..#G#G........#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G..#G#G..#G#G..#G#G#G..#G..#G#G#G#G..#G#G#G#G#G#G..#G#G#G#G#G#G#G..#G..#G#G..#G..#G#G#G..#G..#G#G#G..#G..#G#G#G..#G..#G#G#G#G..#G#G..#G#G#G#G..#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G..#G#G..#G#G..#G#G#G..#G..#G#G..#G..#G#G#G..#G#G..#G#G#G#G..#G#G..#G..#G#G..#G....#G#G..#G....#G#G..#G..#G#G#G..#G..#G#G#G#G..#G#G..#G#G..#G..#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G......#G#G#G....#G..#G#G#G..#G#G....#G#G..#G#G#G#G....#G#G#G#G#G#G....#G#G#G......#G..#G....#G#G..#G....#G#G#G......#G#G..#G#G#G#G....#G#G....#G#G#G....#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#Gbv#v#vaD#g#G#G#G#G..#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G.M#.byaEaDaG#G#G#G..#G#G#G#G#G#G..#G..#G......#G#G..#G....#G#G..#G....#G#G..#G#G....#G#G......#G#G..#G#G#G#G#G#G..#G#G#G......#G#G#G......#G#G..#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G.8.g.gbc.Mby#G#G#G..#G#G#G#G#G#G....#G#G#G#G#G..#G....#G#G..#G....#G#G..#G..#G..#G#G..#G#G#G#G..#G..#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G..#G..#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G.k.La..c.8bY#G#G#G..#G#G#G....#G..#G#G#G#G......#G..#G#G#G..#G..#G#G#G..#G..#G..#G#G#G#G#G......#G..#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G..#G..#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G.kafaf#7.kby#G#G#G..#G#G#G#G..#G..#G#G#G..#G#G..#G..#G#G#G..#G..#G#G#G..#G..#G..#G#G#G#G..#G#G..#G..#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G..#G..#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#Gbzal.Y#M#xaW#G#G#G..#G#G#G....#G..#G#G#G..#G#G..#G....#G#G..#G..#G#G#G..#G..#G..#G#G..#G..#G#G..#G..#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G..#G..#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#lb1bxbx#G#G#G#G#G......#G..#G..#G#G#G#G....#G....#G....#G#G..#G#G#G..#G..#G#G....#G#G#G....#G....#G#G#G#G#G#G..#G#G#G......#G#G#G......#G#G..#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G........#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G..........#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#Gbv#v#vaD#g#G#G#G#G..#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G.M#.byaEaDaG#G#G#G..#G#G#G#G#G#G#G......#G#G......#G....#G#G......#G....#G#G......#G#G..#G....#G#G#G....#G..#G#G#G#G#G#G..#G#G#G......#G#G#G......#G#G..#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G.8.g.gbc.Mby#G#G#G..#G#G#G#G#G#G..#G#G#G..#G..#G#G..#G#G..#G..#G#G..#G#G..#G#G#G#G..#G....#G#G..#G..#G#G....#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G..#G..#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G.k.La..c.8bY#G#G#G..#G#G#G#G#G#G..#G#G#G..#G..#G#G..#G#G..#G..#G#G..#G#G..#G#G......#G..#G#G#G..#G..#G#G#G..#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G..#G..#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G.kafaf#7.kby#G#G#G..#G#G#G#G#G#G..#G#G#G..#G..#G#G..#G#G..#G..#G#G..#G#G..#G..#G#G..#G..#G#G#G..#G..#G#G#G..#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G..#G..#G#G#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#Gbzal.Y#M#xaW#G#G#G..#G#G#G#G..#G..#G#G#G..#G..#G#G..#G#G..#G..#G#G..#G#G..#G..#G#G..#G..#G#G#G..#G..#G#G....#G#G#G#G#G#G..#G#G..#G#G#G..#G..#G#G#G..#G..#G..#G#G..#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#lb1bxbx#G#G#G#G#G........#G#G#G......#G#G..#G#G..#G#G..#G..#G#G..#G#G..#G#G....#G....#G#G#G..#G#G....#G..#G#G#G#G#G#G..#G#G#G......#G#G#G......#G#G..#G#G....#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbp.Tbp#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.T.T.T.T#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.Tbp.Tbp.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbpbp.Tbpbp.T#G#hbp.Tbp.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G.Tbp.T.T.Tbp#G#h.T.T.T.Tbp#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#Gbp.T.Tbp.T.T#G#hbp.Tbp.T.T#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G", "#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#h#G#G#G#G#G#G#G.v.v#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G#G" }; unixODBC-2.2.14-p2/odbcinstQ/ODBC.xpm0100644000076400007640000000436707453236624015405 0ustar nicknick/* XPM */ static const char *xpmODBC[]={ "16 16 104 2", "Qt c None", ".# c #000000", "#q c #004600", "#i c #005501", "#a c #006501", "#x c #013800", "#p c #013d01", "#h c #014d01", "#r c #014e01", "## c #015c01", "#j c #015e01", "#k c #016701", ".3 c #016c01", "#b c #016e01", ".4 c #017501", "#c c #017701", ".U c #017b01", ".5 c #017e01", ".V c #018401", ".K c #018c01", ".W c #018e01", ".L c #019501", ".M c #019d01", ".z c #01a402", ".A c #01ac02", ".p c #01bb01", ".E c #01cc01", ".g c #01cf01", ".s c #01d102", ".6 c #028701", ".X c #029702", ".N c #02a601", ".O c #02ae02", ".o c #02b302", ".B c #02b502", ".C c #02bd01", ".q c #02c302", ".D c #02c502", ".f c #02c801", ".r c #02ca02", ".h c #02d602", ".t c #02d802", ".i c #02dc02", ".a c #02e002", ".j c #02e102", ".b c #02e502", ".c c #02ea02", ".d c #103030", ".e c #113636", ".k c #143d3d", ".l c #164343", ".m c #18494a", ".u c #194b4b", ".n c #1a5050", ".v c #1a5152", ".w c #1d5858", ".F c #1d595b", ".x c #1f5e5e", ".G c #1f5f60", ".y c #216565", ".H c #226768", ".I c #246d6e", ".P c #256f6f", ".J c #267374", ".Q c #277676", ".R c #297c7d", ".S c #2b8283", ".Z c #2b8485", ".T c #2d898a", ".0 c #2d8a8c", ".1 c #309193", ".7 c #309394", ".2 c #329799", ".8 c #32999b", ".9 c #35a0a1", "#d c #35a1a3", "#. c #36a6a7", "#e c #37a7a9", "#f c #39adaf", "#l c #39afb0", "#g c #3bb3b4", "#m c #3bb5b6", "#n c #3db9bb", "#t c #3ebbbd", "#o c #3fbfc1", "#u c #3fc0c2", "#v c #41c6c7", "#w c #42cbcc", "#F c #43ccce", "#K c #440000", "#G c #45d1d2", "#J c #48dadc", "#I c #5b0000", "#E c #730000", "#D c #8b0000", "#L c #8c0000", "#C c #a40000", "#B c #bb0000", "#A c #d00000", "#s c #e30000", "#z c #e40000", "#y c #f30000", "#H c #ff0000", ".Y c #ffffff", "QtQtQtQtQt.#.#.#.#.#.#QtQtQtQtQt", "QtQtQt.#.#.a.b.c.#.d.e.#.#QtQtQt", "QtQt.#.f.g.h.i.j.#.k.l.m.n.#QtQt", "Qt.#.o.p.q.r.s.t.#.u.v.w.x.y.#Qt", "Qt.#.z.A.B.C.D.E.#.F.G.H.I.J.#Qt", ".#.K.L.M.N.O.#.#.#.#.P.Q.R.S.T.#", ".#.U.V.W.X.#QtQtQtQt.#.Z.0.1.2.#", ".#.3.4.5.6.#QtQtQtQt.#.7.8.9#..#", ".####a#b#c.#QtQtQtQt.##d#e#f#g.#", ".##h#i#j#k.#QtQtQtQt.##l#m#n#o.#", ".##p#q#r.##s.#.#.#.#.##t#u#v#w.#", "Qt.##x.##y#z#A#B#C#D#E.##F#G.#Qt", "Qt.#.##H#y#s#A#B#C#D#E#I.##J.#Qt", "QtQt.##H#y#s#A#B#C#D#E#I#K.#QtQt", "QtQtQt.#.##s#A#B#C#L#E.#.#QtQtQt", "QtQtQtQtQt.#.#.#.#.#.#QtQtQtQtQt"}; unixODBC-2.2.14-p2/odbcinstQ/computer.xpm0100644000076400007640000000264407366313532016525 0ustar nicknick/* XPM */ static const char *computer_xpm[] = { /* width height num_colors chars_per_pixel */ " 32 32 9 1", /* colors */ ". c #000000", "# c #00007f", "a c #0000ff", "b c #007f00", "c c #00ffff", "d c #7f7f7f", "e c #bfbfbf", "f c None", "g c #ffffff", /* pixels */ "fffffffffddddddddddddddddddfffff", "ffffffffdeeeeeeeeeeeeeeeegd.ffff", "fffffffdgggggggggggggggggdd.ffff", "ffffffdgeeeeeeeeeeeeeeeeedd.ffff", "ffffffdgeddddddddddddddgedd.ffff", "ffffffdge.............#gedd.ffff", "ffffffdge.aaaaaaaaaaaa#gedd.ffff", "ffffffdge.acaaaaaaaaaa#gedd.ffff", "ffffffdge.acaaaaaaaaaa#gedd.ffff", "ffffffdge.aaaaaaaaaaaa#gedd.ffff", "ffffffdge.aaaaaaaaaaaa#gedd.ffff", "ffffffdge.aaaaaaaaaaaa#gedd.ffff", "ffffffdge.aaaaaaaaaaaa#gedd.ffff", "ffffffdge.aaaaaaaaaaaa#gedd.ffff", "ffffffdge##############gedd.ffff", "ffffffdgegggggggggggggggedd.ffff", "ffffffdgeeeeeeeeeeeeeeeeedd.ddff", "ffffffdddddddddddddddddddd.dde.f", "ffffff....................dded.f", "ffffdddddddddddddddddddddddedd.f", "fffdgggggggggggggggggggggggddd.f", "fffdgeeeeeeeeeeeeeeeeeeeeeeddd.f", "fffdgeeeeeeeeeeddddddddddeeddd.f", "fffdgeebbeeeeee..........ddddddf", "fffdgeeddeeeeeeeeeeeeeedeggedged", "fffddd.gd.gd.gd.gd.gd.ddddddddd.", "ffdgd.gd.gd.gd.gd.gd.dgggggggdd.", "fdgd.dd.dd.dd.dd.dd.dgggggggddd.", "dgggggggggggggggggggdeggggeddd.f", "deeeeeeeeeeeeeeeeeeeddddddddd.ff", "f...................deeeeed..fff", "fffffffffffffffffffff......fffff" }; unixODBC-2.2.14-p2/odbcinstQ/driver.xpm0100644000076400007640000001731007730246463016161 0ustar nicknick/* XPM */ static const char *xpmDriver[]={ "48 48 189 2", "Qt c None", "a0 c #000000", "aL c #090909", "av c #0f0f0f", "ad c #101010", "a4 c #131313", "a2 c #141414", "#x c #171717", "at c #181818", "an c #1a1a1a", "a6 c #1c1c1c", ".# c #1d1d1d", "am c #1e1e1e", "aJ c #1f1f1f", ".m c #212121", "#T c #232323", "aw c #252525", ".e c #262626", "a1 c #282828", "#9 c #292929", "aV c #2a2a2a", "ak c #2b2b2b", "aZ c #2c2c2c", "#2 c #2d2d2d", "ar c #2f2f2f", "az c #313131", ".o c #323232", ".5 c #343434", "aG c #373737", ".G c #3b3b3b", "#V c #3d3d3d", "aO c #3f3f3f", "aS c #404040", "aX c #414141", "ai c #434343", "#K c #454545", "#S c #464646", ".W c #4b4b4b", "aA c #4d4d4d", "aQ c #4e4e4e", "aU c #4f4f4f", "#I c #545454", ".H c #555555", "#l c #565656", "#Y c #575757", "aD c #585858", "a5 c #595959", "au c #5b5b5b", "#Z c #5c5c5c", "#3 c #5e5e5e", ".Q c #606060", "ag c #626262", ".A c #636363", "#X c #656565", "a3 c #666666", "a. c #676767", "al c #686868", ".a c #6a6a6a", ".L c #6b6b6b", ".4 c #6d6d6d", "as c #6e6e6e", "#i c #6f6f6f", "aN c #707070", "#D c #717171", "#4 c #727272", "#J c #737373", "a# c #747474", "ae c #757575", "aK c #777777", "aq c #787878", "#f c #7a7a7a", "#k c #7b7b7b", "#M c #7c7c7c", "#Q c #7d7d7d", "ao c #7e7e7e", ".6 c #7f7f7f", ".V c #808080", "#r c #818181", "#h c #828282", "aa c #838383", "#8 c #848484", "#P c #858585", "#b c #868686", "af c #878787", "ax c #888888", ".x c #8a8a8a", "aC c #8b8b8b", "aF c #8c8c8c", "aR c #8e8e8e", "#B c #8f8f8f", "#R c #909090", "aB c #919191", "ap c #949494", "#c c #959595", "aE c #969696", "aW c #989898", ".3 c #9a9a9a", "aM c #9b9b9b", "#g c #9c9c9c", "ab c #9d9d9d", "aH c #9e9e9e", "ac c #9f9f9f", ".f c #a0a0a0", "#1 c #a1a1a1", "aP c #a3a3a3", ".7 c #a4a4a4", "#w c #a5a5a5", ".n c #a6a6a6", "#q c #a7a7a7", ".w c #a8a8a8", ".X c #a9a9a9", "aI c #aaaaaa", ".b c #ababab", "aY c #acacac", "aT c #adadad", ".9 c #aeaeae", ".M c #afafaf", ".u c #b0b0b0", "#L c #b1b1b1", "ay c #b2b2b2", ".p c #b3b3b3", "#W c #b4b4b4", ".l c #b5b5b5", "#p c #b6b6b6", ".8 c #b7b7b7", ".B c #b8b8b8", ".v c #b9b9b9", "ah c #bababa", ".Z c #bbbbbb", "#E c #bcbcbc", "#7 c #bdbdbd", ".K c #bebebe", ".C c #bfbfbf", ".1 c #c0c0c0", ".0 c #c1c1c1", "#0 c #c2c2c2", "#A c #c3c3c3", ".R c #c4c4c4", "#C c #c5c5c5", "#F c #c6c6c6", ".T c #c7c7c7", "#a c #c8c8c8", "#6 c #c9c9c9", ".q c #cacaca", "#5 c #cbcbcb", "#s c #cccccc", ".2 c #cdcdcd", "#y c #cecece", ".t c #cfcfcf", ".U c #d0d0d0", "#v c #d1d1d1", ".c c #d2d2d2", ".d c #d3d3d3", "aj c #d4d4d4", "## c #d5d5d5", "#U c #d6d6d6", ".S c #d7d7d7", ".k c #d8d8d8", ".r c #d9d9d9", ".D c #dadada", "#o c #dbdbdb", "#. c #dcdcdc", ".g c #dddddd", ".s c #dedede", "#N c #dfdfdf", "#e c #e0e0e0", ".J c #e1e1e1", "#n c #e2e2e2", ".z c #e3e3e3", "#j c #e4e4e4", "#O c #e5e5e5", "#u c #e6e6e6", "#z c #e7e7e7", "#m c #e8e8e8", "#G c #e9e9e9", ".j c #eaeaea", ".I c #ebebeb", ".h c #ececec", "#d c #ededed", "#H c #eeeeee", "#t c #efefef", ".i c #f0f0f0", ".P c #f1f1f1", ".F c #f2f2f2", ".E c #f3f3f3", ".O c #f4f4f4", ".y c #f5f5f5", ".N c #f6f6f6", ".Y c #f7f7f7", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.a.b.c.d.eQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.f.g.h.i.j.k.l.mQtQtQt.n.oQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.p.q.r.s.t.u.v.w.#Qt.x.y.z.AQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.u.p.B.C.D.E.F.i.G.H.h.I.J.K.LQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.u.u.M.N.y.O.E.P.Q.R.r.S.T.K.U.VQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.WQtQtQtQtQt.X.u.M.Y.N.y.O.E.Z.Z.0.1.l.D.d.2.3QtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQt.1.P.4QtQt.5.V.6.7.M.N.Y.N.y.O.8.b.9.b.g#.##.t#a#bQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt#c.F#d#e#f.Q.M#g#h#i.7.O.N.N.N.y.E.I.t.k#j.s.S.U.q#kQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQt#l#m#m#n.0#o#p#q.3#r#h#s.P.y.N.N.y.O.F#t.I#u#e.r#v#wQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQt#x.1####.R#y.I#z#A#B#w#e.I#t.E.N.N.y.O.F#t.h#z.J.D#C.eQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQt#D#E.0.K#F#t#G#j.s.U.g.z#G#H.F.N.Y.N.O.F.i.h#z.J.D#B#I#J#KQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQt#B#L.b.E#H#G#j.g.r.g.z#m#H.F.N.Y.N.O.F.i.h#z.J.D.p#M#k#k.AQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt#b#n.E#t.j#u.J#N.J#O.j#t.E.N.N.y.O.F#t.h#z.J.D#y#P#Q#r#R#SQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt#T#n.y.P#d#G#u#O#u#G#d.P#U.L#V.L#U.F#t.I#u#e.r.c#W.8.C.B#XQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt#Y#w.U.E.i#H.I.I.I#d.J.aQtQtQtQt#Z#0#H.j#O#N.S#v.q.R.K.8#PQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt#B.M#1.0.O.F.i.i.i#n#2QtQtQtQtQt#3#4#5#G.z.g##.t#6#A#7#p#8QtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQt#9#3.Z.9.f##.N.y.O.O.O.aQtQtQtQtQtQta.a##R#u.J.D.d.2.T.0.Z.laaQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#ab.c#..S#v#Wac.N.N.Y.Y.N.vQtQtQtQtQtQtad.Vaeaf#j.s.S#v#5#C.C.v.pagQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt#V.i#e#o#U.U#0ah.y.y.N.N.N#ZQtQtQtQtQtQtai.6a##b.J#oaj#y#a#A#7.8#PakQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtal.F.j#0.1#F.k.E.O.O.y.y.yamQtQtQtQtQtan#Qao#4ap.g.S#v#5#FaqarQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt#D#z#z.U.j#d#t.P.F.E.E.O.OQtQtQtQtQtQt#D#8#kas.B.r.d.2#a#AatQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtauaj#0.2#u#G.h#H#t.i.P.P.FavQtQtQtaw#Qax#raqax.raj.t.q#C#RQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtar.Cay#6.J#O#z.j.I#d#H#H#H#razaA#DaBaC#8#Qaq.Raj.t#5#F.0aDQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQt.3#q#C#.#N#n#O#z#m#G.j.j#eacaEaBaF#b.6#Q.R.d.t#5.T#0#7.uaGQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQt#b.1##.r#.#N.J.z#j#O#O#O##.7.x#P#baH.t.c#y.q#F#0#7.v#WaIaJQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtaH#BaK#gaI.D#..s.s#N.s.s#..U#0#U.d.U.2#6#C#0#7.v#W.u.baBQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtaLaK#c#c.t###U.S.S.S#U##.d#v.t.2.q.T.R.1#7.B#W.u.b#q#VQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQt.AaM#g#1.9#y.t.U.U.U.t#y.2#s.q.T#C#0.C.Z.8.p.M.b#qaNQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtaO#waP.7ac.Z#a#6.q.q.q#6#a.T#C.R.0.C#E.v#QaQ.9aI.naRQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtaSaIaI.7aT.0#0#A#A.R#A#A#0.0.C.K.Z.v.baUQtQtaVaMaWamQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtaXaY#w.vah#E#E#7#7#7#E#Eah.v.8.l.paZQtQtQtQtQt.#QtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt.G#Lay#W.l#p.8#K#gac#w#W.p#L.MaTakQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtaSaY.9.M.Masa0#q#BaB.9aT.b.X#q#9QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtaOab.w.xQtQt#iaC#B.w.n#waP#1a1QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQta2a3a2QtQtQtaQaC#1.facabaxa4QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQta5aea#aAa6QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; unixODBC-2.2.14-p2/odbcinstQ/info.xpm0100644000076400007640000000256307366313532015622 0ustar nicknick/* XPM */ static const char *info_xpm[] = { /* width height num_colors chars_per_pixel */ " 32 32 6 1", /* colors */ ". c #000000", "# c #0000ff", "a c #7f7f7f", "b c #bfbfbf", "c c None", "d c #ffffff", /* pixels */ "cccccccccccaaaaaaaaccccccccccccc", "ccccccccaaabddddddbaaacccccccccc", "ccccccaabddddddddddddbaacccccccc", "cccccabddddddddddddddddbaccccccc", "ccccadddddddb####bddddddd.cccccc", "cccadddddddd######dddddddd.ccccc", "ccaddddddddd######ddddddddd.cccc", "cabdddddddddb####bdddddddddb.ccc", "cadddddddddddddddddddddddddd.acc", "abddddddddddddddddddddddddddb.ac", "adddddddddd#######ddddddddddd.ac", "adddddddddddd#####ddddddddddd.aa", "adddddddddddd#####ddddddddddd.aa", "adddddddddddd#####ddddddddddd.aa", "adddddddddddd#####ddddddddddd.aa", "abddddddddddd#####ddddddddddb.aa", "caddddddddddd#####dddddddddd.aaa", "cabdddddddddd#####dddddddddb.aaa", "ccadddddddd#########ddddddd.aaac", "ccc.dddddddddddddddddddddd.aaaac", "cccc.dddddddddddddddddddd.aaaacc", "ccccc.bddddddddddddddddb.aaaaccc", "cccccc..bddddddddddddb..aaaacccc", "ccccccca...bddddddb...aaaaaccccc", "ccccccccaaa...bddd.aaaaaaacccccc", "ccccccccccaaaa.ddd.aaaaacccccccc", "ccccccccccccca.ddd.aaccccccccccc", "ccccccccccccccc.dd.aaccccccccccc", "cccccccccccccccc.d.aaccccccccccc", "ccccccccccccccccc..aaccccccccccc", "ccccccccccccccccccaaaccccccccccc", "cccccccccccccccccccaaccccccccccc" }; unixODBC-2.2.14-p2/odbcinstQ/checkOk.xpm0100644000076400007640000000052107366313532016226 0ustar nicknick/* XPM */ static const char *checkOk_xpm[] = { /* width height ncolors chars_per_pixel */ "11 11 2 1", /* colors */ "@ c #000000", "_ s none m none c none", /* pixels */ "__________@", "_________@@", "________@@@", "_______@@@_", "_@@___@@@__", "@@@__@@@___", "@@@_@@@____", "@@@@@@_____", "@@@@@______", "@@@@_______", "_@@________" }; unixODBC-2.2.14-p2/odbcinstQ/checkCancel.xpm0100644000076400007640000000075007366313532017046 0ustar nicknick/* XPM */ static const char *checkCancel_xpm[] = { /* x y colors c/p */ "16 16 2 1", /* color def */ " s None c None", ". c black", /* bitmap */ " ", " ", " ", " ..... . ", " ..... . ", " ..... . ", " ..... . ", " ... . ", " . ... ", " . ..... ", " . ..... ", " . ..... ", " . ..... ", " ", " ", " ", " "}; unixODBC-2.2.14-p2/odbcinstQ/person.xpm0100644000076400007640000000260407366313532016171 0ustar nicknick/* XPM */ static const char *person_xpm[] = { /* width height num_colors chars_per_pixel */ " 32 32 7 1", /* colors */ "d c none", ". c #000000", "# c #00007f", "a c #0000ff", "b c #00ffff", "c c #7f7f7f", "e c #ffffff", /* pixels */ "dddddddddddddddddddddddddddddddd", "dddddddddddddcc.c.c.c.ccdddddddd", "dddddddddddc.c.c.c.c.c.c.ddddddd", "ddddddddddc.c.c.c.c.c.c.c.dddddd", "dddddddddc.c.c.c.c.c.c.c...ddddd", "ddddddddd.c.c.c.c.c.c.c.c...dddd", "ddddddddcc.c.c.c.c.c.c......dddd", "dddddddcc.c.c.c.c.c.c.......dddd", "dddddddc.c.c.c.c.c.c..eee..cdddd", "ddddddc.c.c.c.c.c.c..eeee..ddddd", "ddddddcc.c.c.c......eeeee.dddddd", "ddddddc.c.c.c..cc..eeeccc.dddddd", "ddddddcc.c.c..ceeeeeeec.ce.ddddd", "ddddddc.c.c.c.eeeeeeeeeeee.ddddd", "ddddddcc.c.c..eeeeeeeeeeee.ddddd", "ddddddc.c.c.c.eeeeeeeeeeeee.dddd", "ddddddcc.c.c.c.eeeeeeeeee..ddddd", "ddddddd.c.c.c...eeeeeeeee.dddddd", "dddddddc.c.c...eeeeeeeeee.dddddd", "ddddddddc.c.c.eeeeeeeeeee.dddddd", "dddddddddc.c..eeeeeeeeeee.dddddd", "ddddddddddc..ceeec.c.c...ddddddd", "ddddddddddccceeeeeec.ddddddddddd", "dddddddd##beeeeeeeec.ddddddddddd", "ddddddd#bb#eeeeeeeec.ddddddddddd", "dddddd#bbab#eeeeeeec...ddddddddd", "ddddd#bbabab##eeeeec..#..ddddddd", "dddddd##bababa###eec.###..dddddd", "dddddddd#babababa####a#a#..ddddd", "ddddddddd###bababab###a#a#..dddd", "dddddddddddd###babab#####...dddd", "ddddddddddddddd#########dddddddd" }; unixODBC-2.2.14-p2/odbcinstQ/server.xpm0100644000076400007640000000260407366313532016171 0ustar nicknick/* XPM */ static const char *server_xpm[] = { /* width height num_colors chars_per_pixel */ " 32 32 7 1", /* colors */ ". c #000000", "# c #0000ff", "a c #7f7f7f", "b c #bfbfbf", "c c None", "d c #ff0000", "e c #ffffff", /* pixels */ "ccccccccccccccccc..............c", "cccccccccccccccc.bbbbbbbbbbbbba.", "ccccccccccccccc.bbbbbbbbbbbbbaa.", "cccccccccccccc.eeeeeeeeeeeeeaaa.", "cccccccccccccc.bbbbbbbbbbbbbaaa.", "cccccccccccccc.bbbbbbbbbbbbbaaa.", "cccccccccccccc.bbbbbbbbbbbbbaaa.", "cccccccccccccc.bbbbbbbbbbbbbaa..", "cccccccccccccc.bbbbbbbbbbbbba.b.", "cccccccccccccc.aaaaaaaaaaaaa.ba.", "cccccccccccccc.eeeeeeeeeeeeebaa.", "cccccccccccccc.bbbbbbbbbbbbbaa..", "cccccccccccccc.bbbbbbbbbbbbba.b.", "cccccccccccccc.aaaaaaaaaaaaa.ba.", "ccccc............eeeeeeeeeeebaa.", "cccc.bbbbbbbbbbba.bbbbbbbbbbaaa.", "ccc.eeeeeeeeeeeaa.bbbbbbbbbbaaa.", "ccc.e.........baa.bbbbbbbbbbaaa.", "ccc.e.########baa.bbbbbbbbbbaaa.", "ccc.e.########baa.bbbbbbbbbbaaa.", "ccc.e.########baa.bbbbbbbbbbaaa.", "ccc.e.########baa.bbbbbbbbbbaaa.", "ccc.e.########baa.bbbbbbbbbbaaa.", "ccc.e.########baa.bbbbbbbbbbaaa.", "ccc.eeeeeeeeeebaa...bbbbbbbbaaa.", "cc..aaaaaaaaaaaa.aea.bbbbddbaa.c", "c.b.............aeaa.bbbbbbba.cc", ".eeeeeeeeeeeeeeeebaa.........c.c", ".ebbbbbbbbbbbbbbbaaa.cccccccccc.", ".ebbbbbbbba....abaa.cc.ccccccc.c", ".aaaaaaaaaaaaaaaab.cc.........cc", "c.................cccc.ccccccccc" }; unixODBC-2.2.14-p2/odbcinstQ/smallLinuxODBC.xpm0100644000076400007640000000110007366313532017431 0ustar nicknick/* XPM */ static const char *smallLinuxODBC_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 5 1", /* colors */ ". c #000000", "# c #96586DB6FFFF", "a c #00000000FFFF", "b c None", "c c #FFFFD34C1861", /* pixels */ "bbbbbbbbbbbbbbbb", "bbbbbb.#..bbbbbb", "bbbb.c######.bbb", "bbbcc########.bb", "bbccc.########.b", "b.cccc.#.######b", "bccccc.bbb.####.", "bcccc.bbbbb#####", "bcccc.bbbbb....#", "bcccc..bbb.aaaa.", "bccccc.bbb.aaaa.", "b.cccc.a.aaaaaa.", "b.ccccaaaaaaaa..", "bbb..caaaaaaa.bb", "bbbb.aaaaaaa.bbb", "bbbbbb....bbbbbb" }; unixODBC-2.2.14-p2/odbcinstQ/about.xpm0100644000076400007640000003144707730246463016007 0ustar nicknick/* XPM */ static const char *xpmAbout[]={ "48 48 515 2", ".# c #000000", "fz c #070000", "fp c #0b0b0b", "c7 c #0e0000", "dU c #0e0b01", "ga c #0e0c01", "af c #0f0e01", "bt c #110100", ".q c #110200", "cV c #120b0b", "#f c #150000", "dV c #160000", "a5 c #171717", "cf c #180a0a", "fX c #181818", "e9 c #1a170c", "at c #1a190c", "fm c #1c1402", "ex c #1c1502", "ca c #1d0000", "g. c #1d1802", "bH c #1e0000", "eN c #1e1902", ".A c #1e1b02", "cl c #1e1e1e", "cb c #1f1d02", "#W c #1f1e10", "bD c #1f1f1f", ".F c #200802", ".R c #212121", ".r c #220401", ".w c #222222", "du c #240000", "bI c #262626", "dj c #280802", "ec c #2a2323", "cZ c #2b0000", ".i c #2b2203", ".V c #2c2303", ".x c #2c2403", ".a c #2d2704", "c4 c #2e0a0a", "eZ c #2e2a04", "#e c #2e2b04", "ag c #2e2e2e", ".W c #2f0d03", "d3 c #2f2f2f", "dD c #300d03", "d0 c #300e03", ".v c #303030", "dL c #310401", "#v c #363636", ".s c #370300", "bm c #370b0b", "ek c #382905", "d7 c #392b05", "el c #3a0000", "eK c #3a2e05", ".t c #3b0000", "eh c #3b3105", "g# c #3b3205", "d4 c #3b3305", ".S c #3c3605", "ed c #3d0702", "c0 c #3d0d03", "fW c #3d3705", "#y c #3d3805", "b3 c #3d3d3d", "#d c #3e3a05", "fY c #3e3e3e", "be c #400401", "#P c #414141", ".u c #431818", "dz c #470902", "eR c #473706", "cN c #480000", ".h c #483906", "fy c #490000", "dS c #4b4206", "dp c #4c0d03", ".B c #4c4406", "c8 c #4d4707", "dg c #4d4807", "dk c #4d4d4d", "fe c #4e4e4e", "fN c #4f0000", "fH c #505050", "di c #511004", "f0 c #513434", "bs c #530702", "co c #535353", "c9 c #541305", "dP c #541806", "e6 c #554007", "bA c #570000", "bV c #571505", "ev c #574707", "#c c #584907", "bf c #594a4a", "bd c #5a1204", ".z c #5a4f08", "bu c #5a5a5a", "av c #5b5108", "ff c #5c5408", "f5 c #5c5508", "dm c #5c5c5c", "#Q c #5d5608", "b2 c #5d5708", "dH c #5d5d5d", "bU c #5e0000", "eg c #5e5e5e", ".G c #5f1605", "dt c #601606", "eb c #606060", "b6 c #650000", "fZ c #666666", "cz c #672108", "fE c #675609", "cp c #682209", ".y c #685809", "d8 c #690200", "cv c #696969", "f9 c #6b6109", "au c #6b610a", "cG c #6c6c6c", "bG c #700200", "ee c #702209", ".Q c #737373", "#C c #740000", "fM c #750000", "cu c #750100", "cE c #760100", "bP c #760200", "eO c #76630a", "cI c #770200", "#x c #77650b", "fo c #77660a", ".L c #780300", "fD c #78670b", "#S c #78690b", "fx c #790401", "a# c #796c0b", "c5 c #7a0401", "ey c #7a2323", "fC c #7a6c0b", "fV c #7a6f0b", "ft c #7b0501", ".4 c #7b0f0f", "## c #7b7b7b", "bp c #7c0601", "eM c #7c0f0f", "bc c #7c1605", "e0 c #7c720b", "ae c #7c740b", "bn c #7c7c7c", "fL c #7e0702", "bF c #7f0802", "e# c #7f1a1a", "ea c #7f7070", "bg c #7f7f7f", "fK c #800902", "dO c #802409", "c3 c #810a02", "bK c #811c1c", "fw c #820a02", "br c #830b03", "dW c #840c03", "eo c #841e1e", "cg c #842b0b", "#H c #850c03", "bz c #851f1f", "c2 c #860d03", "dy c #86710c", "dR c #873030", "aR c #880f04", "dF c #883838", "aB c #890f04", "c6 c #891004", ".b c #897c0c", "bL c #8a1004", "fB c #8a800c", "fq c #8a8a8a", "en c #8b1004", "#g c #8b260a", "ap c #8b2d2d", "ez c #8b3434", "eT c #8b8b8b", "aY c #8c1104", "bC c #8c830c", "ct c #8d1204", "aj c #8d1205", ".X c #8d270a", "cL c #8d2d0c", "dv c #8d5353", "eY c #8d8d8d", "bO c #8e1305", "fd c #8e3e3e", "db c #8e8e8e", "cD c #8f1405", ".H c #8f1e08", "eA c #8f3838", "fl c #8f6c0c", "bq c #901405", "bl c #904040", "dZ c #912a0b", "fv c #921605", "fc c #921606", "bJ c #924242", ".K c #931706", "d1 c #932c0c", "ba c #941706", "bb c #941806", "eU c #943d3d", "cU c #945353", "em c #951806", "b# c #961906", "eX c #963f3f", "b1 c #971906", "fu c #971907", "f. c #979797", "fG c #98880d", "dI c #98890d", ".J c #9a1c07", "dE c #9a2109", "a. c #9a8d0e", "eG c #9b1c07", "#z c #9b900e", "ay c #9b910e", "aI c #9c1d07", "bM c #9c1d08", "fJ c #9c4c4c", "bN c #9d1e08", "c# c #9e1e08", "e. c #9e1f08", "eu c #9e9e9e", ".I c #9f1f08", "c1 c #a02008", "d9 c #a12008", "b. c #a12108", "ep c #a25959", "ci c #a32209", ".3 c #a42309", "cy c #a4a4a4", "#m c #a55c5c", "aJ c #a56363", "cY c #a62409", "aV c #a7250a", "cM c #a8260a", "by c #a85f5f", "fO c #a8990f", "aU c #a9260a", "dM c #a9270a", "eB c #a96868", "#T c #a9990f", "cc c #a9a9a9", "aW c #aa270a", "dC c #aa2d0c", "aZ c #aa7777", "dn c #aa9e0f", "dl c #aaaaaa", "fa c #ab280a", "bQ c #ab9f0f", "cj c #aba00f", "#u c #ababab", "eL c #ac290b", "fR c #acacac", "aT c #ad290b", "eF c #ad7b7b", "aX c #ae2a0b", "as c #aeaeae", "b0 c #af2b0b", "ef c #af350e", "cO c #af6d6d", "a9 c #af7575", "da c #b02c0b", "bk c #b07e7e", "eS c #b0900f", "bT c #b09393", ".M c #b18585", "f6 c #b1930f", ".2 c #b22d0c", "fb c #b32d0c", "aS c #b32e0c", "cT c #b38f8f", "e7 c #b39910", ".P c #b3b3b3", "et c #b49797", "dw c #b4b4b4", "c. c #b52f0c", "ds c #b5300c", "eC c #b57b7b", "cn c #b5b5b5", ".1 c #b6300d", "fn c #b6a310", "b5 c #b6b6b6", "aO c #b7a610", "#w c #b8a811", "e1 c #b8a911", ".0 c #b9320d", "fA c #b9ac11", "#O c #b9b9b9", "aF c #ba330d", "dQ c #ba330e", "bE c #ba9d9d", "bR c #baae11", "#X c #bababa", ".Z c #bb330d", ".Y c #bb340e", "aE c #bc340e", "bo c #bc9898", "a7 c #bcbcbc", "aG c #bd350e", "#. c #bdbdbd", "cC c #be360e", "cF c #bebebe", "ao c #bf360e", "aD c #bf370e", "dX c #c0370f", "dG c #c0c0c0", "aH c #c1380f", "cW c #c13d10", "e8 c #c1a111", "d# c #c2380f", "bZ c #c2390f", "f1 c #c2a511", "cx c #c2c2c2", "eW c #c33a0f", "a4 c #c3c3c3", "dr c #c43a0f", "aQ c #c49898", "aC c #c53b0f", "#l c #c53b10", "cS c #c5a8a8", "#t c #c5c5c5", "eV c #c63c10", "f8 c #c6b112", "aa c #c6b212", "dx c #c6c6c6", "b9 c #c73c10", "eJ c #c79511", "dh c #c7b512", "b4 c #c7c7c7", "bW c #c83d10", "bx c #c89c9c", "eq c #c8abab", ".O c #c8c8c8", "#k c #c93e10", "b7 c #c94312", ".c c #c9ba12", "bB c #c9bc12", "aN c #c9c9c9", "#h c #ca3e10", "d. c #ca3f11", "#A c #cabd12", ".9 c #cacaca", "#j c #cb3f11", "ah c #cbcbcb", "#i c #cc4011", ".E c #cca512", "dd c #ccafaf", "#9 c #cccccc", "dY c #cd4011", "am c #cd4111", ".g c #cda812", "dc c #cdbebe", "fI c #cdcdcd", "cs c #ce4111", "dK c #ceaa12", "es c #cecece", "al c #cf4211", "cB c #cf4212", "an c #cf4312", "ce c #cfcfcf", "dB c #d04312", "cR c #d0b3b3", ".N c #d0d0d0", "bY c #d14412", "fs c #d1adad", "bS c #d1d1d1", "ak c #d24412", "dA c #d24512", "eD c #d2adad", "#I c #d2aeae", "#s c #d2d2d2", "#G c #d34512", "cP c #d3afaf", "fr c #d3d3d3", "dq c #d44613", "e2 c #d4bb13", "fS c #d4c6c6", ".8 c #d4d4d4", "b8 c #d54613", "#1 c #d54713", "de c #d5b8b8", "#a c #d5be13", "er c #d5d5d5", "#F c #d64713", "d2 c #d64813", "a3 c #d6d6d6", "#D c #d74813", "bj c #d7c1c1", "f# c #d7d7d7", "ch c #d84813", "#E c #d84913", "cQ c #d8bbbb", "fQ c #d8c814", "#N c #d8d8d8", "cX c #d94913", "cr c #d94a13", "aA c #d9bcbc", "ad c #d9cb14", "a0 c #d9d9d9", "cA c #da4a14", "cH c #da4b14", "eH c #daae13", "aM c #dadada", "bX c #db4b14", "eP c #dbb113", "#8 c #dbdbdb", "dN c #dc4b14", "cq c #dc4c14", "ai c #dcbfbf", ".7 c #dcdcdc", "#Z c #dd4c14", "#0 c #dd4d14", "#r c #dddddd", "cd c #dedede", "a1 c #dfdfdf", "cK c #e0e0e0", "bh c #e1e1e1", ".C c #e2c614", "ew c #e3a914", "e5 c #e3aa14", "bw c #e3d4d4", ".6 c #e3e3e3", "eI c #e4ad14", "cw c #e4e4e4", "ej c #e5af14", "#q c #e5e5e5", "eQ c #e6b114", "#7 c #e6e6e6", "d6 c #e7b514", "a6 c #e7d415", "cm c #e7e7e7", "fk c #e8b614", "fg c #e8d615", ".5 c #e8e8e8", "dT c #e9bc15", "ck c #e9da15", "bv c #e9e9e9", "ei c #eabc15", ".p c #eabe15", "#Y c #eadbdb", "bi c #eaeaea", "e4 c #ebc015", "az c #ebebeb", "fj c #ecc215", "d5 c #ecc315", ".U c #ecc415", "#p c #ececec", "f7 c #edc815", "eE c #eddede", "a2 c #ededed", ".D c #eec815", ".j c #eec915", ".o c #eeca15", "cJ c #eeeeee", ".f c #efca15", "e3 c #efcc15", "#b c #efcd15", "#6 c #efefef", "dJ c #f0d016", "a8 c #f0f0f0", ".T c #f1d116", ".k c #f1d216", "#o c #f1f1f1", ".e c #f2d516", "f2 c #f2d616", "#M c #f2f2f2", "fT c #f3d716", "fi c #f3d816", "#2 c #f3ecec", "do c #f4da16", "f3 c #f4db16", "#R c #f4dd16", "df c #f4eded", "aq c #f4f4f4", ".l c #f5dc16", "fU c #f5de16", "fF c #f5df16", "#n c #f5f5f5", ".d c #f6df16", ".n c #f6e016", "aw c #f6e116", "fh c #f6e216", "#5 c #f6f6f6", "f4 c #f7e316", "fP c #f7e416", "ab c #f7e417", ".m c #f7e517", "#L c #f7f7f7", "#U c #f8e517", "aP c #f8e617", "ax c #f8e717", "ac c #f8e817", "ar c #f8f8f8", "#V c #f9e817", "#B c #f9e917", "aL c #f9f9f9", "#K c #fafafa", "aK c #fbfbfb", "#J c #fcfcfc", "#3 c #fdfdfd", "#4 c #fefefe", "Qt c none", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.#QtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.a.b.c.d.e.f.g.hQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.i.g.j.k.l.m.n.e.o.p.hQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.q.r.s.t.u.v.w.x.y.z.A.#.B.C.D.EQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.F.G.H.I.J.K.L.M.N.O.P.Q.RQtQtQt.S.T.U.VQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.W.X.Y.Z.0.1.2.3.4.5.6.7.8.9#.##QtQtQt#a#b#cQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt.##d#d#d#e.##f#g#h#i#i#i#j#k#l.J#m#n#o#p#q#r#s#t#u#vQt#w.e#xQtQtQtQtQtQt", "QtQtQtQtQtQtQtQt#y#z#A#B#B#B#B#A#e###C#k#D#E#E#E#E#F#G#H#I#J#K#L#M#p.6#N.9#O#P#Q#R#SQtQtQtQtQtQt", "QtQtQtQtQtQtQt#T#U#V#B#B#B#B#A#W#X#Y#C#Z#0#0#Z#Z#Z#0#1#C#2#3#4#3#K#5#6#7#8#9#X#va.a#QtQtQtQtQtQt", "QtQtQtQtQtQtaaabacadae#daf.#agah#3aiaj#Dakalamaman#Gaoapaq#L#K#3#4#Jar#o.5#8#9asatauQtQtQtQtQtQt", "QtQtQtQtQtavawaxayQtQtQtQtQtaz#4#3aAaBaCaDaEaFaFaGaHaIaJ.5#p#o#LaK#4#3aL#M.5aMaN.Q.#QtQtQtQtQtQt", "QtQtQtQtQtaOaPadQtQtQtQtQt#9#4#3araQaRaSaTaUaVaVaWaXaYaZa0a1#7a2aq#K#4#3aL#o#qa3a4a5QtQtQtQtQtQt", "QtQtQtQtQta6acaeQtQtQtQta7#4#3#La8a9ajb..Jb#babbbcbdbebfbga4#Nbhbi#MaL#4#3#LbjbkblbmQtQtQtQtQtQt", "QtQtQtQtQt.m#VaeQtQtQtbn#3#4ara8#7bobpbqaRbrbsbtQtQtQtQtQtQtbu.8a1bvbwbxbybz#C#C#CbAQtQtQtQtQtQt", "QtQtQtQtQtbB#BbCQtQtbDaK#4#K#M.5.7bE.LbFbGbHQtQtQtQtQtQtQtQtQtbIbJbK#CbLbMbNbObP#C#CQtQtQtQtQtQt", "QtQtQtQtQtbQ#BbRQtQt#X#3#3#5aza1bSbT#CbUQtQtQtQtQtQtQtQtQtQtQtQtbVbWbXbYbZb0b1bp#C#C.#QtQtQtQtQt", "QtQtQtQtQtb2#B#BQtb3aK#4#K#o#qa3b4b5b6QtQtQtQtQtQtQtQtQtQtQtQtQtQtb7#Zb8b9c.c#br#C#CcaQtQtQtQtQt", "QtQtQtQtQtcb#B#B#dcc#J#3#L#pcdce#.#ucfQtQtQtQtQtQtQtQtQtQtQtQtQtQtcg#0ch#jaFciaB#C#CcaQtQtQtQtQt", "QtQtQtQtQtQtcjckcl#L#3#Jaqcm#Nb4cncoQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtcpcqcrcsaGaVctcu#C.#QtQtQtQtQt", "QtQtQtQtQtQtb2aycvaL#4aK#ocw.8cxcyQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtczbXcAcBcCaUcDcE#CQtQtQtQtQtQt", "QtQtQtQtQtQtQt#da4#K#4#K#6bhbScFcGQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtczbXcHanaDaWcDcIbUQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#a8#K#4aLcJcK.N#.#vQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtcLbXcAalcCcMbOcEcNQtQtQtQtQtQt", "QtQtQtQtQtQtQtcaapcOcPcQcRcScTcUcVQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtcW#ZcXamaEcYaYcucZQtQtQtQtQtQt", "QtQtQtQtQtQtQtc0cYc1ctbObLc2c3c2.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtc4#C#Cc5c6#H#C#C#Cc7c8QtQtQtQtQt", "QtQtQtQtQtQtQtc9.0d.#D#0#Gd#dac1.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtdbb5aNdcdddedf#3#OdgdhQtQtQtQtQt", "QtQtQtQtQtQtQtdi.2#l#GbXcAd.aFaWdjQtQtQtQtQtQtQtQtQtQtQtQtQtQtdkdl#.cea1#p#L#4#Jdmdndo.aQtQtQtQt", "QtQtQtQtQtQtQtdpaWcCam#E#0dqdrdsdtQtQtQtQtQtQtQtQtQtQtQtQtQtdudvdwdxa3cw#o#K#4#8.#a6.edyQtQtQtQt", "QtQtQtQtQtQtQtdzc1c.#ldAbXcqdBbZdCQtQtQtQtQtQtQtQtQtQtQtQtdDdEdFdGcecdbi#n#3#3dHQtdIdJdKQtQtQtQt", "QtQtQtQtQtQtQtdL.KdMaEd.#1dNbXdBdrdOQtQtQtQtQtQtQtQtQtQtdPb9dQdR#9a0#7#o#K#4#.QtQtdS.odTdUQtQtQt", "QtQtQtQtQtQtQtdVdWaIb0dXdY#Fcqcq#G#kdZc7QtQtQtQtQtQtd0d1#i#Fd2#C#NcwcJ#L#3cJd3QtQtd4d5d6d7QtQtQt", "QtQtQtQtQtQtQtQtd8aYd9aSaHam#1bX#ke.bFe#eaebecedeeef#i#GbX#0cA#Ccwa2#n#J#4egQtQtQteheiejekQtQtQt", "QtQtQtQtQtQtQtQtelc5bLememaIenc5eoepeq.7eresetaY#FcXcq#0bX#DbY#CcJ#5aK#4euQtQtQtQtevd6ewexQtQtQt", "QtQtQtQtQtQtQtQtc7eyezeAeBeCeDeEaK#5a8bv.6cdeFeG#ZcqcA#D#G#idr#C#L#J#4euQtQtQtQtQteHeIeJQtQtQtQt", "QtQtQtQtQtQtQtQteKdmb4#N#7a8ar#J#4#3aLaqa8#pa9.3dqdAcB#j#laGeLeM#3#4eu.#QtQteNeOePeQeweRQtQtQtQt", "QtQtQtQtQtQtQtQteS.VeTaNa0#7#6#5aK#4#4#J#K#LeUaVeVeWaDaFaSaWemeX#3eYeZe0e1e2e3e4d6e5e6QtQtQtQtQt", "QtQtQtQtQtQtQtQte7e8e9f.aNf#.6a2aqaL#J#3#4#4eMfafbb0fa.3aIfcc3fdfefffgfhfi#bfjfkflfmQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtfn.kfofpfqdxfra1.5#6aqar#KfsftbM.JfufvenfwfxfyfzfffAfBfCfDfEeKQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtfAfFfGQtQtfHcnfI#NcKcma2#ofJc5fKfLft.LfMfN#fQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtfOfPfQQtQtQtQtcofResa3#rfS#C#C#C#CbUelc7QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQt.zfTfUa.afafc8fVfWfXfYfZf0elelcac7QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtf1dJf2f3.nf4.m.mabf5.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtf6f7#b.T.ef8f9QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtg.ehg#gaQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; unixODBC-2.2.14-p2/odbcinstQ/dsn-file.xpm0100644000076400007640000002745207730246463016377 0ustar nicknick/* XPM */ static const char *xpmDSN_File[]={ "48 48 451 2", "Qt c None", "aa c #000000", "fa c #070707", ".# c #0d0d0d", "cn c #0e0e0e", "b4 c #141414", "c9 c #151515", "bL c #171717", ".b c #1b1b1b", "bf c #1c1c1c", ".i c #1d1d1d", "f# c #1f1f1f", "bK c #212121", "eK c #232323", "bx c #242424", "ab c #262626", "bJ c #282828", "dn c #292929", "#w c #2a2a2a", "eV c #2b2b2b", "cT c #2d2d2d", "e0 c #2e2e2e", "#i c #2f2f2f", "cv c #323232", "d# c #343434", "ca c #353535", ".a c #363636", "ak c #383838", "e5 c #393939", "az c #3a3a3a", "#y c #3b3b3b", "dp c #3b6f9e", "by c #3c3c3c", "a2 c #3d3d3d", ".A c #3d71a1", "bI c #3e3e3e", "f. c #404040", ".I c #4073a1", "cK c #4074a4", "c0 c #4174a3", "aH c #424242", "b3 c #434343", "au c #4375a2", "ck c #444444", "cJ c #4475a0", "aN c #4475a1", "de c #4476a3", "a5 c #459548", "d8 c #464646", "co c #474747", "eT c #479f4a", "#2 c #494949", ".z c #4a779f", "e9 c #4b4b4b", "av c #4b7daa", "cB c #4c4c4c", "aO c #4d7da9", "dd c #4e7ba3", "cZ c #4e7ba4", "a1 c #4f4f4f", ".B c #5081ad", ".c c #515151", "a8 c #517fa9", "c1 c #5182ae", "e8 c #525252", "dy c #535353", ".J c #5382ab", "#K c #545454", ".H c #547da3", "cg c #5484ae", "cS c #555555", "ey c #5584ae", "#S c #5684ae", ".j c #575757", "#A c #5785ae", "c7 c #585858", "e. c #5885ae", "bM c #5886ae", "cA c #595959", "#k c #5986ae", "aw c #598ab4", "cD c #5a5a5a", ".8 c #5a86ae", "eJ c #5b5b5b", "bj c #5b87af", "aI c #5c5c5c", "cU c #5c625d", ".V c #5c87af", "dA c #5d88af", ".C c #5d8db7", "aM c #5e84a6", "aP c #5e8bb3", "#t c #5f5f5f", "#0 c #606060", "cL c #608db6", "at c #6187a9", "ed c #6197c3", "a. c #6288aa", "bY c #6297c3", "ce c #636363", "#H c #6398c3", "ef c #646464", ".K c #648fb6", "d6 c #6498c3", "ac c #658fb5", ".E c #666666", "c2 c #6694bb", "bP c #6699c4", "cf c #676767", "df c #6792b9", "ek c #6799c4", "#q c #689ac4", "d5 c #689bc4", "bw c #696969", "bX c #699bc4", "bG c #6a9bc5", "#G c #6a9cc5", "eZ c #6b6b6b", ".q c #6b8aa6", "ej c #6b9cc4", "#d c #6b9cc5", "#x c #6c6c6c", "aQ c #6c98bd", "dF c #6c9dc5", "cu c #6d6d6d", "bo c #6d9dc5", "di c #6e6e6e", "dx c #6e9dc5", ".2 c #6e9ec5", "dN c #6f6f6f", ".r c #6f91b0", "bc c #6f9ec5", "bW c #6f9ec6", "#p c #6f9fc6", "aj c #707070", "dq c #7097b9", "ep c #709cc2", "c4 c #709ec5", ".O c #709fc6", "ew c #717171", "eh c #719dc3", "#F c #719fc6", "bF c #71a0c6", ".L c #729cc0", "#T c #729dc3", "er c #729fc6", "d4 c #72a0c6", "ec c #72a0c7", "br c #737373", "e# c #739ec3", "dw c #73a0c6", "dR c #73a0c7", "bi c #747474", "b6 c #749ec3", "b7 c #749fc4", "b8 c #74a0c6", "c3 c #74a1c6", "#c c #74a1c7", ".R c #757575", ".y c #7590a9", "ez c #759ec3", "#C c #759fc3", "bT c #75a0c4", "eq c #75a1c6", "bV c #75a1c7", "dL c #75a2c7", "dX c #75a2c8", "dm c #767676", "dc c #7695b1", "eG c #769bbd", "bS c #769fc3", "#U c #76a1c6", "ei c #76a2c6", "eb c #76a2c7", "d3 c #76a2c8", "el c #76a4cb", "eY c #777777", "## c #77a0c3", "d2 c #77a1c5", "bb c #77a2c7", ".1 c #77a2c8", "#o c #77a3c8", "e4 c #787878", "cY c #7896b3", "#l c #78a0c3", "ea c #78a2c6", "#E c #78a3c7", "dQ c #78a3c8", "bE c #78a4c8", "cI c #7998b4", "b5 c #79a0c3", ".Y c #79a1c3", "bm c #79a1c4", "dg c #79a3c7", ".N c #79a4c7", "#f c #7a7a7a", "bl c #7aa1c3", "#m c #7aa3c6", "#D c #7aa3c7", "bU c #7aa4c7", "bO c #7aa4c8", "dK c #7aa5c8", "dT c #7b7b7b", "a9 c #7b9fbf", "#B c #7ba1c3", "#. c #7ba2c3", "dt c #7ba2c4", "dD c #7ba4c6", "aR c #7ba4c7", ".h c #7c7c7c", "bB c #7ca2c3", "b# c #7ca2c4", "ba c #7ca4c7", ".M c #7ca5c7", "#b c #7ca6c9", "aY c #7d7d7d", "dC c #7da2c4", "du c #7da5c8", "dP c #7da6c9", ".d c #7e7e7e", "aL c #7e97ac", ".X c #7ea3c4", ".Z c #7ea5c7", "bC c #7ea6c8", "dv c #7ea6c9", "#n c #7ea7c9", "e2 c #7eac80", "al c #7f7f7f", "ds c #7fa3c4", "d1 c #7fa4c4", "bD c #7fa8ca", "bv c #808080", "bA c #80a4c4", "bN c #80a8c9", ".0 c #80a8ca", "#3 c #818181", "as c #8199af", ".9 c #81a4c4", "b. c #81a5c4", "dW c #81a8ca", "#9 c #829ab0", "dr c #82a5c4", "dE c #82a9ca", "cm c #838383", "bk c #83a6c4", "#a c #83a9ca", ".W c #84a6c4", "bn c #84aacb", "eO c #858585", "dJ c #85a7c4", "ee c #85afd1", "eX c #868686", "aX c #878787", "dB c #87a7c5", "d7 c #87b0d1", "a0 c #888888", "aZ c #898989", "dY c #89b1d2", "bu c #8a8a8a", "b9 c #8ab0d0", "eE c #8b8b8b", ".p c #8b9cac", "dS c #8bb2d2", "aV c #8c8c8c", "eA c #8cafce", "dM c #8cb3d2", "#V c #8db1d1", "dG c #8eb3d3", "cP c #8f8f8f", "dh c #8fb4d2", "dl c #909090", "ch c #90b1ce", "c5 c #90b4d3", "aW c #919191", ".k c #929292", "eQ c #939393", "e7 c #949494", "cE c #959595", ".x c #95a3af", ".7 c #969696", "cR c #979797", "eU c #97b398", "dk c #989898", "a7 c #99a6b3", ".U c #99a7b3", "#j c #99a7b4", "cs c #99aec0", ".T c #9a9a9a", "#z c #9aa7b4", "#R c #9aa8b4", "#v c #9b9b9b", "em c #9bbdd9", "bg c #9c9c9c", "dj c #9d9d9d", ".F c #9e9e9e", "db c #9eb0bf", "#L c #9f9f9f", "bR c #a0a0a0", "cX c #a0b1c1", "cV c #a1a1a1", "dz c #a1aebb", "dI c #a1afbb", "dO c #a1afbc", "b0 c #a2a2a2", "ar c #a2acb5", "#8 c #a2adb6", "dV c #a2afbc", "d0 c #a2b0bc", "d9 c #a2b0bd", "cH c #a2b3c3", ".s c #a3a3a3", "eg c #a3b0bd", "eo c #a3b1bd", "ex c #a3b1be", "es c #a3c1da", ".t c #a4a4a4", ".Q c #a5a5a5", ".4 c #a6a6a6", "#s c #a7a7a7", "#J c #a8a8a8", "#M c #a9a9a9", ".G c #a9b0b6", "cQ c #aaaaaa", "do c #aab5be", "eW c #ababab", "#u c #acacac", "c. c #acc7de", "e6 c #adadad", "eB c #adc7dc", "#W c #adc8de", "eP c #aeaeae", "eF c #aeb9c2", "ax c #aec7dc", "#4 c #afafaf", "aK c #afb2b6", "aB c #afb6bd", "ci c #afc8dd", ".e c #b0b0b0", ".o c #b0b4b7", "e3 c #b0b6b1", "aJ c #b0c7b1", "bQ c #b0cbe1", "bt c #b1b1b1", "ad c #b1c9dd", "cO c #b2b2b2", "cw c #b2b9bf", "bH c #b2cce1", "am c #b3b3b3", "bp c #b3cce1", "#1 c #b4b4b4", "bd c #b4cde1", "cp c #b5b5b5", "aS c #b5cde1", "aq c #b6b6b6", "a6 c #b7b7b7", "#7 c #b8b8b8", "bZ c #b8d0e4", "#Q c #b9b9b9", "cr c #b9c0c6", "cx c #b9cada", ".w c #bababa", "eM c #baccbb", "cc c #bbbbbb", "cz c #bcbcbc", "cC c #bdbdbd", "eN c #bdc3be", "c6 c #bebebe", "aG c #bfbfbf", "da c #bfc2c5", ".g c #c0c0c0", "cW c #c0c4c7", ".l c #c1c1c1", "#P c #c2c2c2", "cG c #c2c5c9", "ap c #c3c3c3", "cq c #c4c4c4", ".n c #c5c5c5", ".v c #c6c6c6", "et c #c6d9e9", "aU c #c7c7c7", "aA c #c8c8c8", "bs c #c9c9c9", "cb c #cacaca", "aC c #cad4dd", "aF c #cbcbcb", "eS c #cbdccb", "#O c #cccccc", "en c #ccddeb", "#6 c #cdcdcd", "cd c #cecece", ".f c #cfcfcf", "#X c #cfdfec", ".m c #d0d0d0", "cF c #d1d1d1", "ct c #d1d4d7", "ao c #d2d2d2", "ae c #d2e0ec", "bz c #d3d3d3", "eC c #d3e1ec", "b2 c #d4d4d4", "eH c #d4e1ec", "eL c #d5d5d5", "#N c #d6d6d6", ".D c #d6e3ed", ".u c #d7d7d7", "a4 c #d7ddd7", "#I c #d7e4ef", "#h c #d8d8d8", "#r c #d8e5f0", "#5 c #d9d9d9", "#e c #d9e5f0", ".3 c #d9e6f0", "cl c #dadada", ".P c #dae6f0", ".S c #dbdbdb", "cN c #dcdcdc", "aE c #dddddd", "a# c #dedede", ".6 c #dfdfdf", "cM c #dfe3e6", "ev c #e1e1e1", "b1 c #e2e2e2", "an c #e3e3e3", "ay c #e4e4e4", "be c #e5e5e5", "aD c #e6e6e6", "ai c #e7e7e7", "a3 c #e8e8e8", "eu c #e9f0f5", "aT c #eaeaea", ".5 c #ebebeb", "bh c #ececec", "cy c #ededed", "dH c #eeeeee", "dZ c #efefef", "bq c #f0f0f0", "ah c #f1f1f1", "eI c #f1f4f6", "c# c #f1f4f7", "dU c #f2f2f2", "#g c #f3f3f3", "af c #f3f6f8", "#Y c #f3f6f9", "c8 c #f4f4f4", "eD c #f4f7f9", "#Z c #f5f5f5", "d. c #f6f6f6", "cj c #f7f7f7", "eR c #f8f8f8", "ag c #f9f9f9", "e1 c #fafafa", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.aQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.b.c.d.e.f.g.hQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.i.j.k.l.m.n.o.p.q.r.sQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.t.u.v.w.x.y.z.A.B.C.D.t.EQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.F.G.H.I.J.K.L.M.N.O.P.Q.R.SQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.T.U.V.W.X.Y.Z.0.1.2.3.4.R.5.6QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.7.U.8.9#.###a#b#c#d#e.4#f#g#h#iQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.k#j#k.X#l#m#n#o#p#q#r#s#t#u#v#wQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.a#x#yQtQtQtQtQtQtQt.k#z#A#B#C#D#E#F#G#H#I#J#K.4#L#wQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQt.a#x#M#N#O#P#QQtQtQtQtQtQtQt.k#R#S#l#T#U#V#W#X#Y#Z#M#0.w#1#wQtQtQtQtQtQtQtQt", "QtQtQtQtQtQt#2#3#4#5#6#P#7#8#9a.a#aaQtQtQtQtab.n.k#Racadaeafagahai#Pajakal#N.w#wQtQtQtQtQtQtQtQt", "QtQtQtQtamanaoapaqarasatauavawaxayaz.jQtQtQtaqaA.kaBaCaDaE#haFaG#MaHaIaqanaJ.w#wQtQtQtQtQtQtQtQt", "QtQtQtaaa#aKaLaMaNaOaPaQaR#E#FaSayazaT.jQtQt.SaUaVaWaXaYaZ.Ta0a1Qta2a3aya4a5a6#wQtQtQtQtQtQtQtQt", "QtQtQtaa.Sa7a8a9b.b###ba#nbbbcbdbeaz.5aT.jQt#vaTam#s.T.kaZ.d.RbfQtQtbgbhaF.nbiQtQtQtQtQtQtQtQtQt", "QtQtQtaa.u.Ubjbk.Xblbmbn#b#cbobpaD#ybhbq.5QtQtbrbsbtbgbubvbwbxQtQtQtQtbya2QtQtQtQtQtQtQtQtQtQtQt", "QtQtQtaabz.U.8bAbB##bCbDbEbFbGbHaibI#Z#N.tQtQtQtQtbJbJbKbLQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtaaao#jbM.X.Y#CbNbO#cbobPbQai#wbRbR.4QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtaaao#z#A#.bSbTbUbVbWbXbYbZa3#w.4#v#MQtQtQtQtQtQtQtQtQtQtQt.a#xb0b1b2b3QtQtQtQtQtQtQtQtQtQt", "QtQtQtb4aF#R#Sb5b6b7b8b9c.#Xc##Zbecacbcc#4QtQtQtQtQtQtQtb3#xb0b1ai#hcdccccceQtQtQtQtQtQtQtQtQtQt", "QtQtcf#Q#7#Rcgchciaeafcjahaiao#vceckcl#6cmQtQtcncoalcpanaiaEbz.gcccqcrcsctcuQtQtQtQtQtQtQtQtQtQt", "Qtcvcd.e#7cwcxahcy.5aEaoaUczcAcB#JapcCbfcDcE.gcybha#cF.g.wapcGcHcIcJcKcLcMcu#2QtQtQtQtQtQtQtQtQt", "Qt.EcNcp.kcO.4cPa0cpcQcRcS.icTaD#ZcFcUcVbqb1ao.g#Q#PcWcXcYcZc0c1c2c3c4c5cycu.Rc6QtQtQtQtQtQtQtQt", "Qtc7c8.vcV.kaWaWcmcm#fbic9QtQtcbd.#6d##uaocCdadbdcddde#SdfbSb6aRdgc3bcdhcydi.RaTc6QtQtQtQtQtQtQt", "QtQtdjay.w.sdkdla0aldmcoQtQtQtQtaUaAdn#JcFdodp.Vdqdrdsdt#lb6dudv#Edwdxdhcydi.R.5aTc6QtQtQtQtQtQt", "QtQtQt#2QtcO#Lbubvdy.iQtQtQtQtQtQtQtQt.t.mdzdAdB.WbAdC.YbSdDdE#b#obFdFdGdHdidm.5.5aTc6QtQtQtQtQt", "QtQtQtQtQtQtaaaaQtQtQtQtQtQtQtQtQtQtQtcVcddI.VdJdr.X#B#l#Cbn.0dKdL.O#ddMdHdNdmbh.5dHc8caQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtdj#6dObjbkbAb#.YbSbadEdPdQdR.2bXdSdHdNdTcjdU.6cp#wQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#OdV.8b..X#B###CdW#nbOdX.O#dbPdYdZdNaYaDc6.kaW#wQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtaFd0#kd1b#b5#Cd2#ndKd3d4bod5d6d7dZajd8cE.tcO.s#wQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtaFd9e..Xbl##e#eabUebec.2bGbPedeedZajefczb0aW.F#wQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtaFeg#Ab##l#Ceh#UeidwbcejekelemenbqajcB#u.gaGam#wQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.aQtaFeo#SblbSe#epeqerb9eseteu#ZcyaDevewbi.fapcccO#wQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.kb2QtaFexey#lezeAeBeCeDcj#gcyaianev#MewbfcEa3claUam#wQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQteE#O#OQtaFeFeGeHeI#Z#gcyaib1.SbzaFap#ieJdkb2#NbhclaUam#wQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQteKeLcd#P.kaFcdaya#clcF#h.mbs.l#QbtbRbrdnc8d.c8#NbheMeNam#wQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQta1be#6#QeO.n.gePeQ.heOeE#4.t.kcm.iQtQta6d.eRc8#NeSeTeUam#wQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQteVdHbe#1eWeOeXaZaVdlalbvaleY.ReZQtQtQte0a3e1c8#Nbhe2e3cO#wQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtbt#gb2cQeW#JdjcR.kaVeOale4bre5QtQtQtQte0bhc8.maFaA.n.EQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#uevcde6Qt.7aWaVaX#3#fbicoQtQtQtQtQtQt#ia6.we7e8QtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtcS.4c6amb0.7eX#3dTcAbfQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.b#ye9cof.f#faQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; unixODBC-2.2.14-p2/odbcinstQ/dsn-system.xpm0100644000076400007640000002577407730246463017011 0ustar nicknick/* XPM */ static const char *xpmDSN_System[]={ "48 48 400 2", "Qt c None", "dl c #000000", "en c #080808", "dc c #0f0f0f", "eg c #121212", "ej c #161616", ".c c #1b1b1b", "c5 c #1c1c1c", "du c #1d1d1d", "em c #202020", "el c #212121", "ek c #222222", "ef c #232323", "c6 c #272727", ".s c #292929", ".z c #2b2b2b", "dA c #333333", ".r c #343434", ".y c #363636", "#D c #373737", "bP c #383838", "eb c #3a3a3a", ".P c #3b3b3b", "d4 c #404040", ".2 c #4170a0", ".# c #434343", "ei c #444444", ".3 c #4577a8", "eh c #464646", "#2 c #4673a0", "#g c #4778a8", "#3 c #4876a4", "#u c #4878a7", "d7 c #4a4a4a", "#K c #4a79a7", "#f c #4b77a3", "dH c #4ba44d", "dD c #4c4c4c", "dd c #4e4e4e", "dR c #4ea350", "ea c #4f4f4f", "dt c #505050", ".j c #515151", "d8 c #545454", "aj c #547faa", "#v c #5886b3", "#h c #5988b6", "dP c #5c5c5c", "#L c #5c88b3", "dY c #5d5d5d", ".b c #5e5e5e", "cw c #5e95cb", ".t c #606060", "cl c #6096cb", "#4 c #618ab3", "cv c #6196cb", "c# c #6297cb", "dG c #62b064", "ck c #6397cc", "b2 c #6398cc", ".A c #646464", "cu c #6498cc", "bN c #6598cc", ".1 c #6689ac", "bD c #6699cc", "#w c #6793bf", "ct c #6799cc", "#i c #6895c3", "bs c #689acc", "c7 c #6992bc", "bg c #699bcc", "cX c #6a93bc", "a5 c #6a9bcc", "cK c #6b93bc", "aQ c #6b9ccc", "br c #6b9ccd", ".a c #6c6c6c", "cB c #6c94bc", "ay c #6c9ccc", "bf c #6c9ccd", "b1 c #6c9dcd", "cs c #6d94bc", "#M c #6d96bf", "af c #6d9ccc", "#V c #6d9dcc", "a4 c #6d9dcd", "#1 c #6e8eae", "ci c #6e95bc", ".4 c #6e96bf", "#C c #6e9dcc", "aP c #6e9dcd", "bq c #6e9ecd", "#J c #6f8eae", "#t c #6f8faf", "b8 c #6f95bc", "bV c #6f96bc", "#k c #6f9dcc", "cP c #6f9ecc", "ax c #6f9ecd", "cF c #6f9fcf", "db c #707070", "#e c #7090af", "bI c #7096bc", "cY c #709cc8", "ae c #709ecd", "bC c #709fcd", "dS c #70aa72", "bx c #7196bc", "cM c #719cc8", "#B c #719fcc", "#U c #719fcd", "bM c #719fce", "dN c #727272", "bl c #7297bc", "cC c #729dc8", "#j c #729fcc", "aO c #729fcd", "bp c #729fce", "dO c #737373", "a9 c #7397bb", "cL c #739dc8", "b9 c #739ec8", "cZ c #739fcb", "aw c #73a0cd", "be c #73a0ce", "bB c #73a1ce", "#o c #747474", "ak c #7498bb", "#5 c #7499bf", "aa c #749ec8", "#x c #749ec9", "cN c #749fcb", "#A c #74a0cd", "a3 c #74a1ce", "aB c #7598bb", "#P c #759ec8", "aH c #759fc8", "#Q c #759fc9", "cD c #759fca", "cO c #75a1cd", "aN c #75a1ce", ".Q c #767676", "a# c #769fc8", "cE c #76a1cd", "av c #76a2ce", "cQ c #76a2cf", "e# c #777777", "#O c #779fc8", "b# c #77a0c8", "bJ c #77a0c9", "#T c #77a2ce", "d3 c #787878", "a. c #78a0c8", "aX c #78a1c9", "#z c #78a2cd", "a2 c #78a3ce", "bo c #78a3cf", "dK c #797979", "dg c #799ec3", "#N c #79a0c8", "bm c #79a1ca", "aM c #79a3ce", "b0 c #79a3cf", ".d c #7a7a7a", "#9 c #7aa1c8", "#y c #7aa4cd", "ad c #7aa4ce", "bd c #7aa4cf", "dW c #7b7b7b", "ar c #7ba1c8", "bY c #7ba4cb", "#S c #7ba4ce", "cj c #7ba5ce", "a1 c #7ba5cf", "dm c #7c7c7c", "#8 c #7ca2c8", "aL c #7ca5cf", "dq c #7d7d7d", "aq c #7da2c8", "bX c #7da3c8", "aI c #7da5cc", "#R c #7da5ce", "au c #7da6cf", "dI c #7e7e7e", "#7 c #7ea3c8", "c. c #7ea6cd", "ac c #7ea6ce", "bL c #7ea6cf", "dL c #7f7f7f", "ap c #7fa3c8", "ab c #7fa7ce", "a0 c #7fa7d0", "bT c #808080", "bW c #80a3c8", "aG c #80a4c8", "as c #80a6cd", "aK c #80a7cf", "bZ c #80a8cf", "bA c #80a8d0", "d2 c #818181", "#6 c #81a4c8", "by c #81a7ce", "at c #81a8cf", "bc c #81a8d0", "dX c #828282", "ai c #829bb5", "aU c #829cb5", "ao c #82a4c8", "b. c #82a5c8", "ba c #82a8ce", "aZ c #82a9d0", "cq c #838383", "bw c #839cb6", "bU c #839db6", "aF c #83a5c8", "bK c #83a9cf", "bz c #83a9d0", "dC c #848484", "ch c #849db7", "cA c #849eb7", "aW c #84a5c8", "an c #84a6c8", "aJ c #84a9cf", "c8 c #84aace", "bb c #84aad0", "c0 c #84abd2", "dz c #858585", "cW c #859eb8", "aE c #85a6c8", "bn c #85abd0", "cx c #85aed8", "b4 c #868686", "aV c #86a6c8", "am c #86a7c8", "aY c #86abd0", "cm c #86afd8", ".k c #878787", "aD c #87a7c8", "ca c #87afd8", ".u c #888888", "al c #88a8c7", "b3 c #88b0d8", "b5 c #898989", "aC c #89a8c7", "bO c #89b1d8", "d1 c #8a8a8a", "bE c #8ab2d8", "ee c #8b8b8b", "bt c #8bb2d8", "dn c #8c8c8c", "bh c #8cb2d8", "e. c #8d8d8d", "a6 c #8db3d8", "cg c #8e8e8e", "aR c #8eb3d8", "cp c #8f8f8f", "ag c #8fb4d8", "dM c #909090", ".M c #90a6bd", "#l c #90b4d8", "de c #919191", "cr c #929292", "dU c #939393", "cG c #93b7db", "dV c #949494", "b6 c #959595", "#0 c #95a8bc", "d9 c #969696", "#I c #96a9bd", "dB c #979797", "#s c #97aabd", "dv c #989898", "#d c #98acbf", ".0 c #99acc0", "cR c #99badc", "dJ c #9a9a9a", "bv c #9b9b9b", ".B c #9c9c9c", "bk c #9d9d9d", "cb c #9f9f9f", "a7 c #a0a0a0", "d5 c #a1a1a1", "aS c #a2a2a2", ".6 c #a3a3a3", "az c #a4a4a4", "ds c #a5a5a5", "ed c #a6a6a6", "c9 c #a6c1dc", "c1 c #a6c3df", "ah c #a7a7a7", "da c #a8a8a8", "dx c #a8bfa9", "#X c #a9a9a9", "cy c #aaaaaa", "d0 c #ababab", "dh c #abc3dc", "#E c #acacac", "bS c #adadad", "co c #aeaeae", "dr c #afafaf", ".e c #b0b0b0", "b7 c #b1b1b1", "df c #b2b2b2", "cf c #b3b3b3", "cJ c #b4b4b4", "dT c #b5b5b5", "cV c #b6b6b6", "cz c #b7b7b7", ".U c #b8b8b8", "cc c #b9b9b9", ".L c #b9c3cc", "cH c #b9d1e8", "dy c #bababa", ".p c #bbbbbb", ".V c #bcbcbc", ".l c #bdbdbd", "cS c #bdd3e8", ".v c #bebebe", "#H c #bec4ca", ".H c #bfbfbf", "#r c #bfc6cc", ".q c #c0c0c0", "cd c #c1c1c1", "#c c #c1c7cd", "#F c #c2c2c2", ".Z c #c2c8cf", "## c #c4c4c4", "#Y c #c5c5c5", "do c #c5ccd2", "ce c #c6c6c6", "#Z c #c6c9cd", ".W c #c7c7c7", "ec c #c8c8c8", "dw c #c8d3c8", ".w c #c9c9c9", "d. c #c9d9ea", "c2 c #c9daec", ".o c #cacaca", "#G c #cbcbcb", "di c #cbdbea", "#q c #cccccc", "#a c #cdcdcd", "#. c #cecece", "cn c #cfcfcf", "bH c #d0d0d0", ".X c #d1d1d1", ".N c #d1d4d8", ".I c #d2d2d2", ".C c #d3d3d3", "dQ c #d3ded3", ".x c #d4d4d4", "#b c #d5d5d5", ".Y c #d6d6d6", ".J c #d7d7d7", ".K c #d8d8d8", ".f c #d9d9d9", ".O c #dadada", ".5 c #dbdbdb", "#W c #dcdcdc", ".n c #dddddd", "bi c #dedede", "dF c #dee4de", ".D c #dfdfdf", ".g c #e0e0e0", "cI c #e0ebf5", "a8 c #e1e1e1", ".E c #e2e2e2", "cT c #e2ecf5", "aT c #e3e3e3", "c3 c #e3ecf5", "c4 c #e4e4e4", "dk c #e5e5e5", "aA c #e6e6e6", "dp c #e6e9ec", "cU c #e7e7e7", ".R c #e8e8e8", ".h c #e9e9e9", "#n c #eaeaea", ".G c #ebebeb", "dj c #ebf0f5", "d# c #ebf0f6", ".T c #ececec", "#m c #ededed", ".m c #eeeeee", "bu c #efefef", ".7 c #f0f0f0", ".F c #f1f1f1", ".9 c #f2f2f2", ".i c #f3f3f3", ".S c #f4f4f4", "bR c #f5f5f5", "bj c #f6f6f6", ".8 c #f7f7f7", "#p c #f8f8f8", "bQ c #f9f9f9", "bG c #fafafa", "bF c #fbfbfb", "dE c #fcfcfc", "dZ c #fdfdfd", "d6 c #fefefe", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.a.bQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.c.#.d.e.f.g.h.i.f.cQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.c.j.k.l.f.g.h.i.m.n.o.p.q.rQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.s.t.u.v.f.g.h.i.m.n.o.p.q.w.x.f.f.yQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.z.A.B.C.D.E.h.F.G.n.o.p.H.w.I.J.K.L.M.N.O.yQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQt.P.Q.e.h.R.h.m.S.T.n.o.U.V.W.X.Y.Y.Z.0.1.2.3.4.T.O.y.5QtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQt.6.F.7.F.i.8.9.E#..U.V###a.x#b#c#d#e#f#g#h#i#j#k#l#m.5.y#n.5QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQt#o.T#p.i.E#..l.p###q.I.C#r#s#t#f#u#v#w#x#y#z#A#B#C#l#m.5#D#n#n.5QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQt#E#m.o.v#F#G.X.X#H#I#J#f#K#L#M#N#O#P#Q#R#S#T#A#U#V#l#m#W#D.G#n#n.5QtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQt#X.G#Y.5#Z#0#1#2#3#4#5#6#7#8#9a.a#aaabacad#T#Aaeafag#m#W#D.G.G#n#n.5QtQtQtQtQtQt", "QtQtQtQtQtQtQtQtah.R#Y#Waiajakalamanaoapaqar#Na#aaasatauadavawaxayag#m.n#D.T.G.G#n#n#qQtQtQtQtQt", "QtQtQtQtQtQtQtQtazaA#Y#WaiaBaCaDaEaFaG#7#8#9a.aHaIaJaKaLaMaNaOaPaQaR.m.n#D.T.T.G.G#n#n.vQtQtQtQt", "QtQtQtQtQtQtQtQtaSaT#Y#WaUakalaVaW#6apaqara.a#aXaYaZa0a1a2a3#Ua4a5a6.m.n#D.T.T.T.G.G#n#n##QtQtQt", "QtQtQtQtQtQtQtQta7a8#Y.naUa9aDaEb.aG#7#8#9b##Pbabbbcaubdavbeaebfbgbh.mbi#D#m.T.T.T.G.Tbj#bQtQtQt", "QtQtQtQtQtQtQtQtbkbi#Y.naUblaVaF#6apaq#9a.a#bmbnaZa0aLboaNbpbqbrbsbt.mbi#D#m#mbu.i.S.R.q#EQtQtQt", "QtQtQtQtQtQtQtQtbv#W#Y.nbwbxanb.aG#7#8#N#O#PbybzbAaubd#TbBbCa4a5bDbE.m.D#DbFbG.9aTbH##.6#EQtQtQt", "QtQtQtQtQtQtQtQtQt.f#YbibwbIaF#6ap#8#9a.a#bJbKatbLa1boaNbMbqbrbsbNbObu.DbPbQbR.h.XbS.ubT#EQtQtQt", "QtQtQtQtQtQtQtQtQt.K#YbibUbVb.bWbXar#N#O#PbYbZbLa1b0avbeaeb1bgbDb2b3bu.gbP.obkb4b5b6.6b7#EQtQtQt", "QtQtQtQtQtQtQtQtQt.K#YbibUb8#6#7#8#9a.a#b9c.aca1aMavbebCaPbrbsbNc#cabu.gbP.Wcbcccdcecfcg#EQtQtQt", "QtQtQtQtQtQtQtQtQt.K#Y.Dchciapaqar#N#Oaaaa#RcjaMava3#UbqbfbgbDckclcmbua8bPbQ.Kcncocpcqcr#EQtQtQt", "QtQtQtQtQtQtQtQtQt.K#Y.Dchcs#7#8#9a.aHb9#Q#Sa2av#A#Uaxbfbgctcucvcwcx.7a8bP.pbTcp.Bcy.Ucz#EQtQtQt", "QtQtQtQtQtQtQtQtQt.K#Y.DcAcBaqara.a#aacCcD#zcE#AaOaxafa5ctcFcGcHcI.8.Ra8bP.g.CbH.xbHcdcJ#EQtQtQt", "QtQtQtQtQtQtQt.cQt.K#Y.gcAcK#8#9b#aHcLcMcNcOaw#UcPcQcRcScT.8bucU.ga8a8.EbPbQ#m.5.W.l.VcV#EQtQtQt", "QtQtQtQtQtQt.k.YQt.K#Y.gcWcX#9a.a#aacCcYcZc0c1c2c3bjbu.GcU.hc4.ga8a8.Ecyc5#G.C.5.ObH##cV#EQtQtQt", "QtQtQtQtc6.U.C.XQt.K#Ya8cWc7#N#O#Pc8c9d.d#bjbu.TcU#n#ncU.E.n.KdadbbPdcddde#bbR.h.nbH##cV#EQtQtQt", "QtQtQtQtdf.w#a#GQt.K#Ya8cWdgdhdidj.i.m.h.R#n#ndk.g.5.Y.X#q.W#Fdl.u#Y.SbG.R#bbR.h.nbH##cV#EQtQtQt", "QtQtQtdm.Xcn.W#Ydn.K#Ya8dodp.h.g.O.Oa8.m.D.O#bcn.o#Y.q.pcVb7aSdc.i.SbRbG.R#bbR.h.nbH##cV#EQtQtQt", "QtQtQt.v.5#..q.Hdq.K#Ya8.K.f.f.O.O.fdf.H.o##.vcccJdrcyds.ddtdudv.SbRbjbF.R#bbR.hdwdx##cV#EQtQtQt", "QtQtdl.Cc4cndycccg.H#Y.E.f#Gcode.QdzdAdBcfcoda.6crdC.PQtQtQtdD.SbRbj#pdE.R#bbRdFdGdH##cV#EQtQtQt", "QtQtdl.I#m.DcJcfbSdIdJb6dm#odKdLb4dIdLdMdeb4dqdNdOdOc5QtQtQtQtdPbj#pbQdE.R#bbRdQdRdS##dT#EQtQtQt", "QtQtQtb7.8.i.WcobSbSbvcbdJdUdMb6dVcpdWdqdXdLdW.QdOdOQtQtQtQtQtQtdYbQbGdZ.R#bbR.h.K#Y.UcV#EQtQtQt", "QtQtQt.r.7bj#m.qahdadrd0azbkdvb6crcgd1dzd2dqd3#odOd4QtQtQtQtQtQtQt.bbFdZ.RbHcn.o.W.o##d5.yQtQtQt", "QtQtQtQt.Q.T#n.E.pd5cba7bkdvb6decgd1b4dXdI.d.QdOdYQtQtQtQtQtQtQtQtQt.bd6.RbQbR.h.n#Xd7QtQtQtQtQt", "QtQtQtQtQtd8.I.n#b##cydvd9dUdee.d1.kcqdLdWe#dOeaQtQtQtQtQtQtQtQtQtQtQtea#odm.debQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtdudX#Fec.qcVedbvb6eeb4cqdLdmd3.befQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtegehdLdaaz.6bve.dXdLdYeiejQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtdlekelemenQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; unixODBC-2.2.14-p2/odbcinstQ/dsn-user.xpm0100644000076400007640000004205207730246463016427 0ustar nicknick/* XPM */ static const char *xpmDSN_User[]={ "48 48 787 2", "Qt c None", "cu c #12167d", "cs c #130352", "cN c #141170", "cM c #141475", "cL c #141679", "ct c #150150", "cO c #15116b", "cv c #151980", "b5 c #151e89", "cK c #161a7d", "cr c #170858", "cP c #171067", "cQ c #180f63", "cJ c #191f81", "cR c #1c115f", "cf c #212b91", "ai c #22125b", "cq c #221561", "b4 c #222686", "b2 c #230e55", "bz c #23125a", "b. c #241056", "b1 c #241158", "a9 c #25145c", "b3 c #252682", "ce c #253093", "aI c #26155d", "bA c #262987", "cS c #27165c", "cp c #271c68", "bB c #272c89", "b# c #272c8a", "ba c #272e8c", "cg c #272e8d", "co c #291e6c", "cI c #292b84", "aJ c #293190", "cn c #2a2170", "cm c #2a2474", "ck c #2a287d", "cj c #2a2a82", "aj c #2a3394", "cl c #2b2679", "ci c #2b2d85", "ch c #2b2f8a", "b0 c #2d1d63", "bC c #2e348f", "bM c #2e3ea0", "bD c #303b9a", "bT c #333386", "cT c #34205b", "bX c #342b74", "bW c #342d79", "bV c #342f7d", "bU c #343181", "bY c #352a71", "bS c #35368a", "bZ c #36296d", "bR c #373a8e", "bN c #37439e", "bQ c #383d93", "by c #392b6e", "bb c #394198", "#w c #3944a1", "bP c #3a4196", "bE c #3b449a", "b6 c #3c3d8c", "bO c #3c4499", "bu c #3e3b87", "bt c #3e3e8b", "bw c #3f387e", "bs c #3f4090", "bx c #40367b", "bv c #403a83", "#U c #423577", "br c #424494", "bd c #424fa7", "bq c #434798", "be c #434fa8", "bp c #454b9c", "aK c #454da1", "bl c #4553aa", "a8 c #473a79", "cH c #474387", "bo c #474ea0", "bn c #4851a3", "bm c #4a55a6", "a3 c #4b4991", "a2 c #4b4c95", "bc c #4b54a4", "a5 c #4c4689", "a4 c #4c488c", "cU c #4d345d", "a6 c #4d4485", "a1 c #4d4f99", "a7 c #4e4482", "a0 c #4f529e", "#V c #4f59ab", "aO c #4f5fb5", "cw c #504683", "ak c #5059a9", "aZ c #5156a2", "bk c #525ba6", "aY c #535aa6", "aH c #544983", "aX c #545ca9", "aT c #5463b5", "aW c #5560ad", "aN c #5662b3", "dc c #574773", "db c #574777", "aV c #5762b0", "aL c #5861ae", "aM c #5963af", "aU c #5966b2", "ah c #5a4f87", "aD c #5b5897", "aC c #5b5a9b", "## c #5b66b6", "aF c #5c5590", "aE c #5c5695", "aB c #5c5ca0", "aA c #5d5fa3", "da c #5f4f7a", "aG c #5f568e", "az c #5f63a8", "ay c #6166ab", "ax c #626aaf", "aq c #6273c1", "ar c #6373c1", "aw c #646cb2", "ap c #6474c0", "dd c #655073", "aP c #656daf", "av c #6570b6", "au c #6773b9", "am c #6872b8", "an c #6974bb", "at c #6975bb", "ao c #6976be", "cd c #6a608b", ".j c #6a6caa", "al c #6a73b7", "as c #6a77bd", "#v c #6b6299", "aS c #6b71af", ".# c #6b76bd", "ac c #6c6ba7", "af c #6d669b", "ae c #6d67a0", "ad c #6d69a3", "ab c #6d6daa", "aa c #6f70ae", ".R c #6f7ac3", "a# c #7073b2", "d# c #715e7f", "ag c #726b9c", "a. c #7277b5", "de c #735b74", "#9 c #737ab9", "bf c #7570a1", "#8 c #757dbc", ".Q c #7672a6", "#7 c #767fbf", "#X c #7781c1", "#6 c #7782c1", "#Y c #7983c4", "#5 c #7984c4", "#Z c #7a85c6", "#4 c #7a86c6", "#2 c #7a88c8", "#1 c #7a88c9", "#3 c #7b87c8", "#0 c #7b88c7", "#R c #7d79ab", "#P c #7d7db2", "#O c #7d7fb5", "#W c #7d85c1", "#Q c #7e7cae", "#S c #7f7aa9", "#. c #807bab", "#N c #8083b9", "#M c #8184bc", "j. c #82829d", "#L c #8388bf", "#x c #838bc6", "#T c #847faa", "aQ c #8480a8", "#K c #848bc2", "df c #856975", "ju c #8585a0", "iB c #8686a1", "#J c #868dc4", "j9 c #8787a2", "#I c #8790c7", "#H c #8892c9", "cV c #896e80", "cG c #897386", "hp c #8989a5", "#z c #8993cc", "#G c #8994cc", "jO c #8a8aa4", "d. c #8b7382", "bF c #8b7b95", "#A c #8b95ce", "#F c #8b95cf", ".k c #8b95d0", "aR c #8c84a6", "#B c #8c96d0", "#E c #8c97d0", "#D c #8c97d1", "#C c #8c98d1", "i. c #8d8da6", "hO c #8d8da7", "#y c #8d95cb", ".y c #8e8dbc", "#s c #8f8eba", "iQ c #8f8fa7", "k. c #8f8fa9", "bL c #907d91", "#t c #908cb8", "#r c #908fbd", "hb c #9191aa", "#q c #9191c0", ".a c #9199ce", "#p c #9293c2", "#o c #9396c5", "#n c #9498c8", "j# c #9595ac", ".i c #9597c5", "#m c #959bcb", "#l c #969dcd", "#k c #97a0d0", "jv c #9898b0", "#j c #98a2d2", "gZ c #9999b1", "#i c #99a3d4", "jP c #9a9ab1", "dg c #9b7978", "im c #9b9bb1", "#c c #9ba3d5", "#h c #9ba5d5", "#u c #9c98bd", "k# c #9c9cb2", "hB c #9c9cb3", "#d c #9ca5d6", "#g c #9ca6d6", "#e c #9ca6d8", "#f c #9ca7d8", "#b c #9da5d5", "gN c #9f9fb6", ".7 c #a09fc6", "ja c #a1a1b7", "h0 c #a2a2b7", "ha c #a2a2b8", ".6 c #a2a2c9", "#a c #a2a8d6", "jQ c #a3a3b8", ".5 c #a3a4cc", ".4 c #a3a7ce", "iR c #a4a4b9", ".8 c #a5a4c7", "hZ c #a5a5ba", "ka c #a5a5bb", ".3 c #a5a9d1", "b7 c #a6898e", ".2 c #a6abd3", ".1 c #a6add4", "gF c #a7abc3", ".0 c #a8aed7", "c9 c #a98a86", "iS c #a9a9bd", "iC c #a9a9be", ".Z c #a9b0d9", ".Y c #aab1db", "hq c #ababbe", "jw c #ababc0", ".U c #abb2dc", ".V c #abb3de", "in c #acacc0", ".X c #acb3dd", ".W c #acb4de", "dh c #ad877c", "i# c #aeaec0", "hN c #aeaec1", "jR c #aeaec2", "io c #b0b0c3", ".9 c #b1afcc", "gO c #b1b1c4", "ia c #b2b2c4", "il c #b2b2c5", ".T c #b2b8dd", "hP c #b3b3c5", ".M c #b3b4d4", ".L c #b3b5d6", "gG c #b3bdd4", "hc c #b4b4c5", "jb c #b4b4c6", ".K c #b4b7d8", ".b c #b4bade", ".J c #b5b9d9", ".S c #b5bce0", "gM c #b5bed5", "g0 c #b6b6c7", ".I c #b6bbdb", ".H c #b6bcde", ".z c #b6bce1", ".N c #b7b6d5", "h1 c #b7b7c8", "jx c #b7b7c9", ".G c #b7bddf", ".P c #b8b7d3", "gY c #b8b8c9", ".F c #b8bee0", ".D c #b8bfe2", ".h c #b9bbda", ".E c #b9bfe1", "cx c #ba9589", "ho c #babaca", "h# c #bbbacc", "h9 c #bbbbcb", ".C c #bbc0e2", "hQ c #bcbccc", "iP c #bcbccd", "h2 c #bdbdcd", "hR c #bebecd", "bj c #bf9e92", "hC c #bfbfce", ".B c #bfc5e5", "gH c #c095a4", "jc c #c0c0cf", "bg c #c1a096", ".O c #c1c0da", "hD c #c1c1d0", "di c #c29781", "ib c #c2c2d1", "iA c #c2c2d2", "gL c #c39ca9", "hE c #c3c3d1", "hY c #c3c3d2", "hS c #c4c4d3", ".l c #c4cae7", "hF c #c5c5d3", "iT c #c5c5d4", ".x c #c5c6de", "ic c #c6c6d4", "hs c #c7c7d4", "hr c #c7c7d5", "hM c #c7c7d6", "gI c #c85154", "gP c #c8c8d5", "hG c #c8c8d6", "hT c #c8c9d6", "gK c #c95254", "ht c #c9c9d6", "iD c #c9c9d7", ".A c #c9ceea", "hH c #c9cfde", "hu c #cacad7", "jS c #cacad8", "h3 c #cacbd8", ".t c #cacde4", ".s c #cacde5", ".r c #cacde6", "gJ c #cb5254", "hV c #cb5554", "hJ c #cb6463", "hU c #cb9196", "hW c #cb9197", "c8 c #cba48b", "hK c #cba6af", "hI c #cba9b1", "gX c #cbcbd7", "hA c #cbcbd8", "jd c #cbcbd9", "hv c #cbcedb", ".q c #cbcee7", "hz c #cbcfdb", ".c c #cbcfe7", "hL c #cbd0de", "hX c #cbd1de", "hx c #cc7778", "hy c #ccb9c4", "hw c #ccbcc6", "he c #ccccd8", "h8 c #ccccd9", "h4 c #cd7174", "h6 c #cd797c", "hd c #cdcdd9", "hl c #cdcdda", ".g c #cdcfe6", ".p c #cdd1e9", "h5 c #ce5050", "hg c #ceccd8", "hk c #ceceda", "hm c #cecedb", "hj c #cecfdb", "h7 c #cecfdc", ".u c #cecfe6", "id c #ced1de", "hh c #cf9497", "hi c #cfc9d5", "hf c #cfcedb", "g1 c #cfcfda", "ik c #cfcfdb", "iE c #cfcfdc", "gA c #d08881", "ie c #d0bfca", "ij c #d0d0dc", "hn c #d1d1dc", "ii c #d1d1dd", "kb c #d1d1de", "if c #d25759", "h. c #d2d2de", "g4 c #d2d5e0", ".f c #d2d5e8", "ig c #d34e4e", "ih c #d35f60", "g6 c #d39496", "g5 c #d3cad4", "g7 c #d3cdd8", "g9 c #d3d2de", "jy c #d3d3de", ".w c #d3d3e5", ".v c #d3d4e7", "g8 c #d3d5e0", ".e c #d3d5e9", ".d c #d3d6ea", ".o c #d3d6eb", "g3 c #d4d3de", "jt c #d4d4df", "iz c #d4d4e0", ".m c #d4d9ed", "ip c #d4dbe7", "gE c #d5938b", "i9 c #d5d5e0", "gB c #d66f61", "cW c #d6a88a", "g2 c #d6d6e0", "iy c #d6d6e1", "gC c #d77465", "iq c #d7acb3", "gQ c #d7d7e0", "gD c #d87264", "dj c #d8aa88", "gW c #d8d7e1", "ix c #d8d8e2", "j8 c #d8d8e3", ".n c #d8dbef", "ir c #d94848", "cF c #d9ab8a", "jT c #d9d9e3", "is c #da4949", "iw c #dadae3", "i8 c #dadae4", "it c #db4f50", "iu c #dbc3cb", "iv c #dbdfe9", "gR c #dbe5ef", "gT c #dc9695", "gS c #dcbbc0", "gU c #dcbec3", "js c #dcdce5", "gV c #dce5ef", "iO c #dddde6", "dB c #deb494", "i7 c #dedee7", "iU c #dedfe8", "iF c #df9398", "dC c #dfb494", "iN c #dfdfe7", "iM c #e0e0e8", "iG c #e13d3d", "iH c #e14545", "dA c #e1b694", "i6 c #e1e1e9", "iI c #e24444", "bG c #e2b492", "iJ c #e2b5ba", "kq c #e2e2e9", "iL c #e2e2ea", "iV c #e2e4ec", "iK c #e2e9f2", "cc c #e3b28b", "jr c #e3e3ea", "i5 c #e3e3eb", "je c #e3e7ef", "dD c #e4b895", "jN c #e4e4eb", "jq c #e4e4ec", "iX c #e53b3b", "iW c #e56c6f", "i4 c #e5e5eb", "i3 c #e5e5ec", "jM c #e5e5ed", "iY c #e64142", "jf c #e6d7dd", "j7 c #e6e6ec", "i2 c #e6e6ed", "jp c #e6e6ee", "jz c #e6eff5", "i1 c #e6f2f8", "iZ c #e73839", "i0 c #e7a2a5", "bh c #e7b992", "jL c #e7e7ee", "jg c #e8494a", "ev c #e8b387", "d9 c #e8b388", "jo c #e8e8ee", "eQ c #e9b58a", "fu c #e9b78e", "dz c #e9bc97", "jA c #e9bcc0", "jn c #e9e9ef", "j6 c #e9e9f0", "kc c #e9eaf0", "jh c #ea3b3c", "ji c #ea3e3f", "ew c #eab78d", "jK c #eaeaf0", "jm c #eaebf0", "jl c #eaf3f9", "jU c #eaf6fc", "jj c #eb3435", "jk c #eb888a", "dk c #ebb689", "e. c #ebb98e", "f. c #ebb990", "fM c #ebbb94", "dE c #ebbd96", "jB c #ec3d3d", "eR c #ecbc92", "j5 c #ececf0", "jJ c #ececf1", "jV c #ed9fa2", "bi c #edbb90", "fv c #edbe97", "kp c #ededf2", "kd c #edf1f6", "jC c #ee3c3d", "jD c #ee3f40", "dJ c #eeb88a", "dK c #eebb8f", "ex c #eebc93", "e# c #eebd93", "f# c #eebf97", "fN c #eec29d", "jI c #eeeef2", "jW c #ef3738", "jE c #ef3838", "jF c #ef696b", "dL c #efbd94", "jG c #efeff4", "jH c #eff0f5", "eS c #f0c098", "fw c #f0c39e", "f3 c #f0c5a2", "j4 c #f0f0f4", "jY c #f14041", "ke c #f17a7c", "c7 c #f1c093", "ey c #f1c098", "ea c #f1c198", "fa c #f1c49e", "fO c #f1c7a3", "ko c #f1f1f5", "jX c #f24040", "dM c #f2c198", "eT c #f2c49d", "fx c #f2c7a3", "f4 c #f2caa9", "j3 c #f2f2f5", "j2 c #f2f5f9", "jZ c #f33d3d", "j0 c #f34f50", "dm c #f3bf94", "dn c #f3c097", "dF c #f3c399", "eb c #f3c49c", "fb c #f3c7a3", "gf c #f3cdad", "j1 c #f3e7ea", "kn c #f3f3f6", "kf c #f43e3e", "b8 c #f4c092", "dy c #f4c59b", "fP c #f4cbaa", "fy c #f4cca8", "f5 c #f4ceae", "kg c #f54647", "dN c #f5c49c", "eU c #f5c7a2", "ez c #f5c8a1", "fQ c #f5ceae", "gg c #f5d0b2", "gv c #f5d2b7", "gw c #f5d4ba", "gx c #f5d6bc", "km c #f5f5f8", "ki c #f64445", "kh c #f64647", "kj c #f64a4b", "dl c #f6c190", "do c #f6c499", "ec c #f6c7a0", "fc c #f6cca8", "f6 c #f6d1b2", "gh c #f6d3b6", "kk c #f6d6d7", "gy c #f6d7be", "kl c #f6fdfe", "cZ c #f7c498", "dO c #f7c69e", "eV c #f7cba7", "fz c #f7cead", "fR c #f7d1b2", "f7 c #f7d4b7", "go c #f7d5b8", "gi c #f7d6ba", "gp c #f7d8be", "gz c #f7d8bf", "cY c #f8c397", "c0 c #f8c69b", "dP c #f8c9a1", "ed c #f8caa2", "eA c #f8caa4", "eW c #f8ceaa", "fd c #f8cfac", "fA c #f8d1b1", "gq c #f8dbc0", "cA c #f9c59a", "dp c #f9c89f", "ee c #f9cba5", "eB c #f9cda8", "fe c #f9d1b0", "fS c #f9d4b5", "f8 c #f9d7ba", "gj c #f9d8bd", "gk c #f9dabf", "gr c #f9ddc2", "gt c #f9ddc4", "gs c #f9dec4", "cX c #fac492", "cy c #fac493", "cB c #fac69a", "c1 c #fac89c", "dG c #fac99c", "dq c #fac9a0", "dQ c #facaa2", "eC c #facfa9", "eX c #fad0ac", "ff c #fad3b3", "fB c #fad4b4", "fT c #fad7b9", "f9 c #fad9bd", "gl c #fadbc1", "gm c #fadcc2", "cC c #fbc79a", "c2 c #fbc99d", "dR c #fbcca4", "ef c #fbcea7", "eP c #fbcfa9", "eY c #fbd2af", "fC c #fbd6b6", "fD c #fbd7b8", "fU c #fbd9bb", "g. c #fbdabf", "g# c #fbdbc1", "gn c #fbddc4", "gu c #fbddc5", "c. c #fcc79a", "c3 c #fcc99e", "dr c #fccba2", "dx c #fccc9e", "eu c #fccda5", "dS c #fccda6", "eg c #fccfa8", "eD c #fcd0ab", "eO c #fcd1ac", "e9 c #fcd3b0", "eZ c #fcd3b1", "ft c #fcd4b4", "fg c #fcd5b5", "fL c #fcd7b9", "fV c #fcdabd", "fW c #fcdbbf", "ga c #fcdcc2", "ge c #fcddc2", "gb c #fcddc3", "gd c #fcdec3", "gc c #fcdec4", "bK c #fdc68f", "c# c #fdc799", "c4 c #fdca9e", "ds c #fdcca1", "d8 c #fdcca2", "dt c #fdcca3", "dT c #fdcea7", "eh c #fdd0aa", "eE c #fdd1ad", "eF c #fdd2ae", "eN c #fdd3ad", "e0 c #fdd4b2", "e8 c #fdd5b2", "e1 c #fdd6b3", "fh c #fdd6b6", "fs c #fdd7b7", "fi c #fdd7b8", "fr c #fdd8b7", "fq c #fdd8b8", "fE c #fdd9ba", "fK c #fdd9bc", "fF c #fddabc", "fG c #fddabd", "fJ c #fddbbd", "f2 c #fddbc0", "fX c #fddcbf", "fY c #fddcc0", "fZ c #fddcc1", "f1 c #fddcc2", "f0 c #fdddc1", "ca c #fec799", "cz c #fec899", "cD c #fec89c", "dH c #fecb9d", "d7 c #fecda5", "dU c #fecea8", "dV c #fecfa8", "ei c #fed0ab", "et c #fed1aa", "es c #fed1ab", "ek c #fed1ac", "ej c #fed2ab", "eM c #fed2ae", "er c #fed3ac", "eG c #fed3af", "eH c #fed3b0", "eL c #fed5b0", "e7 c #fed6b4", "e2 c #fed7b4", "e3 c #fed7b5", "fj c #fed8b9", "fk c #fed8ba", "fp c #fed9b9", "fl c #fed9ba", "fo c #fedab9", "fn c #fedaba", "fm c #fedabb", "fH c #fedbbe", "fI c #fedbbf", "cE c #ffc998", "b9 c #ffca98", "cb c #ffca99", "bH c #ffcb94", "bJ c #ffcb99", "c5 c #ffcb9f", "bI c #ffcc99", "c6 c #ffcc9d", "du c #ffcda5", "dI c #ffce9f", "dv c #ffcea4", "dw c #ffcfa0", "d6 c #ffcfa6", "dW c #ffd0a9", "d5 c #ffd1a8", "d4 c #ffd2a8", "dX c #ffd2a9", "el c #ffd2ac", "d3 c #ffd3a8", "d2 c #ffd3a9", "dY c #ffd3aa", "eq c #ffd3ad", "dZ c #ffd4a9", "ep c #ffd4ac", "em c #ffd4ad", "en c #ffd4ae", "eo c #ffd4af", "d1 c #ffd5a8", "d0 c #ffd5aa", "eI c #ffd5b0", "eK c #ffd5b1", "eJ c #ffd6b1", "e4 c #ffd7b6", "e6 c #ffd8b5", "e5 c #ffd8b6", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.a.b.c.d.e.f.g.h.i.jQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.k.l.m.n.o.p.q.r.s.t.u.v.w.x.yQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.z.A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.QQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.R.S.T.U.V.W.X.U.Y.Z.0.1.2.3.4.5.6.7.8.9#.QtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQt###a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#t#u#vQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt#w#x#y#z#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O#P#Q#R#S#T#UQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt#V#W#X#Y#Z#0#1#2#3#4#5#6#7#8#9a.a#aaabacadaeafagahaiQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtajakalamanaoapaqarapasatauavawaxayazaAaBaCaDaEaFaGaHaIQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtaJaKaLaMaNaOaPaQaRaSaTaUaVaWaXaYaZa0a1a2a3a4a5a6a7a8a9b.QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtb#babbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbx#Ubybzb.QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtbAbBbCbDbEbFbGbHbIbJbKbLbMbNbObPbQbRbSbTbUbVbWbXbYbZb0b1b2QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtb3b4b5b6b7b8b9c.c#cacbcccdcecfcgchcicjckclcmcncocpcqcrcsctQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtcucvcwcxcyczcAcBcCc.cDcEcFcGcHcIcJcKcLcMcNcOcPcQcRcScTcUQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtcVcWcXcYcZc0c1c2c3c4c5c6c7c8c9d.d#dadbdcdddedfdgdhdidjQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtdkdldmdndoc0dpdqdrdsdtdudvdwdxdydzdAdBdCdDdEdFdGdHdIdIQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdYdZd0d1d2d3d4d5d6d7d8QtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtd9e.e#eaebecedeeefegeheiejekelemeneoenepeqeresetehegeuQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtevewexeyebezeAeBeCeDeEeFeGeHeIeJeJeJeJeKeKeLeGeMeNeOePQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQteQeReSeTeUeVeWeXeYeZe0e1e2e3e4e5e5e6e3e3e3e7e1e8e9QtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtf.f#fafbfcfdfefffgfhfifjfkflfmfnfofofpflfqfrfsftQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtfufvfwfxfyfzfAfBfCfDfEfFfGfHfHfIfHfHfHfJfFfKfLQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtfMfNfOfPfQfRfSfTfUfVfWfXfYfZf0f1fZfYfYf2fVQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtf3f4f5f6f7f8f9g.g#gagbgbgcgcgdgbgeQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtgfggghgigjgkglgmgngngngngngnQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtgogpgqgrgsgtgnguQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtgvgwgxgygzQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtgAgBgCgDgEQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtgFgGgHgIgJgKgLgMQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtgNgOgPgQgRgSgTgUgVgWgXgYQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtgZg0g1g2g3g4g5g6g7g8g9g2h.h#haQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQthbhcg1hdhehdhfhghhhihjhkhlhmhnhoQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQthphqhrhsgPhthuhvhwhxhyhzhehAhuhuhehcQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQthBhChDhEhFgPhGhHhIhJhKhLgXhuhthrhMhGhNQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQthOhPhQhRhDhShrhThHhUhVhWhXhAhuhtgPhrgPhYhZQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQth0h1gYh2hDhSgPh3hAh4h5h6h7hmh8hAhuhtgPhth9QtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQti.i#iah1h2ibicgXidieifigihg7g8iiijikhkh8hAhGilQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtiminioh1hRhFhAijipiqirisitiuiviwixiyiziiikhliAQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtiBhaiCiogYhDiDiEiygRiFiGiHiIiJiKiLiMiNiOiwiyh.hkiPQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtiQiRiSiahQiTikiyiUiViWiXiYiZi0i1i2i3i4i5i6i7i8i9huQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtj.j#jaiCjbjcjdiyiMjejfjgjhjijjjkjljmjnjojpjqjriMjsjtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtjujvh0jwjxhSjyiOi5jzjAjBjCjDjEjFjGjHjIjJjKjLjMjNiMjsijQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtjOjPjQjRhQjSjTiLi3jUjVjWjXjYjZj0j1j2j3j4jIj5j6j7i5iMj8QtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtj9k.k#kailibkbi7jqkckdkekfkgkhkikjkkklkmknkojGkpjni3kqiOQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; unixODBC-2.2.14-p2/odbcinstQ/stats.xpm0100644000076400007640000002314707730246463016031 0ustar nicknick/* XPM */ static const char *xpmStats[]={ "48 48 311 2", "Qt c None", "#D c #000000", "az c #015c10", "aq c #015d11", "ar c #015e11", "ac c #015f11", "ad c #016011", "#2 c #016111", "#J c #016211", "bV c #016311", "cu c #016412", "#3 c #026412", "a4 c #046614", "#K c #046715", "b7 c #056715", "aK c #076a18", "ab c #086117", "#1 c #086217", "#I c #086317", "ca c #086a19", "ch c #086b19", "aQ c #096919", "bs c #096a19", "b5 c #0a671a", "b0 c #0a681a", "cn c #0a6c1b", "bT c #0b691b", "bZ c #0b6a1b", "bN c #0c6a1c", "#l c #0c6b1c", "cX c #0d0d0d", "bx c #0d6b1d", "#B c #0d6c1d", "#k c #0d6d1e", ".H c #0e0e0e", "#A c #0e6d1e", "aw c #0e6e1e", "#Q c #0e6e1f", "aB c #0e721e", "bG c #0f6e1f", "#z c #0f6f1f", "co c #0f701f", "av c #0f7020", "aT c #0f731f", "ap c #10611e", "#P c #107020", "#8 c #107120", "#y c #107121", "bY c #117121", "#O c #117221", "b4 c #117222", "#L c #117321", "#x c #117322", "bA c #127222", "aj c #127322", "au c #127422", "#N c #127423", "a3 c #127522", "#7 c #127523", "#4 c #127623", "bc c #127723", "bw c #137523", "ai c #137524", "#M c #137624", "ae c #137824", "#6 c #147624", "ah c #147725", "aF c #157825", "#5 c #157826", "ag c #157926", "aX c #167a26", "at c #167a27", "#w c #177327", "af c #177b28", "aE c #177c28", "as c #187d29", "aD c #187e29", "aM c #187e2a", "bE c #197e2a", "aO c #197f2a", "aW c #197f2b", "bQ c #1a7d2b", "ba c #1a7e2b", "aC c #1a802b", "bk c #1a812c", ".# c #1b1b1b", "aV c #1b812c", "aL c #1b822c", "a6 c #1b822d", "#T c #1c1c1c", "aU c #1c832d", "a5 c #1c842e", ".T c #1d1d1d", "bM c #1d822e", "bL c #1f8530", "aH c #20652c", "bz c #20662c", "b2 c #20672c", "cm c #20682c", "bl c #218832", "aY c #228733", "bh c #238734", "b3 c #238834", "b# c #268a37", "a7 c #268d37", ".d c #282828", "ay c #286633", "aa c #286833", "#0 c #286a33", "#H c #286b33", "c. c #287936", "#v c #296d35", "cB c #2a2a2a", "cc c #2a7d38", "bP c #2b903d", "aJ c #2b913d", "bC c #2b933d", "ci c #2c803a", "bg c #2f9541", "ao c #306a3a", "cK c #307e3d", "cC c #30803d", "#j c #32743d", "bp c #329a44", "bv c #339c45", "bB c #349a45", "a1 c #349b45", "bF c #359e47", ".s c #363636", "cb c #379f48", ".A c #383838", "cv c #388645", "cp c #3c8a49", "bJ c #3ca54e", "bb c #3ca64e", "bD c #3ca74e", "bd c #3da74f", "aZ c #3fa851", "bS c #41ab53", "a8 c #42ac54", "cW c #444444", "bi c #45af57", "b6 c #468c52", "bW c #46b158", "b1 c #478c53", "bU c #478d53", ".I c #484848", "#Z c #48714f", "#G c #48724f", "#u c #48734f", "bO c #488e54", "#m c #488f54", "#R c #499055", "ax c #499155", "aG c #499156", "aN c #4eb960", "b9 c #4eba60", "#i c #4f7956", "an c #507256", "a# c #507356", "bo c #50bd62", ".a c #515151", "cS c #525252", "cO c #535353", "cJ c #545454", "aA c #56c369", "bt c #56c469", ".U c #585858", "## c #595959", "a0 c #5cca6f", ".e c #5e5e5e", "a9 c #5ecd71", "c0 c #5f5f5f", "bI c #5fcd71", "bK c #5fce72", "bu c #5fcf72", "bR c #60cf73", "cA c #636363", ".9 c #637a67", "#. c #64876a", "cT c #666666", "cd c #66a170", "bj c #67d77a", "#Y c #68796b", "#t c #687a6b", "cj c #68a372", "#h c #6b7d6e", ".t c #6c6c6c", "bf c #6cdc7f", "bX c #6cdd7f", ".B c #6f6f6f", "a. c #707b72", "cL c #70a679", "cD c #70a779", "a2 c #70e183", "b8 c #73e587", "cw c #77ad80", "cq c #78ad81", "bH c #78ea8c", "aS c #78eb8c", "cZ c #7a7a7a", "cV c #7b7b7b", "b. c #7bee8f", "be c #7bef8f", ".J c #808080", "aR c #81f595", "bn c #82f696", "c# c #83b28b", "bm c #83f796", ".V c #848484", "am c #858585", ".b c #878787", "cR c #898989", "cP c #8a8a8a", "aI c #8aff9e", "cN c #8b8b8b", "cI c #8c8c8c", ".8 c #909090", "#X c #949494", ".m c #959595", "#a c #969696", "cz c #9b9b9b", ".c c #a2a2a2", "ce c #a3c6a9", "ck c #a4c7aa", "cr c #a4c8ab", ".C c #a5a5a5", ".7 c #a6a6a6", "al c #a8a8a8", "#W c #a9a9a9", "#s c #aaaaaa", ".S c #acacac", "cM c #afcdb4", "cE c #afceb4", "cY c #b0b0b0", "cU c #b1b1b1", "cQ c #b2b2b2", "cx c #b3d1b9", "#U c #b7b7b7", ".K c #b9b9b9", ".2 c #bababa", ".1 c #bbbbbb", ".6 c #bcbcbc", ".f c #bdbdbd", ".r c #bebebe", "#r c #bfbfbf", "#f c #c0c0c0", "#E c #c1c1c1", "#p c #c2c2c2", ".3 c #c3c3c3", "cH c #c4c4c4", ".l c #c5c5c5", ".O c #c6c6c6", ".x c #c7c7c7", "#V c #c8c8c8", "#F c #c9c9c9", "#q c #cacaca", ".n c #cbcbcb", "by c #cccccc", "br c #cdcdcd", ".q c #cecece", ".P c #cfcfcf", ".F c #d0d0d0", ".y c #d1d1d1", ".R c #d2d2d2", "#e c #d3d3d3", "#g c #d4d4d4", ".4 c #d5d5d5", ".5 c #d6d6d6", ".Q c #d7d7d7", ".G c #d8d8d8", ".g c #d9d9d9", ".z c #dadada", ".D c #dbdbdb", "#S c #dcdcdc", ".u c #dddddd", "aP c #dedede", ".M c #dfdfdf", ".h c #e0e0e0", "cf c #e0ece2", ".L c #e1e1e1", ".p c #e2e2e2", "ct c #e3e3e3", "#9 c #e4e4e4", "cs c #e5e5e5", ".X c #e6e6e6", ".v c #e7e7e7", ".W c #e8e8e8", ".i c #e9e9e9", "ak c #eaeaea", "cG c #ebebeb", "#d c #ececec", ".Y c #ededed", "#c c #eeeeee", "#b c #efefef", "cF c #eff5f0", ".w c #f0f0f0", "cy c #f0f5f1", ".N c #f1f1f1", "#n c #f2f2f2", ".j c #f3f3f3", ".Z c #f4f4f4", ".o c #f5f5f5", "#C c #f6f6f6", "bq c #f7f7f7", "#o c #f8f8f8", ".E c #fafafa", ".0 c #fbfbfb", ".k c #fcfcfc", "cl c #fdfdfd", "cg c #ffffff", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.a.b.c.c.aQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.d.e.b.f.g.g.h.i.j.k.lQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.d.e.m.n.g.g.h.i.j.k.o.p.q.r.lQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.s.t.c.g.g.g.u.v.w.k.o.p.q.r.f.x.y.g.zQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.A.B.C.D.z.g.u.v.w.E.o.p.q.f.f.x.F.G.G.g.g.z.zQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.H.I.J.K.p.L.M.p.i.N.E.o.p.q.f.f.O.P.Q.Q.Q.G.R.f.S.u.z.zQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQt.T.U.V.r.W.v.X.W.Y.Z.0.E.p.q.1.2.3.q.4.5.5.Q.y.6.7.8.J.9#..Y.z.DQtQtQtQtQtQt", "QtQtQtQtQtQtQt###a.R#b#c#d#d.w.o.k.E.X#e#f.2.3.n#g.4.4.4.5.1.7.8.J#h#i#j#k#l#m.o.D.DQtQtQtQtQtQt", "QtQtQtQtQtQt.c.Y#b#n.o#o.0.E.X#e#f.2#p#q#e#e#g#g.4#r#s.m.J#t#u#v#w#x#y#z#A#B#m#C.D.DQtQtQtQtQtQt", "QtQtQtQtQt#D.i#d.0.E.X#e#f.K#E#F.R.R.R#e#e#r#s.m.J#t#G#H#I#J#K#L#M#N#O#P#Q#B#R#C.D#SQtQtQtQtQtQt", "QtQtQtQtQt#T.X#c.u#U#E#V.F.y.y.R.R.r#W#X.J#Y#Z#0#1#2#2#J#J#3#4#5#6#7#x#8#z#A#R#C#S#SQtQtQtQtQtQt", "QtQtQtQtQt#D#9#d.G#V.F.F.y.6#W#X.Ja.a#aaabacacadad#2#2#J#3aeafagahaiaj#y#z#A#R#C#S#SQtQtQtQtQtQt", "QtQtQtQtQt#D.Lak.G#V.Falama.anaoapaqararacacadad#2#2#J#Jaeasafatah#Mau#Oavawax#C#S.uQtQtQtQtQtQt", "QtQtQtQtQt#D.M.W.G#F.y#XayazazaqaqararacaAadadad#2#2#JaBaCaDaEataF#M#N#OavawaG#C.u.uQtQtQtQtQtQt", "QtQtQtQtQt#D#S.X.G#F.y#XaHazazaqaqararajaIaJad#2#2#JaKaLaCaMaEataF#M#N#OavawaG#C.u.uQtQtQtQtQtQt", "QtQtQtQtQt#D.z#9.G#F.y#XaHazaqaqararacaNaIaN#2#2#J#3aOaLaCaDaEataF#M#N#OavawaG#C.uaPQtQtQtQtQtQt", "QtQtQtQtQt#D.Q.p.G#F.R#XaHazaqaqararaQaRaIaS#2#2#JaTaUaVaWasafaXahaYaZa0avawax#CaPaPQtQtQtQtQtQt", "QtQtQtQtQt#D#g.h.G#q.R#XaHaqaqararaca1aIa2aIa3#Ja4a5a6aCaOa7a8a9b.aIaIaIb##A#R#CaPaPQtQtQtQtQtQt", "QtQtQtQtQt#D.RaP.G#q.R#XaHaqaqararaca2aSbaaIbb#Jbca6aVbdbeaIaIaIbfaNbg#8#z#A#R#CaP.MQtQtQtQtQtQt", "QtQtQtQtQt#D.P.u.G#q#e#XaHaqararacbhaIbi#2aSbja4aLbkblbmbnbobpah#M#N#O#P#Q#B#Rbq.M.MQtQtQtQtQtQt", "QtQtQtQtQt#Dbr.D.G#q#e.maHarararacaAaIbs#2btaIasaCaWbuaIbvat#5#6bw#x#y#z#Abx#mbq.M.MQtQtQtQtQtQt", "QtQtQtQtQt#Dby.g.G#q#e.mbzbAbBaAaSaIaA#2#2bCaIbDbEbFaIa9at#5ahaiau#O#PbG#k#l#mbq.M.hQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.G.n#g.mbzbHaIaRbIbJbs#2#2#JaIbKbLb.bnbM#5ah#M#N#x#8#z#A#BbNbObq.h.hQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.G.n#g.mbzbPbQacadad#2#2#J#JbRbnboaIbS#5ah#M#N#x#yav#Q#B#lbTbUbq.h.hQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.G.n#g.mbzacacadad#2#2#J#JbVbWaIaIbXah#6ai#N#xbY#P#z#AbxbZb0b1bq.h.LQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.Gby.4.mb2acacadad#2#2#J#J#3b3aIbnaYai#7aub4#yav#z#A#BbNbTb5b6bq.L.LQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.Gby.4.mb2acadad#2#2#J#JbVb7#Mb8b9#Nau#x#O#8avbG#A#BbNbTb5c.c#bq.L.LQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.Gby.4.mb2acadad#2#2#J#JbVcaaucb#x#O#O#y#P#zaw#A#Bcccdcecfcgbq#d.L.pQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.Gbr.5.mb2adad#2#2#J#JbVbVch#y#y#8#Pav#z#Qcicjckcfcl.o.Y.W.L.L.L.p.pQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.Gbr.5.mcmadad#2#2#J#JbVbVcnco#z#zcpcqcrcf.k.Z.Ycs.M.h.h.L.L.L.p.pctQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.Gbr.Q.mcmad#2#2#J#JbVbVcucvcwcxcy.k.Z#d#9aPaP.M.M.h.h.L.L.L.lczcAcBQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.Gbr.Q.mcmad#2#2#JcCcDcEcF.E.ZcGct.u.uaPaPaP.M.M.h.hcHcIcJ#TQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.Gbr.Q#acmcKcLcMcF.E.N.W.M#S#S#S.u.uaPaPaP.M.3cIcJ#TQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.G.q.G#fbq.E.N.vaP.z.D.D#S#S#S.u.uaP#pcNcO.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQt#Dby.G.G.q.G.D.u.g.z.z.z.D.D#S#S#S#EcPcO.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtcQ.G.G.q.G.g.g.g.z.z.D.DcQcRcS.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtcT.G.G.q.g.g.g.zcUcVcWcXQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.C.G.PcYcZcWcXQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtc0QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; unixODBC-2.2.14-p2/odbcinstQ/Canada.xpm0100644000076400007640000000337507373626611016043 0ustar nicknick/* XPM */ static const char *xpmCanada[] = { /* width height num_colors chars_per_pixel */ " 32 22 56 1", /* colors */ ". c #000000", "# c #d75556", "a c #f5eded", "b c #edc4c4", "c c #e18a8a", "d c #eec8c8", "e c #ca1414", "f c #f1d7d8", "g c #f4e8e8", "h c #e69f9f", "i c #d13838", "j c #f6f0f0", "k c #d23c3c", "l c #e59a9a", "m c #f0d6d6", "n c #ebbaba", "o c #c70606", "p c #da6464", "q c #d54848", "r c #ce2a2a", "s c #ecc0c1", "t c #edc4c5", "u c #e7a8a8", "v c #d03232", "w c #f1d9d9", "x c #f5eaea", "y c #da6363", "z c #dd7273", "A c #e08383", "B c #d75656", "C c #f3e1e1", "D c #c60000", "E c #db696a", "F c #cc2020", "G c #df7e7e", "H c #cb1b1b", "I c #c70303", "J c #f6f3f3", "K c #f7f7f7", "L c #e59d9d", "M c #e08181", "N c #dd7474", "O c #cf2b2b", "P c #f0d2d2", "Q c #e6a3a4", "R c #c70202", "S c #f6f2f2", "T c #e8a9a9", "U c #d64f4f", "V c #f0d4d5", "W c #f7f6f6", "X c #d65152", "Y c #f4e9e9", "Z c #ebbcbc", "0 c #efcdcd", "1 c #e6a0a0", /* pixels */ "................................", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKJKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKLnKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKSavUYKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKkDI#KKKKKyDDDDDDD.", ".DDDDDDDAKKKfKpDDMWwKKKyDDDDDDD.", ".DDDDDDDAKbTXqcDDliE1PKyDDDDDDD.", ".DDDDDDDAKCoDDIDDRDDejKyDDDDDDD.", ".DDDDDDDAK0HDDDDDDDDOwKyDDDDDDD.", ".DDDDDDDAKKdNFDDDDrGPKKyDDDDDDD.", ".DDDDDDDAKKKKBDIIDzKKKKyDDDDDDD.", ".DDDDDDDAKKKSmxutgVWKKKyDDDDDDD.", ".DDDDDDDAKKKKKKQsKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKhZKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKajKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", "................................" }; unixODBC-2.2.14-p2/odbcinstQ/GreatBritain.xpm0100644000076400007640000000721307373626611017242 0ustar nicknick/* XPM */ static const char *xpmGreatBritain[] = { /* width height num_colors chars_per_pixel */ " 32 22 129 2", /* colors */ ".. c #000000", ".# c #6762cf", ".a c #da6666", ".b c #cc1d1d", ".c c #130bb8", ".d c #d0b4cc", ".e c #d23d3d", ".f c #352ec2", ".g c #d64e4e", ".h c #de797a", ".i c #a39cdb", ".j c #3e37c4", ".k c #554fca", ".l c #e59b9b", ".m c #b4aadb", ".n c #ddaab4", ".o c #e8aaab", ".p c #dfa3ac", ".q c #d96161", ".r c #c70707", ".s c #e18c8d", ".t c #e69f9f", ".u c #0b03b6", ".v c #e9aeaf", ".w c #aaa3de", ".x c #c80b0b", ".y c #cc1c1c", ".z c #dd7475", ".A c #db9fab", ".B c #e9b2b2", ".C c #edc3c3", ".D c #d23c3c", ".E c #d64d4d", ".F c #cd2020", ".G c #dda5b0", ".H c #b4b2e4", ".I c #1008b7", ".J c #e8e1ec", ".K c #ede2e7", ".L c #d8b1c2", ".M c #e59a9a", ".N c #1a13ba", ".O c #7873d4", ".P c #d96060", ".Q c #231cbc", ".R c #c80a0a", ".S c #d2d1ed", ".T c #8b87d9", ".U c #443dc5", ".V c #dd7374", ".W c #c4c2e9", ".X c #0800b5", ".Y c #edc2c2", ".Z c #d23b3b", ".0 c #eee3e7", ".1 c #cf2e2e", ".2 c #c60101", ".3 c #dc6c6c", ".4 c #ca1212", ".5 c #db6a6b", ".6 c #b4a8d9", ".7 c #e8a8a9", ".8 c #c70505", ".9 c #3d37c4", "#. c #c9c7ea", "## c #9893db", "#a c #df7f7f", "#b c #2f28c0", "#c c #d2d0ec", "#d c #e18c8e", "#e c #e69fa0", "#f c #0901b5", "#g c #ce2929", "#h c #db6767", "#i c #d0b3cc", "#j c #cf2d2d", "#k c #c60000", "#l c #e49697", "#m c #e8a7a8", "#n c #df7a7b", "#o c #cd2021", "#p c #de7a7a", "#q c #d54d4d", "#r c #cc2020", "#s c #c70404", "#t c #deabb5", "#u c #e07e7f", "#v c #d79fae", "#w c #231cbd", "#x c #0b04b6", "#y c #c80a0b", "#z c #8a87d9", "#A c #b9b7e6", "#B c #d2b6cd", "#C c #eab3b3", "#D c #cf2c2c", "#E c #6560cf", "#F c #918cd9", "#G c #cc1f1f", "#H c #a39cda", "#I c #1109b8", "#J c #c70303", "#K c #ede1e7", "#L c #d8b2c2", "#M c #ca1213", "#N c #b4a8da", "#O c #dd7071", "#P c #ce2727", "#Q c #443ec5", "#R c #dda1ac", "#S c #cb1a1a", "#T c #cf2b2b", "#U c #dea7b0", "#V c #2922be", "#W c #e9e3ec", "#X c #dab3c3", "#Y c #cf2d2e", "#Z c #d8b1c1", "#0 c #f0dddf", "#1 c #1b13ba", "#2 c #de7a7b", "#3 c #d95e5f", "#4 c #0e06b7", "#5 c #251ebd", "#6 c #e49a9b", "#7 c #e8abac", "#8 c #2f29c0", "#9 c #e08b8d", "a. c #e6a0a0", /* pixels */ "................................................................", "..#Y#L.k.X.X.X.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X.X.X.X#f.##t.F..", "...y.8#n.i#1.X.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X.X.X#5#N#h.2#P..", "..#K.P.2.1.L.k.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X#f.##t#o#J.V#W..", "..#b.W.B.y.8#p#H#1.X.X.X.X#I#l#k#k#v.X.X.X.X.X#5.6#h.2#g.Y.H.Q..", "...X.u.O#K.P.2#j#Z.k.X.X.X#I#l#k#k#v.X.X.X#f.#.n#r#J.V.J#E#f.X..", "...X.X.X#8.W.B.b.8.h#H#1.X#I#l#k#k#v.X.X#5.6.a.2#g.Y.H#w.X.X.X..", "...X.X.X.X#x.O#K.q.2#j#Z.k#I#l#k#k#v#f.#.n#r#s.z.J#E#f.X.X.X.X..", "..#4#4#4#4#4#4.f#.#C#G.x#a.w#l#k#k#U.m.3.r#T.C#A#V#4#4#4#4#4#4..", "..#6#6#6#6#6#6#6#6.l.l.M.M.l#3#k#k#O.l.M.M.l.l#6#6#6#6#6#6#6#6..", "..#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k..", "..#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k..", "...A.A.A.A.A.A.A.p.v#m#e#e#7.5#k#k#u.o#e#e.7.v#R.A.A.A.A.A.A.A..", "...X.X.X.X.X.X.j.Sa.#M.R#9###l#k#k.G.i.h.8.b#C.W#b.X.X.X.X.X.X..", "...X.X.X.X.I#z#0.g#k.D#i.U#I#l#k#k#v.X.k#Z#j.2.q.K.O.u.X.X.X.X..", "...X.X.X.j#c.t#M#y#9#F.c.X#I#l#k#k#v.X.X.N.i.h.8.b.B.W#b.X.X.X..", "...X.I.T#0#q#k.D#i#Q.X.X.X#I#l#k#k#v.X.X.X.X.k#Z#j.2.P#K.O.u.X..", "...9#c.t.4.x.s#F.c.X.X.X.X#I#l#k#k#v.X.X.X.X.X#1.i#p.8.y.B.W#8..", "..#0.E#k.e.d.U.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X.X.k.L.1.2.P.0..", "...4.x#d#F.c.X.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X.X.X#1.i#2.8#S..", "...Z#B#Q.X.X.X.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X.X.X.X.X.k#X#D..", "................................................................" }; unixODBC-2.2.14-p2/odbcinstQ/trace.xpm0100644000076400007640000000260707366313532015764 0ustar nicknick/* XPM */ /* Drawn by Nico Shirwing for the K Desktop Environment */ /* See http://www.kde.org */ static const char*trace_xpm[]={ "32 32 8 1", "# c #000000", "b c #c0c0c0", "a c #ffffff", "e c #585858", "d c #a0a0a4", "c c #0000ff", "f c #00ffff", ". c None", "..######################........", ".#a#baaaaaaaaaaaaaaaaaa#........", "#aa#baaaaaaaaaaaaaccaca#........", "####baaaaaaaaaaaaaaaaca####.....", "#bbbbaaaaaaaaaaaacccaaa#da#.....", "#aaaaaaaaaaaaaaaacccaca#da#.....", "#aaaaaaaaaaaaaaaaaccaca#da#.....", "#aaaaaaaaaabe###ebaaaaa#da#.....", "#aaaaaaaaa#########aaaa#da#.....", "#aaaaaaaa###dbbbb###aaa#da#.....", "#aaaaaaa###aaaaffb###aa#da#.....", "#aaaaaab##aaccaaafb##ba#da#.....", "#aaaaaae#daaccaccaad#ea#da#.....", "#aaaaaa##aaaaaaccaab##a#da#.....", "#aaaaaa##aacccaaaaab##a#da#.....", "#aaaaaa##aaccccaccab##a#da#.....", "#aaaaaae#daccccaccad#ea#da#.....", "#aaaaaab##aacccaaaa##da#da#.....", "#aaccacd###aaaaaaa###da#da#.....", "#aaaaacad###daaad#####a#da#.....", "#acccaaaad##########da##da#.....", "#acccacaaadde###edd#eda#da#.....", "#aaccacaaaabdddddbdd#eda#a#.....", "#aaaaaaaaaaaaaaaaaadd#eda##.....", "#aaaaaaaaaaaaaaaaaaadd#eda#.....", "#aaaaaaaccacaaaaaaaaadd#eda#....", "#aaaaaaaaaacaaaaaaaaaad##eda#...", "#aaaaaacccaaaaaaaaaaaaa#d#eda#..", "########################dd#eda#.", "...#dddddddddddddddddddddd##eda#", "...#aaaaaaaaaaaaaaaaaaaaaa#.####", "...########################..##."}; unixODBC-2.2.14-p2/odbcinstQ/NoFlag.xpm0100644000076400007640000000154207373626611016034 0ustar nicknick/* XPM */ static const char * xpmNoFlag[] = { "32 22 1 1", " c None", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " " }; unixODBC-2.2.14-p2/odbcinstQ/advanced.xpm0100644000076400007640000002551207730246463016436 0ustar nicknick/* XPM */ static const char *xpmAdvanced[]={ "48 48 389 2", "Qt c None", ".D c #000000", "e. c #06090c", ".C c #090909", ".E c #0b0f14", ".c c #0d1115", ".j c #0f151d", "cH c #140000", "#N c #161c22", ".F c #171f29", "#t c #191919", "e# c #192633", "d5 c #1d0000", "bl c #1f0000", "#0 c #1f0b08", "ec c #1f2f3f", "a6 c #200000", ".w c #202428", "aN c #210000", "#o c #222b32", ".G c #222d38", "#F c #25354b", "ea c #26394c", "#u c #283442", "b8 c #290000", "#n c #293337", "#Z c #2a0000", ".P c #2a497e", "#h c #2d4b80", "bm c #2f0a07", "#R c #2f0b08", "at c #2f120d", ".t c #304e82", ".O c #315083", ".8 c #334b6e", "eb c #334c66", "#x c #335285", "d4 c #340000", ".# c #344046", "#w c #345285", ".b c #354452", ".s c #365587", "#m c #374349", ".i c #395172", "dS c #3e0000", ".v c #40556c", ".9 c #415a78", "#J c #425057", ".H c #435563", "#G c #466388", ".Q c #476795", ".a c #485a67", "c1 c #490000", "#v c #496790", ".Z c #496996", ".u c #4a6a97", ".m c #4c4c49", ".7 c #4c6c98", "#l c #4e5e66", "co c #4f0000", "#y c #4f6f9a", ".N c #51719c", ".I c #52646e", ".h c #53739d", ".r c #53749e", "#. c #567089", "#Y c #580000", "dT c #590000", ".k c #595959", ".0 c #5d7da5", ".Y c #5d7ea5", "bP c #5f0b08", "a7 c #5f1b14", "aO c #5f2117", ".6 c #6182a9", "as c #620000", "#H c #6385ab", ".B c #646a65", ".n c #647a83", ".g c #6688ad", "dz c #6699cc", "dO c #679acc", "d2 c #679acd", "d9 c #680000", ".R c #698baf", "de c #699cce", "ab c #6a0000", "d1 c #6a9dce", "dY c #6b9ecf", "#X c #6d0200", "dN c #6da0d1", "#g c #6e90b3", "dZ c #6ea1d1", "#S c #6f150f", "#T c #700a05", "#z c #7092b4", "d0 c #70a2d2", "di c #720000", ".x c #727272", ".M c #7395b7", "dy c #73a6d4", "## c #748fa2", ".q c #7497b8", "cY c #74a6d4", "dM c #75a8d5", "dd c #75a8d6", "d7 c #767299", "dX c #777499", ".1 c #799bbc", ".X c #799cbc", "d8 c #7a698c", "dJ c #7cafda", "bO c #7d0000", ".5 c #7ea1bf", "dx c #7eb0db", "dL c #80b3dc", "dK c #81b3dd", ".f c #82a5c2", "dc c #82b5de", "cX c #83b5de", "cD c #849bc0", "#f c #84a3ba", "dP c #864c66", ".d c #86a2af", "dw c #87b9e1", "cI c #8b0000", "#Q c #8b3d09", ".S c #8bafca", "dA c #8e394c", "db c #8ec0e5", "cC c #8ec1e5", "#1 c #8f3022", "ac c #8f3828", "dI c #8f556b", "ds c #8fc1e6", "#i c #90b4ce", "#I c #91b4c9", "#A c #91b5cf", "cW c #91c3e7", "dR c #920000", "ck c #93819b", "dv c #93c5e8", "dt c #93c6e8", ".L c #95b9d2", "d6 c #960000", "df c #962633", ".p c #96bbd3", "du c #96c8ea", "aM c #980000", "dr c #985e71", ".W c #98bdd4", "da c #98caeb", "cj c #98cbeb", ".l c #999897", "bx c #9c0000", "#k c #9cbdcc", ".4 c #9dc2d8", "cV c #9dd0ef", "b2 c #9e5665", "cB c #9ed0ef", "bk c #9f0000", ".e c #a0c5da", "d# c #a0d2f0", "b1 c #a1d3f1", "cZ c #a2090c", "c9 c #a3404a", "#O c #a4561a", "bL c #a5191d", "d. c #a6d8f4", "bK c #a6d9f4", "an c #a70000", "a0 c #a70e0f", "cR c #a7292e", ".2 c #a7cbdb", "b7 c #a80000", "#9 c #a80e0f", "bw c #a90000", "ci c #a9dbf6", "bv c #aa0000", "bg c #aa626d", "bu c #aab4c9", "d3 c #ab0000", "#5 c #ab0f0f", "dB c #ac0000", "ah c #ac0f0f", "cA c #acdef8", "cG c #ad0000", "dQ c #ae0000", "#j c #aed4e6", "cn c #af0000", "#B c #afd5e6", "dh c #b00000", "#W c #b02b00", "b6 c #b10000", "aG c #b1757f", ".T c #b1c8d4", ".K c #b1d6e8", ".o c #b1d7e8", "bN c #b20000", "aU c #b21f1f", ".3 c #b2d8e9", "bj c #b30000", ".J c #b3d9ea", "b0 c #b3e4fb", "c2 c #b40000", "cS c #b4e5fc", "dU c #b50000", "cF c #b60000", "#a c #b6cdd8", "aH c #b70000", "az c #b7120d", "bG c #b72f2f", "cm c #b90000", "dg c #ba0000", "b5 c #bb0000", "a5 c #bc0000", "#8 c #bd959f", "b3 c #be0000", "#U c #be3104", "ch c #beeafe", "ar c #bf0000", "bJ c #bfeafe", "aa c #c00000", "am c #c0c1cf", "aZ c #c0ddee", "c0 c #c10000", "cl c #c20000", "bc c #c2281d", "aL c #c40000", "a4 c #c50000", "cU c #c5edfe", "bi c #c60000", "#b c #c6e1de", "cT c #c6edfe", "bt c #c7edfe", "bf c #c7eefe", "cE c #c80000", "bV c #c82a1e", "bM c #cb0000", "#V c #cb5102", "dj c #cc0000", "b4 c #cd0000", "dH c #cd0302", "aK c #ce0000", "a3 c #cf0000", "by c #cf281c", "bh c #d00000", "bW c #d07e7f", "dC c #d10000", "#e c #d1b57c", "a. c #d20000", "dq c #d30c09", "aq c #d50000", "bZ c #d5f2ff", "a1 c #d60000", "aJ c #d70000", "cx c #d7f2ff", "aA c #d88f8f", "#6 c #d8babf", "a2 c #d90000", "aF c #d9f3ff", "#7 c #dbf4ff", "cg c #dcf4ff", "ce c #ddbbbf", "ap c #de0000", "c8 c #de1c14", "#4 c #de241a", "bF c #de4f39", "ao c #df0000", "b9 c #df0f0b", "#2 c #df4431", "al c #e0f5ff", "aI c #e10000", "#M c #e18b03", "#E c #e18d13", "#s c #e18e24", ".A c #e2eed7", "cz c #e2f6ff", "aT c #e3523b", "bI c #e3f6ff", "a# c #e40000", "aY c #e5f7ff", ".U c #e7f2ec", "cy c #e8f8ff", "cQ c #e92f22", "ag c #e93f2d", "be c #e9f8ff", "ai c #eacdcf", "#K c #ecb658", "bY c #edf9ff", "bn c #ef412f", "au c #ef6146", "aE c #effaff", "dk c #f00000", "#C c #f0c479", "#p c #f0c793", "ak c #f0faff", "dV c #f30000", "dD c #f40000", "bs c #f4dfdf", ".V c #f5f6ce", "cf c #f5fbff", "bH c #f5fcff", "dl c #f60000", "aX c #f6fcff", "c3 c #f70000", "aj c #f7fcff", "dW c #f80000", "bX c #f8fcff", "bd c #f8fdff", "dE c #f90000", "br c #f97f5c", "aD c #f9fdff", "#d c #faf28b", "#P c #fbdd04", "cJ c #fc0000", "aC c #fcfeff", "c4 c #fd0100", "aB c #fdfeff", "dF c #fe0302", "dm c #fe0503", "dG c #fe0504", "cp c #fe0805", "aW c #feffff", "c5 c #ff0a07", "cK c #ff0b08", "dn c #ff0d09", "do c #ff140e", "c6 c #ff150f", "cq c #ff1711", "dp c #ff1811", "cL c #ff1912", "c7 c #ff1f16", "c. c #ff2218", "cM c #ff251b", "cr c #ff261b", "bQ c #ff2a1e", "cN c #ff2f22", "c# c #ff3224", "cs c #ff3325", "cO c #ff3728", "bR c #ff3b2a", "cP c #ff3d2b", "ct c #ff3f2d", "ca c #ff402e", "bz c #ff422f", "#3 c #ff4632", "cu c #ff4833", "bS c #ff4a35", "cb c #ff4c37", "cv c #ff4e38", "cw c #ff503a", "bA c #ff523b", "bo c #ff563e", "cc c #ff573e", "a8 c #ff573f", "bT c #ff5840", "af c #ff5d43", "cd c #ff5e44", "bB c #ff6146", "ae c #ff6347", "ad c #ff6448", "a9 c #ff674a", "ay c #ff6b4d", "bU c #ff6d4e", "bC c #ff6f50", "av c #ff7050", "aP c #ff7151", "ax c #ff7252", "aw c #ff7453", "b. c #ff7655", "bD c #ff7a58", "aQ c #ff7c59", "aS c #ff7f5c", "bE c #ff805c", "aR c #ff825e", "bp c #ff835f", "b# c #ff845f", "bb c #ff8963", "bq c #ff8c65", "ba c #ff8d66", "#L c #ffeb1e", "#D c #ffee40", "#r c #fff163", "#q c #fff484", "#c c #fff7a6", ".z c #fffdea", ".y c #fffefd", "aV c #ffffff", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.a.b.cQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQt.d.e.f.g.h.i.jQtQtQt.k.l.mQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.CQt.D.E.F.G.H.I.d.nQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt.J.K.L.M.N.O.P.Q.R.S.T.U.V.J.o.W.X.Y.Z.Z.0.1.W.o.2QtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt.J.3.4.5.6.7.8.9#.###a#b#c#d#e#f#g.7#h#h.7#g#i#j#kQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt#l#m#n#o.DQtQtQtQtQt#p#c#q#r#s#t#u#v#w#x#y#z#A#B#mQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#C#q#r#D#EQtQtQt#F#G#H.5#I#JQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#K#r#D#L#MQtQtQtQtQt#N#oQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#O#D#L#P#QQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#R#S#T#U#V#W#X#Y#ZQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#0#1#2#3#4#5#6#7#8#9a.a#aaabQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtacadaeafagahaiajakalamanaoapaqarasQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtatauavawaxayazaAaBaCaDaEaFaGaHaIaJaKaLaMaNQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtaOaeaPaQaRaSaTaUaVaVaWaCaXaYaZa0a1a2a3a4a5ana6QtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQta7a8a9b.b#babbbcaAaVaVaVaBbdbebfbga5a2bhbia5bjbkblQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtbmbnboa9b.bpbqbranbsaVaVaVaBbdbebtbubva2bhbia5bjbwbxQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtbybzbAbBbCbDbEbFbGaWaVaWaWaCbHbIbJbKbLbMa3a4a5bNbwanbOQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtbPbQbRbSbTadbUaPbVbWaCaBaBaCbXbYbZb0b1b2b3b4aLb5b6b7ananb8QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtb9c.c#cacbcccdbBazcebHbdbXcfbYcgchcicjckb6bMclcmcnanananbOQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtcocpcqcrcsctcucvcwancxbIcycyczbZchcAcBcCcDbwcEarcFcGanananancHQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtcIcJcKcLcMcNcOcPcQcRcSbJcTcUchb0cicVcWcXcYcZc0a5bjbvananananc1QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtc2c3c4c5c6c7crbQc8c9b1d.cicid.d#dadbdcdddedfdgcmdhb7anananandiQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtdjdkdlcJdmdndodpdqdrdsdtdududvcCdwdxdydedzdAc2c2dBananananandiQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQt#YdCdDdEcJdFdGdHdIdJdKcXcXdLdJdMdNdOdzdzdPdQdhb7ananandRdSQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtdTdUdVdldWb5dXdYdZd0d0dNd1d2dzdzdzdzdPdBd3anandid4QtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtd5dTd6bkd7dzdzdzdzdzdzdzdzdzdzdzd8dRd9dSQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQte.e#eaebebebebebebebece#.DQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; unixODBC-2.2.14-p2/odbcinstQ/odbcinstQ.exp0100644000076400007640000000013111163161172016561 0ustar nicknickQTSQLManageDataSources QTSQLCreateDataSources ODBCManageDataSources ODBCCreateDataSource unixODBC-2.2.14-p2/odbcinstQ/SQLManageDataSources.cpp~0100644000076400007640000000403211032156660020732 0ustar nicknick/************************************************** * SQLManageDataSources * ************************************************** * * This library should only be used by odbcinst! * * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 26.OCT.01 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com * Nick Gorham - nick@easysoft.com **************************************************/ #include #ifdef QT_V4LAYOUT #define QT3_SUPPORT #include #include #include #else #include #include #if QT_VERSION<300 #include #endif #endif #include "CODBCConfig.h" #include "CODBCCreate.h" static BOOL SQLManage( HWND hWnd ) { // // This will allow us to call this from a non QT app // if ( !qApp ) { int argc = 1; char *argv[] = { "odbcinstQ", NULL }; static QApplication a( argc, argv ); } QWidget *pwidget = (QWidget*)hWnd; #if QT_VERSION<300 CODBCConfig odbcconfig( pwidget, "ODBCConfig", Qt::WType_Modal ); #else CODBCConfig odbcconfig( pwidget, "ODBCConfig", Qt::WType_Dialog | Qt::WShowModal ); #endif odbcconfig.exec(); return true; } static BOOL SQLCreate( HWND hWnd, LPCSTR dsn ) { // // This will allow us to call this from a non QT app // if ( !qApp ) { int argc = 1; char *argv[] = { "odbcinstQ", NULL }; static QApplication a( argc, argv ); } QWidget *pwidget = (QWidget*)hWnd; #if QT_VERSION<300 CODBCCreate odbccreate( pwidget, "ODBCCreate" ); #else CODBCCreate odbccreate( pwidget, "ODBCCreate" ); #endif odbccreate.setDsn( dsn ); odbccreate.exec(); return odbccreate.getRetCode(); } #ifdef __cplusplus extern "C" { #endif BOOL QTSQLManageDataSources( HWND hWnd ) { return SQLManage( hWnd ); } BOOL QTSQLCreateDataSources( HWND hWnd, LPCSTR lpszDS ) { return SQLCreate( hWnd, lpszDS ); } #ifdef __cplusplus }; #endif unixODBC-2.2.14-p2/odbcinstQ/odbcinstQ.exp~0100644000076400007640000000013111163161157016762 0ustar nicknickQTSQLManageDataSources QTSQLCreateDataSources ODBCManageDataSources ODBCCreateDataSource unixODBC-2.2.14-p2/odbcinstQ4/0040755000076400007640000000000011163161167014215 5ustar nicknickunixODBC-2.2.14-p2/odbcinstQ4/Makefile.am0100644000076400007640000001452111110542012016231 0ustar nicknicklibodbcinstQ4_la_LDFLAGS = \ -no-undefined \ -version-info 1:0:0 \ -export-dynamic \ -export-symbols @srcdir@/odbcinstQ4.exp \ -module if QT4 if QTWIZARD lib_LTLIBRARIES = libodbcinstQ4.la INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) \ -DTHEPREFIX=\"@prefix@\" -DSYSTEM_FILE_PATH=\"@sysconfdir@\" -DDEFLIB_PATH=\"@libdir@\" -DSHLIBEXT=\"@SHLIBEXT@\" $(LTDLINCL) libodbcinstQ4_la_LIBADD = \ $(QT_LDFLAGS) \ $(QT_LIBS) \ ../ini/libinilc.la \ ../DriverManager/libodbc.la \ ../odbcinst/libodbcinst.la libodbcinstQ4_la_DEPENDENCIES = \ ../ini/libinilc.la \ ../DriverManager/libodbc.la \ ../odbcinst/libodbcinst.la CLEANFILES = \ mCAbout.cpp \ mCAdvanced.cpp \ mCDataSourceNameList.cpp \ mCDataSourceNamesFile.cpp \ mCDataSourceNamesFileModel.cpp \ mCDataSourceNames.cpp \ mCDriverList.cpp \ mCDriverPrompt.cpp \ mCDSNWizardProperties.cpp \ mCDSNWizardDriver.cpp \ mCDSNWizardEntre.cpp \ mCDSNWizardFini.cpp \ mCDSNWizard.cpp \ mCDSNWizardType.cpp \ mCFileSelector.cpp \ mCHelp.cpp \ mCManageDataSourceNames.cpp \ mCManageDrivers.cpp \ mCODBCConfig.cpp \ mCPooling.cpp \ mCPropertiesDelegate.cpp \ mCPropertiesDialog.cpp \ mCMonitorHandleCounts.cpp \ mCMonitor.cpp \ mCMonitorProcesses.cpp \ mCThreading.cpp \ mCTracing.cpp libodbcinstQ4_la_SOURCES = \ CAbout.cpp \ CAdvanced.cpp \ CDataSourceNameList.cpp \ CDataSourceNamesFile.cpp \ CDataSourceNamesFileModel.cpp \ CDataSourceNames.cpp \ CDriverList.cpp \ CDriverPrompt.cpp \ CDSNWizardProperties.cpp \ CDSNWizardDriver.cpp \ CDSNWizardEntre.cpp \ CDSNWizardFini.cpp \ CDSNWizard.cpp \ CDSNWizardType.cpp \ CFileSelector.cpp \ CHelp.cpp \ CManageDataSourceNames.cpp \ CManageDrivers.cpp \ CODBCConfig.cpp \ CODBCInst.cpp \ CPage.cpp \ CPooling.cpp \ CPropertiesDelegate.cpp \ CPropertiesDialog.cpp \ CPropertiesModel.cpp \ CMonitorHandleCounts.cpp \ CMonitor.cpp \ CMonitorProcesses.cpp \ CThreading.cpp \ CTracing.cpp \ SQLManageDataSources.cpp \ mCAbout.cpp \ mCAdvanced.cpp \ mCDataSourceNameList.cpp \ mCDataSourceNamesFile.cpp \ mCDataSourceNamesFileModel.cpp \ mCDataSourceNames.cpp \ mCDriverList.cpp \ mCDriverPrompt.cpp \ mCDSNWizardProperties.cpp \ mCDSNWizardDriver.cpp \ mCDSNWizardEntre.cpp \ mCDSNWizardFini.cpp \ mCDSNWizard.cpp \ mCDSNWizardType.cpp \ mCFileSelector.cpp \ mCHelp.cpp \ mCManageDataSourceNames.cpp \ mCManageDrivers.cpp \ mCODBCConfig.cpp \ mCPooling.cpp \ mCPropertiesDelegate.cpp \ mCPropertiesDialog.cpp \ mCMonitorHandleCounts.cpp \ mCMonitor.cpp \ mCMonitorProcesses.cpp \ mCThreading.cpp \ mCTracing.cpp mCAbout.cpp: @srcdir@/CAbout.h @MOC@ @srcdir@/CAbout.h -o mCAbout.cpp mCAdvanced.cpp: @srcdir@/CAdvanced.h @MOC@ @srcdir@/CAdvanced.h -o mCAdvanced.cpp mCDataSourceNameList.cpp: @srcdir@/CDataSourceNameList.h @MOC@ @srcdir@/CDataSourceNameList.h -o mCDataSourceNameList.cpp mCDataSourceNamesFile.cpp: @srcdir@/CDataSourceNamesFile.h @MOC@ @srcdir@/CDataSourceNamesFile.h -o mCDataSourceNamesFile.cpp mCDataSourceNamesFileModel.cpp: @srcdir@/CDataSourceNamesFileModel.h @MOC@ @srcdir@/CDataSourceNamesFileModel.h -o mCDataSourceNamesFileModel.cpp mCDataSourceNames.cpp: @srcdir@/CDataSourceNames.h @MOC@ @srcdir@/CDataSourceNames.h -o mCDataSourceNames.cpp mCDriverList.cpp: @srcdir@/CDriverList.h @MOC@ @srcdir@/CDriverList.h -o mCDriverList.cpp mCDriverPrompt.cpp: @srcdir@/CDriverPrompt.h @MOC@ @srcdir@/CDriverPrompt.h -o mCDriverPrompt.cpp mCDSNWizardProperties.cpp: @srcdir@/CDSNWizardProperties.h @MOC@ @srcdir@/CDSNWizardProperties.h -o mCDSNWizardProperties.cpp mCDSNWizardDriver.cpp: @srcdir@/CDSNWizardDriver.h @MOC@ @srcdir@/CDSNWizardDriver.h -o mCDSNWizardDriver.cpp mCDSNWizardEntre.cpp: @srcdir@/CDSNWizardEntre.h @MOC@ @srcdir@/CDSNWizardEntre.h -o mCDSNWizardEntre.cpp mCDSNWizardFini.cpp: @srcdir@/CDSNWizardFini.h @MOC@ @srcdir@/CDSNWizardFini.h -o mCDSNWizardFini.cpp mCDSNWizard.cpp: @srcdir@/CDSNWizard.h @MOC@ @srcdir@/CDSNWizard.h -o mCDSNWizard.cpp mCDSNWizardType.cpp: @srcdir@/CDSNWizardType.h @MOC@ @srcdir@/CDSNWizardType.h -o mCDSNWizardType.cpp mCFileSelector.cpp: @srcdir@/CFileSelector.h @MOC@ @srcdir@/CFileSelector.h -o mCFileSelector.cpp mCHelp.cpp: @srcdir@/CHelp.h @MOC@ @srcdir@/CHelp.h -o mCHelp.cpp mCManageDataSourceNames.cpp: @srcdir@/CManageDataSourceNames.h @MOC@ @srcdir@/CManageDataSourceNames.h -o mCManageDataSourceNames.cpp mCManageDrivers.cpp: @srcdir@/CManageDrivers.h @MOC@ @srcdir@/CManageDrivers.h -o mCManageDrivers.cpp mCODBCConfig.cpp: @srcdir@/CODBCConfig.h @MOC@ @srcdir@/CODBCConfig.h -o mCODBCConfig.cpp mCPooling.cpp: @srcdir@/CPooling.h @MOC@ @srcdir@/CPooling.h -o mCPooling.cpp mCPropertiesDelegate.cpp: @srcdir@/CPropertiesDelegate.h @MOC@ @srcdir@/CPropertiesDelegate.h -o mCPropertiesDelegate.cpp mCPropertiesDialog.cpp: @srcdir@/CPropertiesDialog.h @MOC@ @srcdir@/CPropertiesDialog.h -o mCPropertiesDialog.cpp mCMonitor.cpp: @srcdir@/CMonitor.h @MOC@ @srcdir@/CMonitor.h -o mCMonitor.cpp mCMonitorHandleCounts.cpp: @srcdir@/CMonitorHandleCounts.h @MOC@ @srcdir@/CMonitorHandleCounts.h -o mCMonitorHandleCounts.cpp mCMonitorProcesses.cpp: @srcdir@/CMonitorProcesses.h @MOC@ @srcdir@/CMonitorProcesses.h -o mCMonitorProcesses.cpp mCThreading.cpp: @srcdir@/CThreading.h @MOC@ @srcdir@/CThreading.h -o mCThreading.cpp mCTracing.cpp: @srcdir@/CTracing.h @MOC@ @srcdir@/CTracing.h -o mCTracing.cpp endif endif EXTRA_DIST = \ CAbout.h \ CAdvanced.h \ CDataSourceNameList.h \ CDataSourceNamesFile.h \ CDataSourceNamesFileModel.h \ CDataSourceNames.h \ CDriverList.h \ CDriverPrompt.h \ CDSNWizardProperties.h \ CDSNWizardDriver.h \ CDSNWizardEntre.h \ CDSNWizardFini.h \ CDSNWizard.h \ CDSNWizardType.h \ CFileSelector.h \ CHelp.h \ CManageDataSourceNames.h \ CManageDrivers.h \ CMonitor.h \ CMonitorHandleCounts.h \ CMonitorProcesses.h \ CODBCConfig.h \ CODBCInst.h \ CPage.h \ CPooling.h \ CPropertiesDelegate.h \ CPropertiesDialog.h \ CPropertiesModel.h \ CThreading.h \ CTracing.h \ About48.xpm \ Advanced48.xpm \ Canada.xpm \ DataSourceName48.xpm \ DataSourceNameFile48.xpm \ DataSourceNameSystem48.xpm \ DataSourceNameUser48.xpm \ Driver128.xpm \ Driver48.xpm \ GreatBritain.xpm \ Info16.xpm \ InfoArrow16.xpm \ NoFlag.xpm \ ODBC.xpm \ Pooling48.xpm \ Set.xpm \ Stats48.xpm \ Threading48.xpm \ Tracing48.xpm \ odbcinstQ4.exp \ ODBCManageDataSources64.xpm \ WizardCreateDataSourceName.xpm unixODBC-2.2.14-p2/odbcinstQ4/Makefile.in0100644000076400007640000010271111111035266016252 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = odbcinstQ4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = am__libodbcinstQ4_la_SOURCES_DIST = CAbout.cpp CAdvanced.cpp \ CDataSourceNameList.cpp CDataSourceNamesFile.cpp \ CDataSourceNamesFileModel.cpp CDataSourceNames.cpp \ CDriverList.cpp CDriverPrompt.cpp CDSNWizardProperties.cpp \ CDSNWizardDriver.cpp CDSNWizardEntre.cpp CDSNWizardFini.cpp \ CDSNWizard.cpp CDSNWizardType.cpp CFileSelector.cpp CHelp.cpp \ CManageDataSourceNames.cpp CManageDrivers.cpp CODBCConfig.cpp \ CODBCInst.cpp CPage.cpp CPooling.cpp CPropertiesDelegate.cpp \ CPropertiesDialog.cpp CPropertiesModel.cpp \ CMonitorHandleCounts.cpp CMonitor.cpp CMonitorProcesses.cpp \ CThreading.cpp CTracing.cpp SQLManageDataSources.cpp \ mCAbout.cpp mCAdvanced.cpp mCDataSourceNameList.cpp \ mCDataSourceNamesFile.cpp mCDataSourceNamesFileModel.cpp \ mCDataSourceNames.cpp mCDriverList.cpp mCDriverPrompt.cpp \ mCDSNWizardProperties.cpp mCDSNWizardDriver.cpp \ mCDSNWizardEntre.cpp mCDSNWizardFini.cpp mCDSNWizard.cpp \ mCDSNWizardType.cpp mCFileSelector.cpp mCHelp.cpp \ mCManageDataSourceNames.cpp mCManageDrivers.cpp \ mCODBCConfig.cpp mCPooling.cpp mCPropertiesDelegate.cpp \ mCPropertiesDialog.cpp mCMonitorHandleCounts.cpp mCMonitor.cpp \ mCMonitorProcesses.cpp mCThreading.cpp mCTracing.cpp @QT4_TRUE@@QTWIZARD_TRUE@am_libodbcinstQ4_la_OBJECTS = CAbout.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CAdvanced.lo CDataSourceNameList.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CDataSourceNamesFile.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CDataSourceNamesFileModel.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CDataSourceNames.lo CDriverList.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CDriverPrompt.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CDSNWizardProperties.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CDSNWizardDriver.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CDSNWizardEntre.lo CDSNWizardFini.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CDSNWizard.lo CDSNWizardType.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CFileSelector.lo CHelp.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CManageDataSourceNames.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CManageDrivers.lo CODBCConfig.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CODBCInst.lo CPage.lo CPooling.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CPropertiesDelegate.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CPropertiesDialog.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CPropertiesModel.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CMonitorHandleCounts.lo CMonitor.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CMonitorProcesses.lo CThreading.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ CTracing.lo SQLManageDataSources.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCAbout.lo mCAdvanced.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNameList.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNamesFile.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNamesFileModel.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNames.lo mCDriverList.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDriverPrompt.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardProperties.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardDriver.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardEntre.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardFini.lo mCDSNWizard.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardType.lo mCFileSelector.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCHelp.lo mCManageDataSourceNames.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCManageDrivers.lo mCODBCConfig.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCPooling.lo mCPropertiesDelegate.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCPropertiesDialog.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCMonitorHandleCounts.lo mCMonitor.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCMonitorProcesses.lo mCThreading.lo \ @QT4_TRUE@@QTWIZARD_TRUE@ mCTracing.lo libodbcinstQ4_la_OBJECTS = $(am_libodbcinstQ4_la_OBJECTS) @QT4_TRUE@@QTWIZARD_TRUE@am_libodbcinstQ4_la_rpath = -rpath $(libdir) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcinstQ4_la_SOURCES) DIST_SOURCES = $(am__libodbcinstQ4_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ libodbcinstQ4_la_LDFLAGS = \ -no-undefined \ -version-info 1:0:0 \ -export-dynamic \ -export-symbols @srcdir@/odbcinstQ4.exp \ -module @QT4_TRUE@@QTWIZARD_TRUE@lib_LTLIBRARIES = libodbcinstQ4.la @QT4_TRUE@@QTWIZARD_TRUE@INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) \ @QT4_TRUE@@QTWIZARD_TRUE@ -DTHEPREFIX=\"@prefix@\" -DSYSTEM_FILE_PATH=\"@sysconfdir@\" -DDEFLIB_PATH=\"@libdir@\" -DSHLIBEXT=\"@SHLIBEXT@\" $(LTDLINCL) @QT4_TRUE@@QTWIZARD_TRUE@libodbcinstQ4_la_LIBADD = \ @QT4_TRUE@@QTWIZARD_TRUE@ $(QT_LDFLAGS) \ @QT4_TRUE@@QTWIZARD_TRUE@ $(QT_LIBS) \ @QT4_TRUE@@QTWIZARD_TRUE@ ../ini/libinilc.la \ @QT4_TRUE@@QTWIZARD_TRUE@ ../DriverManager/libodbc.la \ @QT4_TRUE@@QTWIZARD_TRUE@ ../odbcinst/libodbcinst.la @QT4_TRUE@@QTWIZARD_TRUE@libodbcinstQ4_la_DEPENDENCIES = \ @QT4_TRUE@@QTWIZARD_TRUE@ ../ini/libinilc.la \ @QT4_TRUE@@QTWIZARD_TRUE@ ../DriverManager/libodbc.la \ @QT4_TRUE@@QTWIZARD_TRUE@ ../odbcinst/libodbcinst.la @QT4_TRUE@@QTWIZARD_TRUE@CLEANFILES = \ @QT4_TRUE@@QTWIZARD_TRUE@ mCAbout.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCAdvanced.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNameList.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNamesFile.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNamesFileModel.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNames.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDriverList.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDriverPrompt.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardProperties.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardDriver.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardEntre.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardFini.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizard.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardType.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCFileSelector.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCHelp.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCManageDataSourceNames.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCManageDrivers.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCODBCConfig.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCPooling.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCPropertiesDelegate.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCPropertiesDialog.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCMonitorHandleCounts.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCMonitor.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCMonitorProcesses.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCThreading.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCTracing.cpp @QT4_TRUE@@QTWIZARD_TRUE@libodbcinstQ4_la_SOURCES = \ @QT4_TRUE@@QTWIZARD_TRUE@ CAbout.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CAdvanced.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDataSourceNameList.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDataSourceNamesFile.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDataSourceNamesFileModel.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDataSourceNames.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDriverList.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDriverPrompt.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDSNWizardProperties.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDSNWizardDriver.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDSNWizardEntre.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDSNWizardFini.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDSNWizard.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CDSNWizardType.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CFileSelector.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CHelp.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CManageDataSourceNames.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CManageDrivers.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CODBCConfig.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CODBCInst.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CPage.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CPooling.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CPropertiesDelegate.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CPropertiesDialog.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CPropertiesModel.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CMonitorHandleCounts.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CMonitor.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CMonitorProcesses.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CThreading.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ CTracing.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ SQLManageDataSources.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCAbout.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCAdvanced.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNameList.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNamesFile.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNamesFileModel.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDataSourceNames.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDriverList.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDriverPrompt.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardProperties.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardDriver.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardEntre.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardFini.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizard.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCDSNWizardType.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCFileSelector.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCHelp.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCManageDataSourceNames.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCManageDrivers.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCODBCConfig.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCPooling.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCPropertiesDelegate.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCPropertiesDialog.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCMonitorHandleCounts.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCMonitor.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCMonitorProcesses.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCThreading.cpp \ @QT4_TRUE@@QTWIZARD_TRUE@ mCTracing.cpp EXTRA_DIST = \ CAbout.h \ CAdvanced.h \ CDataSourceNameList.h \ CDataSourceNamesFile.h \ CDataSourceNamesFileModel.h \ CDataSourceNames.h \ CDriverList.h \ CDriverPrompt.h \ CDSNWizardProperties.h \ CDSNWizardDriver.h \ CDSNWizardEntre.h \ CDSNWizardFini.h \ CDSNWizard.h \ CDSNWizardType.h \ CFileSelector.h \ CHelp.h \ CManageDataSourceNames.h \ CManageDrivers.h \ CMonitor.h \ CMonitorHandleCounts.h \ CMonitorProcesses.h \ CODBCConfig.h \ CODBCInst.h \ CPage.h \ CPooling.h \ CPropertiesDelegate.h \ CPropertiesDialog.h \ CPropertiesModel.h \ CThreading.h \ CTracing.h \ About48.xpm \ Advanced48.xpm \ Canada.xpm \ DataSourceName48.xpm \ DataSourceNameFile48.xpm \ DataSourceNameSystem48.xpm \ DataSourceNameUser48.xpm \ Driver128.xpm \ Driver48.xpm \ GreatBritain.xpm \ Info16.xpm \ InfoArrow16.xpm \ NoFlag.xpm \ ODBC.xpm \ Pooling48.xpm \ Set.xpm \ Stats48.xpm \ Threading48.xpm \ Tracing48.xpm \ odbcinstQ4.exp \ ODBCManageDataSources64.xpm \ WizardCreateDataSourceName.xpm all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu odbcinstQ4/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu odbcinstQ4/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcinstQ4.la: $(libodbcinstQ4_la_OBJECTS) $(libodbcinstQ4_la_DEPENDENCIES) $(CXXLINK) $(am_libodbcinstQ4_la_rpath) $(libodbcinstQ4_la_LDFLAGS) $(libodbcinstQ4_la_OBJECTS) $(libodbcinstQ4_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAbout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAdvanced.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDSNWizard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDSNWizardDriver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDSNWizardEntre.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDSNWizardFini.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDSNWizardProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDSNWizardType.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDataSourceNameList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDataSourceNames.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDataSourceNamesFile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDataSourceNamesFileModel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDriverList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDriverPrompt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CFileSelector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CHelp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CManageDataSourceNames.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CManageDrivers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CMonitor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CMonitorHandleCounts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CMonitorProcesses.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CODBCConfig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CODBCInst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CPage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CPooling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CPropertiesDelegate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CPropertiesDialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CPropertiesModel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CThreading.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CTracing.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLManageDataSources.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCAbout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCAdvanced.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDSNWizard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDSNWizardDriver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDSNWizardEntre.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDSNWizardFini.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDSNWizardProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDSNWizardType.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDataSourceNameList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDataSourceNames.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDataSourceNamesFile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDataSourceNamesFileModel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDriverList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCDriverPrompt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCFileSelector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCHelp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCManageDataSourceNames.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCManageDrivers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCMonitor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCMonitorHandleCounts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCMonitorProcesses.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCODBCConfig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCPooling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCPropertiesDelegate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCPropertiesDialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCThreading.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mCTracing.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES @QT4_TRUE@@QTWIZARD_TRUE@mCAbout.cpp: @srcdir@/CAbout.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CAbout.h -o mCAbout.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCAdvanced.cpp: @srcdir@/CAdvanced.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CAdvanced.h -o mCAdvanced.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDataSourceNameList.cpp: @srcdir@/CDataSourceNameList.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDataSourceNameList.h -o mCDataSourceNameList.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDataSourceNamesFile.cpp: @srcdir@/CDataSourceNamesFile.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDataSourceNamesFile.h -o mCDataSourceNamesFile.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDataSourceNamesFileModel.cpp: @srcdir@/CDataSourceNamesFileModel.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDataSourceNamesFileModel.h -o mCDataSourceNamesFileModel.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDataSourceNames.cpp: @srcdir@/CDataSourceNames.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDataSourceNames.h -o mCDataSourceNames.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDriverList.cpp: @srcdir@/CDriverList.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDriverList.h -o mCDriverList.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDriverPrompt.cpp: @srcdir@/CDriverPrompt.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDriverPrompt.h -o mCDriverPrompt.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDSNWizardProperties.cpp: @srcdir@/CDSNWizardProperties.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDSNWizardProperties.h -o mCDSNWizardProperties.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDSNWizardDriver.cpp: @srcdir@/CDSNWizardDriver.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDSNWizardDriver.h -o mCDSNWizardDriver.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDSNWizardEntre.cpp: @srcdir@/CDSNWizardEntre.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDSNWizardEntre.h -o mCDSNWizardEntre.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDSNWizardFini.cpp: @srcdir@/CDSNWizardFini.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDSNWizardFini.h -o mCDSNWizardFini.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDSNWizard.cpp: @srcdir@/CDSNWizard.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDSNWizard.h -o mCDSNWizard.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCDSNWizardType.cpp: @srcdir@/CDSNWizardType.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CDSNWizardType.h -o mCDSNWizardType.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCFileSelector.cpp: @srcdir@/CFileSelector.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CFileSelector.h -o mCFileSelector.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCHelp.cpp: @srcdir@/CHelp.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CHelp.h -o mCHelp.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCManageDataSourceNames.cpp: @srcdir@/CManageDataSourceNames.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CManageDataSourceNames.h -o mCManageDataSourceNames.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCManageDrivers.cpp: @srcdir@/CManageDrivers.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CManageDrivers.h -o mCManageDrivers.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCODBCConfig.cpp: @srcdir@/CODBCConfig.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CODBCConfig.h -o mCODBCConfig.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCPooling.cpp: @srcdir@/CPooling.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CPooling.h -o mCPooling.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCPropertiesDelegate.cpp: @srcdir@/CPropertiesDelegate.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CPropertiesDelegate.h -o mCPropertiesDelegate.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCPropertiesDialog.cpp: @srcdir@/CPropertiesDialog.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CPropertiesDialog.h -o mCPropertiesDialog.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCMonitor.cpp: @srcdir@/CMonitor.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CMonitor.h -o mCMonitor.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCMonitorHandleCounts.cpp: @srcdir@/CMonitorHandleCounts.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CMonitorHandleCounts.h -o mCMonitorHandleCounts.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCMonitorProcesses.cpp: @srcdir@/CMonitorProcesses.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CMonitorProcesses.h -o mCMonitorProcesses.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCThreading.cpp: @srcdir@/CThreading.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CThreading.h -o mCThreading.cpp @QT4_TRUE@@QTWIZARD_TRUE@mCTracing.cpp: @srcdir@/CTracing.h @QT4_TRUE@@QTWIZARD_TRUE@ @MOC@ @srcdir@/CTracing.h -o mCTracing.cpp # 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: unixODBC-2.2.14-p2/odbcinstQ4/CAbout.cpp0100644000076400007640000001056010725407315016076 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CAbout.h" #include "About48.xpm" CAbout::CAbout( QWidget *pwidgetParent ) : QTabWidget( pwidgetParent ) { // introduction to ODBC { QWidget * pwidget = new QWidget( this ); QVBoxLayout * playout = new QVBoxLayout( pwidget ); QTextBrowser * ptextbrowser = new QTextBrowser( pwidget ); playout->addWidget( ptextbrowser ); ptextbrowser->setHtml( "What is ODBC?

Open Database Connectivity (ODBC) is an open specification for providing application developers with a predictable API with which to access Data Sources. Data Sources include SQL Servers and any Data Source with an ODBC Driver.

Why Use ODBC?

Software developers like to code to the ODBC specification because;

  • cross-database API
  • cross-platform API
  • API in their langauge of choice (C/C++)
  • ubiquitous support
  • no purchase required
  • good debugging support
  • good community support
  • knowledge of is relatively common
  • well documented API

Application Users like ODBC for some of the same reasons as Developers but also because;

  • many applications, particularly database appplications, support ODBC
  • easy to administrate
  • all majour databases (and then some) have an ODBC driver
  • an ODBC application can be told to use a different database without having to go to a developer to recode or even rebuild.

Whatever your reason is for using ODBC you can rest assured that you are in good company.

Resources
  • Microsoft - msdn.microsoft.com/library
" ); addTab( pwidget, tr( "ODBC" ) ); } // introduction to unixODBC { QWidget * pwidget = new QWidget( this ); QVBoxLayout * playout = new QVBoxLayout( pwidget ); QTextBrowser * ptextbrowser = new QTextBrowser( pwidget ); playout->addWidget( ptextbrowser ); ptextbrowser->setHtml( "What is unixODBC?

unixODBC is an Open Source, free, implementation of ODBC for non-Microsoft platforms (platforms such as UNIX/Linux/OSX etc). ODBC applications developed on one platform have a very good chance of working on another platform with a simple recompile.

Resources
  • unixODBC - www.unixodbc.org
" ); addTab( pwidget, tr( "unixODBC" ) ); } // introduction to people { QWidget * pwidget = new QWidget( this ); QVBoxLayout * playout = new QVBoxLayout( pwidget ); QTextBrowser * ptextbrowser = new QTextBrowser( pwidget ); playout->addWidget( ptextbrowser ); ptextbrowser->setHtml( "

Nick Gorham (current project lead) and Peter Harvey (founder of unixODBC) are the principle developers of unixODBC. Many others have contributed.

Please see the AUTHORS file in the source distribution for more information.

" ); addTab( pwidget, tr( "People" ) ); } // license { QWidget * pwidget = new QWidget( this ); QVBoxLayout * playout = new QVBoxLayout( pwidget ); QTextBrowser * ptextbrowser = new QTextBrowser( pwidget ); playout->addWidget( ptextbrowser ); ptextbrowser->setHtml( "

unixODBC is Open Source and licensed under GPL and LGPL. Those developing commercial software can safely build upon unixODBC without having to worry about additional licensing and cost issues.

The unixODBC source includes a copy of the relevant license information in the COPYING file.

" ); addTab( pwidget, tr( "License" ) ); } // version { QWidget * pwidget = new QWidget( this ); QVBoxLayout * playout = new QVBoxLayout( pwidget ); QTextBrowser * ptextbrowser = new QTextBrowser( pwidget ); playout->addWidget( ptextbrowser ); ptextbrowser->setHtml( QString( "
unixODBC%1
" ).arg( VERSION ) ); addTab( pwidget, tr( "Version" ) ); } setWindowIcon( QPixmap( xpmAbout48 ) ); setWindowTitle( tr( "About" ) ); } CAbout::~CAbout() { } unixODBC-2.2.14-p2/odbcinstQ4/CAdvanced.cpp0100644000076400007640000000342110733004453016522 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CAdvanced.h" #include "CManageDrivers.h" #include "CPooling.h" #include "CTracing.h" #include "CThreading.h" #include "CPage.h" #include "Advanced48.xpm" CAdvanced::CAdvanced( QWidget *pwidgetParent ) : QTabWidget( pwidgetParent ) { pManageDrivers = new CManageDrivers( this ); pPooling = new CPooling( this ); pTracing = new CTracing( this ); pThreading = new CThreading( this ); CPage *ppageDrivers = new CPage( this, QString::null, pManageDrivers, pManageDrivers->windowIcon(), pManageDrivers->windowHelp() ); CPage *ppagePooling = new CPage( this, QString::null, pPooling, pPooling->windowIcon(), pPooling->windowHelp() ); CPage *ppageTracing = new CPage( this, QString::null, pTracing, pTracing->windowIcon(), pTracing->windowHelp() ); CPage *ppageThreading = new CPage( this, QString::null, pThreading, pThreading->windowIcon(), pThreading->windowHelp() ); addTab( ppageDrivers, tr( "Drivers" ) ); addTab( ppagePooling, tr( "Pooling" ) ); addTab( ppageTracing, tr( "Tracing" ) ); addTab( ppageThreading, tr( "Threading" ) ); connect( pManageDrivers, SIGNAL(signalChanged()), this, SIGNAL(signalChanged()) ); setWindowIcon( QPixmap( xpmAdvanced48 ) ); setWindowTitle( tr( "Advanced" ) ); } CAdvanced::~CAdvanced() { } bool CAdvanced::saveData() { if ( !pManageDrivers->saveData() ) return false; if ( !pPooling->saveData() ) return false; if ( !pTracing->saveData() ) return false; if ( !pThreading->saveData() ) return false; } unixODBC-2.2.14-p2/odbcinstQ4/CDataSourceNameList.cpp0100644000076400007640000003155711057773372020534 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CDataSourceNameList.h" #include "CDriverPrompt.h" #include "CPropertiesDialog.h" #define ODBC_HELP_DSN_NAME "*Unique* DSN name. This is the name you use when using ODBC with applications such as StarOffice. Try to keep unusual characters and spaces out of the name." #define ODBC_HELP_DSN_DESC "DSN description. A long, perhaps more meaningfull name." #define ODBC_HELP_DSN_UNKNOWN "No help for this DSN property. Please check with the vendor of the driver... perhaps their web site" CDataSourceNameList::CDataSourceNameList( QWidget *pwidgetParent, int nSource ) : QTableWidget( pwidgetParent ) { this->nSource = nSource; setToolTip( tr( "list of data source names" ) ); setWhatsThis( tr( "This shows a list of the data source names. Data source names (DSN's) are a convenient way for an application to connect to a data source as the options can be specified in advance, saved, and then used at connect-time by simply referring to the name. Applications which use a DSN to connect also provide a means for the User to easily specify a different data source - simply create the DSN with a same/different driver and options." ) ); QStringList stringlist; setColumnCount( 3 ); setHorizontalHeaderLabels( stringlist << "Name" << "Description" << "Driver" ); setSelectionBehavior( QAbstractItemView::SelectRows ); setSelectionMode( QAbstractItemView::SingleSelection ); verticalHeader()->setVisible( false ); connect( this, SIGNAL(itemDoubleClicked( QTableWidgetItem * )), this, SLOT(slotDoubleClick( QTableWidgetItem * ))); slotLoad(); } CDataSourceNameList::~CDataSourceNameList() { } void CDataSourceNameList::slotAdd() { // odbc.ini INFO QString stringDataSourceName = ""; QString stringDataSourceDescription = ""; QString stringDataSourceDriver = ""; // odbcinst.ini INFO QString stringDriverName = ""; QString stringDriverDescription = ""; QString stringDriverFile = ""; QString stringSetupFile = ""; CDriverPrompt * pDriverPrompt; CPropertiesDialog * pProperties; HODBCINSTPROPERTY hFirstProperty = NULL; HODBCINSTPROPERTY hCurProperty = NULL; char szINI[FILENAME_MAX+1]; pDriverPrompt = new CDriverPrompt( this ); if ( pDriverPrompt->exec() ) { stringDriverName = pDriverPrompt->getFriendlyName(); stringDriverDescription = pDriverPrompt->getDescription(); stringDriverFile = pDriverPrompt->getDriver(); stringSetupFile = pDriverPrompt->getSetup(); stringDataSourceDriver = stringDriverName; delete pDriverPrompt; // // can we call SQLConfigDataSource ? // { int mode; if( nSource == ODBC_USER_DSN ) { sprintf( szINI, "~/.odbc.ini" ); mode = ODBC_ADD_DSN; } else { char b1[ 256 ]; sprintf( szINI, "%s/odbc.ini", odbcinst_system_file_path( b1 )); mode = ODBC_ADD_SYS_DSN; } if ( SQLConfigDataSource( (HWND)1, mode, stringDataSourceDriver.toAscii().data(), "" ) ) { slotLoad(); return; } } // GET PROPERTY LIST FROM DRIVER if ( ODBCINSTConstructProperties( stringDataSourceDriver.toAscii().data(), &hFirstProperty ) != ODBCINST_SUCCESS ) { QMessageBox::information( this, tr( "ODBC Administrator" ), QString( "Could not construct a property list for (%1)" ).arg( stringDataSourceDriver ) ); return; } // ALLOW USER TO EDIT pProperties = new CPropertiesDialog( this, hFirstProperty ); pProperties->setWindowTitle( tr( "Data Source Properties (new)" ) ); if ( pProperties->exec() ) { /* DELETE ENTIRE SECTION IF IT EXISTS (no entry given) */ SQLSetConfigMode( nSource ); if ( SQLWritePrivateProfileString( hFirstProperty->szValue, NULL, NULL, "odbc.ini" ) == FALSE ) { SQLSetConfigMode( ODBC_BOTH_DSN ); delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); CODBCInst::showErrors( this, QString( "Could not write to (%1)" ).arg( szINI ) ); return; } stringDataSourceName = hFirstProperty->szValue; /* ADD ENTRIES; SECTION CREATED ON FIRST CALL */ QString stringName; for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { stringName = hCurProperty->szName; if ( stringName.toUpper() == "DESCRIPTION" ) stringDataSourceDescription = hCurProperty->szValue; SQLWritePrivateProfileString( hFirstProperty->szValue, hCurProperty->szName, hCurProperty->szValue, "odbc.ini" ); } SQLSetConfigMode( ODBC_BOTH_DSN ); } delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); } else delete pDriverPrompt; // RELOAD (slow but safe) slotLoad(); } void CDataSourceNameList::slotEdit() { // odbc.ini INFO QString stringDataSourceName = ""; QString stringDataSourceDescription = ""; QString stringDataSourceDriver = ""; // odbcinst.ini INFO QString stringDriverFile = ""; QString stringSetupFile = ""; QString stringError = ""; CPropertiesDialog * pProperties; HODBCINSTPROPERTY hFirstProperty = NULL; HODBCINSTPROPERTY hCurProperty = NULL; char szEntryNames[4096]; char szProperty[INI_MAX_PROPERTY_NAME+1]; char szValue[INI_MAX_PROPERTY_VALUE+1]; DWORD nErrorCode; char szErrorMsg[101]; char szINI[FILENAME_MAX+1]; int nElement; // HAS THE USER SELECTED SOMETHING QList listSelectedItems = selectedItems(); if ( listSelectedItems.count() ) { int nRow = row( listSelectedItems.at( 0 ) ); stringDataSourceName = item( nRow, 0 )->text(); stringDataSourceDescription = item( nRow, 1 )->text(); stringDataSourceDriver = item( nRow, 2 )->text(); } else { QMessageBox::information( this, tr( "ODBC Administrator" ), "Please select a Data Source from the list first" ); return; } // // can we call SQLConfigDataSource ? // { char attr[ 128 ]; int mode; sprintf( attr, "DSN=%s", stringDataSourceName.toAscii().data() ); /* * add extra null */ attr[ strlen( attr ) ] = '\0'; if( nSource == ODBC_USER_DSN ) { sprintf( szINI, "~/.odbc.ini" ); mode = ODBC_CONFIG_DSN; } else { char b1[ 256 ]; sprintf( szINI, "%s/odbc.ini", odbcinst_system_file_path( b1 )); mode = ODBC_CONFIG_SYS_DSN; } if ( SQLConfigDataSource(( HWND ) 1, mode, stringDataSourceDriver.toAscii().data(), attr )) { SQLSetConfigMode( ODBC_BOTH_DSN ); slotLoad(); return; } SQLSetConfigMode( ODBC_BOTH_DSN ); } // GET PROPERTY LIST FROM DRIVER if ( ODBCINSTConstructProperties( (char*) stringDataSourceDriver.toAscii().data(), &hFirstProperty ) != ODBCINST_SUCCESS ) { CODBCInst::showErrors( this, QString( "Could not construct a property list for (%1)" ).arg( stringDataSourceDriver ) ); return; } // COPY EXISTING VALUES INTO PROPERTIES LIST SQLSetConfigMode( nSource ); ODBCINSTSetProperty( hFirstProperty, "Name", stringDataSourceName.toAscii().data() ); memset( szEntryNames, 0, sizeof( szEntryNames )); SQLGetPrivateProfileString( stringDataSourceName.toAscii().data(), NULL, NULL, szEntryNames, 4090, "odbc.ini" ); // GET ALL ENTRY NAMES FOR THE SELCTED DATA SOURCE for ( nElement = 0; iniElement( szEntryNames, '\0', '\0', nElement, szProperty, 1000 ) == INI_SUCCESS ; nElement++ ) { SQLGetPrivateProfileString( stringDataSourceName.toAscii().data(), szProperty, "", szValue, INI_MAX_PROPERTY_VALUE, szINI ); // GET VALUE FOR EACH ENTRY if ( ODBCINSTSetProperty( hFirstProperty, szProperty, szValue ) == ODBCINST_ERROR ) { ODBCINSTAddProperty( hFirstProperty, szProperty, szValue ); } } SQLSetConfigMode( ODBC_BOTH_DSN ); // ALLOW USER TO EDIT pProperties = new CPropertiesDialog( this, hFirstProperty ); pProperties->setWindowTitle( tr( "Data Source Properties (edit)" ) ); if ( pProperties->exec() ) { SQLSetConfigMode( nSource ); /* DELETE ENTIRE SECTION IF IT EXISTS (given NULL entry) */ if ( SQLWritePrivateProfileString( stringDataSourceName.toAscii().data(), NULL, NULL, "odbc.ini" ) == FALSE ) { SQLSetConfigMode( ODBC_BOTH_DSN ); delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); CODBCInst::showErrors( this, QString( "Could not write to (%1)" ).arg( szINI ) ); return; } stringDataSourceName = hFirstProperty->szValue; /* ADD ENTRIES; SECTION CREATED ON FIRST CALL */ QString stringName; for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { stringName = hCurProperty->szName; if ( stringName.toUpper() == "DESCRIPTION" ) stringDataSourceDescription = hCurProperty->szValue; SQLWritePrivateProfileString( hFirstProperty->szValue, hCurProperty->szName, hCurProperty->szValue, szINI ); } SQLSetConfigMode( ODBC_BOTH_DSN ); } delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); // RELOAD (slow but safe) slotLoad(); } void CDataSourceNameList::slotDelete() { char szINI[FILENAME_MAX+1]; char * pDataSourceName; QString stringError; DWORD nErrorCode; char szErrorMsg[FILENAME_MAX+1]; // GET SELECT DATA SOURCE NAME QList listSelectedItems = selectedItems(); if ( listSelectedItems.count() ) { int nRow = row( listSelectedItems.at( 0 ) ); pDataSourceName = (char *)item( nRow, 0 )->text().toAscii().data(); } else { QMessageBox::information( this, tr( "ODBC Administrator" ), "Please select a Data Source from the list first" ); return; } // DELETE ENTIRE SECTION IF IT EXISTS (given NULL entry) SQLSetConfigMode( nSource ); if ( SQLWritePrivateProfileString( pDataSourceName, NULL, NULL, szINI ) == FALSE ) CODBCInst::showErrors( this, QString( "Could not write property list for (%1)" ).arg( pDataSourceName ) ); SQLSetConfigMode( ODBC_BOTH_DSN ); // RELOAD (slow but safe) slotLoad(); } void CDataSourceNameList::slotLoad() { QString stringError; DWORD nErrorCode; char szErrorMsg[101]; char szINI[FILENAME_MAX+1]; char szSectionNames[4096]; char szSectionName[INI_MAX_OBJECT_NAME+1]; char szDriver[INI_MAX_PROPERTY_VALUE+1]; char szDescription[INI_MAX_PROPERTY_VALUE+1]; int nElement; setRowCount( 0 ); // GET SECTION NAMES (Data Sources) strcpy( szINI, "odbc.ini" ); memset( szSectionNames, 0, sizeof(szSectionNames) ); SQLSetConfigMode( nSource ); if ( SQLGetPrivateProfileString( NULL, NULL, NULL, szSectionNames, 4090, "odbc.ini" ) >= 0 ) { for ( nElement = 0; iniElement( szSectionNames, '\0', '\0', nElement, szSectionName, INI_MAX_OBJECT_NAME ) == INI_SUCCESS ; nElement++ ) { // GET DRIVER AND DESCRIPTION szDriver[0] = '\0'; szDescription[0] = '\0'; #ifdef PLATFORM64 SQLGetPrivateProfileString( szSectionName, "Driver64", "", szDriver, INI_MAX_PROPERTY_VALUE, "odbc.ini" ); if ( szDriver[ 0 ] == '\0' ) { SQLGetPrivateProfileString( szSectionName, "Driver", "", szDriver, INI_MAX_PROPERTY_VALUE, "odbc.ini" ); } #else SQLGetPrivateProfileString( szSectionName, "Driver", "", szDriver, INI_MAX_PROPERTY_VALUE, "odbc.ini" ); #endif SQLGetPrivateProfileString( szSectionName, "Description", "", szDescription, INI_MAX_PROPERTY_VALUE, "odbc.ini" ); QTableWidgetItem *ptablewidgetitem; setRowCount( nElement + 1 ); ptablewidgetitem = new QTableWidgetItem( szSectionName ); ptablewidgetitem->setFlags( Qt::ItemIsSelectable ); setItem( nElement, 0, ptablewidgetitem ); ptablewidgetitem = new QTableWidgetItem( szDescription ); ptablewidgetitem->setFlags( Qt::ItemIsSelectable ); setItem( nElement, 1, ptablewidgetitem ); ptablewidgetitem = new QTableWidgetItem( szDriver ); ptablewidgetitem->setFlags( Qt::ItemIsSelectable ); setItem( nElement, 2, ptablewidgetitem ); } SQLSetConfigMode( ODBC_BOTH_DSN ); } else { SQLSetConfigMode( ODBC_BOTH_DSN ); CODBCInst::showErrors( this, QString( "Could not load %1" ).arg( szINI ) ); } } void CDataSourceNameList::slotDoubleClick( QTableWidgetItem * ) { slotEdit(); } unixODBC-2.2.14-p2/odbcinstQ4/CDataSourceNamesFile.cpp0100644000076400007640000001347311025444222020640 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include #include "CDataSourceNamesFile.h" #include "CDataSourceNamesFileModel.h" #include "CFileSelector.h" #include "DataSourceNameFile48.xpm" #include "Set.xpm" CDataSourceNamesFile::CDataSourceNamesFile( QWidget* pwidgetParent ) : QWidget( pwidgetParent ) { QGridLayout *playout = new QGridLayout; // create the 'Default' and the 'Current' directory widgets... { QGridLayout * playoutDirectories = new QGridLayout; QToolButton * ptoolbuttonDefault = new QToolButton; QToolButton * ptoolbuttonCurrent = new QToolButton; plabelDefault = new QLabel; pFileSelector = new CFileSelector( CFileSelector::FileDSNDirectory, QString::null, false, false ); plabelDefault->setWhatsThis( tr( "used system-wide to determine where to find file based data source names" ) ); pFileSelector->setWhatsThis( tr( "current directory being shown" ) ); ptoolbuttonDefault->setIcon( QIcon( xpmSet ) ); ptoolbuttonCurrent->setIcon( QIcon( xpmSet ) ); ptoolbuttonDefault->setToolTip( tr( "use the Current directory as the Default" ) ); ptoolbuttonCurrent->setToolTip( tr( "change the Current directory" ) ); playoutDirectories->addWidget( new QLabel( tr( "Default:" ) ), 0, 0 ); playoutDirectories->addWidget( plabelDefault, 0, 1 ); playoutDirectories->addWidget( ptoolbuttonDefault, 0, 2 ); playoutDirectories->addWidget( new QLabel( tr( "Current:" ) ), 1, 0 ); playoutDirectories->addWidget( pFileSelector, 1, 1 ); playoutDirectories->addWidget( ptoolbuttonCurrent, 1, 2 ); playout->addLayout( playoutDirectories, 0, 0 ); // start with the default directory... { QString stringDefault = getDefault(); pFileSelector->setText( stringDefault ); plabelDefault->setText( stringDefault ); } connect( ptoolbuttonDefault, SIGNAL(clicked()), this, SLOT(slotSetDefault()) ); connect( ptoolbuttonCurrent, SIGNAL(clicked()), pFileSelector, SLOT(slotInvokeDialog()) ); connect( pFileSelector, SIGNAL(signalChanged()), this, SLOT(slotLoad()) ); } // create the model & view for the file data source names... { pDataSourceNamesFileModel = new CDataSourceNamesFileModel; pListView = new QListView; pListView->setToolTip( tr( "list of file-based data source names" ) ); pListView->setWhatsThis( tr( "This is a list of file-based data source names. File-based data source names are *.dsn files which exist on the file system. These files are read from a default directory at connect time." ) ); pListView->setViewMode( QListView::IconMode ); pListView->setModel( pDataSourceNamesFileModel ); slotLoad(); playout->addWidget( pListView, 1, 0 ); } // create the push buttons to invoke add, edit, and delete of a selected file data source name... { QVBoxLayout *playoutButtons = new QVBoxLayout; QPushButton *ppushbuttonAdd = new QPushButton( tr( "A&dd..." ) ); QPushButton *ppushbuttonConfigure = new QPushButton( tr( "&Configure..." ) ); QPushButton *ppushbuttonRemove = new QPushButton( tr( "&Remove" ) ); playoutButtons->addWidget( ppushbuttonAdd ); playoutButtons->addWidget( ppushbuttonConfigure ); playoutButtons->addWidget( ppushbuttonRemove ); playoutButtons->addStretch( 10 ); playout->addLayout( playoutButtons, 1, 1 ); connect( ppushbuttonAdd, SIGNAL(clicked()), this, SLOT(slotAdd()) ); connect( ppushbuttonConfigure, SIGNAL(clicked()), this, SLOT(slotEdit()) ); connect( ppushbuttonRemove, SIGNAL(clicked()), this, SLOT(slotDelete()) ); } setLayout( playout ); setWindowIcon( QPixmap( xpmDataSourceNameFile48 ) ); setWindowTitle( tr( "File Data Source Names" ) ); } CDataSourceNamesFile::~CDataSourceNamesFile() { delete pDataSourceNamesFileModel; } void CDataSourceNamesFile::slotLoad() { pListView->setRootIndex( pDataSourceNamesFileModel->index( pFileSelector->getText() ) ); } void CDataSourceNamesFile::slotAdd() { pDataSourceNamesFileModel->addDataSourceName( pFileSelector->getText() ); } void CDataSourceNamesFile::slotEdit() { QModelIndexList listSelectedIndexes = pListView->selectionModel()->selectedIndexes(); if ( !listSelectedIndexes.count() ) { QMessageBox::warning( this, tr( "ODBC Administrator" ), tr( "Please select a Data Source Name from the list" ) ); return; } pDataSourceNamesFileModel->editDataSourceName( listSelectedIndexes.at( 0 ) ); } void CDataSourceNamesFile::slotDelete() { QModelIndexList listSelectedIndexes = pListView->selectionModel()->selectedIndexes(); if ( !listSelectedIndexes.count() ) { QMessageBox::warning( this, tr( "ODBC Administrator" ), tr( "Please select a Data Source Name from the list" ) ); return; } pDataSourceNamesFileModel->deleteDataSourceName( listSelectedIndexes.at( 0 ) ); } void CDataSourceNamesFile::slotSetDefault() { if ( SQLWritePrivateProfileString( "ODBC", "FileDSNPath", pFileSelector->getText().toAscii().constData(), "odbcinst.ini" ) == SQL_FALSE ) { CODBCInst::showErrors( this, tr( "Failed to set default. You may lack the elevated privileges usually required to do this." ) ); return; } plabelDefault->setText( getDefault() ); } QString CDataSourceNamesFile::getDefault() { char szDirectory[FILENAME_MAX]; szDirectory[0] = '\0'; _odbcinst_FileINI( szDirectory ); return QString( szDirectory ); } unixODBC-2.2.14-p2/odbcinstQ4/CDataSourceNamesFileModel.cpp0100644000076400007640000002275610725407316021636 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include #include "CDataSourceNamesFileModel.h" #include "CDriverPrompt.h" #include "CPropertiesDialog.h" CDataSourceNamesFileModel::CDataSourceNamesFileModel( QObject *pobjectParent ) : QDirModel( QStringList( "*.dsn" ), QDir::Files, QDir::Name, pobjectParent ) { } CDataSourceNamesFileModel::~CDataSourceNamesFileModel() { } /*! * \brief Adds a file-based Data Source Name to the specified directory. * * Call this method to invoke a process of interacting with the User * to create a new file-based Data Source Name. * * This relies upon the selected driver having a viable setup library. By * viable we mean that it implements ODBCINSTGetProperties. * * \todo Need to look at supporting driver setups which provide their own UI for this. * * \param stringDirectory Input. The directory where we want to create the Data Source Name. * * \return bool * \retval true It was created. * \retval false Failed to create it (or User simply cancelled). * */ bool CDataSourceNamesFileModel::addDataSourceName( const QString &stringDirectory ) { QString stringDriverName; HODBCINSTPROPERTY hFirstProperty = NULL; // ask for a driver... { CDriverPrompt driverprompt; if ( !driverprompt.exec() ) return false; stringDriverName = driverprompt.getFriendlyName(); } // get dsn properties from driver setup... if ( ODBCINSTConstructProperties( stringDriverName.toAscii().data(), &hFirstProperty ) != ODBCINST_SUCCESS ) { QMessageBox::warning( 0, tr( "ODBC Administrator" ), QString( "Could not construct a property list for (%1).\nThis is probably because a viable driver setup library could not be found/used.\nYou may want to try configuring the driver to use a generic setup library." ).arg( stringDriverName ) ); return false; } // allow properties to be edited... { CPropertiesDialog propertiesdialog( 0, hFirstProperty ); propertiesdialog.setWindowTitle( tr( "Data Source Properties (new)" ) ); if ( !propertiesdialog.exec() ) { ODBCINSTDestructProperties( &hFirstProperty ); return false; } } // save properties... { HODBCINSTPROPERTY hCurProperty = NULL; QString stringFileNameAndPath = QString( "%1/%2.dsn" ).arg( stringDirectory ).arg( hFirstProperty->szValue ); // create the file with a section called "ODBC"... if ( !SQLWriteFileDSN( stringFileNameAndPath.toAscii().data(), "ODBC", NULL, NULL ) ) { CODBCInst::showErrors( 0, QString( "Could not write to (%1)" ).arg( stringFileNameAndPath ) ); ODBCINSTDestructProperties( &hFirstProperty ); return false; } // add all of the properties... for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { if ( !SQLWriteFileDSN( stringFileNameAndPath.toAscii().data(), "ODBC", hCurProperty->szName, hCurProperty->szValue ) ) { CODBCInst::showErrors( 0, QString( "Could not write to (%1)" ).arg( stringFileNameAndPath ) ); ODBCINSTDestructProperties( &hFirstProperty ); return false; } } } // free memory used by properties... ODBCINSTDestructProperties( &hFirstProperty ); // refresh file(s) display... refresh( index( stringDirectory ) ); return true; } /*! * \brief Edits Data Source Name specified by modelindex. * * Call this method to invoke a process of interacting with the User * to edit an existing file-based Data Source Name. * * This relies upon the selected driver having a viable setup library. By * viable we mean that it implements ODBCINSTGetProperties. * * \todo Need to look at supporting driver setups which provide their own UI for this. * * \param modelindex Input. Index to a viable Data Source Name file. * * \return bool * \retval true Any changes were saved. * \retval false Failed to edit or save changes (or User simply cancelled). * */ bool CDataSourceNamesFileModel::editDataSourceName( const QModelIndex &modelindex ) { HODBCINSTPROPERTY hFirstProperty = NULL; char szDriver[FILENAME_MAX]; QFileInfo fileinfo = fileInfo( modelindex ); // find out which driver the DSN is using... szDriver[0] = '\0'; if ( !SQLReadFileDSN( fileinfo.absoluteFilePath().toAscii().data(), "ODBC", "DRIVER", szDriver, FILENAME_MAX, NULL ) || strlen( szDriver ) < 1 ) { // the driver is not specified in the DSN file so perhaps we are simply a reference to a regular DSN... // \note me thinks this is creative use of the DSN property with limited practical use char szDsn[FILENAME_MAX]; szDsn[0] = '\0'; if ( SQLReadFileDSN( fileinfo.absoluteFilePath().toAscii().data(), "ODBC", "DSN", szDsn, FILENAME_MAX, NULL ) && strlen( szDsn ) >= 1 ) { UWORD n; SQLGetConfigMode( &n ); SQLSetConfigMode( ODBC_BOTH_DSN ); SQLGetPrivateProfileString( szDsn, "Driver", "", szDriver, sizeof( szDriver ), "odbc.ini" ); SQLSetConfigMode( n ); if ( strlen( szDriver ) < 1 ) { CODBCInst::showErrors( 0, tr( "Unable to extract driver from FILE DSN" ) ); return false; } } else { CODBCInst::showErrors( 0, tr( "Unable to extract driver from FILE DSN" ) ); return false; } } // get properties from drivers setup library... if ( ODBCINSTConstructProperties( szDriver, &hFirstProperty ) != ODBCINST_SUCCESS ) { CODBCInst::showErrors( 0, QString( "Could not construct a property list for (%1)" ).arg( szDriver ) ); return false; } // apply property values from file to properties list... { // set the name property value... ODBCINSTSetProperty( hFirstProperty, "Name", fileinfo.baseName().toAscii().data() ); // set other property values... for ( HODBCINSTPROPERTY hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { char szAttr[ 256 ]; szAttr[ 0 ] = '\0'; if ( SQLReadFileDSN( fileinfo.absoluteFilePath().toAscii().data(), "ODBC", hCurProperty->szName, szAttr, sizeof( szAttr ), NULL )) { ODBCINSTSetProperty( hFirstProperty, hCurProperty->szName, szAttr ); } } } // present properties for editing... { CPropertiesDialog propertiesdialog( 0, hFirstProperty ); propertiesdialog.setWindowTitle( "Data Source Properties (edit)" ); if ( !propertiesdialog.exec() ) { ODBCINSTDestructProperties( &hFirstProperty ); return false; } } // save changes... { if ( !SQLWriteFileDSN( fileinfo.absoluteFilePath().toAscii().data(), "ODBC", NULL, NULL ) ) { CODBCInst::showErrors( 0, QString( "Could not write to (%1)" ).arg( fileinfo.absoluteFilePath() ) ); ODBCINSTDestructProperties( &hFirstProperty ); return false; } for ( HODBCINSTPROPERTY hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { if ( !SQLWriteFileDSN( fileinfo.absoluteFilePath().toAscii().data(), "ODBC", hCurProperty->szName, hCurProperty->szValue )) { CODBCInst::showErrors( 0, QString( "Could not write to file DSN (%1)" ).arg( fileinfo.absoluteFilePath() ) ); ODBCINSTDestructProperties( &hFirstProperty ); return false; } } } // free memory used by properties list... ODBCINSTDestructProperties( &hFirstProperty ); // refresh file(s) display in case we have created a new file (if Name was changed)... refresh( index( fileinfo.absolutePath() ) ); return true; } /*! * \brief Deletes Data Source Name specified by modelindex. * * Call this method to permantly remove the Data Source Name file. * * This relies upon the selected driver having a viable setup library. By * viable we mean that it implements ODBCINSTGetProperties. * * \todo Need to look at supporting driver setups which provide their own UI for this. * * \param modelindex Input. Index to a viable Data Source Name file. * * \return bool * \retval true File deleted. * \retval false Failed delete file - probably a privs issue. * */ bool CDataSourceNamesFileModel::deleteDataSourceName( const QModelIndex &modelindex ) { // \todo we want to refresh with the current root but doing it this way undermines the usefullness of the model QString stringRoot = fileInfo( modelindex ).absolutePath(); // delete the file... if ( unlink( filePath( modelindex ).toAscii().data() ) ) { QMessageBox::critical( 0, tr( "ODBC Administrator" ), QString( "Unable to unlink %1" ).arg( filePath( modelindex ) ) ); return false; } // refresh file(s) display... refresh( index( stringRoot ) ); return true; } unixODBC-2.2.14-p2/odbcinstQ4/CDataSourceNames.cpp0100644000076400007640000000517410725407316020050 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CDataSourceNames.h" #include "CDataSourceNameList.h" #include "DataSourceNameUser48.xpm" #include "DataSourceNameSystem48.xpm" CDataSourceNames::CDataSourceNames( QWidget* pwidgetParent, int nSource ) : QWidget( pwidgetParent ) { Q_ASSERT( (nSource == ODBC_USER_DSN || nSource == ODBC_SYSTEM_DSN) ); this->nSource = nSource; pDataSourceNameList = new CDataSourceNameList( this, nSource ); QPushButton *ppushbuttonAdd = new QPushButton( tr( "A&dd..." ) ); ppushbuttonAdd->setToolTip( tr( "click to add a data source name" ) ); ppushbuttonAdd->setWhatsThis( tr( "Click this to add a data source name. A registered driver is selected then an attempt is made to load the drivers setup code. The drivers setup should support the unixODBC setup feature." ) ); QPushButton *ppushbuttonConfigure = new QPushButton( tr( "&Configure..." ) ); ppushbuttonConfigure->setToolTip( tr( "click to configure the selected data source name" ) ); ppushbuttonConfigure->setWhatsThis( tr( "Click to edit the data source name properties." ) ); QPushButton *ppushbuttonRemove = new QPushButton( tr( "&Remove" ) ); ppushbuttonRemove->setToolTip( tr( "click to remove the selected data source name" ) ); ppushbuttonRemove->setWhatsThis( tr( "Click to remove the select data source name." ) ); QHBoxLayout *playout = new QHBoxLayout; QVBoxLayout *playoutButtons = new QVBoxLayout; playoutButtons->addWidget( ppushbuttonAdd ); playoutButtons->addWidget( ppushbuttonConfigure ); playoutButtons->addWidget( ppushbuttonRemove ); playoutButtons->addStretch( 10 ); playout->addWidget( pDataSourceNameList ); playout->addLayout( playoutButtons ); setLayout( playout ); connect( ppushbuttonAdd, SIGNAL(clicked()), pDataSourceNameList, SLOT(slotAdd()) ); connect( ppushbuttonConfigure, SIGNAL(clicked()), pDataSourceNameList, SLOT(slotEdit()) ); connect( ppushbuttonRemove, SIGNAL(clicked()), pDataSourceNameList, SLOT(slotDelete()) ); if ( nSource == ODBC_USER_DSN ) { setWindowIcon( QPixmap( xpmDataSourceNameUser48 ) ); setWindowTitle( tr( "User Data Source Names" ) ); } else { setWindowIcon( QPixmap( xpmDataSourceNameSystem48 ) ); setWindowTitle( tr( "System Data Source Names" ) ); } } CDataSourceNames::~CDataSourceNames() { } void CDataSourceNames::slotLoad() { pDataSourceNameList->slotLoad(); } unixODBC-2.2.14-p2/odbcinstQ4/CDriverList.cpp0100644000076400007640000013000611060002601017067 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include #include "CDriverList.h" #include "CPropertiesDialog.h" #define ODBC_HELP_DRIVER_NAME "*Unique* driver name." #define ODBC_HELP_DRIVER_DESC "Driver description." #define ODBC_HELP_DRIVER_DRIVER "The driver. Its a share library and the filename will probably have odbc in it and it will probably end with *.so." #define ODBC_HELP_DRIVER_DRIVER64 "The driver for 64 bit environments. Its a share library and the filename will probably have odbc in it and it will probably end with *.so." #define ODBC_HELP_DRIVER_SETUP "The setup routines. Its a share library used to provide this program with DSN properties which can be presented to the user to edit. This library filename usually ends with a *S.so." #define ODBC_HELP_DRIVER_SETUP64 "The setup routines for 64 bit environments. Its a share library used to provide this program with DSN properties which can be presented to the user to edit. This library filename usually ends with a *S.so." #define ODBC_HELP_DRIVER_USAGECOUNT "The number of installs that use this driver. This driver entry should be removed when < 1." #define ODBC_HELP_DRIVER_CPTIMEOUT "Number of seconds before a connection timesout when in a Connection Pool. Leave this value blank to disable Connection Pooling. 0-n (0=default)." #define ODBC_HELP_DRIVER_CPTIMETOLIVE "Max number of seconds a pooled connection may be used. 0-n (0=default)." #define ODBC_HELP_DRIVER_CPREUSE "The maximum number of times a connection can be reused in a Connection Pool. Set to a lower number when dealing with drivers which have stability issues or memory leaks." #define ODBC_HELP_DRIVER_CPPROBE "A simple, benign, SQL statement which can be used to verify that the connection is still valid. Text (empty=default)." #define ODBC_HELP_DRIVER_DGF "Enable/Disable use of SQLGetFunctions by DM. 0-1 (0=default)." #define ODBC_HELP_DRIVER_DLCLOSE "Enable to tell DM to skip explicit unload request of driver. 0-1 (1=default)." #define ODBC_HELP_DRIVER_FETCHMAP "Enable/Disable SQLFetch -> SQLExtendedFetch mapping. 0-1 (1=default)." #define ODBC_HELP_DRIVER_THREADING "Thread level: 0-3 (3=default)." #define ODBC_HELP_DRIVER_FAKEUNICODE "Fake UNICODE: 0-1 (0=default)." #define ODBC_HELP_DRIVER_ICONV "Iconv option. Default is set at build time and is usually 'auto-search'." #define ODBC_HELP_DRIVER_TRACE "Turn trace on/off. 0-1 (0=default)." #define ODBC_HELP_DRIVER_TRACEFILE "Place to write trace output (/tmp/Trace.txt=default)." #define ODBC_HELP_DRIVER_TRACELIBRARY "Library to create trace output (odbctrac=default)." #define ODBC_HELP_DRIVER_UNKNOWN "No help for this driver specific property. Please check with the vendor of the driver... perhaps their web site" CDriverList::CDriverList( QWidget* pwidgetParent ) : QTableWidget( pwidgetParent ) { setToolTip( tr( "list of registered drivers" ) ); setWhatsThis( tr( "This is a list of registered drivers. Registered drivers are drivers which the Driver Manager knows about. A well behaved driver installer will automatically register a driver - but not all driver installers do this last step. If you know your driver is installed but is not registered here then it can be registered manually providing you knwo the file names." ) ); QStringList stringlistHeaderLabels; setColumnCount( 4 ); setHorizontalHeaderLabels( stringlistHeaderLabels << tr( "Name" ) << tr( "Description" ) << tr( "Driver" ) << tr( "Setup" ) ); setSelectionBehavior( QAbstractItemView::SelectRows ); setSelectionMode( QAbstractItemView::SingleSelection ); verticalHeader()->setVisible( false ); connect( this, SIGNAL(itemDoubleClicked( QTableWidgetItem * )), this, SLOT(slotDoubleClick( QTableWidgetItem * ))); slotLoad(); } CDriverList::~CDriverList() { } QString CDriverList::getFriendlyName() { QList listSelectedItems = selectedItems(); if ( !listSelectedItems.count() ) return QString::null; return item( row( listSelectedItems.at( 0 ) ), 0 )->text(); } QString CDriverList::getDescription() { QList listSelectedItems = selectedItems(); if ( !listSelectedItems.count() ) return QString::null; return item( row( listSelectedItems.at( 0 ) ), 1 )->text(); } QString CDriverList::getDriver() { QList listSelectedItems = selectedItems(); if ( !listSelectedItems.count() ) return QString::null; return item( row( listSelectedItems.at( 0 ) ), 2 )->text(); } QString CDriverList::getSetup() { QList listSelectedItems = selectedItems(); if ( !listSelectedItems.count() ) return QString::null; return item( row( listSelectedItems.at( 0 ) ), 3 )->text(); } void CDriverList::slotAdd() { HODBCINSTPROPERTY hFirstProperty = NULL; HODBCINSTPROPERTY hCurProperty = NULL; HODBCINSTPROPERTY hLastProperty; // SET UP PROPERTIES LIST hFirstProperty = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); memset( hFirstProperty, 0, sizeof(ODBCINSTPROPERTY) ); hFirstProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hFirstProperty->pNext = NULL; hFirstProperty->bRefresh = 0; hFirstProperty->hDLL = NULL; hFirstProperty->pWidget = NULL; hFirstProperty->pszHelp = strdup( ODBC_HELP_DRIVER_NAME ); hFirstProperty->aPromptData = NULL; strncpy( hFirstProperty->szName, "Name", INI_MAX_PROPERTY_NAME ); strcpy( hFirstProperty->szValue, "" ); hLastProperty = hFirstProperty; hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DESC ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "Description", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "" ); /* * Don't have a deflib for 64 bit, the user may not want a driver entry, just a driver64 */ #ifdef PLATFORM64 #undef DEFLIB_PATH #endif hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DRIVER ); strncpy( hLastProperty->szName, "Driver", INI_MAX_PROPERTY_NAME ); #ifdef DEFLIB_PATH strncpy( hLastProperty->szValue, DEFLIB_PATH, INI_MAX_PROPERTY_VALUE ); #else strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); #endif hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DRIVER64 ); strncpy( hLastProperty->szName, "Driver64", INI_MAX_PROPERTY_NAME ); #ifdef DEFLIB_PATH strncpy( hLastProperty->szValue, DEFLIB_PATH, INI_MAX_PROPERTY_VALUE ); #else strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); #endif hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_SETUP ); strncpy( hLastProperty->szName, "Setup", INI_MAX_PROPERTY_NAME ); #ifdef DEFLIB_PATH strncpy( hLastProperty->szValue, DEFLIB_PATH, INI_MAX_PROPERTY_VALUE ); #else strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); #endif hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_SETUP64 ); strncpy( hLastProperty->szName, "Setup64", INI_MAX_PROPERTY_NAME ); #ifdef DEFLIB_PATH strncpy( hLastProperty->szValue, DEFLIB_PATH, INI_MAX_PROPERTY_VALUE ); #else strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); #endif hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_USAGECOUNT ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "UsageCount", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "1" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_CPTIMEOUT ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "CPTimeout", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "0" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_CPTIMETOLIVE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "CPTimeToLive", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "0" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_CPPROBE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "CPProbe", INI_MAX_PROPERTY_NAME ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DGF ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "DisableGetFunctions", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "0" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DLCLOSE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "DontDLCLose", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "1" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_FETCHMAP ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "ExFetchMapping", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "1" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_THREADING ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "Threading", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "3" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_FAKEUNICODE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "FakeUnicode", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "0" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_ICONV ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "IconvEncoding", INI_MAX_PROPERTY_NAME ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_TRACE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "Trace", INI_MAX_PROPERTY_NAME ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_TRACEFILE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "TraceFile", INI_MAX_PROPERTY_NAME ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_TRACELIBRARY ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "TraceLibrary", INI_MAX_PROPERTY_NAME ); // present properties for editing... { CPropertiesDialog propertiesdialog( this, hFirstProperty ); propertiesdialog.setWindowTitle( tr( "Driver Properties (new)" ) ); if ( !propertiesdialog.exec() ) { ODBCINSTDestructProperties( &hFirstProperty ); return; } } // save changes... { // get our ini file char szINI[FILENAME_MAX+1]; char b1[ 256 ], b2[ 256 ]; sprintf( szINI, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b1 ) ); // ensure section does not exist... if ( SQLWritePrivateProfileString( hFirstProperty->szValue, NULL, NULL, szINI ) == FALSE ) { ODBCINSTDestructProperties( &hFirstProperty ); CODBCInst::showErrors( this, QString( "Could not write to (%1)\nYou probably need to do this while logged in as root." ).arg( szINI ) ); return; } // create section (first call) and add key/value pairs... for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { SQLWritePrivateProfileString( hFirstProperty->szValue, hCurProperty->szName, hCurProperty->szValue, szINI ); } // free mem used by properties... ODBCINSTDestructProperties( &hFirstProperty ); // announce that we have revised driver information... emit signalChanged(); } // reload to pickup any changes (including any we may not know about)... slotLoad(); } void CDriverList::slotEdit() { QString stringName = ""; CPropertiesDialog * pProperties; HODBCINSTPROPERTY hFirstProperty = NULL; HODBCINSTPROPERTY hCurProperty = NULL; HODBCINSTPROPERTY hLastProperty; HINI hIni; char szINI[FILENAME_MAX+1]; char b1[ 256 ], b2[ 256 ]; sprintf( szINI, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b1 ) ); QList listSelectedItems = selectedItems(); if ( listSelectedItems.count() ) stringName = item( row( listSelectedItems.at( 0 ) ), 0 )->text(); else { QMessageBox::warning( this, tr( "ODBC Administrator" ), "Please select a Driver from the list first." ); return; } // SET UP PROPERTIES LIST STARTING WITH MANDATORY PROPERTIES hFirstProperty = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); memset( hFirstProperty, 0, sizeof(ODBCINSTPROPERTY) ); hFirstProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hFirstProperty->pNext = NULL; hFirstProperty->bRefresh = 0; hFirstProperty->hDLL = NULL; hFirstProperty->pWidget = NULL; hFirstProperty->pszHelp = strdup( ODBC_HELP_DRIVER_NAME ); hFirstProperty->aPromptData = NULL; strncpy( hFirstProperty->szName, "Name", INI_MAX_PROPERTY_NAME ); strcpy( hFirstProperty->szValue, stringName.toAscii().data() ); hLastProperty = hFirstProperty; hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DESC ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "Description", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "" ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DRIVER ); strncpy( hLastProperty->szName, "Driver", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DRIVER64 ); strncpy( hLastProperty->szName, "Driver64", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_SETUP ); strncpy( hLastProperty->szName, "Setup", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_SETUP64 ); strncpy( hLastProperty->szName, "Setup64", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->aPromptData = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_USAGECOUNT ); strncpy( hLastProperty->szName, "UsageCount", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "1" ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_CPTIMEOUT ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "CPTimeout", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "0" ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_CPTIMETOLIVE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "CPTimeToLive", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "0" ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); /* hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_CPREUSE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "CPReuse", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "0" ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); */ hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DGF ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "DisableGetFunctions", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "0" ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_DLCLOSE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "DontDLCLose", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "1" ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_FETCHMAP ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "ExFetchMapping", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "1" ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_THREADING ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "Threading", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "3" ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_FAKEUNICODE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "FakeUnicode", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "0" ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_ICONV ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "IconvEncoding", INI_MAX_PROPERTY_NAME ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_TRACE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "Trace", INI_MAX_PROPERTY_NAME ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_TRACEFILE ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "TraceFile", INI_MAX_PROPERTY_NAME ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_TRACELIBRARY ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, "TraceLibrary", INI_MAX_PROPERTY_NAME ); SQLGetPrivateProfileString( stringName.toAscii().data(), hLastProperty->szName, "", hLastProperty->szValue, sizeof(hLastProperty->szValue)-1, szINI ); // ACCEPT ANY DRIVER SPECIFIC PROPERTIES THAT HAVE BEEN TYPED IN MANUALLY OR INSTALLED // NOTE: This is a quick enhancement. Much room to optimize this func. { char szDriverName[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szPropertyNameUpper[INI_MAX_PROPERTY_NAME+1]; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; strcpy( szDriverName, stringName.toAscii().data() ); if ( iniOpen( &hIni, szINI, (char*)"#;", '[', ']', '=', TRUE ) != INI_ERROR ) { if ( iniObjectSeek( hIni, szDriverName ) == INI_SUCCESS ) { while ( iniPropertyEOL( hIni ) == FALSE ) { iniProperty( hIni, szPropertyName ); iniProperty( hIni, szPropertyNameUpper ); iniToUpper( szPropertyNameUpper ); if ( strncmp( szPropertyNameUpper, "NAME", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "DESCRIPTION", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "DRIVER", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "DRIVER64", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "SETUP", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "SETUP64", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "USAGECOUNT", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "CPTIMEOUT", INI_MAX_PROPERTY_NAME ) != 0 && /* strncmp( szPropertyNameUpper, "CPREUSE", INI_MAX_PROPERTY_NAME ) != 0 && */ strncmp( szPropertyNameUpper, "CPTIMETOLIVE", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "CPPROBE", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "DISABLEGETFUNCTIONS", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "DONTDLCLOSE", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "EXFETCHMAPPING", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "THREADING", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "FAKEUNICODE", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "ICONVENCODING", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "TRACE", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "TRACEFILE", INI_MAX_PROPERTY_NAME ) != 0 && strncmp( szPropertyNameUpper, "TRACELIBRARY", INI_MAX_PROPERTY_NAME ) != 0 ) { iniValue( hIni, szPropertyValue ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pNext = NULL; hLastProperty->bRefresh = 0; hLastProperty->hDLL = NULL; hLastProperty->pWidget = NULL; hLastProperty->pszHelp = strdup( ODBC_HELP_DRIVER_UNKNOWN ); hLastProperty->aPromptData = NULL; strncpy( hLastProperty->szName, szPropertyName, INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, szPropertyValue, sizeof(hLastProperty->szValue)-1 ); } iniPropertyNext( hIni ); } } iniClose( hIni ); } } // ALLOW USER TO EDIT pProperties = new CPropertiesDialog( this, hFirstProperty ); pProperties->setWindowTitle( tr( "Driver Properties (edit)" ) ); if ( pProperties->exec() ) { /* DELETE ENTIRE SECTION IF IT EXISTS (no entry given) */ if ( SQLWritePrivateProfileString( stringName.toAscii().data(), NULL, NULL, szINI ) == FALSE ) { delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); CODBCInst::showErrors( this, QString( "Could not write to (%1).\nYou probably need to do this while logged in as root." ).arg( szINI ) ); return; } /* ADD ENTRIES; SECTION CREATED ON FIRST CALL */ for ( hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { SQLWritePrivateProfileString( hFirstProperty->szValue, hCurProperty->szName, hCurProperty->szValue, szINI ); } emit signalChanged(); } delete pProperties; ODBCINSTDestructProperties( &hFirstProperty ); // RELOAD (slow but safe) slotLoad(); } void CDriverList::slotDelete() { HINI hIni; char szINI[FILENAME_MAX+1]; QString stringName; char b1[ 256 ], b2[ 256 ]; sprintf( szINI, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b1 ) ); // GET SELECT DATA SOURCE NAME QList listSelectedItems = selectedItems(); if ( listSelectedItems.count() ) stringName = item( row( listSelectedItems.at( 0 ) ), 0 )->text(); else { QMessageBox::warning( this, tr( "ODBC Administrator" ), "Please select a Driver from the list first" ); return; } // DELETE ENTIRE SECTION IF IT EXISTS (given NULL entry) if ( SQLWritePrivateProfileString( stringName.toAscii().data(), NULL, NULL, szINI ) == FALSE ) CODBCInst::showErrors( this, QString( "Could not write property list for (%1)" ).arg( stringName ) ); emit signalChanged(); // RELOAD (slow but safe) slotLoad(); } void CDriverList::slotLoad() { HINI hIni; char szINI[FILENAME_MAX+1]; char szDriverName[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szDescription[INI_MAX_PROPERTY_VALUE+1]; char szDriver[INI_MAX_PROPERTY_VALUE+1]; char szDriver64[INI_MAX_PROPERTY_VALUE+1]; char szSetup[INI_MAX_PROPERTY_VALUE+1]; char szSetup64[INI_MAX_PROPERTY_VALUE+1]; int nRow = 0; char b1[ 256 ], b2[ 256 ]; setRowCount( 0 ); sprintf( szINI, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b1 ) ); if ( iniOpen( &hIni, szINI, (char*)"#;", '[', ']', '=', TRUE ) != INI_ERROR ) { iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { *szDriverName = '\0'; *szDescription = '\0'; *szDriver = '\0'; *szDriver64 = '\0'; *szSetup64 = '\0'; *szSetup = '\0'; iniObject( hIni, szDriverName ); iniPropertyFirst( hIni ); if ( strcmp( szDriverName, "ODBC" ) == 0 ) { iniObjectNext( hIni ); continue; } while ( iniPropertyEOL( hIni ) == FALSE ) { iniProperty( hIni, szPropertyName ); iniToUpper( szPropertyName ); if ( strncmp( szPropertyName, "DESCRIPTION", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDescription ); #ifdef PLATFORM64 if ( strncmp( szPropertyName, "DRIVER64", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDriver64 ); if ( strncmp( szPropertyName, "DRIVER", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDriver ); if ( strncmp( szPropertyName, "SETUP64", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szSetup64 ); if ( strncmp( szPropertyName, "SETUP", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szSetup ); #else if ( strncmp( szPropertyName, "DRIVER", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szDriver ); if ( strncmp( szPropertyName, "SETUP", INI_MAX_PROPERTY_NAME ) == 0 ) iniValue( hIni, szSetup ); #endif iniPropertyNext( hIni ); } #ifdef PLATFORM64 if ( szDriver64[ 0 ] != '\0' ) strcpy( szDriver, szDriver64 ); if ( szSetup64[ 0 ] != '\0' ) strcpy( szSetup, szSetup64 ); #endif QTableWidgetItem *ptablewidgetitem; setRowCount( nRow + 1 ); ptablewidgetitem = new QTableWidgetItem( szDriverName ); ptablewidgetitem->setFlags( Qt::ItemIsSelectable ); setItem( nRow, 0, ptablewidgetitem ); ptablewidgetitem = new QTableWidgetItem( szDescription ); ptablewidgetitem->setFlags( Qt::ItemIsSelectable ); setItem( nRow, 1, ptablewidgetitem ); ptablewidgetitem = new QTableWidgetItem( szDriver ); ptablewidgetitem->setFlags( Qt::ItemIsSelectable ); setItem( nRow, 2, ptablewidgetitem ); ptablewidgetitem = new QTableWidgetItem( szSetup ); ptablewidgetitem->setFlags( Qt::ItemIsSelectable ); setItem( nRow, 3, ptablewidgetitem ); nRow++; iniObjectNext( hIni ); } iniClose( hIni ); } else CODBCInst::showErrors( this, QString( "Could not open system file at %1" ).arg( szINI ) ); } void CDriverList::slotDoubleClick( QTableWidgetItem * ) { slotEdit(); } unixODBC-2.2.14-p2/odbcinstQ4/CDriverPrompt.cpp0100644000076400007640000000415510725407316017465 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CDriverPrompt.h" #include "CDriverList.h" #include "ODBC.xpm" CDriverPrompt::CDriverPrompt( QWidget *pwidgetParent ) : QDialog( pwidgetParent ) { QVBoxLayout * playout = new QVBoxLayout; QLabel * pLabel = new QLabel( tr( "Select a driver for which you want to set up a data source..." ) ); QDialogButtonBox * pdialogbuttonbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help ); pDriverList = new CDriverList; playout->addWidget( pLabel ); playout->addWidget( pDriverList ); playout->addWidget( pdialogbuttonbox ); connect( pdialogbuttonbox, SIGNAL(accepted()), this, SLOT(slotOk()) ); connect( pdialogbuttonbox, SIGNAL(rejected()), this, SLOT(reject()) ); setLayout( playout ); setWindowTitle( tr( "Create New Data Source..." ) ); setWindowIcon( QPixmap( xpmODBC ) ); doLoadState(); } CDriverPrompt::~CDriverPrompt() { doSaveState(); } QString CDriverPrompt::getFriendlyName() { return pDriverList->getFriendlyName(); } QString CDriverPrompt::getDescription() { return pDriverList->getDescription(); } QString CDriverPrompt::getDriver() { return pDriverList->getDriver(); } QString CDriverPrompt::getSetup() { return pDriverList->getSetup(); } void CDriverPrompt::slotOk() { if ( getFriendlyName().isEmpty() ) QMessageBox::information( this, tr( "ODBC Administrator" ), tr( "please select a Driver" ) ); else accept(); } void CDriverPrompt::doLoadState() { QSettings settings; int nW = settings.value( "CDriverPrompt/w", geometry().width() ).toInt(); int nH = settings.value( "CDriverPrompt/h", geometry().height() ).toInt(); resize( nW, nH ); } void CDriverPrompt::doSaveState() { QSettings settings; settings.setValue( "CDriverPrompt/w", width() ); settings.setValue( "CDriverPrompt/h", height() ); } unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizardProperties.cpp0100644000076400007640000000534410725407315020712 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include "CDSNWizardProperties.h" #include "CDSNWizard.h" #include "CPropertiesModel.h" #include "CPropertiesDelegate.h" CDSNWizardProperties::CDSNWizardProperties( CDSNWizardData *pWizardData, QWidget *pwidgetParent ) : QWizardPage( pwidgetParent ) { this->pWizardData = pWizardData; QVBoxLayout *pLayout = new QVBoxLayout( this ); pPropertiesModel = 0; pPropertiesDelegate = new CPropertiesDelegate; pTableView = new QTableView; pTableView->setItemDelegateForColumn ( 1, pPropertiesDelegate ); pTableView->verticalHeader()->hide(); pLayout->addWidget( pTableView, 10 ); setTitle( tr( "Properties" ) ); } CDSNWizardProperties::~CDSNWizardProperties() { // free up memory associated with this page (model, delegate, and property list)... cleanupPage(); if ( pPropertiesDelegate ) delete pPropertiesDelegate; } int CDSNWizardProperties::nextId() const { // at this point pWizardData is loaded up... return CDSNWizard::PageFini; } void CDSNWizardProperties::initializePage() { pPropertiesModel = new CPropertiesModel( 0, pWizardData->hFirstProperty ); pTableView->setModel( pPropertiesModel ); } void CDSNWizardProperties::cleanupPage() { // always free up our property list here because we may end up with a different stringDriver... pTableView->setModel( 0 ); if ( pPropertiesModel ) delete pPropertiesModel; pPropertiesModel = 0; if ( pWizardData->hFirstProperty ) ODBCINSTDestructProperties( &pWizardData->hFirstProperty ); } bool CDSNWizardProperties::validatePage() { // handle case where we did not ODBCINSTConstructProperties()... if ( !pWizardData->hFirstProperty ) { QMessageBox::warning( this, tr( "Page Validate" ), tr( "Sorry; can no proceed without a viable property list. Possible installation/configuration issue - please contact your SysAdmin or driver vendor (or select a different driver)." ) ); return false; } // the first property is always Name... ensure we have one... QString stringName( pWizardData->hFirstProperty->szValue ); stringName = stringName.simplified(); if ( stringName.isEmpty() ) { QMessageBox::warning( this, tr( "Page Validate" ), tr( "Please specify a Name." ) ); return false; } // do the User a favour - remove extra white space (if any)... strcpy( pWizardData->hFirstProperty->szValue, stringName.toAscii().data() ); // driver is also mandatory but its a readonly property picked up from previous page - so we have one return true; } unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizardDriver.cpp0100644000076400007640000000342310725407315020005 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CDSNWizardDriver.h" #include "CDSNWizard.h" #include "CDriverList.h" CDSNWizardDriver::CDSNWizardDriver( CDSNWizardData *pWizardData, QWidget *pwidgetParent ) : QWizardPage( pwidgetParent ) { this->pWizardData = pWizardData; QVBoxLayout *playout = new QVBoxLayout( this ); pDriverList = new CDriverList; playout->addWidget( pDriverList ); setTitle( tr( "Driver" ) ); } int CDSNWizardDriver::nextId() const { pWizardData->stringDriver = pDriverList->getFriendlyName(); return CDSNWizard::PageProperties; } void CDSNWizardDriver::initializePage() { } void CDSNWizardDriver::cleanupPage() { pWizardData->stringDriver = QString::null; } bool CDSNWizardDriver::validatePage() { if ( pDriverList->getFriendlyName().isEmpty() ) { QMessageBox::warning( this, tr( "Page Validate" ), tr( "Please select a Driver." ) ); return false; } // the following assumptions are made here; // - this method is only called just before going to next page // - next page cleanUp() will destruct property list (before we can come back here) // - no other validation checks, in this method, are placed after this if ( ODBCINSTConstructProperties( pDriverList->getFriendlyName().toAscii().data(), &pWizardData->hFirstProperty ) != ODBCINST_SUCCESS ) { CODBCInst::showErrors( this, QString( "Could not construct a property list for (%1). Contact your; SysAdmin, driver vendor, or folks at the unixODBC project for support." ).arg( pDriverList->getFriendlyName() ) ); return false; } return true; } unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizardEntre.cpp0100644000076400007640000000213110725407315017622 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include "CDSNWizardEntre.h" #include "CDSNWizard.h" CDSNWizardEntre::CDSNWizardEntre( CDSNWizardData *pWizardData, QWidget *pwidgetParent ) : QWizardPage( pwidgetParent ) { this->pWizardData = pWizardData; QHBoxLayout * pLayout = new QHBoxLayout( this ); QTextBrowser * pTextBrowser = new QTextBrowser; pTextBrowser->setHtml( "

This is the Create Data Source Name Wizard.

A Data Source Name (DSN) is a convenient way to connect to a data source since the connect options can be set in advance and simply reused, by name, during a connect.

This wizard will guide you through the process of creating a new Data Source Name.

" ); pLayout->addWidget( pTextBrowser ); setTitle( tr( "Introduction" ) ); } int CDSNWizardEntre::nextId() const { return CDSNWizard::PageType; } void CDSNWizardEntre::initializePage() { } void CDSNWizardEntre::cleanupPage() { } unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizardFini.cpp0100644000076400007640000000153210725407315017436 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include "CDSNWizardFini.h" #include "CDSNWizard.h" CDSNWizardFini::CDSNWizardFini( CDSNWizardData *pWizardData, QWidget *pwidgetParent ) : QWizardPage( pwidgetParent ) { this->pWizardData = pWizardData; QHBoxLayout * pLayout = new QHBoxLayout( this ); QTextBrowser * pTextBrowser = new QTextBrowser; pTextBrowser->setHtml( "

Click Finish to save the Data Source Name with the information you have provided.

" ); pLayout->addWidget( pTextBrowser ); setTitle( tr( "Finish" ) ); } int CDSNWizardFini::nextId() const { return -1; } void CDSNWizardFini::initializePage() { } void CDSNWizardFini::cleanupPage() { } unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizard.cpp0100644000076400007640000000602310725407315016630 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include "CDSNWizard.h" #include "CDSNWizardEntre.h" #include "CDSNWizardType.h" #include "CDSNWizardDriver.h" #include "CDSNWizardProperties.h" #include "CDSNWizardFini.h" #include "ODBCManageDataSources64.xpm" #include "WizardCreateDataSourceName.xpm" CDSNWizard::CDSNWizard( CDSNWizardData *pWizardData, QWidget* pwidgetParent ) : QWizard( pwidgetParent ) { CDSNWizardEntre * pWizardEntre = new CDSNWizardEntre( pWizardData ); CDSNWizardType * pWizardType = new CDSNWizardType( pWizardData ); CDSNWizardDriver * pWizardDriver = new CDSNWizardDriver( pWizardData ); CDSNWizardProperties * pWizardProperties = new CDSNWizardProperties( pWizardData ); CDSNWizardFini * pWizardFini = new CDSNWizardFini( pWizardData ); setPage( PageEntre, pWizardEntre ); setPage( PageType, pWizardType ); setPage( PageDriver, pWizardDriver ); setPage( PageProperties,pWizardProperties ); setPage( PageFini, pWizardFini ); setStartId( PageEntre ); setOption( HaveHelpButton, true ); connect( this, SIGNAL(helpRequested()), this, SLOT(slotHelp()) ); setWindowTitle( tr( "Create Data Source Name Wizard" ) ); setWindowIcon( QPixmap( xpmODBCManageDataSources64 ) ); setPixmap( QWizard::WatermarkPixmap, QPixmap( xpmWizardCreateDataSourceName ) ); } CDSNWizard::~CDSNWizard() { } void CDSNWizard::slotHelp() { QString stringMessage; switch ( currentId() ) { case PageEntre: stringMessage = tr( "This page introduces the wizard - stating its purpose." ); break; case PageType: stringMessage = tr( "Choose from one of the 3 types of Data Source Names (DSN's).\n\nUser and System DSN's are stored in hidden files.\n\nEach File DSN is stored in its own file - which makes it easy to share/deploy on a network.\n\nElevated privileges are usually required to create a System or File DSN.\n\nThose unsure which to choose should choose User." ); break; case PageDriver: stringMessage = tr( "Choose a driver. Each ODBC data source has a driver. ODBC Drivers must be registered when/after they are installed on your system. Contact your SysAdmin or data source vendor if your driver is not shown here." ); break; case PageProperties: stringMessage = tr( "Connect properties. Defaults are usually fine but please provide a Name. Contact driver vendor for details about these properties." ); break; case PageFini: stringMessage = tr( "This page simply states that we have all the required information." ); break; default: stringMessage = tr( "Sorry; no help implemented for this page." ); } QMessageBox::information( this, tr("Create Data Source Name Wizard Help"), stringMessage ); } unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizardType.cpp0100644000076400007640000000374710725407315017504 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include "CDSNWizardType.h" #include "CDSNWizard.h" CDSNWizardType::CDSNWizardType( CDSNWizardData *pWizardData, QWidget *pwidgetParent ) : QWizardPage( pwidgetParent ) { this->pWizardData = pWizardData; QVBoxLayout * pLayout = new QVBoxLayout( this ); // group of radio buttons... { QGroupBox * pGroupBox = new QGroupBox; // buttons... { QVBoxLayout *pLayout = new QVBoxLayout; pradiobuttonUser = new QRadioButton( tr( "&User" ) ); pradiobuttonSystem = new QRadioButton( tr( "&System" ) ); pradiobuttonFile = new QRadioButton( tr( "&File" ) ); pradiobuttonUser->setChecked( true ); pLayout->addWidget( pradiobuttonUser ); pLayout->addWidget( pradiobuttonSystem ); pLayout->addWidget( pradiobuttonFile ); pLayout->addStretch( 1 ); pGroupBox->setLayout( pLayout ); } pLayout->addWidget( pGroupBox ); } setTitle( tr( "Type" ) ); } int CDSNWizardType::nextId() const { if ( pradiobuttonSystem->isChecked() ) pWizardData->nType = CDSNWizardData::TypeSystem; else if ( pradiobuttonFile->isChecked() ) pWizardData->nType = CDSNWizardData::TypeFile; else pWizardData->nType = CDSNWizardData::TypeUser; return CDSNWizard::PageDriver; } void CDSNWizardType::initializePage() { if ( pWizardData->nType == CDSNWizardData::TypeSystem ) pradiobuttonSystem->setChecked( true ); else if ( pWizardData->nType == CDSNWizardData::TypeFile ) pradiobuttonFile->setChecked( true ); else pradiobuttonUser->setChecked( true ); } void CDSNWizardType::cleanupPage() { pWizardData->nType = CDSNWizardData::TypeUser; } unixODBC-2.2.14-p2/odbcinstQ4/CFileSelector.cpp0100644000076400007640000000724610733010462017403 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CFileSelector.h" #include "Set.xpm" CFileSelector::CFileSelector( CFileSelectorMode nMode, const QString &stringLabel, bool bCompact, bool bButton, QWidget* pwidgetParent ) : QWidget( pwidgetParent ) { this->nMode = nMode; QHBoxLayout *playoutTop = new QHBoxLayout; if ( bCompact ) { playoutTop->setMargin( 0 ); playoutTop->setSpacing( 0 ); } if ( !stringLabel.isEmpty() ) playoutTop->addWidget( new QLabel( stringLabel ) ); { pLineEdit = new QLineEdit; playoutTop->addWidget( pLineEdit, 10 ); connect( pLineEdit, SIGNAL(editingFinished()), this, SIGNAL(signalChanged()) ); } if ( bButton ) { QToolButton *pToolButton = new QToolButton; pToolButton->setToolTip( tr( "click this to invoke a dialog to help select a file/directory" ) ); pToolButton->setWhatsThis( tr( "Click this to invoke a file dialog to assist in selecting a file/directory." ) ); pToolButton->setIcon( QIcon( xpmSet ) ); playoutTop->addWidget( pToolButton ); connect( pToolButton, SIGNAL(clicked()), this, SLOT(slotInvokeDialog()) ); } setLayout( playoutTop ); } CFileSelector::~CFileSelector() { } void CFileSelector::setText( const QString &stringText ) { pLineEdit->setText( stringText ); emit signalChanged(); } QString CFileSelector::getText() { return pLineEdit->text(); } void CFileSelector::slotInvokeDialog() { QString stringText; QString stringSelectedFilter; switch ( nMode ) { case TraceFile: stringText = QFileDialog::getSaveFileName( this, tr( "Select log file..." ), getText(), tr( "Trace File (*.log *.txt);;All Files (*.*)" ), &stringSelectedFilter, QFileDialog::DontConfirmOverwrite ); break; case TraceLibrary: { QString stringFilter = tr( "Share Library (*" ); if ( strlen( SHLIBEXT ) > 0 ) stringFilter += SHLIBEXT; else stringFilter += ".so"; stringFilter += tr( "*);;All Files (*.*)" ); stringText = QFileDialog::getOpenFileName( this, tr( "Select ODBC Trace Libary..." ), getText(), stringFilter, &stringSelectedFilter ); } break; case FileDSNDirectory: stringText = QFileDialog::getExistingDirectory( this, tr( "Select directory..." ), getText() ); break; case Driver: { QString stringFilter = tr( "Share Library (*" ); if ( strlen( SHLIBEXT ) > 0 ) stringFilter += SHLIBEXT; else stringFilter += ".so"; stringFilter += tr( "*);;All Files (*.*)" ); stringText = QFileDialog::getOpenFileName( this, tr( "Select Driver..." ), getText(), stringFilter, &stringSelectedFilter ); } break; case Setup: { QString stringFilter = tr( "Share Library (*" ); if ( strlen( SHLIBEXT ) > 0 ) stringFilter += SHLIBEXT; else stringFilter += ".so"; stringFilter += tr( "*);;All Files (*.*)" ); stringText = QFileDialog::getOpenFileName( this, tr( "Select Driver Setup..." ), getText(), stringFilter, &stringSelectedFilter ); } break; } if ( stringText.isNull() ) return; setText( stringText ); } unixODBC-2.2.14-p2/odbcinstQ4/CHelp.cpp0100644000076400007640000000507610725407316015723 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CHelp.h" #include "Info16.xpm" #include "InfoArrow16.xpm" CHelp::CHelp( const QString &stringKey, const QIcon &icon, const QString &stringText, QWidget *pwidgetParent ) : QWidget( pwidgetParent ) { this->stringKey = stringKey; bVisibleView = true; QHBoxLayout *pLayout = new QHBoxLayout( this ); // toggle button... { QVBoxLayout *playoutV = new QVBoxLayout; pToolButton = new QToolButton; pToolButton->setIcon( QIcon( xpmInfoArrow16 ) ); pToolButton->setWhatsThis( tr( "Use this to toggle the help text in and out of view. The state is saved at exit and used the next time the program is run." ) ); pToolButton->setToolTip( tr( "toggle help text" ) ); playoutV->addWidget( pToolButton ); playoutV->addStretch( 10 ); connect( pToolButton, SIGNAL(clicked()), this, SLOT(slotToggleView()) ); pLayout->addLayout( playoutV ); } // setup frame... { pFrame = new QFrame; pFrame->setFrameShape( QFrame::StyledPanel ); // setup icon and text... { QHBoxLayout *playoutH = new QHBoxLayout( pFrame ); plabelIcon = new QLabel; plabelIcon->setPixmap( icon.pixmap( 64, 64 ) ); plabelText = new QLabel( stringText ); plabelText->setWordWrap( true ); playoutH->addWidget( plabelIcon ); playoutH->addWidget( plabelText, 10 ); } pLayout->addWidget( pFrame, 10 ); } loadState(); } CHelp::~CHelp() { saveState(); } void CHelp::loadState() { QSettings settings; bool bVisible = settings.value( QString( "CHelp/%1/visible" ).arg( stringKey ), true ).toBool(); if ( bVisible != bVisibleView ) slotToggleView(); } void CHelp::saveState() { QSettings settings; settings.setValue( QString( "CHelp/%1/visible" ).arg( stringKey ), bVisibleView ); } void CHelp::slotToggleView() { if ( bVisibleView ) { pFrame->setFrameShape( QFrame::NoFrame ); plabelIcon->hide(); plabelText->hide(); pToolButton->setIcon( QIcon( xpmInfo16 ) ); bVisibleView = false; } else { pFrame->setFrameShape( QFrame::StyledPanel ); plabelIcon->show(); plabelText->show(); pToolButton->setIcon( QIcon( xpmInfoArrow16 ) ); bVisibleView = true; } } unixODBC-2.2.14-p2/odbcinstQ4/CManageDataSourceNames.cpp0100644000076400007640000000310010725407316021144 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CManageDataSourceNames.h" #include "CDataSourceNames.h" #include "CDataSourceNamesFile.h" #include "CPage.h" #include "DataSourceName48.xpm" CManageDataSourceNames::CManageDataSourceNames( QWidget *pwidgetParent ) : QTabWidget( pwidgetParent ) { pDataSourceNamesUser = new CDataSourceNames( this, ODBC_USER_DSN ); pDataSourceNamesSystem = new CDataSourceNames( this, ODBC_SYSTEM_DSN ); pDataSourceNamesFile = new CDataSourceNamesFile( this ); CPage *ppageUser = new CPage( this, QString::null, pDataSourceNamesUser, pDataSourceNamesUser->windowIcon(), pDataSourceNamesUser->windowHelp() ); CPage *ppageSystem = new CPage( this, QString::null, pDataSourceNamesSystem, pDataSourceNamesSystem->windowIcon(), pDataSourceNamesSystem->windowHelp() ); CPage *ppageFile = new CPage( this, QString::null, pDataSourceNamesFile, pDataSourceNamesFile->windowIcon(), pDataSourceNamesFile->windowHelp() ); addTab( ppageUser, tr( "User" ) ); addTab( ppageSystem, tr( "System" ) ); addTab( ppageFile, tr( "File" ) ); setWindowIcon( QPixmap( xpmDataSourceName48 ) ); setWindowTitle( tr( "Data Source Names" ) ); } CManageDataSourceNames::~CManageDataSourceNames() { } void CManageDataSourceNames::slotLoad() { pDataSourceNamesUser->slotLoad(); pDataSourceNamesSystem->slotLoad(); pDataSourceNamesFile->slotLoad(); } unixODBC-2.2.14-p2/odbcinstQ4/CManageDrivers.cpp0100644000076400007640000000474010725407316017557 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CManageDrivers.h" #include "CDriverList.h" #include "Driver48.xpm" CManageDrivers::CManageDrivers( QWidget* pwidgetParent ) : QWidget( pwidgetParent ) { QPushButton *ppushbuttonAdd = new QPushButton( tr( "A&dd..." ) ); ppushbuttonAdd->setToolTip( tr( "click to add/register a driver" ) ); ppushbuttonAdd->setWhatsThis( tr( "Click this to register a driver. Registering a driver informs the Driver Manager about its location and allows some driver-level options to be set. A well behaved driver installer will automatically register a driver but there are times when this needs to be done manually here. You will need to have elevated (root) privileges to do this." ) ); QPushButton *ppushbuttonConfigure = new QPushButton( tr( "&Configure..." ) ); ppushbuttonConfigure->setToolTip( tr( "click to configure the selected driver" ) ); ppushbuttonConfigure->setWhatsThis( tr( "Click this to edit driver options. You will need to have elevated (root) privileges to do this." ) ); QPushButton *ppushbuttonRemove = new QPushButton( tr( "&Remove" ) ); ppushbuttonRemove->setToolTip( tr( "click to remove the selected driver" ) ); ppushbuttonRemove->setWhatsThis( tr( "Click this to deregister the selected driver. This does not remove any files from the system. You will need to have elevated (root) privileges to do this." ) ); QHBoxLayout *playout = new QHBoxLayout; QVBoxLayout *playoutButtons = new QVBoxLayout; CDriverList *pDriverList = new CDriverList; playoutButtons->addWidget( ppushbuttonAdd ); playoutButtons->addWidget( ppushbuttonConfigure ); playoutButtons->addWidget( ppushbuttonRemove ); playoutButtons->addStretch( 10 ); playout->addWidget( pDriverList ); playout->addLayout( playoutButtons ); setLayout( playout ); connect( ppushbuttonAdd, SIGNAL(clicked()), pDriverList, SLOT(slotAdd()) ); connect( ppushbuttonConfigure, SIGNAL(clicked()), pDriverList, SLOT(slotEdit()) ); connect( ppushbuttonRemove, SIGNAL(clicked()), pDriverList, SLOT(slotDelete()) ); connect( pDriverList, SIGNAL(signalChanged()), this, SIGNAL(signalChanged()) ); setWindowIcon( QPixmap( xpmDriver48 ) ); setWindowTitle( tr( "Drivers" ) ); } CManageDrivers::~CManageDrivers() { } unixODBC-2.2.14-p2/odbcinstQ4/CODBCConfig.cpp0100644000076400007640000001624310725407316016666 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CODBCConfig.h" #include "CManageDataSourceNames.h" #include "CMonitor.h" #include "CAdvanced.h" #include "CAbout.h" #include "CPage.h" #include "ODBCManageDataSources64.xpm" CODBCConfig::CODBCConfig( QWidget* pwidgetParent, Qt::WindowFlags nFlags ) : QDialog( pwidgetParent, nFlags ) { QVBoxLayout *playout00 = new QVBoxLayout; // init the help system... { // \note slotHelp fails to invoke assistant when in shell as root - problem here perhaps? pAssistantClient = new QAssistantClient( QLibraryInfo::location( QLibraryInfo::BinariesPath ), this ); /*! * \todo * * 1. create unixODBC.adp * 2. get unixODBC.adp and associated doc to install in various install scenarios * 3. tweek the way we get the path to the doc so its more portable (currently just Linux friendly) * * \sa * * slotHelp */ QStringList stringlistArgs; stringlistArgs << "-profile" << QString( "%1/share/doc/packages/unixODBC/unixODBC.adp" ).arg( THEPREFIX ); pAssistantClient->setArguments( stringlistArgs ); connect( pAssistantClient, SIGNAL(error(const QString&)), this, SLOT(slotHelpError(const QString&)) ); } // init icon menu and stacked widget... { QHBoxLayout *playout01 = new QHBoxLayout; createConfigWidgets(); createIconMenu(); playout01->addWidget( plistwidgetIcons ); playout01->addWidget( pstackedwidgetConfigWidgets, 10 ); playout00->addLayout( playout01 ); } // init dialog buttons... { QDialogButtonBox * pdialogbuttonbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Help ); QFrame * pframe = new QFrame; pframe->setFrameStyle( QFrame::HLine ); // connect( pdialogbuttonbox, SIGNAL(accepted()), this, SLOT(slotAccept()) ); connect( pdialogbuttonbox, SIGNAL(accepted()), this, SLOT(accept()) ); connect( pdialogbuttonbox, SIGNAL(rejected()), this, SLOT(reject()) ); connect( pdialogbuttonbox, SIGNAL(helpRequested()), this, SLOT(slotHelp()) ); playout00->addWidget( pframe ); playout00->addWidget( pdialogbuttonbox ); } // setLayout( playout00 ); setWindowTitle( tr( "ODBC Administrator" ) ); setWindowIcon( QPixmap( xpmODBCManageDataSources64 ) ); // restore last state... loadState(); } CODBCConfig::~CODBCConfig() { pAssistantClient->closeAssistant(); delete pAssistantClient; saveState(); } bool CODBCConfig::saveData() { if ( !pManageDataSourceNames->saveData() ); return false; if ( !pMonitor->saveData() ) return false; if ( !pAdvanced->saveData() ) return false; if ( !pAbout->saveData() ) return false; return true; } void CODBCConfig::slotChangePage( QListWidgetItem *plistwidgetitemCurrent, QListWidgetItem *plistwidgetitemPrevious ) { if ( !plistwidgetitemCurrent ) plistwidgetitemCurrent = plistwidgetitemPrevious; pstackedwidgetConfigWidgets->setCurrentIndex( plistwidgetIcons->row( plistwidgetitemCurrent ) ); } void CODBCConfig::slotHelp() { pAssistantClient->showPage( QString( "%1/share/doc/packages/unixODBC/index.html" ).arg( THEPREFIX ) ); } void CODBCConfig::slotHelpError( const QString &stringMessage ) { QMessageBox::critical( this, tr("ODBC Administrator"), stringMessage ); } void CODBCConfig::slotAccept() { /* \todo This can only be implemented after any widget which does something in saveData() tracks changes in its data such that an actual save is only done if data changes. */ printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); if ( saveData() ) // done( QDialog::Accepted ); accept(); } void CODBCConfig::createIconMenu() { plistwidgetIcons = new QListWidget; plistwidgetIcons->setViewMode( QListView::IconMode ); plistwidgetIcons->setIconSize( QSize( 96, 84 ) ); plistwidgetIcons->setMovement( QListView::Static ); plistwidgetIcons->setMaximumWidth( 128 ); plistwidgetIcons->setSpacing( 12 ); QListWidgetItem *plistwidgetitemDataSourceNames = new QListWidgetItem ( plistwidgetIcons ); plistwidgetitemDataSourceNames->setTextAlignment( Qt::AlignHCenter ); plistwidgetitemDataSourceNames->setIcon( pManageDataSourceNames->windowIcon() ); plistwidgetitemDataSourceNames->setText( tr( "Data\nSource\nNames" ) ); QListWidgetItem *plistwidgetitemMonitor = new QListWidgetItem ( plistwidgetIcons ); plistwidgetitemMonitor->setTextAlignment( Qt::AlignHCenter ); plistwidgetitemMonitor->setIcon( pMonitor->windowIcon() ); plistwidgetitemMonitor->setText( tr( "Monitor" ) ); QListWidgetItem *plistwidgetitemAdvanced = new QListWidgetItem ( plistwidgetIcons ); plistwidgetitemAdvanced->setTextAlignment( Qt::AlignHCenter ); plistwidgetitemAdvanced->setIcon( pAdvanced->windowIcon() ); plistwidgetitemAdvanced->setText( tr( "Advanced" ) ); QListWidgetItem *plistwidgetitemAbout = new QListWidgetItem ( plistwidgetIcons ); plistwidgetitemAbout->setTextAlignment( Qt::AlignHCenter ); plistwidgetitemAbout->setIcon( pAbout->windowIcon() ); plistwidgetitemAbout->setText( tr( "About" ) ); plistwidgetIcons->setCurrentItem( plistwidgetitemDataSourceNames ); connect( plistwidgetIcons, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), this, SLOT(slotChangePage(QListWidgetItem *, QListWidgetItem*)) ); } void CODBCConfig::createConfigWidgets() { pManageDataSourceNames = new CManageDataSourceNames; pMonitor = new CMonitor; pAdvanced = new CAdvanced; pAbout = new CAbout; pstackedwidgetConfigWidgets = new QStackedWidget; pstackedwidgetConfigWidgets->addWidget( new CPage( this, pManageDataSourceNames->windowTitle(), pManageDataSourceNames, pManageDataSourceNames->windowIcon(), pManageDataSourceNames->windowHelp() ) ); pstackedwidgetConfigWidgets->addWidget( new CPage( this, pMonitor->windowTitle(), pMonitor, pMonitor->windowIcon(), pMonitor->windowHelp() ) ); pstackedwidgetConfigWidgets->addWidget( new CPage( this, pAdvanced->windowTitle(), pAdvanced, pAdvanced->windowIcon(), pAdvanced->windowHelp() ) ); pstackedwidgetConfigWidgets->addWidget( new CPage( this, pAbout->windowTitle(), pAbout, pAbout->windowIcon(), pAbout->windowHelp() ) ); /* this will handle case where we delete a driver and it results in DSN's being deleted (those that use the driver) */ connect( pAdvanced, SIGNAL(signalChanged()), pManageDataSourceNames, SLOT(slotLoad()) ); } void CODBCConfig::loadState() { QSettings settings; int nW = settings.value( "CODBCConfig/w", geometry().width() ).toInt(); int nH = settings.value( "CODBCConfig/h", geometry().height() ).toInt(); resize( nW, nH ); } void CODBCConfig::saveState() { QSettings settings; settings.setValue( "CODBCConfig/w", width() ); settings.setValue( "CODBCConfig/h", height() ); } unixODBC-2.2.14-p2/odbcinstQ4/CODBCInst.cpp0100644000076400007640000001425211025444223016364 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include "CODBCInst.h" #include CDSNWizardData::CDSNWizardData( const QString &stringDataSourceName ) { this->stringDataSourceName = stringDataSourceName; nType = TypeUser; hFirstProperty = 0; } CDSNWizardData::~CDSNWizardData() { if ( hFirstProperty ) ODBCINSTDestructProperties( &hFirstProperty ); } /*! * \brief Save Data Source Name. * * Call this to save User, System and File DSN's based upon a property list. * * \param pwidgetParent Input. Widget to use as parent for messages. Null is ok. * \param hFirstProperty Input. First property in NULL terminated property list. * \param nType Input. Type of DSN. * \param stringIni Input. Default is QString::null. * * \li User and System DSN. This can be a QString::null to use * default location or it can be a fully qualified path and name. * \li File DSN. This can be a QString::null to use default * location or it can be an abs directory. In either case the file * name itself will be derived from the Name property. * * \return bool * \retval true Hey - it worked :) * \retval false Call failed for some reason. Error message(s) is shown in message dialog. */ bool CODBCInst::saveDataSourceName( QWidget *pwidgetParent, HODBCINSTPROPERTY hFirstProperty, CDSNWizardData::Type nType, const QString &stringIni ) { // sanity checks... if ( !hFirstProperty ) { QMessageBox::critical( pwidgetParent, QObject::tr( "ODBC Administrator" ), QObject::tr( "Programmer error: Uninitialized property list." ) ); return false; } if ( (QString( hFirstProperty->szValue )).simplified().isEmpty() ) { QMessageBox::critical( pwidgetParent, QObject::tr( "ODBC Administrator" ), QObject::tr( "Missing 'Name' property value." ) ); return false; } // init UWORD nConfigMode = ODBC_BOTH_DSN; bool bReturn = false; QString stringFileName = stringIni; switch ( nType ) { case CDSNWizardData::TypeUser: SQLGetConfigMode( &nConfigMode ); SQLSetConfigMode( ODBC_USER_DSN ); if ( stringFileName.isEmpty() ) stringFileName = "odbc.ini"; break; case CDSNWizardData::TypeSystem: SQLGetConfigMode( &nConfigMode ); SQLSetConfigMode( ODBC_SYSTEM_DSN ); if ( stringFileName.isEmpty() ) stringFileName = "odbc.ini"; break; case CDSNWizardData::TypeFile: // should we calc the dir and file name (do not allow the special purpose names)... if ( stringFileName.isEmpty() || stringFileName.at( 0 ) != QChar( '/' ) ) { char szDirectory[FILENAME_MAX]; szDirectory[0] = '\0'; _odbcinst_FileINI( szDirectory ); stringFileName = QString( "%1/%2.dsn" ).arg( szDirectory ).arg( hFirstProperty->szValue ); } else if ( stringFileName.at( 0 ) == QChar( '/' ) ) stringFileName = QString( "%1/%2.dsn" ).arg( stringFileName ).arg( hFirstProperty->szValue ); else { QMessageBox::critical( pwidgetParent, QObject::tr( "ODBC Administrator" ), QObject::tr( "File DSN directory expected but seems to be a name or file name." ) ); return false; } break; default: QMessageBox::critical( pwidgetParent, QObject::tr( "ODBC Administrator" ), QObject::tr( "Unhandled Data Source Name Type" ) ); return false; } // save... if ( nType == CDSNWizardData::TypeFile ) { // create the file with a section called "ODBC"... if ( !SQLWriteFileDSN( stringFileName.toAscii().data(), "ODBC", NULL, NULL ) ) { showErrors( 0, QString( "Could not write to (%1)" ).arg( stringFileName ) ); goto CODBCInstExit1; } // add all of the properties... for ( HODBCINSTPROPERTY hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { if ( !SQLWriteFileDSN( stringFileName.toAscii().data(), "ODBC", hCurProperty->szName, hCurProperty->szValue ) ) { showErrors( 0, QString( "Could not write to (%1)" ).arg( stringFileName ) ); goto CODBCInstExit1; } } } else { // create a section called using Name property (always 1st property)... if ( SQLWritePrivateProfileString( hFirstProperty->szValue, NULL, NULL, stringFileName.toAscii().data() ) == FALSE ) { showErrors( pwidgetParent, QString( QObject::tr( "Could not write to (%1). You may need additional system privileges." ) ).arg( stringFileName ) ); goto CODBCInstExit1; } // add all of the properties... for ( HODBCINSTPROPERTY hCurProperty = hFirstProperty->pNext; hCurProperty != NULL; hCurProperty = hCurProperty->pNext ) { SQLWritePrivateProfileString( hFirstProperty->szValue, hCurProperty->szName, hCurProperty->szValue, stringFileName.toAscii().data() ); } } bReturn = true; // fini CODBCInstExit1: if ( nType != CDSNWizardData::TypeFile ) SQLSetConfigMode( nConfigMode ); return bReturn; } int CODBCInst::showErrors( QWidget *pwidgetParent, const QString &stringConsequence ) { DWORD nCode; char szMessage[FILENAME_MAX+1]; int nMessage = 1; for ( ; nMessage <= 10; nMessage++ ) { if ( SQLInstallerError( nMessage, &nCode, szMessage, FILENAME_MAX, NULL ) != SQL_SUCCESS ) break; QMessageBox::critical( pwidgetParent, QObject::tr( "ODBC Administrator" ), szMessage ); } if ( !stringConsequence.isEmpty() ) QMessageBox::warning( pwidgetParent, QObject::tr( "ODBC Administrator" ), stringConsequence ); return (nMessage - 1); } unixODBC-2.2.14-p2/odbcinstQ4/CPage.cpp0100644000076400007640000000235710725407316015706 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CPage.h" #include "CHelp.h" CPage::CPage( QWidget* pwidgetParent, const QString &stringTitle, QWidget *pwidgetContent, const QIcon &icon, const QString &stringHelp ) : QWidget( pwidgetParent ) { Q_ASSERT(pwidgetContent); QVBoxLayout * playout = new QVBoxLayout; this->pwidgetContent = pwidgetContent; if ( !stringTitle.isEmpty() ) { QLabel * plabel = new QLabel( stringTitle ); QFrame * pframe = new QFrame; QFont font( plabel->font() ); font.setPointSize( font.pointSize() + 2 ) ; font.setBold( true ); plabel->setFont( font ); pframe->setFrameStyle( QFrame::HLine ); playout->addWidget( plabel, 1 ); playout->addWidget( pframe ); } playout->addWidget( pwidgetContent, 10 ); if ( !stringHelp.isEmpty() ) { CHelp *pHelp = new CHelp( pwidgetContent->metaObject()->className(), icon, stringHelp ); playout->addWidget( pHelp ); } setLayout( playout ); } CPage::~CPage() { } unixODBC-2.2.14-p2/odbcinstQ4/CPooling.cpp0100644000076400007640000000560010725407316016433 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CPooling.h" #include "Pooling48.xpm" CPooling::CPooling( QWidget *pwidgetParent ) : QWidget( pwidgetParent ) { QGridLayout *playout = new QGridLayout; pcheckboxEnable = new QCheckBox; pcheckboxEnable->setToolTip( tr( "check to enable pooling" ) ); pcheckboxEnable->setWhatsThis( tr( "Check this to enable connection pooling. Connections with similar or same connection options can be reduced to one, common, connection and this can often improve performance - particularly for server processes." ) ); playout->addWidget( new QLabel( tr( "Enable" ) ), 0, 0 ); playout->addWidget( pcheckboxEnable, 0, 1 ); QPushButton *ppushbuttonSetDefault = new QPushButton( "De&fault", this ); ppushbuttonSetDefault->setToolTip( tr( "click to set values to default" ) ); ppushbuttonSetDefault->setWhatsThis( tr( "Click to restore the default values." ) ); QPushButton *ppushbuttonApply = new QPushButton( "A&pply", this ); ppushbuttonApply->setToolTip( tr( "click to apply the current settings" ) ); ppushbuttonApply->setWhatsThis( tr( "Click this to save the current values." ) ); playout->addWidget( ppushbuttonSetDefault, 0, 2 ); playout->addWidget( ppushbuttonApply, 1, 2 ); connect( ppushbuttonSetDefault, SIGNAL(clicked()), SLOT(slotDefault()) ); connect( ppushbuttonApply, SIGNAL(clicked()), SLOT(slotApply()) ); playout->setRowStretch( 3, 10 ); playout->setColumnStretch( 1, 10 ); setLayout( playout ); setWindowIcon( QPixmap( xpmPooling48 ) ); setWindowTitle( tr( "Pooling" ) ); loadData(); } CPooling::~CPooling() { } bool CPooling::loadData() { slotDefault(); char szPooling[10]; SQLGetPrivateProfileString( "ODBC", "Pooling", "No", szPooling, sizeof(szPooling), "odbcinst.ini" ); if ( szPooling[0] == '1' || toupper( szPooling[0] ) == 'Y' || toupper( szPooling[0] ) == 'O' ) pcheckboxEnable->setChecked( true ); return true; } bool CPooling::saveData() { if ( slotApply() ) return true; int n = QMessageBox::question( this, tr( "Save..." ), tr( "Some data could not be saved. Click Discard if its ok to lose changes." ), QMessageBox::Cancel | QMessageBox::Discard, QMessageBox::Discard ); if ( n == QMessageBox::Discard ) return true; return false; } bool CPooling::slotApply() { if ( !SQLWritePrivateProfileString( "ODBC", "Pooling", ( pcheckboxEnable->isChecked() ? "1" : "0" ), "odbcinst.ini" ) ) { CODBCInst::showErrors( this, tr( "Could not save options. You may not have the privileges to write odbcinst.ini." ) ); return false; } return true; } bool CPooling::slotDefault() { pcheckboxEnable->setChecked( false ); } unixODBC-2.2.14-p2/odbcinstQ4/CPropertiesDelegate.cpp0100644000076400007640000001352510725407316020620 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CPropertiesDelegate.h" #include "CPropertiesModel.h" #include "CFileSelector.h" CPropertiesDelegate::CPropertiesDelegate( QObject *pobjectParent ) : QItemDelegate( pobjectParent ) { } /* we could just load the value now and save all of the subsequent logic to do so - but we follow the Qt encouraged flow of things and defer to setEditorData */ QWidget *CPropertiesDelegate::createEditor( QWidget *pwidgetParent, const QStyleOptionViewItem &styleoptionviewitem, const QModelIndex &modelindex ) const { if ( modelindex.column() != 1 ) return 0; HODBCINSTPROPERTY pProperty = modelindex.model()->data( modelindex, Qt::EditRole ).value(); switch ( pProperty->nPromptType ) { case ODBCINST_PROMPTTYPE_LABEL: { QLabel *pLabel = new QLabel( pwidgetParent ); return pLabel; } break; case ODBCINST_PROMPTTYPE_LISTBOX: { QComboBox *pComboBox = new QComboBox( pwidgetParent ); for ( int n = 0; (pProperty->aPromptData)[n]; n++ ) { pComboBox->insertItem( 0, (pProperty->aPromptData)[n] ); } return pComboBox; } break; case ODBCINST_PROMPTTYPE_COMBOBOX: { QComboBox *pComboBox = new QComboBox( pwidgetParent ); for ( int n = 0; (pProperty->aPromptData)[n]; n++ ) { pComboBox->insertItem( 0, (pProperty->aPromptData)[n] ); } pComboBox->setEditable( true ); return pComboBox; } break; case ODBCINST_PROMPTTYPE_FILENAME: { CFileSelector *pFileSelector = new CFileSelector( CFileSelector::Driver, QString::null, true, true, pwidgetParent ); return pFileSelector; } break; case ODBCINST_PROMPTTYPE_HIDDEN: break; default: // PROMPTTYPE_TEXTEDIT and PROMPTTYPE_TEXTEDIT_PASSWORD { QLineEdit *pLineEdit = new QLineEdit( pwidgetParent ); if ( pProperty->nPromptType == ODBCINST_PROMPTTYPE_TEXTEDIT_PASSWORD ) pLineEdit->setEchoMode( QLineEdit::Password ) ; return pLineEdit; } break; } return 0; } void CPropertiesDelegate::setEditorData( QWidget *pwidgetEditor, const QModelIndex &modelindex ) const { HODBCINSTPROPERTY pProperty = modelindex.model()->data( modelindex, Qt::EditRole ).value(); switch ( pProperty->nPromptType ) { case ODBCINST_PROMPTTYPE_LABEL: break; case ODBCINST_PROMPTTYPE_LISTBOX: { QComboBox *pComboBox = static_cast( pwidgetEditor ); pComboBox->setCurrentIndex( pComboBox->findText( pProperty->szValue, Qt::MatchExactly ) ); } break; case ODBCINST_PROMPTTYPE_COMBOBOX: { QComboBox *pComboBox = static_cast( pwidgetEditor ); pComboBox->lineEdit()->setText( pProperty->szValue ); } break; case ODBCINST_PROMPTTYPE_FILENAME: { CFileSelector *pFileSelector = static_cast( pwidgetEditor ); pFileSelector->setText( pProperty->szValue ); } break; case ODBCINST_PROMPTTYPE_HIDDEN: break; default: // PROMPTTYPE_TEXTEDIT and PROMPTTYPE_TEXTEDIT_PASSWORD { QLineEdit *pLineEdit = static_cast( pwidgetEditor ); pLineEdit->setText( pProperty->szValue ); } break; } } /* we could just update the HODBCINSTPROPERTY value here but we go with the Qt encouraged flow of things and defer to the views setData */ void CPropertiesDelegate::setModelData( QWidget *pwidgetEditor, QAbstractItemModel *abstractitemmodel, const QModelIndex &modelindex) const { HODBCINSTPROPERTY pProperty = abstractitemmodel->data( modelindex, Qt::EditRole ).value(); switch ( pProperty->nPromptType ) { case ODBCINST_PROMPTTYPE_LABEL: break; case ODBCINST_PROMPTTYPE_LISTBOX: { QComboBox *pComboBox = static_cast( pwidgetEditor ); abstractitemmodel->setData( modelindex, pComboBox->currentText(), Qt::EditRole ); } break; case ODBCINST_PROMPTTYPE_COMBOBOX: { QComboBox *pComboBox = static_cast( pwidgetEditor ); abstractitemmodel->setData( modelindex, pComboBox->currentText(), Qt::EditRole ); } break; case ODBCINST_PROMPTTYPE_FILENAME: { CFileSelector *pFileSelector = static_cast( pwidgetEditor ); abstractitemmodel->setData( modelindex, pFileSelector->getText(), Qt::EditRole ); } break; case ODBCINST_PROMPTTYPE_HIDDEN: break; default: // PROMPTTYPE_TEXTEDIT and PROMPTTYPE_TEXTEDIT_PASSWORD { QLineEdit *pLineEdit = static_cast( pwidgetEditor ); abstractitemmodel->setData( modelindex, pLineEdit->text(), Qt::EditRole ); } break; } } void CPropertiesDelegate::updateEditorGeometry( QWidget *pwidgetEditor, const QStyleOptionViewItem &styleoptionviewitem, const QModelIndex &modelindex ) const { pwidgetEditor->setGeometry( styleoptionviewitem.rect ); } unixODBC-2.2.14-p2/odbcinstQ4/CPropertiesDialog.cpp0100644000076400007640000000401210725407316020274 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CPropertiesDialog.h" #include "CPropertiesModel.h" #include "CPropertiesDelegate.h" #include "ODBC.xpm" CPropertiesDialog::CPropertiesDialog( QWidget *pwidgetParent, HODBCINSTPROPERTY hFirstProperty ) : QDialog( pwidgetParent ) { QVBoxLayout * playout = new QVBoxLayout; QTableView * ptableview = new QTableView; QFrame * pframe = new QFrame; QDialogButtonBox * pdialogbuttonbox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Ok | QDialogButtonBox::Help ); pframe->setFrameStyle( QFrame::HLine ); ppropertiesmodel = new CPropertiesModel( 0, hFirstProperty ); ppropertiesdelegate = new CPropertiesDelegate; ptableview->setModel( ppropertiesmodel ); ptableview->setItemDelegateForColumn ( 1, ppropertiesdelegate ); ptableview->verticalHeader()->hide(); connect( pdialogbuttonbox, SIGNAL(accepted()), this, SLOT(accept()) ); connect( pdialogbuttonbox, SIGNAL(rejected()), this, SLOT(reject()) ); playout->addWidget( ptableview, 10 ); playout->addWidget( pframe ); playout->addWidget( pdialogbuttonbox ); setWindowIcon( QPixmap( xpmODBC ) ); setLayout( playout ); doLoadState(); } CPropertiesDialog::~CPropertiesDialog() { doSaveState(); delete ppropertiesdelegate; delete ppropertiesmodel; } void CPropertiesDialog::doLoadState() { QSettings settings; int nW = settings.value( "CPropertiesDialog/w", geometry().width() ).toInt(); int nH = settings.value( "CPropertiesDialog/h", geometry().height() ).toInt(); resize( nW, nH ); } void CPropertiesDialog::doSaveState() { QSettings settings; settings.setValue( "CPropertiesDialog/w", width() ); settings.setValue( "CPropertiesDialog/h", height() ); } unixODBC-2.2.14-p2/odbcinstQ4/CPropertiesModel.cpp0100644000076400007640000001355510725407316020151 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CPropertiesModel.h" #include "CPropertiesDelegate.h" /*! * \brief Construct a properties model. * * \param pobjectParent * \param hFirstProperty */ CPropertiesModel::CPropertiesModel( QObject *pobjectParent, HODBCINSTPROPERTY pFirstProperty ) : QAbstractTableModel( pobjectParent ) { /* create an index on our linked-list to simplify, and speed up, access */ for ( HODBCINSTPROPERTY pProperty = pFirstProperty; pProperty != NULL; pProperty = pProperty->pNext ) { vectorProperties.append( pProperty ); } } CPropertiesModel::~CPropertiesModel() { } /*! * \brief Return the number of rows needed to view the properties. * * * \return int Output. The number of properties. */ int CPropertiesModel::rowCount( const QModelIndex & ) const { return vectorProperties.size(); } /*! * \brief Return the number of columns needed to view the properties. * * We always return 2. We have 1 column with the property name and 1 column with the * value - the latter us typically, but not always, editable. * * \return int Output. Always 2. */ int CPropertiesModel::columnCount( const QModelIndex & ) const { return 2; } /*! * \brief Provide cell data to the view and any delegate we may have in play * for the cell. * * We expect that the 2nd column will have CPropertiesDelegate installed on it. So for * the 2nd column we may return the value text or HODBCINSTPROPERTY. * * \param index * \param nRole Input. Qt::ItemDataRole. This is provided to request a specific variant of the * data associated with the cell. * * \return QVariant */ QVariant CPropertiesModel::data( const QModelIndex &index, int nRole ) const { /* \todo are these sanity checks really needed? */ if ( !index.isValid() ) return QVariant(); if ( index.row() >= vectorProperties.size() ) return QVariant(); /* which column ? */ if ( index.column() == 0 ) { switch ( nRole ) { case Qt::DisplayRole: /* called by QTableView to display the value text */ return vectorProperties.at( index.row() )->szName; case Qt::EditRole: /* the 1st column should not be editable but... */ return vectorProperties.at( index.row() )->szName; case Qt::ToolTipRole: case Qt::StatusTipRole: case Qt::WhatsThisRole: return vectorProperties.at( index.row() )->pszHelp; default: break; } } else { switch ( nRole ) { case Qt::DisplayRole: /* called by QTableView to display the value text without editor */ return vectorProperties.at( index.row() )->szValue; case Qt::EditRole: /* called by CPropertiesDelegate:: createEditor & setEditorData to load cell editor */ return QVariant::fromValue( vectorProperties.at( index.row() ) ); case Qt::ToolTipRole: case Qt::StatusTipRole: case Qt::WhatsThisRole: return vectorProperties.at( index.row() )->pszHelp; default: break; } } return QVariant(); } /*! * \brief Set data. * * The view (possibly via a delegate) will ask to set the cell value which will result * in a call to this method. * * \param index Input. Index into the cell. * \param variantValue Input. The only column we deal with here is the 2nd column (the value) and * we expect to get that as a QString. This should come from * \sa CPropertiesDelegate::setModelData. * \param nRole Input. Qt::ItemDataRole. This is provided to request setting a specific variant * of the data associated with the cell. * * \return bool */ bool CPropertiesModel::setData( const QModelIndex &index, const QVariant &variantValue, int nRole ) { if ( !index.isValid() ) return false; if ( index.column() == 0 ) return false; if ( nRole == Qt::EditRole ) { strcpy( vectorProperties.at( index.row() )->szValue, variantValue.toString().toAscii().constData() ); emit dataChanged( index, index ); return true; } return false; } /*! * \brief The delegate will check this to determine what it can do with a cell. * * \param index Input. Cell index. * * \return Qt::ItemFlags */ Qt::ItemFlags CPropertiesModel::flags( const QModelIndex &index ) const { if ( !index.isValid() ) return Qt::ItemIsEnabled; /* for lack of a better choice :/ */ if ( index.column() == 1 ) return ( QAbstractItemModel::flags( index ) | Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled ); return Qt::ItemIsEnabled; /* for lack of a better choice :/ */ } /*! * \brief QTableView (or possibly a delegate) will get column headers here. * * \param nSection Input. Column/row. * \param nOrientation Input. Qt::Orientation. * \param nRole Input. Qt::ItemDataRole. This is provided to request a specific variant * of the data associated with the cell. * * \return QVariant */ QVariant CPropertiesModel::headerData( int nSection, Qt::Orientation nOrientation, int nRole ) const { if ( nRole != Qt::DisplayRole ) return QVariant(); if ( nOrientation != Qt::Horizontal ) return QVariant(); if ( nSection == 0 ) return QString( tr( "Name" ) ); if ( nSection == 1 ) return QString( tr( "Value" ) ); return QVariant(); } unixODBC-2.2.14-p2/odbcinstQ4/CMonitorHandleCounts.cpp0100644000076400007640000001321611023437455020764 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include "CMonitorHandleCounts.h" CMonitorHandleCounts::CMonitorHandleCounts( QWidget *pwidgetParent ) : QWidget( pwidgetParent ) { setToolTip( tr( "number of active ODBC handles" ) ); setWhatsThis( tr( "This shows the number of active ODBC handles at any given moment. The values are automatically updated frequently. This is useful for debugging and performance monitoring." ) ); // lets assume, for the moment, that we can get monitoring info from DM... bEnabled = true; QGridLayout *pLayout = new QGridLayout; // setup labels to show current values as simple numbers... { plabelEnvironment = new QLabel( "0" ); plabelConnection = new QLabel( "0" ); plabelStatement = new QLabel( "0" ); plabelDescriptor = new QLabel( "0" ); pLayout->addWidget( plabelEnvironment, 0, 0 ); pLayout->addWidget( plabelConnection, 0, 1 ); pLayout->addWidget( plabelStatement, 0, 2 ); pLayout->addWidget( plabelDescriptor, 0, 3 ); } // setup sliders to show current values in an interesting manner... { // set default scale for sliders... nSliderMax = 10; psliderEnvironment = new QSlider; psliderConnection = new QSlider; psliderStatement = new QSlider; psliderDescriptor = new QSlider; psliderEnvironment->setInvertedAppearance( true ); psliderConnection->setInvertedAppearance( true ); psliderStatement->setInvertedAppearance( true ); psliderDescriptor->setInvertedAppearance( true ); // psliderEnvironment->setTickmarks( QSlider::Both ); // psliderConnection->setTickmarks( QSlider::Both ); // psliderStatement->setTickmarks( QSlider::Both ); // psliderDescriptor->setTickmarks( QSlider::Both ); psliderEnvironment->setMinimum( 0-nSliderMax ); psliderConnection->setMinimum( 0-nSliderMax ); psliderStatement->setMinimum( 0-nSliderMax ); psliderDescriptor->setMinimum( 0-nSliderMax ); psliderEnvironment->setMaximum( 0 ); psliderConnection->setMaximum( 0 ); psliderStatement->setMaximum( 0 ); psliderDescriptor->setMaximum( 0 ); pLayout->addWidget( psliderEnvironment, 1, 0 ); pLayout->addWidget( psliderConnection, 1, 1 ); pLayout->addWidget( psliderStatement, 1, 2 ); pLayout->addWidget( psliderDescriptor, 1, 3 ); } // setup some labels to show what each slider is for... { pLayout->addWidget( new QLabel( tr( "Env" ) ), 2, 0 ); pLayout->addWidget( new QLabel( tr( "Con" ) ), 2, 1 ); pLayout->addWidget( new QLabel( tr( "Sta" ) ), 2, 2 ); pLayout->addWidget( new QLabel( tr( "Des" ) ), 2, 3 ); } // get timer going... { hStats = 0; pTimer = new QTimer( this ); connect( pTimer, SIGNAL(timeout()), SLOT(slotLoad()) ); pTimer->start( 2000 ); // 1000 = 1 second } // adopt our layout... setLayout( pLayout ); } CMonitorHandleCounts::~CMonitorHandleCounts() { if ( hStats ) uodbc_close_stats( hStats ); } void CMonitorHandleCounts::slotLoad() { // only bother with this if we are visible... if ( !isVisible() ) return; if ( !bEnabled ) return; // init coms with DM but don't even bother the DM until (if) we become visible... if ( !hStats ) { if ( uodbc_open_stats( &hStats, UODBC_STATS_READ ) != 0 ) { // char szError[512]; // QMessageBox::critical( this, tr( "Monitor Handle Counts" ), QString( tr( "uodbc_open_stats failed\n%1" ) ).arg( uodbc_stats_error( szError, 512 ) ) ); // bEnabled = false; return; } } // get current handle counts... { uodbc_stats_retentry aStats[4]; uodbc_get_stats( hStats, -1, aStats, 4 ); // if ( uodbc_get_stats( hStats, -1, aStats, 4 ) == 4 ) // { // char szError[512]; // QMessageBox::critical( this, tr( "Monitor Handle Counts" ), QString( tr( "uodbc_get_stats failed\n%1" ) ).arg( uodbc_stats_error( szError, 512 ) ) ); // bEnabled = false; // return; // } // bump up our scale for the sliders as needed... if ( aStats[0].value.l_value > nSliderMax ) nSliderMax = aStats[0].value.l_value; if ( aStats[1].value.l_value > nSliderMax ) nSliderMax = aStats[1].value.l_value; if ( aStats[2].value.l_value > nSliderMax ) nSliderMax = aStats[2].value.l_value; if ( aStats[3].value.l_value > nSliderMax ) nSliderMax = aStats[3].value.l_value; // update UI bits... plabelEnvironment->setText( QString( "%1" ).arg( aStats[0].value.l_value ) ); psliderEnvironment->setMinimum( 0-nSliderMax ); psliderEnvironment->setValue( 0-aStats[0].value.l_value ); plabelConnection->setText( QString( "%1" ).arg( aStats[1].value.l_value ) ); psliderConnection->setMinimum( 0-nSliderMax ); psliderConnection->setValue( 0-aStats[1].value.l_value ); plabelStatement->setText( QString( "%1" ).arg( aStats[2].value.l_value ) ); psliderStatement->setMinimum( 0-nSliderMax ); psliderStatement->setValue( 0-aStats[2].value.l_value ); plabelDescriptor->setText( QString( "%1" ).arg( aStats[3].value.l_value ) ); psliderDescriptor->setMinimum( 0-nSliderMax ); psliderDescriptor->setValue( 0-aStats[3].value.l_value ); } } unixODBC-2.2.14-p2/odbcinstQ4/CMonitor.cpp0100644000076400007640000000145410725407316016456 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CMonitor.h" #include "CMonitorHandleCounts.h" #include "CMonitorProcesses.h" #include "Stats48.xpm" CMonitor::CMonitor( QWidget *pwidgetParent ) : QTabWidget( pwidgetParent ) { // handles { pMonitorHandleCounts = new CMonitorHandleCounts( this ); addTab( pMonitorHandleCounts, tr( "Handle Counts" ) ); } // tracing { pMonitorProcesses = new CMonitorProcesses( this ); addTab( pMonitorProcesses, tr( "Processes" ) ); } setWindowIcon( QPixmap( xpmStats48 ) ); setWindowTitle( tr( "Monitor" ) ); } CMonitor::~CMonitor() { } unixODBC-2.2.14-p2/odbcinstQ4/CMonitorProcesses.cpp0100644000076400007640000001010111025444223020322 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include "CMonitorProcesses.h" #define MAXPROCESSES 100 #define MAXHANDLES 4 CMonitorProcesses::CMonitorProcesses( QWidget* pwidgetParent ) : QTableWidget( pwidgetParent ) { setToolTip( tr( "list of processes currently owning one or more ODBC handles" ) ); setWhatsThis( tr( "This shows a list of processes currently owning one or more ODBC handles. The number of handles are shown. This is revised frequently while in view. This is useful for debugging and monitoring performance." ) ); // lets assume, for the moment, that we can get monitoring info from DM... bEnabled = true; // setup table... { // we remember rows from last load so we can optimize next load... nRowsWithValues = 0; // we use a fixed number of row/cols so init here... setRowCount( MAXPROCESSES ); setColumnCount( 5 ); // init headers and decorations... { QStringList stringlist; setHorizontalHeaderLabels( stringlist << "PID" << "Environments" << "Connections" << "Statements" << "Descriptors" ); setSelectionBehavior( QAbstractItemView::SelectRows ); setSelectionMode( QAbstractItemView::SingleSelection ); verticalHeader()->setVisible( false ); } // preload table with item objects... for ( int nRow = 0; nRow < rowCount(); nRow++ ) { for ( int nCol = 0; nCol < columnCount(); nCol++ ) { setItem( nRow, nCol, new QTableWidgetItem( "" ) ); } } } // init timer... { hStats = 0; pTimer = new QTimer( this ); connect( pTimer, SIGNAL(timeout()), SLOT(slotLoad()) ); pTimer->start( 2000 ); // 1000 = 1second } } CMonitorProcesses::~CMonitorProcesses() { if ( hStats ) uodbc_close_stats( hStats ); } void CMonitorProcesses::slotLoad() { // only bother with this if we are visible... if ( !isVisible() ) return; if ( !bEnabled ) return; // init coms with DM but don't even bother the DM until (if) we become visible... if ( !hStats ) { if ( uodbc_open_stats( &hStats, UODBC_STATS_READ ) != 0 ) { // char szError[512]; // QMessageBox::critical( this, tr( "Monitor Processes" ), QString( "uodbc_open_stats failed\n%1" ).arg( uodbc_stats_error( szError, 512 ) ) ); // bEnabled = false; return; } } // get current processes info... { uodbc_stats_retentry aPIDs[MAXPROCESSES]; int nPIDs = uodbc_get_stats( hStats, 0, aPIDs, MAXPROCESSES ); for ( int nPID = 0; nPID < MAXPROCESSES; nPID++ ) { if ( nPID < nPIDs ) { // get handle count for current process... uodbc_stats_retentry aHandles[MAXHANDLES]; int nHandles = uodbc_get_stats( hStats, aPIDs[nPID].value.l_value, aHandles, MAXHANDLES ); if ( nHandles > 0 ) { item( nPID, 0 )->setText( QString( "%1" ).arg( aPIDs[nPID].value.l_value ) ); for ( int nHandle = 0; nHandle < MAXHANDLES; nHandle++ ) { item( nPID, nHandle + 1 )->setText( QString( "%1" ).arg( aHandles[nHandle].value.l_value ) ); } } else clearRow( nPID ); } else { // no need to clear remaining rows if no data in them... if ( nPID >= nRowsWithValues ) { nRowsWithValues = nPID; return; } clearRow( nPID ); } } } } void CMonitorProcesses::clearRow( int nRow ) { int nCol; for ( nCol = 0; nCol < columnCount(); nCol++ ) { item( nRow, nCol )->setText( "" ); } } unixODBC-2.2.14-p2/odbcinstQ4/CThreading.cpp0100644000076400007640000000756110733036523016736 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CThreading.h" #include "Threading48.xpm" const char *ODBC_HELP_THREADING = "Threading options are the means with which the DM handles concurrency (different bits of code trying to access the same internal data at the same time). " \ "If compiled with thread support the DM allows four different thread strategies.\n" \ "Level 0 - Only the DM internal structures are protected the driver is assumed to take care of it's self.\n" \ "Level 1 - The driver is protected down to the statement level each statement will be protected, and the same for the connect level for connect functions, note that descriptors are considered equal to statements when it comes to thread protection.\n" \ "Level 2 - The driver is protected at the connection level. only one thread can be in a particular driver at one time.\n" \ "Level 3 - The driver is protected at the env level, only one thing at a time."; CThreading::CThreading( QWidget *pwidgetParent ) : QWidget( pwidgetParent ) { QGridLayout *playout = new QGridLayout; pspinboxLevel = new QSpinBox; pspinboxLevel->setMinimum( 0 ); pspinboxLevel->setMaximum( 3 ); pspinboxLevel->setToolTip( tr( "set threading level" ) ); pspinboxLevel->setWhatsThis( tr( "Select the threading level. Higher numbers are safer while lower numbers allow more concurrency." ) ); playout->addWidget( new QLabel( tr( "Level" ) ), 0, 0 ); playout->addWidget( pspinboxLevel, 0, 1 ); QPushButton *ppushbuttonSetDefault = new QPushButton( "De&fault", this ); ppushbuttonSetDefault->setToolTip( tr( "click to set values to default" ) ); ppushbuttonSetDefault->setWhatsThis( tr( "Click to restore the default values." ) ); QPushButton *ppushbuttonApply = new QPushButton( "A&pply", this ); ppushbuttonApply->setToolTip( tr( "click to apply the current settings" ) ); ppushbuttonApply->setWhatsThis( tr( "Click this to save the current values." ) ); playout->addWidget( ppushbuttonSetDefault, 0, 2 ); playout->addWidget( ppushbuttonApply, 1, 2 ); connect( ppushbuttonSetDefault, SIGNAL(clicked()), SLOT(slotDefault()) ); connect( ppushbuttonApply, SIGNAL(clicked()), SLOT(slotApply()) ); playout->setRowStretch( 3, 10 ); playout->setColumnStretch( 1, 10 ); setLayout( playout ); setWindowIcon( QPixmap( xpmThreading48 ) ); setWindowTitle( tr( "Threading" ) ); loadData(); } CThreading::~CThreading() { } QString CThreading::windowHelp() { return QString( tr( ODBC_HELP_THREADING ) ); } bool CThreading::loadData() { slotDefault(); char szThreading[100]; SQLGetPrivateProfileString( "ODBC", "Threading", "3", szThreading, sizeof(szThreading), "odbcinst.ini" ); pspinboxLevel->setValue( atoi( szThreading ) ); return true; } bool CThreading::saveData() { if ( slotApply() ) return true; int n = QMessageBox::question( this, tr( "Save..." ), tr( "Some data could not be saved. Click Discard if its ok to lose changes." ), QMessageBox::Cancel | QMessageBox::Discard, QMessageBox::Discard ); if ( n == QMessageBox::Discard ) return true; return false; } bool CThreading::slotApply() { char szThreading[2]; sprintf( szThreading, "%d", pspinboxLevel->value() ); if ( !SQLWritePrivateProfileString( "ODBC", "Threading", szThreading, "odbcinst.ini" ) ) { CODBCInst::showErrors( this, tr( "Could not save options. You may not have the privileges to write odbcinst.ini." ) ); return false; } return true; } bool CThreading::slotDefault() { pspinboxLevel->setValue( 3 ); } unixODBC-2.2.14-p2/odbcinstQ4/CTracing.cpp0100644000076400007640000001376510733010462016415 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include "CTracing.h" #include "CFileSelector.h" #include "Tracing48.xpm" CTracing::CTracing( QWidget *pwidgetParent ) : QWidget( pwidgetParent ) { QGridLayout *playout = new QGridLayout; pcheckboxEnable = new QCheckBox; pcheckboxEnable->setToolTip( tr( "check to enable/disable tracing" ) ); pcheckboxEnable->setWhatsThis( tr( "Check this to tell the Driver Manager to log all ODBC calls to a trace file. Used for debugging. This will reduce performance and use up disk space - turn it off after each debugging session." ) ); pcheckboxForce = new QCheckBox; pcheckboxForce->setToolTip( tr( "check this to force tracing" ) ); pcheckboxForce->setWhatsThis( tr( "Check this to tell the Driver Manager that it should log all ODBC calls even if otherwise told not to (by app). This is only relevant if tracing is generally enabled." ) ); pfileselectorTraceFile = new CFileSelector( CFileSelector::TraceFile ); pfileselectorTraceFile->setToolTip( tr( "select a Trace File" ) ); pfileselectorTraceFile->setWhatsThis( tr( "Select a file to hold the trace output." ) ); pfileselectorTraceLibrary = new CFileSelector( CFileSelector::TraceLibrary ); pfileselectorTraceLibrary->setToolTip( tr( "select a Trace Library" ) ); pfileselectorTraceLibrary->setWhatsThis( tr( "The Trace Library is used, by the Driver Manager and/or Driver, to create the trace output. unixODBC has a standard one but a custom one can be used." ) ); playout->addWidget( new QLabel( tr( "Enable" ) ), 0, 0 ); playout->addWidget( new QLabel( tr( "Force" ) ), 1, 0 ); playout->addWidget( new QLabel( tr( "Output File" ) ), 2, 0 ); playout->addWidget( new QLabel( tr( "Library" ) ), 3, 0 ); playout->addWidget( pcheckboxEnable, 0, 1 ); playout->addWidget( pcheckboxForce, 1, 1 ); playout->addWidget( pfileselectorTraceFile, 2, 1 ); playout->addWidget( pfileselectorTraceLibrary, 3, 1 ); QPushButton *ppushbuttonSetDefault = new QPushButton( "De&fault", this ); ppushbuttonSetDefault->setToolTip( tr( "click this to restore the default values" ) ); ppushbuttonSetDefault->setWhatsThis( tr( "Click this to restore the default values - the values used when unixODBC was first installed." ) ); QPushButton *ppushbuttonApply = new QPushButton( "A&pply", this ); ppushbuttonApply->setToolTip( tr( "click this to apply the current values" ) ); ppushbuttonApply->setWhatsThis( tr( "Click this to save the current values. The values will be immediately effective for newly allocated environments and will remain in effect until different values are applied." ) ); playout->addWidget( ppushbuttonSetDefault, 0, 2 ); playout->addWidget( ppushbuttonApply, 1, 2 ); connect( ppushbuttonSetDefault, SIGNAL(clicked()), SLOT(slotDefault()) ); connect( ppushbuttonApply, SIGNAL(clicked()), SLOT(slotApply()) ); playout->setRowStretch( 3, 10 ); setLayout( playout ); setWindowIcon( QPixmap( xpmTracing48 ) ); setWindowTitle( tr( "Tracing" ) ); loadData(); } CTracing::~CTracing() { } bool CTracing::saveData() { if ( slotApply() ) return true; int n = QMessageBox::question( this, tr( "Save..." ), tr( "Some data could not be saved. Click Discard if its ok to lose changes." ), QMessageBox::Cancel | QMessageBox::Discard, QMessageBox::Discard ); if ( n == QMessageBox::Discard ) return true; return false; } bool CTracing::loadData() { slotDefault(); char szTracing[10]; char szForce[10]; char szTracingFile[FILENAME_MAX]; char szTracingLibrary[FILENAME_MAX]; char szTracingLibraryDefault[FILENAME_MAX]; SQLGetPrivateProfileString( "ODBC", "Trace", "No", szTracing, sizeof(szTracing), "odbcinst.ini" ); if ( szTracing[0] == '1' || toupper( szTracing[0] ) == 'Y' || toupper( szTracing[0] ) == 'O' ) pcheckboxEnable->setChecked( true ); SQLGetPrivateProfileString( "ODBC", "ForceTrace", "No", szForce, sizeof(szForce), "odbcinst.ini" ); if ( szForce[0] == '1' || toupper( szForce[0] ) == 'Y' || toupper( szForce[0] ) == 'O' ) pcheckboxForce->setChecked( true ); SQLGetPrivateProfileString( "ODBC", "TraceFile", "/tmp/Trace.txt", szTracingFile, sizeof(szTracingFile)-1, "odbcinst.ini" ); pfileselectorTraceFile->setText( szTracingFile ); if ( strlen( SHLIBEXT ) > 0 ) sprintf( szTracingLibraryDefault, "libodbctrac%s", SHLIBEXT ); else sprintf( szTracingLibraryDefault, "libodbctrac.so" ); SQLGetPrivateProfileString( "ODBC", "TraceLibrary", szTracingLibraryDefault, szTracingLibrary, sizeof(szTracingLibrary)-1, "odbcinst.ini" ); pfileselectorTraceLibrary->setText( szTracingLibrary ); return true; } bool CTracing::slotApply() { if ( !SQLWritePrivateProfileString( "ODBC", "Trace", ( pcheckboxEnable->isChecked() ? "1" : "0" ), "odbcinst.ini" ) ) { CODBCInst::showErrors( this, tr( "Could not save options. You may not have the privileges to write odbcinst.ini." ) ); return false; } SQLWritePrivateProfileString( "ODBC", "ForceTrace", ( pcheckboxForce->isChecked() ? "1" : "0" ), "odbcinst.ini" ); SQLWritePrivateProfileString( "ODBC", "TraceFile", pfileselectorTraceFile->getText().toAscii().data(), "odbcinst.ini" ); SQLWritePrivateProfileString( "ODBC", "TraceLibrary", pfileselectorTraceLibrary->getText().toAscii().data(), "odbcinst.ini" ); return true; } bool CTracing::slotDefault() { char szTracingLibraryDefault[FILENAME_MAX]; if ( strlen( SHLIBEXT ) > 0 ) sprintf( szTracingLibraryDefault, "libodbctrac%s", SHLIBEXT ); else sprintf( szTracingLibraryDefault, "libodbctrac.so" ); pcheckboxEnable->setChecked( false ); pcheckboxForce->setChecked( false ); pfileselectorTraceFile->setText( "/tmp/Trace.txt" ); pfileselectorTraceLibrary->setText( szTracingLibraryDefault ); } unixODBC-2.2.14-p2/odbcinstQ4/SQLManageDataSources.cpp0100644000076400007640000000664010725407316020634 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #include #include #include "CODBCConfig.h" #include "CDSNWizard.h" /*! * \brief Manage Data Sources * * SQLManageDataSources done using Qt4. Here is where we enter into Qt4 'world'. * * \param hWnd * * \return BOOL */ static BOOL QT4ManageDataSources( HWND hWnd ) { /* * Here, we handle case where a non QT app has called us. Our approach here is a bit different * than what we used for Qt3 because we were getting segfault upon app exit. Here; we instantiate * with a 'new' and NOT 'delete' it. Its a work around. */ if ( !qApp ) { int argc = 1; char *argv[] = { "odbcinstQ4", NULL }; QApplication *pApplication = new QApplication( argc, argv ); QCoreApplication::setOrganizationName("unixODBC"); QCoreApplication::setOrganizationDomain("unixodbc.org"); QCoreApplication::setApplicationName("ODBC Administrator"); } // missing parent widget? Use desktop... QWidget *pWidget = (QWidget*)hWnd; if ( !pWidget ) pWidget = qApp->desktop(); // show dialog... CODBCConfig odbcconfig( pWidget ); if ( odbcconfig.exec() == QDialog::Accepted ) return true; return false; } /*! * \brief Create Data Source * * SQLCreateDataSource done using Qt4. Here is where we enter into Qt4 'world'. * * \param hWnd * * \return BOOL */ static BOOL QT4CreateDataSource( HWND hWnd, LPCSTR pszDataSourceName ) { /* * Here, we handle case where a non QT app has called us. Our approach here is a bit different * than what we used for Qt3 because we were getting segfault upon app exit. Here; we instantiate * with a 'new' and NOT 'delete' it. Its a work around. */ if ( !qApp ) { int argc = 1; char *argv[] = { "odbcinstQ4", NULL }; QApplication *pApplication = new QApplication( argc, argv ); QCoreApplication::setOrganizationName("unixODBC"); QCoreApplication::setOrganizationDomain("unixodbc.org"); QCoreApplication::setApplicationName("ODBC Administrator"); } // missing parent widget? Use desktop... QWidget *pWidget = (QWidget*)hWnd; if ( !pWidget ) pWidget = qApp->desktop(); // show dialog... CDSNWizardData WizardData( pszDataSourceName ); CDSNWizard odbccreate( &WizardData, pWidget ); int nReturn = odbccreate.exec(); // sucks to have to do this after wizard is on its way out - no fail and Back :( if ( nReturn == QDialog::Accepted ) return CODBCInst::saveDataSourceName( pWidget, WizardData.hFirstProperty, WizardData.nType ); return false; } #ifdef __cplusplus extern "C" { #endif /*! * \brief Plugin in entry point. * * This entry point is called to implement the SQLManageDataSources call. This * plugin does it using Qt4. */ BOOL ODBCManageDataSources( HWND hWnd ) { return QT4ManageDataSources( hWnd ); } /*! * \brief Plugin in entry point. * * This entry point is called to implement the SQLCreateDataSource call. This * plugin does it using Qt4. */ BOOL ODBCCreateDataSource( HWND hWnd, LPCSTR lpszDS ) { return QT4CreateDataSource( hWnd, lpszDS ); } #ifdef __cplusplus }; #endif unixODBC-2.2.14-p2/odbcinstQ4/mCAbout.cpp0100644000076400007640000000320311057206753016251 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CAbout.h' ** ** Created: Tue Sep 2 10:56:59 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CAbout.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CAbout.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CAbout[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0 // eod }; static const char qt_meta_stringdata_CAbout[] = { "CAbout\0" }; const QMetaObject CAbout::staticMetaObject = { { &QTabWidget::staticMetaObject, qt_meta_stringdata_CAbout, qt_meta_data_CAbout, 0 } }; const QMetaObject *CAbout::metaObject() const { return &staticMetaObject; } void *CAbout::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CAbout)) return static_cast(const_cast< CAbout*>(this)); return QTabWidget::qt_metacast(_clname); } int CAbout::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QTabWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCAdvanced.cpp0100644000076400007640000000402311057207003016672 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CAdvanced.h' ** ** Created: Tue Sep 2 10:57:23 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CAdvanced.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CAdvanced.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CAdvanced[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 1, 10, // methods 0, 0, // properties 0, 0, // enums/sets // signals: signature, parameters, type, tag, flags 11, 10, 10, 10, 0x05, 0 // eod }; static const char qt_meta_stringdata_CAdvanced[] = { "CAdvanced\0\0signalChanged()\0" }; const QMetaObject CAdvanced::staticMetaObject = { { &QTabWidget::staticMetaObject, qt_meta_stringdata_CAdvanced, qt_meta_data_CAdvanced, 0 } }; const QMetaObject *CAdvanced::metaObject() const { return &staticMetaObject; } void *CAdvanced::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CAdvanced)) return static_cast(const_cast< CAdvanced*>(this)); return QTabWidget::qt_metacast(_clname); } int CAdvanced::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QTabWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: signalChanged(); break; } _id -= 1; } return _id; } // SIGNAL 0 void CAdvanced::signalChanged() { QMetaObject::activate(this, &staticMetaObject, 0, 0); } unixODBC-2.2.14-p2/odbcinstQ4/mCDataSourceNameList.cpp0100644000076400007640000000473111057207033020665 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDataSourceNameList.h' ** ** Created: Tue Sep 2 10:57:47 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDataSourceNameList.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDataSourceNameList.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDataSourceNameList[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 5, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 21, 20, 20, 20, 0x0a, 31, 20, 20, 20, 0x0a, 42, 20, 20, 20, 0x0a, 55, 20, 20, 20, 0x0a, 72, 66, 20, 20, 0x0a, 0 // eod }; static const char qt_meta_stringdata_CDataSourceNameList[] = { "CDataSourceNameList\0\0slotAdd()\0" "slotEdit()\0slotDelete()\0slotLoad()\0" "pItem\0slotDoubleClick(QTableWidgetItem*)\0" }; const QMetaObject CDataSourceNameList::staticMetaObject = { { &QTableWidget::staticMetaObject, qt_meta_stringdata_CDataSourceNameList, qt_meta_data_CDataSourceNameList, 0 } }; const QMetaObject *CDataSourceNameList::metaObject() const { return &staticMetaObject; } void *CDataSourceNameList::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDataSourceNameList)) return static_cast(const_cast< CDataSourceNameList*>(this)); return QTableWidget::qt_metacast(_clname); } int CDataSourceNameList::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QTableWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotAdd(); break; case 1: slotEdit(); break; case 2: slotDelete(); break; case 3: slotLoad(); break; case 4: slotDoubleClick((*reinterpret_cast< QTableWidgetItem*(*)>(_a[1]))); break; } _id -= 5; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCDataSourceNamesFile.cpp0100644000076400007640000000461511057207062021017 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDataSourceNamesFile.h' ** ** Created: Tue Sep 2 10:58:10 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDataSourceNamesFile.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDataSourceNamesFile.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDataSourceNamesFile[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 5, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 22, 21, 21, 21, 0x0a, 33, 21, 21, 21, 0x09, 43, 21, 21, 21, 0x09, 54, 21, 21, 21, 0x09, 67, 21, 21, 21, 0x09, 0 // eod }; static const char qt_meta_stringdata_CDataSourceNamesFile[] = { "CDataSourceNamesFile\0\0slotLoad()\0" "slotAdd()\0slotEdit()\0slotDelete()\0" "slotSetDefault()\0" }; const QMetaObject CDataSourceNamesFile::staticMetaObject = { { &QWidget::staticMetaObject, qt_meta_stringdata_CDataSourceNamesFile, qt_meta_data_CDataSourceNamesFile, 0 } }; const QMetaObject *CDataSourceNamesFile::metaObject() const { return &staticMetaObject; } void *CDataSourceNamesFile::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDataSourceNamesFile)) return static_cast(const_cast< CDataSourceNamesFile*>(this)); return QWidget::qt_metacast(_clname); } int CDataSourceNamesFile::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotLoad(); break; case 1: slotAdd(); break; case 2: slotEdit(); break; case 3: slotDelete(); break; case 4: slotSetDefault(); break; } _id -= 5; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCDataSourceNamesFileModel.cpp0100644000076400007640000000544411057207111021774 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDataSourceNamesFileModel.h' ** ** Created: Tue Sep 2 10:58:33 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDataSourceNamesFileModel.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDataSourceNamesFileModel.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDataSourceNamesFileModel[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 3, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 48, 32, 27, 26, 0x0a, 86, 75, 27, 26, 0x0a, 118, 75, 27, 26, 0x0a, 0 // eod }; static const char qt_meta_stringdata_CDataSourceNamesFileModel[] = { "CDataSourceNamesFileModel\0\0bool\0" "stringDirectory\0addDataSourceName(QString)\0" "modelindex\0editDataSourceName(QModelIndex)\0" "deleteDataSourceName(QModelIndex)\0" }; const QMetaObject CDataSourceNamesFileModel::staticMetaObject = { { &QDirModel::staticMetaObject, qt_meta_stringdata_CDataSourceNamesFileModel, qt_meta_data_CDataSourceNamesFileModel, 0 } }; const QMetaObject *CDataSourceNamesFileModel::metaObject() const { return &staticMetaObject; } void *CDataSourceNamesFileModel::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDataSourceNamesFileModel)) return static_cast(const_cast< CDataSourceNamesFileModel*>(this)); return QDirModel::qt_metacast(_clname); } int CDataSourceNamesFileModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDirModel::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: { bool _r = addDataSourceName((*reinterpret_cast< const QString(*)>(_a[1]))); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 1: { bool _r = editDataSourceName((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 2: { bool _r = deleteDataSourceName((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; } _id -= 3; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCDataSourceNames.cpp0100644000076400007640000000376511057207140020221 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDataSourceNames.h' ** ** Created: Tue Sep 2 10:58:56 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDataSourceNames.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDataSourceNames.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDataSourceNames[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 1, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 18, 17, 17, 17, 0x0a, 0 // eod }; static const char qt_meta_stringdata_CDataSourceNames[] = { "CDataSourceNames\0\0slotLoad()\0" }; const QMetaObject CDataSourceNames::staticMetaObject = { { &QWidget::staticMetaObject, qt_meta_stringdata_CDataSourceNames, qt_meta_data_CDataSourceNames, 0 } }; const QMetaObject *CDataSourceNames::metaObject() const { return &staticMetaObject; } void *CDataSourceNames::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDataSourceNames)) return static_cast(const_cast< CDataSourceNames*>(this)); return QWidget::qt_metacast(_clname); } int CDataSourceNames::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotLoad(); break; } _id -= 1; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCDriverList.cpp0100644000076400007640000000514711057207167017277 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDriverList.h' ** ** Created: Tue Sep 2 10:59:19 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDriverList.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDriverList.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDriverList[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 6, 10, // methods 0, 0, // properties 0, 0, // enums/sets // signals: signature, parameters, type, tag, flags 13, 12, 12, 12, 0x05, // slots: signature, parameters, type, tag, flags 29, 12, 12, 12, 0x0a, 39, 12, 12, 12, 0x0a, 50, 12, 12, 12, 0x0a, 63, 12, 12, 12, 0x0a, 80, 74, 12, 12, 0x0a, 0 // eod }; static const char qt_meta_stringdata_CDriverList[] = { "CDriverList\0\0signalChanged()\0slotAdd()\0" "slotEdit()\0slotDelete()\0slotLoad()\0" "pItem\0slotDoubleClick(QTableWidgetItem*)\0" }; const QMetaObject CDriverList::staticMetaObject = { { &QTableWidget::staticMetaObject, qt_meta_stringdata_CDriverList, qt_meta_data_CDriverList, 0 } }; const QMetaObject *CDriverList::metaObject() const { return &staticMetaObject; } void *CDriverList::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDriverList)) return static_cast(const_cast< CDriverList*>(this)); return QTableWidget::qt_metacast(_clname); } int CDriverList::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QTableWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: signalChanged(); break; case 1: slotAdd(); break; case 2: slotEdit(); break; case 3: slotDelete(); break; case 4: slotLoad(); break; case 5: slotDoubleClick((*reinterpret_cast< QTableWidgetItem*(*)>(_a[1]))); break; } _id -= 6; } return _id; } // SIGNAL 0 void CDriverList::signalChanged() { QMetaObject::activate(this, &staticMetaObject, 0, 0); } unixODBC-2.2.14-p2/odbcinstQ4/mCDriverPrompt.cpp0100644000076400007640000000370711057207216017640 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDriverPrompt.h' ** ** Created: Tue Sep 2 10:59:42 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDriverPrompt.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDriverPrompt.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDriverPrompt[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 1, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 15, 14, 14, 14, 0x09, 0 // eod }; static const char qt_meta_stringdata_CDriverPrompt[] = { "CDriverPrompt\0\0slotOk()\0" }; const QMetaObject CDriverPrompt::staticMetaObject = { { &QDialog::staticMetaObject, qt_meta_stringdata_CDriverPrompt, qt_meta_data_CDriverPrompt, 0 } }; const QMetaObject *CDriverPrompt::metaObject() const { return &staticMetaObject; } void *CDriverPrompt::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDriverPrompt)) return static_cast(const_cast< CDriverPrompt*>(this)); return QDialog::qt_metacast(_clname); } int CDriverPrompt::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotOk(); break; } _id -= 1; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCDSNWizardProperties.cpp0100644000076400007640000000351211057207246021062 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDSNWizardProperties.h' ** ** Created: Tue Sep 2 11:00:06 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDSNWizardProperties.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDSNWizardProperties.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDSNWizardProperties[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0 // eod }; static const char qt_meta_stringdata_CDSNWizardProperties[] = { "CDSNWizardProperties\0" }; const QMetaObject CDSNWizardProperties::staticMetaObject = { { &QWizardPage::staticMetaObject, qt_meta_stringdata_CDSNWizardProperties, qt_meta_data_CDSNWizardProperties, 0 } }; const QMetaObject *CDSNWizardProperties::metaObject() const { return &staticMetaObject; } void *CDSNWizardProperties::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDSNWizardProperties)) return static_cast(const_cast< CDSNWizardProperties*>(this)); return QWizardPage::qt_metacast(_clname); } int CDSNWizardProperties::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWizardPage::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCDSNWizardDriver.cpp0100644000076400007640000000342211057207275020163 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDSNWizardDriver.h' ** ** Created: Tue Sep 2 11:00:29 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDSNWizardDriver.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDSNWizardDriver.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDSNWizardDriver[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0 // eod }; static const char qt_meta_stringdata_CDSNWizardDriver[] = { "CDSNWizardDriver\0" }; const QMetaObject CDSNWizardDriver::staticMetaObject = { { &QWizardPage::staticMetaObject, qt_meta_stringdata_CDSNWizardDriver, qt_meta_data_CDSNWizardDriver, 0 } }; const QMetaObject *CDSNWizardDriver::metaObject() const { return &staticMetaObject; } void *CDSNWizardDriver::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDSNWizardDriver)) return static_cast(const_cast< CDSNWizardDriver*>(this)); return QWizardPage::qt_metacast(_clname); } int CDSNWizardDriver::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWizardPage::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCDSNWizardEntre.cpp0100644000076400007640000000340411057207324020000 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDSNWizardEntre.h' ** ** Created: Tue Sep 2 11:00:52 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDSNWizardEntre.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDSNWizardEntre.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDSNWizardEntre[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0 // eod }; static const char qt_meta_stringdata_CDSNWizardEntre[] = { "CDSNWizardEntre\0" }; const QMetaObject CDSNWizardEntre::staticMetaObject = { { &QWizardPage::staticMetaObject, qt_meta_stringdata_CDSNWizardEntre, qt_meta_data_CDSNWizardEntre, 0 } }; const QMetaObject *CDSNWizardEntre::metaObject() const { return &staticMetaObject; } void *CDSNWizardEntre::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDSNWizardEntre)) return static_cast(const_cast< CDSNWizardEntre*>(this)); return QWizardPage::qt_metacast(_clname); } int CDSNWizardEntre::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWizardPage::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCDSNWizardFini.cpp0100644000076400007640000000336611057207354017622 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDSNWizardFini.h' ** ** Created: Tue Sep 2 11:01:16 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDSNWizardFini.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDSNWizardFini.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDSNWizardFini[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0 // eod }; static const char qt_meta_stringdata_CDSNWizardFini[] = { "CDSNWizardFini\0" }; const QMetaObject CDSNWizardFini::staticMetaObject = { { &QWizardPage::staticMetaObject, qt_meta_stringdata_CDSNWizardFini, qt_meta_data_CDSNWizardFini, 0 } }; const QMetaObject *CDSNWizardFini::metaObject() const { return &staticMetaObject; } void *CDSNWizardFini::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDSNWizardFini)) return static_cast(const_cast< CDSNWizardFini*>(this)); return QWizardPage::qt_metacast(_clname); } int CDSNWizardFini::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWizardPage::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCDSNWizard.cpp0100644000076400007640000000364111057207404017004 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDSNWizard.h' ** ** Created: Tue Sep 2 11:01:40 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDSNWizard.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDSNWizard.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDSNWizard[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 1, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 12, 11, 11, 11, 0x09, 0 // eod }; static const char qt_meta_stringdata_CDSNWizard[] = { "CDSNWizard\0\0slotHelp()\0" }; const QMetaObject CDSNWizard::staticMetaObject = { { &QWizard::staticMetaObject, qt_meta_stringdata_CDSNWizard, qt_meta_data_CDSNWizard, 0 } }; const QMetaObject *CDSNWizard::metaObject() const { return &staticMetaObject; } void *CDSNWizard::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDSNWizard)) return static_cast(const_cast< CDSNWizard*>(this)); return QWizard::qt_metacast(_clname); } int CDSNWizard::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWizard::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotHelp(); break; } _id -= 1; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCDSNWizardType.cpp0100644000076400007640000000336611057207433017654 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CDSNWizardType.h' ** ** Created: Tue Sep 2 11:02:03 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CDSNWizardType.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CDSNWizardType.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CDSNWizardType[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0 // eod }; static const char qt_meta_stringdata_CDSNWizardType[] = { "CDSNWizardType\0" }; const QMetaObject CDSNWizardType::staticMetaObject = { { &QWizardPage::staticMetaObject, qt_meta_stringdata_CDSNWizardType, qt_meta_data_CDSNWizardType, 0 } }; const QMetaObject *CDSNWizardType::metaObject() const { return &staticMetaObject; } void *CDSNWizardType::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CDSNWizardType)) return static_cast(const_cast< CDSNWizardType*>(this)); return QWizardPage::qt_metacast(_clname); } int CDSNWizardType::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWizardPage::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCFileSelector.cpp0100644000076400007640000000434211057207463017563 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CFileSelector.h' ** ** Created: Tue Sep 2 11:02:27 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CFileSelector.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CFileSelector.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CFileSelector[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 2, 10, // methods 0, 0, // properties 0, 0, // enums/sets // signals: signature, parameters, type, tag, flags 15, 14, 14, 14, 0x05, // slots: signature, parameters, type, tag, flags 31, 14, 14, 14, 0x0a, 0 // eod }; static const char qt_meta_stringdata_CFileSelector[] = { "CFileSelector\0\0signalChanged()\0" "slotInvokeDialog()\0" }; const QMetaObject CFileSelector::staticMetaObject = { { &QWidget::staticMetaObject, qt_meta_stringdata_CFileSelector, qt_meta_data_CFileSelector, 0 } }; const QMetaObject *CFileSelector::metaObject() const { return &staticMetaObject; } void *CFileSelector::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CFileSelector)) return static_cast(const_cast< CFileSelector*>(this)); return QWidget::qt_metacast(_clname); } int CFileSelector::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: signalChanged(); break; case 1: slotInvokeDialog(); break; } _id -= 2; } return _id; } // SIGNAL 0 void CFileSelector::signalChanged() { QMetaObject::activate(this, &staticMetaObject, 0, 0); } unixODBC-2.2.14-p2/odbcinstQ4/mCHelp.cpp0100644000076400007640000000354711057207512016074 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CHelp.h' ** ** Created: Tue Sep 2 11:02:50 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CHelp.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CHelp.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CHelp[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 1, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 7, 6, 6, 6, 0x09, 0 // eod }; static const char qt_meta_stringdata_CHelp[] = { "CHelp\0\0slotToggleView()\0" }; const QMetaObject CHelp::staticMetaObject = { { &QWidget::staticMetaObject, qt_meta_stringdata_CHelp, qt_meta_data_CHelp, 0 } }; const QMetaObject *CHelp::metaObject() const { return &staticMetaObject; } void *CHelp::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CHelp)) return static_cast(const_cast< CHelp*>(this)); return QWidget::qt_metacast(_clname); } int CHelp::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotToggleView(); break; } _id -= 1; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCManageDataSourceNames.cpp0100644000076400007640000000412211057207541021323 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CManageDataSourceNames.h' ** ** Created: Tue Sep 2 11:03:13 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CManageDataSourceNames.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CManageDataSourceNames.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CManageDataSourceNames[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 1, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 24, 23, 23, 23, 0x0a, 0 // eod }; static const char qt_meta_stringdata_CManageDataSourceNames[] = { "CManageDataSourceNames\0\0slotLoad()\0" }; const QMetaObject CManageDataSourceNames::staticMetaObject = { { &QTabWidget::staticMetaObject, qt_meta_stringdata_CManageDataSourceNames, qt_meta_data_CManageDataSourceNames, 0 } }; const QMetaObject *CManageDataSourceNames::metaObject() const { return &staticMetaObject; } void *CManageDataSourceNames::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CManageDataSourceNames)) return static_cast(const_cast< CManageDataSourceNames*>(this)); return QTabWidget::qt_metacast(_clname); } int CManageDataSourceNames::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QTabWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotLoad(); break; } _id -= 1; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCManageDrivers.cpp0100644000076400007640000000412511057207570017730 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CManageDrivers.h' ** ** Created: Tue Sep 2 11:03:36 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CManageDrivers.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CManageDrivers.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CManageDrivers[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 1, 10, // methods 0, 0, // properties 0, 0, // enums/sets // signals: signature, parameters, type, tag, flags 16, 15, 15, 15, 0x05, 0 // eod }; static const char qt_meta_stringdata_CManageDrivers[] = { "CManageDrivers\0\0signalChanged()\0" }; const QMetaObject CManageDrivers::staticMetaObject = { { &QWidget::staticMetaObject, qt_meta_stringdata_CManageDrivers, qt_meta_data_CManageDrivers, 0 } }; const QMetaObject *CManageDrivers::metaObject() const { return &staticMetaObject; } void *CManageDrivers::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CManageDrivers)) return static_cast(const_cast< CManageDrivers*>(this)); return QWidget::qt_metacast(_clname); } int CManageDrivers::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: signalChanged(); break; } _id -= 1; } return _id; } // SIGNAL 0 void CManageDrivers::signalChanged() { QMetaObject::activate(this, &staticMetaObject, 0, 0); } unixODBC-2.2.14-p2/odbcinstQ4/mCODBCConfig.cpp0100644000076400007640000000471511057207620017037 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CODBCConfig.h' ** ** Created: Tue Sep 2 11:04:00 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CODBCConfig.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CODBCConfig.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CODBCConfig[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 4, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 60, 13, 12, 12, 0x09, 110, 12, 12, 12, 0x09, 135, 121, 12, 12, 0x09, 158, 12, 12, 12, 0x09, 0 // eod }; static const char qt_meta_stringdata_CODBCConfig[] = { "CODBCConfig\0\0" "plistwidgetitemCurrent,plistwidgetitemPrevious\0" "slotChangePage(QListWidgetItem*,QListWidgetItem*)\0" "slotHelp()\0stringMessage\0" "slotHelpError(QString)\0slotAccept()\0" }; const QMetaObject CODBCConfig::staticMetaObject = { { &QDialog::staticMetaObject, qt_meta_stringdata_CODBCConfig, qt_meta_data_CODBCConfig, 0 } }; const QMetaObject *CODBCConfig::metaObject() const { return &staticMetaObject; } void *CODBCConfig::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CODBCConfig)) return static_cast(const_cast< CODBCConfig*>(this)); return QDialog::qt_metacast(_clname); } int CODBCConfig::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotChangePage((*reinterpret_cast< QListWidgetItem*(*)>(_a[1])),(*reinterpret_cast< QListWidgetItem*(*)>(_a[2]))); break; case 1: slotHelp(); break; case 2: slotHelpError((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 3: slotAccept(); break; } _id -= 4; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCPooling.cpp0100644000076400007640000000417611057207647016623 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CPooling.h' ** ** Created: Tue Sep 2 11:04:23 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CPooling.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CPooling.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CPooling[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 2, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 15, 9, 10, 9, 0x0a, 27, 9, 10, 9, 0x0a, 0 // eod }; static const char qt_meta_stringdata_CPooling[] = { "CPooling\0\0bool\0slotApply()\0slotDefault()\0" }; const QMetaObject CPooling::staticMetaObject = { { &QWidget::staticMetaObject, qt_meta_stringdata_CPooling, qt_meta_data_CPooling, 0 } }; const QMetaObject *CPooling::metaObject() const { return &staticMetaObject; } void *CPooling::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CPooling)) return static_cast(const_cast< CPooling*>(this)); return QWidget::qt_metacast(_clname); } int CPooling::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: { bool _r = slotApply(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 1: { bool _r = slotDefault(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; } _id -= 2; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCPropertiesDelegate.cpp0100644000076400007640000000350211057207676020775 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CPropertiesDelegate.h' ** ** Created: Tue Sep 2 11:04:46 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CPropertiesDelegate.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CPropertiesDelegate.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CPropertiesDelegate[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0 // eod }; static const char qt_meta_stringdata_CPropertiesDelegate[] = { "CPropertiesDelegate\0" }; const QMetaObject CPropertiesDelegate::staticMetaObject = { { &QItemDelegate::staticMetaObject, qt_meta_stringdata_CPropertiesDelegate, qt_meta_data_CPropertiesDelegate, 0 } }; const QMetaObject *CPropertiesDelegate::metaObject() const { return &staticMetaObject; } void *CPropertiesDelegate::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CPropertiesDelegate)) return static_cast(const_cast< CPropertiesDelegate*>(this)); return QItemDelegate::qt_metacast(_clname); } int CPropertiesDelegate::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QItemDelegate::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCPropertiesDialog.cpp0100644000076400007640000000342411057207725020460 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CPropertiesDialog.h' ** ** Created: Tue Sep 2 11:05:09 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CPropertiesDialog.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CPropertiesDialog.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CPropertiesDialog[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0 // eod }; static const char qt_meta_stringdata_CPropertiesDialog[] = { "CPropertiesDialog\0" }; const QMetaObject CPropertiesDialog::staticMetaObject = { { &QDialog::staticMetaObject, qt_meta_stringdata_CPropertiesDialog, qt_meta_data_CPropertiesDialog, 0 } }; const QMetaObject *CPropertiesDialog::metaObject() const { return &staticMetaObject; } void *CPropertiesDialog::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CPropertiesDialog)) return static_cast(const_cast< CPropertiesDialog*>(this)); return QDialog::qt_metacast(_clname); } int CPropertiesDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCMonitorHandleCounts.cpp0100644000076400007640000000405511057207754021146 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CMonitorHandleCounts.h' ** ** Created: Tue Sep 2 11:05:32 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CMonitorHandleCounts.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CMonitorHandleCounts.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CMonitorHandleCounts[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 1, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 22, 21, 21, 21, 0x09, 0 // eod }; static const char qt_meta_stringdata_CMonitorHandleCounts[] = { "CMonitorHandleCounts\0\0slotLoad()\0" }; const QMetaObject CMonitorHandleCounts::staticMetaObject = { { &QWidget::staticMetaObject, qt_meta_stringdata_CMonitorHandleCounts, qt_meta_data_CMonitorHandleCounts, 0 } }; const QMetaObject *CMonitorHandleCounts::metaObject() const { return &staticMetaObject; } void *CMonitorHandleCounts::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CMonitorHandleCounts)) return static_cast(const_cast< CMonitorHandleCounts*>(this)); return QWidget::qt_metacast(_clname); } int CMonitorHandleCounts::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotLoad(); break; } _id -= 1; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCMonitor.cpp0100644000076400007640000000323711057210003016614 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CMonitor.h' ** ** Created: Tue Sep 2 11:05:55 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CMonitor.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CMonitor.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CMonitor[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 0, 0, // methods 0, 0, // properties 0, 0, // enums/sets 0 // eod }; static const char qt_meta_stringdata_CMonitor[] = { "CMonitor\0" }; const QMetaObject CMonitor::staticMetaObject = { { &QTabWidget::staticMetaObject, qt_meta_stringdata_CMonitor, qt_meta_data_CMonitor, 0 } }; const QMetaObject *CMonitor::metaObject() const { return &staticMetaObject; } void *CMonitor::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CMonitor)) return static_cast(const_cast< CMonitor*>(this)); return QTabWidget::qt_metacast(_clname); } int CMonitor::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QTabWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCMonitorProcesses.cpp0100644000076400007640000000422611057210032020504 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CMonitorProcesses.h' ** ** Created: Tue Sep 2 11:06:18 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CMonitorProcesses.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CMonitorProcesses.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CMonitorProcesses[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 2, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 19, 18, 18, 18, 0x09, 35, 30, 18, 18, 0x09, 0 // eod }; static const char qt_meta_stringdata_CMonitorProcesses[] = { "CMonitorProcesses\0\0slotLoad()\0nRow\0" "clearRow(int)\0" }; const QMetaObject CMonitorProcesses::staticMetaObject = { { &QTableWidget::staticMetaObject, qt_meta_stringdata_CMonitorProcesses, qt_meta_data_CMonitorProcesses, 0 } }; const QMetaObject *CMonitorProcesses::metaObject() const { return &staticMetaObject; } void *CMonitorProcesses::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CMonitorProcesses)) return static_cast(const_cast< CMonitorProcesses*>(this)); return QTableWidget::qt_metacast(_clname); } int CMonitorProcesses::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QTableWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotLoad(); break; case 1: clearRow((*reinterpret_cast< int(*)>(_a[1]))); break; } _id -= 2; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCThreading.cpp0100644000076400007640000000423211057210061017072 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CThreading.h' ** ** Created: Tue Sep 2 11:06:41 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CThreading.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CThreading.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CThreading[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 2, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 17, 11, 12, 11, 0x0a, 29, 11, 12, 11, 0x0a, 0 // eod }; static const char qt_meta_stringdata_CThreading[] = { "CThreading\0\0bool\0slotApply()\0slotDefault()\0" }; const QMetaObject CThreading::staticMetaObject = { { &QWidget::staticMetaObject, qt_meta_stringdata_CThreading, qt_meta_data_CThreading, 0 } }; const QMetaObject *CThreading::metaObject() const { return &staticMetaObject; } void *CThreading::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CThreading)) return static_cast(const_cast< CThreading*>(this)); return QWidget::qt_metacast(_clname); } int CThreading::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: { bool _r = slotApply(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 1: { bool _r = slotDefault(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; } _id -= 2; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/mCTracing.cpp0100644000076400007640000000417611057210111016557 0ustar nicknick/**************************************************************************** ** Meta object code from reading C++ file 'CTracing.h' ** ** Created: Tue Sep 2 11:07:05 2008 ** by: The Qt Meta Object Compiler version 59 (Qt 4.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "CTracing.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'CTracing.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 59 #error "This file was generated using the moc from 4.3.2. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif static const uint qt_meta_data_CTracing[] = { // content: 1, // revision 0, // classname 0, 0, // classinfo 2, 10, // methods 0, 0, // properties 0, 0, // enums/sets // slots: signature, parameters, type, tag, flags 15, 9, 10, 9, 0x0a, 27, 9, 10, 9, 0x0a, 0 // eod }; static const char qt_meta_stringdata_CTracing[] = { "CTracing\0\0bool\0slotApply()\0slotDefault()\0" }; const QMetaObject CTracing::staticMetaObject = { { &QWidget::staticMetaObject, qt_meta_stringdata_CTracing, qt_meta_data_CTracing, 0 } }; const QMetaObject *CTracing::metaObject() const { return &staticMetaObject; } void *CTracing::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_CTracing)) return static_cast(const_cast< CTracing*>(this)); return QWidget::qt_metacast(_clname); } int CTracing::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: { bool _r = slotApply(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 1: { bool _r = slotDefault(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; } _id -= 2; } return _id; } unixODBC-2.2.14-p2/odbcinstQ4/CAbout.h0100644000076400007640000000152510732361675015552 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CABOUT_H #define CABOUT_H #include "CODBCInst.h" #define ODBC_HELP_ABOUT "Hopefully you find some interesting leads to more information about unixODBC and ODBC (in general) here." /*! * \class CAbout * \brief Provides information about this application and this project (unixODBC). * * This widget is used as a tab for CODBCConfig. * * \sa CManageDataSourceNames * CManageDrivers */ class CAbout : public QTabWidget { Q_OBJECT public: CAbout( QWidget* pParent = NULL ); virtual ~CAbout(); QString windowHelp() { return QString( tr( ODBC_HELP_ABOUT ) ); } bool saveData() { return true; } }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CAdvanced.h0100644000076400007640000000223310733004453016167 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CADVANCED_h #define CADVANCED_h #include "CODBCInst.h" #include #define ODBC_HELP_ADVANCED "Most of the features which usually require elevated privileges (read; 'root' access) are administered here." class CManageDrivers; class CPooling; class CTracing; class CThreading; /*! * \class CAdvanced * \brief Groups the advanced administration features. * * This widget presents a set of tabs for the various 'advanced' features. * * \sa CManageDataSourceNames * CManageDrivers * CStats * CAbout */ class CAdvanced : public QTabWidget { Q_OBJECT public: CAdvanced( QWidget* pwidgetParent = NULL ); virtual ~CAdvanced(); QString windowHelp() { return QString( tr( ODBC_HELP_ADVANCED ) ); } bool saveData(); signals: void signalChanged(); protected: CManageDrivers *pManageDrivers; CPooling * pPooling; CTracing * pTracing; CThreading * pThreading; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDataSourceNameList.h0100644000076400007640000000311010732361675020157 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDATASOURCENAMELIST_H #define CDATASOURCENAMELIST_H #include "CODBCInst.h" #include /*! * \brief A simple table widget listing Data Source Names (DSN's). * * You can use this widget to present a list of DSN's so that one can * simply be selected. Simply instantiating the widget is enough to * display the DSN's. Then one can get the selected DSN by calling the * getter functions; * * \li getDataSourceName * \li getDescription * * This widget can also be used as the core widget for managing the DSN's * by connecting to the following slots; * * \li slotAdd * \li slotEdit * \li slotDelete * * \note ODBC_USER_DSN's can be edited with normal privileges but ODBC_SYSTEM_DSN's, * typically, will require elevated system privileges such as 'root' access. * * \sa CDriverList * CDataSources */ class CDataSourceNameList : public QTableWidget { Q_OBJECT public: CDataSourceNameList( QWidget* pwidgetParent = NULL, int nSource = ODBC_BOTH_DSN ); virtual ~CDataSourceNameList(); QString getDataSourceName(); QString getDescription(); public slots: void slotAdd(); void slotEdit(); void slotDelete(); void slotLoad(); void slotDoubleClick( QTableWidgetItem *pItem ); private: int nSource; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDataSourceNamesFile.h0100644000076400007640000000340410732361675020314 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDATASOURCENAMESFILE_H #define CDATASOURCENAMESFILE_H #include "CODBCInst.h" #define ODBC_HELP_DATASOURCES_FILE "File Data Source Names (DSN's) are files which hold connection options. These are more versatile than regular DSN's because the files can be shared over a network and/or easily distributed throughout a network." class CDataSourceNamesFileModel; class CFileSelector; class QListView; class QLabel; /*! * \class CDataSourceNamesFile * * \brief Widget to allow User to manage FileDSN's including setting default dir. * * Presents a list of FileDSN's in the given Path. The User may; * change the Path and add/remove/edit a selected FileDSN. * * \note Elevated privileges (root) may be required to add/remove/edit a FileDSN. This * depends largely on where the FileDSN is located. * * \sa CManageDataSources * CManageDrivers * CStats * CTracing * CAbout */ class CDataSourceNamesFile : public QWidget { Q_OBJECT public: CDataSourceNamesFile( QWidget* pwidgetParent = NULL ); virtual ~CDataSourceNamesFile(); QString windowHelp() { return QString( tr( ODBC_HELP_DATASOURCES_FILE ) ); } public slots: void slotLoad(); protected slots: void slotAdd(); void slotEdit(); void slotDelete(); void slotSetDefault(); protected: QLabel * plabelDefault; CFileSelector * pFileSelector; CDataSourceNamesFileModel * pDataSourceNamesFileModel; QListView * pListView; QString getDefault(); }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDataSourceNamesFileModel.h0100644000076400007640000000342510732361675021300 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDATASOURCENAMESFILEMODEL_H #define CDATASOURCENAMESFILEMODEL_H #include "CODBCInst.h" #include /*! * \class CDataSourceNamesFileModel * * \brief Presents file-based Data Source Names. * * This model can be used to display file-based Data Source Names in a given * directory. * * This model extends QDirModel by; * * \li using default filter (*.dsn) * \li other, more appropriate, defaults (QDir::Files, QDir::Name) * \li methods to; add, edit, and delete a file-based Data Source Name * * The usefullness of this being a model instead of being a widget (QListView * derived perhaps) or some other implementation is debatable. But this is a * nice experiment with using a model in this special way - if nothing else. * * \code { pDataSourceNamesFileModel = new CDataSourceNamesFileModel; pListView = new QListView; pListView->setViewMode( QListView::IconMode ); pListView->setModel( pDataSourceNamesFileModel ); pListView->setRootIndex( pDataSourceNamesFileModel->index( stringDirectory ) ); playout->addWidget( pListView, 1, 0 ); } * \endcode * * \sa */ class CDataSourceNamesFileModel : public QDirModel { Q_OBJECT public: CDataSourceNamesFileModel( QObject* pobjectParent = NULL ); virtual ~CDataSourceNamesFileModel(); public slots: bool addDataSourceName( const QString &stringDirectory ); bool editDataSourceName( const QModelIndex &modelindex ); bool deleteDataSourceName( const QModelIndex &modelindex ); }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDataSourceNames.h0100644000076400007640000000372510732361675017522 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDATASOURCENAMES_H #define CDATASOURCENAMES_H #include "CODBCInst.h" #define ODBC_HELP_DATASOURCES_USER "User Data Source Names (DSN's) exist for use by a specific system account (User). The DSN's are typically stored somewhere in the User's home directory. These have precedence over System DSN's when DSN exists in both." #define ODBC_HELP_DATASOURCES_SYSTEM "System Data Source Names (DSN's) exist for use by all system accounts. Elevated privileges (such as 'root') are normally required to manage these." class CDataSourceNameList; /*! * \class CDataSourceNames * * \brief Widget to allow Data Source Names (DSN's) to be managed. * * This is used to support \sa CManageDataSourceNames by implementing * the bulk of the features in a way which is useful for a specific scope. * This widget can be instantiated with ODBC_USER_DSN to support managing * User DSN's or with ODBC_SYSTEM_DSN to support managing System DSN's. * * Basically; this widget wraps some buttons around a CDataSourceNames so that * the DSN's can be; Added, Edited, or Removed. * * \note Do NOT try to use this to manage ODBC_BOTH_DSN. See \sa CManageDataSourceNames * for that. * * \sa CManageDataSourceNames * CDataSourceNamesFile */ class CDataSourceNames : public QWidget { Q_OBJECT public: CDataSourceNames( QWidget* pwidgetParent = NULL, int nSource = ODBC_USER_DSN ); virtual ~CDataSourceNames(); QString windowHelp() { if ( nSource == ODBC_USER_DSN ) return QString( tr( ODBC_HELP_DATASOURCES_USER ) ); return QString( tr( ODBC_HELP_DATASOURCES_SYSTEM ) ); } public slots: void slotLoad(); protected: int nSource; CDataSourceNameList * pDataSourceNameList; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDriverList.h0100644000076400007640000000313510732361675016566 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDRIVERLIST_H #define CDRIVERLIST_H #include "CODBCInst.h" #include /*! * \brief A simple table widget listing the installed drivers. * * You can use this widget to present a list of installed drivers to the User * so that one can simply be selected. Simply instantiating the widget is * enough to display the installed drivers. Then one can get the selected * driver by calling the getter functions; * * \li getFriendlyName * \li getDriver * \li getSetup * \li getDescription * * This widget can also be used as the core widget for managing drivers by * connecting to the following slots; * * \li slotAdd * \li slotEdit * \li slotDelete * * \note Typically; anyone can view installed drivers but managing drivers will require * elevated system privileges such as 'root' access. * * \sa CDataSourceNameList */ class CDriverList : public QTableWidget { Q_OBJECT public: CDriverList( QWidget* pwidgetParent = NULL ); virtual ~CDriverList(); QString getFriendlyName(); QString getDescription(); QString getDriver(); QString getSetup(); signals: void signalChanged(); public slots: void slotAdd(); void slotEdit(); void slotDelete(); void slotLoad(); void slotDoubleClick( QTableWidgetItem *pItem ); }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDriverPrompt.h0100644000076400007640000000202210732361675017126 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDRIVERPROMPT_H #define CDRIVERPROMPT_H #include "CODBCInst.h" #include class CDriverList; /*! * \class CDriverPrompt * * \brief Allows the User to select a Driver. * * Displays a list of installed Drivers and allows a User to; add, delete, configure and * ultimately - return a selection. This is used to support a request to create a DSN. * * \sa CUserDataSources * CSystemDataSources */ class CDriverPrompt : public QDialog { Q_OBJECT public: CDriverPrompt( QWidget* pwidgetParent = NULL ); virtual ~CDriverPrompt(); QString getFriendlyName(); QString getDescription(); QString getDriver(); QString getSetup(); protected slots: void slotOk(); protected: CDriverList * pDriverList; void doSaveState(); void doLoadState(); }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizardProperties.h0100644000076400007640000000152210732361675020357 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDSNWIZARDPROPERTIES_H #define CDSNWIZARDPROPERTIES_H #include "CODBCInst.h" #include class CPropertiesModel; class CPropertiesDelegate; class CDSNWizardProperties : public QWizardPage { Q_OBJECT public: CDSNWizardProperties( CDSNWizardData *pWizardData, QWidget *pwidgetParent = 0 ); virtual ~CDSNWizardProperties(); int nextId() const; void initializePage(); void cleanupPage(); bool validatePage(); protected: CDSNWizardData * pWizardData; CPropertiesModel * pPropertiesModel; CPropertiesDelegate * pPropertiesDelegate; QTableView * pTableView; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizardDriver.h0100644000076400007640000000122710732361675017460 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDSNWIZARDDRIVER_H #define CDSNWIZARDDRIVER_H #include "CODBCInst.h" #include class CDriverList; class CDSNWizardDriver : public QWizardPage { Q_OBJECT public: CDSNWizardDriver( CDSNWizardData *pWizardData, QWidget *pwidgetParent = 0 ); int nextId() const; void initializePage(); void cleanupPage(); bool validatePage(); protected: CDSNWizardData * pWizardData; CDriverList * pDriverList; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizardEntre.h0100644000076400007640000000136110732361675017301 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDSNWIZARDENTRE_H #define CDSNWIZARDENTRE_H #include "CODBCInst.h" #include /*! * \class CDSNWizardEntre * \brief First page of create data source name wizard. * * This page describes what the wizard is for. * * \sa CDSNWizard */ class CDSNWizardEntre : public QWizardPage { Q_OBJECT public: CDSNWizardEntre( CDSNWizardData *pWizardData, QWidget *pwidgetParent = 0 ); int nextId() const; void initializePage(); void cleanupPage(); protected: CDSNWizardData *pWizardData; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizardFini.h0100644000076400007640000000107110732361675017107 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDSNWIZARDFINI_H #define CDSNWIZARDFINI_H #include "CODBCInst.h" #include class CDSNWizardFini : public QWizardPage { Q_OBJECT public: CDSNWizardFini( CDSNWizardData *pWizardData, QWidget *pwidgetParent = 0 ); int nextId() const; void initializePage(); void cleanupPage(); protected: CDSNWizardData *pWizardData; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizard.h0100644000076400007640000000234410732361675016305 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDSNWIZARD_h #define CDSNWIZARD_h #include "CODBCInst.h" #include /*! * \class CDSNWizard * \brief Data Source Name creation wizard. * * This dialog is used to guide a User through creating a; user, system, or file DSN. This * is used to support a SQLCreateDataSource call when neither driver, nor drivers setup, is * supplying a ConfigDSN to the Driver Manager. * * This will try to find the unixODBC generic attributes call in the Driver and/or Setup * (ODBCINSTGetProperties). Failing that it will simply allow free-form editing of keyword/value * pairs. * * \sa CODBCConfig */ class CDSNWizard : public QWizard { Q_OBJECT public: enum { PageType, PageEntre, PageDriver, PageProperties, PageFini }; CDSNWizard( CDSNWizardData *pWizardData, QWidget* pwidgetParent = 0 ); virtual ~CDSNWizard(); protected slots: void slotHelp(); protected: CDSNWizardData *pWizardData; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CDSNWizardType.h0100644000076400007640000000165210732361675017150 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CDSNWIZARDTYPE_H #define CDSNWIZARDTYPE_H #include "CODBCInst.h" #include /*! * \class CDSNWizardEntre * \brief First page of create data source name wizard. * * This page asks for the type of DSN to create; * * \li User * \li System * \li File * * \sa CDSNWizard */ class CDSNWizardType : public QWizardPage { Q_OBJECT public: CDSNWizardType( CDSNWizardData *pWizardData, QWidget *pwidgetParent = 0 ); int nextId() const; void initializePage(); void cleanupPage(); protected: CDSNWizardData *pWizardData; QRadioButton * pradiobuttonUser; QRadioButton * pradiobuttonSystem; QRadioButton * pradiobuttonFile; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CFileSelector.h0100644000076400007640000000232110733010462017035 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CFILESELECTOR_H #define CFILESELECTOR_H #include "CODBCInst.h" #include /*! * \class CFileSelector * \brief File selector. * * Displays a file name to the User and allows it to be changed by way * of clicking a button which invokes a file selection dialog. * * This is used by CTracing to allow the User to select a log file. * * \sa CTracing */ class CFileSelector : public QWidget { Q_OBJECT public: enum CFileSelectorMode { TraceFile, TraceLibrary, FileDSNDirectory, Driver, Setup }; CFileSelector( CFileSelectorMode nMode, const QString &stringLabel = QString::null, bool bCompact = true, bool bButton = true, QWidget* pwidgetParent = NULL ); virtual ~CFileSelector(); void setText( const QString &stringText ); QString getText(); signals: void signalChanged(); public slots: void slotInvokeDialog(); protected: CFileSelectorMode nMode; QLineEdit * pLineEdit; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CHelp.h0100644000076400007640000000222310732361675015364 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CHELP_H #define CHELP_H #include "CODBCInst.h" #include #include class QFrame; /*! * \class CHelp * \brief Help widget for tabs/property pages. * * This widget presents the given Icon and Text in a manner useful for the * bottom (or other border area) of another widget where Helpful information * (read; hints about usage/purpose) may be needed. * * This widget is used by the CODBCConfig tab/property widgets. * */ class CHelp : public QWidget { Q_OBJECT public: CHelp( const QString &stringKey, const QIcon &icon, const QString &stringText, QWidget *pwidgetParent = 0 ); ~CHelp(); protected: bool bVisibleView; QString stringKey; QToolButton * pToolButton; QFrame * pFrame; QLabel * plabelIcon; QLabel * plabelText; void loadState(); void saveState(); protected slots: void slotToggleView(); }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CManageDataSourceNames.h0100644000076400007640000000276310732361675020634 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CMANAGEDATASOURCENAMES_H #define CMANAGEDATASOURCENAMES_H #include "CODBCInst.h" #include #define ODBC_HELP_DATASOURCES "The most common way to connect to a Data Source is via a Data Source Name (DSN). A DSN is a saved set of connection options - a very convenient way to repeatedly connect to a Data Source." class CDataSourceNames; class CDataSourceNamesFile; /*! * \class CManageDataSourceNames * * \brief Widget to allow the Data Source Name's (DSN's) to be managed. * * This widget presents a set of 3 tabs where DSN's can be managed; * * \li User DSN's * \li System DSN's * \li File DSN's * * \note System DSN's and often File DSN's - can only be managed when elevated privileges * such as 'root' is in effect. * * \sa CManageDrivers */ class CManageDataSourceNames : public QTabWidget { Q_OBJECT public: CManageDataSourceNames( QWidget *pwidgetParent = 0 ); virtual ~CManageDataSourceNames(); QString windowHelp() { return QString( tr( ODBC_HELP_DATASOURCES ) ); } bool saveData() { return true; } public slots: void slotLoad(); protected: CDataSourceNames * pDataSourceNamesUser; CDataSourceNames * pDataSourceNamesSystem; CDataSourceNamesFile * pDataSourceNamesFile; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CManageDrivers.h0100644000076400007640000000254210732361675017227 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CMANAGEDRIVERS_H #define CMANAGEDRIVERS_H #include #include "CODBCInst.h" #define ODBC_HELP_DRIVERS "An ODBC Driver allows your ODBC enabled applications to get to your data. Many ODBC drivers can be downloaded from the Internet while others are obtained from your database vendor. Typically; you must be a 'root' user to manage drivers." /*! * \class CManageDrivers * \brief Widget to allow User to manage Drivers. * * This widget presents a list of installed Drivers. The Drivers listed will be 64bit if source * of unixODBC built with PLATFORM64 - otherwise they will be 32bit. * * The User may (given proper privs); add, delete, and configure a selected Driver. * * This widget is used as a tab for CODBCConfig. * * \sa CManageDataSourceNames * CStats * CTracing * CAbout */ class CManageDrivers : public QWidget { Q_OBJECT public: CManageDrivers( QWidget* pwidgetParent = NULL ); virtual ~CManageDrivers(); QString windowHelp() { return QString( tr( ODBC_HELP_DRIVERS ) ); } bool saveData() { return true; } signals: void signalChanged(); }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CMonitor.h0100644000076400007640000000137510732361675016132 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CMONITOR_H #define CMONITOR_H #include "CODBCInst.h" #define ODBC_HELP_MONITOR "unixODBC is unique in that it provides a rich means of monitoring ODBC activity." class CMonitorHandleCounts; class CMonitorProcesses; class CMonitor : public QTabWidget { Q_OBJECT public: CMonitor( QWidget* pwidgetParent = NULL ); virtual ~CMonitor(); QString windowHelp() { return QString( tr( ODBC_HELP_MONITOR ) ); } bool saveData() { return true; } protected: CMonitorHandleCounts * pMonitorHandleCounts; CMonitorProcesses * pMonitorProcesses; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CMonitorHandleCounts.h0100644000076400007640000000157710732361675020446 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CMONITORHANDLECOUNTS_H #define CMONITORHANDLECOUNTS_H #include "CODBCInst.h" #include class CMonitorHandleCounts : public QWidget { Q_OBJECT public: CMonitorHandleCounts( QWidget* pwidgetParent = NULL ); virtual ~CMonitorHandleCounts(); protected: bool bEnabled; void * hStats; int nSliderMax; QTimer * pTimer; QLabel * plabelEnvironment; QLabel * plabelConnection; QLabel * plabelStatement; QLabel * plabelDescriptor; QSlider * psliderEnvironment; QSlider * psliderConnection; QSlider * psliderStatement; QSlider * psliderDescriptor; protected slots: void slotLoad(); }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CMonitorProcesses.h0100644000076400007640000000200210732361675020005 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CMONITORPROCESSES_H #define CMONITORPROCESSES_H #include "CODBCInst.h" #include #include /*! * \class CMonitorProcesses * \brief Displays detailed statistics on the unixODBC environment. * * This widget displays a list of; Environments, Connections, Statements, * Descriptors and their owning Process ID. The details are updated frequently * as long as the widget is visible. * * \sa CMonitor */ class CMonitorProcesses : public QTableWidget { Q_OBJECT public: CMonitorProcesses( QWidget* pwidgetParent = NULL ); virtual ~CMonitorProcesses(); protected slots: void slotLoad(); void clearRow( int nRow ); protected: bool bEnabled; int nRowsWithValues; QTimer * pTimer; void * hStats; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CODBCConfig.h0100644000076400007640000000373410732361675016341 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CODBCCONFIG_H #define CODBCCONFIG_H #include "CODBCInst.h" #include #include class QListWidget; class QListWidgetItem; class QStackedWidget; class CManageDataSourceNames; class CMonitor; class CAdvanced; class CAbout; /*! * \class CODBCConfig * * \brief ODBC Administrator dialog. * * This dialog allows the User to manage; * * \li User Data Source Names * \li System Data Source Names * \li File Data Source Names * \li Drivers * \li Tracing * \li Connection Pooling * * The User may also view; * * \li Usage statistics * \li Version information and other 'About' information * * This is the main dialog/window for the ODBCConfig application and is also used * to support a call to SQLManageDataSources. * * \sa ODBCManageDataSources * ODBCCreateDataSource */ class CODBCConfig : public QDialog { Q_OBJECT public: CODBCConfig( QWidget *pwidgetParent = 0, Qt::WindowFlags nFlags = 0 ); virtual ~CODBCConfig(); bool saveData(); protected slots: void slotChangePage( QListWidgetItem *plistwidgetitemCurrent, QListWidgetItem *plistwidgetitemPrevious ); void slotHelp(); void slotHelpError( const QString &stringMessage ); void slotAccept(); protected: void createIconMenu(); void createConfigWidgets(); void loadState(); void saveState(); QListWidget * plistwidgetIcons; QStackedWidget * pstackedwidgetConfigWidgets; CManageDataSourceNames * pManageDataSourceNames; CMonitor * pMonitor; CAdvanced * pAdvanced; CAbout * pAbout; QAssistantClient * pAssistantClient; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CODBCInst.h0100644000076400007640000000174110732361675016045 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CODBCINST_H #define CODBCINST_H #include #include class CDSNWizardData { public: enum Type { TypeUser, TypeSystem, TypeFile }; CDSNWizardData( const QString &stringDataSourceName = QString::null ) ; ~CDSNWizardData(); Type nType; QString stringDriver; QString stringDataSourceName; HODBCINSTPROPERTY hFirstProperty; }; /*! * \brief A namespace. * */ class CODBCInst { public: static bool saveDataSourceName( QWidget *pwidgetParent, HODBCINSTPROPERTY hFirstProperty, CDSNWizardData::Type nType, const QString &stringIni = QString::null ); static int showErrors( QWidget *pwidgetParent = 0, const QString &stringConsequence = QString::null ); }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CPage.h0100644000076400007640000000104310732361675015347 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CPAGE_H #define CPAGE_H #include "CODBCInst.h" class CPage : public QWidget { public: CPage( QWidget* pwidgetParent, const QString &stringTitle, QWidget *pwidgetContent, const QIcon &icon, const QString &stringHelp ); virtual ~CPage(); QWidget *getContent() { return pwidgetContent; } protected: QWidget *pwidgetContent; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CPooling.h0100644000076400007640000000173510732361675016112 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CPOOLING_H #define CPOOLING_H #include "CODBCInst.h" #define ODBC_HELP_POOLING "Connection pooling is most useful for ODBC enabled server processes. It can increase performance but its usefulness is dependent upon the stability of the driver. Additional Pooling options are set for individual drivers." class CPooling : public QWidget { Q_OBJECT public: CPooling( QWidget* pwidgetParent = NULL ); virtual ~CPooling(); QString windowHelp() { return QString( tr( ODBC_HELP_POOLING ) ); } bool loadData(); bool saveData(); public slots: bool slotApply(); bool slotDefault(); protected: QCheckBox * pcheckboxEnable; // QSpinBox * pspinboxTimeout; /* * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CPROPERTIESDELEGATE_H #define CPROPERTIESDELEGATE_H #include "CODBCInst.h" #include /*! * \brief Creates cell editor. * * Creates cell editor for a property based upon HODBCINSTPROPERTY. This is * applied to the second column of the QTableView. * */ class CPropertiesDelegate : public QItemDelegate { Q_OBJECT public: CPropertiesDelegate( QObject *pobjectParent = 0 ); QWidget *createEditor(QWidget *pwidgetParent, const QStyleOptionViewItem &styleoptionviewitem, const QModelIndex &modelindex) const; void setEditorData( QWidget *pwidgetEditor, const QModelIndex &modelindex ) const; void setModelData( QWidget *pwidgetEditor, QAbstractItemModel *abstractitemmodel, const QModelIndex &modelindex) const; void updateEditorGeometry( QWidget *pwidgetEditor, const QStyleOptionViewItem &styleoptionviewitem, const QModelIndex &modelindex ) const; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CPropertiesDialog.h0100644000076400007640000000131210732361675017746 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CPROPERTIESDIALOG_H #define CPROPERTIESDIALOG_H #include "CODBCInst.h" #include class CPropertiesModel; class CPropertiesDelegate; class CPropertiesDialog : public QDialog { Q_OBJECT public: CPropertiesDialog( QWidget* pwidgetParent = NULL, HODBCINSTPROPERTY hTheFirstProperty = NULL ); virtual ~CPropertiesDialog(); protected: void doLoadState(); void doSaveState(); private: CPropertiesModel * ppropertiesmodel; CPropertiesDelegate * ppropertiesdelegate; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CPropertiesModel.h0100644000076400007640000000230610732361675017613 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CPROPERTIESMODEL_H #define CPROPERTIESMODEL_H #include "CODBCInst.h" #include #include /* declare a non-standard data type so we can have it pass to/from as QVariant */ Q_DECLARE_METATYPE(HODBCINSTPROPERTY) class CPropertiesModel : public QAbstractTableModel { public: CPropertiesModel( QObject *pobjectParent = 0, HODBCINSTPROPERTY hFirstProperty = NULL ); virtual ~CPropertiesModel(); int rowCount ( const QModelIndex & parent = QModelIndex() ) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const; bool setData( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ); Qt::ItemFlags flags( const QModelIndex &index ) const; QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; private: /* index our HODBCINSTPROPERTY list */ QVector vectorProperties; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CThreading.h0100644000076400007640000000106410733004457016374 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CTHREADING_H #define CTHREADING_H #include "CODBCInst.h" class CThreading : public QWidget { Q_OBJECT public: CThreading( QWidget* pwidgetParent = NULL ); virtual ~CThreading(); QString windowHelp(); bool loadData(); bool saveData(); public slots: bool slotApply(); bool slotDefault(); protected: QSpinBox *pspinboxLevel; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/CTracing.h0100644000076400007640000000267110733010462016054 0ustar nicknick/*! * \file * * \author Peter Harvey * \author \sa AUTHORS file * \version 2 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ #ifndef CTRACING_H #define CTRACING_H #include "CODBCInst.h" class CFileSelector; #define ODBC_HELP_TRACING "The ability to trace ODBC activity is important to anyone trying to debug an ODBC application centric problem. When tracing is on; all calls are logged to a file. It is very bad to leave tracing on after a debugging session as it slows application performance an causes disk space to be used up." /*! * \class CTracing * \brief This widget allows User to view/change tracing options. * * With this widget the User can; * * \li turn tracing on/off * \li elect to force tracing * \li specify a trace file * * \sa CManageDataSourceNames * CManageDrivers * CMonitor * CAdvanced * CAbout */ class CTracing : public QWidget { Q_OBJECT public: CTracing( QWidget* pwidgetParent = NULL ); virtual ~CTracing(); QString windowHelp() { return QString( tr( ODBC_HELP_TRACING ) ); } bool loadData(); bool saveData(); public slots: bool slotApply(); bool slotDefault(); protected: QCheckBox * pcheckboxEnable; QCheckBox * pcheckboxForce; CFileSelector * pfileselectorTraceFile; CFileSelector * pfileselectorTraceLibrary; }; #endif unixODBC-2.2.14-p2/odbcinstQ4/About48.xpm0100644000076400007640000003103410723566553016200 0ustar nicknick/* XPM */ static const char * xpmAbout48[] = { "48 48 498 2", " c None", ". c #4C4C4C", "+ c #A3A3A3", "@ c #C7C7C7", "# c #DADADA", "$ c #ECECEC", "% c #F9F9F9", "& c #B5B5B5", "* c #EDEDED", "= c #FFFFFF", "- c #FCFCFC", "; c #F6F6F6", "> c #F3F3F3", ", c #F2F2F2", "' c #F5F5F5", ") c #F7F7F7", "! c #FAFAFA", "~ c #FEFEFE", "{ c #393939", "] c #C3C3C3", "^ c #EEEEEE", "/ c #EBEBEB", "( c #EAEAEA", "_ c #E8E8E8", ": c #E7E7E7", "< c #E5E5E5", "[ c #E3E3E3", "} c #E2E2E2", "| c #E0E0E0", "1 c #F4F4F4", "2 c #B1B1B1", "3 c #F0F0F0", "4 c #EFEFEF", "5 c #DEDEDE", "6 c #DDDDDD", "7 c #FDFDFD", "8 c #C8D2DF", "9 c #94AEC8", "0 c #789ABC", "a c #668DB3", "b c #658DB3", "c c #7898BA", "d c #91ABC5", "e c #C0CCD7", "f c #DBDBDB", "g c #505050", "h c #F8F8F8", "i c #BFCEDD", "j c #5F89B2", "k c #36679B", "l c #285B91", "m c #35689C", "n c #4173A5", "o c #4D7CAC", "p c #527EAD", "q c #4C7BAB", "r c #4172A3", "s c #32669A", "t c #36679A", "u c #5B84AD", "v c #AEBECD", "w c #E4E4E4", "x c #CBD9E5", "y c #4675A6", "z c #1F568E", "A c #31679F", "B c #5282B4", "C c #739FCC", "D c #8DB4DB", "E c #BED5EA", "F c #EBF2F8", "G c #EEF3F9", "H c #C3D8EC", "I c #93B7DC", "J c #83ADD8", "K c #709FCD", "L c #5081B2", "M c #31659C", "N c #4574A3", "O c #B4C2CF", "P c #DFDFDF", "Q c #658EB7", "R c #1C538D", "S c #29629C", "T c #4E83B8", "U c #6D9ED0", "V c #7CA9D5", "W c #8BB3DA", "X c #C1D5E9", "Y c #FBFBFB", "Z c #CBDCEF", "` c #92B7DC", " . c #76A5D3", ".. c #689BCF", "+. c #4B80B6", "@. c #2B6299", "#. c #5C84AC", "$. c #DCDCDC", "%. c #EFF3F6", "&. c #4071A5", "*. c #18528E", "=. c #326CA6", "-. c #538AC3", ";. c #679BCF", ">. c #75A4D3", ",. c #E7ECF1", "'. c #F2F6FA", "). c #99BCDF", "!. c #8AB2DA", "~. c #7DA9D5", "{. c #6FA0D2", "]. c #6297CD", "^. c #538CC8", "/. c #3068A2", "(. c #406FA1", "_. c #D3D7DA", ":. c #ECF0F3", "<. c #2C629A", "[. c #185391", "}. c #326EAA", "|. c #4D88C6", "1. c #5D94CC", "2. c #6B9DD0", "3. c #78A6D4", "4. c #85AFD8", "5. c #E4E8ED", "6. c #F1F1F1", "7. c #F1F4F8", "8. c #99BCDE", "9. c #8CB3DA", "0. c #80ABD6", "a. c #72A2D2", "b. c #6599CE", "c. c #5891CA", "d. c #4B89C6", "e. c #306DA8", "f. c #31679B", "g. c #3C6EA3", "h. c #14508E", "i. c #2B6AA9", "j. c #4181C1", "k. c #508CC7", "l. c #77A5D4", "m. c #8EB5DB", "n. c #BCCFE3", "o. c #C7D9EA", "p. c #93B8DD", "q. c #89B1DA", "r. c #7EAAD6", "s. c #669ACE", "t. c #5A92CB", "u. c #4D8AC7", "v. c #4082C2", "w. c #2A68A7", "x. c #40709F", "y. c #5E89B1", "z. c #0F4C89", "A. c #2162A1", "B. c #3578BC", "C. c #4282C3", "D. c #4F8BC7", "E. c #5B93CB", "F. c #689CCF", "G. c #73A3D3", "H. c #87B0D9", "I. c #BDCFE2", "J. c #E0E4E7", "K. c #E3E7EA", "L. c #C3D4E6", "M. c #97BADD", "N. c #7AA7D4", "O. c #6E9FD1", "P. c #6398CD", "Q. c #4182C3", "R. c #357ABF", "S. c #1E5E9F", "T. c #5D85AE", "U. c #E9E9E9", "V. c #C5D1DD", "W. c #0D4988", "X. c #175797", "Y. c #296FB5", "Z. c #4081C2", "`. c #4C89C6", " + c #6D9FD1", ".+ c #7FABD6", "++ c #8FB5DC", "@+ c #88B1D9", "#+ c #82ADD7", "$+ c #7BA8D5", "%+ c #73A3D2", "&+ c #699CD0", "*+ c #6096CC", "=+ c #558FC9", "-+ c #4A88C6", ";+ c #4081C3", ">+ c #2970B8", ",+ c #155898", "'+ c #BDC8D2", ")+ c #B4B4B4", "!+ c #4A79A6", "~+ c #0D4D8D", "{+ c #1D63AA", "]+ c #2A73BB", "^+ c #3177BE", "/+ c #3C7FC1", "(+ c #4886C5", "_+ c #538EC8", ":+ c #5C94CB", "<+ c #659ACE", "[+ c #81ACD7", "}+ c #80ABD7", "|+ c #7DA9D6", "1+ c #6298CD", "2+ c #5A92CA", "3+ c #508CC8", "4+ c #4786C4", "5+ c #3D7FC2", "6+ c #3278BE", "7+ c #2972BA", "8+ c #0F5BA8", "9+ c #4A7BAA", "0+ c #E6E6E6", "a+ c #BECBD8", "b+ c #0D4986", "c+ c #0F579E", "d+ c #1E69B2", "e+ c #256FBA", "f+ c #2D75BC", "g+ c #387CC0", "h+ c #669ACF", "i+ c #7AA6D4", "j+ c #8BB1D8", "k+ c #9CBCDC", "l+ c #AAC4DF", "m+ c #B5CAE0", "n+ c #C0D1E2", "o+ c #CBD7E2", "p+ c #4283C3", "q+ c #2F77BD", "r+ c #1C69B7", "s+ c #0B5EB1", "t+ c #0A539B", "u+ c #B7C5D1", "v+ c #638AB2", "w+ c #0C4D8F", "x+ c #105DAA", "y+ c #1363B3", "z+ c #206CB9", "A+ c #2771BA", "B+ c #3B7EC1", "C+ c #4484C4", "D+ c #AAC6E2", "E+ c #528DC8", "F+ c #3379BE", "G+ c #1E6BB7", "H+ c #0D60B2", "I+ c #0A5EB1", "J+ c #0755A3", "K+ c #668DB5", "L+ c #E1E1E1", "M+ c #245B94", "N+ c #0D5197", "O+ c #1162B3", "P+ c #0A5DB2", "Q+ c #1B69B7", "R+ c #4383C3", "S+ c #A7C5E2", "T+ c #5890CA", "U+ c #548EC8", "V+ c #4E8AC7", "W+ c #4987C5", "X+ c #4383C4", "Y+ c #3D80C1", "Z+ c #3579BF", "`+ c #1867B6", " @ c #0C5FB2", ".@ c #095DB1", "+@ c #0759AA", "@@ c #2965A2", "#@ c #C4CDD6", "$@ c #044383", "%@ c #0C569E", "&@ c #1364B4", "*@ c #065BB0", "=@ c #0158AE", "-@ c #1263B4", ";@ c #2670BA", ">@ c #3A7DC0", ",@ c #A2C1E1", "'@ c #4D89C6", ")@ c #4987C6", "!@ c #397CC0", "~@ c #236FB9", "{@ c #044E98", "]@ c #C7D0D9", "^@ c #98AFC4", "/@ c #024587", "(@ c #0B57A1", "_@ c #1464B4", ":@ c #0E60B2", "<@ c #075CB0", "[@ c #0057AE", "}@ c #3077BD", "|@ c #3F81C2", "1@ c #A0C0E0", "2@ c #4282C2", "3@ c #3C7EC1", "4@ c #1866B6", "5@ c #085CB1", "6@ c #055AB0", "7@ c #024F9D", "8@ c #9EB4CC", "9@ c #D8D8D8", "0@ c #7B99B8", "a@ c #01468A", "b@ c #0A56A4", "c@ c #0F61B3", "d@ c #0359AF", "e@ c #0258AF", "f@ c #89B1D9", "g@ c #045AAF", "h@ c #024F9F", "i@ c #85A3C1", "j@ c #D7D7D7", "k@ c #6289AF", "l@ c #00468C", "m@ c #0655A3", "n@ c #7DA8D4", "o@ c #01509E", "p@ c #6C92B9", "q@ c #D5D5D5", "r@ c #6187AD", "s@ c #0453A2", "t@ c #7CA7D3", "u@ c #004F9E", "v@ c #6E94BB", "w@ c #D3D3D3", "x@ c #7897B5", "y@ c #00458B", "z@ c #00509F", "A@ c #7AA5D1", "B@ c #004E9C", "C@ c #88A6C5", "D@ c #D1D1D1", "E@ c #91A8BE", "F@ c #004489", "G@ c #78A4CF", "H@ c #0B5FB1", "I@ c #0055AB", "J@ c #004D9A", "K@ c #A4BBD1", "L@ c #CFCFCF", "M@ c #B8C1CB", "N@ c #014386", "O@ c #004C98", "P@ c #0055AA", "Q@ c #77A2CD", "R@ c #0053A7", "S@ c #014C96", "T@ c #D1DAE3", "U@ c #D2D2D2", "V@ c #1F5790", "W@ c #004993", "X@ c #0052A5", "Y@ c #1062B3", "Z@ c #77A2CC", "`@ c #0050A1", " # c #2966A3", ".# c #CDCDCD", "+# c #5981A8", "@# c #00478D", "## c #004E9E", "$# c #1565B5", "%# c #76A0CB", "&# c #1162B4", "*# c #6E96BF", "=# c #CBCBCB", "-# c #A9B7C3", ";# c #034688", "># c #024C97", ",# c #0254A7", "'# c #1766B5", ")# c #759FC9", "!# c #0052A4", "~# c #034D97", "{# c #C9D7E3", "]# c #3D6D9D", "^# c #014890", "/# c #03519E", "(# c #0558AC", "_# c #1A68B6", ":# c #1666B5", "<# c #1262B4", "[# c #0E60B3", "}# c #749EC7", "|# c #0054A8", "1# c #5081B3", "2# c #C9C9C9", "3# c #AFBAC3", "4# c #05478A", "5# c #014B95", "6# c #0554A3", "7# c #1061B3", "8# c #1968B6", "9# c #739DC6", "0# c #0A5EB0", "a# c #0050A0", "b# c #074E97", "c# c #D7E1EC", "d# c #CECECE", "e# c #5C82A8", "f# c #0354A4", "g# c #095DB0", "h# c #1D6AB7", "i# c #739CC5", "j# c #065BAF", "k# c #0056AC", "l# c #0051A2", "m# c #004C97", "n# c #779DC4", "o# c #3A6B9C", "p# c #00478E", "q# c #004D99", "r# c #0052A3", "s# c #0359AD", "t# c #447FBB", "u# c #739AC2", "v# c #739BC3", "w# c #A4B8CC", "x# c #D9D9D9", "y# c #749FC9", "z# c #729DC9", "A# c #749FCB", "B# c #4E80B2", "C# c #C4C7C9", "D# c #255D95", "E# c #00478F", "F# c #004C99", "G# c #0055A9", "H# c #0259AE", "I# c #6791BC", "J# c #D0D0D0", "K# c #D6D6D6", "L# c #004B97", "M# c #326BA5", "N# c #F2F5F7", "O# c #3B6B9D", "P# c #004B96", "Q# c #638EBA", "R# c #CACACA", "S# c #4B7DB0", "T# c #EFF2F4", "U# c #CCCCCC", "V# c #5C83A9", "W# c #05488D", "X# c #004892", "Y# c #2A6AAB", "Z# c #5584B4", "`# c #5484B5", " $ c #5486B8", ".$ c #5487BA", "+$ c #5488BB", "@$ c #5488BC", "#$ c #5387BA", "$$ c #5486BA", "%$ c #5386B8", "&$ c #004E9D", "*$ c #064D94", "=$ c #7197BE", "-$ c #3F70A0", ";$ c #02488D", ">$ c #004C96", ",$ c #004E9A", "'$ c #004F9F", ")$ c #004D9B", "!$ c #034B92", "~$ c #4B7DAE", "{$ c #CCD5E0", "]$ c #5B83AB", "^$ c #225C98", "/$ c #01488E", "($ c #004891", "_$ c #004992", ":$ c #004994", "<$ c #004A94", "[$ c #014991", "}$ c #25619D", "|$ c #668EB6", "1$ c #BFCCD9", "2$ c #93A9C0", "3$ c #7A99B8", "4$ c #6389B1", "5$ c #658BB1", "6$ c #7D9BBB", "7$ c #9AB0C7", "8$ c #C4CDD5", "9$ c #000000", " ", " ", " ", " . + @ # $ % % $ # @ + . ", " . & * = = - % ; > , ' ) ! ~ = * & . ", " { ] ~ = ! ' ^ / ( _ : < [ } | | ( 1 ~ ~ ] { ", " 2 - = ! 1 , 3 4 * / ( _ : < [ } | 5 6 6 * 7 - 2 ", " 6 = 7 % ) ' > , 3 8 9 0 a b c d e } | 5 6 f 5 4 = 6 ", " g 3 = ~ - ! h ) i j k l m n o p q r s t u v 5 6 f # w 7 3 g ", " g % ~ 7 ~ 7 - x y z A B C D E F G H I J K L M N O 6 f # P ! % g ", " 3 ~ % ! - 7 Q R S T U V W X Y 7 ~ ~ Z ` J ...+.@.#.$.f # $.! 3 ", " 6 = ) ) h %.&.*.=.-.;.>.J ` ,.; h ! 7 '.).!.~.{.].^./.(._.f # P 7 6 ", " 2 = ; > ' :.<.[.}.|.1.2.3.4.` 5.6.> ' h 7.8.9.0.a.b.c.d.e.f._.f # < = 2 ", " { - h 4 6., g.h.i.j.k.1.2.l.J m.n.$ ^ 3 > o.p.q.r.a.s.t.u.v.w.x.$.f # 3 - { ", " ] ~ * * 4 y.z.A.B.C.D.E.F.G.r.H.I I.J.K.L.M.W J N.O.P.c.u.Q.R.S.T.6 f 5 ~ ] ", " . ~ 1 U./ V.W.X.Y.R.Z.`.c.P. + ..+4.!.m.++9.@+#+$+%+&+*+=+-+;+R.>+,+'+6 f * ~ . ", " )+~ : _ U.!+~+{+]+^+/+(+_+:+<+O.>.$+.+[+#+}+|+3.a.2.1+2+3+4+5+6+7+8+9+5 6 6 ~ )+ ", " * ; w 0+a+b+c+d+e+f+g+C.`.=+1.h+i+j+k+l+m+n+o+ +F.1+E._+-+p+g+q+r+s+t+u+5 6 1 * ", " . = $ } w v+w+x+y+z+A+^+B+C+`._+D+h ' > 6.^ $ ( 1+1.c.E+`.C+/+F+G+H+I+J+K+| 5 ( = . ", " + = L+| } M+N+O+s+P+Q+]+F+B+R+-+S+Y h ; 1 6.4 * T+U+V+W+X+Y+Z+`+s+ @.@+@@@} | L+= + ", " @ ! $.5 #@$@%@&@ @*@=@-@;@F+>@Z.,@~ Y % ) 1 , 3 '@)@C+Z.!@~@O+I+s+s+.@*@{@]@} | ! @ ", " # ; # $.^@/@(@_@:@<@=@[@[@.@r+}@B+|@C.1@! ) ' > 2@3@f+4@.@5@.@s+ @I+<@6@7@8@[ } h # ", " $ 6.9@# 0@a@b@_@c@.@d@[@[@[@[@[@e@5@c@f@7 ! h ; 5@d@6@*@<@.@I+ @I+5@*@g@h@i@< [ ' $ ", " % $ j@9@k@l@m@O+O+s+6@[@[@[@[@[@[@[@[@n@7 7 Y % 6@g@*@<@5@I+s+s+.@<@6@d@o@p@: < , % ", " % / q@j@r@l@s@H+_@:@<@=@[@[@[@[@[@[@[@t@! - ~ - <@6@<@5@I+s+ @I+5@*@d@=@u@v@_ : > % ", " $ 4 w@q@x@y@z@.@-@O+s+g@[@[@[@[@[@[@[@A@; % - ~ 5@<@5@.@s+ @I+5@*@g@e@[@B@C@( _ ) $ ", " # 1 D@w@E@F@B@g@H+_@:@5@e@[@[@[@[@[@[@G@> ' h Y H@5@.@s+ @I+5@*@g@e@[@I@J@K@/ ( % # ", " @ h L@D@M@N@O@P@5@O+-@ @*@[@[@[@[@[@=@Q@4 , ' ) @I+s+ @I+5@*@g@e@[@[@R@S@T@* / - @ ", " + = U@L@D@V@W@X@e@s+_@Y@I+6@[@[@=@e@d@Z@$ ^ 6.1 c@s+s+I+5@*@g@e@[@[@[@`@ #3 4 4 = + ", " . = | .#L@+#@###[@6@H+$#c@I+*@d@d@g@6@%#_ / * 3 &#s+.@<@6@g@e@[@[@[@P@B@*#, 3 ' = . ", " * 4 =#.#-#;#>#,#e@5@O+'#&@H+P+*@<@5@)#< : ( * Y@5@*@6@d@=@[@[@[@[@!#~#{#> , Y * ", " )+7 .#=#.#]#^#/#(#6@ @$#_#:#<#[#I+I+}#L+w 0+U.H+6@d@e@[@[@[@[@[@|#B@1#) ' 1 = )+ ", " . ~ 0+2#=#3#4#5#6#5@5@7#'#G+8#:#y+Y@9#5 | [ 0+0#e@=@[@[@[@[@[@I@a#b#c#h ) ! ~ . ", " ] 7 d#2#=#e#l@O@f#g# @-@'#h#Q+'#<#i## 6 P } j#[@[@[@[@[@[@k#l#m#n#- ! % = ] ", " { - / @ 2#=#o#p#q#r#s#*@H@O+t#u#v#w#j@x#$.P y#z#A#[@[@[@I@l#O@B#~ 7 - 7 - { ", " 2 = # @ 2#C#D#E#F#`@G#[@H#I#=#d#J#w@K#x#f 5 L+[ e@[@|#a#L#M#N#- ~ ~ = 2 ", " 6 7 U@@ 2#C#O#@#P###X@G#Q#@ R#.#J#U@q@9@# 6 | G#r#B@P#S#T#h ! 7 = 6 ", " 3 % U#@ 2#=#V#W#X#F#u@Y#Z#`# $.$+$@$@$#$$$%$&$O@*$=$> ' ) % ~ 3 ", " g % % D@@ 2#=#3#-$;$X#>$,$&$z@a#`@a#'$B@)$P#!$~${$4 6.> ) ~ % g ", " g 3 7 x#@ 2#=#.#-#]$^$/$($_$:$<$:$_$[$}$|$1$U./ * 4 ; = 3 g ", " 6 = ( .#2#=#.#L@D@M@2$3$4$5$6$7$8$} w 0+_ U.* h = 6 ", " 2 - 7 w U#=#.#L@D@w@q@j@9@# $.5 | } w : 1 ~ - 2 ", " { ] ~ 7 ^ P D@L@D@w@q@j@9@# $.L+$ ; ~ ~ ] { ", " . & * = = h 1 4 / $ 6.; ! = = * & . ", " . + @ # $ % % $ # @ + . ", " 9$9$9$9$ ", " ", " "}; unixODBC-2.2.14-p2/odbcinstQ4/Advanced48.xpm0100644000076400007640000002551410723566553016641 0ustar nicknick/* XPM */ static const char *xpmAdvanced48[]={ "48 48 389 2", "Qt c None", ".D c #000000", "e. c #06090c", ".C c #090909", ".E c #0b0f14", ".c c #0d1115", ".j c #0f151d", "cH c #140000", "#N c #161c22", ".F c #171f29", "#t c #191919", "e# c #192633", "d5 c #1d0000", "bl c #1f0000", "#0 c #1f0b08", "ec c #1f2f3f", "a6 c #200000", ".w c #202428", "aN c #210000", "#o c #222b32", ".G c #222d38", "#F c #25354b", "ea c #26394c", "#u c #283442", "b8 c #290000", "#n c #293337", "#Z c #2a0000", ".P c #2a497e", "#h c #2d4b80", "bm c #2f0a07", "#R c #2f0b08", "at c #2f120d", ".t c #304e82", ".O c #315083", ".8 c #334b6e", "eb c #334c66", "#x c #335285", "d4 c #340000", ".# c #344046", "#w c #345285", ".b c #354452", ".s c #365587", "#m c #374349", ".i c #395172", "dS c #3e0000", ".v c #40556c", ".9 c #415a78", "#J c #425057", ".H c #435563", "#G c #466388", ".Q c #476795", ".a c #485a67", "c1 c #490000", "#v c #496790", ".Z c #496996", ".u c #4a6a97", ".m c #4c4c49", ".7 c #4c6c98", "#l c #4e5e66", "co c #4f0000", "#y c #4f6f9a", ".N c #51719c", ".I c #52646e", ".h c #53739d", ".r c #53749e", "#. c #567089", "#Y c #580000", "dT c #590000", ".k c #595959", ".0 c #5d7da5", ".Y c #5d7ea5", "bP c #5f0b08", "a7 c #5f1b14", "aO c #5f2117", ".6 c #6182a9", "as c #620000", "#H c #6385ab", ".B c #646a65", ".n c #647a83", ".g c #6688ad", "dz c #6699cc", "dO c #679acc", "d2 c #679acd", "d9 c #680000", ".R c #698baf", "de c #699cce", "ab c #6a0000", "d1 c #6a9dce", "dY c #6b9ecf", "#X c #6d0200", "dN c #6da0d1", "#g c #6e90b3", "dZ c #6ea1d1", "#S c #6f150f", "#T c #700a05", "#z c #7092b4", "d0 c #70a2d2", "di c #720000", ".x c #727272", ".M c #7395b7", "dy c #73a6d4", "## c #748fa2", ".q c #7497b8", "cY c #74a6d4", "dM c #75a8d5", "dd c #75a8d6", "d7 c #767299", "dX c #777499", ".1 c #799bbc", ".X c #799cbc", "d8 c #7a698c", "dJ c #7cafda", "bO c #7d0000", ".5 c #7ea1bf", "dx c #7eb0db", "dL c #80b3dc", "dK c #81b3dd", ".f c #82a5c2", "dc c #82b5de", "cX c #83b5de", "cD c #849bc0", "#f c #84a3ba", "dP c #864c66", ".d c #86a2af", "dw c #87b9e1", "cI c #8b0000", "#Q c #8b3d09", ".S c #8bafca", "dA c #8e394c", "db c #8ec0e5", "cC c #8ec1e5", "#1 c #8f3022", "ac c #8f3828", "dI c #8f556b", "ds c #8fc1e6", "#i c #90b4ce", "#I c #91b4c9", "#A c #91b5cf", "cW c #91c3e7", "dR c #920000", "ck c #93819b", "dv c #93c5e8", "dt c #93c6e8", ".L c #95b9d2", "d6 c #960000", "df c #962633", ".p c #96bbd3", "du c #96c8ea", "aM c #980000", "dr c #985e71", ".W c #98bdd4", "da c #98caeb", "cj c #98cbeb", ".l c #999897", "bx c #9c0000", "#k c #9cbdcc", ".4 c #9dc2d8", "cV c #9dd0ef", "b2 c #9e5665", "cB c #9ed0ef", "bk c #9f0000", ".e c #a0c5da", "d# c #a0d2f0", "b1 c #a1d3f1", "cZ c #a2090c", "c9 c #a3404a", "#O c #a4561a", "bL c #a5191d", "d. c #a6d8f4", "bK c #a6d9f4", "an c #a70000", "a0 c #a70e0f", "cR c #a7292e", ".2 c #a7cbdb", "b7 c #a80000", "#9 c #a80e0f", "bw c #a90000", "ci c #a9dbf6", "bv c #aa0000", "bg c #aa626d", "bu c #aab4c9", "d3 c #ab0000", "#5 c #ab0f0f", "dB c #ac0000", "ah c #ac0f0f", "cA c #acdef8", "cG c #ad0000", "dQ c #ae0000", "#j c #aed4e6", "cn c #af0000", "#B c #afd5e6", "dh c #b00000", "#W c #b02b00", "b6 c #b10000", "aG c #b1757f", ".T c #b1c8d4", ".K c #b1d6e8", ".o c #b1d7e8", "bN c #b20000", "aU c #b21f1f", ".3 c #b2d8e9", "bj c #b30000", ".J c #b3d9ea", "b0 c #b3e4fb", "c2 c #b40000", "cS c #b4e5fc", "dU c #b50000", "cF c #b60000", "#a c #b6cdd8", "aH c #b70000", "az c #b7120d", "bG c #b72f2f", "cm c #b90000", "dg c #ba0000", "b5 c #bb0000", "a5 c #bc0000", "#8 c #bd959f", "b3 c #be0000", "#U c #be3104", "ch c #beeafe", "ar c #bf0000", "bJ c #bfeafe", "aa c #c00000", "am c #c0c1cf", "aZ c #c0ddee", "c0 c #c10000", "cl c #c20000", "bc c #c2281d", "aL c #c40000", "a4 c #c50000", "cU c #c5edfe", "bi c #c60000", "#b c #c6e1de", "cT c #c6edfe", "bt c #c7edfe", "bf c #c7eefe", "cE c #c80000", "bV c #c82a1e", "bM c #cb0000", "#V c #cb5102", "dj c #cc0000", "b4 c #cd0000", "dH c #cd0302", "aK c #ce0000", "a3 c #cf0000", "by c #cf281c", "bh c #d00000", "bW c #d07e7f", "dC c #d10000", "#e c #d1b57c", "a. c #d20000", "dq c #d30c09", "aq c #d50000", "bZ c #d5f2ff", "a1 c #d60000", "aJ c #d70000", "cx c #d7f2ff", "aA c #d88f8f", "#6 c #d8babf", "a2 c #d90000", "aF c #d9f3ff", "#7 c #dbf4ff", "cg c #dcf4ff", "ce c #ddbbbf", "ap c #de0000", "c8 c #de1c14", "#4 c #de241a", "bF c #de4f39", "ao c #df0000", "b9 c #df0f0b", "#2 c #df4431", "al c #e0f5ff", "aI c #e10000", "#M c #e18b03", "#E c #e18d13", "#s c #e18e24", ".A c #e2eed7", "cz c #e2f6ff", "aT c #e3523b", "bI c #e3f6ff", "a# c #e40000", "aY c #e5f7ff", ".U c #e7f2ec", "cy c #e8f8ff", "cQ c #e92f22", "ag c #e93f2d", "be c #e9f8ff", "ai c #eacdcf", "#K c #ecb658", "bY c #edf9ff", "bn c #ef412f", "au c #ef6146", "aE c #effaff", "dk c #f00000", "#C c #f0c479", "#p c #f0c793", "ak c #f0faff", "dV c #f30000", "dD c #f40000", "bs c #f4dfdf", ".V c #f5f6ce", "cf c #f5fbff", "bH c #f5fcff", "dl c #f60000", "aX c #f6fcff", "c3 c #f70000", "aj c #f7fcff", "dW c #f80000", "bX c #f8fcff", "bd c #f8fdff", "dE c #f90000", "br c #f97f5c", "aD c #f9fdff", "#d c #faf28b", "#P c #fbdd04", "cJ c #fc0000", "aC c #fcfeff", "c4 c #fd0100", "aB c #fdfeff", "dF c #fe0302", "dm c #fe0503", "dG c #fe0504", "cp c #fe0805", "aW c #feffff", "c5 c #ff0a07", "cK c #ff0b08", "dn c #ff0d09", "do c #ff140e", "c6 c #ff150f", "cq c #ff1711", "dp c #ff1811", "cL c #ff1912", "c7 c #ff1f16", "c. c #ff2218", "cM c #ff251b", "cr c #ff261b", "bQ c #ff2a1e", "cN c #ff2f22", "c# c #ff3224", "cs c #ff3325", "cO c #ff3728", "bR c #ff3b2a", "cP c #ff3d2b", "ct c #ff3f2d", "ca c #ff402e", "bz c #ff422f", "#3 c #ff4632", "cu c #ff4833", "bS c #ff4a35", "cb c #ff4c37", "cv c #ff4e38", "cw c #ff503a", "bA c #ff523b", "bo c #ff563e", "cc c #ff573e", "a8 c #ff573f", "bT c #ff5840", "af c #ff5d43", "cd c #ff5e44", "bB c #ff6146", "ae c #ff6347", "ad c #ff6448", "a9 c #ff674a", "ay c #ff6b4d", "bU c #ff6d4e", "bC c #ff6f50", "av c #ff7050", "aP c #ff7151", "ax c #ff7252", "aw c #ff7453", "b. c #ff7655", "bD c #ff7a58", "aQ c #ff7c59", "aS c #ff7f5c", "bE c #ff805c", "aR c #ff825e", "bp c #ff835f", "b# c #ff845f", "bb c #ff8963", "bq c #ff8c65", "ba c #ff8d66", "#L c #ffeb1e", "#D c #ffee40", "#r c #fff163", "#q c #fff484", "#c c #fff7a6", ".z c #fffdea", ".y c #fffefd", "aV c #ffffff", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.a.b.cQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQt.d.e.f.g.h.i.jQtQtQt.k.l.mQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.CQt.D.E.F.G.H.I.d.nQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt.J.K.L.M.N.O.P.Q.R.S.T.U.V.J.o.W.X.Y.Z.Z.0.1.W.o.2QtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt.J.3.4.5.6.7.8.9#.###a#b#c#d#e#f#g.7#h#h.7#g#i#j#kQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt#l#m#n#o.DQtQtQtQtQt#p#c#q#r#s#t#u#v#w#x#y#z#A#B#mQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#C#q#r#D#EQtQtQt#F#G#H.5#I#JQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#K#r#D#L#MQtQtQtQtQt#N#oQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#O#D#L#P#QQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#R#S#T#U#V#W#X#Y#ZQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt#0#1#2#3#4#5#6#7#8#9a.a#aaabQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtacadaeafagahaiajakalamanaoapaqarasQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtatauavawaxayazaAaBaCaDaEaFaGaHaIaJaKaLaMaNQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtaOaeaPaQaRaSaTaUaVaVaWaCaXaYaZa0a1a2a3a4a5ana6QtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQta7a8a9b.b#babbbcaAaVaVaVaBbdbebfbga5a2bhbia5bjbkblQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtbmbnboa9b.bpbqbranbsaVaVaVaBbdbebtbubva2bhbia5bjbwbxQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtbybzbAbBbCbDbEbFbGaWaVaWaWaCbHbIbJbKbLbMa3a4a5bNbwanbOQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtbPbQbRbSbTadbUaPbVbWaCaBaBaCbXbYbZb0b1b2b3b4aLb5b6b7ananb8QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtb9c.c#cacbcccdbBazcebHbdbXcfbYcgchcicjckb6bMclcmcnanananbOQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtcocpcqcrcsctcucvcwancxbIcycyczbZchcAcBcCcDbwcEarcFcGanananancHQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtcIcJcKcLcMcNcOcPcQcRcSbJcTcUchb0cicVcWcXcYcZc0a5bjbvananananc1QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtc2c3c4c5c6c7crbQc8c9b1d.cicid.d#dadbdcdddedfdgcmdhb7anananandiQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtdjdkdlcJdmdndodpdqdrdsdtdududvcCdwdxdydedzdAc2c2dBananananandiQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQt#YdCdDdEcJdFdGdHdIdJdKcXcXdLdJdMdNdOdzdzdPdQdhb7ananandRdSQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtdTdUdVdldWb5dXdYdZd0d0dNd1d2dzdzdzdzdPdBd3anandid4QtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtd5dTd6bkd7dzdzdzdzdzdzdzdzdzdzdzd8dRd9dSQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQte.e#eaebebebebebebebece#.DQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; unixODBC-2.2.14-p2/odbcinstQ4/Canada.xpm0100644000076400007640000000337510666700031016113 0ustar nicknick/* XPM */ static const char *xpmCanada[] = { /* width height num_colors chars_per_pixel */ " 32 22 56 1", /* colors */ ". c #000000", "# c #d75556", "a c #f5eded", "b c #edc4c4", "c c #e18a8a", "d c #eec8c8", "e c #ca1414", "f c #f1d7d8", "g c #f4e8e8", "h c #e69f9f", "i c #d13838", "j c #f6f0f0", "k c #d23c3c", "l c #e59a9a", "m c #f0d6d6", "n c #ebbaba", "o c #c70606", "p c #da6464", "q c #d54848", "r c #ce2a2a", "s c #ecc0c1", "t c #edc4c5", "u c #e7a8a8", "v c #d03232", "w c #f1d9d9", "x c #f5eaea", "y c #da6363", "z c #dd7273", "A c #e08383", "B c #d75656", "C c #f3e1e1", "D c #c60000", "E c #db696a", "F c #cc2020", "G c #df7e7e", "H c #cb1b1b", "I c #c70303", "J c #f6f3f3", "K c #f7f7f7", "L c #e59d9d", "M c #e08181", "N c #dd7474", "O c #cf2b2b", "P c #f0d2d2", "Q c #e6a3a4", "R c #c70202", "S c #f6f2f2", "T c #e8a9a9", "U c #d64f4f", "V c #f0d4d5", "W c #f7f6f6", "X c #d65152", "Y c #f4e9e9", "Z c #ebbcbc", "0 c #efcdcd", "1 c #e6a0a0", /* pixels */ "................................", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKJKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKLnKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKSavUYKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKkDI#KKKKKyDDDDDDD.", ".DDDDDDDAKKKfKpDDMWwKKKyDDDDDDD.", ".DDDDDDDAKbTXqcDDliE1PKyDDDDDDD.", ".DDDDDDDAKCoDDIDDRDDejKyDDDDDDD.", ".DDDDDDDAK0HDDDDDDDDOwKyDDDDDDD.", ".DDDDDDDAKKdNFDDDDrGPKKyDDDDDDD.", ".DDDDDDDAKKKKBDIIDzKKKKyDDDDDDD.", ".DDDDDDDAKKKSmxutgVWKKKyDDDDDDD.", ".DDDDDDDAKKKKKKQsKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKhZKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKajKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", ".DDDDDDDAKKKKKKKKKKKKKKyDDDDDDD.", "................................" }; unixODBC-2.2.14-p2/odbcinstQ4/DataSourceName48.xpm0100644000076400007640000004606510723566553017773 0ustar nicknick/* XPM */ static const char * xpmDataSourceName48[] = { "48 48 915 2", " c None", ". c #000000", "+ c #010101", "@ c #848484", "# c #CECECE", "$ c #3F3F3F", "% c #353535", "& c #333333", "* c #868686", "= c #B8B8B8", "- c #FAFAFA", "; c #F8F8F8", "> c #C2C2C2", ", c #262626", "' c #0E0605", ") c #A87C7A", "! c #C98481", "~ c #E19B99", "{ c #CB7672", "] c #B87572", "^ c #664644", "/ c #020000", "( c #656565", "_ c #D8D8D8", ": c #F1F1F1", "< c #E4E4E4", "[ c #D2D2D2", "} c #B3B3B3", "| c #171717", "1 c #483432", "2 c #DF9D98", "3 c #D26460", "4 c #B90D06", "5 c #BE211B", "6 c #C3312B", "7 c #C1241E", "8 c #D66561", "9 c #DE8380", "0 c #CA5A56", "a c #BC5956", "b c #310302", "c c #666666", "d c #DEDEDE", "e c #EEEEEE", "f c #E1E1E1", "g c #D7D7D7", "h c #6E6E6E", "i c #210F0D", "j c #E6867F", "k c #C11810", "l c #BC0E07", "m c #984643", "n c #A16A68", "o c #A46D6B", "p c #A8706E", "q c #A86866", "r c #9F4542", "s c #C41F18", "t c #CA3D37", "u c #D87672", "v c #5F4644", "w c #3E3E3E", "x c #E3E3E3", "y c #ECECEC", "z c #E0E0E0", "A c #D6D6D6", "B c #040404", "C c #050000", "D c #C7564E", "E c #E77771", "F c #BE0D06", "G c #C32E28", "H c #9D6866", "I c #D38D8B", "J c #D88F8D", "K c #DC9492", "L c #DF9795", "M c #E39A98", "N c #AF7372", "O c #A34744", "P c #CF433F", "Q c #BC615D", "R c #63403F", "S c #E2E2E2", "T c #F6F6F6", "U c #EAEAEA", "V c #DFDFDF", "W c #D5D5D5", "X c #B2B2B2", "Y c #969696", "Z c #7B3735", "` c #E57470", " . c #DE443A", ".. c #C20C07", "+. c #C74742", "@. c #CE8987", "#. c #D18D8A", "$. c #D5908E", "%. c #DA9491", "&. c #DE9795", "*. c #E09A99", "=. c #E39B9A", "-. c #B17776", ";. c #A06261", ">. c #AF7B7A", ",. c #F0E2E2", "'. c #F4F4F4", "). c #E7E7E7", "!. c #DDDDDD", "~. c #D4D4D4", "{. c #8E8E8E", "]. c #0A0A0A", "^. c #403433", "/. c #D6605D", "(. c #DE3930", "_. c #E35D52", ":. c #C70C07", "<. c #CA4743", "[. c #CC8A88", "}. c #D08E8A", "|. c #D4918F", "1. c #D89593", "2. c #DB9895", "3. c #DF9B98", "4. c #E29B9A", "5. c #A06C6B", "6. c #A18483", "7. c #F1ECEC", "8. c #F2F2F2", "9. c #E6E6E6", "0. c #DCDCDC", "a. c #999999", "b. c #676767", "c. c #B66866", "d. c #DB504D", "e. c #DF4239", "f. c #EB7469", "g. c #CD0D08", "h. c #CC3733", "i. c #CC8B89", "j. c #CF8F8C", "k. c #D49390", "l. c #D79693", "m. c #DB9896", "n. c #DD9B98", "o. c #936463", "p. c #967372", "q. c #EEEAEA", "r. c #EFEFEF", "s. c #E5E5E5", "t. c #B6B6B6", "u. c #848080", "v. c #302322", "w. c #090909", "x. c #383535", "y. c #D8605D", "z. c #D73A37", "A. c #DF453D", "B. c #F3958B", "C. c #D4150E", "D. c #D41A16", "E. c #CC8C89", "F. c #CF8F8D", "G. c #D29390", "H. c #D59794", "I. c #D89A98", "J. c #B57D7C", "K. c #947170", "L. c #EFEDED", "M. c #868383", "N. c #722928", "O. c #A03834", "P. c #340302", "Q. c #080808", "R. c #A4A4A4", "S. c #BEBEBE", "T. c #292929", "U. c #7F5D5D", "V. c #D9423F", "W. c #D01714", "X. c #DB3A36", "Y. c #F5A499", "Z. c #E2423C", "`. c #DC0F0A", " + c #D17572", ".+ c #D0928F", "++ c #D29693", "@+ c #D89A97", "#+ c #CC8F8D", "$+ c #9D8280", "%+ c #EDEDED", "&+ c #BABABA", "*+ c #878383", "=+ c #835F5F", "-+ c #B26967", ";+ c #DB6C69", ">+ c #D77673", ",+ c #2F0301", "'+ c #0D0D0D", ")+ c #B0B0B0", "!+ c #FBFBFB", "~+ c #AFAFAF", "{+ c #131313", "]+ c #4A4A4A", "^+ c #B96260", "/+ c #D62E2B", "(+ c #D40F09", "_+ c #DB100C", ":+ c #F3A299", "<+ c #F0847C", "[+ c #E20F0C", "}+ c #DC4642", "|+ c #D09692", "1+ c #D49996", "2+ c #D69C99", "3+ c #D89B98", "4+ c #D89C99", "5+ c #996B69", "6+ c #CCC1C1", "7+ c #858181", "8+ c #6E4E4E", "9+ c #C48483", "0+ c #EBA0A0", "a+ c #E78988", "b+ c #D14642", "c+ c #D47673", "d+ c #230201", "e+ c #121212", "f+ c #BDBDBD", "g+ c #C9C9C9", "h+ c #5A5A5A", "i+ c #393939", "j+ c #D85755", "k+ c #D7322F", "l+ c #D70F0A", "m+ c #DF110C", "n+ c #F5ACA5", "o+ c #F7BBB5", "p+ c #E92B27", "q+ c #E71411", "r+ c #D58E89", "s+ c #D59B99", "t+ c #D79D9B", "u+ c #D79D9A", "v+ c #D99F9C", "w+ c #C68F8D", "x+ c #9B706F", "y+ c #958887", "z+ c #6D6565", "A+ c #7B5656", "B+ c #C08382", "C+ c #E49E9C", "D+ c #E99F9D", "E+ c #EBA1A1", "F+ c #E58381", "G+ c #C3130D", "H+ c #BE4C47", "I+ c #130101", "J+ c #F9F9F9", "K+ c #EBEBEB", "L+ c #525252", "M+ c #754C4B", "N+ c #D63632", "O+ c #D72622", "P+ c #DF110B", "Q+ c #E7332E", "R+ c #F8C2BC", "S+ c #F7C6C3", "T+ c #F38B86", "U+ c #ED110E", "V+ c #E55451", "W+ c #D69F9C", "X+ c #D8A09D", "Y+ c #D9A09D", "Z+ c #BF8A87", "`+ c #956665", " @ c #704B4B", ".@ c #956564", "+@ c #B9817F", "@@ c #D89493", "#@ c #E59D9C", "$@ c #ECA1A1", "%@ c #E17471", "&@ c #CB3E38", "*@ c #702926", "=@ c #1C1918", "-@ c #E9E9E9", ";@ c #A1A1A1", ">@ c #989898", ",@ c #5E5E5E", "'@ c #8F4D4C", ")@ c #D6312D", "!@ c #D9100A", "~@ c #E3120D", "{@ c #F0746D", "]@ c #F9C7C2", "^@ c #F8CCC8", "/@ c #F8CECC", "(@ c #EB2B28", "_@ c #F11613", ":@ c #DC8D8A", "<@ c #D7A29E", "[@ c #D9A3A0", "}@ c #DAA2A0", "|@ c #DAA29F", "1@ c #BC8885", "2@ c #9D6F6E", "3@ c #966967", "4@ c #A77573", "5@ c #B17A79", "6@ c #E39C9B", "7@ c #E59E9D", "8@ c #E99F9E", "9@ c #ECA2A1", "0@ c #883533", "a@ c #852723", "b@ c #E7DCDB", "c@ c #B7B7B7", "d@ c #505050", "e@ c #C85352", "f@ c #DA3C39", "g@ c #DC100A", "h@ c #E5120E", "i@ c #F6A7A0", "j@ c #FBD9D6", "k@ c #F9D0CD", "l@ c #F9D5D2", "m@ c #F8A3A1", "n@ c #F41311", "o@ c #EF3E3B", "p@ c #D8A49F", "q@ c #D9A4A0", "r@ c #DAA3A0", "s@ c #DAA09D", "t@ c #CE9592", "u@ c #AD7B7A", "v@ c #BE8684", "w@ c #C18886", "x@ c #D69492", "y@ c #E39D9C", "z@ c #E69F9E", "A@ c #AE8383", "B@ c #EDE4E4", "C@ c #F3F3F3", "D@ c #939393", "E@ c #C84744", "F@ c #D62825", "G@ c #DE100C", "H@ c #E92722", "I@ c #FACDC6", "J@ c #FDE2DF", "K@ c #F9D3CE", "L@ c #F9D3CF", "M@ c #F9D2CE", "N@ c #F75350", "O@ c #F81312", "P@ c #E7716F", "Q@ c #D8A39F", "R@ c #D9A4A1", "S@ c #DBA5A1", "T@ c #DAA09E", "U@ c #DA9F9C", "V@ c #CE9492", "W@ c #AD7A79", "X@ c #CA8E8D", "Y@ c #D69593", "Z@ c #8C5F5E", "`@ c #A98584", " # c #F0EDED", ".# c #F0F0F0", "+# c #DADADA", "@# c #B5B5B5", "## c #888888", "$# c #282828", "%# c #CE4744", "&# c #D6201D", "*# c #E3120E", "=# c #EF5D56", "-# c #FACCC6", ";# c #FDE1DE", "># c #FAD4D0", ",# c #FAD0CB", "'# c #FACAC6", ")# c #F9BBB5", "!# c #F91F1D", "~# c #F91B1B", "{# c #DF908D", "]# c #D9A5A1", "^# c #D99D9A", "/# c #B68180", "(# c #C88D8C", "_# c #865A5A", ":# c #A28484", "<# c #8D8B8B", "[# c #161616", "}# c #D25754", "|# c #DB2D29", "1# c #F4857C", "2# c #F9BEB6", "3# c #FAC8C0", "4# c #F76B63", "5# c #F73330", "6# c #FAC0B9", "7# c #F98A82", "8# c #FC1313", "9# c #F73130", "0# c #DA9F9B", "a# c #D8A5A0", "b# c #DAA19E", "c# c #D99E9B", "d# c #DA9E9B", "e# c #7A5452", "f# c #A18282", "g# c #DBDBDB", "h# c #978989", "i# c #5F1614", "j# c #1A0201", "k# c #CE514F", "l# c #D8100A", "m# c #E4130E", "n# c #F8A096", "o# c #F9BAB1", "p# c #FAC2B9", "q# c #F7746D", "r# c #F51714", "s# c #F71513", "t# c #F95852", "u# c #FAC0B7", "v# c #FB504C", "w# c #FB1313", "x# c #F04B49", "y# c #E2AFAC", "z# c #D8A29F", "A# c #D8A19E", "B# c #D89E9C", "C# c #AF7B79", "D# c #968483", "E# c #B9B9B9", "F# c #9D9595", "G# c #8C5755", "H# c #9C0C05", "I# c #700804", "J# c #D06360", "K# c #DA120B", "L# c #E51C16", "M# c #F9AD9F", "N# c #F9B7AC", "O# c #F99E94", "P# c #F41713", "Q# c #F51713", "R# c #F81513", "S# c #F9746D", "T# c #FAAFA4", "U# c #F92A28", "V# c #F81313", "W# c #E75E5B", "X# c #E1AEAC", "Y# c #D6A09D", "Z# c #D8A29E", "`# c #D79F9C", " $ c #D79C99", ".$ c #85625F", "+$ c #B7B5B4", "@$ c #BBBBBB", "#$ c #A09595", "$$ c #865D5D", "%$ c #C38584", "&$ c #C43F3A", "*$ c #AB0D06", "=$ c #170201", "-$ c #CF6360", ";$ c #E63229", ">$ c #F7A7A4", ",$ c #F9B0A4", "'$ c #F23C35", ")$ c #F31511", "!$ c #F71512", "~$ c #F81615", "{$ c #F98278", "]$ c #F99287", "^$ c #F61815", "/$ c #F31210", "($ c #E16863", "_$ c #DEAAA7", ":$ c #D49D9A", "<$ c #D49D99", "[$ c #D49B98", "}$ c #D69B98", "|$ c #805D5B", "1$ c #A99D9C", "2$ c #968887", "3$ c #8A6060", "4$ c #A16C6B", "5$ c #D79392", "6$ c #DC817E", "7$ c #AE0E07", "8$ c #5A0703", "9$ c #C8625F", "0$ c #D9120B", "a$ c #E84137", "b$ c #F68779", "c$ c #EF1611", "d$ c #F11511", "e$ c #F31713", "f$ c #F31612", "g$ c #F51613", "h$ c #F51411", "i$ c #F51715", "j$ c #F5776B", "k$ c #F5665A", "l$ c #F2130F", "m$ c #F01511", "n$ c #DD6A67", "o$ c #DCA6A3", "p$ c #D19996", "q$ c #D19894", "r$ c #D39895", "s$ c #D59996", "t$ c #D79996", "u$ c #AB7674", "v$ c #815858", "w$ c #7D5453", "x$ c #B87D7B", "y$ c #B87D7C", "z$ c #CD8988", "A$ c #B82B25", "B$ c #930903", "C$ c #010000", "D$ c #BD615F", "E$ c #DF3F3A", "F$ c #E9483C", "G$ c #FA9D8C", "H$ c #EF453C", "I$ c #EE1610", "J$ c #F31613", "K$ c #F21411", "L$ c #F11A14", "M$ c #F26356", "N$ c #F14B40", "O$ c #EC120F", "P$ c #EA120F", "Q$ c #D9615D", "R$ c #CC938F", "S$ c #CF9491", "T$ c #D09592", "U$ c #D29592", "V$ c #D39592", "W$ c #D59693", "X$ c #C38886", "Y$ c #A3706F", "Z$ c #BC807E", "`$ c #AD7573", " % c #B77B79", ".% c #BD524F", "+% c #A00903", "@% c #1D0000", "#% c #973936", "$% c #E46561", "%% c #E94539", "&% c #F78A7B", "*% c #E41410", "=% c #EC1510", "-% c #EF1411", ";% c #F11411", ">% c #F11310", ",% c #F21511", "'% c #EF1410", ")% c #E7130E", "!% c #E94335", "~% c #E72B23", "{% c #E6100C", "]% c #E3100C", "^% c #DF827F", "/% c #D69A97", "(% c #C98E89", "_% c #CB8E8B", ":% c #CD908D", "<% c #CF928F", "[% c #D1928F", "}% c #D3918F", "|% c #C18381", "1% c #A26D6B", "2% c #BD7B7A", "3% c #B66765", "4% c #B83631", "5% c #400300", "6% c #5B0503", "7% c #E36561", "8% c #E73F33", "9% c #E9514B", "0% c #E0120C", "a% c #EA1510", "b% c #ED1611", "c% c #EE1510", "d% c #EE1310", "e% c #ED120F", "f% c #EB110E", "g% c #E9100C", "h% c #E2110A", "i% c #DF281D", "j% c #DF1F17", "k% c #DA0F08", "l% c #DA645F", "m% c #D2908D", "n% c #C67975", "o% c #C88986", "p% c #CA8B88", "q% c #CE8C89", "r% c #D08C88", "s% c #D08B88", "t% c #BF7D7B", "u% c #AF726F", "v% c #B6726E", "w% c #D0716E", "x% c #560501", "y% c #2C0301", "z% c #E16561", "A% c #DE3D36", "B% c #DC3D38", "C% c #E4150D", "D% c #E6150E", "E% c #EB140F", "F% c #EA140F", "G% c #E9130E", "H% c #E7120E", "I% c #E4110C", "J% c #DC0F08", "K% c #DA1B11", "L% c #D21009", "M% c #D20E08", "N% c #D10E08", "O% c #D5504C", "P% c #CF807B", "Q% c #CE8F8C", "R% c #C38380", "S% c #C68380", "T% c #C78381", "U% c #C7827F", "V% c #CA8380", "W% c #CA827F", "X% c #CE817F", "Y% c #B88584", "Z% c #C36865", "`% c #5D0601", " & c #030000", ".& c #D66560", "+& c #DD4A45", "@& c #DA3632", "#& c #DC110A", "$& c #E3150D", "%& c #E5170D", "&& c #E7140D", "*& c #E7140F", "=& c #E6130E", "-& c #E6120E", ";& c #E4120E", ">& c #E2110C", ",& c #DF0F0C", "'& c #DD0F0B", ")& c #DB0F0A", "!& c #D30D08", "~& c #CF0D07", "{& c #C90C07", "]& c #D0413D", "^& c #CB5E5A", "/& c #D08482", "(& c #BC7B77", "_& c #BD7875", ":& c #BE7977", "<& c #C07976", "[& c #C47A77", "}& c #C38381", "|& c #D59A97", "1& c #A10903", "2& c #9B3A36", "3& c #E06660", "4& c #D7312D", "5& c #DC120A", "6& c #DF130A", "7& c #E1150D", "8& c #E2150D", "9& c #E0140D", "0& c #E0110B", "a& c #DE110B", "b& c #DC100B", "c& c #DA0F0A", "d& c #D80E09", "e& c #D50D08", "f& c #CF0E08", "g& c #CB0C07", "h& c #C80C07", "i& c #C20A06", "j& c #C10A05", "k& c #BC0A04", "l& c #C4332E", "m& c #C1342F", "n& c #CD6864", "o& c #CE8A87", "p& c #B56E6B", "q& c #CD9B99", "r& c #D09A99", "s& c #DC9494", "t& c #CA625D", "u& c #970803", "v& c #3F0400", "w& c #DC6660", "x& c #D5302C", "y& c #D5110A", "z& c #D8110A", "A& c #DA110A", "B& c #DB110A", "C& c #D51009", "D& c #D31009", "E& c #D00E08", "F& c #C90D08", "G& c #C60A07", "H& c #C20A05", "I& c #BF0A05", "J& c #BB0905", "K& c #B50904", "L& c #B10904", "M& c #AF0804", "N& c #AD0803", "O& c #B32521", "P& c #BE3A38", "Q& c #C85C59", "R& c #C54B48", "S& c #BD3734", "T& c #B93533", "U& c #A62924", "V& c #8A0802", "W& c #1A0100", "X& c #B6635F", "Y& c #D2352F", "Z& c #CC0F07", "`& c #D01007", " * c #D20F08", ".* c #D10F08", "+* c #CE0D07", "@* c #C60C07", "#* c #C40A06", "$* c #C00A05", "%* c #BD0905", "&* c #B90905", "** c #B60904", "=* c #B10903", "-* c #AC0903", ";* c #A60703", ">* c #B22723", ",* c #AE120E", "'* c #AE0C09", ")* c #A30603", "!* c #9A0603", "~* c #9A0602", "{* c #930603", "]* c #870702", "^* c #8B0602", "/* c #650702", "(* c #3D3D3D", "_* c #B7A7A7", ":* c #B9130C", "<* c #C60D06", "[* c #C50E06", "}* c #C70E06", "|* c #C50C07", "1* c #C30C07", "2* c #BD0A05", "3* c #BC0905", "4* c #B90904", "5* c #B80905", "6* c #B20903", "7* c #AF0903", "8* c #A50703", "9* c #A20703", "0* c #9E0703", "a* c #990703", "b* c #940602", "c* c #A81D1A", "d* c #A41916", "e* c #A11916", "f* c #9F1B18", "g* c #9F211E", "h* c #9F241F", "i* c #9D2621", "j* c #170100", "k* c #060606", "l* c #A7A7A7", "m* c #6A6A6A", "n* c #653938", "o* c #B20C06", "p* c #BB0D06", "q* c #BA0D06", "r* c #B90B04", "s* c #B70A04", "t* c #B40A04", "u* c #B30903", "v* c #AF0803", "w* c #AE0803", "x* c #AB0703", "y* c #A90803", "z* c #9D0703", "A* c #9A0703", "B* c #950603", "C* c #910602", "D* c #8D0602", "E* c #880602", "F* c #860602", "G* c #800502", "H* c #800602", "I* c #7F0602", "J* c #7E0702", "K* c #280200", "L* c #020202", "M* c #787878", "N* c #707070", "O* c #4E4E4E", "P* c #210201", "Q* c #990903", "R* c #C23B36", "S* c #AE0A04", "T* c #AC0A04", "U* c #AA0803", "V* c #A80803", "W* c #A70803", "X* c #A30703", "Y* c #990603", "Z* c #930602", "`* c #8F0602", " = c #8A0602", ".= c #850502", "+= c #830502", "@= c #860502", "#= c #820501", "$= c #7D0602", "%= c #720502", "&= c #1E0100", "*= c #5B5B5B", "== c #7F7F7F", "-= c #575757", ";= c #202020", ">= c #773A38", ",= c #B43C37", "'= c #A60903", ")= c #A40803", "!= c #A10703", "~= c #9F0703", "{= c #980703", "]= c #970703", "^= c #920602", "/= c #8B0502", "(= c #900502", "_= c #9A110E", ":= c #9A1E1A", "<= c #962320", "[= c #440300", "}= c #0A0000", "|= c #3B3B3B", "1= c #606060", "2= c #323232", "3= c #3A3232", "4= c #643331", "5= c #933330", "6= c #9C0703", "7= c #9C0704", "8= c #9B0704", "9= c #9B0703", "0= c #9B0603", "a= c #960603", "b= c #900602", "c= c #8D0502", "d= c #9C1714", "e= c #9A1613", "f= c #89231F", "g= c #360300", "h= c #0C0000", "i= c #1F1F1F", "j= c #494949", "k= c #474747", "l= c #372D2D", "m= c #512E2C", "n= c #6C302E", "o= c #81312E", "p= c #91332E", "q= c #9E322E", "r= c #A1322E", "s= c #A1312D", "t= c #9A302B", "u= c #8F2E2A", "v= c #7D2B28", "w= c #6C2421", "x= c #57221F", "y= c #100000", "z= c #030303", "A= c #181818", "B= c #585858", "C= c #0E0E0E", "D= c #8A8A8A", "E= c #747474", "F= c #7D7D7D", "G= c #454545", "H= c #242424", "I= c #111111", "J= c #050505", "K= c #252525", "L= c #7A7A7A", "M= c #727272", "N= c #232323", "O= c #777777", "P= c #686868", "Q= c #5F5F5F", "R= c #5C5C5C", "S= c #6B6B6B", "T= c #797979", "U= c #404040", "V= c #2E2E2E", " ", " ", " . . ", " + @ # $ ", " . % & & . . . * = - ; > , ", " ' ) ! ~ ~ { ] ^ / . ( _ - : < [ } | ", " 1 2 3 4 5 6 7 8 9 0 a b . c d - e f g } h | ", " i j k l m n o p q r s t u v . w x ; y z A } * B ", " C D E F G H I J K L M N O P Q R S T U V W X Y + ", " . Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.X {.]. ", " ^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.[ a.b.]. ", " . c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.0.t.u.v.w. . ", " x.y.z.A.B.C.D.E.F.G.H.I.J.K.L.e s.0.= M.N.O.P.. Q.R.S.T. ", " U.V.W.X.Y.Z.`. +.+++H.@+#+$+%+s.0.&+*+=+-+;+>+,+. '+)+!+'.~+{+ ", " ]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+!.&+7+8+9+0+a+b+c+d+. . e+f+- e < g+h+ ", " i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+. e+g+J+K+V &+a.L+ ", " M+N+O+P+Q+R+S+T+U+V+W+X+Y+Y+v+Z+`+ @.@+@@@#@D+$@%@&@*@=@[ ; -@d ;@>@,@ ", " '@)@!@~@{@]@^@/@(@_@:@<@[@}@|@v+1@2@3@4@5@6@7@8@9@0@a@b@T ).!.c@Y d@ ", " e@f@g@h@i@j@k@l@m@n@o@p@q@[@r@}@s@t@u@v@w@x@y@z@o.A@B@C@s.0.t.D@i+ ", " . E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@r@T@U@V@W@v@X@Y@Z@`@ #.#< +#@###$# ", " . %#&#*#=#-#;#>#,#'#)#!#~#{#]#R@S@r@Y+U@^#/#(#_#:#x r.< +#t.<#[#. ", " . }#|#*#1#2#>#3#4#5#6#7#8#9#0#a#R@r@b#Y+c#d#e#f#< e s.g#c@h#i#j#. ", " . k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#Q@z#A#B#c#d#C#D#%+s.!.E#F#G#H#I#. ", " . J#K#L#M#N#O#P#Q#s#R#S#T#U#V#W#X#Y#Z#`#t+ $d#.$+$0.@$#$$$%$&$*$=$. ", " . -$K#;$>$,$'$)$P#Q#!$~${$]$^$/$($_$:$<$[$}$}$4+|$1$2$3$4$5$6$7$8$. ", " . 9$0$a$n#b$c$d$e$f$g$h$i$j$k$l$m$n$o$p$q$r$1+s$t$u$v$w$x$y$z$A$B$C$ ", " . D$E$F$G$H$I$m$d$J$f$)$K$L$M$N$O$P$Q$X+R$S$T$U$V$W$X$Y$Z$`$ %.%+%@%. ", " . #%$%%%&%*%=%c$-%;%>%,%;%'%)%!%~%{%]%^%/%(%_%:%<%[%}%k.|%1%2%3%4%5%. ", " 6%7%8%9%0%a%=%b%c%d%d%e%f%g%h%i%j%k%`.l%m%n%o%p%E.q%r%s%t%u%v%w%x%. ", " y%z%A%B%C%D%a%a%E%F%E%G%H%I%]%J%K%L%M%N%O%P%Q%R%S%T%U%V%W%X%Y%Z%`%. ", " &.&+&@&#&$&%&&&*&=&-&;&>&,&'&)&!&~&{&:.{&]&^&/&(&_&:&<&[&}&|&1&x%. ", " . 2&3&4&5&6&7&8&9&0&a&b&c&d&e&!&f&g&h&i&j&k&l&m&n&o&p&q&r&s&t&u&v&. ", " y%w&x&y&z&A&B&K#z&C&D&E&f&g.F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V&W&. ", " . X&Y&Z&`& *.*.*+*g&{&@*#*H&$*%*&***=*-*;*>*,*'*)*!*~*{*]*^*/*. ", " (*_*:*<*[*}*}*|*1*j&2*3*4*5***6*7*N&8*9*0*a*b*c*d*e*f*g*h*i*j*. ", " k*l*m*n*o*p*p*q*r*s*t*u*6*v*w*x*y*;*9*z*A*B*C*D*E*F*G*H*I*J*K*. ", " L*M*N*O*{+P*Q*R*L&S*T*U*V*W*8*8*X*9*z*A*Y*Z*`* =.=+=@=#=$=%=&=. ", " . *===-=;=. Q.C >=,='=)=!=!=!=~=~=z*A*{=]=^=D*E*/=(=_=:=<=[=}=+ ", " |={.1=2=. w.3=4=5=6=7=8=9=A*0=Y*a=Z*b=c=c=d=e=f=g=h=. e+ ", " i=D@m*j=. ;= k=| + l=m=n=o=p=q=r=s=t=u=v=w=x=y=. z=A=B= ", " C=D=E=1=C=i= F=F=F=E=G=H=I=J=. . . . . . . k*I=K=j=L=F= ", " ==M=N=i= F=F=F=F=F=F=F=O=P=Q=R=Q=S=T=F=F=F=F=F= ", " F=U=N= F=F=F=F=F=F=F=F=F=F=F=F=F=F= ", " V= ", " ", " ", " ", " "}; unixODBC-2.2.14-p2/odbcinstQ4/DataSourceNameFile48.xpm0100644000076400007640000003727110723566553020572 0ustar nicknick/* XPM */ static const char * xpmDataSourceNameFile48[] = { "48 48 699 2", " c None", ". c #5482C5", "+ c #90ADD8", "@ c #8FB1DE", "# c #769ACF", "$ c #3D6CB6", "% c #7298CE", "& c #D7E5F4", "* c #F3F8FC", "= c #E5F0FA", "- c #9DB4D8", "; c #92B7E2", "> c #DAEBF8", ", c #DAEAF8", "' c #B6CFEB", ") c #3368B7", "! c #5A97D8", "~ c #C1DCF3", "{ c #C4DCF3", "] c #C7DDF4", "^ c #C9DDF4", "/ c #C5DDF4", "( c #97BDE5", "_ c #1B65BE", ": c #80B5E8", "< c #ADCDF0", "[ c #B4D0F0", "} c #B7D2F1", "| c #B9D4F2", "1 c #BBD6F4", "2 c #ADCFF0", "3 c #A7CBEF", "4 c #A6CBEF", "5 c #347ACA", "6 c #2058AB", "7 c #0F6DD3", "8 c #99C1EC", "9 c #A6C7EE", "0 c #AACCF0", "a c #AED0F2", "b c #AFD1F3", "c c #9CC4EE", "d c #8BB8E9", "e c #90BBEA", "f c #8CB9EA", "g c #2C7FD8", "h c #215EB5", "i c #1962C0", "j c #2379D9", "k c #7DAFE7", "l c #A2CBF1", "m c #A5CDF2", "n c #83B3EA", "o c #6FA5E5", "p c #156DD5", "q c #1B65C4", "r c #226DCB", "s c #2376D9", "t c #5A99E1", "u c #97C5F0", "v c #9CC9F1", "w c #9FCBF2", "x c #76ACE8", "y c #5291E0", "z c #357EDB", "A c #035ED2", "B c #0E61CC", "C c #0A5AC9", "D c #0058D1", "E c #2B76D9", "F c #93C3EF", "G c #9CCCF3", "H c #9FCEF3", "I c #67A1E6", "J c #508FE0", "K c #3C80DC", "L c #357ADB", "M c #2A73D9", "N c #1064D4", "O c #2072D9", "P c #065CD3", "Q c #0957C8", "R c #105FD2", "S c #0054CF", "T c #236ED6", "U c #8CC1EF", "V c #A0D2F5", "W c #A3D4F6", "X c #A4D5F6", "Y c #5D9CE4", "Z c #1965D4", "` c #1764D3", " . c #0C5CD1", ".. c #2D78D9", "+. c #2471D7", "@. c #2F7CDB", "#. c #0955C7", "$. c #407CD9", "%. c #0050CD", "&. c #1B66D4", "*. c #90C7F1", "=. c #A9DAF8", "-. c #B4E0F9", ";. c #B7E1FA", ">. c #90C1F0", ",. c #286CD5", "'. c #145ED1", "). c #1360D2", "!. c #87BFEE", "~. c #206BD5", "{. c #6CA5E6", "]. c #6EADE6", "^. c #0D55C5", "/. c #487ED9", "(. c #0851CC", "_. c #004CCA", ":. c #6DA7E7", "<. c #B6E2FA", "[. c #C3E9FC", "}. c #C5EBFC", "|. c #C6ECFC", "1. c #AAD4F5", "2. c #336FD5", "3. c #2969D3", "4. c #75AFEA", "5. c #92C7F1", "6. c #1A62D1", "7. c #588BDD", "8. c #2D71CE", "9. c #195EC1", "0. c #3069D2", "a. c #5B8CDD", "b. c #97CAF2", "c. c #B8E5FB", "d. c #C8EDFD", "e. c #CBEFFD", "f. c #CDF0FE", "g. c #CEF1FE", "h. c #598DDE", "i. c #336CD3", "j. c #7EADE8", "k. c #B5E0F9", "l. c #78B0EA", "m. c #5E91DF", "n. c #386FD4", "o. c #3475C5", "p. c #0B4FC5", "q. c #9BBCEB", "r. c #BAE1F9", "s. c #C4EDFD", "t. c #D0F2FE", "u. c #D1F3FF", "v. c #D2F3FF", "w. c #BEE2F9", "x. c #B3D9F6", "y. c #A3CDF2", "z. c #6E9EE3", "A. c #C9E5F9", "B. c #5E97DF", "C. c #235DA0", "D. c #3878CB", "E. c #376BD0", "F. c #DEF4FE", "G. c #DAF4FE", "H. c #D3F3FF", "I. c #D4F4FF", "J. c #D6F4FF", "K. c #D7F4FF", "L. c #D7F5FF", "M. c #D9F4FE", "N. c #DFF5FE", "O. c #C9ECFC", "P. c #5F99D2", "Q. c #6299DA", "R. c #E3F8FF", "S. c #EAF9FF", "T. c #E6F8FF", "U. c #E5F8FF", "V. c #E2F7FF", "W. c #E4F7FF", "X. c #E9F9FF", "Y. c #D6F4FE", "Z. c #77ACDD", "`. c #7DADDD", " + c #C4E7F9", ".+ c #E2F0FB", "++ c #F1FBFF", "@+ c #F2FCFF", "#+ c #EFFBFF", "$+ c #E8F9FF", "%+ c #CDEEFC", "&+ c #86B5E1", "*+ c #6C95D6", "=+ c #2753C6", "-+ c #5678D2", ";+ c #829DDE", ">+ c #869FDF", ",+ c #6988D8", "'+ c #7495DD", ")+ c #A8CBEB", "!+ c #668BB8", "~+ c #687AA8", "{+ c #879CCC", "]+ c #7C91C0", "^+ c #586DA1", "/+ c #435580", "(+ c #898989", "_+ c #B4B4B4", ":+ c #B3B3B3", "<+ c #808080", "[+ c #8A8A96", "}+ c #D5D5D5", "|+ c #BDBDBD", "1+ c #71717B", "2+ c #828282", "3+ c #8C8C8C", "4+ c #696969", "5+ c #F5F5F5", "6+ c #E3E3E3", "7+ c #D4E0EF", "8+ c #D2E3F6", "9+ c #D6E7F8", "0+ c #D9EAFA", "a+ c #DDEEFC", "b+ c #DEEFFD", "c+ c #DBECFB", "d+ c #D8E8F9", "e+ c #D4E4F6", "f+ c #CFE0F3", "g+ c #D7DFEA", "h+ c #F6F6F6", "i+ c #CDCDCD", "j+ c #A0A0AD", "k+ c #FBFBFB", "l+ c #DFDFDF", "m+ c #858591", "n+ c #ECECEC", "o+ c #EAEAEA", "p+ c #D2E2F5", "q+ c #D5E6F8", "r+ c #DCEDFC", "s+ c #D8E9F9", "t+ c #D4E5F7", "u+ c #D0E0F4", "v+ c #D2DEEE", "w+ c #EEEEEE", "x+ c #535353", "y+ c #FFFFFF", "z+ c #5878A8", "A+ c #3D7ED0", "B+ c #4B8DD9", "C+ c #599BE2", "D+ c #66A9EA", "E+ c #70B4F1", "F+ c #73B7F3", "G+ c #6BAFEE", "H+ c #60A2E7", "I+ c #5294DE", "J+ c #4486D5", "K+ c #3373CA", "L+ c #C3D2EB", "M+ c #D3D3D3", "N+ c #91A1B9", "O+ c #3B7CCF", "P+ c #498BD8", "Q+ c #5799E1", "R+ c #64A7EA", "S+ c #6FB3F1", "T+ c #6DB0EF", "U+ c #61A4E8", "V+ c #5496DF", "W+ c #4688D6", "X+ c #3879CD", "Y+ c #C3D3EB", "Z+ c #F2F2F2", "`+ c #575757", " @ c #6787B3", ".@ c #3878CD", "+@ c #5092DD", "@@ c #5A9DE3", "#@ c #63A6E9", "$@ c #5EA1E6", "%@ c #5698E0", "&@ c #4B8CD9", "*@ c #3E7FD1", "=@ c #3171C9", "-@ c #C5D5EC", ";@ c #C9C9C9", ">@ c #42425B", ",@ c #AAAAB4", "'@ c #F8F8F8", ")@ c #9595A0", "!@ c #7E9ECA", "~@ c #3676CC", "{@ c #4384D4", "]@ c #4F91DC", "^@ c #599CE2", "/@ c #61A3E7", "(@ c #5FA2E6", "_@ c #4C8EDA", ":@ c #4081D2", "<@ c #90B0DD", "[@ c #E7E7E7", "}@ c #6383B3", "|@ c #2F6FC7", "1@ c #3A7BCF", "2@ c #4586D5", "3@ c #5193DD", "4@ c #5295DE", "5@ c #498AD8", "6@ c #3575CB", "7@ c #2A69C4", "8@ c #BBCBE4", "9@ c #BFBFBF", "0@ c #63636C", "a@ c #7A7A8A", "b@ c #5D5D72", "c@ c #CFCFCF", "d@ c #E6E6E6", "e@ c #525266", "f@ c #676774", "g@ c #797985", "h@ c #94A7C5", "i@ c #2E6EC6", "j@ c #397ACE", "k@ c #4C8DDA", "l@ c #5092DC", "m@ c #4A8BD9", "n@ c #4182D3", "o@ c #3777CC", "p@ c #2B6BC5", "q@ c #B0C4E2", "r@ c #DDDDDD", "s@ c #5A78AE", "t@ c #1755B7", "u@ c #2E6EC7", "v@ c #4283D3", "w@ c #3B7BCF", "x@ c #2867C3", "y@ c #0E4CB1", "z@ c #B6C5E0", "A@ c #BCBCBC", "B@ c #AEAEAE", "C@ c #9C9CA9", "D@ c #C4C4C4", "E@ c #D7D7D7", "F@ c #DADADA", "G@ c #838390", "H@ c #C5C5C5", "I@ c #99A9C3", "J@ c #0F4DB2", "K@ c #2D6DC6", "L@ c #3D7DD0", "M@ c #4283D4", "N@ c #3474CB", "O@ c #1250B4", "P@ c #D9D9D9", "Q@ c #5F7DB3", "R@ c #0643AD", "S@ c #2463C0", "T@ c #2C6BC5", "U@ c #3272C9", "V@ c #2968C4", "W@ c #1C5BBB", "X@ c #0B49B0", "Y@ c #013EA9", "Z@ c #B5C4DF", "`@ c #B9B9B9", " # c #969696", ".# c #888894", "+# c #BABABA", "@# c #CECECE", "## c #737380", "$# c #A5A5A5", "%# c #B5B5B5", "&# c #9EADC8", "*# c #0542AC", "=# c #114FB4", "-# c #2362BF", ";# c #3070C8", "># c #2F6FC8", ",# c #205FBE", "'# c #0C4AB1", ")# c #023FA9", "!# c #6887BB", "~# c #1351B5", "{# c #2464C0", "]# c #2A6AC4", "^# c #2B6AC5", "/# c #2565C1", "(# c #1E5DBC", "_# c #1453B6", ":# c #0947AF", "<# c #B5C4DE", "[# c #B6B6B6", "}# c #7B7B7B", "|# c #9A9A9A", "1# c #787883", "2# c #AFAFAF", "3# c #B1B1B1", "4# c #C1C1C1", "5# c #676773", "6# c #949494", "7# c #A5B4CE", "8# c #1B5ABA", "9# c #2665C2", "0# c #1F5EBD", "a# c #1654B7", "b# c #D1D1D1", "c# c #7190C1", "d# c #3A7ACE", "e# c #3E7ED1", "f# c #2160BE", "g# c #1553B6", "h# c #B6C5DF", "i# c #53535C", "j# c #666679", "k# c #6E6E81", "l# c #9E9E9E", "m# c #676779", "n# c #565666", "o# c #6A6A76", "p# c #ABBAD3", "q# c #1D5CBC", "r# c #2968C3", "s# c #2D6CC6", "t# c #2261BF", "u# c #B7C6E0", "v# c #FEFEFE", "w# c #7695C4", "x# c #4E90DB", "y# c #4F90DC", "z# c #4A8CD9", "A# c #4284D4", "B# c #B7C7DF", "C# c #B0B0B0", "D# c #89899A", "E# c #7B7B8D", "F# c #7B7B89", "G# c #909098", "H# c #84848C", "I# c #6D6D7A", "J# c #ADBDD4", "K# c #488AD8", "L# c #4485D5", "M# c #205FBD", "N# c #B8C7E0", "O# c #FCFCFC", "P# c #F9F9F9", "Q# c #F7F7F7", "R# c #F3F3F3", "S# c #F1F1F1", "T# c #EFEFEF", "U# c #EDEDED", "V# c #EBEBEB", "W# c #E9E9E9", "X# c #E5E5E5", "Y# c #DCDCDC", "Z# c #ADADAD", "`# c #919191", " $ c #7A7A7A", ".$ c #4F4F59", "+$ c #CBCBCB", "@$ c #DBDBDB", "#$ c #E8E8E8", "$$ c #E2E2E2", "%$ c #C0C0C0", "&$ c #7F7F7F", "*$ c #7C7C88", "=$ c #ACACAC", "-$ c #909090", ";$ c #5F5F6B", ">$ c #999999", ",$ c #D2D2D2", "'$ c #CCCCCC", ")$ c #8B8B8B", "!$ c #BEBEBE", "~$ c #D4D4D4", "{$ c #A4A4A4", "]$ c #707070", "^$ c #A2A2A2", "/$ c #F0F0F0", "($ c #F4F4F4", "_$ c #787878", ":$ c #DEE2E7", "<$ c #D0E1F4", "[$ c #D4E4F7", "}$ c #D7E8F9", "|$ c #DDEEFD", "1$ c #DAEBFA", "2$ c #D6E6F8", "3$ c #CEDEF2", "4$ c #989898", "5$ c #939393", "6$ c #ABABAB", "7$ c #E4E4E4", "8$ c #E0E0E0", "9$ c #E1E1E1", "0$ c #777777", "a$ c #5FA1E6", "b$ c #6BAEEE", "c$ c #71B4F2", "d$ c #67AAEB", "e$ c #5A9CE3", "f$ c #5C8CD1", "g$ c #868686", "h$ c #A8A2A2", "i$ c #A28B8B", "j$ c #94807F", "k$ c #7D7D7D", "l$ c #C2C2C2", "m$ c #BBBBBB", "n$ c #979797", "o$ c #686868", "p$ c #4A8BD8", "q$ c #5597E0", "r$ c #5EA1E5", "s$ c #62A5E8", "t$ c #5B9EE4", "u$ c #4687D6", "v$ c #3979CE", "w$ c #3975C9", "x$ c #C04943", "y$ c #B55552", "z$ c #C7706D", "A$ c #B24844", "B$ c #776766", "C$ c #676767", "D$ c #3F80D2", "E$ c #4D8FDB", "F$ c #4586D6", "G$ c #5A89CF", "H$ c #AAAAAA", "I$ c #AB4945", "J$ c #D23932", "K$ c #D08E8B", "L$ c #DC9895", "M$ c #B78786", "N$ c #E5DDDD", "O$ c #B3B1B1", "P$ c #4A4A4A", "Q$ c #0745AD", "R$ c #3273C9", "S$ c #3778CD", "T$ c #4270BF", "U$ c #A7A7A7", "V$ c #D8322E", "W$ c #E6534C", "X$ c #D28784", "Y$ c #D29593", "Z$ c #CBBDBD", "`$ c #B2AEAE", " % c #B26B6A", ".% c #612826", "+% c #656565", "@% c #023FAA", "#% c #2868C3", "$% c #2F6EC7", "%% c #2C6CC6", "&% c #1756B8", "*% c #0441AB", "=% c #406EBE", "-% c #983F3D", ";% c #DF2620", ">% c #F5ABA7", ",% c #E25754", "'% c #D8A09D", ")% c #BB8B88", "!% c #956A69", "~% c #DF9998", "{% c #D16865", "]% c #705A59", "^% c #929292", "/% c #0D4AB1", "(% c #1755B8", "_% c #2766C2", ":% c #1A58B9", "<% c #104EB3", "[% c #4472C1", "}% c #A22E2C", "|% c #EB5651", "1% c #FAD7D3", "2% c #F76C69", "3% c #DF8D8A", "4% c #DAA3A0", "5% c #CA928F", "6% c #C38887", "7% c #C0A1A1", "8% c #E1E0E0", "9% c #797878", "0% c #1856B8", "a% c #3677CC", "b% c #3C7DD0", "c% c #3170C8", "d% c #1C5ABB", "e% c #4C7BC6", "f% c #A0A0A0", "g% c #982926", "h% c #F17971", "i% c #F7756F", "j% c #F85D58", "k% c #F54744", "l% c #DC9E9B", "m% c #D89F9C", "n% c #B38583", "o% c #A99494", "p% c #5A0E0B", "q% c #4788D7", "r% c #2665C1", "s% c #5382CB", "t% c #9D9D9D", "u% c #972F2C", "v% c #F2756A", "w% c #F11A15", "x% c #F51612", "y% c #F54D45", "z% c #EA3D39", "A% c #D49592", "B% c #D49895", "C% c #B08381", "D% c #AA7473", "E% c #AC3D39", "F% c #C4D4EA", "G% c #C6D6EB", "H% c #C7D7EB", "I% c #C8D8EB", "J% c #C8D8EA", "K% c #C7D7E9", "L% c #C4D5E7", "M% c #C0D1E4", "N% c #BCCCE0", "O% c #B7C7DC", "P% c #B1C1D8", "Q% c #BAC6D8", "R% c #8D8D8D", "S% c #863330", "T% c #E63B33", "U% c #EB1510", "V% c #EE1410", "W% c #EA120E", "X% c #E21E16", "Y% c #D93530", "Z% c #CD8380", "`% c #CB8B88", " & c #C58381", ".& c #BD6E6B", "+& c #2A0200", "@& c #797979", "#& c #CACACA", "$& c #D0D0D0", "%& c #B2B2B2", "&& c #A1A1A1", "*& c #636363", "=& c #54211E", "-& c #DA3530", ";& c #E0140C", ">& c #DF120C", ",& c #D90F0A", "'& c #D20D08", ")& c #C50B06", "!& c #BF1E19", "~& c #C05652", "{& c #C3706D", "]& c #B54844", "^& c #200200", "/& c #D6D6D6", "(& c #B7B7B7", "_& c #616161", ":& c #AC3C38", "<& c #C60E07", "[& c #C30C06", "}& c #BC0A05", "|& c #B50904", "1& c #AB0803", "2& c #A00B06", "3& c #9C0D09", "4& c #920D0A", "5& c #620C08", "6& c #FDFDFD", "7& c #DEDEDE", "8& c #5C5C5C", "9& c #1D1919", "0& c #6F221F", "a& c #9D120D", "b& c #A10703", "c& c #9E0703", "d& c #960603", "e& c #8E0804", "f& c #850E0B", "g& c #470806", "h& c #272121", "i& c #343434", "j& c #4C4A4A", "k& c #503938", "l& c #552E2C", "m& c #522B29", "n& c #4A302E", "o& c #383636", "p& c #888888", " . + @ @ + # $ ", " % & * * * * * * = - ", " ; > > > > , > > > > > ' ) ", " ! ~ ~ { ] ^ / ~ ~ ~ ~ ~ ~ ( ", " _ : < [ } | 1 2 3 4 4 4 4 4 4 5 ", " 6 7 8 9 0 a b c d d d e f d d d g h ", " i j k c l m n o o o o o o o o o p q ", " r s t u v w x y y y y y y y y z A B ", " C D D E F G H I J K L L L L M N O P ", " Q R S S T U V W X Y Z Z ` ...+.R @. ", " #.$.%.%.&.*.=.-.;.>.,.'.%.).!.~.{.]. ", " ^./.(._.:.<.[.}.|.1.2.2.3.4.5.6.7.8. ", " 9.0.a.b.c.d.e.f.g.g.h.i.j.k.l.m.n.o. ", " p.q.r.s.g.t.u.v.v.w.x.g.y.z.A.B.C. ", " D.E.F.G.H.I.J.K.L.J.I.H.M.N.O.P. ", " Q.g.R.S.T.U.V.V.W.U.X.U.Y.Z. ", " `. +T..+++@+@+++#+$+%+&+ ", " *+=+-+;+>+,+'+)+!+ ", " ~+{+]+^+/+ ", " (+_+_+_+_+_+_+_+_+_+_+:+:+:+<+ [+}+|+1+ 2+_+_+_+_+_+_+_+_+_+_+:+:+:+3+ ", "4+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+ j+k+l+m+ n+o+7+p+q+0+r+b+r+s+t+u+v+h+w+x+", "4+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+ j+k+l+m+ y+N+O+P+Q+R+S+F+T+U+V+W+X+Y+Z+`+", "4+y+ @.@J++@@@U+#@$@%@&@*@=@-@;@ >@>@>@,@'@6+)@>@>@>@ y+!@~@{@]@^@/@#@(@Q+_@:@K+<@[@`+", "4+y+}@|@1@2@_@3@4@]@5@:@6@7@8@9@0@a@b@c@o+o+o+o+o+o+o+o+d@e@f@g@y+h@i@j@{@k@3@4@l@m@n@o@p@q@r@`+", "4+y+s@t@u@o@A+n@v@:@w@K+x@y@z@A@B@o+C@D@E@E@E@E@E@E@E@E@F@G@H@M+y+I@J@K@~@L@n@M@:@O+N@p@O@z@P@`+", "4+y+Q@R@O@S@T@=@U@|@V@W@X@Y@Z@`@ #D@.#+#D@D@D@D@D@D@D@D@@###$#%#y+&#*#=#-#p@;#U@>#7@,#'#)#Z@}+`+", "4+y+!#~#W@{#]#K@K@^#/#(#_#:#<#[#}#|#1#2#3#3#3#3#3#3#3#3#4#5#2+6#y+7#=#8#S@7@K@K@p@9#0#a#X@Z@b#`+", "4+y+c#0#7@K+d#e#*@w@N@p@f#g#h#:+i#j#k#$#l#l#l#l#l#l#l#l#%#m#n#o#y+p#q#r#U@j@e#*@O+6@s#t#a#u#i+`+", "4+v#w#7@~@n@P+x#y#z#A#.@p@(#B#C# D#D#E#F#G#H#I#E#D#D# v#J#x@6@:@K#x#y#B+L#j@K@M#N#;@`+", "4+O#k+P#Q#5+R#S#T#U#V#W#[@X#Y#Z# o#`# $.$ R#k+P#Q#5+R#S#T#U#V#W#[@X#Y#9@`+", " l#b#@#+$@$V##$X#$$l+%$:+C#Z#&$ *$=$-$;$ >$,$c@'$Y#V##$X#$$l+%$_+3#B@)$ ", " }#!$E@~$b#@#'${$]$ 2#_+_+_+_+_+_+_+_+_+:+:+:+{$ $2#E@~$b#c@'$^$}# ", " |#v#Z+V#/$Q#[@@#T#($_$ 2#'@:$<$[$}$c+b+|$1$2$p+3$#$O#4$ 5$($($X#W#Q#U#6$X#($>$ ", " #T#w+#$7$8$Y#9$n+[@0$ _+X#r#{@3@a$b$F+c$d$e$_@*@f$P#%# g$h$i$j$Z#8$+#D@-$[@3+ ", " k$l#l$l$;@l$m$n$o$ _+[@;#A+p$q$r$#@s$t$3@u$v$w$S#2# x$y$z$A$B$Y#'$C$o$ ", " _+W#M#N@D$K#]@I+I+E$F$O+;#G$d@H$ I$J$K$L$M$N$O$P$ ", " _+n+Q$-#R$d#D$M@n@*@S$>#M#T$6+U$ V$W$X$Y$Z$`$ %.% +%%$ ", " _+w+@%:#W@#%$%U@=@%%/#&%*%=%8$$# -%;%>%,%'%)%!%~%{%]%9$^% ", " _+/$/%(%M#_%T@K@%%r#t#:%<%[%r@^$ }%|%1%2%3%4%5%6%7%8%9% ", " _+Z+0%S@u@a%b%*@A+X+c%_%d%e%F@f% g%h%i%j%k%l%m%n%@$o%p% ", " _+S#t#|@w@2@_@]@E$q%*@K+r%s%E@t% u%v%w%x%y%z%A%B%C%D%E% ", " :+Q#F%G%H%I%J%K%L%M%N%O%P%Q%i+R% S%T%U%V%W%X%Y%Z%`% &.&+& ", " @&#&$&i+#&U#o+[@7$9$}+%#%&2#&&*& =&-&;&>&,&'&)&!&~&{&]&^& ", " *&>$,$/&M+$&i+(&n$_& :&<&[&}&|&1&2&3&4&5& ", " 9$6&#$U#h+/$7&c@v#H@ 8&9&0&a&b&c&d&e&f&g&h& ", " c@/$n+d@$$l+7&[@/$!$ _&i& j&k&l&m&n&o& ", " ^%_+l$$&;@l$=$p& ", " "}; unixODBC-2.2.14-p2/odbcinstQ4/DataSourceNameSystem48.xpm0100644000076400007640000004325310723566553021174 0ustar nicknick/* XPM */ static const char * xpmDataSourceNameSystem48[] = { "48 48 826 2", " c None", ". c #71490A", "+ c #71480A", "@ c #71480B", "# c #714A09", "$ c #7E5616", "% c #966B28", "& c #A47834", "* c #AC813B", "= c #AB7F39", "- c #9E722F", "; c #906523", "> c #7D5413", ", c #724A0A", "' c #976A29", ") c #B3853F", "! c #B28036", "~ c #B07E31", "{ c #AE7B2B", "] c #AB7829", "^ c #A8772A", "/ c #A5752A", "( c #A47732", "_ c #8F6421", ": c #724A0B", "< c #A87C37", "[ c #B4843C", "} c #B48031", "| c #B88333", "1 c #BA8535", "2 c #B98434", "3 c #B58131", "4 c #B07C2C", "5 c #A97526", "6 c #A17022", "7 c #A0722A", "8 c #9B702C", "9 c #724909", "0 c #996D29", "a c #B3843A", "b c #BD8838", "c c #C38D3D", "d c #C5903F", "e c #C48F3E", "f c #C08B3A", "g c #B17D2D", "h c #A77425", "i c #9D6B1C", "j c #9F7129", "k c #906422", "l c #714809", "m c #815817", "n c #B2843D", "o c #B37F31", "p c #BD8837", "q c #C6903F", "r c #CD9746", "s c #D19A49", "t c #CF9948", "u c #C99342", "v c #C18C3B", "w c #B78333", "x c #AD792A", "y c #A26F20", "z c #98671A", "A c #A27630", "B c #72490A", "C c #976C28", "D c #AF7F33", "E c #B68232", "F c #C28C3C", "G c #CC9645", "H c #D69F4D", "I c #DCA553", "J c #D9A250", "K c #C69140", "L c #BB8736", "M c #B07C2D", "N c #A57223", "O c #9A6719", "P c #9C6D23", "Q c #8F6522", "R c #A47832", "S c #AE7C2E", "T c #C48E3D", "U c #CF9947", "V c #DAA351", "W c #E6AE5B", "X c #DFA856", "Y c #D49E4C", "Z c #B17D2E", "` c #A67324", " . c #9B681A", ".. c #99681C", "+. c #9A6F2B", "@. c #C37D11", "#. c #C37E12", "$. c #C17E13", "%. c #C47F13", "&. c #C17E11", "*. c #C38013", "=. c #AB7F3A", "-. c #AB792A", ";. c #B78232", ">. c #C28D3C", ",. c #D7A04E", "'. c #DDA654", "). c #DBA451", "!. c #D19B49", "~. c #C79140", "{. c #BC8737", "]. c #9A6819", "^. c #966517", "/. c #A6772E", "(. c #B07210", "_. c #C9881E", ":. c #D89D40", "<. c #E1A951", "[. c #E7B25E", "}. c #E7B15D", "|. c #E2A84E", "1. c #D99C39", "2. c #CD8C24", "3. c #A97D38", "4. c #A87627", "5. c #B37F2F", "6. c #CE9847", "7. c #D29C4A", "8. c #D09A49", "9. c #CA9443", "0. c #A26F21", "a. c #976517", "b. c #A36D15", "c. c #C17F15", "d. c #D49A3A", "e. c #E7B465", "f. c #E7B15C", "g. c #E6AE57", "h. c #E5AB4F", "i. c #E4A84A", "j. c #E4A849", "k. c #E3A747", "l. c #E4AB4F", "m. c #DB9D3A", "n. c #C48115", "o. c #C37E11", "p. c #9E732E", "q. c #A67427", "r. c #AD7A2A", "s. c #BE8939", "t. c #A87526", "u. c #9E6B1D", "v. c #9A6616", "w. c #C07E14", "x. c #E0A951", "y. c #E8B564", "z. c #E7B05A", "A. c #E8B361", "B. c #E7B05B", "C. c #E5AC52", "D. c #E4A746", "E. c #E2A13B", "F. c #E3A541", "G. c #E3A749", "H. c #C58117", "I. c #916724", "J. c #A27328", "K. c #AE7A2B", "L. c #B58030", "M. c #B98534", "N. c #BB8636", "O. c #BA8635", "P. c #AA7627", "Q. c #A16E20", "R. c #986618", "S. c #B87813", "T. c #D59839", "U. c #E8B563", "V. c #E6AF59", "W. c #E8B566", "X. c #EABA70", "Y. c #EBBC75", "Z. c #EABC74", "`. c #E9B96D", " + c #E8B362", ".+ c #E6AD54", "++ c #E3A644", "@+ c #E19E34", "#+ c #E2A23C", "$+ c #DC9F3E", "%+ c #7D5515", "&+ c #A27530", "*+ c #9F6C1F", "=+ c #AA7728", "-+ c #AF7B2C", ";+ c #AC7929", ">+ c #996719", ",+ c #A36B14", "'+ c #C5831C", ")+ c #E7B462", "!+ c #E7AF57", "~+ c #ECC281", "{+ c #EDC588", "]+ c #EDC586", "^+ c #ECC07D", "/+ c #EABA6F", "(+ c #E7B25F", "_+ c #E5AA4E", ":+ c #E2A13C", "<+ c #DF992A", "[+ c #D08F28", "}+ c #C27F12", "|+ c #704809", "1+ c #926523", "2+ c #9E7028", "3+ c #A06D1E", "4+ c #A37021", "5+ c #A47122", "6+ c #986517", "7+ c #966416", "8+ c #AF7314", "9+ c #D59938", "0+ c #E6B05A", "a+ c #E9B86C", "b+ c #ECC17F", "c+ c #EFC98F", "d+ c #F0CE9B", "e+ c #F0CD98", "f+ c #EEC78A", "g+ c #EBBE79", "h+ c #E8B667", "i+ c #E3A441", "j+ c #E09B2E", "k+ c #E19E33", "l+ c #C37F12", "m+ c #474105", "n+ c #6F490B", "o+ c #9D712D", "p+ c #976518", "q+ c #996618", "r+ c #BD7C17", "s+ c #DDA347", "t+ c #EDC383", "u+ c #F0CC97", "v+ c #F2D5AA", "w+ c #F2D3A4", "x+ c #EFC990", "y+ c #E9B76A", "z+ c #E6AE56", "A+ c #E3A543", "B+ c #E09C2F", "C+ c #E09929", "D+ c #E3A84B", "E+ c #C17D11", "F+ c #414803", "G+ c #535A12", "H+ c #6F641F", "I+ c #714B0B", "J+ c #8F6622", "K+ c #9B6C22", "L+ c #98681B", "M+ c #C17D12", "N+ c #E5AD55", "O+ c #E5A94B", "P+ c #ECC180", "Q+ c #EFCA91", "R+ c #F1CF9D", "S+ c #F0CE9A", "T+ c #EEC78C", "U+ c #EBBF7A", "V+ c #E9B667", "W+ c #DF9725", "X+ c #C58319", "Y+ c #414804", "Z+ c #61691A", "`+ c #828B38", " @ c #646D15", ".@ c #585708", "+@ c #6B4A09", "@@ c #7C5515", "#@ c #916725", "$@ c #9C702C", "%@ c #A27732", "&@ c #916624", "*@ c #C07D11", "=@ c #E4AB52", "-@ c #EBBD76", ";@ c #EEC689", ">@ c #EABA71", ",@ c #E7B360", "'@ c #E5AA4F", ")@ c #E2A23D", "!@ c #414704", "~@ c #6B7422", "{@ c #828A36", "]@ c #6B7612", "^@ c #636E09", "/@ c #5A6308", "(@ c #525907", "_@ c #685D11", ":@ c #6D530E", "<@ c #6F4A0B", "[@ c #704A0A", "}@ c #70490A", "|@ c #6E490A", "1@ c #6C510E", "2@ c #685F13", "3@ c #B17B13", "4@ c #DCA041", "5@ c #E4A94B", "6@ c #E9B668", "7@ c #EABB72", "8@ c #EBBD77", "9@ c #E8B464", "0@ c #E3A646", "a@ c #E19E35", "b@ c #5F661A", "c@ c #7F8834", "d@ c #68730D", "e@ c #677209", "f@ c #687409", "g@ c #636D08", "h@ c #5C6508", "i@ c #626D10", "j@ c #717E1D", "k@ c #5B6411", "l@ c #4A4F07", "m@ c #494D07", "n@ c #464E06", "o@ c #606A14", "p@ c #73811E", "q@ c #96740F", "r@ c #D49630", "s@ c #E3A645", "t@ c #E2A33F", "u@ c #E4A94C", "v@ c #E6AF58", "w@ c #E8B463", "x@ c #E7B15E", "y@ c #E4A748", "z@ c #E2A13A", "A@ c #DF992B", "B@ c #E19D32", "C@ c #C27E12", "D@ c #454C07", "E@ c #808737", "F@ c #6B7413", "G@ c #657008", "H@ c #697409", "I@ c #6A7609", "J@ c #667209", "K@ c #606A08", "L@ c #77851A", "M@ c #5C660A", "N@ c #555E07", "O@ c #535C07", "P@ c #5F6B0E", "Q@ c #717F17", "R@ c #7E700B", "S@ c #C3841B", "T@ c #E5AA4C", "U@ c #E19E36", "V@ c #E5AA4D", "W@ c #E5AB51", "X@ c #E5AB50", "Y@ c #E3A544", "Z@ c #E2A039", "`@ c #E09A2D", " # c #DF9726", ".# c #E4A848", "+# c #CF8E27", "@# c #BD7B11", "## c #424803", "$# c #6B7224", "%# c #767F28", "&# c #636E08", "*# c #687309", "=# c #6A7509", "-# c #6B7709", ";# c #6C7709", "># c #6D770A", ",# c #656F08", "'# c #606B08", ")# c #5E6908", "!# c #616B08", "~# c #667109", "{# c #68740A", "]# c #AA790F", "^# c #D29430", "/# c #E4A645", "(# c #E09A2C", "_# c #DF9929", ":# c #E2A23B", "<# c #C07C11", "[# c #474D07", "}# c #80883A", "|# c #636D0C", "1# c #646F08", "2# c #667108", "3# c #6B7609", "4# c #65700C", "5# c #455750", "6# c #BA7C18", "7# c #DFA241", "8# c #DF9827", "9# c #BD7F1B", "0# c #615137", "a# c #535A14", "b# c #798232", "c# c #616C08", "d# c #626D08", "e# c #697509", "f# c #626F10", "g# c #30546D", "h# c #3B6196", "i# c #757673", "j# c #BD7F19", "k# c #D49534", "l# c #E2A038", "m# c #E09B2D", "n# c #E19F35", "o# c #DB9D3C", "p# c #BF801A", "q# c #877249", "r# c #1E4277", "s# c #424704", "t# c #5F661D", "u# c #727B28", "v# c #5F6908", "w# c #5F6A08", "x# c #566007", "y# c #5C6B19", "z# c #294F79", "A# c #426A9F", "B# c #5A85BA", "C# c #37659F", "D# c #657C91", "E# c #AB7B2C", "F# c #C48723", "G# c #D99B38", "H# c #E0A445", "I# c #E5AB4E", "J# c #E2A647", "K# c #CA8B28", "L# c #B67B1C", "M# c #6C7371", "N# c #486995", "O# c #4E74A5", "P# c #24508B", "Q# c #214B87", "R# c #676E24", "S# c #6D7622", "T# c #5D6708", "U# c #545D07", "V# c #5A6408", "W# c #626C08", "X# c #606C10", "Y# c #254E7E", "Z# c #4B72A7", "`# c #5581B9", " $ c #396CAE", ".$ c #3468A9", "+$ c #527CAC", "@$ c #5A7BA0", "#$ c #7A7460", "$$ c #B0833B", "%$ c #BE801E", "&$ c #C17F18", "*$ c #BE7E19", "=$ c #B58332", "-$ c #806F4B", ";$ c #556F8B", ">$ c #587BA1", ",$ c #325D95", "'$ c #4976AD", ")$ c #577DAF", "!$ c #29548D", "~$ c #204C89", "{$ c #3E4503", "]$ c #5C631B", "^$ c #727B2B", "/$ c #596408", "($ c #4E5707", "_$ c #5C6608", ":$ c #3C5952", "<$ c #3C6598", "[$ c #5781B8", "}$ c #376BAC", "|$ c #366BAE", "1$ c #376DB1", "2$ c #4777B2", "3$ c #6289B2", "4$ c #456D9A", "5$ c #788BA2", "6$ c #ACACAC", "7$ c #A6A29C", "8$ c #A59F95", "9$ c #A5A5A5", "0$ c #87919E", "a$ c #2F5381", "b$ c #597DA3", "c$ c #537BA8", "d$ c #3265A3", "e$ c #3364A2", "f$ c #4572A9", "g$ c #557DAD", "h$ c #224D88", "i$ c #4C530F", "j$ c #798136", "k$ c #515A07", "l$ c #505907", "m$ c #5D6808", "n$ c #5E6808", "o$ c #55651D", "p$ c #275086", "q$ c #5A83B7", "r$ c #3D6FAD", "s$ c #366AAC", "t$ c #366CAF", "u$ c #3870B4", "v$ c #5E8CC1", "w$ c #3B6BA7", "x$ c #3E69A0", "y$ c #C6C6C7", "z$ c #C2C2C2", "A$ c #C0C0C0", "B$ c #647FA1", "C$ c #2D588F", "D$ c #5883B4", "E$ c #3D6EAC", "F$ c #3366A5", "G$ c #3364A3", "H$ c #3263A0", "I$ c #406089", "J$ c #3E6599", "K$ c #204C88", "L$ c #767D32", "M$ c #596118", "N$ c #5B6508", "O$ c #2F526A", "P$ c #4871A4", "Q$ c #4C79B1", "R$ c #3568A9", "S$ c #386EB3", "T$ c #3C73B7", "U$ c #3A70B6", "V$ c #376CB0", "W$ c #BBC7D8", "X$ c #DFDFDF", "Y$ c #DDDDDD", "Z$ c #E2E2E3", "`$ c #4371AA", " % c #36517A", ".% c #6B6477", "+% c #4B4B64", "@% c #274D7D", "#% c #506E94", "$% c #C1C2C3", "%% c #67727F", "&% c #2A548F", "*% c #394103", "=% c #4D540F", "-% c #6A7130", ";% c #5F6812", ">% c #556214", ",% c #254D85", "'% c #5D84B7", ")% c #3667A7", "!% c #3468A8", "~% c #3569AB", "{% c #366BAD", "]% c #376CAF", "^% c #386FB4", "/% c #86A7CF", "(% c #F6F6F6", "_% c #D2DCE9", ":% c #38486D", "<% c #C04943", "[% c #B55552", "}% c #C7706D", "|% c #B24844", "1% c #544F5C", "2% c #DCDCDC", "3% c #CCCCCC", "4% c #485769", "5% c #4971A3", "6% c #204B88", "7% c #404503", "8% c #555A16", "9% c #7B8338", "0% c #6E7725", "a% c #67701A", "b% c #616B12", "c% c #4B5E29", "d% c #315A89", "e% c #557EB2", "f% c #3365A4", "g% c #3467A7", "h% c #366AAD", "i% c #376DB0", "j% c #4779B6", "k% c #ECECED", "l% c #EDEDED", "m% c #8BA2BD", "n% c #A54A49", "o% c #D23932", "p% c #D08E8B", "q% c #DC9895", "r% c #B78786", "s% c #E5DDDD", "t% c #B3B1B1", "u% c #415164", "v% c #34629A", "w% c #567AA7", "x% c #1B3D71", "y% c #3E4504", "z% c #4A510C", "A% c #636B1F", "B% c #70782A", "C% c #788034", "D% c #7D853B", "E% c #7C843A", "F% c #556C5B", "G% c #3E6598", "H% c #4C77AC", "I% c #3365A5", "J% c #30609A", "K% c #3367A6", "L% c #3569AA", "M% c #BFCAD9", "N% c #E5E5E5", "O% c #676E88", "P% c #D8322E", "Q% c #E6534C", "R% c #D28784", "S% c #D29593", "T% c #CBBDBD", "U% c #B2AEAE", "V% c #B26B6A", "W% c #5A2E33", "X% c #264D7D", "Y% c #606B78", "Z% c #313504", "`% c #3C4404", " & c #404604", ".& c #424806", "+& c #434908", "@& c #2F4953", "#& c #416A9F", "$& c #4773A8", "%& c #30619D", "&& c #2E5C95", "*& c #3467A8", "=& c #95ABC6", "-& c #7E4E5E", ";& c #DF2620", ">& c #F5ABA7", ",& c #E25754", "'& c #D8A09D", ")& c #BB8B88", "!& c #956A69", "~& c #DF9998", "{& c #D16865", "]& c #6E5A59", "^& c #E1E1E1", "/& c #8A8D92", "(& c #233E65", "_& c #1B3453", ":& c #365D93", "<& c #4E77AA", "[& c #31619E", "}& c #2C578D", "|& c #305F9B", "1& c #3264A2", "2& c #3365A3", "3& c #3466A6", "4& c #6F8FB6", "5& c #C4C9CF", "6& c #92353C", "7& c #EB5651", "8& c #FAD7D3", "9& c #F76C69", "0& c #DF8D8A", "a& c #DAA3A0", "b& c #CA928F", "c& c #C38887", "d& c #C0A1A1", "e& c #E1E0E0", "f& c #787778", "g& c #31517F", "h& c #1C4074", "i& c #2A528C", "j& c #587DAD", "k& c #2E5B95", "l& c #2B5489", "m& c #31609D", "n& c #31629F", "o& c #3263A1", "p& c #4D76A8", "q& c #A0AEBF", "r& c #912C2E", "s& c #F17971", "t& c #F7756F", "u& c #F85D58", "v& c #F54744", "w& c #DC9E9B", "x& c #D89F9C", "y& c #B38583", "z& c #DBDBDB", "A& c #A99494", "B& c #591211", "C& c #264C80", "D& c #204A86", "E& c #5278A7", "F& c #386092", "G& c #305F9A", "H& c #30609C", "I& c #31609C", "J& c #31619D", "K& c #31629E", "L& c #33639F", "M& c #7C94B3", "N& c #8F3234", "O& c #F2756A", "P& c #F11A15", "Q& c #F51612", "R& c #F54D45", "S& c #EA3D39", "T& c #D49592", "U& c #D49895", "V& c #B08381", "W& c #AA7473", "X& c #AC3D39", "Y& c #16294C", "Z& c #1B3D70", "`& c #2F578F", " * c #4C6D95", ".* c #325E93", "+* c #2F5D97", "@* c #2F5E98", "#* c #305E99", "$* c #436CA0", "%* c #753B44", "&* c #E63B33", "** c #EB1510", "=* c #EE1410", "-* c #EA120E", ";* c #E21E16", ">* c #D93530", ",* c #CD8380", "'* c #CB8B88", ")* c #C58381", "!* c #BD6E6B", "~* c #261423", "{* c #1F4782", "]* c #385C8C", "^* c #577BA8", "/* c #426B9E", "(* c #3A669B", "_* c #346098", ":* c #2F5D96", "<* c #433B53", "[* c #DA3530", "}* c #E0140C", "|* c #DF120C", "1* c #D90F0A", "2* c #D20D08", "3* c #C50B06", "4* c #BF1E19", "5* c #C05652", "6* c #C3706D", "7* c #B54844", "8* c #1D0506", "9* c #1F467E", "0* c #2C558C", "a* c #43699A", "b* c #4D73A2", "c* c #557AA7", "d* c #597CA9", "e* c #587CA9", "f* c #577BA9", "g* c #465870", "h* c #AC3C38", "i* c #C60E07", "j* c #C30C06", "k* c #BC0A05", "l* c #B50904", "m* c #AB0803", "n* c #A00B06", "o* c #9C0D09", "p* c #920D0A", "q* c #620C08", "r* c #1D447B", "s* c #204A87", "t* c #234B86", "u* c #244E88", "v* c #244E87", "w* c #244D87", "x* c #203F6A", "y* c #5A5B5D", "z* c #1E232F", "A* c #682527", "B* c #9D120D", "C* c #A10703", "D* c #9E0703", "E* c #960603", "F* c #8E0804", "G* c #850E0B", "H* c #460806", "I* c #221D1D", "J* c #494C50", "K* c #2D2F31", "L* c #444950", "M* c #52555B", "N* c #434245", "O* c #4B3636", "P* c #522C2B", "Q* c #4F2927", "R* c #472E2C", "S* c #353333", "T* c #5C5C5C", "U* c #404040", "V* c #424242", "W* c #5E5E5E", "X* c #646464", "Y* c #676767", " ", " ", " ", " . + @ + . . ", " # $ % & * = - ; > . ", " , ' ) ! ~ { ] ^ / ( _ . ", " : < [ } | 1 2 3 4 5 6 7 8 . ", " 9 0 a 3 b c d e f 2 g h i j k l ", " m n o p q r s t u v w x y z A > ", " B C D E F G H I J s K L M N O P Q B ", " . R S | T U V W X Y u b Z ` ...+.B @.#.$.%.&.*. ", " . =.-.;.>.r ,.'.).!.~.{.g N ].^./.(._.:.<.[.}.|.1.2.#. ", " . 3.4.5.b ~.6.7.8.9.F | x 0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o. ", " . p.q.r.E s.e ~.q v 1 Z t.u.v.w.x.y.z.}.A.A.B.C.D.E.F.G.H. ", " B I.J.` K.L.M.N.O.;.g P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++@+#+$+o. ", " %+&+*+N =+K.4 -+;+h Q.>+,+'+)+!+y.Z.~+{+]+^+/+(+_+:+<+j.[+}+ ", " |+1+2+ .3+4+5+5+Q.i 6+7+8+9+z.0+a+b+c+d+e+f+g+h+.+i+j+k+$+l+ ", " m+n+o+2+p+6+q+R.7+7+7+p+r+s+.+f.X.t+u+v+w+x+^+y+z+A+B+C+D+E+ ", " F+G+H+I+J+&+K+L+^.^.L+K+&+M+N+O+z.`.P+Q+R+S+T+U+V+.+i+j+W+O+X+ ", " Y+Z+`+ @.@+@@@#@$@%@%@$@&@%+*@=@D..+W.-@t+f+;@b+>@,@'@)@<+W+O+X+ ", " !@~@{@]@^@/@(@_@:@<@[@}@|@1@2@3@4@D.5@z.6@7@8@-@/+9@z+0@a@W+C+D+E+ ", " Y+b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@,@9@w@x@.+y@z@A@W+B@$+C@ ", " D@E@F@G@e@H@I@J@K@L@M@N@O@O@P@Q@R@S@T@U@)@D.V@W@X@u@Y@Z@`@W+ #.#+#@# ", " ##$#%#&#G@e@*#=#-#;#>#,#'#)#!#~#{#e@]#^#/#(#a@z@)@)@Z@B@_#W+W+:#$+<# ", " [#}#|#g@1#2#e@f@=#3#;#;#;#-#I@H@*#4#5#6#7#A+C+8#<+_# #W+W+ ##+G.9#0# ", " a#b#K@c#K@d#2#e@*#H@H@e#e#H@*#e@f#g#h#i#j#k#O+l#j+8# #m#n#j.o#p#q#r# ", " s#t#u#v#w#x#g@1#G@2#~#e@e@e@e@2#y#z#A#B#C#D#E#F#G#H#I#I#J#m.K#L#M#N#O#P#Q# ", " s#R#S#T#U#V#!#W#g@#1#1#1#1#X#Y#Z#`# $.$+$@$#$$$%$c.&$*$=$-$;$>$,$'$)$!$~$ ", " {$]$^$/$($_$v#K@'#c#W#W#d#d#W#:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$ ", " i$j$k$l$_$T#m$n$v#w#w#w#w#o$p$q$r$s$t$1$u$v$w$x$y$z$A$z$B$C$D$E$F$G$H$I$J$K$ ", " !@L$M$N@N$N$N$_$_$T#T#T#T#O$P$Q$R$s$|$1$S$T$U$V$W$X$Y$Z$`$ %.%+%@%e$#%$%%%&% ", " *%=%-%;%N$N$N$N$N$N$N$N$>%,%'%)%!%~%{%]%1$S$^%^%/%(%(%_%:%<%[%}%|%1%2%3%4%5%6% ", " 7%8%9%0%a%b%M@N$N$N$N$c%d%e%f%g%R$g%h%|$]%i%1$j%k%l%m%n%o%p%q%r%s%t%u%v%w%x% ", " y%z%A%B%C%D%E%E%E%E%F%G%H%G$I%J%K%L%~%s$h%{%h%M%N%O%P%Q%R%S%T%U%V%W%X%Y%A$ ", " Z%`% & &.&+&+&+&+&@&#&$&H$%&&&F$g%*&!%R$R$R$=&2%-&;&>&,&'&)&!&~&{&]&^&/&(& ", " _&:&<&[&}&|&1&2&f%F$F$3&F$4&5&6&7&8&9&0&a&b&c&d&e&f&g&h& ", " i&j&k&l&m&n&H$o&o&1&1&1&p&q&r&s&t&u&v&w&x&y&z&A&B&C& ", " D&E&F&}&G&H&I&J&[&[&K&[&L&M&N&O&P&Q&R&S&T&U&V&W&X&Y& ", " Z&`& *.*+*@*#*G&G&G&|&G&G&$*%*&***=*-*;*>*,*'*)*!*~* ", " {*]*^*/*(*_*:*+*+*+*+*+*:*<*[*}*|*1*2*3*4*5*6*7*8* ", " 9*0*a*b*c*d*^*^*^*^*e*f*g*h*i*j*k*l*m*n*o*p*q* ", " r*D&s*t*u*v*v*v*w*x*y*z*A*B*C*D*E*F*G*H*I* ", " J*K*L*M*N*O*P*Q*R*S*T* ", " U*V* W*X*Y* ", " ", " ", " ", " "}; unixODBC-2.2.14-p2/odbcinstQ4/DataSourceNameUser48.xpm0100644000076400007640000003571110723566553020626 0ustar nicknick/* XPM */ static const char * xpmDataSourceNameUser48[] = { "48 48 652 2", " c None", ". c #C37E12", "+ c #C37F13", "@ c #C27E12", "# c #C17D12", "$ c #CC8B25", "% c #D99D3D", "& c #DDA346", "* c #E1A84D", "= c #DEA446", "- c #DB9D3B", "; c #D49431", "> c #C58117", ", c #C17E12", "' c #D29534", ") c #E6B15C", "! c #E7B25F", "~ c #E5AD53", "{ c #E5AB4E", "] c #E4A848", "^ c #E4A746", "/ c #E4A747", "( c #E5A849", "_ c #E5AB50", ": c #DDA03F", "< c #C8851C", "[ c #C58219", "} c #E3AC56", "| c #E8B360", "1 c #E6AC51", "2 c #E5AB4F", "3 c #E5AA4E", "4 c #E5A84A", "5 c #E4A644", "6 c #E2A23C", "7 c #E19E34", "8 c #E3A23C", "9 c #E5A94C", "0 c #D59530", "a c #C7851D", "b c #E7B360", "c c #E6B05A", "d c #E6AC52", "e c #E7AF58", "f c #E7B15D", "g c #E8B25F", "h c #E7B15C", "i c #E7AF57", "j c #E4A748", "k c #E3A33E", "l c #E19E33", "m c #E09A2C", "n c #C28015", "o c #E4AF59", "p c #E7AE56", "q c #E6AD54", "r c #E7B25E", "s c #E9B565", "t c #E9B86B", "u c #EAB96E", "v c #EAB96D", "w c #E9B86A", "x c #E8B564", "y c #E6AC53", "z c #E19C30", "A c #DF9826", "B c #D49430", "C c #DCA144", "D c #E7B15B", "E c #E8B25E", "F c #E9B769", "G c #EBBB72", "H c #ECBE79", "I c #ECC07C", "J c #EBBE78", "K c #EABB70", "L c #E9B667", "M c #E6AB50", "N c #E2A037", "O c #E0992A", "P c #DF9828", "Q c #C8861C", "R c #C7851C", "S c #E8B361", "T c #E7B05A", "U c #EBBC73", "V c #ECC17D", "W c #EEC586", "X c #EEC78A", "Y c #EDC484", "Z c #EABB71", "` c #E9B564", " . c #E5A94A", ".. c #E3A23D", "+. c #E09C2F", "@. c #DF9725", "#. c #DDA03E", "$. c #D99D3E", "%. c #E7AE55", "&. c #ECBF7A", "*. c #EEC587", "=. c #EFCA92", "-. c #F0CE99", ";. c #F0CD98", ">. c #EFC990", ",. c #EDC485", "'. c #E3A441", "). c #E19D32", "!. c #E5AA4C", "~. c #C68319", "{. c #E4AD56", "]. c #E5A94B", "^. c #E8B462", "/. c #ECC17F", "(. c #EFC88D", "_. c #F1CE9B", ":. c #F2D4A6", "<. c #F2D3A5", "[. c #E3A543", "}. c #DF9726", "|. c #E3A33F", "1. c #D2922E", "2. c #C48016", "3. c #E7B05B", "4. c #E4A645", "5. c #EDC27F", "6. c #EFC88E", "7. c #F1CF9C", "8. c #F3D5A9", "9. c #F2D4A7", "0. c #EEC78B", "a. c #ECC07D", "b. c #EABA6E", "c. c #E19E35", "d. c #DB9D3A", "e. c #C8861D", "f. c #E6AE56", "g. c #EEC689", "h. c #F0CC94", "i. c #F1CF9B", "j. c #EFCB93", "k. c #ECBF79", "l. c #EAB86C", "m. c #DEA141", "n. c #C37F12", "o. c #C98820", "p. c #E3A440", "q. c #E9B768", "r. c #EBBD75", "s. c #EDC280", "t. c #EFC98E", "u. c #EEC688", "v. c #ECC17E", "w. c #E9B666", "x. c #E7B059", "y. c #E09B2E", "z. c #E0A343", "A. c #C58319", "B. c #E5AC52", "C. c #E2A13B", "D. c #E6AD55", "E. c #ECC07B", "F. c #E9B76A", "G. c #E4A646", "H. c #E2A039", "I. c #E09A2B", "J. c #DC9F3D", "K. c #C27E13", "L. c #E19F35", "M. c #E6AE55", "N. c #E2A139", "O. c #D89935", "P. c #E2A13A", "Q. c #E2A038", "R. c #E8B463", "S. c #E6AD53", "T. c #E29F36", "U. c #E09A2A", "V. c #CA8923", "W. c #C17D11", "X. c #D08F29", "Y. c #E5AA4D", "Z. c #E3A84A", "`. c #E2A547", " + c #E19D31", ".+ c #E09B2D", "++ c #E2A23B", "@+ c #D1922C", "#+ c #B87811", "$+ c #B57610", "%+ c #C98822", "&+ c #E09929", "*+ c #E19F36", "=+ c #DF9827", "-+ c #E1A444", ";+ c #A97520", ">+ c #D39431", ",+ c #BE801C", "'+ c #815E26", ")+ c #214B88", "!+ c #31568D", "~+ c #587292", "{+ c #B87C1C", "]+ c #D49530", "^+ c #E2A748", "/+ c #C2841F", "(+ c #897042", "_+ c #1D4074", ":+ c #41699F", "<+ c #5781B4", "[+ c #38659D", "}+ c #506C8C", "|+ c #B07D28", "1+ c #C98A25", "2+ c #E3A84B", "3+ c #D79834", "4+ c #C07D15", "5+ c #8A7956", "6+ c #456892", "7+ c #4A6D9A", "8+ c #29518C", "9+ c #204A87", "0+ c #476FA5", "a+ c #5782B8", "b+ c #376BAD", "c+ c #3364A2", "d+ c #3C689E", "e+ c #5E7D9D", "f+ c #887856", "g+ c #BF7D14", "h+ c #CF902D", "i+ c #DDA040", "j+ c #E4A94A", "k+ c #E4A94C", "l+ c #D99B37", "m+ c #C38521", "n+ c #B67C1D", "o+ c #6C7372", "p+ c #577AA0", "q+ c #2D578C", "r+ c #456EA1", "s+ c #5980B1", "t+ c #2A548E", "u+ c #486FA4", "v+ c #5380B7", "w+ c #376BAC", "x+ c #366BAE", "y+ c #366AAC", "z+ c #3565A2", "A+ c #5E84AD", "B+ c #597BA1", "C+ c #55718F", "D+ c #84734F", "E+ c #BD8122", "F+ c #C17F16", "G+ c #C48421", "H+ c #C88A28", "I+ c #C58724", "J+ c #C2811B", "K+ c #C17E14", "L+ c #AD7E31", "M+ c #766F5A", "N+ c #507091", "O+ c #57799D", "P+ c #5278A3", "Q+ c #2E5B93", "R+ c #3363A1", "S+ c #426FA8", "T+ c #587EAF", "U+ c #28528D", "V+ c #3C649B", "W+ c #5681B7", "X+ c #366AAB", "Y+ c #366BAD", "Z+ c #376CAF", "`+ c #376DB0", " @ c #5480B1", ".@ c #5F85AD", "+@ c #597CA2", "@@ c #375D8B", "#@ c #A0A4AA", "$@ c #A8A39B", "%@ c #A79983", "&@ c #A8926F", "*@ c #A69478", "=@ c #A49A88", "-@ c #A5A39F", ";@ c #5B718C", ">@ c #3C5F88", ",@ c #587A9F", "'@ c #5E83AA", ")@ c #456FA2", "!@ c #3365A3", "~@ c #3263A1", "{@ c #436FA7", "]@ c #567DAE", "^@ c #234C89", "/@ c #2B538D", "(@ c #5B83B6", "_@ c #396CAC", ":@ c #386DB1", "<@ c #386EB3", "[@ c #4174B3", "}@ c #678FBB", "|@ c #527CA9", "1@ c #2F5C96", "2@ c #6C85A4", "3@ c #BBBBBB", "4@ c #B5B5B5", "5@ c #B2B2B2", "6@ c #B4B4B4", "7@ c #B6B7B8", "8@ c #305787", "9@ c #2C5589", "0@ c #5B81AB", "a@ c #638BB7", "b@ c #3769A7", "c@ c #3466A5", "d@ c #3364A1", "e@ c #32629F", "f@ c #4A74AA", "g@ c #4A70A5", "h@ c #5279AC", "i@ c #4372AE", "j@ c #3569AA", "k@ c #386FB3", "l@ c #3970B5", "m@ c #5385BE", "n@ c #4C7BB4", "o@ c #3F6AA3", "p@ c #CECECF", "q@ c #CBCBCB", "r@ c #C8C8C8", "s@ c #CACACA", "t@ c #A2AEBD", "u@ c #2E5A91", "v@ c #2F5D97", "w@ c #5681B3", "x@ c #4576B2", "y@ c #3467A7", "z@ c #32629E", "A@ c #557CAD", "B@ c #375F97", "C@ c #325891", "D@ c #5680B5", "E@ c #3567A8", "F@ c #3569A9", "G@ c #376DB1", "H@ c #386EB2", "I@ c #386FB4", "J@ c #3970B6", "K@ c #4178BB", "L@ c #366AAA", "M@ c #B5C1D2", "N@ c #DDDDDD", "O@ c #DBDBDB", "P@ c #DCDCDC", "Q@ c #7F9ABB", "R@ c #3364A3", "S@ c #3D70AF", "T@ c #3568A8", "U@ c #31619D", "V@ c #3A67A0", "W@ c #557BAB", "X@ c #214C87", "Y@ c #4E74A8", "Z@ c #4170AB", "`@ c #3568A9", " # c #366AAD", ".# c #85A5CE", "+# c #F1F1F1", "@# c #EFEFEF", "## c #F0F0F0", "$# c #F2F2F2", "%# c #5783BB", "&# c #3466A6", "*# c #3365A4", "=# c #31609B", "-# c #4F77A8", ";# c #3A6196", "># c #254E8A", ",# c #5A81B2", "'# c #3465A4", ")# c #3669AB", "!# c #386EB1", "~# c #497AB8", "{# c #ECEDED", "]# c #EEEEEE", "^# c #DAE0E7", "/# c #305E98", "(# c #31629E", "_# c #31619C", ":# c #305F9A", "<# c #3C679F", "[# c #4E74A5", "}# c #335A92", "|# c #517AAF", "1# c #3467A6", "2# c #3365A5", "3# c #376BAE", "4# c #376CB0", "5# c #BCC9D9", "6# c #E7E7E7", "7# c #A3B7D0", "8# c #3263A0", "9# c #305E99", "0# c #315F99", "a# c #597EAB", "b# c #224C87", "c# c #3B6298", "d# c #4974AB", "e# c #32639F", "f# c #2D5A92", "g# c #83A0C4", "h# c #E1E1E1", "i# c #7294BE", "j# c #31619E", "k# c #2C558B", "l# c #415E84", "m# c #2D548B", "n# c #41679B", "o# c #4570A7", "p# c #2D5991", "q# c #305E97", "r# c #3467A8", "s# c #3569AB", "t# c #5A82B5", "u# c #4F7AB0", "v# c #334C73", "w# c #686071", "x# c #474459", "y# c #203F68", "z# c #4E6A8E", "A# c #C2C2C3", "B# c #5F6A78", "C# c #1D447C", "D# c #3F659A", "E# c #4571A7", "F# c #2C568B", "G# c #396AA8", "H# c #D0D1D3", "I# c #CCCFD2", "J# c #3567A6", "K# c #364264", "L# c #C04943", "M# c #B55552", "N# c #C7706D", "O# c #B24844", "P# c #534C57", "Q# c #CCCCCC", "R# c #475465", "S# c #1D447B", "T# c #385E94", "U# c #4973A7", "V# c #2B5489", "W# c #2C588E", "X# c #31629F", "Y# c #3466A4", "Z# c #ADB8C5", "`# c #A9B5C4", " $ c #2C5990", ".$ c #A54948", "+$ c #D23932", "@$ c #D08E8B", "#$ c #DC9895", "$$ c #B78786", "%$ c #E5DDDD", "&$ c #B3B1B1", "*$ c #495565", "=$ c #385F93", "-$ c #2A528C", ";$ c #557BAA", ">$ c #2F5D96", ",$ c #295284", "'$ c #2C578D", ")$ c #889EB8", "!$ c #879DB8", "~$ c #31609C", "{$ c #495576", "]$ c #D8322E", "^$ c #E6534C", "/$ c #D28784", "($ c #D29593", "_$ c #CBBDBD", ":$ c #B2AEAE", "<$ c #B26B6A", "[$ c #5E3034", "}$ c #284875", "|$ c #5A5E64", "1$ c #C0C0C0", "2$ c #204883", "3$ c #5377A7", "4$ c #39659C", "5$ c #2C578B", "6$ c #2A5387", "7$ c #2E5A92", "8$ c #6887AE", "9$ c #6A88AE", "0$ c #30609B", "a$ c #784858", "b$ c #DF2620", "c$ c #F5ABA7", "d$ c #E25754", "e$ c #D8A09D", "f$ c #BB8B88", "g$ c #956A69", "h$ c #DF9998", "i$ c #D16865", "j$ c #6E5959", "k$ c #909090", "l$ c #335A90", "m$ c #5378A8", "n$ c #2B5487", "o$ c #4C74A4", "p$ c #5076A5", "q$ c #305F99", "r$ c #2F5E97", "s$ c #91343A", "t$ c #EB5651", "u$ c #FAD7D3", "v$ c #F76C69", "w$ c #DF8D8A", "x$ c #DAA3A0", "y$ c #CA928F", "z$ c #C38887", "A$ c #C0A1A1", "B$ c #E1E0E0", "C$ c #787777", "D$ c #1F467F", "E$ c #496D9E", "F$ c #3B6190", "G$ c #2B5488", "H$ c #2F5E98", "I$ c #34629B", "J$ c #38649B", "K$ c #2F5C95", "L$ c #902C2D", "M$ c #F17971", "N$ c #F7756F", "O$ c #F85D58", "P$ c #F54744", "Q$ c #DC9E9B", "R$ c #D89F9C", "S$ c #B38583", "T$ c #A99494", "U$ c #590D0A", "V$ c #27508A", "W$ c #5578A5", "X$ c #426897", "Y$ c #2E5B94", "Z$ c #2E5C95", "`$ c #2E5C94", " % c #8E3234", ".% c #F2756A", "+% c #F11A15", "@% c #F51612", "#% c #F54D45", "$% c #EA3D39", "%% c #D49592", "&% c #D49895", "*% c #B08381", "=% c #AA7473", "-% c #AC3D39", ";% c #244D88", ">% c #476C9C", ",% c #5378A5", "'% c #456C9E", ")% c #386398", "!% c #345F96", "~% c #315D96", "{% c #2F5C94", "]% c #2F5D95", "^% c #2F5D94", "/% c #2F5B93", "(% c #305B93", "_% c #2F5B92", ":% c #2F5A91", "<% c #743A43", "[% c #E63B33", "}% c #EB1510", "|% c #EE1410", "1% c #EA120E", "2% c #E21E16", "3% c #D93530", "4% c #CD8380", "5% c #CB8B88", "6% c #C58381", "7% c #BD6E6B", "8% c #290100", "9% c #1E457D", "0% c #2A528B", "a% c #3D6296", "b% c #4D71A1", "c% c #5276A5", "d% c #567AA6", "e% c #597DA8", "f% c #597DA9", "g% c #5A7DA9", "h% c #5A7CA9", "i% c #597CA9", "j% c #587CA8", "k% c #587BA8", "l% c #587BA7", "m% c #55485A", "n% c #DA3530", "o% c #E0140C", "p% c #DF120C", "q% c #D90F0A", "r% c #D20D08", "s% c #C50B06", "t% c #BF1E19", "u% c #C05652", "v% c #C3706D", "w% c #B54844", "x% c #200200", "y% c #193A6A", "z% c #1F4780", "A% c #204984", "B% c #204985", "C% c #204A86", "D% c #2A3F5E", "E% c #AC3C38", "F% c #C60E07", "G% c #C30C06", "H% c #BC0A05", "I% c #B50904", "J% c #AB0803", "K% c #A00B06", "L% c #9C0D09", "M% c #920D0A", "N% c #620C08", "O% c #5B5B5B", "P% c #1B1717", "Q% c #6C211E", "R% c #9D120D", "S% c #A10703", "T% c #9E0703", "U% c #960603", "V% c #8E0804", "W% c #850E0B", "X% c #470806", "Y% c #272121", "Z% c #525252", "`% c #303030", " & c #565656", ".& c #646464", "+& c #484646", "@& c #4E3736", "#& c #542D2B", "$& c #522B29", "%& c #4A302E", "&& c #383636", " ", " . + @ @ + @ ", " @ # $ % & * = - ; > . ", " , ' ) ! ~ { ] ^ / ( _ : < @ ", " + [ } | 1 2 1 1 3 4 5 6 7 8 9 0 # ", " a b c d e f g g h i _ j k l m / - @ ", " n o p q r s t u v w x h y j 8 z A ] B @ ", " @ C D y E F G H I I J K L h M 5 N O P 9 Q ", " R S 2 T L U V W X X Y I Z ` e ...+.@.N #.@ ", " @ $.%.1 g v &.*.=.-.;.>.,.J w f 2 '.).@.@.!.~. ", " @ {.].q ^.K /.(._.:.<.;.X I u | 1 [.7 }.@.|.1.@ ", " 2.3.4.q ^.Z 5.6.7.8.9.-.0.a.b.| 1 [.7 }.@.c.d.+ ", " e.f.5 d | u I g.h.7.i.j.*.k.l.E _ '.l @.@.z m.n. ", " o.1 p.3 D q.r.s.g.t.6.u.v.U w.x.9 k z @.@.y.z.@ ", " A.B.C.] D.S l.r.I s.5.E.U F.g d G.H.I.@.@.).J.n. ", " K._ L.'.9 i S F b.Z Z u L g M. .k ).@.@.@.N.O.n. ", " @ #.P.Q.[.!.M.h S R.R.| 3.S.].'.T.U.@.@.@.^ V. ", " W.X.4.y.Q.'.] 3 d D.q d Y./ |.T.m @.@.@.m Z.W. ", " # `. +.+c.++'.5 ^ ^ 5 p.P.l I.@.@.@.@.5 @+#+ ", " $+%+].&+P y.l T.Q.N *+)..+=+@.@.@.@.Q.-+W. ", " ;+>+] P @.@.P &+&+=+@.@.@.@.@.@.7 Z.,+'+ ", " )+!+~+{+]+Y.c.@.@.@.@.@.@.@.@.@.}.C.^+/+(+_+ ", " )+:+<+[+}+|+1+2+5 l }.@.@.@.@.I.P.Y.3+4+5+6+7+8+9+ ", " )+0+a+b+c+d+e+f+g+h+i+3 j+4./ Y.k+l+m+n+o+p+q+r+s+t+)+ ", " )+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+ ", " )+V+W+X+Y+Z+`+X+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@c+!@~@{@]@^@ ", " /@(@_@y+Y+Z+:@<@[@}@|@1@2@3@4@5@5@6@7@8@9@0@a@b@c@!@d@e@f@g@)+ ", " )+h@i@j@y+x+Z+:@k@l@m@n@!@o@p@q@r@r@s@t@u@v@w@x@y@c@!@d@e@z@A@B@9+ ", " C@D@E@F@X+Y+Z+G@H@I@J@K@k@L@M@N@O@O@P@Q@R@E@S@T@y@c@!@~@e@U@V@W@X@ ", " )+Y@Z@y@`@j@y+ #Z+:@H@I@l@l@l@.#+#@###$#%#Y+X+j@T@&#*#c+~@e@U@=#-#;#9+ ", " >#,#'#&#E@`@)#R@x+Z+`+!#H@<@<@~#{#]#]#^#Y+y+j@T@y@c@!@c+/#(#_#:#<#[#)+ ", " }#|#!@c@1#T@:#2#y+Y+3#Z+4#`+`+4#5#6#6#7#X+j@T@y@c@*#c+8#9#U@=#:#0#a#b# ", " c#d#c+!@c@e#f#T@j@)#y+y+Y+Y+Y+Y+g#h#h#i#`@T@y@c@*#c+~@e@j#k#:#9#v@l#m# ", " n#o#8#d@!@p#q#1#r#T@`@j@j@j@s#j@t#O@O@u#y@&#c@!@c+~@e@v#w#x#y#v@z#A#B#C# ", " D#E#z@8#1@F#_#*#c@&#y@y@r#T@T@T@G#H#I#J#c@*#R@d@8#e@K#L#M#N#O#P#P@Q#R#S# ", " T#U#_#j#V#W#X#c+R@!@*#Y#c@c@c@c@c@Z#`#!@c+d@8#e@(# $.$+$@$#$$$%$&$*$=$ ", " -$;$:#>$,$'$e@e@8#~@d@c+c+c+c+c+c+)$!$8#8#e@(#U@~${$]$^$/$($_$:$<$[$}$|$1$ ", " 2$3$4$5$6$7$~$U@j#z@e@e@e@8#8#e@e@8$9$(#U@_#~$0$:#a$b$c$d$e$f$g$h$i$j$h#k$ ", " l$m$,$n$9#:#:#=#~$~$_#U@U@U@U@U@o$p$=#0$:#q$/#r$s$t$u$v$w$x$y$z$A$B$C$ ", " D$E$F$G$>$v@H$/#9#q$:#:#:#:#:#:#I$J$9#/#r$v@>$K$L$M$N$O$P$Q$R$S$O@T$U$ ", " V$W$X$Y$Z$K$>$>$v@v@v@v@r$v@v@v@>$>$1@K$`$Q+Q+ %.%+%@%#%$%%%&%*%=%-% ", " ;%>%,%'%)%!%~%Y$`${%]%]%]%^%]%K${%{%/%(%_%:%<%[%}%|%1%2%3%4%5%6%7%8% ", " 9%0%a%b%c%d%e%f%g%h%h%i%i%j%j%k%l%l%l%l%l%m%n%o%p%q%r%s%t%u%v%w%x% ", " y%z%A%B%9+C%C%C%C%C%C%C%C%C%C%C%C%9+C%D%E%F%G%H%I%J%K%L%M%N% ", " O%P%Q%R%S%T%U%V%W%X%Y% ", " Z%`% &.&+&@&#&$&%&&& ", " ", " "}; unixODBC-2.2.14-p2/odbcinstQ4/Driver128.xpm0100644000076400007640000011220210723566553016435 0ustar nicknick/* XPM */ static const char *xpmDriver128[] = { /* columns rows colors chars-per-pixel */ "128 128 257 2", " c none", ". c #01081700", "X c #00072600", "o c #010B2600", "O c #000C3700", "+ c #04132B00", "@ c #05183A00", "# c #000D4700", "$ c #01144800", "% c #01165300", "& c #00146300", "* c #001B7B00", "= c #00177600", "- c #0A234900", "; c #09245400", ": c #08296700", "> c #03257900", ", c #0E336B00", "< c #0D337700", "1 c #13396900", "2 c #11397700", "3 c #184A7B00", "4 c #001E8C00", "5 c #001C8500", "6 c #001D9400", "7 c #001EA500", "8 c #02258600", "9 c #00239600", "0 c #00239B00", "q c #032B9400", "w c #0D378600", "e c #0C3B9800", "r c #193B8E00", "t c #123D8400", "y c #1A3F9200", "u c #163E9200", "i c #0023A400", "p c #0025AB00", "a c #012AA800", "s c #0027B200", "d c #0028B500", "f c #002BBC00", "g c #0027B800", "h c #0737A800", "j c #0134BC00", "k c #013BBD00", "l c #0739B800", "z c #0234C200", "x c #053BC400", "c c #013CC900", "v c #083EC500", "b c #0F409D00", "n c #14438D00", "m c #1B429500", "M c #1D469A00", "N c #1F4B9F00", "B c #14469800", "V c #1E549700", "C c #1E518B00", "Z c #0E44AA00", "A c #0043BD00", "S c #004CBD00", "D c #0D43B600", "F c #0056BE00", "G c #0258BF00", "H c #0D58BE00", "J c #144AA700", "K c #144CB900", "L c #1952A900", "P c #1656BB00", "I c #1E63BC00", "U c #204EA200", "Y c #2250A600", "T c #2255AA00", "R c #2559AF00", "E c #265BB100", "W c #285FB600", "Q c #245EB900", "! c #2964BC00", "~ c #2664BB00", "^ c #286AB100", "/ c #0A44CB00", "( c #0B4BCC00", ") c #0446C300", "_ c #004AD300", "` c #064BD200", "' c #0255C300", "] c #0655C800", "[ c #035BC200", "{ c #095EC300", "} c #0758CB00", "| c #0054DC00", " . c #0B57D500", ".. c #124EC800", "X. c #104FD300", "o. c #1A5AC400", "O. c #1756C800", "+. c #1354D600", "@. c #145AD500", "#. c #175BD900", "$. c #005EE300", "%. c #0364CE00", "&. c #0C62C400", "*. c #0D69CC00", "=. c #026BDC00", "-. c #0466D500", ";. c #0C75DE00", ":. c #1166C500", ">. c #1469C600", ",. c #156AC900", "<. c #1A6DC900", "1. c #1962C900", "2. c #1B65D800", "3. c #1E71CA00", "4. c #1576D800", "5. c #036EE100", "6. c #0368E800", "7. c #0175EB00", "8. c #0675E700", "9. c #0073F400", "0. c #017CF500", "q. c #007DFB00", "w. c #0A79F200", "e. c #1D67E200", "r. c #1C74E500", "t. c #205BC000", "y. c #2D6BC400", "u. c #2E6FC900", "i. c #2368C900", "p. c #236BDC00", "a. c #2067DB00", "s. c #2375CB00", "d. c #2C7BCE00", "f. c #2877D600", "g. c #3074CE00", "h. c #317ECE00", "j. c #3177D000", "k. c #337BD500", "l. c #397EDD00", "z. c #226CE400", "x. c #226EE800", "c. c #2B73E300", "v. c #2674E900", "b. c #337BE600", "n. c #0183FE00", "m. c #0788FE00", "M. c #0C8CFE00", "N. c #0B84F800", "B. c #1987ED00", "V. c #118EFD00", "C. c #1788F300", "Z. c #1491FE00", "A. c #1B96FE00", "S. c #1F98FE00", "D. c #0A80EE00", "F. c #2985DC00", "G. c #3280CF00", "H. c #3581D000", "J. c #3682DC00", "K. c #3B85D200", "L. c #3E89D400", "P. c #3B87DB00", "I. c #2B86E800", "U. c #2B87F200", "Y. c #239AFE00", "T. c #2A9EFE00", "R. c #2795F700", "E. c #3885E200", "W. c #3989E400", "Q. c #3A8EEA00", "!. c #3687E900", "~. c #3D92EE00", "^. c #3595EB00", "/. c #3D95F200", "(. c #3598F800", "). c #318FF400", "_. c #2FA0FE00", "`. c #34A3FE00", "'. c #3AA6FE00", "]. c #3EA8FE00", "[. c #438BD400", "{. c #498ED500", "}. c #4287DE00", "|. c #4D91D600", " X c #4D92D800", ".X c #5194D700", "XX c #5496D800", "oX c #5798D900", "OX c #5B9ADA00", "+X c #4589E700", "@X c #4799E500", "#X c #4099F600", "$X c #419CF900", "%X c #489DF700", "&X c #5697E400", "*X c #43A0FD00", "=X c #43ABFE00", "-X c #4AAEFE00", ";X c #4AA6F600", ":X c #4EB0FE00", ">X c #59A5E900", ",X c #55A9F600", " O O 8 d D P ! ! ! ! ! ! ! ! ! ! ! W ! ! ! ! ! ! ! ! ! ! ! ~ s.Z.Z.V.M.V.M.M.M.M.6.f * ", " 5 f A F F [ m.-XnXnXnXcXnXnXcXcXcXnXqXM.s.! ! y.Q v > . $ q x ..! ! y.y.! y.! y.! ! y.y.! ! ! ! ! ! ! ! ! ! ! f.Z.Z.Z.Z.M.V.V.V.M._ g % ", " f f s g g g s s s f f f f k %.=.n.aXcXcXcXnXcXnXcXcXcXnX:XM.u.y.y.O.h O o 8 v o.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.B.Z.Z.V.V.V.Z.V.V.N.c p ", " s j _ | | | | | | 6.6.6.6.6.n.n.A.cXcXcXcXcXcXcXcXcXcXcX-XM.y.y...q o q / t.y.y.y.y.y.u.y.y.u.y.y.u.y.y.y.y.y.y.y.y.y.C.Z.Z.Z.Z.Z.V.V.V.w.z 0 ", " f A =.n.A.A.A.T.'.'.].].qXqXqXqXcXcXcXcXcXcXcXcXcXcXcXcX-XV.g.O.q % l O.u.u.u.u.u.u.u.u.u.u.u.u.u.u.u.u.u.u.u.u.f.A.V.Z.Z.Z.Z.Z.V.V.6.f * ", " & f S =.n.nXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXxXcXcXcXxXcXcX-XV.i.q q ..u.j.g.g.g.j.j.g.g.g.g.g.g.g.g.g.g.g.g.g.I.A.Z.Z.Z.Z.Z.Z.V.Z.` f s s p i ", " 9 f F %.n.wXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXxXcXcXcXxXcXcXxX-XV.h % / i.h.j.j.j.j.h.g.h.j.j.j.j.j.j.j.j.j.g.j.A.A.A.Z.A.Z.Z.V.V.V.w. .` f f f g s p * ", " p f F %.n.2XcXcXxXcXxXcXxXxXcXxXcXcXxXxXxXcXxXxXcXxXxXxXcX-XA.8 . l #.j.j.j.j.k.k.k.j.j.k.j.k.j.k.j.j.j.k.F.A.A.A.A.A.A.Z.A.V.Z.Z.Z.V.N.6.| / f s ", " p j F %.n.:XxXcXxXxXxXcXxXcXxXcXcXcXcXcXxXxXxXcXxXcXxXxXcXqXA.Z e #.k.l.k.k.k.k.k.l.k.k.k.k.k.k.k.k.k.k.R.A.A.A.A.A.A.A.V.A.Z.V.Z.V.V.V.M.6.f % ", " s k F F n.'.cXxXcXxXcXxXcXxXcXxXxXxXxXxXcXxXcXxXcXcXxXxXxXqXA... e #.J.J.J.J.J.l.l.l.l.K.l.J.J.J.J.l.J.I.Y.A.A.A.A.A.A.A.A.A.A.V.Z.Z.Z.V.V.z 9 ", " g A F F n.'.xXxXcXxXxXxXxXcXxXxXcXxXxXcXxXxXcXxXxXxXxXxXxXxXA.r. h 2.P.J.J.J.P.P.J.J.J.J.P.J.J.J.J.J.J.Y.A.A.A.A.A.A.A.A.A.V.V.A.Z.Z.V.Z.6.d X ", " f S F F 7.A.xXxXxXcXxXcXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX_.C.% h 2.E.E.E.E.E.P.E.E.E.W.E.E.E.P.E.E.).Y.Y.Y.A.A.Y.A.A.A.A.A.Z.Z.A.Z.Z.V.f 4 ", " 6 f F F F 7.A.xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX-XA.w Z f.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.Q.Y.Y.Y.Y.Y.S.S.S.A.A.A.A.Z.A.Z.Z.Z. .d X ", " 6 f F F F 5.M.xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXwXY.:. ..c.Q.Q.Q.Q.Q.Q.Q.W.Q.Q.Q.Q.Q.Q.Q.T.Y.Y.Y.Y.Y.Y.S.S.A.A.A.A.A.A.A.Z.V.z 9 ", " p j F F F =.m.xXxXxXfXxXfXxXfXfXxXfXxXxXxXxXxXxXxXxXxXxXxXxXxXxXT.U.o o @.!.~.Q.Q.Q.~.Q.Q.Q.Q.Q.Q.Q.~.Q.(.Y.Y.Y.Y.Y.Y.Y.S.S.S.A.A.A.A.A.Z.Z. .g o ", " p j F F F -.m.wXfXxXfXfXfXfXfXfXfXxXfXfXxXfXxXfXfXxXxXxXfXxXxXxX:XY.B : e.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.T.T.T.Y.Y.Y.Y.Y.S.S.S.A.S.A.A.A.A.C.f 4 ", " i j F F F %.M.M.Y.Y.`.=X=XqX2XaXfXfXfXfXfXfXxXfXxXxXxXfXfXxXxXxXsXT.r. J c././././.#X#X/././.#X/./././._._.Y.Y.Y.T.Y.Y.Y.Y.S.S.S.A.A.A.A.A. .g X ", " 0 j F F ' [ =.8.D.D.M.V.Z.Z.Z.Z.A.A._.`.2XfXxXfXfXfXfXxXfXxXfXxXxX].R.n + @./.#X$X$X#X#X#X#X#X#X#X#X/.#X_._._._._.Y.Y.Y.Y.Y.Y.S.S.S.Y.A.A.A.V.f 4 ", " 9 f F F F F F F F F F F F %.%.-.;.;.B.C.S.sXfXfXfXxXfXxXxXfXfXxXxXwX`.4. < v.$X$X$X#X$X$X$X$X$X$X$X$X$X`._._._._.T.T.T.T.Y.Y.B.*.%.%.%.} F A f & ", " 5 f F F F F F F F F F F F F F F F F F [ A.=XfXfXfXfXfXfXfXxXxXfXxXxX=X`.B O./.*X*X;X$X$X*X*X*X*X*X*X*X`._._._._.T._.T.T.T._.B.' F F F F S f = ", " * f S F F F F F F F F F F F F F F F F F ;.Y.sXfXfXfXfXxXfXfXfXfXxXxXwX`.I.@ - v.%X*X*X*X*X*X*X*X*X*X*X*X(.`.`.`.T.T._.T.T.T.Y.B.F F F F S f 5 ", " f S F F F F F F F F F F F F F F F F F [ Y.=XfXfXfXfXfXfXxXfXfXfXfXxX ", " 8 z z z z z k ) A A ' S F F F F F F F F F F F F ^.-XdXdXfXfXfXfXxXxXfXxXxXxXxXxXsX * q a a z z z j z F F F F F F F F F 4.].wXdXfXfXfXfXxXfXxXxXxXxXxXxXxXdX ", " l v I.X@X I.%X,XwXwXwXaXqXaXaXqXqXqXqX2X2X2X1X1X ", " > / ' F F F F F F.X&.F F F F G *.>XxXxXxXxXcXcXcXcXcXcXnXnXnXnXnXnXnXMXMXMXMXMXMXMXMXMXMXnXMXnXcXMXcXcXcXcXcXcXcXxXxXxXfXfXfXdXdXdXsXaXaXaXaXaXwX^.F F F F F F F F F F F F F F ' ( / ", " ( ' F F F F F F F F F ^.2XqXqXqXqXaXaXaXaXqXF.F F F F F F F F F F.aXcXxXcXcXcXnXnXnXnXnXnXMXMXMXMXMXMXMXMXMXMXMXMXMXMXMXMXMXMXMXnXnXnXcXcXcXcXcXxXxXxXxXfXfXdXdXdXsXsXsXsXsX,XF F F F F F F F F F F F F F F ] / @ ", " h X.' F F F F F F F F F F ,XqXqXwXwXqXaXaX,X*.F F F F F F F F F F F &.P.cXcXnXnXMXMXMXMXMXMXNXNXMXNXNXNXNXNXNXNXNXNXNXMXNXMXMXMXMXMXMXnXnXnXcXcXcXcXxXxXxXxXfXfXfXfXdXsXdXsXqX[ F F F F F F F F F F F F F F ( / @ ", " ..( F F F F F F F F F F F G ;XwXwXwXaXaXF.F F F F F F F F F F F F G G G *.0XnXMXMXMXMXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXMXNXMXMXMXnXnXnXcXcXcXcXcXxXxXfXfXfXdXdXdXsXsX&.F F F F F F F F F F F F F ] X.@ ", " ( ] F F F F F F F F F F F F G ,XaXaX,X*.F F F F F F F F F F F G G G G G &.&.s.fXMXMXNXNXNXNXNXVXNXNXNXVXVXVXVXVXNXVXNXVXNXNXNXNXNXNXMXMXMXMXMXMXnXnXcXcXcXcXxXxXxXfXfXdXdXsXsX^.G G F F F F F F F F F F ] +.: ", " ..X.F F F F F F F F F F F F F [ qXW.[ F F F F F F F F F F G G G G G G G &.&.&.&. XnXNXNXNXNXVXVXVXVXVXCXVXVXVXVXCXVXVXVXVXVXVXNXNXNXNXNXNXNXMXMXMXnXnXcXcXcXcXxXxXxXfXfXdXdXsXsX&.G F F F F F F F F F ] +.: ", " : X. .F F F F F F F F F F F F F F F F F F F F F F F F F G G G G G &.&.&.&.&.:.:.:.<.VXVXVXVXVXCXCXCXVXCXCXCXCXCXCXCXCXCXCXVXVXVXVXNXNXNXNXNXNXMXMXMXnXnXcXcXcXxXxXxXfXfXfXfXdXsX@XG F F F F F F F F ] X.: ", " % X.( F F F F F F F F F F F F F F F F F F F F F F F G G G &.G &.&.&.&.:.:.:.>.>.>.VXVXVXCXCXZXCXCXZXZXZXZXCXZXZXCXZXCXZXCXCXCXVXVXCXNXNXNXNXNXMXMXMXnXnXnXcXcXcXxXfXfXfXfXfXdXeX .' F F F F F F ] +.: ", " : +.( F F F F F F F F F F F F F F F F F F F F F G G G &.&.&.&.&.&.:.:.:.>.<.<.<.CXCXCXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXCXCXCXCXNXVXNXNXNXMXMXMXMXnXnXcXcXcXxXxXxXfXdXsXsXE.+.X.' F F ' } +.: ", " < +.] F F F F F F F F F F F F F F F F } ' ' F G &.G &.&.&.&.:.:.:.>.<.<.<.<.3.CXZXZXZXZXZXZXZXSXZXZXZXSXSXZXSXZXZXZXZXZXZXCXZXCXCXCXNXCXNXNXNXMXMXMXMXnXnXcXcXcXxXxXxXfXdXdXeX+.O.+.X.' } +.e ", " w +.' F F F F F F F F F F F F F [ +.X.@. .[ &.&.&.&.&.:.:.>.>.<.<.<.<.<.3.s.ZXZXZXZXZXSXSXZXSXFXZXFXFXSXSXZXSXSXCXvXvXuX9X9X9X9X>X9X>XL.L.L.9XMXMXMXMXnXcXcXcXxXxXxXxXdXdXdXb.Z : ..+.+.e ", " Z #.' F F F F F F F F F F F } #.Z . @ K .} &.&.&.:.:.>.>.<.<.<.3.3.s.s.s.ZXZXZXFXZXSXFXFXFXFXFXFXFXFXFXFXSXSX8XG.h.d.h.h.G.d.d.d.d.s.d.s.s.vXNXMXMXMXnXnXnXcXxXxXxXfXfXdXeX#.% : e ", " K +.' F F F F F F F F ' .#.< w +.#.{ :.>.>.,.<.<.3.s.s.s.s.s.d.ZXSXSXFXFXFXFXGXFXGXGXGXGXFXGXFXFXFX8XG.k.h.h.h.h.h.h.h.d.d.d.d.s.K.NXNXNXMXnXnXnXcXcXxXxXxXfXfXdXb.K ", " o ..@.F F F F F F F ' #.K @ . Z #.@.,.,.<.<.3.s.s.s.s.s.d.d.SXSXFXFXFXFXGXGXGXGXGXGXGXGXGXGXGXGXoXK.K.K.K.K.K.G.G.G.h.d.d.d.d.s.>XNXMXNXMXnXnXcXnXxXxXxXxXfXdXeX+.: ", " . ..@.F F F F ' .#.b . ; ..#.1.3.s.s.s.s.s.d.d.h.h.mXFXGXGXGXGXGXGXGXGXGXGXGXGXGXJXGXGX|.K.K.K.K.K.K.K.H.G.G.G.G.h.h.d.d.vXNXNXMXnXnXnXcXxXxXxXxXfXfXdX!.+. ", " ; +. .F F [ @.+.; e #.2.p.s.d.d.d.d.h.h.G.mXGXGXGXGXGXGXJXJXJXJXJXJXJXJXGXJXGX[.[.[.[.[.[.K.K.K.K.K.K.H.G.h.h.d.L.nXNXNXMXMXnXcXcXcXxXxXfXfXfXeX#.e ", " ; #. .} #.P + + K #.2.d.d.h.G.H.H.K.mXGXGXGXGXJXJXJXJXJXKXJXKXJXJXJXJXBX|.{.{.{.[.[.[.[.[.L.K.K.H.K.H.h.h.h.>XNXNXMXMXMXMXcXcXxXxXxXfXdXiXz.+. ", " w 2.#.w : @.#.f.G.H.K.K.K.mXGXJXJXJXJXKXKXKXLXKXKXKXKXKXKXKXmX|.|.{.{.{.{.{.[.[.[.[.[.K.K.K.K.H.H.h.zXNXNXMXMXMXcXcXcXcXxXfX@X,.#.J ", " w ; . J a.G.K.K.K.L.mXJXJXJXKXKXKXKXLXLXLXLXLXLXLXLXLXvX.X.X.X|.|.|.|.{.{.{.[.[.[.[.K.K.K.K.G.[.mXNXMXMXMXcXcXcXcX>Xs.,.2.... ", " b p.K.K.K.[.[.BXJXJXKXLXLXLXLXLXLXLXLXPXLXLXLXLXyXoXoXoXXXXXXX.X.X|.|.{.{.[.[.[.[.K.K.K.G.9XNXNXMXMXnXcX>XG.3.<.2.#.. ", " J z.[.[.[.[.|.BXKXKXKXLXLXPXLXPXPXPXPXPXLXPXLXIXtXOXOXOXOXOXoXXXXXXX.X.X{.{.{.[.[.[.[.K.K.H.iXMXNXMX0Xk.s.3.3.2.#.@ ", " P p.[.[.[.|.|.AXKXKXKXLXLXPXPXPXPXPXPXPXIXIXPXDX+Xb.}.l.l.l.l.l..XoXXXXX.X.X.X{.{.[.[.[.K.K.K.MX0XK.G.d.s.s.<.e., ", " o.z.{.|.|. X X.X8XyXbXDXLXPXPXIXUXUXUXIXIXIXIX4X#.K P K P K P #.p.OXOXoXXXXX.X|.{.{.[.[.[.K.K.H.G.G.G.d.d.s.e.< ", " O.p.{.|..X.XoXoXOXOXOXOX5X6XyXbXAXJXUXUXUXUXUX+Xt ; e.}.3XOXoXoXXXoX.X|.{.{.[.[.K.L.H.G.G.d.f.e.J ", " o.p. X.XoXoXoXOXOX3X5X5X5X5X6X6X6X6X6XhXbXAXJXb.w J z.OX3X3XOXoXoXoX.X|.|.{.[.[.L.H.K.H.d.e.o. ", " o.c..XoXOXOXOX3X5X5X5X5X5X7X7X7X7XrXrX7X7X7X5Xz.; o #.b.3X3X3X3XOXoXoX.X.X{.{.[.[.L.K.H.z.O.. ", " O.c.oXoXOXOX3X5X5X5X6X8X7X7XrXrXrXrXtXtXtX7Xc.P , z.&X5X3X3X3XOXoXoX.X.X{.{.[.[.L.f.2.@ ", " o.c.OXOX3X5X5X5X6X7X7X8XrXrXrXtXtXyXyXyXyXE.2.. P z.3X6X3X3XOXOXoXoXoX.X{.{.[.f.r.; ", " o.c.3X3X3X5X5X6X6X7XrXrXtXtXtXyXyXgXgXgX&Xz.; + a.E.6X6X5X3X3X3XOXoXXX.XJ.z.a., ", " o.b.3X3X5X6X6X7X7XrXrXtXtXgXgXgXgXgXgX8Xx.u t x.&X6X6X5X3X3XOXoX}.x.x.L . ", " o.b.3X5X6X6X7XrXtXtXyXgXgXgXgXgXhXhXgXb.o. o.c.6X7X6X5X3X&Xb.z.L + ", " i.b.5X6X7X7XrXtXtXyXgXgXgXgXhXhXhXhX+Xp.. + z.+X8X7XOXb.x.Q @ ", " #.b.6X6XrXrXtXtXgXgXgXgXhXlXhXkXkX&Xv.; J x.&X+Xz.P ; ", " i.v.b.+X&X8XtXgXgXgXhXhXlXlXkXkXgXv.n i.x.2., ", " 2 n N 1.z.v.v.E.+X4XrXlXlXkXbXkXb.o. - t ", " + 1 m o.z.v.v.+X&X8X+Xa.. ", " + , B i.z.v.- ", " ", " ", " ", " ", " ", " ", " " }; unixODBC-2.2.14-p2/odbcinstQ4/Driver48.xpm0100644000076400007640000002241110723566553016360 0ustar nicknick/* XPM */ static const char *xpmDriver48[] = { /* columns rows colors chars-per-pixel */ "48 48 254 2", " c none", ". c #00040C00", "X c #00051100", "o c #030D1C00", "O c #01081500", "+ c #010A2400", "@ c #000C2B00", "# c #00072000", "$ c #000C3500", "% c #000D3A00", "& c #04112900", "* c #05122600", "= c #06193C00", "- c #05163900", "; c #000E4500", ": c #01134A00", "> c #051B4B00", ", c #081E4200", "< c #04194100", "1 c #00125300", "2 c #02195900", "3 c #00166400", "4 c #031B6500", "5 c #001E7200", "6 c #001A7B00", "7 c #0A234500", "8 c #06225B00", "9 c #08255B00", "0 c #0E2C5D00", "q c #12315D00", "w c #07276700", "e c #00217600", "r c #092D7A00", "t c #09337D00", "y c #13356800", "u c #133C7D00", "i c #001D8A00", "p c #001E8600", "a c #001F9500", "s c #00218600", "d c #00248B00", "f c #032B8600", "g c #00209500", "h c #00229B00", "j c #032E9B00", "k c #0C398700", "l c #00309D00", "z c #1A3F9200", "x c #0023A300", "c c #0026AD00", "v c #002BAD00", "b c #0026B300", "n c #002AB400", "m c #002CBA00", "M c #0234A500", "N c #0034AD00", "B c #013BA900", "V c #0034B500", "C c #0134BD00", "Z c #003EBA00", "A c #053AB700", "S c #0036C100", "D c #023DC300", "F c #0A409D00", "G c #17448A00", "H c #14429500", "J c #1C449700", "K c #1C469A00", "L c #1D4C9D00", "P c #15439C00", "I c #1A529900", "U c #0843AA00", "Y c #0046B600", "T c #0342BB00", "R c #014CBB00", "E c #0B42BA00", "W c #084CB500", "Q c #0056BE00", "! c #0259BF00", "~ c #0951BB00", "^ c #1F4BA100", "/ c #174CA800", "( c #1A54AC00", ") c #1455B200", "_ c #1D56B200", "` c #1459BB00", "' c #1C62BF00", "] c #21549C00", "[ c #204EA200", "{ c #2253A800", "} c #2556A900", "| c #255BB200", " . c #235EBB00", ".. c #2256B000", "X. c #28649E00", "o. c #2861AC00", "O. c #2563BC00", "+. c #2863BA00", "@. c #266BB800", "#. c #367BBE00", "$. c #044BC300", "%. c #034BCC00", "&. c #0745C500", "*. c #024DD100", "=. c #0253C100", "-. c #035AC100", ";. c #015CC800", ":. c #085CC300", ">. c #0A56CC00", ",. c #0D5BDA00", "<. c #0955D300", "1. c #165BCC00", "2. c #005FE400", "3. c #0964CC00", "4. c #0963C700", "5. c #0A6CD400", "6. c #0866DB00", "7. c #0D75DF00", "8. c #146ACA00", "9. c #1B6CC900", "0. c #1765C600", "q. c #1769D500", "w. c #1E70C900", "e. c #1775D700", "r. c #036AE800", "t. c #0B76E900", "y. c #0675F100", "u. c #166AE100", "i. c #1778E400", "p. c #2969C600", "a. c #256BDB00", "s. c #2F72CC00", "d. c #2877CC00", "f. c #2174D200", "g. c #2B7BD200", "h. c #2878D500", "j. c #3779CB00", "k. c #327FDD00", "l. c #337BD400", "z. c #257AE600", "x. c #367FE300", "c. c #4775BA00", "v. c #4178C100", "b. c #0887FC00", "n. c #1D80E500", "m. c #128EFC00", "M. c #1687F500", "N. c #1692FD00", "B. c #1B95FD00", "V. c #2682DE00", "C. c #2881DA00", "Z. c #3581CF00", "A. c #3783D000", "S. c #3C85D300", "D. c #3E88D400", "F. c #3683DD00", "G. c #2382E000", "H. c #2C83EB00", "J. c #2A8CEC00", "K. c #2688E800", "L. c #2C8DF000", "P. c #2E90E900", "I. c #2399FD00", "U. c #2C9EFD00", "Y. c #2994F500", "T. c #328BE400", "R. c #348BED00", "E. c #398BE700", "W. c #3785E200", "Q. c #3A93E600", "!. c #359FFA00", "~. c #3D94F200", "^. c #3899F500", "/. c #2FA0FE00", "(. c #33A2FE00", "). c #3DA0F700", "_. c #3BA5FD00", "`. c #3FA8FD00", "'. c #458BCD00", "]. c #438BD400", "[. c #4C8CDB00", "{. c #4688D600", "}. c #4B91D600", "|. c #4A95DB00", " X c #578ED500", ".X c #5294D700", "XX c #5696D900", "oX c #5B9ADB00", "OX c #459CED00", "+X c #4898E900", "@X c #419DFA00", "#X c #439AF100", "$X c #579FE800", "%X c #4EA1E900", "&X c #43A1FD00", "*X c #44AAFE00", "=X c #4CA6F400", "-X c #4BACFC00", ";X c #49A4F500", ":X c #4EB0FE00", ">X c #59A6E900", ",X c #53ACF700", "XMXsX#X,.g PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPX", "PXPXPXPXPXm C n i PXx Z =.i.mXSXSXmXwX#XH.z.xXVXVXmXW.5 PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPX", "PXPXPXPXn *.z.a.S c c $.3.K.xXSXZXZXCXVXMXnXMXMXmXmX+XN p ; PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPX", "PXPXPXb &.R.VXVX0Xa.,.R.tXMXZXCXCXVXMXmXmXnXnXnXmXnXgXR.<.n i x m m a PXPXPXPXPXPXPXPXPXPXPXPXPX", "PXPXa C 6.sXSXSXSXmXzXVXCXVXVXVXxXwXOXE.W.T.Q.1XeXzXxXgX;Xu.Z S <.,.V 6 PXPXPXPXPXPXPXPXPXPXPXPX", "PXPXa V ;.K.gXZXZXCXCXVXVXVXcX1Xh.) ^ z H H K / ` h.#XtXgXeXH.H.,X2Xu.V 6 PXPXPXPXPXPXPXPXPXPXPX", "PXPXg A Q -.7. . @ w P .p.p.@.p.p.p.p.i.m.m.y.T 3 PXPXPXPXPXPXPXPXPX", "PX%.^.X}.X.PXPXPXPXPXPXPXPXPXPXPXo.~.).*X-X-X*X*X`.!.z.&.M : PXPXPX", "PX @ B Q 8.=XgXgXhXxXxXxXcXhXyX>X'.PXPXPXPXPXPXPXPXPXPX@.~.*X2X2X2X:X-X*X*X_.H.1.M @ PXPX", "PXPXPXPXPX j 1.=XfXgXgXhXhXxXxXcXcXgXtXwX9X>X'.PXPXPXPXPXPX#X+X;X3X4X3X2X2X:X-X*X*X_.L.B O PXPX", "PXPXPXPXPXS 1.OXfXgXgXgXxXxXxXxXhXfXfXfXfXfXaXaXyXyXwX9XeXeXeXeXtXdXrX4X4X3X2X-X-X*X*XL.k PXPX", "PXPXPXPXPX&.3.1XfXgXgXgXgXgXgXfXfXfXfXgXgXhXxXxXgXgXgXgXgXgXfXfXfXdXtXrXrX4X,XC.P.*X*XH.r PXPX", "PXPXPXPXf &.Q e. U =.! Q Q Q Q =.Q ! -.! ! 8.w.pXCXCXZXZXZXCXCXVXMXMXnXnXcXcXzXgX$X>.Q ~ w X PXPXPX", "PXPXPXPX > U ! Q Q Q =.W U :.4.0.8.9.d.lXZXFXFXSXFXZXpX8X>X>XXXpXmXnXxXxXaXs.l t X PXPXPXPX", "PXPXPXPXPX 9 W =.Q ! z = @ k ` 0.9.d.d.lXFXFXFXFXGXAX}.Z.Z.j.d.S.vXmXcXxXgX$Xu X PXPXPXPXPX", "PXPXPXPXPXPX. w ~ ~ t + X 9 / 9.d.Z.kXGXHXHXHXHXBX}.'.'.S.A.Z.XXcXnXcXhXwXp.= PXPXPXPXPXPX", "PXPXPXPXPXPXPX w 9 . PX & H g.].bXHXKXJXJXKXBXXX}.}.'.].S.A.pXmXhX>Xd.G O PXPXPXPXPXPX", "PXPXPXPXPXPXPX PXPXPXPX / A.}.kXDXKXLXLXLXkXj.j.{..X}.].D.}.8XD.d.G O PXPXPXPXPXPXPX", "PXPXPXPXPXPXPXPXPX PXPXPXPXPXPXPX1.{..XoX6XjXkXbXBXc.= = ] [.XX.X}.].S.g./ * PXPXPXPXPXPXPX", "PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPX0.{.oX5X6X7X7X7XoXG 0 j.oXoXXX}.S.O.= PXPXPXPXPXPXPXPX", "PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXp.[.8XiXuX7XjX7X} o PXO K [.5XoXj.] 7 PXPXPXPXPXPXPXPXPX", "PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXp.|.6XuXjXkXkXv.- PX - +.{.| 0 O PXPXPXPXPXPXPXPXPXPX", "PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXH ] o.v. X6X Xy PXPXPX y y o PXPXPXPXPXPXPXPXPXPXPX", "PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPX . * 7 y q . PXPXPXPXPX PXPXPXPXPXPXPXPXPXPXPXPXPX", "PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPX PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPX", "PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPX", "PXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPXPX" }; unixODBC-2.2.14-p2/odbcinstQ4/GreatBritain.xpm0100644000076400007640000000721310666700031017312 0ustar nicknick/* XPM */ static const char *xpmGreatBritain[] = { /* width height num_colors chars_per_pixel */ " 32 22 129 2", /* colors */ ".. c #000000", ".# c #6762cf", ".a c #da6666", ".b c #cc1d1d", ".c c #130bb8", ".d c #d0b4cc", ".e c #d23d3d", ".f c #352ec2", ".g c #d64e4e", ".h c #de797a", ".i c #a39cdb", ".j c #3e37c4", ".k c #554fca", ".l c #e59b9b", ".m c #b4aadb", ".n c #ddaab4", ".o c #e8aaab", ".p c #dfa3ac", ".q c #d96161", ".r c #c70707", ".s c #e18c8d", ".t c #e69f9f", ".u c #0b03b6", ".v c #e9aeaf", ".w c #aaa3de", ".x c #c80b0b", ".y c #cc1c1c", ".z c #dd7475", ".A c #db9fab", ".B c #e9b2b2", ".C c #edc3c3", ".D c #d23c3c", ".E c #d64d4d", ".F c #cd2020", ".G c #dda5b0", ".H c #b4b2e4", ".I c #1008b7", ".J c #e8e1ec", ".K c #ede2e7", ".L c #d8b1c2", ".M c #e59a9a", ".N c #1a13ba", ".O c #7873d4", ".P c #d96060", ".Q c #231cbc", ".R c #c80a0a", ".S c #d2d1ed", ".T c #8b87d9", ".U c #443dc5", ".V c #dd7374", ".W c #c4c2e9", ".X c #0800b5", ".Y c #edc2c2", ".Z c #d23b3b", ".0 c #eee3e7", ".1 c #cf2e2e", ".2 c #c60101", ".3 c #dc6c6c", ".4 c #ca1212", ".5 c #db6a6b", ".6 c #b4a8d9", ".7 c #e8a8a9", ".8 c #c70505", ".9 c #3d37c4", "#. c #c9c7ea", "## c #9893db", "#a c #df7f7f", "#b c #2f28c0", "#c c #d2d0ec", "#d c #e18c8e", "#e c #e69fa0", "#f c #0901b5", "#g c #ce2929", "#h c #db6767", "#i c #d0b3cc", "#j c #cf2d2d", "#k c #c60000", "#l c #e49697", "#m c #e8a7a8", "#n c #df7a7b", "#o c #cd2021", "#p c #de7a7a", "#q c #d54d4d", "#r c #cc2020", "#s c #c70404", "#t c #deabb5", "#u c #e07e7f", "#v c #d79fae", "#w c #231cbd", "#x c #0b04b6", "#y c #c80a0b", "#z c #8a87d9", "#A c #b9b7e6", "#B c #d2b6cd", "#C c #eab3b3", "#D c #cf2c2c", "#E c #6560cf", "#F c #918cd9", "#G c #cc1f1f", "#H c #a39cda", "#I c #1109b8", "#J c #c70303", "#K c #ede1e7", "#L c #d8b2c2", "#M c #ca1213", "#N c #b4a8da", "#O c #dd7071", "#P c #ce2727", "#Q c #443ec5", "#R c #dda1ac", "#S c #cb1a1a", "#T c #cf2b2b", "#U c #dea7b0", "#V c #2922be", "#W c #e9e3ec", "#X c #dab3c3", "#Y c #cf2d2e", "#Z c #d8b1c1", "#0 c #f0dddf", "#1 c #1b13ba", "#2 c #de7a7b", "#3 c #d95e5f", "#4 c #0e06b7", "#5 c #251ebd", "#6 c #e49a9b", "#7 c #e8abac", "#8 c #2f29c0", "#9 c #e08b8d", "a. c #e6a0a0", /* pixels */ "................................................................", "..#Y#L.k.X.X.X.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X.X.X.X#f.##t.F..", "...y.8#n.i#1.X.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X.X.X#5#N#h.2#P..", "..#K.P.2.1.L.k.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X#f.##t#o#J.V#W..", "..#b.W.B.y.8#p#H#1.X.X.X.X#I#l#k#k#v.X.X.X.X.X#5.6#h.2#g.Y.H.Q..", "...X.u.O#K.P.2#j#Z.k.X.X.X#I#l#k#k#v.X.X.X#f.#.n#r#J.V.J#E#f.X..", "...X.X.X#8.W.B.b.8.h#H#1.X#I#l#k#k#v.X.X#5.6.a.2#g.Y.H#w.X.X.X..", "...X.X.X.X#x.O#K.q.2#j#Z.k#I#l#k#k#v#f.#.n#r#s.z.J#E#f.X.X.X.X..", "..#4#4#4#4#4#4.f#.#C#G.x#a.w#l#k#k#U.m.3.r#T.C#A#V#4#4#4#4#4#4..", "..#6#6#6#6#6#6#6#6.l.l.M.M.l#3#k#k#O.l.M.M.l.l#6#6#6#6#6#6#6#6..", "..#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k..", "..#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k#k..", "...A.A.A.A.A.A.A.p.v#m#e#e#7.5#k#k#u.o#e#e.7.v#R.A.A.A.A.A.A.A..", "...X.X.X.X.X.X.j.Sa.#M.R#9###l#k#k.G.i.h.8.b#C.W#b.X.X.X.X.X.X..", "...X.X.X.X.I#z#0.g#k.D#i.U#I#l#k#k#v.X.k#Z#j.2.q.K.O.u.X.X.X.X..", "...X.X.X.j#c.t#M#y#9#F.c.X#I#l#k#k#v.X.X.N.i.h.8.b.B.W#b.X.X.X..", "...X.I.T#0#q#k.D#i#Q.X.X.X#I#l#k#k#v.X.X.X.X.k#Z#j.2.P#K.O.u.X..", "...9#c.t.4.x.s#F.c.X.X.X.X#I#l#k#k#v.X.X.X.X.X#1.i#p.8.y.B.W#8..", "..#0.E#k.e.d.U.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X.X.k.L.1.2.P.0..", "...4.x#d#F.c.X.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X.X.X#1.i#2.8#S..", "...Z#B#Q.X.X.X.X.X.X.X.X.X#I#l#k#k#v.X.X.X.X.X.X.X.X.X.X.k#X#D..", "................................................................" }; unixODBC-2.2.14-p2/odbcinstQ4/Info16.xpm0100644000076400007640000000467310724267021016012 0ustar nicknick/* XPM */ static const char * xpmInfo16[] = { "16 16 116 2", " c None", ". c #0159AF", "+ c #1B6BBA", "@ c #196BBA", "# c #015DB5", "$ c #1466B8", "% c #6299D0", "& c #89B3DC", "* c #75A6D6", "= c #76A6D6", "- c #88B4DE", "; c #629CD5", "> c #136BC1", ", c #2473C0", "' c #78A9D9", ") c #7CACDB", "! c #6A9FD4", "~ c #F4F8FC", "{ c #F5F9FC", "] c #6EA3D6", "^ c #7CAFDF", "/ c #78ADDE", "( c #247BCB", "_ c #136BBF", ": c #5F9BD4", "< c #649FD6", "[ c #64A0D7", "} c #7DACD9", "| c #FFFFFF", "1 c #87B3DE", "2 c #64A2DC", "3 c #64A3DC", "4 c #5FA0DC", "5 c #1475CE", "6 c #3482CC", "7 c #4C91D3", "8 c #4C92D4", "9 c #4C93D5", "0 c #428BCF", "a c #A9C8E8", "b c #ACCBE8", "c c #448DD1", "d c #4C96DA", "e c #4C97DB", "f c #4C98DC", "g c #348BD9", "h c #0568C4", "i c #3485D0", "j c #3587D2", "k c #3587D3", "l c #3284D2", "m c #287DCC", "n c #257ACA", "o c #257BCB", "p c #3287D5", "q c #358CDA", "r c #358DDB", "s c #358EDB", "t c #348DDD", "u c #0573D6", "v c #0069C8", "w c #066ECB", "x c #1677CF", "y c #1D7CD2", "z c #1674CB", "A c #1676CF", "B c #1D81DA", "C c #1D82DB", "D c #167FDB", "E c #0677DA", "F c #0075DB", "G c #006CCD", "H c #006DCF", "I c #006ED0", "J c #0170D2", "K c #026FD1", "L c #0167C7", "M c #016ECF", "N c #0276DA", "O c #0177DC", "P c #0077DD", "Q c #0078DF", "R c #0079E0", "S c #0070D3", "T c #0071D4", "U c #0072D6", "V c #0073D7", "W c #0074D8", "X c #006ECF", "Y c #006FD2", "Z c #0078E0", "` c #0079E1", " . c #007AE2", ".. c #007BE4", "+. c #007CE4", "@. c #0074DA", "#. c #0076DC", "$. c #0077DE", "%. c #007CE5", "&. c #007DE6", "*. c #007EE8", "=. c #007FE9", "-. c #006DD0", ";. c #006FD3", ">. c #0081EC", ",. c #0081EB", "'. c #007CE6", "). c #007DE7", "!. c #027FE8", "~. c #1A83DF", "{. c #3490E1", "]. c #499BE2", "^. c #318FE1", "/. c #1487EA", "(. c #0282EC", "_. c #0483EC", " ", " . + @ # ", " $ % & * = - ; > ", " , ' ) ! ~ { ] ^ / ( ", " _ : < [ } | | 1 2 3 4 5 ", " 6 7 8 9 0 a b c d e f g ", " h i j k l m n o p q r s t u ", " v w x y z | | | A B C D E F ", " G H I J K L | | M N O P Q R ", " S T U V W X | | Y Z ` ...+. ", " @.F #.$.S | | U %.&.*.=. ", " Q R .Z -.| | ;.&.>.>.,. ", " '.).@.| | | | P >.>. ", " ,.!.~.{.].^./.>. ", " >.(._.,. ", " "}; unixODBC-2.2.14-p2/odbcinstQ4/InfoArrow16.xpm0100644000076400007640000000476010724267021017022 0ustar nicknick/* XPM */ static const char * xpmInfoArrow16[] = { "16 16 119 2", " c None", ". c #0568C4", "+ c #0069C8", "@ c #006CCD", "# c #0070D3", "$ c #136BBF", "% c #3482CC", "& c #3485D0", "* c #066ECB", "= c #006DCF", "- c #0071D4", "; c #0074DA", "> c #0078DF", ", c #2473C0", "' c #5F9BD4", ") c #4C91D3", "! c #3587D2", "~ c #6E9DCB", "{ c #6699CB", "] c #0072D6", "^ c #0075DB", "/ c #0079E0", "( c #007CE6", "_ c #1466B8", ": c #78A9D9", "< c #649FD6", "[ c #4C92D4", "} c #5993CC", "| c #F9FAFC", "1 c #3987CE", "2 c #0076DC", "3 c #007AE2", "4 c #007DE7", "5 c #0081EB", "6 c #6299D0", "7 c #7CACDB", "8 c #64A0D7", "9 c #5795D0", "0 c #E7EBF2", "a c #FFFFFF", "b c #E6EBF2", "c c #197ED7", "d c #007BE3", "e c #007EE8", "f c #0181EC", "g c #0159AF", "h c #8EB6DE", "i c #7CADDC", "j c #669FD7", "k c #CAD6E4", "l c #C6D4E4", "m c #067DE3", "n c #007FEA", "o c #1A8EEE", "p c #0081EC", "q c #1B6BBA", "r c #94BBE0", "s c #A9BED6", "t c #99B8D8", "u c #0381EB", "v c #339AF0", "w c #0182EC", "x c #196BBA", "y c #94BBE1", "z c #7CAEDD", "A c #64A1DA", "B c #4C95D8", "C c #358BD7", "D c #F1F4F7", "E c #147CD8", "F c #007EE7", "G c #0784ED", "H c #48A5F1", "I c #0282EC", "J c #015DB5", "K c #8EB8E0", "L c #7CAEDE", "M c #64A1DB", "N c #4C96D9", "O c #358BD8", "P c #D5DEE9", "Q c #3E8AD1", "R c #007FE9", "S c #3199F0", "T c #629CD5", "U c #7CAFDF", "V c #64A2DC", "W c #4C96DA", "X c #358CDA", "Y c #93B3D4", "Z c #699FD1", "` c #007CE5", " . c #0080EA", ".. c #0F88ED", "+. c #136BC1", "@. c #78ADDE", "#. c #64A3DC", "$. c #4C97DB", "%. c #358DDB", "&. c #3287D5", "*. c #D9E2EC", "=. c #DBE3ED", "-. c #0A7FE2", ";. c #247BCB", ">. c #5FA0DC", ",. c #4C98DC", "'. c #358EDB", "). c #167FDB", "!. c #107CD9", "~. c #ABC3DC", "{. c #A4BFDB", "]. c #1475CE", "^. c #348BD9", "/. c #348DDD", "(. c #0677DA", "_. c #007BE4", ":. c #0985EC", "<. c #0573D6", "[. c #007CE4", " ", " . + @ # ", " $ % & * = - ; > ", " , ' ) ! ~ { ] ^ / ( ", " _ : < [ } | | 1 2 3 4 5 ", " 6 7 8 9 0 a a b c d e f ", " g h i j k a a a a l m n o p ", " q r i s a a a a a a t u v w ", " x y z A B C D a E 3 F G H I ", " J K L M N O P a Q d R I S 5 ", " T U V W X Y a Z ` .p .. ", " +.@.#.$.%.&.*.=.-.p p p ", " ;.>.,.'.).!.~.{.'.p ", " ].^./.(.> _.R :. ", " <.^ / [. ", " "}; unixODBC-2.2.14-p2/odbcinstQ4/NoFlag.xpm0100644000076400007640000000154210666700031016104 0ustar nicknick/* XPM */ static const char * xpmNoFlag[] = { "32 22 1 1", " c None", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " " }; unixODBC-2.2.14-p2/odbcinstQ4/ODBC.xpm0100644000076400007640000000436710666700031015455 0ustar nicknick/* XPM */ static const char *xpmODBC[]={ "16 16 104 2", "Qt c None", ".# c #000000", "#q c #004600", "#i c #005501", "#a c #006501", "#x c #013800", "#p c #013d01", "#h c #014d01", "#r c #014e01", "## c #015c01", "#j c #015e01", "#k c #016701", ".3 c #016c01", "#b c #016e01", ".4 c #017501", "#c c #017701", ".U c #017b01", ".5 c #017e01", ".V c #018401", ".K c #018c01", ".W c #018e01", ".L c #019501", ".M c #019d01", ".z c #01a402", ".A c #01ac02", ".p c #01bb01", ".E c #01cc01", ".g c #01cf01", ".s c #01d102", ".6 c #028701", ".X c #029702", ".N c #02a601", ".O c #02ae02", ".o c #02b302", ".B c #02b502", ".C c #02bd01", ".q c #02c302", ".D c #02c502", ".f c #02c801", ".r c #02ca02", ".h c #02d602", ".t c #02d802", ".i c #02dc02", ".a c #02e002", ".j c #02e102", ".b c #02e502", ".c c #02ea02", ".d c #103030", ".e c #113636", ".k c #143d3d", ".l c #164343", ".m c #18494a", ".u c #194b4b", ".n c #1a5050", ".v c #1a5152", ".w c #1d5858", ".F c #1d595b", ".x c #1f5e5e", ".G c #1f5f60", ".y c #216565", ".H c #226768", ".I c #246d6e", ".P c #256f6f", ".J c #267374", ".Q c #277676", ".R c #297c7d", ".S c #2b8283", ".Z c #2b8485", ".T c #2d898a", ".0 c #2d8a8c", ".1 c #309193", ".7 c #309394", ".2 c #329799", ".8 c #32999b", ".9 c #35a0a1", "#d c #35a1a3", "#. c #36a6a7", "#e c #37a7a9", "#f c #39adaf", "#l c #39afb0", "#g c #3bb3b4", "#m c #3bb5b6", "#n c #3db9bb", "#t c #3ebbbd", "#o c #3fbfc1", "#u c #3fc0c2", "#v c #41c6c7", "#w c #42cbcc", "#F c #43ccce", "#K c #440000", "#G c #45d1d2", "#J c #48dadc", "#I c #5b0000", "#E c #730000", "#D c #8b0000", "#L c #8c0000", "#C c #a40000", "#B c #bb0000", "#A c #d00000", "#s c #e30000", "#z c #e40000", "#y c #f30000", "#H c #ff0000", ".Y c #ffffff", "QtQtQtQtQt.#.#.#.#.#.#QtQtQtQtQt", "QtQtQt.#.#.a.b.c.#.d.e.#.#QtQtQt", "QtQt.#.f.g.h.i.j.#.k.l.m.n.#QtQt", "Qt.#.o.p.q.r.s.t.#.u.v.w.x.y.#Qt", "Qt.#.z.A.B.C.D.E.#.F.G.H.I.J.#Qt", ".#.K.L.M.N.O.#.#.#.#.P.Q.R.S.T.#", ".#.U.V.W.X.#QtQtQtQt.#.Z.0.1.2.#", ".#.3.4.5.6.#QtQtQtQt.#.7.8.9#..#", ".####a#b#c.#QtQtQtQt.##d#e#f#g.#", ".##h#i#j#k.#QtQtQtQt.##l#m#n#o.#", ".##p#q#r.##s.#.#.#.#.##t#u#v#w.#", "Qt.##x.##y#z#A#B#C#D#E.##F#G.#Qt", "Qt.#.##H#y#s#A#B#C#D#E#I.##J.#Qt", "QtQt.##H#y#s#A#B#C#D#E#I#K.#QtQt", "QtQtQt.#.##s#A#B#C#L#E.#.#QtQtQt", "QtQtQtQtQt.#.#.#.#.#.#QtQtQtQtQt"}; unixODBC-2.2.14-p2/odbcinstQ4/Pooling48.xpm0100644000076400007640000006515710723566553016552 0ustar nicknick/* XPM */ static const char * xpmPooling48[] = { "64 64 1171 2", " c None", ". c #FBAB00", "+ c #FFAE00", "@ c #FAAB00", "# c #FFB307", "$ c #FFD93B", "% c #FFBB11", "& c #F5A700", "* c #FAA700", "= c #F6A200", "- c #FEAD00", "; c #FFAF02", "> c #FFD235", ", c #FFFA6C", "' c #FFFF6E", ") c #FFE74A", "! c #FBBF2E", "~ c #F8AB0E", "{ c #F29E00", "] c #FFCA2D", "^ c #FFF46C", "/ c #FFFF78", "( c #FFFF72", "_ c #FFFF6D", ": c #FFFE69", "< c #FFC21A", "[ c #F9AA00", "} c #FAA600", "| c #FBC234", "1 c #FFFE95", "2 c #FEF27A", "3 c #F6AD15", "4 c #F29B00", "5 c #FDAD00", "6 c #FFC224", "7 c #FFEE6D", "8 c #FFFF84", "9 c #FFFF7D", "0 c #FFFF77", "a c #FFFF6C", "b c #FFFD68", "c c #FFEC51", "d c #D59100", "e c #FBC235", "f c #FFFE98", "g c #FFFF92", "h c #FFFF8A", "i c #FEF675", "j c #F5B21C", "k c #F09800", "l c #FCAC00", "m c #FFBC1A", "n c #FFE769", "o c #FFFF8F", "p c #FFFF89", "q c #FFFF82", "r c #FFFF7C", "s c #FFFF76", "t c #FFFF70", "u c #FFFF6B", "v c #FFFD67", "w c #FFFA63", "x c #FFCA24", "y c #FCCC48", "z c #FFFF9F", "A c #FFFF96", "B c #FFFF8D", "C c #FEFA6F", "D c #F4B722", "E c #EE9400", "F c #CD7D00", "G c #FFB610", "H c #FFE062", "I c #FFFF94", "J c #FFFF8E", "K c #FFFF87", "L c #FFFF81", "M c #FFFF7B", "N c #FFFF75", "O c #FFFF6F", "P c #FFFF6A", "Q c #FFFC66", "R c #FFF962", "S c #FFEF55", "T c #FFB003", "U c #E19900", "V c #FCCC4A", "W c #FFFFA2", "X c #FFFF99", "Y c #FFFF90", "Z c #FFFF88", "` c #FFFF80", " . c #FFFC68", ".. c #F4BC28", "+. c #EB8F00", "@. c #D48000", "#. c #FAAA00", "$. c #FFB30B", "%. c #FFD657", "&. c #FFFCA2", "*. c #FFFFA0", "=. c #FFFF9A", "-. c #FFFF93", ";. c #FFFF8C", ">. c #FFFF86", ",. c #FFFF7A", "'. c #FFFF74", "). c #FFFE6A", "!. c #FFFB66", "~. c #FFF861", "{. c #FFF55D", "]. c #FECF2D", "^. c #FCAA00", "/. c #DF9500", "(. c #FCCC4C", "_. c #FFFFA6", ":. c #FFFF9D", "<. c #FFFF8B", "[. c #FFFF73", "}. c #FFF860", "|. c #F5C22F", "1. c #E98B00", "2. c #D88000", "3. c #FFAF03", "4. c #FFCF4C", "5. c #FFF8A3", "6. c #FFFFAD", "7. c #FFFF98", "8. c #FFFF85", "9. c #FFFF7E", "0. c #FFFB64", "a. c #FFF45C", "b. c #FFE74C", "c. c #FCA901", "d. c #FCCB4A", "e. c #FFFFAA", "f. c #FFFFA1", "g. c #FFFE68", "h. c #FFF45D", "i. c #FFF058", "j. c #F6C733", "k. c #E68801", "l. c #DA7F00", "m. c #FFC73E", "n. c #FFF4A5", "o. c #FFFFBA", "p. c #FFFFB2", "q. c #FFFFAC", "r. c #FFFFA5", "s. c #FFFF9E", "t. c #FFFF97", "u. c #FFFA64", "v. c #FECF2E", "w. c #FBAC06", "x. c #FAA802", "y. c #F9A400", "z. c #F9B626", "A. c #FEF695", "B. c #FFFF9B", "C. c #FFFF79", "D. c #FFFF71", "E. c #FFFB65", "F. c #FFF65F", "G. c #FFF25A", "H. c #FFEE54", "I. c #FFEA4E", "J. c #F8CA34", "K. c #E48703", "L. c #DC7D00", "M. c #FFC132", "N. c #FFEC9D", "O. c #FFFFC6", "P. c #FFFFBF", "Q. c #FFFFB8", "R. c #FFFFB1", "S. c #FFFFA3", "T. c #FFFF9C", "U. c #FEDB3C", "V. c #FDB109", "W. c #FBA901", "X. c #FCBE1C", "Y. c #FEE246", "Z. c #FDB20A", "`. c #F6A101", " + c #F6AD19", ".+ c #FDF07E", "++ c #FFFC67", "@+ c #FFF862", "#+ c #FFF056", "$+ c #FFEB50", "%+ c #FFE74B", "&+ c #FFE246", "*+ c #FACC34", "=+ c #E38706", "-+ c #DB7A00", ";+ c #FFBA20", ">+ c #FFE696", ",+ c #FFFFD4", "'+ c #FFFFCC", ")+ c #FFFFC5", "!+ c #FFFFBE", "~+ c #FFFFB7", "{+ c #FFFFB0", "]+ c #FFFFA9", "^+ c #FEB810", "/+ c #FDAA00", "(+ c #FCB813", "_+ c #FED83A", ":+ c #FFE84C", "<+ c #FFBA12", "[+ c #FDB610", "}+ c #F49F02", "|+ c #F3A30E", "1+ c #FCE86A", "2+ c #FFF65E", "3+ c #FFF258", "4+ c #FFED53", "5+ c #FFE84E", "6+ c #FFE448", "7+ c #FFE042", "8+ c #FFDC3C", "9+ c #FBCC30", "0+ c #E38808", "a+ c #DA7700", "b+ c #FFE393", "c+ c #FFFFD9", "d+ c #FFFFD2", "e+ c #FFFFCB", "f+ c #FFFFC4", "g+ c #FFFFBC", "h+ c #FFFFB6", "i+ c #FFFFAE", "j+ c #FFFFA7", "k+ c #FFEE5D", "l+ c #FFC21C", "m+ c #FEAC00", "n+ c #FDB40B", "o+ c #FED02F", "p+ c #FFE245", "q+ c #FFE64A", "r+ c #FFEA4F", "s+ c #FFBE16", "t+ c #FFBE18", "u+ c #FEBC17", "v+ c #F39E04", "w+ c #F09A06", "x+ c #FADF56", "y+ c #FFF35B", "z+ c #FFEE55", "A+ c #FFEA50", "B+ c #FFE244", "C+ c #FFDD3F", "D+ c #FFD93A", "E+ c #FFD434", "F+ c #FCC92A", "G+ c #E48A0A", "H+ c #D97400", "I+ c #FFBA1F", "J+ c #FFFCD1", "K+ c #FFFFD0", "L+ c #FFFFC9", "M+ c #FFFFC2", "N+ c #FFFFBB", "O+ c #FFFFB4", "P+ c #FFF46D", "Q+ c #FFCA2A", "R+ c #FEB207", "S+ c #FEC824", "T+ c #FFDC3D", "U+ c #FFE84D", "V+ c #FFEC52", "W+ c #FFF057", "X+ c #FFC11B", "Y+ c #FFC41E", "Z+ c #FEC21E", "`+ c #F29F08", " @ c #EC9302", ".@ c #F7D343", "+@ c #FFE446", "@@ c #FFDF41", "#@ c #FFDA3C", "$@ c #FFD636", "%@ c #FFD230", "&@ c #FFCE2A", "*@ c #FDC524", "=@ c #E58D0A", "-@ c #D77000", ";@ c #BA5F00", ">@ c #FFDA74", ",@ c #FFFFCF", "'@ c #FFFFC8", ")@ c #FFFFC1", "!@ c #FFFFB3", "~@ c #FFFF91", "{@ c #FFFA82", "]@ c #FFD23A", "^@ c #FEC21B", "/@ c #FFD535", "(@ c #FFDA3B", "_@ c #FFDE40", ":@ c #FFE64B", "<@ c #FFC420", "[@ c #FFC621", "}@ c #FFC722", "|@ c #FFC824", "1@ c #FEC825", "2@ c #F2A30D", "3@ c #EA8D00", "4@ c #F3C131", "5@ c #FFE549", "6@ c #FFE044", "7@ c #FFDC3E", "8@ c #FFD838", "9@ c #FFD432", "0@ c #FFD02D", "a@ c #FFCB28", "b@ c #FFC622", "c@ c #FEC11C", "d@ c #E78F0A", "e@ c #D46B00", "f@ c #C05F00", "g@ c #F2A500", "h@ c #FFB30D", "i@ c #FFFAC0", "j@ c #FFFC91", "k@ c #FFD94C", "l@ c #FFB309", "m@ c #FFAF01", "n@ c #FFBC13", "o@ c #FFCE2C", "p@ c #FFD839", "q@ c #FFE144", "r@ c #FFE94E", "s@ c #FFCA26", "t@ c #FFCA27", "u@ c #FFCC29", "v@ c #F2A914", "w@ c #E78800", "x@ c #EFB022", "y@ c #FEEE55", "z@ c #FFDA3A", "A@ c #FFD635", "B@ c #FFD12F", "C@ c #FFCC2A", "D@ c #FFC019", "E@ c #FFBB14", "F@ c #EA9207", "G@ c #D26700", "H@ c #C45F00", "I@ c #FFD259", "J@ c #FFFEA0", "K@ c #FFE161", "L@ c #FFB710", "M@ c #FFB80D", "N@ c #FFC822", "O@ c #FFCF2D", "P@ c #FFD332", "Q@ c #FFD837", "R@ c #FFE447", "S@ c #FFCC28", "T@ c #FFCD2A", "U@ c #FFD02E", "V@ c #FFD231", "W@ c #F3B11D", "X@ c #E48400", "Y@ c #EBA017", "Z@ c #FEE44A", "`@ c #FFD737", " # c #FFC21B", ".# c #FFBD16", "+# c #FFB810", "@# c #FFB40A", "## c #E38402", "$# c #CF6300", "%# c #AA5100", "&# c #EBA000", "*# c #FFF4A8", "=# c #FFEA7C", "-# c #FFBD1E", ";# c #FFCE2B", "># c #FFDE3F", ",# c #FFF259", "'# c #FFD02F", ")# c #F6BC27", "!# c #E28201", "~# c #E6930F", "{# c #FCD83E", "]# c #FFC823", "^# c #FFC31E", "/# c #FFB60C", "(# c #EF9805", "_# c #D06400", ":# c #BD5900", "<# c #F3A600", "[# c #FFC83F", "}# c #FFF093", "|# c #FFC42E", "1# c #FFB104", "2# c #FFBB12", "3# c #FFD433", "4# c #FFD736", "5# c #FFDD3E", "6# c #F8C832", "7# c #E08103", "8# c #E28809", "9# c #FACB32", "0# c #FFC926", "a# c #FFC520", "b# c #FFC01A", "c# c #FFBC14", "d# c #FFB80F", "e# c #EF9A07", "f# c #BC5900", "g# c #F6A800", "h# c #FFAF04", "i# c #FFB618", "j# c #FDAC00", "k# c #F4A700", "l# c #FFC83A", "m# c #FFF760", "n# c #FFFE6B", "o# c #FAD33C", "p# c #DF8207", "q# c #DE7E05", "r# c #F6BD27", "s# c #FFBE17", "t# c #FFBA11", "u# c #EF9B08", "v# c #B65600", "w# c #E69D00", "x# c #FFCE60", "y# c #FFF5CC", "z# c #FFE495", "A# c #FFD25C", "B# c #FFC12E", "C# c #FFB006", "D# c #FFB105", "E# c #FFBC15", "F# c #FFC41F", "G# c #FFE043", "H# c #FFE346", "I# c #FCDE46", "J# c #DF860C", "K# c #DA7602", "L# c #F2AF1D", "M# c #EF9C0A", "N# c #B25400", "O# c #D69200", "P# c #FFC84A", "Q# c #FFFBCB", "R# c #FFFFC0", "S# c #FFFEB3", "T# c #FFEB80", "U# c #FFB60F", "V# c #FFC21D", "W# c #FFDF42", "X# c #FDE750", "Y# c #E08D14", "Z# c #D66E00", "`# c #EEA113", " $ c #ED990B", ".$ c #FEAE00", "+$ c #FFC130", "@$ c #FFFAB6", "#$ c #FFF688", "$$ c #FFBB16", "%$ c #FFC620", "&$ c #FFE649", "*$ c #FEF058", "=$ c #E2981E", "-$ c #D36900", ";$ c #E6900B", ">$ c #EA950B", ",$ c #CE6200", "'$ c #B25300", ")$ c #FFBB1D", "!$ c #FFF89E", "~$ c #FFFFA4", "{$ c #FFF87A", "]$ c #FFC11E", "^$ c #FEBD17", "/$ c #FFED52", "($ c #FFEF56", "_$ c #FFF35A", ":$ c #E5A62B", "<$ c #CA5E00", "[$ c #9B4700", "}$ c #8F4100", "|$ c #FFB712", "1$ c #FFF283", "2$ c #FFFF7F", "3$ c #FFFB70", "4$ c #FDC320", "5$ c #FBA700", "6$ c #FCBC19", "7$ c #F0C943", "8$ c #D6790E", "9$ c #D8770A", "0$ c #D26C05", "a$ c #CC6001", "b$ c #C95A00", "c$ c #C85800", "d$ c #C65600", "e$ c #C55400", "f$ c #C35100", "g$ c #C04E00", "h$ c #BD4B00", "i$ c #BA4800", "j$ c #FFB40C", "k$ c #FFEC69", "l$ c #FCC425", "m$ c #F8A300", "n$ c #FAB818", "o$ c #F4D64C", "p$ c #DB8716", "q$ c #D87B0C", "r$ c #F3BA2A", "s$ c #FCBE1E", "t$ c #F5AE15", "u$ c #F0A00E", "v$ c #E99108", "w$ c #DE7C04", "x$ c #C35000", "y$ c #C04B00", "z$ c #BC4800", "A$ c #F7A800", "B$ c #FEB106", "C$ c #FEE654", "D$ c #FFF963", "E$ c #FAC528", "F$ c #F59F00", "G$ c #F8B316", "H$ c #FFF55E", "I$ c #F8E556", "J$ c #E09620", "K$ c #D16600", "L$ c #D6770A", "M$ c #EEB62D", "N$ c #FFD939", "O$ c #FFCF2C", "P$ c #FDB813", "Q$ c #E28608", "R$ c #BE4A00", "S$ c #9D3C00", "T$ c #F6A600", "U$ c #FCAA02", "V$ c #FDDE42", "W$ c #FAC62A", "X$ c #F39A00", "Y$ c #F5AE14", "Z$ c #FFFF95", "`$ c #FEFCB2", " % c #FEEC54", ".% c #FBF05E", "+% c #E4A429", "@% c #D36A02", "#% c #D57107", "$% c #EAB12E", "%% c #FEE64B", "&% c #FEC421", "*% c #E89711", "=% c #C95B02", "-% c #C14D00", ";% c #A44100", ">% c #F2A200", ",% c #F9A500", "'% c #FCD034", ")% c #FFF158", "!% c #FAC72B", "~% c #F09701", "{% c #F2A812", "]% c #FDE44A", "^% c #F8D86D", "/% c #EFA214", "(% c #F0A60F", "_% c #FCEB54", ":% c #FCF663", "<% c #EAB535", "[% c #D56F03", "}% c #D46D03", "|% c #E8AC2E", "1% c #FCE954", "2% c #FFED54", "3% c #FFD534", "4% c #EEAA1E", "5% c #CE6706", "6% c #C24F00", "7% c #AF4600", "8% c #F4A300", "9% c #FBA802", "0% c #FBA903", "a% c #F6A100", "b% c #F9C124", "c% c #FBC426", "d% c #EE9502", "e% c #EF9F0E", "f% c #FDE851", "g% c #FAE46E", "h% c #F0AA1E", "i% c #ED9700", "j% c #EFA00A", "k% c #FCE853", "l% c #FEFD6A", "m% c #EEC23F", "n% c #D97A0A", "o% c #D46D02", "p% c #E3A129", "q% c #FBEE5D", "r% c #FFDB3C", "s% c #F4BE2C", "t% c #D3720C", "u% c #B54A00", "v% c #F4A100", "w% c #FAA904", "x% c #FAAA06", "y% c #F49C00", "z% c #F6B218", "A% c #FBC020", "B% c #EC9303", "C% c #EB9609", "D% c #FBE854", "E% c #FCEC68", "F% c #F2B325", "G% c #EE9C05", "H% c #EFC039", "I% c #DC8210", "J% c #D56C00", "K% c #E09626", "L% c #F8E662", "M% c #F7CD3A", "N% c #DA8516", "O% c #C55300", "P% c #BC4E00", "Q% c #823500", "R% c #F29F00", "S% c #FAAA07", "T% c #FAAD0B", "U% c #F19800", "V% c #F4A810", "W% c #FED334", "X% c #FCBA19", "Y% c #EB9103", "Z% c #E78C05", "`% c #F7D849", " & c #E88E00", ".& c #DC7800", "+& c #DE8A1E", "@& c #F4DA68", "#& c #FCE24B", "$& c #E09520", "%& c #C85A02", "&& c #F19D00", "*& c #F9AB09", "=& c #FFBF18", "-& c #FAB211", ";& c #EE9500", ">& c #F19F0A", ",& c #FDC826", "'& c #FDB510", ")& c #EA8E02", "!& c #EA9000", "~& c #EA9200", "{& c #DF7E00", "]& c #DC8218", "^& c #F1CF6B", "/& c #FFFF83", "(& c #FDF05B", "_& c #E5AA2E", ":& c #CB6005", "<& c #DE7E06", "[& c #DD7C05", "}& c #F09B00", "|& c #F8AB0B", "1& c #FBB818", "2& c #EC9202", "3& c #EB9002", "4& c #EE9A08", "5& c #F2A20C", "6& c #F7AB0E", "7& c #FCB20C", "8& c #FEAF06", "9& c #E98C00", "0& c #E18000", "a& c #E88C00", "b& c #EB9400", "c& c #E28200", "d& c #D97300", "e& c #DA7C0F", "f& c #EDC066", "g& c #FEFDA8", "h& c #FEFC69", "i& c #EBBF3F", "j& c #CF6B0A", "k& c #C75700", "l& c #DB7A07", "m& c #F7AC0F", "n& c #FFB910", "o& c #E08408", "p& c #EF9900", "q& c #F7AC0E", "r& c #FFC924", "s& c #FCC020", "t& c #F4AB14", "u& c #EE9C0B", "v& c #E88B02", "w& c #E58500", "x& c #E38300", "y& c #E58600", "z& c #E17F00", "A& c #DE7B00", "B& c #E48700", "C& c #DA7500", "D& c #DA7706", "E& c #EBB866", "F& c #FCF6B6", "G& c #FFF893", "H& c #FEEF83", "I& c #FEEE7A", "J& c #FEF475", "K& c #F0D053", "L& c #D47A14", "M& c #C95900", "N& c #D57206", "O& c #E0850B", "P& c #F6AC10", "Q& c #FBC325", "R& c #F4B21C", "S& c #EEA214", "T& c #E58D09", "U& c #DE7C01", "V& c #DD7900", "W& c #DB7600", "X& c #DA7400", "Y& c #D97200", "Z& c #DF8B28", "`& c #E5A44D", " * c #EAB562", ".* c #EDC26E", "+* c #F3C671", "@* c #F89649", "#* c #F96826", "$* c #FA7C3D", "%* c #FA8A4D", "&* c #F68446", "** c #EC6826", "=* c #E45A0C", "-* c #ED860F", ";* c #FEBD1C", ">* c #FFC31D", ",* c #FEBA1A", "'* c #EA750C", ")* c #E45510", "!* c #EE784C", "~* c #FA9A6C", "{* c #FCAF8A", "]* c #FCAC84", "^* c #FA9868", "/* c #F7622B", "(* c #F54000", "_* c #EC9500", ":* c #F5AC12", "<* c #FFD130", "[* c #FFD232", "}* c #FED030", "|* c #F7BE27", "1* c #EEBA5A", "2* c #ECB252", "3* c #E69310", "4* c #E2890C", "5* c #DC7D07", "6* c #D67204", "7* c #DA5F00", "8* c #F14704", "9* c #F99162", "0* c #FDDFC8", "a* c #FEE8D4", "b* c #FEECDB", "c* c #FEEDDD", "d* c #FEEAD7", "e* c #FDD8C0", "f* c #FBB287", "g* c #FA8F42", "h* c #FA901D", "i* c #FEB61E", "j* c #FA8D18", "k* c #F88845", "l* c #FCB78D", "m* c #FEE0CB", "n* c #FEEEDE", "o* c #FEECDC", "p* c #FEEDDC", "q* c #FEEEE0", "r* c #FEE8D6", "s* c #FAAA7E", "t* c #F4470B", "u* c #EA9300", "v* c #F5AC14", "w* c #FFD738", "x* c #FFE56B", "y* c #FFE883", "z* c #FEC228", "A* c #F34F06", "B* c #F99C69", "C* c #FED7B9", "D* c #FED3B5", "E* c #FED4B6", "F* c #FED5B6", "G* c #FED5B5", "H* c #FED4B5", "I* c #FED7BA", "J* c #FEDDC1", "K* c #FDCAA6", "L* c #F89660", "M* c #FCBD93", "N* c #FED8BB", "O* c #FED6B7", "P* c #FED6B8", "Q* c #FEDCC2", "R* c #FAAA7C", "S* c #EF3F04", "T* c #E99000", "U* c #F4AD16", "V* c #FFE45A", "W* c #FFE56F", "X* c #F78C1A", "Y* c #F26224", "Z* c #FEC8A0", "`* c #FEC297", " = c #FEC298", ".= c #FEC29A", "+= c #FEC299", "@= c #FEC39A", "#= c #FEC399", "$= c #FEC79F", "%= c #FEC49B", "&= c #FEC49A", "*= c #FEC59C", "== c #FEC49C", "-= c #FECAA3", ";= c #F36A37", ">= c #F3AD18", ",= c #FFE143", "'= c #FFE656", ")= c #FFE772", "!= c #FED436", "~= c #EE540A", "{= c #F88C53", "]= c #FEB27F", "^= c #FEB07C", "/= c #FEB27E", "(= c #FEB17F", "_= c #FEB07E", ":= c #FEB37F", "<= c #FEB380", "[= c #FEB280", "}= c #FEB381", "|= c #FEB481", "1= c #FEB482", "2= c #FA9C67", "3= c #E93502", "4= c #E68C00", "5= c #F2AC1C", "6= c #FFE347", "7= c #FFE548", "8= c #FFE95B", "9= c #FFEA76", "0= c #FDCC37", "a= c #E84308", "b= c #FB9458", "c= c #FE9F64", "d= c #FE9F63", "e= c #FEA065", "f= c #FE9F65", "g= c #FEA064", "h= c #FEA066", "i= c #FEA067", "j= c #FEA167", "k= c #FEA168", "l= c #FEA56B", "m= c #FEA368", "n= c #FDA369", "o= c #FDA065", "p= c #E8430A", "q= c #E58A00", "r= c #EFA118", "s= c #FFDD52", "t= c #FFE74D", "u= c #FFEE60", "v= c #FFEC79", "w= c #FABF36", "x= c #E7410A", "y= c #FD8C49", "z= c #FE8C49", "A= c #FE8B48", "B= c #FE8D49", "C= c #FE8C4A", "D= c #FE8D4A", "E= c #FE8D4C", "F= c #FE8D4B", "G= c #FE8E4C", "H= c #FE8F4C", "I= c #F97837", "J= c #F2541A", "K= c #ED430B", "L= c #ED420D", "M= c #F36227", "N= c #E94B12", "O= c #DB8300", "P= c #E78900", "Q= c #F0A924", "R= c #FEDD56", "S= c #FFEB53", "T= c #FFF166", "U= c #FFEF7D", "V= c #F8BC38", "W= c #E64007", "X= c #FE7A31", "Y= c #FE7830", "Z= c #FE7930", "`= c #FE7A30", " - c #FE7931", ".- c #FE7A32", "+- c #FE7B33", "@- c #FD7931", "#- c #F14D12", "$- c #EC3500", "%- c #EB3500", "&- c #EA3500", "*- c #E93400", "=- c #E93602", "-- c #E54208", ";- c #CA7700", ">- c #E48500", ",- c #ECA01E", "'- c #FEDC58", ")- c #FFEF5A", "!- c #FFF35C", "~- c #FFF66A", "{- c #FFF280", "]- c #F8C63F", "^- c #E23D05", "/- c #FD6619", "(- c #FE6518", "_- c #FE6418", ":- c #FE6618", "<- c #FE661A", "[- c #FE6619", "}- c #FE671A", "|- c #FE681B", "1- c #FE661B", "2- c #FE681C", "3- c #FC6319", "4- c #F04306", "5- c #EC3700", "6- c #EB3600", "7- c #E83400", "8- c #E83501", "9- c #E13A03", "0- c #E89516", "a- c #FCDA58", "b- c #FFF060", "c- c #FFF660", "d- c #FFF970", "e- c #FFF483", "f- c #FBD84A", "g- c #DE3E06", "h- c #FA4E04", "i- c #FE5004", "j- c #FE5104", "k- c #FE5105", "l- c #FE5204", "m- c #FE5206", "n- c #FE5305", "o- c #F94E05", "p- c #EE3B02", "q- c #EC3600", "r- c #EA3600", "s- c #E73300", "t- c #E63300", "u- c #E73200", "v- c #DC3300", "w- c #DD7B00", "x- c #E38A0F", "y- c #FBD857", "z- c #FFF264", "A- c #FFFD75", "B- c #FFF787", "C- c #FEEF58", "D- c #DF5D16", "E- c #F24200", "F- c #FC4800", "G- c #FB4800", "H- c #FC4900", "I- c #FB4700", "J- c #F44000", "K- c #ED3800", "L- c #E63200", "M- c #E53100", "N- c #E43200", "O- c #D52E00", "P- c #D97600", "Q- c #DE8009", "R- c #F9CF51", "S- c #FFF066", "T- c #FFFA8A", "U- c #EA9A33", "V- c #E03400", "W- c #F94600", "X- c #F84400", "Y- c #F84600", "Z- c #F94700", "`- c #F84700", " ; c #F84500", ".; c #ED3900", "+; c #EC3800", "@; c #E53000", "#; c #E43000", "$; c #DC2F00", "%; c #D67100", "&; c #DA7705", "*; c #F6C44D", "=; c #FFEA6A", "-; c #FFFE76", ";; c #FFFC8E", ">; c #F7D752", ",; c #D33405", "'; c #F04000", "); c #F74200", "!; c #F64200", "~; c #F54100", "{; c #F44100", "]; c #F44200", "^; c #F23E00", "/; c #F03C00", "(; c #EE3A00", "_; c #E83300", ":; c #E63100", "<; c #E32F00", "[; c #E22E00", "}; c #D12900", "|; c #D06C00", "1; c #D66F02", "2; c #F1B746", "3; c #FFE46E", "4; c #FFFD80", "5; c #E38A30", "6; c #DB3200", "7; c #F64100", "8; c #F33F00", "9; c #F23D00", "0; c #F13C00", "a; c #F03B00", "b; c #EF3A00", "c; c #EE3900", "d; c #E22D00", "e; c #D62B00", "f; c #C96600", "g; c #EBA73C", "h; c #FFDE70", "i; c #FAEC65", "j; c #CF4310", "k; c #E83A00", "l; c #EF3B00", "m; c #E12C00", "n; c #DC2B00", "o; c #C82400", "p; c #C26000", "q; c #D06500", "r; c #E49530", "s; c #FFD873", "t; c #FFF792", "u; c #EEBD54", "v; c #CB2C04", "w; c #EE3D00", "x; c #E02C00", "y; c #C82300", "z; c #BC5A00", "A; c #CD6100", "B; c #DE8627", "C; c #FED173", "D; c #FFF299", "E; c #FFF176", "F; c #FFD962", "G; c #DE752C", "H; c #CE2800", "I; c #F13E00", "J; c #E53200", "K; c #CA2300", "L; c #B35300", "M; c #CB5C00", "N; c #D7781D", "O; c #FCC972", "P; c #FFDA6A", "Q; c #FFCE5E", "R; c #E69B3B", "S; c #C4540C", "T; c #BC2A00", "U; c #D02800", "V; c #DF2B00", "W; c #CA2200", "X; c #BB1C00", "Y; c #A84B00", "Z; c #D16C17", "`; c #FABF6F", " > c #FFE39E", ".> c #FFF390", "+> c #FFD771", "@> c #FFCA63", "#> c #ECA546", "$> c #C85E12", "%> c #BB4400", "&> c #AE3F00", "*> c #742600", "=> c #A41500", "-> c #CD2600", ";> c #DE2A00", ">> c #C72000", ",> c #B51800", "'> c #CB6110", ")> c #F6B46B", "!> c #FFDA9B", "~> c #FFD887", "{> c #FFC767", "]> c #F2AD51", "^> c #CC6619", "/> c #B44100", "(> c #7D2E00", "_> c #AA1500", ":> c #C52000", "<> c #E93600", "[> c #EA3400", "}> c #E93300", "|> c #C11D00", "1> c #C04F00", "2> c #C6570A", "3> c #F0A865", "4> c #F6B364", "5> c #D27023", "6> c #BC4500", "7> c #B74200", "8> c #8C3300", "9> c #AF1300", "0> c #BA1A00", "a> c #E23100", "b> c #E02B00", "c> c #DA2700", "d> c #B91900", "e> c #BC4900", "f> c #C04D04", "g> c #BE4902", "h> c #BA4400", "i> c #983700", "j> c #B01300", "k> c #D32800", "l> c #CE2100", "m> c #AF1200", "n> c #B44300", "o> c #A43D00", "p> c #A70E00", "q> c #BE1B00", "r> c #DE2D00", "s> c #DA2800", "t> c #BA1700", "u> c #A60D00", "v> c #A20900", "w> c #A80E00", "x> c #C92000", "y> c #CA1F00", "z> c #A90C00", "A> c #9E0600", "B> c #9D0500", " ", " ", " . + + ", " @ + # $ % & * = ", " - ; > , ' ) + * ! ~ { ", " - + ] ^ / ( _ : < [ } | 1 2 3 4 ", " 5 + 6 7 8 9 0 ( a b c ; d } e f g h i j k ", " l + m n o p q r s t u v w x l } y z A B 8 r C D E F ", " . + G H f I J K L M N O P Q R S T U } V W X Y Z ` 0 t ...+.@. ", " #.+ $.%.&.*.=.-.;.>.` ,.'.' ).!.~.{.].^./.} (._.:.I <.q ,.[.a Q }.|.1.2. ", " - 3.4.5.6._.z 7.g <.8.9./ [._ : 0.}.a.b.c.} d.e.f.7.o >.9.s ' g.R h.i.j.k.l. ", " - + m.n.o.p.q.r.s.t.Y h 8 9./ ( a g.u.{.v.w.x.y.z.A.B.g h L C.D.P E.F.G.H.I.J.K.L. ", " 5 + M.N.O.P.Q.R.e.S.T.A o p q r s t u Q U.V.W.X.Y.Z.`. +.+B 8 r '._ ++@+a.#+$+%+&+*+=+-+ ", " + ;+>+,+'+)+!+~+{+]+W B.I J K L M N O %+^+/+(+_+:+c <+[+}+|+1+` / t ).u.2+3+4+5+6+7+8+9+0+a+ ", " + b+c+d+e+f+g+h+i+j+*.=.-.B >.` ,.k+l+m+n+o+p+q+r+H.s+t+u+v+w+x+[.a Q }.y+z+A+q+B+C+D+E+F+G+H+ ", " [ I+J+K+L+M+N+O+6._.z 7.g <.8.P+Q++ R+S+T+7+6+U+V+W+X+l+Y+Z+`+ @.@g.R {.i.V+:++@@@#@$@%@&@*@=@-@;@ ", " + >@,@'@)@o.!@q.r.s.t.~@{@]@; T ^@/@(@_@&+:@A+z+G.<@[@}@|@1@2@3@4@F.G.H.I.5@6@7@8@9@0@a@b@c@d@e@f@ ", " g@h@i@O.P.Q.R.e.S.T.j@k@l@m@n@o@E+p@7@q@5@r@4+3+2+|@s@t@u@&@o@v@w@x@y@c %+&+_@z@A@B@C@|@Y+D@E@F@G@H@ ", " + I@)+!+~+{+]+J@K@L@+ M@N@O@P@Q@8+7+R@:+c #+a.~.S@T@o@U@B@V@9@W@X@Y@Z@6+7+8+`@P@o@s@[@ #.#+#@###$#%# ", " .*#g+h+i+=#-#+ # X+s@;#%@A@z@>#p+q+r+H.,#F.u.U@'#%@P@E+$@`@8@)#!#~#{#>#D+E+U@S@]#^#t+<+/#(#_#:# ", " + + @ <# l [#N+}#|#+ 1#2#Y+]#u@U@3#8@T+7+6+U+V+W+a.@+++P@E+A@4#8@z@#@T+5#6#7#8#9#$@%@;#0#a#b#c#d#e#_#f# ", " g#+ h#i#+ + j#g@k#+ l#+ ; /#s+l+[@s@o@V@$@(@_@&+:@A+z+G.m#E.n#$@8@D+#@T+5#_@7+q@p+o#p#q#r#0@a@b@l+s#t#u#_#v# ", " w#+ x#y#z#A#B#C#+ + D#d#E#b#F#|@C@'#E+p@7@q@5@r@4+3+2+w g.( (@T+5#_@7+G#p+H#6+q+b.I#J#K#L#|@Y+D@c#M#_#N# ", " O#+ P#Q#e+R#S#T#U#m@d#t+V#}@a@O@P@Q@8+7+R@:+c #+a.~.Q _ ,._@W#G#B+H#6+q+%+:+I.A+V+X#Y#Z#`#l+.# $_#N# ", " .$+$@$~+6.S.#$$$m@c#%$s@;#%@A@z@>#p+q+r+H.G.F.u.: N 8 B+H#6+&$:@:+r@A+V+4+H.#+i.*$=$-$;$>$,$'$ ", " l )$!$~$=.Y {$]$m+^$u@U@3#8@T+7+6+U+V+W+a.@+++O 9.J 5@q+:+r@A+c /$H.($i.,#_$a.2+m#:$_#,$<$[$}$ ", " . |$1$g Z 2$3$4$5$6$V@$@(@_@&+:@A+z+G.m#E.n#/ Z 7.r@A+c V+H.($i.,#_$a.2+m#~.R 7$8$,$9$0$a$b$c$d$e$f$g$h$i$ ", " [ j$k$` 0 O Q l$m$n$p@7@q@5@r@4+3+2+w g.( L g S.V+H.($W+,#_$a.2+F.}.R u.o$p$_#q$r$P@o@0#s$t$u$v$w$x$y$z$ ", " A$B$C$t : D$h.E$F$G$_@R@:+c #+a.~.Q _ ,.h T.6.W+3+G.a.H$F.}.R u.Q I$J$K$L$M$C+N$9@O$s@a#b#P$Q$e$R$S$ ", " T$U$V$u.H$i.c W$X$Y$Y.r+H.G.F.u.: N 8 Z$_.`$ %{.F.}.@+u.E.++.%+%@%#%$%%%H#_@D+E+U@a@&%*%=%-%;% ", " >%* ,%'%)%V+:+H#!%~%{%]%W+a.@+++O 9.J z ^%/%(%_%u.E.Q g.:%<%[%}%|%1%2%U+R@@@(@3%U@4%5%6%7% ", " 8%9%0%a%b%U+R@_@z@c%d%e%f%m#E.n#/ Z g%h%i%i%i%j%k%).l%m%n%o%p%q%}._$H.r@6+7+r%s%t%f$u% ", " v%w%/#x%y%z%_@(@A@B@A%B%C%D%g.( E%F%i%i%i%i%i%i%G%H%I%J%K%L%' b @+a.($r+5@M%N%O%P%Q% ", " R%S%<+2#T%U%V%W%%@T@|@X%Y%Z%`%s%i%i%i%i%i%i%i% &.&Z#+&@&L / t g.R a.#+#&$&%&O%f$ ", " &&*&=&=&=&-&;&>&,&|@Y+=&'&)&X@!&i%i%i%i%i%~&{&-@]&^&A ;./&,.D.).u.(&_&:&c$<&[&6% ", " }&|&Y+Y+Y+Y+1&2&3&4&5&6&7&8&9&0&a&i%i%b&c&d&e&f&g&f.t.J 8 M ( h&i&j&k&l&m&n&o&-% ", " p&q&|@|@|@r&r&s&t&u&v&w&x&y&3@z&A&B&B&C&D&E&F&~+6.S.G&H&I&J&K&L&M&N&t&s#s+.#O&y$ ", " i%P&T@T@T@T@T@;#;#o@o@Q&R&S&T&U&V&W&X&Y&Z&`& *.*+*@*#*$*%*&***=*-*;*>*l+l+,*'*)*!*~*{*]*^*/*(* ", " _*:*<*<*%@%@%@%@%@[*P@P@P@P@9@}*|*1*2*3*4*5*6*7*8*9*0*a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*o*p*q*r*s*t* ", " u*v*$@$@$@$@$@4#4#`@w*8@8@8@8@8@8@x*y*U@U@O@z*A*B*C*D*E*F*G*H*F*I*J*K*L*M*I*N*F*O*O*P*O*O*P*Q*R*S* ", " T*U*#@#@r%r%r%r%8+8+T+7@7@7@5#5#5#V*W*E+3#9@X*Y*Z*`* =.=.=+=+=@=@=+=#=$=%=&=&=@=%=%=%=&=%=*===-=;= ", " &>=@@W#W#7+7+7+7+7+7+,=q@q@q@B+B+'=)=8@8@!=~={=]=^=/=(=_=/=/=:=]=]=]=]=<=[=[=[=<=}=<=[=<=}=|=1=2=3= ", " 4=5=6=R@6+6+6+6+7=7=7=5@q+q+q+q+q+8=9=5#7@0=a=b=c=d=c=e=f=g=c=g=e=g=e=h=h=i=e=e=h=j=j=h=k=l=m=n=o=p= ", " q=r=s=t=U+r@r@r@r@I.I.I.r+A+A+A+A+u=v=q@,=w=x=y=z=A=B=C=D=z=C=D=E=C=C=F=E=G=F=F=E=G=G=H=I=J=K=L=M=N= ", " O=P=Q=R=S=2%H.H.H.H.H.H.H.z+($($($T=U=5@7=V=W=X=Y=Y=Z=`= -Z=Z=X=X=.-X=.-.-.-.- -.-+-@-#-$-%-&-*-=--- ", " ;->-,-'-)-G.G.G.G.G._$_$_$!-a.a.~-{-I.r@]-^-/-(-_-:-<-<-:-[-<-<-<-<-}-|-1-<-<-2-3-4-5-6-&-*-7-8-9- ", " 0&0-a-b-c-m#m#m#m#}.}.~.@+@+d-e-H.2%f-g-h-i-i-i-j-i-i-i-k-j-l-j-j-k-m-k-n-o-p-q-r-&-*-s-t-u-v- ", " w-x-y-z-!.Q Q Q Q Q Q v b A-B-,#3+C-D-E-F-G-G-F-G-G-G-G-G-F-F-F-F-H-I-J-K-q-r-&-7-s-L-M-N-O- ", " P-Q-R-S-a _ _ _ ' ' ' ' r T-2+2+H$U-V-W-X-X-Y-Y-Y-Z-Y-Y-`-Z-Y- ;J-.;+;6-r-*-7-s-L-@;#;$; ", " %;&;*;=;-;0 / / / C.C.8.;;u.u.w >;,;';);!;!;~;{;{;];{;J-^;/;(;K-+;q-&-7-_;t-:;#;<;[;}; ", " |;1;2;3;4;/&/&8 8 8.o ~@).: g.v 5;6;!;7;~;J-8;^;9;0;a;b;c;.;+;6-&-*-_;t-:;#;<;d;e; ", " f;-$g;h;T-o Y Y ~@X A ( D.t O i;j;k;(*J-^;^;9;/;l;b;(;K-5-r-&-*-_;L-M-#;[;m;n;o; ", " p;q;r;s;t;T.:.:.~$T.r ,.,.C./ u;v;w;8;^;0;/;b;(;c;K-6-&-*-7-s-L-#;<;[;x;x;y; ", " z;A;B;C;D;]+e.{+S.>.8.8 8 E;F;G;H;I;0;/;l;(;K-K-6-&-*-7-s-J;#;<;d;x;x;K; ", " L;M;N;O;N.~+N+e.~@Y 1$P;Q;R;S;T;U;/;l;(;c;+;6-&-*-_;t-J;@;<;d;x;V;W;X; ", " Y;c$Z;`; >O.R..>+>@>#>$>%>&>*>=>->c;.;5-&-&-7-_;L-M-#;<;m;x;;>>>,> ", " e$'>)>!>~>{>]>^>%>/>(> _>:><>6-[>}>s-J;@;#;[;x;x;;>|> ", " 1>2>3>4>5>6>7>8> 9>0>a>&-s-L-#;<;d;x;b>c>d> ", " e>f>g>h>i> j>k>u-#;<;m;x;b>l>m> ", " n>o> p>q>r>[;m;s>t>u> ", " v>w>x>y>z> ", " A>B> ", " ", " "}; unixODBC-2.2.14-p2/odbcinstQ4/Set.xpm0100644000076400007640000000541310723077725015505 0ustar nicknick/* XPM */ static const char *xpmSet[] = { /* columns rows colors chars-per-pixel */ "16 16 119 2", " c #00510000", ". c #00520000", "X c #00530000", "o c #00540000", "O c #00550000", "+ c #00560000", "@ c #00570000", "# c #00580000", "$ c #00590000", "% c #005A0000", "& c #005B0000", "* c #015B0100", "= c #005C0000", "- c #005D0000", "; c #005F0000", ": c #00600000", "> c #00610000", ", c #00620000", "< c #00630000", "1 c DarkGreen", "2 c #006E0000", "3 c #08660800", "4 c #0B6F0B00", "5 c #00740000", "6 c #06720600", "7 c #017B0100", "8 c #007D0000", "9 c #0C770C00", "0 c #0A790A00", "q c #097E0900", "w c #127F1200", "e c #018C0100", "r c #09850900", "t c #0C8B0C00", "y c #0B950B00", "u c #10831000", "i c #14821400", "p c #188D1800", "a c #1C8F1C00", "s c #07A30700", "d c #00AC0000", "f c #00AD0000", "g c #00AE0000", "h c #00B10000", "j c #00B70000", "k c #00B90000", "l c #00BA0000", "z c #00BE0000", "x c #00BF0000", "c c #13A11300", "v c #24932400", "b c #23A12300", "n c #22A92200", "m c #2BA42B00", "M c #2FA12F00", "N c #2EA42E00", "B c #22B52200", "V c #00C00000", "C c #00C10000", "Z c #00C40000", "A c #00C70000", "S c #00C80000", "D c #00C90000", "F c #00CB0000", "G c #00CE0000", "H c #04CB0400", "J c #0BC70B00", "K c #0ACC0A00", "L c #0ACD0A00", "P c #09D10900", "I c #0DD30D00", "U c #0ED40E00", "Y c #13C11300", "T c #1FCE1F00", "R c #2DC92D00", "E c #2EC92E00", "W c #24DC2400", "Q c #30CD3000", "! c #38CC3800", "~ c #3ACC3A00", "^ c #36D83600", "/ c #43D34300", "( c #42D74200", ") c #47D44700", "_ c #48D54800", "` c #54D95400", "' c #5DD65D00", "] c #6FC76F00", "[ c #6CD06C00", "{ c #75C27500", "} c #77C37700", "| c #77C47700", " . c #79C47900", ".. c #7FE17F00", "X. c #8FD98F00", "o. c #92DB9200", "O. c #9EDF9E00", "+. c #82E68200", "@. c #8BE48B00", "#. c #8CE58C00", "$. c #8EE58E00", "%. c #8EE68E00", "&. c #96E49600", "*. c #AAE3AA00", "=. c #BFEFBF00", "-. c #C2F0C200", ";. c #C3F0C300", ":. c #C0FAC000", ">. c #CBF7CB00", ",. c #CFF9CF00", "<. c #D4F7D400", "1. c #D2FAD200", "2. c #D3FAD300", "3. c #F0FEF000", "4. c #F2FCF200", "5. c #F9FEF900", "6. c #FCFEFC00", "7. c #FEFEFE00", "8. c None", /* pixels */ "8.8.8.8.8.8.$ 3 $ 8.8.8.8.8.8.8.", "8.8.8.8.8.o a m = 8.8.8.8.8.8.8.", "8.8.8.8.X u ^ n $ 8.8.8.8.8.8.8.", "8.8.8.o q T W c o 8.8.8.8.8.8.8.", "8.8.o 7 J U I s > > > > > > > $ ", "8.o 5 x G S G x d d d d d d h 8 ", "o 2 j S V V V A S S H L L L P e ", "1 d V k k k k k Y Q / ) ) _ ( t ", "> B ` ~ R R ! ' ..%.%.@.@.%.+.p ", "o 4 [ >.;.=.;.<.1.,.,.,.,.1.=.v ", "8.X 6 o.7.7.3.o.{ | | | | .] i ", "8.8.X 9 &.7.3.v $ = = = = = > 1 ", "8.8.8.X 0 *.5.N o 8.8.8.8.8.8.8.", "8.8.8.8.X w &.N o 8.8.8.8.8.8.8.", "8.8.8.8.8.X r y = 8.8.8.8.8.8.8.", "8.8.8.8.8.8.$ 1 = 8.8.8.8.8.8.8." }; unixODBC-2.2.14-p2/odbcinstQ4/Stats48.xpm0100644000076400007640000003221410723566554016226 0ustar nicknick/* XPM */ static const char * xpmStats48[] = { "48 48 537 2", " c None", ". c #8E8E8E", "+ c #858585", "@ c #A3A3A3", "# c #BABABA", "$ c #C4C4C4", "% c #AFAFAF", "& c #ACACAC", "* c #9B9B9B", "= c #8C8C8C", "- c #A7A7A7", "; c #C2C2C2", "> c #DADADA", ", c #E5E5E5", "' c #E6E6E6", ") c #E3E3E3", "! c #E1E1E1", "~ c #D2D2D2", "{ c #9F9F9F", "] c #8D8D8D", "^ c #AAAAAA", "/ c #C8C8C8", "( c #DDDDDD", "_ c #E7E7E7", ": c #DEDEDE", "< c #D9D9D9", "[ c #D3D3D3", "} c #CDCDCD", "| c #A0A0A0", "1 c #959595", "2 c #B2B2B2", "3 c #CFCFCF", "4 c #DFDFDF", "5 c #D8D8D8", "6 c #CACACA", "7 c #CCCCCC", "8 c #D7D7D7", "9 c #9D9D9D", "0 c #B6B6B6", "a c #E2E2E2", "b c #E8E8E8", "c c #DBDBDB", "d c #D1D1D1", "e c #CBCBCB", "f c #D0D0D0", "g c #C4C5C5", "h c #3F3F3F", "i c #717171", "j c #A4A4A4", "k c #909090", "l c #C3C3C3", "m c #ECECEC", "n c #EDEDED", "o c #E9E9E9", "p c #D4D4D4", "q c #C9C9C9", "r c #C2C3C2", "s c #B8B8B8", "t c #ADADAD", "u c #9AA19B", "v c #8B9A8E", "w c #BBC3BC", "x c #DBDCDB", "y c #797979", "z c #999999", "A c #B0B0B0", "B c #F0F0F0", "C c #F1F1F1", "D c #D5D5D5", "E c #CECECE", "F c #B7B7B7", "G c #9CA19C", "H c #859587", "I c #6B8870", "J c #517C59", "K c #3D7447", "L c #478051", "M c #AAC3AE", "N c #DEE0DE", "O c #DCDCDC", "P c #A8A8A8", "Q c #EAEAEA", "R c #F2F2F2", "S c #F3F3F3", "T c #EEEEEE", "U c #D6D6D6", "V c #9BA19C", "W c #819284", "X c #68856D", "Y c #527C59", "Z c #43794C", "` c #357740", " . c #277334", ".. c #176F26", "+. c #0E6C1E", "@. c #2D7E3B", "#. c #A6C6AB", "$. c #DFE2E0", "%. c #7E7E7E", "&. c #F4F4F4", "*. c #9BA09C", "=. c #839385", "-. c #68866D", ";. c #4E7956", ">. c #397043", ",. c #2C6E37", "'. c #226F2F", "). c #1B732A", "!. c #157426", "~. c #137323", "{. c #117121", "]. c #0F6F1F", "^. c #0D6D1E", "/. c #2D7F3B", "(. c #A6C7AB", "_. c #DFE3E0", ":. c #767676", "<. c #EBEBEB", "[. c #E0E0E0", "}. c #C0C0C0", "|. c #B5B5B5", "1. c #9A9F9B", "2. c #839285", "3. c #4D7954", "4. c #2B6D36", "5. c #1D692A", "6. c #10661E", "7. c #076417", "8. c #0A6A1A", "9. c #117222", "0. c #147624", "a. c #137524", "b. c #127422", "c. c #117221", "d. c #0F701F", "e. c #0E6E1E", "f. c #2E7F3B", "g. c #E0E3E0", "h. c #C7C7C7", "i. c #BFBFBF", "j. c #9C9F9C", "k. c #869388", "l. c #69856E", "m. c #4E7855", "n. c #3A7044", "o. c #2C6C36", "p. c #1E682A", "q. c #10641E", "r. c #086217", "s. c #056214", "t. c #036213", "u. c #036413", "v. c #076A17", "w. c #107320", "x. c #147825", "y. c #147725", "z. c #137624", "A. c #127423", "B. c #0F7020", "C. c #2E803B", "D. c #6B6B6B", "E. c #859287", "F. c #6C8670", "G. c #527959", "H. c #3E7146", "I. c #2F6C39", "J. c #1F672C", "K. c #11631F", "L. c #096118", "M. c #056015", "N. c #046113", "O. c #026012", "P. c #016111", "Q. c #026312", "R. c #076917", "S. c #107420", "T. c #167A27", "U. c #157826", "V. c #147625", "W. c #137523", "X. c #117322", "Y. c #107120", "Z. c #0E6F1F", "`. c #696969", " + c #E4E4E4", ".+ c #788A7C", "++ c #45724C", "@+ c #2F6B39", "#+ c #21672E", "$+ c #146222", "%+ c #0A6019", "&+ c #065F16", "*+ c #045F14", "=+ c #1D7F2D", "-+ c #157726", ";+ c #026113", ">+ c #016011", ",+ c #056716", "'+ c #0F7320", ")+ c #177C28", "!+ c #187C29", "~+ c #177B28", "{+ c #157926", "]+ c #127322", "^+ c #2E813C", "/+ c #A6C7AC", "(+ c #E0E3E1", "_+ c #686868", ":+ c #B1B2B1", "<+ c #5D7D62", "[+ c #186324", "}+ c #075E15", "|+ c #045E14", "1+ c #035D12", "2+ c #015E11", "3+ c #066516", "4+ c #42AA54", "5+ c #3BA44E", "6+ c #0E701F", "7+ c #046514", "8+ c #0C701D", "9+ c #197E2A", "0+ c #187D29", "a+ c #167926", "b+ c #E1E4E1", "c+ c #676767", "d+ c #B1B1B1", "e+ c #587C5E", "f+ c #11611E", "g+ c #025D11", "h+ c #015D11", "i+ c #1D7F2E", "j+ c #5FCD72", "k+ c #5BC86E", "l+ c #1F8330", "m+ c #026212", "n+ c #0A6D1A", "o+ c #157B26", "p+ c #1A802B", "q+ c #197F2B", "r+ c #666666", "s+ c #046114", "t+ c #3CA44E", "u+ c #76E889", "v+ c #74E587", "w+ c #309742", "x+ c #036313", "y+ c #016211", "z+ c #056816", "A+ c #117622", "B+ c #1A812C", "C+ c #197F2A", "D+ c #177B27", "E+ c #167A26", "F+ c #238835", "G+ c #329944", "H+ c #248835", "I+ c #646464", "J+ c #127323", "K+ c #56C369", "L+ c #7BEE8E", "M+ c #7FF292", "N+ c #41AC53", "O+ c #086918", "P+ c #1B822C", "Q+ c #1D832E", "R+ c #278E38", "S+ c #359E47", "T+ c #44AF57", "U+ c #53BF65", "V+ c #60CE72", "W+ c #6BDB7E", "X+ c #45AF57", "Y+ c #157626", "Z+ c #11611F", "`+ c #025D12", " @ c #015F11", ".@ c #2F9440", "+@ c #68D87B", "@@ c #5DCB70", "#@ c #6CDD80", "$@ c #54C066", "%@ c #066917", "&@ c #137824", "*@ c #1C832E", "=@ c #258D36", "-@ c #3CA64E", ";@ c #53C166", ">@ c #60CF73", ",@ c #6DDD80", "'@ c #72E486", ")@ c #61CF74", "!@ c #51BD64", "~@ c #319742", "{@ c #147524", "]@ c #2E803C", "^@ c #626262", "/@ c #0B6B1C", "(@ c #4EB961", "_@ c #66D579", ":@ c #329943", "<@ c #4FBB62", "[@ c #64D478", "}@ c #2A923C", "|@ c #0D711E", "1@ c #187F2A", "2@ c #208732", "3@ c #40AC53", "4@ c #6DDF80", "5@ c #73E587", "6@ c #63D276", "7@ c #54C167", "8@ c #369D47", "9@ c #268C38", "0@ c #177928", "a@ c #E1E5E2", "b@ c #616161", "c@ c #B2B3B2", "d@ c #11621F", "e@ c #035F13", "f@ c #036113", "g@ c #046315", "h@ c #258A36", "i@ c #65D478", "j@ c #4DB960", "k@ c #177A27", "l@ c #39A24B", "m@ c #6DDE80", "n@ c #42AC54", "o@ c #157A26", "p@ c #319A43", "q@ c #5FCF73", "r@ c #6EDF81", "s@ c #47B259", "t@ c #2B923C", "u@ c #1C802D", "v@ c #107020", "w@ c #A7C7AC", "x@ c #E2E5E2", "y@ c #606060", "z@ c #186A25", "A@ c #177727", "B@ c #268936", "C@ c #339A45", "D@ c #55C268", "E@ c #6ADA7D", "F@ c #339A44", "G@ c #238934", "H@ c #65D578", "I@ c #58C56A", "J@ c #228934", "K@ c #258B36", "L@ c #4EBB60", "M@ c #6FE082", "N@ c #4CB95F", "O@ c #1E832F", "P@ c #106F20", "Q@ c #0D6C1D", "R@ c #2D7E3A", "S@ c #B3B3B3", "T@ c #587D5E", "U@ c #318840", "V@ c #4BB45D", "W@ c #64D376", "X@ c #46B158", "Y@ c #197C29", "Z@ c #0D6F1E", "`@ c #52C065", " # c #36A049", ".# c #3CA74E", "+# c #60CF72", "@# c #2B923D", "## c #0E6D1E", "$# c #0C6C1D", "%# c #2C7E3A", "&# c #E2E5E3", "*# c #3B944A", "=# c #51BC64", "-# c #4BB65D", ";# c #3BA44D", "># c #298F3A", ",# c #056515", "'# c #3FA950", ")# c #71E183", "!# c #55C368", "~# c #5CCA6F", "{# c #6EDE81", "]# c #3EA850", "^# c #177A28", "/# c #107121", "(# c #0F6F20", "_# c #0C6B1C", ":# c #2C7D3A", "<# c #1C712B", "[# c #076718", "}# c #016012", "|# c #2C933D", "1# c #6BDC7E", "2# c #78EB8B", "3# c #6EDF82", "4# c #51BE64", "5# c #218532", "6# c #0B6A1B", "7# c #2B7C39", "8# c #A5C6AB", "9# c #025F12", "0# c #016311", "a# c #1D822E", "b# c #85F999", "c# c #64D377", "d# c #2F9540", "e# c #0C6A1C", "f# c #0B691B", "g# c #2E7D3B", "h# c #A7C6AD", "i# c #E2E6E3", "j# c #B3B4B3", "k# c #026412", "l# c #107321", "m# c #4DB85F", "n# c #6FE083", "o# c #40A951", "p# c #177927", "q# c #0F6E1F", "r# c #116E21", "s# c #136E23", "t# c #167025", "u# c #1E742D", "v# c #498E55", "w# c #B5CFB9", "x# c #E4E7E5", "y# c #046614", "z# c #0D6F1D", "A# c #359D46", "B# c #42AC53", "C# c #218632", "D# c #127122", "E# c #157224", "F# c #187327", "G# c #1F772E", "H# c #328240", "I# c #4B9057", "J# c #649F6E", "K# c #7FAF87", "L# c #A4C5AA", "M# c #D7E2D9", "N# c #E6E7E6", "O# c #11641F", "P# c #056715", "Q# c #1B7E2C", "R# c #1A7D2A", "S# c #127222", "T# c #147323", "U# c #157325", "V# c #177427", "W# c #20792F", "X# c #338441", "Y# c #4D9359", "Z# c #67A271", "`# c #82B28A", " $ c #9DC2A3", ".$ c #B9D1BD", "+$ c #D5E1D7", "@$ c #EAEDEA", "#$ c #B4B4B4", "$$ c #066817", "%$ c #137223", "&$ c #217B30", "*$ c #398847", "=$ c #52975E", "-$ c #6AA574", ";$ c #85B58D", ">$ c #A0C4A6", ",$ c #BBD2BF", "'$ c #E8EBE8", ")$ c #587E5E", "!$ c #147125", "~$ c #358542", "{$ c #549860", "]$ c #74AB7D", "^$ c #91BC98", "/$ c #ABCBB1", "($ c #C1D7C5", "_$ c #E7EAE7", ":$ c #939393", "<$ c #B4B5B4", "[$ c #026112", "}$ c #0F6B1E", "|$ c #2B7D38", "1$ c #4B9056", "2$ c #6CA576", "3$ c #8DB994", "4$ c #AACAB0", "5$ c #C4D8C8", "6$ c #DDE5DF", "7$ c #EBECEB", "8$ c #A6A6A6", "9$ c #898989", "0$ c #969696", "a$ c #A9A9A9", "b$ c #597E5F", "c$ c #1D6C2B", "d$ c #2C7B39", "e$ c #4C9058", "f$ c #6EA577", "g$ c #8CB793", "h$ c #BFD4C2", "i$ c #D8E1DA", "j$ c #E6E8E6", "k$ c #E7E8E8", "l$ c #E4E5E5", "m$ c #C1C1C1", "n$ c #8A8A8A", "o$ c #A0B1A3", "p$ c #99BB9E", "q$ c #A8C7AD", "r$ c #BED3C1", "s$ c #D5DFD6", "t$ c #E2E4E3", "u$ c #E1E2E1", "v$ c #A1A1A1", "w$ c #888888", "x$ c #D7D9D8", "y$ c #E1E3E1", "z$ c #E0E2E0", "A$ c #DFE0DF", "B$ c #DDDEDD", "C$ c #BEBEBE", "D$ c #838383", "E$ c #808080", "F$ c #B9B9B9", "G$ c #9E9E9E", "H$ c #AEAEAE", "I$ c #777777", "J$ c #868686", "K$ c #A5A5A5", "L$ c #949494", " ", " ", " ", " ", " ", " ", " . + @ # $ % % ", " & * = - ; > , ' , ) ! ~ ", " # { ] ^ / ( , _ ' ) ! : < [ } } ", " | 1 2 3 ! , ' , ! 4 ( 5 ~ } 6 7 ~ 8 > ", " @ 9 0 [ a ' b , ! : c 8 d 7 6 e f ~ } g f > > ", " h i j k . - l ( b m n o a ( 5 p f 7 q 7 f ~ } r s t u v w x c ", " y % j z A q ! m B C n ' 4 c D 3 6 / 6 3 ~ E ; F & G H I J K L M N O ", " P F p Q C R S T ' 4 > U d 7 q 6 E ~ E l s t V W X Y Z ` ...+.@.#.$.O ", " %.< T &.C b 4 < p f } 6 6 E d } ; F & *.=.-.;.>.,.'.).!.~.{.].^./.(._.( ", " :.b <.[.[ f } 6 6 } f e }.|.^ 1.2.-.3.>.4.5.6.7.8.9.0.a.b.c.d.e.f.(.g.( ", " i b ) f h.7 3 6 i.|.^ j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.c.B.e.C.(.g.( ", " D.' ! f e $ % j.E.F.G.H.I.J.K.L.M.N.O.P.P.Q.R.S.T.T.U.V.W.X.Y.Z.C.(.g.: ", " `. +[.d e 0 .+++@+#+$+%+&+*+=+-+;+>+>+P.P.,+'+)+!+~+{+y.W.]+Y.Z.^+/+(+: ", " _+! 4 d e :+<+[+}+|+1+2+2+3+4+5+6+>+P.P.7+8+)+9+0+~+a+y.a.]+Y.Z.^+/+b+: ", " c+4 : d e d+e+f+g+h+2+2+2+i+j+k+l+m+P.Q.n+o+p+q+0+~+a+y.a.]+Y.Z.^+/+b+4 ", " r+( ( d 7 :+e+f+g+h+2+2+s+t+u+v+w+x+y+z+A+p+B+C+!+D+E+!+F+G+H+].^+/+b+4 ", " I+> O d 7 :+e+f+g+h+2+2+J+K+L+M+N+O+Q.8+C+P+p+Q+R+S+T+U+V+W+X+Y+^+(.b+4 ", " I+< c ~ 7 :+e+Z+`+2+2+ @.@+@@@#@$@{+%@&@*@=@-@;@>@,@'@,@)@!@~@{@]@(.b+4 ", " ^@U > ~ } 2 e+Z+`+2+2+/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@X+8@9@0@].e.C./+a@[. ", " b@p < ~ } c@e+d@e@f@g@h@i@j@k@l@m@n@o@*@p@q@r@s@t@u@0.A.c.v@].^./.w@x@[. ", " y@[ 5 ~ } c@e+z@A@B@C@D@E@F@O+G@H@I@J@K@L@M@N@O@U.V.W.]+{.P@e.Q@R@(.a@[. ", " y@~ 5 ~ } S@T@U@V@@@i@W@X@Y@u.Z@`@+@ #.#E@+#@#U.y.a.]+c.v@].##$#%##.&#! ", " y@~ 8 ~ E S@T@*#=#-#;#>#b.,#P.y+'#)#!#~#{#]#^#y.a.A.9./#(#e.Q@_#:##.&#! ", " y@~ 8 ~ E S@T@<#~.[#}#>+P.P.y+y+|#1#2#3#4#5#V.a.A.9./#v@].##_#6#7#8#&#! ", " y@~ 8 ~ E S@T@K.9#>+>+P.P.y+y+0#a#V+b#c#d#z.W.]+9./#v@].##Q@e#f#g#h#i#a ", " y@~ 8 ~ 3 j#T@K.9#>+>+P.P.y+y+k#l#m#n#o#p#A.]+c./#B.q#q#r#s#t#u#v#w#x#a ", " y@~ 8 ~ 3 j#T@K.O.>+P.P.y+y+0#y#z#A#B#C#]+c.{.{.D#E#F#G#H#I#J#K#L#M#N#a ", " y@~ 8 [ 3 j#T@O#O.>+P.P.y+y+0#P#z#Q#R#S#T#U#V#W#X#Y#Z#`# $.$+$@$T Q +a ", " y@~ 8 [ f #$T@O#O.P.P.y+y+0#0#$$Z.%$U#&$*$=$-$;$>$,$+$'$m b , a [.[.4 : ", " y@~ 8 [ f #$)$O#O.P.P.y+Q.k#u.!$~${$]$^$/$($+$_$<._ +! 4 [.[.4 5 / % :$ ", " y@~ 8 [ f <$)$O#[$P.y+}$|$1$2$3$4$5$6$7$Q _ ) 4 : 4 4 4 5 ; 8$9$0$a$ ", " y@~ 8 [ f |.b$c$d$e$f$g$/+h$i$j$k$l$! 4 : : : ( U m$j n$k ", " y@~ 8 [ d ; o$p$q$r$s$a@t$u$4 ( ( O ( ( D i.v$w$n$ ", " y@~ 5 p [ [ x$y$z$A$B$O O O O O p C${ D$n$ ", " E$6 5 p [ 5 > c c c c c E F$G$E$. ", " H$5 p [ < < > } S@1 I$J$ ", " K$q [ / 2 L$:.D$ ", " G$K$ ", " ", " ", " ", " "}; unixODBC-2.2.14-p2/odbcinstQ4/Threading48.xpm0100644000076400007640000002576010733004457017033 0ustar nicknick/* XPM */ static const char * xpmThreading48[] = { "48 48 399 2", " c None", ". c #888888", "+ c #909090", "@ c #8E8E8E", "# c #8C8C8C", "$ c #8F8F8F", "% c #8B8B8B", "& c #878787", "* c #8D8D8D", "= c #868686", "- c #7E7E7E", "; c #7D7D7D", "> c #7C7C7C", ", c #787878", "' c #989898", ") c #ADADAD", "! c #B4B4B4", "~ c #B3B3B3", "{ c #B2B2B2", "] c #B1B1B1", "^ c #B0B0B0", "/ c #AFAFAF", "( c #AEAEAE", "_ c #ACACAC", ": c #A8A8A8", "< c #929292", "[ c #BEBEBE", "} c #D8D8D8", "| c #DBDBDB", "1 c #D1D1D1", "2 c #C7C7C7", "3 c #CECECE", "4 c #D5D5D5", "5 c #D7D7D7", "6 c #D6D6D6", "7 c #D4D4D4", "8 c #B7B7B7", "9 c #949494", "0 c #9A9A9A", "a c #D2D2D2", "b c #D0D0D0", "c c #72706F", "d c #716D6C", "e c #74706E", "f c #797675", "g c #C9C9C9", "h c #C6C6C6", "i c #A7A7A7", "j c #9B9B9B", "k c #C4C4C4", "l c #979797", "m c #7A6864", "n c #9B7A72", "o c #B28A80", "p c #B68B81", "q c #A7867E", "r c #8A756F", "s c #807C7B", "t c #BFBFBF", "u c #CACACA", "v c #C2C2C2", "w c #A0A0A0", "x c #CBCBCB", "y c #C5C5C5", "z c #959595", "A c #6D6C6C", "B c #896C65", "C c #D6ACA1", "D c #F1DBD7", "E c #FBEAE6", "F c #FDEBE7", "G c #F6E6E2", "H c #DFC3BC", "I c #A4837B", "J c #827D7B", "K c #9C9C9C", "L c #BCBCBC", "M c #C3C3C3", "N c #AAAAAA", "O c #6E6D6D", "P c #8E6C63", "Q c #EAAFA0", "R c #FFE6E0", "S c #FFE6E1", "T c #F3CDC3", "U c #AC847A", "V c #8C8786", "W c #A6A6A6", "X c #A3A3A3", "Y c #9F9F9F", "Z c #BDBDBD", "` c #746967", " . c #C88270", ".. c #FDBAA9", "+. c #FFC1B2", "@. c #FFB6A4", "#. c #FF9C84", "$. c #E27053", "%. c #907974", "&. c #999999", "*. c #9D9D9D", "=. c #A2A2A2", "-. c #B8B8B8", ";. c #896960", ">. c #E3836B", ",. c #FF9A81", "'. c #FF9B82", "). c #FF957A", "!. c #FF7B5A", "~. c #FF572D", "{. c #FF4516", "]. c #F93D0E", "^. c #9E6C5F", "/. c #969696", "(. c #939393", "_. c #919191", ":. c #8A8A8A", "<. c #A9A9A9", "[. c #917067", "}. c #E76E50", "|. c #FF704D", "1. c #FF714D", "2. c #FF714E", "3. c #FF6D49", "4. c #FF5930", "5. c #FF491C", "6. c #FF4618", "7. c #FB481B", "8. c #A47265", "9. c #848484", "0. c #A4A4A4", "a. c #838383", "b. c #887773", "c. c #DE6B4F", "d. c #FF653F", "e. c #FF6640", "f. c #FF6843", "g. c #FF6742", "h. c #FF6540", "i. c #F16846", "j. c #A0837D", "k. c #858585", "l. c #A5A5A5", "m. c #7F7D7C", "n. c #B88274", "o. c #F98569", "p. c #FF8668", "q. c #FF8769", "r. c #FC866A", "s. c #CF8572", "t. c #9D9592", "u. c #828282", "v. c #6D6D6D", "w. c #A1A1A1", "x. c #8B8786", "y. c #C8988C", "z. c #F4A692", "A. c #FDAB96", "B. c #FFAC96", "C. c #FFAB96", "D. c #F7A894", "E. c #D69D8F", "F. c #A49794", "G. c #818181", "H. c #6F6F6F", "I. c #9E9E9E", "J. c #918E8D", "K. c #B6A09A", "L. c #D4AFA6", "M. c #E5BAAF", "N. c #E7BBB0", "O. c #DCB4AA", "P. c #C1A6A0", "Q. c #A49D9B", "R. c #929190", "S. c #9A9796", "T. c #A49E9D", "U. c #A7A19F", "V. c #A49F9E", "W. c #A19F9F", "X. c #808080", "Y. c #717171", "Z. c #898989", "`. c #7F7F7F", " + c #767676", ".+ c #707070", "++ c #727272", "@+ c #777777", "#+ c #6A6967", "$+ c #807867", "%+ c #9F9379", "&+ c #BBA983", "*+ c #C0AD83", "=+ c #A99D83", "-+ c #8C8573", ";+ c #7E7C77", ">+ c #797979", ",+ c #6B6A67", "'+ c #95886D", ")+ c #DBCCAD", "!+ c #F8EED9", "~+ c #FFF9ED", "{+ c #FFFAEE", "]+ c #FDF5E5", "^+ c #E4D9C1", "/+ c #ACA088", "(+ c #858179", "_+ c #7A7A7A", ":+ c #6B6B6B", "<+ c #8B7F64", "[+ c #E4D0A5", "}+ c #FEF5E0", "|+ c #FFF7E4", "1+ c #FFF7E5", "2+ c #FFF6E3", "3+ c #EFE2C3", "4+ c #A89B80", "5+ c #8A8986", "6+ c #7B7B7B", "7+ c #757066", "8+ c #D1B479", "9+ c #FEE4AC", "0+ c #FFE6B0", "a+ c #FFE5B0", "b+ c #FFE5AE", "c+ c #FFE09E", "d+ c #FFD884", "e+ c #E9BB59", "f+ c #918773", "g+ c #8A7E63", "h+ c #E4C071", "i+ c #FFD885", "j+ c #FFD479", "k+ c #FFCB5D", "l+ c #FFBF38", "m+ c #FFB821", "n+ c #FAB219", "o+ c #9E8C63", "p+ c #928569", "q+ c #E8BB59", "r+ c #FFCA59", "s+ c #FFCB59", "t+ c #FFC953", "u+ c #FFC23E", "v+ c #FFBB2B", "w+ c #FFB926", "x+ c #FFB925", "y+ c #FCB828", "z+ c #A59167", "A+ c #868176", "B+ c #DAB159", "C+ c #FFC64A", "D+ c #FFC64C", "E+ c #FFC850", "F+ c #FFC851", "G+ c #EFBE56", "H+ c #9E9582", "I+ c #757575", "J+ c #7E7E7D", "K+ c #B3A17B", "L+ c #F6CE76", "M+ c #FFD476", "N+ c #FAD076", "O+ c #CAB17B", "P+ c #9D9B95", "Q+ c #737373", "R+ c #8C8A85", "S+ c #C7B58F", "T+ c #F9DB99", "U+ c #FFDF9B", "V+ c #FFE09B", "W+ c #FCDD9A", "X+ c #D9C393", "Y+ c #A49F94", "Z+ c #9E9E9D", "`+ c #747474", " @ c #8E8D8C", ".@ c #ABA69A", "+@ c #CFC3AA", "@@ c #E5D6B6", "#@ c #E7D8B7", "$@ c #D9CDB0", "%@ c #B9B2A2", "&@ c #9E9D9B", "*@ c #8F8F8E", "=@ c #979795", "-@ c #9F9E9B", ";@ c #A1A09D", ">@ c #A09F9E", ",@ c #6E6E6E", "'@ c #6C6C6C", ")@ c #6A6A6A", "!@ c #686868", "~@ c #696A68", "{@ c #6C7561", "]@ c #82986C", "^@ c #98B67B", "/@ c #9BBB7B", "(@ c #8FA677", "_@ c #77826B", ":@ c #777975", "<@ c #666666", "[@ c #606060", "}@ c #686B66", "|@ c #7F906D", "1@ c #C8DFB1", "2@ c #F3FAEC", "3@ c #FDFEFB", "4@ c #FDFEFC", "5@ c #FBFEF7", "6@ c #DDEBD0", "7@ c #98AA87", "8@ c #7E8279", "9@ c #878786", "0@ c #646464", "a@ c #778A64", "b@ c #C4DEA9", "c@ c #EFFAE4", "d@ c #DBECCA", "e@ c #93A780", "f@ c #868984", "g@ c #626262", "h@ c #636363", "i@ c #6C7266", "j@ c #99BC78", "k@ c #D0EEB1", "l@ c #D5F1B9", "m@ c #CCEEA9", "n@ c #B5E684", "o@ c #8AC74D", "p@ c #7E8971", "q@ c #728461", "r@ c #9ECE6F", "s@ c #B4E681", "t@ c #B3E67F", "u@ c #ABE373", "v@ c #94DB4D", "w@ c #78D21E", "x@ c #6CCE09", "y@ c #69CA08", "z@ c #78935D", "A@ c #798969", "B@ c #8EC953", "C@ c #96DC50", "D@ c #97DD51", "E@ c #94DB4C", "F@ c #87D736", "G@ c #7BD323", "H@ c #79D21F", "I@ c #79D022", "J@ c #809868", "K@ c #676767", "L@ c #7C8375", "M@ c #8CC156", "N@ c #91DA48", "O@ c #92DB4A", "P@ c #95DC4D", "Q@ c #94DC4D", "R@ c #93DB4B", "S@ c #93DB4A", "T@ c #90D04F", "U@ c #8C987F", "V@ c #656565", "W@ c #7C7D7C", "X@ c #91A47E", "Y@ c #ABDB7C", "Z@ c #B1E57C", "`@ c #B1E67C", " # c #AEE07C", ".# c #9BB780", "+# c #999C96", "@# c #5B5B5B", "## c #878985", "$# c #A4B791", "%# c #C0E09F", "&# c #C8EBA4", "*# c #C9EDA5", "=# c #C3E4A0", "-# c #ADC496", ";# c #9CA196", "># c #999998", ",# c #696969", "'# c #5E5E5E", ")# c #8E8F8C", "!# c #A3AA9B", "~# c #B9C7AC", "{# c #CADBB9", "]# c #CBDDBA", "^# c #C0CFB1", "/# c #ABB4A1", "(# c #9FA19C", "_# c #5F5F5F", ":# c #929291", "<# c #989897", "[# c #9B9B9A", "}# c #5A5A5A", "|# c #585858", "1# c #5C5C5C", "2# c #535353", " ", " ", " . + @ # $ + $ + + % & * = - ; ; > , ", " ' ) ! ! ! ! ! ! ! ~ { ] ^ / / ( ) _ : < ", " & [ } | | | | | } 1 2 2 3 4 5 5 6 6 6 7 8 9 ", " 0 a } } } 5 b / & c d e f # / g a a a 1 h i ", " j b 1 a 1 k l c m n o p q r s j t u u u v w ", " 0 u x x y z A B C D E F G H I J K [ v v L z ", " K M k k N O P Q R S S R R R T U V W ! / X . ", " Y [ t Z # ` ...+.+.+.+.+.@.#.$.%.&.*.l < . ", " =.-.-.{ - ;.>.,.'.'.'.).!.~.{.].^././.(._.:.&. ", " w ^ / <.; [.}.|.1.2.3.4.5.6.6.7.8.&./.< + & 9. ", " + Y <.: 0.a.b.c.d.e.f.g.e.h.h.e.i.j.K z _.$ k., ", " 9 w l.0.=.$ m.n.o.p.q.q.q.q.q.r.s.t.*.< $ * u.v. ", " u.0 X =.w.j & x.y.z.A.B.B.C.D.E.F.w z $ @ # G.H. ", " . &.=.w.w I./.:.J.K.L.M.N.O.P.Q.Y ' + @ * % G.H. ", " % &.w w Y *.j /.+ R.S.T.U.V.W.I.l + @ * # :.X.Y. ", " a.l Y I.*.K 0 &.' /.z /.' ' z _.$ @ # % :.Z.X.9. ", " u./.I.*.K 0 &.' /._.% . . :.* @ @ * % :.Z.. `.% ", " X.z *.K j &.' z k. +Y..+++, X.& # % :.Z.& = `.# ", " X.9 K 0 &.l $ @+#+$+%+&+*+=+-+;+k.:.. & = k.; & ", " X.(.0 &.' (.>+,+'+)+!+~+{+]+^+/+(+:.Z.= k.9.> _+ ", " X.< &.' l Z.:+<+[+}+|+1+1+1+2+3+4+5+* k.9.u.6+ + ", " 6+_.' /.9 >+7+8+9+0+0+0+a+b+c+d+e+f+_.& u.G._+@+ ", " `.+ /.z _. +g+h+d+i+i+d+j+k+l+m+n+o+(.. G.X.>+@+ ", " - $ z 9 + @+p+q+r+r+s+t+u+v+w+x+y+z+/.. X.`., + ", " a.* 9 < _.- A+B+C+D+E+F+F+F+F+F+G+H+' k.`.; +I+ ", " 9.# < _.+ = J+K+L+M+M+M+M+M+M+N+O+P+9 X.; > Q+++ ", " _+% _.+ $ % G.R+S+T+U+V+V+V+W+X+Y+Z+& ; > 6+Y.`+ ", " >+:.+ @ * # Z.= @.@+@@@#@$@%@&@*.:.; > 6+>+.+k. ", " , . @ * # % :.. Z.*@=@-@;@>@K /.Z.- > 6+_+, ,@9. ", " Q+= * # % :.Z.. & & :.* @ # . u.; 6+6+_+, @+'@u. ", " 6+& # :.Z.Z.& = 9.X.; 6+> ; ; ; > _+>+, @+I+)@'@ ", " % Z.:.Z.. & = u., .+:+'@,@Q+_+- > >+, @+ +Q+!@ ", " Z.Z.. & = G.Y.~@{@]@^@/@(@_@:@u.> @+ +`+++<@[@ ", " k.. & k.u.Y.}@|@1@2@3@4@5@6@7@8@9@>+`+Q+.+0@,@ ", " 9.& = k.6+)@a@b@c@c@c@c@c@c@d@e@f@9.`+++,@g@h@ ", " G.k.k.a.Q+i@j@k@l@l@l@l@l@m@n@o@p@* @+.+'@0@++ ", " - 9.a.X.Y.q@r@s@s@s@t@u@v@w@x@y@z@_._+,@)@h@> ", " > a.u.`.`+A@B@C@C@D@E@F@G@H@H@I@J@(.>+v.K@0@ ", " _+G.G.`., L@M@N@O@P@Q@R@S@S@S@T@U@9 I+:+V@[@ ", " _+X.`.- 6+W@X@Y@Z@`@`@Z@Z@Z@ #.#+#% v.)@h@@# ", " `.`.- ; 6+; ##$#%#&#*#*#*#=#-#;#>#@+)@,#[@'# ", " `.- ; > _+6+u.)#!#~#{#]#^#/#(#K - :+,#K@_#:+ ", " > 6+_+>+@+, X.:.:#<#[#0 ' * +:+!@K@V@}#,@ ", " a._+>+, @+ +`+`+, ; G.u.X., ,@,#!@K@0@'#|#`+ ", " @+.+,@v.'@)@,#K@K@V@h@g@[@_#'#1#@#|#2#0@ ", " "}; unixODBC-2.2.14-p2/odbcinstQ4/Tracing48.xpm0100644000076400007640000000750310723566554016522 0ustar nicknick/* XPM */ static const char * xpmTracing48[] = { "48 48 90 1", " c None", ". c #000000", "+ c #010101", "@ c #020202", "# c #030303", "$ c #040404", "% c #060606", "& c #070707", "* c #090909", "= c #0B0B0B", "- c #0C0C0C", "; c #0A0A0A", "> c #080808", ", c #0D0D0D", "' c #0F0F0F", ") c #101010", "! c #0E0E0E", "~ c #111111", "{ c #141414", "] c #151515", "^ c #121212", "/ c #181818", "( c #1A1A1A", "_ c #171717", ": c #161616", "< c #1C1C1C", "[ c #1E1E1E", "} c #050505", "| c #212121", "1 c #222222", "2 c #232323", "3 c #1F1F1F", "4 c #282828", "5 c #252525", "6 c #1B1B1B", "7 c #1D1D1D", "8 c #272727", "9 c #2C2C2C", "0 c #2A2A2A", "a c #131313", "b c #303030", "c c #333333", "d c #343434", "e c #383838", "f c #3A3A3A", "g c #393939", "h c #373737", "i c #313131", "j c #434343", "k c #414141", "l c #404040", "m c #3F3F3F", "n c #3E3E3E", "o c #323232", "p c #454545", "q c #4B4B4B", "r c #494949", "s c #424242", "t c #4E4E4E", "u c #4A4A4A", "v c #3C3C3C", "w c #191919", "x c #292929", "y c #2B2B2B", "z c #2E2E2E", "A c #262626", "B c #3B3B3B", "C c #464646", "D c #484848", "E c #3D3D3D", "F c #545454", "G c #585858", "H c #595959", "I c #565656", "J c #5A5A5A", "K c #646464", "L c #626262", "M c #474747", "N c #525252", "O c #606060", "P c #5C5C5C", "Q c #2D2D2D", "R c #202020", "S c #363636", "T c #242424", "U c #2F2F2F", "V c #4C4C4C", "W c #4D4D4D", "X c #5D5D5D", "Y c #5E5E5E", " ...+++. ", " ...+++. ", " .++@@@@@@++ ", " +++@@@@@@@@+ ", " +@@#########@+. ", " +$%&&&&&&&&&%$@ ", " $&*=---------;%# ", " $>,'))))))))))!&$ ", " #,~{]]]]]]]]]]]^&# ", " &-]/(((((((((((_^% ", " @,:<[[[[[[[[[[[[_'} ", " >]|122222222221|{& ", " %{344444444444456~$ ", " %789999999999905a= ", " +%64bbbbbbbbbbb47; ", " $!79cdddddddc9[) ", " +)1cefffgghi1^. ", " +. >^9fjklmnd5!% ", " &*=> =[opqrsb1]% ", " ']_~> )8mtuv3! ", " %wxy5(> w8vz_- ", " {AeBei1] /57 ", " |cCrqDf5= ..+. ", " 8EFGHHIlA ..+++@++. ", " (fJKLHMo( .+++@@@@@+. ", " &bNOPtbw ..++@@@@@@@+. ", " _w6 ++@@@@@@@@@@++ ", " @@@@@@@@@@@@@@. ", " @$$$$$$$$$$$$$@. ", " .$&>***********&$. ", " %;,!!!!!!!!!!!,*} ", " },~aaaaaaaaaaaa~>} ", " >,:/wwwwwwwwwww_a% ", " @!_7[[[[[[[[[[[[_!} ", " }{1222222222222|{& ", " $!<44444444444456~ ", " @>:5yQQQQQQQQQ4R^= ", " .+!79iccooooob5/& ", " .$-2iggeeeeSQ<* ", " $ +%:0BkklnSy6~ ", " };* #;3SCrCnz<& ", " ;'<_! #^2kqp8_> ", " :R90T: ;{yUyw ", " |dBnB8( %{)> ", " .4prVWrd< ", " .QtIJPXCx= ", " zqHXYPqi= ", " /TBneA7 "}; unixODBC-2.2.14-p2/odbcinstQ4/odbcinstQ4.exp0100644000076400007640000000005310723052606016736 0ustar nicknickODBCManageDataSources ODBCCreateDataSource unixODBC-2.2.14-p2/odbcinstQ4/ODBCManageDataSources64.xpm0100644000076400007640000010421510725400322021063 0ustar nicknick/* XPM */ static const char * xpmODBCManageDataSources64[] = { "64 64 1652 2", " c None", ". c #E7E7F5", "+ c #B7B7C8", "@ c #B8B8C6", "# c #C3C3CF", "$ c #C7C7D2", "% c #BDBDC9", "& c #B2B2BF", "* c #D7D7E5", "= c #FCFCFE", "- c #FDFDFF", "; c #A6A6B8", "> c #B3B3C1", ", c #EBEBEF", "' c #FFFFFF", ") c #F0F0F3", "! c #D1D1DA", "~ c #A9A9B8", "{ c #9797A5", "] c #D0D0E0", "^ c #E6E6EE", "/ c #F9F9FF", "( c #9393A7", "_ c #757582", ": c #BDBDD0", "< c #B4B4C9", "[ c #7C7C8C", "} c #B1B1BE", "| c #F1F1F4", "1 c #E9E9ED", "2 c #ADADBB", "3 c #80808F", "4 c #C8C8D9", "5 c #E6E6ED", "6 c #FEFEFF", "7 c #D1D1DE", "8 c #C0C0D2", "9 c #EFEFF5", "0 c #D8D8E2", "a c #ADADC3", "b c #9090A7", "c c #ABABBA", "d c #EFEFF2", "e c #FEFEFE", "f c #E5E5EA", "g c #9898A9", "h c #707082", "i c #BDBDCF", "j c #C9C9D7", "k c #BEBECC", "l c #F9F9FD", "m c #EDEDF3", "n c #B4B4C6", "o c #9393AE", "p c #65657A", "q c #A5A5B6", "r c #ECECEF", "s c #FBFBFC", "t c #9E9EB1", "u c #C2C2D1", "v c #C8C8D5", "w c #9393AF", "x c #757593", "y c #A09FB1", "z c #E2E2E8", "A c #858597", "B c #BEBED0", "C c #F2F2F7", "D c #E2E2EB", "E c #A2A2B8", "F c #777799", "G c #50506A", "H c #9E9CA9", "I c #B9B4C0", "J c #A28D82", "K c #B0AFBC", "L c #AC7C3B", "M c #D68200", "N c #DD8700", "O c #DA8300", "P c #D67E00", "Q c #A5856C", "R c #BABAC8", "S c #F5F5F7", "T c #FCFCFC", "U c #EDEDF1", "V c #9595A7", "W c #BCBCCF", "X c #E2E2EA", "Y c #F5F5F9", "Z c #BFBFCF", "` c #7A7A9A", " . c #6C6B8A", ".. c #9A99A7", "+. c #D2CCD5", "@. c #E4D6CF", "#. c #E1C7B1", "$. c #A0681E", "%. c #DE8B00", "&. c #E29700", "*. c #E4A300", "=. c #AB9E84", "-. c #AFADB7", ";. c #C3A82D", ">. c #EAC303", ",. c #EEC204", "'. c #E9B903", "). c #BE9E46", "!. c #B4B3C2", "~. c #F6F6F8", "{. c #9D9CAE", "]. c #8F8FA0", "^. c #B8B8CB", "/. c #F5F5FA", "(. c #B7B6C6", "_. c #BEBAC5", ":. c #E2D6D1", "<. c #EFD4B5", "[. c #EDC17E", "}. c #EAB448", "|. c #DEA70F", "1. c #ECC105", "2. c #F4D609", "3. c #F7E40E", "4. c #AEAC88", "5. c #EEEEF1", "6. c #ECECF0", "7. c #A8A8B3", "8. c #CCCA44", "9. c #F8F425", "0. c #CAC654", "a. c #ADADBD", "b. c #EAEAEE", "c. c #F0F0F4", "d. c #E1E1E7", "e. c #9392A4", "f. c #A5A5BD", "g. c #C7C7D5", "h. c #CCCAD5", "i. c #D1C9CB", "j. c #EED9C1", "k. c #EFC88B", "l. c #EBB74B", "m. c #EAB81F", "n. c #EFCF10", "o. c #F8E715", "p. c #FCF626", "q. c #FDFB3C", "r. c #FDFC53", "s. c #A6A68E", "t. c #A1A1B0", "u. c #ABAA8E", "v. c #A7A7B8", "w. c #E4E4E9", "x. c #D3D3DC", "y. c #837A7E", "z. c #636373", "A. c #A4A4BD", "B. c #DEDEE7", "C. c #F3F3F8", "D. c #C6C3CD", "E. c #D9CEC9", "F. c #F3D8B1", "G. c #ECBF69", "H. c #EAB729", "I. c #EECB11", "J. c #F8E918", "K. c #FEFA33", "L. c #FEFE57", "M. c #FFFF7D", "N. c #FEFEA0", "O. c #FCFBBA", "P. c #B9B8AE", "Q. c #C5C5D0", "R. c #E5E5EB", "S. c #E6E6EC", "T. c #DEDEE5", "U. c #B3B3C2", "V. c #DEDEE4", "W. c #E6E6EB", "X. c #E6E6EA", "Y. c #BCBCCA", "Z. c #8B7B58", "`. c #B87A00", " + c #8888A1", ".+ c #ACACC0", "++ c #F4F4F8", "@+ c #C5C2CC", "#+ c #E0D2C9", "$+ c #F2D1A2", "%+ c #EDBD57", "&+ c #E8BC1D", "*+ c #F3DA12", "=+ c #FDF52B", "-+ c #FEFE55", ";+ c #FFFF84", ">+ c #FFFFAD", ",+ c #FFFEC8", "'+ c #FCFBD5", ")+ c #F8F5DB", "!+ c #DFDBCD", "~+ c #9696AB", "{+ c #D8D8E0", "]+ c #E0E0E7", "^+ c #E0E0E6", "/+ c #CACAD5", "(+ c #9797AA", "_+ c #A99139", ":+ c #D19203", "<+ c #CF8515", "[+ c #8C8CAA", "}+ c #F7F7FC", "|+ c #C5C2CE", "1+ c #E1D4CC", "2+ c #F2D09E", "3+ c #ECBC4E", "4+ c #E8C219", "5+ c #F5E318", "6+ c #FEF93B", "7+ c #FFFE71", "8+ c #FFFFA2", "9+ c #FFFFC1", "0+ c #FFFFD0", "a+ c #FEFDD4", "b+ c #FAF7D4", "c+ c #F5F0D6", "d+ c #F2ECD9", "e+ c #A8A6AB", "f+ c #ACACBD", "g+ c #D5D5DD", "h+ c #DCDCE2", "i+ c #DBDBE2", "j+ c #C9C9D4", "k+ c #B9B9C7", "l+ c #BDBDCA", "m+ c #D1D1DB", "n+ c #9492A1", "o+ c #CC922C", "p+ c #DDA12E", "q+ c #C27E1A", "r+ c #66667F", "s+ c #9292AE", "t+ c #E3E3EC", "u+ c #C9C7D3", "v+ c #DFD5D2", "w+ c #F2D3A5", "x+ c #EDBC4F", "y+ c #E9C316", "z+ c #F6E71A", "A+ c #FDF945", "B+ c #FFFE82", "C+ c #FFFFB0", "D+ c #FFFFC6", "E+ c #FFFFCC", "F+ c #FFFFCD", "G+ c #FCFBCD", "H+ c #F7F3CE", "I+ c #F4EED4", "J+ c #F7F3DB", "K+ c #F0EED4", "L+ c #90909D", "M+ c #A3A3B6", "N+ c #C8C8D3", "O+ c #D6D6DE", "P+ c #CCCCD6", "Q+ c #C1C1CE", "R+ c #C5C5D1", "S+ c #CCCAD0", "T+ c #D3A058", "U+ c #EAC635", "V+ c #FAEC3A", "W+ c #DEAA30", "X+ c #BC7A1A", "Y+ c #777798", "Z+ c #A6A6BC", "`+ c #CBCAD7", " @ c #D7D1D3", ".@ c #F4DAB6", "+@ c #ECBC58", "@@ c #E8C217", "#@ c #F7E81A", "$@ c #FEFB47", "%@ c #FFFE87", "&@ c #FFFFB4", "*@ c #FFFFC3", "=@ c #FFFFC7", "-@ c #FEFEC7", ";@ c #FBF8C7", ">@ c #F5EFCA", ",@ c #F3EDD1", "'@ c #F9F6D9", ")@ c #FDFCDD", "!@ c #EDEDD0", "~@ c #9A9A9E", "{@ c #7F7F99", "]@ c #A1A1B4", "^@ c #B7B7C5", "/@ c #BBBBC8", "(@ c #AEAEBE", "_@ c #B8B8C7", ":@ c #CDCDD7", "<@ c #D4D1D6", "[@ c #CF9D58", "}@ c #E8C133", "|@ c #EAA91D", "1@ c #E59012", "2@ c #FAE336", "3@ c #DBA52E", "4@ c #B8771B", "5@ c #3A3A4F", "6@ c #9090AB", "7@ c #CFCBD4", "8@ c #F5E2CD", "9@ c #ECBE6E", "0@ c #E7BA1A", "a@ c #F7E517", "b@ c #FEFB43", "c@ c #FFFE83", "d@ c #FFFFB1", "e@ c #FFFFBE", "f@ c #FFFFC0", "g@ c #FEFDC0", "h@ c #F8F5C1", "i@ c #F3ECC6", "j@ c #F4EDD0", "k@ c #FAF7D9", "l@ c #FFFEDC", "m@ c #FEFEDC", "n@ c #F4F4D3", "o@ c #CDCDB8", "p@ c #939397", "q@ c #7B7A8C", "r@ c #76768D", "s@ c #74748A", "t@ c #787685", "u@ c #747384", "v@ c #A9A9BA", "w@ c #CFCFD9", "x@ c #DAD8DB", "y@ c #CD9C5A", "z@ c #E6BB31", "A@ c #ECAC1D", "B@ c #EF8D0C", "C@ c #FC940B", "D@ c #EB9813", "E@ c #FADE33", "F@ c #D7A12D", "G@ c #B2731D", "H@ c #C0BECF", "I@ c #EBE1DB", "J@ c #EFC992", "K@ c #E6B32D", "L@ c #F3DA11", "M@ c #FEFA37", "N@ c #FFFE77", "O@ c #FFFFA8", "P@ c #FFFFB7", "Q@ c #FFFFB9", "R@ c #FCFBB9", "S@ c #F7F1BC", "T@ c #F1E9C4", "U@ c #F5EFD1", "V@ c #FCFADA", "W@ c #FFFFDC", "X@ c #FFFFDD", "Y@ c #FCFCDA", "Z@ c #F2F2D1", "`@ c #E4E2C4", " # c #D5D1B6", ".# c #CEC7AB", "+# c #D3CCA6", "@# c #D9D6A4", "## c #818186", "$# c #A3A1B0", "%# c #C69657", "&# c #E3B62F", "*# c #EEAE1D", "=# c #F19611", "-# c #FF9F11", ";# c #FD9E11", "># c #ED9E16", ",# c #FAD830", "'# c #D39C2C", ")# c #AC6E1F", "!# c #7C7C87", "~# c #E0DCE2", "{# c #F4DBBD", "]# c #EAB551", "^# c #EBC811", "/# c #FCF524", "(# c #FFFF61", "_# c #FFFF9B", ":# c #FFFFB2", "<# c #FEFEB2", "[# c #FBF9B3", "}# c #F4EDB8", "|# c #F1E7C4", "1# c #F6F1D3", "2# c #FDFCDB", "3# c #FEFDDB", "4# c #F8F4D4", "5# c #F0E7C7", "6# c #EEE4BA", "7# c #F4EFB3", "8# c #FBF9B1", "9# c #E9E6A0", "0# c #AA7B3F", "a# c #E1B12D", "b# c #F1B11D", "c# c #F39F15", "d# c #FFA917", "e# c #FDA817", "f# c #F0A518", "g# c #FAD42D", "h# c #D0972B", "i# c #A66C21", "j# c #C7C6D5", "k# c #EFE4DC", "l# c #EDC386", "m# c #E3B320", "n# c #F6E513", "o# c #FEFE45", "p# c #FFFF87", "q# c #FFFFA7", "r# c #FFFFAB", "s# c #FEFDAC", "t# c #F9F5AE", "u# c #F1E8B5", "v# c #F0E7C6", "w# c #F8F4D6", "x# c #FBF9D8", "y# c #F4ECCC", "z# c #EEE2BC", "A# c #F1E8B1", "B# c #F9F5AD", "C# c #FDFBAC", "D# c #E8D786", "E# c #C3882A", "F# c #FBCF2B", "G# c #F6AE1B", "H# c #FFB31D", "I# c #FDB11D", "J# c #F2AB1A", "K# c #FACE2A", "L# c #CC922A", "M# c #A26922", "N# c #DDDBE5", "O# c #F4DEC4", "P# c #E8B24C", "Q# c #ECC90E", "R# c #FFFF69", "S# c #FFFFA5", "T# c #FDFBA5", "U# c #F6F0A9", "V# c #EFE4B5", "W# c #F2E8CA", "X# c #FAF8D9", "Y# c #FFFFDE", "Z# c #FFFFDF", "`# c #FEFDDD", " $ c #F8F2D4", ".$ c #EEE1C2", "+$ c #EBDCB1", "@$ c #F1E7AA", "#$ c #F7F1A8", "$$ c #F9F4A7", "%$ c #F6F3A3", "&$ c #D0B568", "*$ c #C88E29", "=$ c #FCCA28", "-$ c #FFBF24", ";$ c #FFBD24", ">$ c #FEBB23", ",$ c #F5B21C", "'$ c #FBC928", ")$ c #9E6723", "!$ c #B1B1C1", "~$ c #EAE5E7", "{$ c #EEC999", "]$ c #E3AB1E", "^$ c #F7E30E", "/$ c #FEFD3F", "($ c #FFFF83", "_$ c #FFFF9E", ":$ c #FFFF9F", "<$ c #FFFE9E", "[$ c #FBF99F", "}$ c #F3EBA6", "|$ c #EDE1B7", "1$ c #F4EBCF", "2$ c #FCFBDD", "3$ c #FFFFE0", "4$ c #FFFFE1", "5$ c #FDFCDE", "6$ c #F5EED3", "7$ c #EBDDC0", "8$ c #E9D9B3", "9$ c #EEE1AF", "0$ c #F0E5AE", "a$ c #F0E4A9", "b$ c #F2E9A3", "c$ c #F1EC9A", "d$ c #CDB364", "e$ c #C48928", "f$ c #FCC526", "g$ c #FFC728", "h$ c #FFC72A", "i$ c #FEC428", "j$ c #F8B81E", "k$ c #FBC425", "l$ c #9A6424", "m$ c #61616F", "n$ c #C8C8D7", "o$ c #F8EDE4", "p$ c #E8B56B", "q$ c #E9B90B", "r$ c #FCF219", "s$ c #FFFD59", "t$ c #FFFE8F", "u$ c #FFFE98", "v$ c #FEFD98", "w$ c #F9F59A", "x$ c #F0E5A4", "y$ c #EDE0BC", "z$ c #F6EFD6", "A$ c #FEFCE1", "B$ c #FFFFE2", "C$ c #FFFFE3", "D$ c #FEFDE1", "E$ c #F8F3D9", "F$ c #F1E6CD", "G$ c #EEE2C6", "H$ c #EFE4C4", "I$ c #EDE0BF", "J$ c #E9D9B2", "K$ c #ECDDA2", "L$ c #F5ED9A", "M$ c #F4F293", "N$ c #CCB360", "O$ c #C08427", "P$ c #FCC023", "Q$ c #FFCE2D", "R$ c #FFD130", "S$ c #FFD02E", "T$ c #FFC125", "U$ c #FFBB22", "V$ c #FFBA22", "W$ c #FCBC22", "X$ c #C18427", "Y$ c #945F23", "Z$ c #868699", "`$ c #8B8BA1", " % c #9393AC", ".% c #9C9CB7", "+% c #A8A8BF", "@% c #D3D3E0", "#% c #F6E4D2", "$% c #E2A23D", "%% c #F2CC06", "&% c #FEF828", "*% c #FFFC6C", "=% c #FFFD90", "-% c #FFFD91", ";% c #FEFA92", ">% c #F7F095", ",% c #EDDFA3", "'% c #ECDEBF", ")% c #F7F0D8", "!% c #FCF9E0", "~% c #FDFAE0", "{% c #FDFCE1", "]% c #FEFDE3", "^% c #FFFFE5", "/% c #FFFEE5", "(% c #FDFBE3", "_% c #FAF6DF", ":% c #F8F4DD", "<% c #F7F1D9", "[% c #F1E6CC", "}% c #EADAB3", "|% c #ECDD9D", "1% c #F6ED93", "2% c #FDF991", "3% c #F7F48C", "4% c #CAB15C", "5% c #BD8026", "6% c #FBBB20", "7% c #FFD632", "8% c #FFDC36", "9% c #FFC025", "0% c #FFB41E", "a% c #FFA715", "b% c #FFAC18", "c% c #FFB51E", "d% c #FCB61E", "e% c #B67A26", "f% c #9494A3", "g% c #A0A0B0", "h% c #A2A2B5", "i% c #B3B3C8", "j% c #B3B3C9", "k% c #B1B1C5", "l% c #BABACC", "m% c #D2D2DD", "n% c #C6C6D3", "o% c #DDDDE6", "p% c #F0D5B8", "q% c #DE9B1B", "r% c #F8DD0A", "s% c #FEF838", "t% c #FFFB77", "u% c #FFFB8B", "v% c #FFFB8A", "w% c #FDF88B", "x% c #F6EC8F", "y% c #EBD99D", "z% c #EAD7B6", "A% c #F2E6C9", "B% c #F4EBCD", "C% c #F4EBCE", "D% c #F6EED4", "E% c #FEFDE6", "F% c #FFFFE9", "G% c #FFFEE8", "H% c #FDFCE6", "I% c #F9F4DC", "J% c #F0E4C4", "K% c #ECDBA6", "L% c #F2E592", "M% c #FAF38B", "N% c #FEF98A", "O% c #F7F385", "P% c #C5A955", "Q% c #B97B25", "R% c #FBB61E", "S% c #FFDE37", "T% c #FFE038", "U% c #FFAF1B", "V% c #FFAE1A", "W% c #FFA012", "X% c #FF960B", "Y% c #FF9209", "Z% c #FF9C0F", "`% c #FFB01A", " & c #E19B1F", ".& c #8D5B23", "+& c #C6C6D7", "@& c #C1C1D2", "#& c #CBCBD9", "$& c #EBEBF2", "%& c #F3F3F7", "&& c #FCFCFF", "*& c #EBEBF0", "=& c #E9C398", "-& c #E19E0A", ";& c #FBE70F", ">& c #FFF644", ",& c #FFF97B", "'& c #FFF984", ")& c #FDF784", "!& c #F8EC87", "~& c #EEDB8E", "{& c #EAD59B", "]& c #EDDAA5", "^& c #ECDAA7", "/& c #E9D6AC", "(& c #ECDBBE", "_& c #F5ECD7", ":& c #FCFAE8", "<& c #FFFEEC", "[& c #FFFFED", "}& c #FCF9E5", "|& c #F4EAD0", "1& c #EDDBAF", "2& c #EFDE93", "3& c #FDF684", "4& c #F6F07F", "5& c #C1A350", "6& c #B57724", "7& c #FBB11C", "8& c #FFD833", "9& c #FFA816", "0& c #FF9008", "a& c #FFA313", "b& c #FF8F07", "c& c #FFA916", "d& c #F6A718", "e& c #905C25", "f& c #B4B4C5", "g& c #E9E9EF", "h& c #C3C3D2", "i& c #E2B078", "j& c #E7A603", "k& c #FDEA11", "l& c #FFF445", "m& c #FFF776", "n& c #FFF77E", "o& c #FFF67E", "p& c #FCF17F", "q& c #F6E880", "r& c #F2E283", "s& c #F1E085", "t& c #EDD988", "u& c #E6CF95", "v& c #E8D4B5", "w& c #F3EAD9", "x& c #FDFAED", "y& c #FFFFF1", "z& c #FDFBED", "A& c #F7EFDD", "B& c #EEDEBB", "C& c #EDD998", "D& c #F5E584", "E& c #FCF27E", "F& c #F6EE79", "G& c #BEA04D", "H& c #B27223", "I& c #FBA817", "J& c #FFA212", "K& c #FFAF1A", "L& c #FFB920", "M& c #FF8501", "N& c #FF940A", "O& c #FF970C", "P& c #FFA412", "Q& c #F39E15", "R& c #8A5724", "S& c #B0B0C2", "T& c #F8F8FC", "U& c #DC9F5A", "V& c #E9AC00", "W& c #FEEA0C", "X& c #FFF034", "Y& c #FFF361", "Z& c #FFF574", "`& c #FFF578", " * c #FFF579", ".* c #FFF478", "+* c #FDF278", "@* c #FBEF78", "#* c #F8EB79", "$* c #F1DE80", "%* c #EAD398", "&* c #EDDCC3", "** c #F8F1E7", "=* c #FEFDF5", "-* c #FFFFF6", ";* c #FFFEF5", ">* c #FAF5E9", ",* c #F1E3CA", "'* c #EBD7A2", ")* c #F1DE85", "!* c #FAEC7A", "~* c #FEF478", "{* c #F6EC73", "]* c #BC9D4A", "^* c #AE6D21", "/* c #FB9B10", "(* c #FF9C0E", "_* c #FFC126", ":* c #FFAA18", "<* c #FF9F0E", "[* c #D18319", "}* c #75491F", "|* c #EEEEF4", "1* c #F8F8FD", "2* c #C5C5D2", "3* c #D89347", "4* c #EBAF00", "5* c #FEE805", "6* c #FFEC19", "7* c #FFEE3C", "8* c #FFF15B", "9* c #FFF26B", "0* c #FFF371", "a* c #FFF372", "b* c #FEF072", "c* c #F8E875", "d* c #F0D984", "e* c #ECD6AB", "f* c #F3E7D9", "g* c #FCF9F4", "h* c #FFFEFB", "i* c #FFFFFB", "j* c #FDFAF5", "k* c #F5E9DC", "l* c #EBD4B1", "m* c #EAD08A", "n* c #F2DD78", "o* c #F9EA73", "p* c #FDF072", "q* c #FFF272", "r* c #F6E968", "s* c #B99A3E", "t* c #AA6820", "u* c #FA940D", "v* c #FF960C", "w* c #FF980C", "x* c #EF8F10", "y* c #945B24", "z* c #A8A8BD", "A* c #D79146", "B* c #EBAC00", "C* c #FEE501", "D* c #FFE707", "E* c #FFE917", "F* c #FFEB32", "G* c #FFED4D", "H* c #FFF05F", "I* c #FFF067", "J* c #FFF06A", "K* c #FFF06B", "L* c #FFF16B", "M* c #FCEB6C", "N* c #F4DE75", "O* c #EDD492", "P* c #EFDDC2", "Q* c #F8F2EB", "R* c #FEFDFB", "S* c #FFFFFE", "T* c #FFFEFD", "U* c #FBF7F3", "V* c #F0E0D2", "W* c #E6CAA7", "X* c #E6C88A", "Y* c #EBD07E", "Z* c #F0D875", "`* c #F7E26E", " = c #FDEC6B", ".= c #FFF16A", "+= c #FFF068", "@= c #FFF061", "#= c #FFEE51", "$= c #F6E235", "%= c #BA981F", "&= c #9D6021", "*= c #D87E12", "== c #F48B0A", "-= c #F18A0B", ";= c #CD7815", ">= c #905824", ",= c #A3A3B8", "'= c #F7F7FA", ")= c #FAFAFE", "!= c #D79A57", "~= c #E9A500", "{= c #FEE000", "]= c #FFE301", "^= c #FFE404", "/= c #FFE511", "(= c #FFE625", "_= c #FFEA3C", ":= c #FFEC4F", "<= c #FFED5A", "[= c #FFEE60", "}= c #FFEE63", "|= c #FFEE64", "1= c #FEEC64", "2= c #F8E369", "3= c #EFD57B", "4= c #ECD4A6", "5= c #F4E7D9", "6= c #FCF9F6", "7= c #FFFFFD", "8= c #FCF8F5", "9= c #F4E7DD", "0= c #ECD6C2", "a= c #E9CFAF", "b= c #E7C99B", "c= c #E7C780", "d= c #F0D56C", "e= c #FAE665", "f= c #FEED64", "g= c #FFEE61", "h= c #FFED5C", "i= c #FFEB52", "j= c #FFEA41", "k= c #FFE72A", "l= c #FFE513", "m= c #F7DC05", "n= c #D0B307", "o= c #A27A16", "p= c #8D5C1D", "q= c #7F4D1D", "r= c #693F1A", "s= c #A6A6BD", "t= c #B6B6C9", "u= c #E3E3EB", "v= c #F0F0F7", "w= c #BEBECE", "x= c #DBAA75", "y= c #E49C02", "z= c #FDDA00", "A= c #FFE000", "B= c #FFDF00", "C= c #FFE003", "D= c #FFE10A", "E= c #FFE319", "F= c #FFE52B", "G= c #FFE83D", "H= c #FFE94B", "I= c #FFEA54", "J= c #FFEB59", "K= c #FFEB5C", "L= c #FCE65E", "M= c #F4D967", "N= c #EBCE86", "O= c #EDD7B8", "P= c #F6EDE4", "Q= c #FDFAF7", "R= c #FEFCFA", "S= c #FBF6F2", "T= c #F6EDE6", "U= c #F1E0D2", "V= c #EACEAD", "W= c #E8C781", "X= c #F2D465", "Y= c #FBE45D", "Z= c #FFEA5A", "`= c #FFEA55", " - c #FFE94C", ".- c #FFE840", "+- c #FFE530", "@- c #FFE31D", "#- c #FFE20D", "$- c #FBDC00", "%- c #EDCE00", "&- c #C48F00", "*- c #894C00", "=- c #717182", "-- c #85859B", ";- c #9191AB", ">- c #9999B4", ",- c #9E9EB8", "'- c #BEBECF", ")- c #D3D3DE", "!- c #E1E1EA", "~- c #E7E7EF", "{- c #BCBCCC", "]- c #E0BB94", "^- c #DD9108", "/- c #FBD100", "(- c #FFDD00", "_- c #FFDC00", ":- c #FFDC01", "<- c #FFDD06", "[- c #FFDF0F", "}- c #FFE01C", "|- c #FFE22A", "1- c #FFE438", "2- c #FFE542", "3- c #FEE64A", "4- c #FADF51", "5- c #F0D05F", "6- c #E8C57F", "7- c #EACDAB", "8- c #F1DFCD", "9- c #F8EEE5", "0- c #FDF9F6", "a- c #FAF3ED", "b- c #F2DFCA", "c- c #EBCD96", "d- c #EECD6A", "e- c #F7DA54", "f- c #FDE44B", "g- c #FFE544", "h- c #FFE439", "i- c #FFE22C", "j- c #FFE11E", "k- c #FFDF11", "l- c #FFDD07", "m- c #FFDD02", "n- c #FAD300", "o- c #D49400", "p- c #985200", "q- c #353541", "r- c #58586C", "s- c #6A6A85", "t- c #767694", "u- c #8080A0", "v- c #9A9AB1", "w- c #ACACBF", "x- c #E5E5ED", "y- c #E7CDB2", "z- c #D78B18", "A- c #F6C300", "B- c #FEDA00", "C- c #FFD900", "D- c #FFD901", "E- c #FFDA02", "F- c #FFDA07", "G- c #FFDB0E", "H- c #FFDC17", "I- c #FFDE21", "J- c #FEDF2B", "K- c #FADA34", "L- c #F2CD42", "M- c #EAC059", "N- c #E7BE74", "O- c #E9C594", "P- c #F0D9C1", "Q- c #FAF1EA", "R- c #FEFDFC", "S- c #FFFEFC", "T- c #FCF7F2", "U- c #F5E4D1", "V- c #EDCE9A", "W- c #EDC765", "X- c #F5D144", "Y- c #FCDB35", "Z- c #FFDF2C", "`- c #FFDE23", " ; c #FFDD19", ".; c #FFDC0F", "+; c #FFDA08", "@; c #FFDA03", "#; c #FFDA00", "$; c #F4C600", "%; c #C78300", "&; c #8A4700", "*; c #272736", "=; c #404056", "-; c #505070", ";; c #8989A3", ">; c #D8D8E3", ",; c #EFDECD", "'; c #D28F35", "); c #EEB102", "!; c #FED400", "~; c #FFD600", "{; c #FFD601", "]; c #FFD702", "^; c #FFD705", "/; c #FFD809", "(; c #FFD80E", "_; c #FDD614", ":; c #F9D01C", "<; c #F3C627", "[; c #EBBA38", "}; c #E6B760", "|; c #ECCDA7", "1; c #F8EEE4", "2; c #FDFAF6", "3; c #F6E7D7", "4; c #EDCB9B", "5; c #EABD5A", "6; c #F2C530", "7; c #FAD21E", "8; c #FED816", "9; c #FFD810", "0; c #FFD80A", "a; c #FFD706", "b; c #FED500", "c; c #ECB500", "d; c #B77100", "e; c #4B4B58", "f; c #CCCCDC", "g; c #F5EBE2", "h; c #D7A160", "i; c #E3A009", "j; c #FBCB00", "k; c #FFD300", "l; c #FFD401", "m; c #FFD402", "n; c #FFD304", "o; c #FDD106", "p; c #F9CB0A", "q; c #F0BC1A", "r; c #E8B54E", "s; c #EDCFA6", "t; c #FAF1E8", "u; c #FEFDFA", "v; c #F9EEE3", "w; c #EFD0A8", "x; c #E8B65C", "y; c #EDB825", "z; c #F7C80E", "A; c #FDD107", "B; c #FFD305", "C; c #FFD403", "D; c #FBCD00", "E; c #DE9F01", "F; c #A76000", "G; c #EEE9E8", "H; c #E3BE95", "I; c #D6911B", "J; c #F4BB00", "K; c #FED000", "L; c #FFD100", "M; c #FECF00", "N; c #FAC803", "O; c #F0B818", "P; c #EAB75A", "Q; c #F1D7B6", "R; c #FCF6F0", "S; c #FCF6EF", "T; c #F2DABD", "U; c #E9B96D", "V; c #EBB12A", "W; c #F4BE0A", "X; c #FCCB02", "Y; c #FFD001", "Z; c #F4BE00", "`; c #C88504", " > c #7D4607", ".> c #8A8A9D", "+> c #D9D7E0", "@> c #EAD4BE", "#> c #CF913E", "$> c #E9A607", "%> c #FCC800", "&> c #FFCD00", "*> c #FECB00", "=> c #F9C204", "-> c #EFB423", ";> c #EBBD70", ">> c #F5E0C9", ",> c #ECC286", "'> c #EAAF38", ")> c #F2B80E", "!> c #FAC602", "~> c #FECC00", "{> c #E7A802", "]> c #BA7C1E", "^> c #8B6D5C", "/> c #58526A", "(> c #C4C3D5", "_> c #F0E6DF", ":> c #DCAF7B", "<> c #D79218", "[> c #F5B700", "}> c #FEC900", "|> c #FFCB00", "1> c #FFCA00", "2> c #FDC700", "3> c #F7BC09", "4> c #EEB333", "5> c #EFC68A", "6> c #F8EADA", "7> c #FDF9F5", "8> c #F9EBDF", "9> c #F0CB9E", "0> c #EBB24C", "a> c #F1B415", "b> c #FAC103", "c> c #FEC800", "d> c #F3B900", "e> c #D18F0B", "f> c #B68547", "g> c #998886", "h> c #46435B", "i> c #9999AE", "j> c #D8D4DC", "k> c #E7CEB5", "l> c #CC8F3F", "m> c #E6A00A", "n> c #FBC000", "o> c #FEC700", "p> c #FFC700", "q> c #FFC600", "r> c #FCC201", "s> c #F5B710", "t> c #EEB548", "u> c #F2D0A3", "v> c #FAEFE4", "w> c #FAF0E6", "x> c #F3D4B0", "y> c #EDB660", "z> c #F0B021", "A> c #F9BC06", "B> c #FEC500", "C> c #FEC600", "D> c #F9BF01", "E> c #E29F05", "F> c #BD7F24", "G> c #A8896B", "H> c #776F81", "I> c #13121F", "J> c #BEBDCE", "K> c #ECE2DC", "L> c #DDB489", "M> c #CF8A20", "N> c #EFAA02", "O> c #FDC000", "P> c #FFC400", "Q> c #FFC300", "R> c #FCBD03", "S> c #F4B31A", "T> c #F0BA5E", "U> c #F5D9B7", "V> c #FAEEE1", "W> c #F6DDC1", "X> c #EFBD75", "Y> c #F0AE2D", "Z> c #F7B60A", "`> c #FDC001", " , c #FCC000", "., c #EDAB02", "+, c #C88512", "@, c #B2854F", "#, c #918180", "$, c #454259", "%, c #767681", "&, c #A9A9BF", "*, c #C8C5CF", "=, c #E8D6C4", "-, c #CD995C", ";, c #D89013", ">, c #F3AE00", ",, c #FDBE00", "', c #FFC100", "), c #FEBF00", "!, c #FAB807", "~, c #F3B228", "{, c #F1C175", "], c #F6DFC3", "^, c #F8E2CB", "/, c #F3C68A", "(, c #F1B03D", "_, c #F6B110", ":, c #FCBB02", "<, c #FFC000", "[, c #F3B001", "}, c #D28D0A", "|, c #B77F38", "1, c #A18775", "2, c #6C667B", "3, c #6C6C81", "4, c #C7C7D8", "5, c #B3B3C5", "6, c #A4A3B6", "7, c #DBD5D8", "8, c #E0C6A9", "9, c #C68A3E", "0, c #DD930E", "a, c #F4AF01", "b, c #FDBC00", "c, c #FFBE00", "d, c #FFBD00", "e, c #FEBB01", "f, c #F9B40C", "g, c #F3B239", "h, c #F6DBBE", "i, c #F4CD9D", "j, c #F1B350", "k, c #F5AD18", "l, c #FCB604", "m, c #FFBC00", "n, c #FEBC00", "o, c #F5B101", "p, c #DA9207", "q, c #B97B28", "r, c #AA896A", "s, c #786E79", "t, c #72708B", "u, c #ADADC2", "v, c #51515E", "w, c #AFAFC0", "x, c #BDBDCE", "y, c #D5D5E0", "z, c #C5C5D3", "A, c #A9A8B9", "B, c #E4DAD5", "C, c #DBBA96", "D, c #C28435", "E, c #DC940F", "F, c #F3AB02", "G, c #FDB700", "H, c #FEBA00", "I, c #FFBB00", "J, c #FFBA00", "K, c #FFB900", "L, c #FDB602", "M, c #F8B014", "N, c #F2B34B", "O, c #F2C793", "P, c #F3CC9F", "Q, c #F1B761", "R, c #F4AA21", "S, c #FAB006", "T, c #FEB700", "U, c #FEBB00", "V, c #FDB800", "W, c #F4AD01", "X, c #DB9106", "Y, c #BA7922", "Z, c #AC8762", "`, c #867A7E", " ' c #6D6B84", ".' c #ADACBF", "+' c #A5A5BB", "@' c #9494AC", "#' c #7F7F8B", "$' c #ADABBB", "%' c #E3D7CE", "&' c #D7B590", "*' c #C08234", "=' c #D88F11", "-' c #F1A403", ";' c #FBB201", ">' c #FEB600", ",' c #FFB700", "'' c #FBB205", ")' c #F5AC1E", "!' c #F1B258", "~' c #F0BF87", "{' c #F1B86E", "]' c #F2A92E", "^' c #F8AC0A", "/' c #FDB301", "(' c #FFB600", "_' c #FFB800", ":' c #FCB300", "<' c #F1A701", "[' c #D88C07", "}' c #B87621", "|' c #AE855E", "1' c #8F8180", "2' c #64617C", "3' c #C9C8D4", "4' c #DFDFE8", "5' c #AAAABE", "6' c #9C9CB5", "7' c #656578", "8' c #C2C2D5", "9' c #BCBCCB", "0' c #E7E7EE", "a' c #B1AEBC", "b' c #D5B391", "c' c #BE823C", "d' c #D28613", "e' c #EC9D04", "f' c #F8AC01", "g' c #FEB200", "h' c #FEB301", "i' c #FAAE07", "j' c #F3A824", "k' c #EEAA55", "l' c #EDAF65", "m' c #F0A93C", "n' c #F7A811", "o' c #FDAF02", "p' c #FFB300", "q' c #FFB400", "r' c #FEB300", "s' c #F9AD01", "t' c #EC9D01", "u' c #D08409", "v' c #B57627", "w' c #AC8561", "x' c #928382", "y' c #636079", "z' c #EDEDF4", "A' c #9B9BB3", "B' c #8E8EAB", "C' c #ADADBE", "D' c #B8B8CA", "E' c #DADAE4", "F' c #A5A5B9", "G' c #A8A5B6", "H' c #D9CFCA", "I' c #D5B89C", "J' c #BD874C", "K' c #C67C19", "L' c #E28E07", "M' c #F2A101", "N' c #FAAB01", "O' c #F9A807", "P' c #F09E1D", "Q' c #EA9B38", "R' c #ED9F36", "S' c #F4A417", "T' c #FBAA04", "U' c #FEAF00", "V' c #FFB000", "W' c #FEB000", "X' c #FBAD00", "Y' c #F2A301", "Z' c #E18F03", "`' c #C37910", " ) c #B07634", ".) c #AA886B", "+) c #8C7E81", "@) c #65627B", "#) c #F1F1F5", "$) c #B8B8C9", "%) c #8E8EAA", "&) c #6C6C87", "*) c #CACAD8", "=) c #A09EB0", "-) c #CDC6C8", ";) c #D8C3AF", ">) c #C4996E", ",) c #B8772C", "') c #CD7E0F", ")) c #E38D04", "!) c #EE9603", "~) c #EF960B", "{) c #EE9514", "]) c #F39D11", "^) c #F9A605", "/) c #FEAC00", "() c #FFAD00", "_) c #FFAC00", ":) c #FBA800", "<) c #F29F01", "[) c #E58F02", "}) c #CB7B09", "|) c #B36F1F", "1) c #AB7D4D", "2) c #A48C7A", "3) c #827881", "4) c #6B6881", "5) c #EAEAF0", "6) c #DCDCE6", "7) c #A2A2B7", "8) c #7F7F9E", "9) c #3D3D4F", "0) c #BFBFD2", "a) c #BDBDCC", "b) c #F6F6FA", "c) c #ABABBE", "d) c #9695AB", "e) c #BDB9C1", "f) c #D6CAC3", "g) c #CEB39A", "h) c #BA8A5C", "i) c #B6732B", "j) c #C57513", "k) c #D67D08", "l) c #E38605", "m) c #EE9302", "n) c #F59E00", "o) c #F9A400", "p) c #FBA600", "q) c #FBA700", "r) c #FAA500", "s) c #F8A200", "t) c #F19A00", "u) c #E79001", "v) c #D98405", "w) c #C5740D", "x) c #B16C20", "y) c #AA7744", "z) c #A88A70", "A) c #9A8B89", "B) c #726D81", "C) c #6A6985", "D) c #E9E9F0", "E) c #CECEDA", "F) c #8888A4", "G) c #6A6A8A", "H) c #A2A2B1", "I) c #B9B9CB", "J) c #D1D1DD", "K) c #757596", "L) c #7E7D9A", "M) c #A4A2B7", "N) c #C2BEC5", "O) c #D1C5BE", "P) c #C9B09B", "Q) c #B88F69", "R) c #AF743D", "S) c #B46D23", "T) c #BF7014", "U) c #CA760B", "V) c #D37C07", "W) c #DA8004", "X) c #DC8304", "Y) c #D88004", "Z) c #D37B05", "`) c #CA7509", " ! c #BE6E0F", ".! c #B1691C", "+! c #A76C32", "@! c #A67B53", "#! c #A78C77", "$! c #9E908D", "%! c #878190", "&! c #696784", "*! c #8786A1", "=! c #AAAABC", "-! c #DCDCE5", ";! c #757595", ">! c #4A4A66", ",! c #A1A1B3", "'! c #C1C1D3", ")! c #B9B9CA", "!! c #8B8BA6", "~! c #6A6A8F", "{! c #474764", "]! c #363645", "^! c #7C7C95", "/! c #A2A0B7", "(! c #B7B3BF", "_! c #C4BCBD", ":! c #C7B7AD", "~ c #9A9AB3", ",~ c #7C7C9C", "'~ c #6D6D77", ")~ c #BABACE", "!~ c #D5D5E1", "~~ c #AEAEC1", "{~ c #8787A5", "]~ c #373748", "^~ c #71718B", "/~ c #8080A1", "(~ c #ABABBF", "_~ c #626286", ":~ c #F4F4FA", "<~ c #7E7E9A", "[~ c #7D7D98", "}~ c #8989AA", "|~ c #6F6F8C", "1~ c #313141", "2~ c #B6B6CB", "3~ c #7A7A9B", "4~ c #46465A", "5~ c #717193", "6~ c #5D5D7F", "7~ c #5D5D77", "8~ c #747493", "9~ c #363646", "0~ c #ABABC0", "a~ c #B0B0C3", "b~ c #F0F0F6", "c~ c #F0F0F5", "d~ c #D7D7E2", "e~ c #9595AE", "f~ c #686888", "g~ c #535371", "h~ c #1F1F2F", "i~ c #58586E", "j~ c #DADAE7", "k~ c #61617F", "l~ c #E0E0E9", "m~ c #8888A5", "n~ c #555570", "o~ c #52526B", "p~ c #A1A1BE", "q~ c #5E5E7C", "r~ c #88889D", "s~ c #A2A2B9", "t~ c #D7D7E1", "u~ c #343448", "v~ c #222234", "w~ c #5A5A6A", "x~ c #9C9CB6", "y~ c #EEEEF5", "z~ c #ECECF3", "A~ c #6E6E91", "B~ c #9898B3", "C~ c #C1C1D0", "D~ c #EEEEF3", "E~ c #9595AF", "F~ c #8A8AA6", "G~ c #B3B3C6", "H~ c #8383A1", "I~ c #4C4C6C", "J~ c #D0D0DD", "K~ c #CFCFDC", "L~ c #CBCBDB", "M~ c #CECEDB", "N~ c #717195", "O~ c #313148", "P~ c #5B5B70", "Q~ c #73738E", "R~ c #686883", "S~ c #656580", "T~ c #5F5F7D", "U~ c #5B5B79", "V~ c #555575", "W~ c #555576", " ", " . + @ # $ % & ", " * = - ; > , ' ' ' ) ! ~ ", " { ] ^ ' / ( _ : < [ } | ' ' ' ' 1 2 ", " 3 4 5 6 7 8 9 0 a b c d ' ' ' e f g ", " h i j k l ' ' m n o p q r e ' ' s # ", " t u l ' ' ' ' 6 v w x y d ' ' e z A ", " B C ' ' ' ' ' ' ' D E F G H I J K L M N O P Q R S T s s U V ", " W X ' ' ' ' ' ' ' ' Y Z ` ...+.@.#.$.%.&.*.=.| -.;.>.,.'.).!.d ~.~.~.~.1 {. ", " ].^./.' ' ' ' ' ' ' ' l (._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.| | c.c.c.d.e. ", " f.g.' ' ' ' ' ' ' = h.i.j.k.l.m.n.o.p.q.r.s.f 6.f t.u.v.w.6.6., , , , x.y. ", " z.A.B.' ' ' ' ' C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.S.S.W.X.X.X.X.Y.Z.`. ", " +.+++' ' ' C @+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+d.d.]+d.d.d.d.^+^+^+/+! (+_+:+<+ ", " [+g.6 ' }+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+g+h+h+h+h+h+i+i+i+j+k+l+m+n+o+p+q+ ", " r+s+t+}+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+g+O+O+O+O+O+P+Q+R+j+S+T+U+V+W+X+ ", " Y+Z+`+ @.@+@@@#@$@%@&@*@D+=@-@;@>@,@'@)@!@~@{@]@^@/@@ (@_@:@:@! <@[@}@|@1@2@3@4@ ", " 5@6@7@8@9@0@a@b@c@d@e@f@f@f@g@h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@w@x@y@z@A@B@C@D@E@F@G@ ", " H@I@J@K@L@M@N@O@P@Q@Q@Q@Q@R@S@T@U@V@W@X@X@Y@Z@`@ #.#+#@###$#%#&#*#=#-#-#;#>#,#'#)# ", " !#~#{#]#^#/#(#_#C+:#:#:#:#<#[#}#|#1#2#W@W@W@W@3#4#5#6#7#8#9#0#a#b#c#d#d#d#d#e#f#g#h#i# ", " j#k#l#m#n#o#p#q#r#r#r#r#r#s#t#u#v#w#m@X@X@X@l@x#y#z#A#B#C#D#E#F#G#H#H#H#H#H#H#I#J#K#L#M# ", " N#O#P#Q#p.R#_#S#S#S#S#S#S#T#U#V#W#X#Y#Z#Z#Z#`# $.$+$@$#$$$%$&$*$=$-$;$;$;$;$;$;$>$,$'$*$)$ ", " !$~${$]$^$/$($_$:$_$_$_$_$<$[$}$|$1$2$3$4$4$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$h$h$h$h$h$i$j$k$e$l$ ", " m$n$o$p$q$r$s$t$u$u$u$u$u$u$v$w$x$y$z$A$B$C$C$C$D$E$F$G$H$I$J$K$L$M$N$O$P$Q$R$R$R$S$T$U$V$U$W$X$Y$ ", " Z$`$ %.%+%@%#%$%%%&%*%=%-%-%-%-%-%-%;%>%,%'%)%!%~%{%]%^%/%(%_%:%<%[%}%|%1%2%3%4%5%6%7%8%8%9%0%H#a%b%c%d%e% ", " f%g%h%i%j%k%l%g.m%n%o%p%q%r%s%t%u%v%v%v%v%v%u%w%x%y%z%A%B%C%D%_%E%F%F%G%H%I%J%K%L%M%N%v%O%P%Q%R%S%T%U%V%W%X%Y%Z%`% &.& ", "+&@&#&m%B.$&%&&&' ' j *&=&-&;&>&,&'&'&'&'&'&'&'&)&!&~&{&]&^&/&(&_&:&<&[&<&}&|&1&2&!&3&'&'&'&4&5&6&7&8&9&V%Z%0&a&b&c&d&e& ", "f&g&' ' ' ' ' ' ' ' h&%&i&j&k&l&m&n&n&n&n&n&n&n&o&p&q&r&s&t&u&v&w&x&y&y&z&A&B&C&D&E&n&n&n&n&n&F&G&H&I&J&K&L&M&N&O&P&Q&R& ", "S&C ' ' ' ' ' ' ' &&h&T&U&V&W&X&Y&Z&`& *`&`&`&`&`&.*+*@*#*$*%*&***=*-*;*>*,*'*)*!*~*`&`&`&`&`&`&{*]*^*/*(*_*-$:*(*<*[*}* ", ".+|*' ' ' ' ' ' ' 1*2*&&3*4*5*6*7*8*9*0*a*a*a*a*a*a*a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*a*a*a*a*a*0*r*s*t*u*v*v*v*w*x*y* ", "z*9 ' ' ' ' ' ' ' T&h&= A*B*C*D*E*F*G*H*I*J*K*K*L*K*K*M*N*O*P*Q*R*S*T*U*V*W*X*Y*Z*`* =K*L*K*.=+=@=#=$=%=&=*===-=;=>= ", ",=$&' ' ' ' ' ' ' '=u )=!=~={=]=^=/=(=_=:=<=[=}=}=|=1=2=3=4=5=6=7=S*T*8=9=0=a=b=c=d=e=f=}=g=h=i=j=k=l=m=n=o=p=q=r= ", "s=t=m%u=v=&&' ' ' - w=++x=y=z=A=B=C=D=E=F=G=H=I=J=K=L=M=N=O=P=Q=T*S*S*R=S=T=U=V=W=X=Y=Z=`= -.-+-@-#-C=B=$-%-&-*- ", "=---;->-,-.+'-)-!-~-{-m ]-^-/-(-_-_-:-<-[-}-|-1-2-3-4-5-6-7-8-9-0-T*S*7=R=a-b-c-d-e-f-g-h-i-j-k-l-m-_-_-(-n-o-p- ", " q-r-s-t-u-[+v-w-x-y-z-A-B-C-C-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S*S-T-U-V-W-X-Y-Z-`- ;.;+;@;D-C-C-C-#;$;%;&; ", " *;=;-;;;>;,;';);!;~;~;~;~;~;{;];^;/;(;_;:;<;[;};|;1;R*7=2;3;4;5;6;7;8;9;0;a;];{;~;~;~;~;~;b;c;d; ", " e;f;g;h;i;j;k;k;k;k;k;k;k;k;l;m;n;o;p;q;r;s;t;S-u;v;w;x;y;z;A;B;C;l;k;k;k;k;k;k;k;k;D;E;F; ", " S&G;H;I;J;K;L;L;L;L;L;L;L;L;L;L;M;N;O;P;Q;R;T*S;T;U;V;W;X;Y;L;L;L;L;L;L;L;L;L;L;K;Z;`; > ", " .>+>@>#>$>%>&>&>&>&>&>&>&>&>&>&>*>=>->;>>>2;2;#%,>'>)>!>~>&>&>&>&>&>&>&>&>&>&>&>%>{>]>^>/> ", " (>_>:><>[>}>|>1>1>1>1>1>1>1>1>2>3>4>5>6>7>8>9>0>a>b>c>1>1>1>1>1>1>1>1>1>1>1>c>d>e>f>g>h> ", " i>j>k>l>m>n>o>p>p>p>p>p>p>p>q>r>s>t>u>v>w>x>y>z>A>B>p>p>p>p>p>p>p>p>p>p>p>C>D>E>F>G>H>I> ", " J>K>L>M>N>O>P>P>P>P>P>P>P>Q>R>S>T>U>V>W>X>Y>Z>`>P>P>P>P>P>P>P>P>P>P>P>P> ,.,+,@,#,$, ", " %,&,*,=,-,;,>,,,',',',',',',),!,~,{,],^,/,(,_,:,<,',',',',',',',',',',',),[,},|,1,2,3, ", " 4,5,6,7,8,9,0,a,b,c,c,c,c,d,e,f,g,/,h,i,j,k,l,m,c,c,c,c,c,c,c,c,c,c,c,n,o,p,q,r,s,t,u,v, ", " w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,J,I,I,I,I,I,I,I,I,I,U,V,W,X,Y,Z,`, '.'+'@' ", " #'8 n%%&' n $'%'&'*'='-';'>','>''')'!'~'{']'^'/'(','_'_'_'_'_'_'_'_'>':'<'['}'|'1'2'3'4'5'6'7' ", " 8'9'0'' ' &&5'a'1+b'c'd'e'f'g'h'i'j'k'l'm'n'o'p'p'q'q'q'q'q'q'q'q'r's't'u'v'w'x'y'(.%&z'j A'B' ", " C'D'E'' ' ' ' Y F'G'H'I'J'K'L'M'N'O'P'Q'R'S'T'U'V'V'V'V'V'V'V'V'W'X'Y'Z'`' ).)+)@)w,#)$&$&0'$)%)&) ", " W *)' ' ' ' ' ' l .'=)-);)>),)')))!)~){)])^)/)()()_)_)()()()/):)<)[)})|)1)2)3)4)9'%&$&5)g&*&6)7)8)9) ", " 0)a)b)' ' ' ' ' ' ' T&c)d)e)f)g)h)i)j)k)l)m)n)o)p)q)q)p)r)s)t)u)v)w)x)y)z)A)B)C)/+Y *&5)g&^ ^ D)E)F)G) ", " H)I)g&' ' ' ' ' ' ' C J)z*K)L)M)N)O)P)Q)R)S)T)U)V)W)X)X)Y)Z)`) !.!+!@!#!$!%!&!*!=!$)-!m g&0'^ x-x-^ + ;!>! ", " ,!'!' ' ' ' ' ' ' 5 )!!!~!{! ]!^!/!(!_!:!~,~H! '~)~{-g&o%>;y,!~0 E'~~{~]~ ^~/~ %E)(~_~n ' :~<~ ", " [~}~|~1~ 2~$)9 1*'=b)Y T&X Z+3~ 4~5~;!6~7~)~0'' :~8~ ", " 9~ 0~a~5 Y C b~c~++d~e~f~ g~h~ i~e!z'j~k~ ", " ( 0~l~Y b~c~9 %&#&m~n~ o~p~q~ ", " r~s~t~Y c~9 9 9 w=,~u~ v~ ", " w~x~E)++9 y~|*z~(~A~ ", " B~C~C y~D~|*^ E~6~ ", " F~G~Y ++C ++l~H~I~ ", " ^!x~J~K~L~M~k%N~O~ ", " P~Q~R~S~T~U~V~W~ ", " "}; unixODBC-2.2.14-p2/odbcinstQ4/WizardCreateDataSourceName.xpm0100644000076400007640000032410610725377167022122 0ustar nicknick/* XPM */ static const char * xpmWizardCreateDataSourceName[] = { "100 275 3277 2", " c None", ". c #000000", "+ c #000001", "@ c #010000", "# c #010001", "$ c #000100", "% c #000101", "& c #010100", "* c #010101", "= c #010201", "- c #020101", "; c #010102", "> c #020201", ", c #020102", "' c #020202", ") c #010202", "! c #020302", "~ c #030202", "{ c #020203", "] c #030302", "^ c #030303", "/ c #020303", "( c #030203", "_ c #030304", ": c #040303", "< c #030403", "[ c #040404", "} c #030404", "| c #040403", "1 c #040304", "2 c #050404", "3 c #848484", "4 c #CECECE", "5 c #3F3F3F", "6 c #040504", "7 c #050504", "8 c #040505", "9 c #040405", "0 c #050405", "a c #050505", "b c #050606", "c c #353535", "d c #333333", "e c #050506", "f c #060506", "g c #868686", "h c #B8B8B8", "i c #FAFAFA", "j c #F8F8F8", "k c #C2C2C2", "l c #262626", "m c #060605", "n c #050605", "o c #060505", "p c #060606", "q c #060706", "r c #070607", "s c #060607", "t c #060707", "u c #070606", "v c #070706", "w c #0E0605", "x c #A87C7A", "y c #C98481", "z c #E19B99", "A c #CB7672", "B c #B87572", "C c #664644", "D c #020000", "E c #656565", "F c #D8D8D8", "G c #F1F1F1", "H c #E4E4E4", "I c #D2D2D2", "J c #B3B3B3", "K c #171717", "L c #070707", "M c #080707", "N c #070708", "O c #070807", "P c #070808", "Q c #080708", "R c #080807", "S c #080808", "T c #483432", "U c #DF9D98", "V c #D26460", "W c #B90D06", "X c #BE211B", "Y c #C3312B", "Z c #C1241E", "` c #D66561", " . c #DE8380", ".. c #CA5A56", "+. c #BC5956", "@. c #310302", "#. c #666666", "$. c #DEDEDE", "%. c #EEEEEE", "&. c #E1E1E1", "*. c #D7D7D7", "=. c #6E6E6E", "-. c #080908", ";. c #080809", ">. c #080909", ",. c #090808", "'. c #090909", "). c #090908", "!. c #090809", "~. c #210F0D", "{. c #E6867F", "]. c #C11810", "^. c #BC0E07", "/. c #984643", "(. c #A16A68", "_. c #A46D6B", ":. c #A8706E", "<. c #A86866", "[. c #9F4542", "}. c #C41F18", "|. c #CA3D37", "1. c #D87672", "2. c #5F4644", "3. c #3E3E3E", "4. c #E3E3E3", "5. c #ECECEC", "6. c #E0E0E0", "7. c #D6D6D6", "8. c #090A09", "9. c #09090A", "0. c #0A090A", "a. c #0A0909", "b. c #0A0A09", "c. c #0A0A0A", "d. c #090A0A", "e. c #050000", "f. c #C7564E", "g. c #E77771", "h. c #BE0D06", "i. c #C32E28", "j. c #9D6866", "k. c #D38D8B", "l. c #D88F8D", "m. c #DC9492", "n. c #DF9795", "o. c #E39A98", "p. c #AF7372", "q. c #A34744", "r. c #CF433F", "s. c #BC615D", "t. c #63403F", "u. c #E2E2E2", "v. c #F6F6F6", "w. c #EAEAEA", "x. c #DFDFDF", "y. c #D5D5D5", "z. c #B2B2B2", "A. c #969696", "B. c #0B0A0A", "C. c #0A0A0B", "D. c #0A0B0A", "E. c #0B0B0B", "F. c #0B0B0A", "G. c #0B0A0B", "H. c #0A0B0B", "I. c #0B0B0C", "J. c #0B0C0B", "K. c #0C0B0B", "L. c #0C0C0B", "M. c #0B0C0C", "N. c #0C0B0C", "O. c #7B3735", "P. c #E57470", "Q. c #DE443A", "R. c #C20C07", "S. c #C74742", "T. c #CE8987", "U. c #D18D8A", "V. c #D5908E", "W. c #DA9491", "X. c #DE9795", "Y. c #E09A99", "Z. c #E39B9A", "`. c #B17776", " + c #A06261", ".+ c #AF7B7A", "++ c #F0E2E2", "@+ c #F4F4F4", "#+ c #E7E7E7", "$+ c #DDDDDD", "%+ c #D4D4D4", "&+ c #8E8E8E", "*+ c #0C0C0C", "=+ c #0D0C0C", "-+ c #0C0C0D", ";+ c #0C0D0C", ">+ c #0C0D0D", ",+ c #0D0C0D", "'+ c #0D0D0C", ")+ c #403433", "!+ c #D6605D", "~+ c #DE3930", "{+ c #E35D52", "]+ c #C70C07", "^+ c #CA4743", "/+ c #CC8A88", "(+ c #D08E8A", "_+ c #D4918F", ":+ c #D89593", "<+ c #DB9895", "[+ c #DF9B98", "}+ c #E29B9A", "|+ c #A06C6B", "1+ c #A18483", "2+ c #F1ECEC", "3+ c #F2F2F2", "4+ c #E6E6E6", "5+ c #DCDCDC", "6+ c #999999", "7+ c #676767", "8+ c #0D0D0D", "9+ c #0D0D0E", "0+ c #0E0D0D", "a+ c #0D0E0D", "b+ c #0E0E0D", "c+ c #0E0D0E", "d+ c #0D0E0E", "e+ c #0E0E0E", "f+ c #B66866", "g+ c #DB504D", "h+ c #DF4239", "i+ c #EB7469", "j+ c #CD0D08", "k+ c #CC3733", "l+ c #CC8B89", "m+ c #CF8F8C", "n+ c #D49390", "o+ c #D79693", "p+ c #DB9896", "q+ c #DD9B98", "r+ c #936463", "s+ c #967372", "t+ c #EEEAEA", "u+ c #EFEFEF", "v+ c #E5E5E5", "w+ c #B6B6B6", "x+ c #848080", "y+ c #302322", "z+ c #0F0E0E", "A+ c #0E0F0E", "B+ c #0E0E0F", "C+ c #0F0F0E", "D+ c #0F0E0F", "E+ c #0E0F0F", "F+ c #0F0F0F", "G+ c #383535", "H+ c #D8605D", "I+ c #D73A37", "J+ c #DF453D", "K+ c #F3958B", "L+ c #D4150E", "M+ c #D41A16", "N+ c #CC8C89", "O+ c #CF8F8D", "P+ c #D29390", "Q+ c #D59794", "R+ c #D89A98", "S+ c #B57D7C", "T+ c #947170", "U+ c #EFEDED", "V+ c #868383", "W+ c #722928", "X+ c #A03834", "Y+ c #340302", "Z+ c #100F0F", "`+ c #0F100F", " @ c #0F0F10", ".@ c #A4A4A4", "+@ c #BEBEBE", "@@ c #292929", "#@ c #100F10", "$@ c #10100F", "%@ c #101010", "&@ c #0F1010", "*@ c #101011", "=@ c #111010", "-@ c #101110", ";@ c #7F5D5D", ">@ c #D9423F", ",@ c #D01714", "'@ c #DB3A36", ")@ c #F5A499", "!@ c #E2423C", "~@ c #DC0F0A", "{@ c #D17572", "]@ c #D0928F", "^@ c #D29693", "/@ c #D89A97", "(@ c #CC8F8D", "_@ c #9D8280", ":@ c #EDEDED", "<@ c #BABABA", "[@ c #878383", "}@ c #835F5F", "|@ c #B26967", "1@ c #DB6C69", "2@ c #D77673", "3@ c #2F0301", "4@ c #111011", "5@ c #111111", "6@ c #B0B0B0", "7@ c #FBFBFB", "8@ c #AFAFAF", "9@ c #131313", "0@ c #101111", "a@ c #111110", "b@ c #111112", "c@ c #121111", "d@ c #121212", "e@ c #111211", "f@ c #111212", "g@ c #121112", "h@ c #4A4A4A", "i@ c #B96260", "j@ c #D62E2B", "k@ c #D40F09", "l@ c #DB100C", "m@ c #F3A299", "n@ c #F0847C", "o@ c #E20F0C", "p@ c #DC4642", "q@ c #D09692", "r@ c #D49996", "s@ c #D69C99", "t@ c #D89B98", "u@ c #D89C99", "v@ c #996B69", "w@ c #CCC1C1", "x@ c #858181", "y@ c #6E4E4E", "z@ c #C48483", "A@ c #EBA0A0", "B@ c #E78988", "C@ c #D14642", "D@ c #D47673", "E@ c #230201", "F@ c #121211", "G@ c #BDBDBD", "H@ c #C9C9C9", "I@ c #5A5A5A", "J@ c #121213", "K@ c #121312", "L@ c #131312", "M@ c #121313", "N@ c #131213", "O@ c #131212", "P@ c #393939", "Q@ c #D85755", "R@ c #D7322F", "S@ c #D70F0A", "T@ c #DF110C", "U@ c #F5ACA5", "V@ c #F7BBB5", "W@ c #E92B27", "X@ c #E71411", "Y@ c #D58E89", "Z@ c #D59B99", "`@ c #D79D9B", " # c #D79D9A", ".# c #D99F9C", "+# c #C68F8D", "@# c #9B706F", "## c #958887", "$# c #6D6565", "%# c #7B5656", "&# c #C08382", "*# c #E49E9C", "=# c #E99F9D", "-# c #EBA1A1", ";# c #E58381", "># c #C3130D", ",# c #BE4C47", "'# c #130101", ")# c #F9F9F9", "!# c #EBEBEB", "~# c #525252", "{# c #141313", "]# c #141314", "^# c #131314", "/# c #131414", "(# c #131413", "_# c #141414", ":# c #141413", "<# c #754C4B", "[# c #D63632", "}# c #D72622", "|# c #DF110B", "1# c #E7332E", "2# c #F8C2BC", "3# c #F7C6C3", "4# c #F38B86", "5# c #ED110E", "6# c #E55451", "7# c #D69F9C", "8# c #D8A09D", "9# c #D9A09D", "0# c #BF8A87", "a# c #956665", "b# c #704B4B", "c# c #956564", "d# c #B9817F", "e# c #D89493", "f# c #E59D9C", "g# c #ECA1A1", "h# c #E17471", "i# c #CB3E38", "j# c #702926", "k# c #1C1918", "l# c #E9E9E9", "m# c #A1A1A1", "n# c #989898", "o# c #5E5E5E", "p# c #151515", "q# c #151414", "r# c #151415", "s# c #141514", "t# c #151514", "u# c #141415", "v# c #141515", "w# c #151516", "x# c #161515", "y# c #151615", "z# c #8F4D4C", "A# c #D6312D", "B# c #D9100A", "C# c #E3120D", "D# c #F0746D", "E# c #F9C7C2", "F# c #F8CCC8", "G# c #F8CECC", "H# c #EB2B28", "I# c #F11613", "J# c #DC8D8A", "K# c #D7A29E", "L# c #D9A3A0", "M# c #DAA2A0", "N# c #DAA29F", "O# c #BC8885", "P# c #9D6F6E", "Q# c #966967", "R# c #A77573", "S# c #B17A79", "T# c #E39C9B", "U# c #E59E9D", "V# c #E99F9E", "W# c #ECA2A1", "X# c #883533", "Y# c #852723", "Z# c #E7DCDB", "`# c #B7B7B7", " $ c #505050", ".$ c #151616", "+$ c #161516", "@$ c #161615", "#$ c #161616", "$$ c #161617", "%$ c #161716", "&$ c #171616", "*$ c #161717", "=$ c #171617", "-$ c #C85352", ";$ c #DA3C39", ">$ c #DC100A", ",$ c #E5120E", "'$ c #F6A7A0", ")$ c #FBD9D6", "!$ c #F9D0CD", "~$ c #F9D5D2", "{$ c #F8A3A1", "]$ c #F41311", "^$ c #EF3E3B", "/$ c #D8A49F", "($ c #D9A4A0", "_$ c #DAA3A0", ":$ c #DAA09D", "<$ c #CE9592", "[$ c #AD7B7A", "}$ c #BE8684", "|$ c #C18886", "1$ c #D69492", "2$ c #E39D9C", "3$ c #E69F9E", "4$ c #AE8383", "5$ c #EDE4E4", "6$ c #F3F3F3", "7$ c #939393", "8$ c #171718", "9$ c #181717", "0$ c #171817", "a$ c #181718", "b$ c #181818", "c$ c #181817", "d$ c #171818", "e$ c #C84744", "f$ c #D62825", "g$ c #DE100C", "h$ c #E92722", "i$ c #FACDC6", "j$ c #FDE2DF", "k$ c #F9D3CE", "l$ c #F9D3CF", "m$ c #F9D2CE", "n$ c #F75350", "o$ c #F81312", "p$ c #E7716F", "q$ c #D8A39F", "r$ c #D9A4A1", "s$ c #DBA5A1", "t$ c #DAA09E", "u$ c #DA9F9C", "v$ c #CE9492", "w$ c #AD7A79", "x$ c #CA8E8D", "y$ c #D69593", "z$ c #8C5F5E", "A$ c #A98584", "B$ c #F0EDED", "C$ c #F0F0F0", "D$ c #DADADA", "E$ c #B5B5B5", "F$ c #888888", "G$ c #282828", "H$ c #181819", "I$ c #191818", "J$ c #181918", "K$ c #191819", "L$ c #191919", "M$ c #191918", "N$ c #181919", "O$ c #CE4744", "P$ c #D6201D", "Q$ c #E3120E", "R$ c #EF5D56", "S$ c #FACCC6", "T$ c #FDE1DE", "U$ c #FAD4D0", "V$ c #FAD0CB", "W$ c #FACAC6", "X$ c #F9BBB5", "Y$ c #F91F1D", "Z$ c #F91B1B", "`$ c #DF908D", " % c #D9A5A1", ".% c #D99D9A", "+% c #B68180", "@% c #C88D8C", "#% c #865A5A", "$% c #A28484", "%% c #8D8B8B", "&% c #191A19", "*% c #19191A", "=% c #1A1A19", "-% c #1A1919", ";% c #1A1A1A", ">% c #1A191A", ",% c #191A1A", "'% c #1A1A1B", ")% c #1B1A1A", "!% c #1A1B1B", "~% c #D25754", "{% c #DB2D29", "]% c #F4857C", "^% c #F9BEB6", "/% c #FAC8C0", "(% c #F76B63", "_% c #F73330", ":% c #FAC0B9", "<% c #F98A82", "[% c #FC1313", "}% c #F73130", "|% c #DA9F9B", "1% c #D8A5A0", "2% c #DAA19E", "3% c #D99E9B", "4% c #DA9E9B", "5% c #7A5452", "6% c #A18282", "7% c #DBDBDB", "8% c #978989", "9% c #5F1614", "0% c #1A0301", "a% c #081C04", "b% c #26501D", "c% c #28641B", "d% c #2A651C", "e% c #2B651D", "f% c #2C671D", "g% c #29531E", "h% c #24371E", "i% c #1B1C1B", "j% c #1B1B1A", "k% c #1B1B1B", "l% c #1A1B1A", "m% c #1C1B1B", "n% c #1B1B1C", "o% c #1C1C1B", "p% c #1B1C1C", "q% c #1C1C1C", "r% c #CE514F", "s% c #D8100A", "t% c #E4130E", "u% c #F8A096", "v% c #F9BAB1", "w% c #FAC2B9", "x% c #F7746D", "y% c #F51714", "z% c #F71513", "A% c #F95852", "B% c #FAC0B7", "C% c #FB504C", "D% c #FB1313", "E% c #F04B49", "F% c #E2AFAC", "G% c #D8A29F", "H% c #D8A19E", "I% c #D89E9C", "J% c #AF7B79", "K% c #968483", "L% c #B9B9B9", "M% c #9D9595", "N% c #8C5755", "O% c #901C07", "P% c #80A962", "Q% c #9AD58F", "R% c #7BC76B", "S% c #40B028", "T% c #38AD1D", "U% c #3BAE1F", "V% c #40B122", "W% c #71C55A", "X% c #9ED88E", "Y% c #93C086", "Z% c #283325", "`% c #1C1D1D", " & c #1C1D1C", ".& c #1C1C1D", "+& c #1D1C1C", "@& c #1D1D1C", "#& c #1D1D1D", "$& c #1D1C1D", "%& c #D06360", "&& c #DA120B", "*& c #E51C16", "=& c #F9AD9F", "-& c #F9B7AC", ";& c #F99E94", ">& c #F41713", ",& c #F51713", "'& c #F81513", ")& c #F9746D", "!& c #FAAFA4", "~& c #F92A28", "{& c #F81313", "]& c #E75E5B", "^& c #E1AEAC", "/& c #D6A09D", "(& c #D8A29E", "_& c #D79F9C", ":& c #D79C99", "<& c #85625F", "[& c #B7B5B4", "}& c #BBBBBB", "|& c #A09595", "1& c #865D5D", "2& c #B38879", "3& c #83C06F", "4& c #FCFCFC", "5& c #CAE7C4", "6& c #98D28D", "7& c #4DB338", "8& c #35AA1D", "9& c #38AB1E", "0& c #40AF25", "a& c #8FD07E", "b& c #BFE3B5", "c& c #EDF6EA", "d& c #B9DEAE", "e& c #293426", "f& c #1E1D1D", "g& c #1D1D1E", "h& c #1E1E1D", "i& c #1D1E1D", "j& c #1E1D1E", "k& c #1D1E1E", "l& c #1E1E1E", "m& c #CF6360", "n& c #E63229", "o& c #F7A7A4", "p& c #F9B0A4", "q& c #F23C35", "r& c #F31511", "s& c #F71512", "t& c #F81615", "u& c #F98278", "v& c #F99287", "w& c #F61815", "x& c #F31210", "y& c #E16863", "z& c #DEAAA7", "A& c #D49D9A", "B& c #D49D99", "C& c #D49B98", "D& c #D69B98", "E& c #805D5B", "F& c #A99D9C", "G& c #968887", "H& c #8A6060", "I& c #A06D6B", "J& c #67A74C", "K& c #A6D79E", "L& c #DAEBD7", "M& c #E6F0E4", "N& c #B4DCAC", "O& c #4DB039", "P& c #33A71B", "Q& c #36A81C", "R& c #39AA1F", "S& c #A8D89D", "T& c #D9ECD4", "U& c #EBF3E9", "V& c #C0E3B6", "W& c #70AB5E", "X& c #1F1F1F", "Y& c #1E1F1E", "Z& c #1F1E1F", "`& c #1F1E1E", " * c #1E1E1F", ".* c #1E1F1F", "+* c #1F1F1E", "@* c #201F1F", "#* c #1F1F20", "$* c #C8625F", "%* c #D9120B", "&* c #E84137", "** c #F68779", "=* c #EF1611", "-* c #F11511", ";* c #F31713", ">* c #F31612", ",* c #F51613", "'* c #F51411", ")* c #F51715", "!* c #F5776B", "~* c #F5665A", "{* c #F2130F", "]* c #F01511", "^* c #DD6A67", "/* c #DCA6A3", "(* c #D19996", "_* c #D19894", ":* c #D39895", "<* c #D59996", "[* c #D79996", "}* c #AB7674", "|* c #815858", "1* c #7D5453", "2* c #9F8369", "3* c #49AC3B", "4* c #83C67A", "5* c #B6DBB1", "6* c #E3F0E2", "7* c #DCF0D5", "8* c #D6F0CA", "9* c #D1EFC5", "0* c #D2ECC9", "a* c #EBF4EA", "b* c #CDE7C7", "c* c #A2D593", "d* c #79C660", "e* c #283A21", "f* c #20201F", "g* c #201F20", "h* c #202020", "i* c #1F2020", "j* c #212020", "k* c #212120", "l* c #202021", "m* c #212121", "n* c #202120", "o* c #202121", "p* c #BD615F", "q* c #DF3F3A", "r* c #E9483C", "s* c #FA9D8C", "t* c #EF453C", "u* c #EE1610", "v* c #F31613", "w* c #F21411", "x* c #F11A14", "y* c #F26356", "z* c #F14B40", "A* c #EC120F", "B* c #EA120F", "C* c #D9615D", "D* c #CC938F", "E* c #CF9491", "F* c #D09592", "G* c #D29592", "H* c #D39592", "I* c #D59693", "J* c #C38886", "K* c #A3706F", "L* c #828A55", "M* c #2C9E1D", "N* c #61B555", "O* c #94CA8C", "P* c #D7EDD0", "Q* c #B7EF98", "R* c #ACEC88", "S* c #CDEAC5", "T* c #92CD83", "U* c #7DC569", "V* c #5AB83F", "W* c #365D2B", "X* c #212122", "Y* c #222121", "Z* c #212221", "`* c #222222", " = c #212222", ".= c #222221", "+= c #222122", "@= c #973936", "#= c #E46561", "$= c #E94539", "%= c #F78A7B", "&= c #E41410", "*= c #EC1510", "== c #EF1411", "-= c #F11411", ";= c #F11310", ">= c #F21511", ",= c #EF1410", "'= c #E7130E", ")= c #E94335", "!= c #E72B23", "~= c #E6100C", "{= c #E3100C", "]= c #DF827F", "^= c #D69A97", "/= c #C98E89", "(= c #CB8E8B", "_= c #CD908D", ":= c #CF928F", "<= c #D1928F", "[= c #D3918F", "}= c #6E8E47", "|= c #249916", "1= c #2B9C1A", "2= c #40A430", "3= c #CAEBBE", "4= c #A6E883", "5= c #CCECC0", "6= c #3BA71F", "7= c #3EAA20", "8= c #41AC22", "9= c #356C25", "0= c #232222", "a= c #222322", "b= c #222223", "c= c #222323", "d= c #232322", "e= c #232223", "f= c #232323", "g= c #5B0503", "h= c #E36561", "i= c #E73F33", "j= c #E9514B", "k= c #E0120C", "l= c #EA1510", "m= c #ED1611", "n= c #EE1510", "o= c #EE1310", "p= c #ED120F", "q= c #EB110E", "r= c #E9100C", "s= c #E2110A", "t= c #DF281D", "u= c #DF1F17", "v= c #DA0F08", "w= c #DA645F", "x= c #D2908D", "y= c #C67975", "z= c #C88986", "A= c #CA8B88", "B= c #CE8C89", "C= c #D08C88", "D= c #748F49", "E= c #1F9510", "F= c #209511", "G= c #239713", "H= c #B9E5AB", "I= c #A0E37F", "J= c #C8EABD", "K= c #38A51E", "L= c #3EA921", "M= c #336922", "N= c #242424", "O= c #242324", "P= c #242423", "Q= c #232324", "R= c #232424", "S= c #232423", "T= c #242323", "U= c #242524", "V= c #252524", "W= c #242425", "X= c #252424", "Y= c #2C0301", "Z= c #E16561", "`= c #DE3D36", " - c #DC3D38", ".- c #E4150D", "+- c #E6150E", "@- c #EB140F", "#- c #EA140F", "$- c #E9130E", "%- c #E7120E", "&- c #E4110C", "*- c #DC0F08", "=- c #DA1B11", "-- c #D21009", ";- c #D20E08", ">- c #D10E08", ",- c #D5504C", "'- c #CF807B", ")- c #CE8F8C", "!- c #C38380", "~- c #C68380", "{- c #C78381", "]- c #C7827F", "^- c #6F8A45", "/- c #1D9210", "(- c #1F9210", "_- c #219311", ":- c #B7E3AA", "<- c #9AE17B", "[- c #C5E9BB", "}- c #37A21D", "|- c #39A51E", "1- c #3CA720", "2- c #336923", "3- c #252525", "4- c #252425", "5- c #242525", "6- c #252526", "7- c #262525", "8- c #252625", "9- c #252626", "0- c #262526", "a- c #030000", "b- c #D66560", "c- c #DD4A45", "d- c #DA3632", "e- c #DC110A", "f- c #E3150D", "g- c #E5170D", "h- c #E7140D", "i- c #E7140F", "j- c #E6130E", "k- c #E6120E", "l- c #E4120E", "m- c #E2110C", "n- c #DF0F0C", "o- c #DD0F0B", "p- c #DB0F0A", "q- c #D30D08", "r- c #CF0D07", "s- c #C90C07", "t- c #D0413D", "u- c #CB5E5A", "v- c #D08482", "w- c #BC7B77", "x- c #BD7875", "y- c #BE7977", "z- c #688540", "A- c #1B8F0E", "B- c #1E8F0F", "C- c #1F9110", "D- c #B4E2A8", "E- c #94DD77", "F- c #94DE77", "G- c #C2E8B7", "H- c #34A01C", "I- c #3AA41E", "J- c #326924", "K- c #262625", "L- c #262726", "M- c #262727", "N- c #272626", "O- c #262627", "P- c #272727", "Q- c #272627", "R- c #272726", "S- c #9B3A36", "T- c #E06660", "U- c #D7312D", "V- c #DC120A", "W- c #DF130A", "X- c #E1150D", "Y- c #E2150D", "Z- c #E0140D", "`- c #E0110B", " ; c #DE110B", ".; c #DC100B", "+; c #DA0F0A", "@; c #D80E09", "#; c #D50D08", "$; c #CF0E08", "%; c #CB0C07", "&; c #C80C07", "*; c #C20A06", "=; c #C10A05", "-; c #BC0A04", ";; c #C4332E", ">; c #C1342F", ",; c #CD6864", "'; c #CE8A87", "); c #B56E6B", "!; c #6E934F", "~; c #1A8C0D", "{; c #1C8E0E", "]; c #1E8E10", "^; c #B2E0A7", "/; c #8EDA73", "(; c #BEE6B4", "_; c #329D1A", ":; c #359F1C", "<; c #38A21D", "[; c #316823", "}; c #272827", "|; c #272728", "1; c #282727", "2; c #272828", "3; c #282728", "4; c #282827", "5; c #DC6660", "6; c #D5302C", "7; c #D5110A", "8; c #D8110A", "9; c #DA110A", "0; c #DB110A", "a; c #D51009", "b; c #D31009", "c; c #D00E08", "d; c #C90D08", "e; c #C60A07", "f; c #C20A05", "g; c #BF0A05", "h; c #BB0905", "i; c #B50904", "j; c #B10904", "k; c #AF0804", "l; c #AD0803", "m; c #B32521", "n; c #BE3A38", "o; c #C85C59", "p; c #686C28", "q; c #19890C", "r; c #1A8A0E", "s; c #1C8B0F", "t; c #B0E0A5", "u; c #87D86E", "v; c #BCE5B2", "w; c #309A19", "x; c #339C1B", "y; c #306824", "z; c #282829", "A; c #292828", "B; c #282928", "C; c #282929", "D; c #292928", "E; c #292829", "F; c #29292A", "G; c #B6635F", "H; c #D2352F", "I; c #CC0F07", "J; c #D01007", "K; c #D20F08", "L; c #D10F08", "M; c #CE0D07", "N; c #C60C07", "O; c #C40A06", "P; c #C00A05", "Q; c #BD0905", "R; c #B90905", "S; c #B60904", "T; c #B10903", "U; c #AC0903", "V; c #A60703", "W; c #B22723", "X; c #AE120E", "Y; c #AE0C09", "Z; c #A30603", "`; c #9A0603", " > c #534A07", ".> c #17870C", "+> c #19870D", "@> c #1B880E", "#> c #ADDFA3", "$> c #82D56B", "%> c #B8E3AF", "&> c #2E9818", "*> c #319A1A", "=> c #349D1B", "-> c #316623", ";> c #292A2A", ">> c #2A2A29", ",> c #2A292A", "'> c #292A29", ")> c #2A2A2A", "!> c #2B2A2A", "~> c #2A2B2A", "{> c #2A2A2B", "]> c #2A2B2B", "^> c #2B2A2B", "/> c #3D3D3D", "(> c #B7A7A7", "_> c #B9130C", ":> c #C60D06", "<> c #C50E06", "[> c #C70E06", "}> c #C50C07", "|> c #C30C07", "1> c #BD0A05", "2> c #BC0905", "3> c #B90904", "4> c #B80905", "5> c #B20903", "6> c #AF0903", "7> c #A50703", "8> c #A20703", "9> c #9E0703", "0> c #990703", "a> c #940602", "b> c #A81D1A", "c> c #A41916", "d> c #A11916", "e> c #545310", "f> c #15840B", "g> c #17850C", "h> c #1A860D", "i> c #ACDEA2", "j> c #7ED267", "k> c #7ED268", "l> c #B5E2AC", "m> c #2D9518", "n> c #2F9819", "o> c #329B1B", "p> c #316724", "q> c #2B2B2B", "r> c #2B2B2A", "s> c #2C2B2B", "t> c #2B2C2B", "u> c #2C2B2C", "v> c #2C2C2B", "w> c #2B2B2C", "x> c #2B2C2C", "y> c #A7A7A7", "z> c #6A6A6A", "A> c #653938", "B> c #B20C06", "C> c #BB0D06", "D> c #BA0D06", "E> c #B90B04", "F> c #B70A04", "G> c #B40A04", "H> c #B30903", "I> c #AF0803", "J> c #AE0803", "K> c #AB0703", "L> c #A90803", "M> c #9D0703", "N> c #9A0703", "O> c #950603", "P> c #910602", "Q> c #8D0602", "R> c #880602", "S> c #860602", "T> c #800502", "U> c #454906", "V> c #13810A", "W> c #16820B", "X> c #17840D", "Y> c #AADDA0", "Z> c #79D064", "`> c #B3E1A9", " , c #2A9317", "., c #309819", "+, c #2C2C2C", "@, c #2D2C2C", "#, c #2C2C2D", "$, c #2C2D2C", "%, c #2C2D2D", "&, c #2D2D2C", "*, c #2D2D2D", "=, c #2D2C2D", "-, c #787878", ";, c #707070", ">, c #4E4E4E", ",, c #210201", "', c #990903", "), c #C23B36", "!, c #AE0A04", "~, c #AC0A04", "{, c #AA0803", "], c #A80803", "^, c #A70803", "/, c #A30B06", "(, c #8F2E16", "_, c #663C0A", ":, c #4C4702", "<, c #4A4602", "[, c #474603", "}, c #464503", "|, c #454604", "1, c #424604", "2, c #434605", "3, c #454605", "4, c #444605", "5, c #286407", "6, c #127F09", "7, c #14800B", "8, c #16810C", "9, c #A8DCA0", "0, c #74CD61", "a, c #75CD61", "b, c #B0DFA8", "c, c #299115", "d, c #2B9317", "e, c #2E9618", "f, c #30801D", "g, c #316824", "h, c #336A25", "i, c #346B26", "j, c #366B27", "k, c #376D28", "l, c #396E28", "m, c #3B6F29", "n, c #3C712A", "o, c #3E732B", "p, c #426633", "q, c #44543E", "r, c #2F312F", "s, c #2D2E2E", "t, c #2D2D2E", "u, c #2D2E2D", "v, c #2E2D2E", "w, c #2E2E2E", "x, c #2E2E2D", "y, c #5B5B5B", "z, c #7F7F7F", "A, c #575757", "B, c #773A38", "C, c #B43C37", "D, c #A60903", "E, c #A40803", "F, c #A10703", "G, c #9F0703", "H, c #992C1C", "I, c #80A269", "J, c #51A951", "K, c #2E962E", "L, c #048003", "M, c #037C01", "N, c #047B02", "O, c #067B03", "P, c #087A03", "Q, c #087904", "R, c #0A7A05", "S, c #0C7A06", "T, c #0D7A07", "U, c #0F7B08", "V, c #117B09", "W, c #137D0A", "X, c #147E0B", "Y, c #A7DB9F", "Z, c #72CB5E", "`, c #72CC5E", " ' c #72CC5F", ".' c #73CC5F", "+' c #AEDEA5", "@' c #288F14", "#' c #2A9016", "$' c #2C9417", "%' c #2F9618", "&' c #32991A", "*' c #359C1B", "=' c #389F1E", "-' c #3BA120", ";' c #3EA521", ">' c #41A923", ",' c #45AB24", "'' c #48AE26", ")' c #4EB32B", "!' c #6CC14E", "~' c #87CC6C", "{' c #93C082", "]' c #485143", "^' c #2F2F2F", "/' c #2F2E2F", "(' c #2E2F2E", "_' c #2E2F2F", ":' c #2F302F", "<' c #302F2F", "[' c #2F2F30", "}' c #30302F", "|' c #3B3B3B", "1' c #606060", "2' c #323232", "3' c #3A3232", "4' c #643331", "5' c #933330", "6' c #9C0703", "7' c #9C0704", "8' c #9B0704", "9' c #922211", "0' c #6EAF67", "a' c #88C488", "b' c #66B266", "c' c #44A044", "d' c #037D03", "e' c #027A01", "f' c #037802", "g' c #057703", "h' c #067703", "i' c #077704", "j' c #097705", "k' c #0B7706", "l' c #0C7806", "m' c #0E7907", "n' c #0F7908", "o' c #127B09", "p' c #137C0A", "q' c #A4DA9B", "r' c #6ECA5B", "s' c #6FCA5B", "t' c #6FCA5C", "u' c #6FCB5C", "v' c #70CB5C", "w' c #A9DC9F", "x' c #268D14", "y' c #299015", "z' c #2B9116", "A' c #2E9418", "B' c #309719", "C' c #339A1B", "D' c #369E1C", "E' c #39A01F", "F' c #3DA320", "G' c #3FA622", "H' c #42A923", "I' c #46AD25", "J' c #4BB129", "K' c #79C55F", "L' c #93D07B", "M' c #ABDC99", "N' c #98D081", "O' c #404A3C", "P' c #303030", "Q' c #303130", "R' c #313031", "S' c #313030", "T' c #303031", "U' c #313130", "V' c #303131", "W' c #313131", "X' c #494949", "Y' c #474747", "Z' c #372D2D", "`' c #512E2C", " ) c #6C322F", ".) c #498737", "+) c #58AC58", "@) c #7ABC7A", "#) c #7CBC7C", "$) c #55A655", "%) c #007800", "&) c #017700", "*) c #037601", "=) c #047602", "-) c #057502", ";) c #067503", ">) c #087504", ",) c #0A7505", "') c #0B7506", ")) c #0D7606", "!) c #0E7807", "~) c #107809", "{) c #127A0A", "]) c #9FD796", "^) c #6AC758", "/) c #6BC859", "() c #6CC859", "_) c #A3DA99", ":) c #258B13", "<) c #278D14", "[) c #2C9217", "}) c #2F9518", "|) c #31971A", "1) c #349B1B", "2) c #379E1D", "3) c #3AA11F", "4) c #41A922", "5) c #44AB24", "6) c #47AE25", "7) c #83C76B", "8) c #9FD48C", "9) c #A1D78C", "0) c #8FD275", "a) c #6DAB53", "b) c #323332", "c) c #313132", "d) c #323131", "e) c #323132", "f) c #323231", "g) c #313232", "h) c #313231", "i) c #8A8A8A", "j) c #747474", "k) c #7D7D7D", "l) c #454545", "m) c #0F250F", "n) c #209320", "o) c #42A142", "p) c #64AF64", "q) c #98CA98", "r) c #B1D9AF", "s) c #A6D6A2", "t) c #A4D69F", "u) c #A3D69E", "v) c #A2D69D", "w) c #A1D69D", "x) c #A1D69B", "y) c #9FD69A", "z) c #9ED698", "A) c #9ED597", "B) c #9ED596", "C) c #9DD595", "D) c #9CD594", "E) c #80CD72", "F) c #67C656", "G) c #68C757", "H) c #69C757", "I) c #69C857", "J) c #69C858", "K) c #81CF71", "L) c #9FD895", "M) c #A2D999", "N) c #A4DA9C", "O) c #A7DB9E", "P) c #A9DCA1", "Q) c #ACDDA4", "R) c #AFDEA7", "S) c #B1E0AA", "T) c #B4E0AD", "U) c #B6E1B1", "V) c #B9E2B4", "W) c #BDE3B8", "X) c #CCE9C8", "Y) c #B4DCAF", "Z) c #AED9A0", "`) c #91D07B", " ! c #7FCB62", ".! c #6DC848", "+! c #3A4A34", "@! c #323333", "#! c #323233", "$! c #333233", "%! c #333332", "&! c #727272", "*! c #343433", "=! c #343333", "-! c #548354", ";! c #098609", ">! c #2A932A", ",! c #4FA34F", "'! c #ADD7AA", ")! c #60B954", "!! c #59B64D", "~! c #59B84D", "{! c #59B94D", "]! c #59BA4D", "^! c #59BB4D", "/! c #59BC4D", "(! c #5ABD4E", "_! c #5CBE4E", ":! c #5DBF4F", "~ c #007600", ",~ c #84C380", "'~ c #4FB045", ")~ c #4FB245", "!~ c #4FB345", "~~ c #4FB545", "{~ c #4FB645", "]~ c #4FB845", "^~ c #50B945", "/~ c #52BA46", "(~ c #54BB47", "_~ c #56BC48", ":~ c #58BD4A", "<~ c #5ABF4B", "[~ c #5CC04C", "}~ c #5EC14D", "|~ c #60C24E", "1~ c #61C34E", "2~ c #62C44F", "3~ c #63C450", "4~ c #64C550", "5~ c #65C550", "6~ c #61C34F", "7~ c #6EC85E", "8~ c #8BD37F", "9~ c #85CD7C", "0~ c #6CC165", "a~ c #1B9A15", "b~ c #089104", "c~ c #038E01", "d~ c #008A00", "e~ c #008600", "f~ c #68B462", "g~ c #4BB427", "h~ c #4FB82A", "i~ c #53BC2C", "j~ c #477A32", "k~ c #363637", "l~ c #363736", "m~ c #373737", "n~ c #373636", "o~ c #373637", "p~ c #363737", "q~ c #373736", "r~ c #007E00", "s~ c #007900", "t~ c #007400", "u~ c #7EC07A", "v~ c #4BAD42", "w~ c #4BAE42", "x~ c #4BB042", "y~ c #4BB142", "z~ c #4BB342", "A~ c #4BB542", "B~ c #4DB643", "C~ c #4FB744", "D~ c #51B845", "E~ c #53BA46", "F~ c #56BB48", "G~ c #58BC49", "H~ c #5ABE4A", "I~ c #5CBF4B", "J~ c #5EC04C", "K~ c #60C14D", "L~ c #61C24E", "M~ c #62C34E", "N~ c #63C34F", "O~ c #64C34F", "P~ c #64C44F", "Q~ c #66C351", "R~ c #80CE6F", "S~ c #90D483", "T~ c #86CF79", "U~ c #69C15D", "V~ c #2DA41E", "W~ c #1C9D0F", "X~ c #16990C", "Y~ c #109508", "Z~ c #0A9205", "`~ c #058F02", " { c #008B00", ".{ c #008200", "+{ c #63B25E", "@{ c #4AB327", "#{ c #4DB629", "${ c #51BB2B", "%{ c #373837", "&{ c #373838", "*{ c #373738", "={ c #383838", "-{ c #383738", ";{ c #383737", ">{ c #383837", ",{ c #383839", "'{ c #393838", "){ c #1C5D1C", "!{ c #007D00", "~{ c #007700", "{{ c #007200", "]{ c #7ABD76", "^{ c #46AA3F", "/{ c #46AB3F", "({ c #46AD3F", "_{ c #46AF3F", ":{ c #46B13F", "<{ c #46B23F", "[{ c #49B440", "}{ c #50B844", "|{ c #52BA45", "1{ c #55BB47", "2{ c #57BD48", "3{ c #5ABE49", "4{ c #5EC04B", "5{ c #5FC14C", "6{ c #69C557", "7{ c #7FCE6D", "8{ c #82CF72", "9{ c #7FCC6D", "0{ c #7ACB69", "a{ c #76C864", "b{ c #57BA42", "c{ c #33AA1A", "d{ c #2EA818", "e{ c #2AA516", "f{ c #25A214", "g{ c #209F11", "h{ c #1A9B0D", "i{ c #13970A", "j{ c #0C9306", "k{ c #068F03", "l{ c #008C00", "m{ c #008700", "n{ c #5FB05A", "o{ c #48B226", "p{ c #4CB528", "q{ c #50BA2A", "r{ c #457C32", "s{ c #393839", "t{ c #393938", "u{ c #383939", "v{ c #393A39", "w{ c #3A3939", "x{ c #3A393A", "y{ c #3A3A3A", "z{ c #39393A", "A{ c #3A3A39", "B{ c #393A3A", "C{ c #245325", "D{ c #007500", "E{ c #007100", "F{ c #5CA65C", "G{ c #0C840B", "H{ c #118A0F", "I{ c #169014", "J{ c #1B9618", "K{ c #219A1E", "L{ c #28A124", "M{ c #31A72C", "N{ c #3AAC32", "O{ c #48B240", "P{ c #52B747", "Q{ c #55B947", "R{ c #55B946", "S{ c #56BA47", "T{ c #59BB47", "U{ c #5CBD4A", "V{ c #68C155", "W{ c #5DBE48", "X{ c #42B229", "Y{ c #3BB01F", "Z{ c #3CB020", "`{ c #3CB01F", " ] c #3AAF1E", ".] c #37AD1D", "+] c #33AA1B", "@] c #29A516", "#] c #23A112", "$] c #15980B", "%] c #0D9407", "&] c #079003", "*] c #6DBA63", "=] c #46B125", "-] c #4AB427", ";] c #4EB929", ">] c #426A35", ",] c #3A3A3B", "'] c #3B3A3A", ")] c #3A3B3B", "!] c #3B3A3B", "~] c #3B3B3A", "{] c #3A3B3A", "]] c #314630", "^] c #006F00", "/] c #1F7D1F", "(] c #549F54", "_] c #4DA14D", ":] c #4CA24C", "<] c #4CA44C", "[] c #4CA54C", "}] c #4DA74C", "|] c #50A94D", "1] c #52AA4F", "2] c #54AB50", "3] c #58AD52", "4] c #5BB054", "5] c #5EB256", "6] c #62B457", "7] c #64B559", "8] c #4AB038", "9] c #33AB1B", "0] c #3EB221", "a] c #41B322", "b] c #42B423", "c] c #58BA3F", "d] c #72C05F", "e] c #71C05F", "f] c #70C05F", "g] c #6EBE5D", "h] c #6BBD5B", "i] c #69BC5A", "j] c #66BA58", "k] c #62B856", "l] c #5EB755", "m] c #5AB452", "n] c #57B251", "o] c #54B14F", "p] c #55B050", "q] c #68B75D", "r] c #55B43A", "s] c #45B025", "t] c #49B426", "u] c #4CB828", "v] c #3E5039", "w] c #3C3B3B", "x] c #3C3C3B", "y] c #3B3C3C", "z] c #3B3B3C", "A] c #3B3C3B", "B] c #3C3B3C", "C] c #3C3C3C", "D] c #106D10", "E] c #006E00", "F] c #006900", "G] c #006500", "H] c #006300", "I] c #006100", "J] c #005F00", "K] c #016000", "L] c #016001", "M] c #036101", "N] c #046202", "O] c #066403", "P] c #076503", "Q] c #086704", "R] c #64B656", "S] c #40B222", "T] c #43B424", "U] c #46B625", "V] c #47B726", "W] c #71C05D", "X] c #197D0D", "Y] c #1B7F0E", "Z] c #1E820F", "`] c #208510", " ^ c #228912", ".^ c #278F14", "+^ c #299216", "@^ c #2D9517", "#^ c #329C1A", "$^ c #369F1C", "%^ c #39A31D", "&^ c #3CA820", "*^ c #40AB21", "=^ c #43AF24", "-^ c #47B326", ";^ c #47972E", ">^ c #3C3C3D", ",^ c #3D3C3D", "'^ c #3D3C3C", ")^ c #3D3D3C", "!^ c #3C3D3D", "~^ c #3C3D3C", "{^ c #3D3E3D", "]^ c #374437", "^^ c #057205", "/^ c #006700", "(^ c #006000", "_^ c #005E00", ":^ c #005D00", "<^ c #005C00", "[^ c #015F01", "}^ c #025F01", "|^ c #056202", "1^ c #60B452", "2^ c #3FB221", "3^ c #44B524", "4^ c #48B726", "5^ c #4BB928", "6^ c #4DBA29", "7^ c #71C05A", "8^ c #177B0C", "9^ c #1A7F0D", "0^ c #1C810E", "a^ c #1E8410", "b^ c #218811", "c^ c #238A12", "d^ c #268E14", "e^ c #299116", "f^ c #2B9517", "g^ c #309B19", "h^ c #349E1B", "i^ c #38A31E", "j^ c #3FAA21", "k^ c #42AF23", "l^ c #44A827", "m^ c #3E4A3B", "n^ c #3E3E3D", "o^ c #3D3D3E", "p^ c #3E3D3E", "q^ c #3D3E3E", "r^ c #3F3E3E", "s^ c #3E3E3F", "t^ c #3E3F3E", "u^ c #3F3E3F", "v^ c #3F3F3E", "w^ c #384437", "x^ c #0F620F", "y^ c #006600", "z^ c #005B00", "A^ c #005A00", "B^ c #015D01", "C^ c #035F01", "D^ c #046002", "E^ c #056203", "F^ c #5EB34F", "G^ c #4CBA28", "H^ c #50BC2A", "I^ c #52BE2C", "J^ c #70C158", "K^ c #197E0D", "L^ c #1B810E", "M^ c #1D840F", "N^ c #1F8711", "O^ c #228A12", "P^ c #258D14", "Q^ c #279015", "R^ c #2A9416", "S^ c #2D9717", "T^ c #339E1A", "U^ c #36A21D", "V^ c #39A61E", "W^ c #3DAA20", "X^ c #40912A", "Y^ c #3F4B3B", "Z^ c #3F403F", "`^ c #403F40", " / c #403F3F", "./ c #40403F", "+/ c #3F4040", "@/ c #3F3F40", "#/ c #334833", "$/ c #254F24", "%/ c #1B531B", "&/ c #1A521A", "*/ c #1A531A", "=/ c #1B551A", "-/ c #0D5B0C", ";/ c #056102", ">/ c #056303", ",/ c #5AB14A", "'/ c #3DB120", ")/ c #4BB927", "!/ c #55BF2D", "~/ c #58C12F", "{/ c #70C155", "]/ c #16790B", "^/ c #187D0D", "// c #1A800E", "(/ c #24761A", "_/ c #2F6726", ":/ c #306828", "( c #444544", ",( c #454445", "'( c #1C551C", ")( c #015A00", "!( c #015C01", "~( c #45A636", "{( c #35AC1C", "]( c #51BD2B", "^( c #5AC230", "/( c #63C835", "(( c #6EC24C", "_( c #117809", ":( c #147C0A", "<( c #167F0B", "[( c #454546", "}( c #464546", "|( c #454645", "1( c #464545", "2( c #464645", "3( c #464646", "4( c #454646", "5( c #1D541D", "6( c #3CA130", "7( c #2FA819", "8( c #49B826", "9( c #59C230", "0( c #62BC44", "a( c #127C0A", "b( c #157F0B", "c( c #2D6928", "d( c #464647", "e( c #474646", "f( c #474647", "g( c #464746", "h( c #464747", "i( c #474746", "j( c #474748", "k( c #484847", "l( c #484747", "m( c #1D551D", "n( c #329D28", "o( c #26A314", "p( c #2DA718", "q( c #34AB1B", "r( c #50B238", "s( c #0F7808", "t( c #127C09", "u( c #147F0B", "v( c #2E6928", "w( c #484748", "x( c #484848", "y( c #474848", "z( c #484849", "A( c #494848", "B( c #494948", "C( c #484948", "D( c #484949", "E( c #494849", "F( c #1E561E", "G( c #015F00", "H( c #26951F", "I( c #1C9C0E", "J( c #22A012", "K( c #28A415", "L( c #2DA717", "M( c #30A919", "N( c #3DA62B", "O( c #0F7A07", "P( c #107D09", "Q( c #4A494A", "R( c #49494A", "S( c #4A4949", "T( c #4A4A49", "U( c #494A4A", "V( c #494A49", "W( c #1B9018", "X( c #0F9508", "Y( c #14980A", "Z( c #199B0D", "`( c #1D9D0F", " _ c #1F9E10", "._ c #2B9C1F", "+_ c #0E7B07", "@_ c #107E08", "#_ c #138209", "$_ c #2E6A28", "%_ c #4B4A4A", "&_ c #4B4B4A", "*_ c #4A4B4A", "=_ c #4A4A4B", "-_ c #4A4B4B", ";_ c #4B4B4B", ">_ c #4B4A4B", ",_ c #4B4C4B", "'_ c #1F581F", ")_ c #006200", "!_ c #0F890F", "~_ c #048E02", "{_ c #079004", "]_ c #0D9307", "^_ c #199415", "/_ c #0D7C07", "(_ c #0F7F08", "__ c #118309", ":_ c #2E6B29", "<_ c #4B4B4C", "[_ c #4B4C4C", "}_ c #4C4C4B", "|_ c #4C4B4B", "1_ c #4C4C4C", "2_ c #4C4B4C", "3_ c #4C4C4D", "4_ c #4D4D4C", "5_ c #2C572C", "6_ c #196D0E", "7_ c #367B19", "8_ c #378D1C", "9_ c #008800", "0_ c #2F8E2D", "a_ c #307E2B", "b_ c #1F7B19", "c_ c #157E0E", "d_ c #376432", "e_ c #4C4D4C", "f_ c #4C4D4D", "g_ c #4D4D4D", "h_ c #4D4C4C", "i_ c #4D4C4D", "j_ c #4E4D4D", "k_ c #4D4D4E", "l_ c #4D4E4D", "m_ c #4D4E4E", "n_ c #4E4D4E", "o_ c #3E533E", "p_ c #126C0A", "q_ c #327D19", "r_ c #528B23", "s_ c #709A28", "t_ c #40901A", "u_ c #077F06", "v_ c #078106", "w_ c #088207", "x_ c #439542", "y_ c #508F4D", "z_ c #378233", "A_ c #227C1D", "B_ c #167F0F", "C_ c #425942", "D_ c #4E4E4D", "E_ c #4E4F4E", "F_ c #4E4F4F", "G_ c #4E4E4F", "H_ c #4F4E4F", "I_ c #4F4E4E", "J_ c #4F4F4F", "K_ c #4F4F4E", "L_ c #4F504F", "M_ c #27711C", "N_ c #4A8C21", "O_ c #6C9A28", "P_ c #86A52A", "Q_ c #659B28", "R_ c #097704", "S_ c #037701", "T_ c #047902", "U_ c #158212", "V_ c #79A878", "W_ c #559253", "X_ c #388435", "Y_ c #227E1D", "Z_ c #22751E", "`_ c #504F4F", " : c #4F5050", ".: c #4F4F50", "+: c #50504F", "@: c #504F50", "#: c #495747", "$: c #569624", "%: c #8CAE2D", "&: c #77A72B", "*: c #539B25", "=: c #108009", "-: c #027B01", ";: c #047D02", ">: c #228C20", ",: c #7DAC7C", "': c #579656", "): c #398836", "!: c #267F22", "~: c #495548", "{: c #505051", "]: c #515050", "^: c #505150", "/: c #515151", "(: c #505151", "_: c #515150", ":: c #515051", "<: c #515152", "[: c #515251", "}: c #525151", "|: c #525251", "1: c #4E5B49", "2: c #79A730", "3: c #67A92B", "4: c #409A20", "5: c #0F8508", "6: c #018000", "7: c #038201", "8: c #30982E", "9: c #81B480", "0: c #5A9D58", "a: c #438341", "b: c #4C584B", "c: c #525152", "d: c #515252", "e: c #535252", "f: c #525253", "g: c #535353", "h: c #525352", "i: c #535253", "j: c #525353", "k: c #525452", "l: c #516649", "m: c #42703A", "n: c #296D29", "o: c #296D28", "p: c #2A6F2A", "q: c #317230", "r: c #567E56", "s: c #596C59", "t: c #525453", "u: c #535352", "v: c #535354", "w: c #545353", "x: c #535453", "y: c #535454", "z: c #545354", "A: c #545454", "B: c #545453", "C: c #545555", "D: c #545455", "E: c #545554", "F: c #555454", "G: c #555455", "H: c #555554", "I: c #555555", "J: c #555655", "K: c #565555", "L: c #555556", "M: c #565655", "N: c #565556", "O: c #565656", "P: c #555656", "Q: c #565756", "R: c #575756", "S: c #565657", "T: c #575656", "U: c #575657", "V: c #565757", "W: c #575758", "X: c #575857", "Y: c #585857", "Z: c #585757", "`: c #585758", " < c #575858", ".< c #585858", "+< c #585958", "@< c #595859", "#< c #585859", "$< c #585959", "%< c #595858", "&< c #595958", "*< c #595959", "=< c #5A5959", "-< c #59595A", ";< c #595A5A", ">< c #595A59", ",< c #5A5A59", "'< c #5A595A", ")< c #5A5A5B", "!< c #5B5A5B", "~< c #5A5B5A", "{< c #5B5A5A", "]< c #5B5B5A", "^< c #5A5B5B", "/< c #5C5B5B", "(< c #5B5C5B", "_< c #5B5B5C", ":< c #5C5C5B", "<< c #5B5C5C", "[< c #5C5C5C", "}< c #5C5B5C", "|< c #5C5D5C", "1< c #5C5C5D", "2< c #5D5C5C", "3< c #5D5D5C", "4< c #5C5D5D", "5< c #5D5D5D", "6< c #5D5C5D", "7< c #5D5E5D", "8< c #5D5D5E", "9< c #5E5D5D", "0< c #5E5D5E", "a< c #5E5E5D", "b< c #5D5E5E", "c< c #5E5F5E", "d< c #5E5E5F", "e< c #5F5F5F", "f< c #5F5E5E", "g< c #5F5E5F", "h< c #5F5F5E", "i< c #5E5F5F", "j< c #5F5F60", "k< c #5F605F", "l< c #605F5F", "m< c #605F60", "n< c #60605F", "o< c #5F6060", "p< c #616060", "q< c #606061", "r< c #606160", "s< c #616161", "t< c #606161", "u< c #616160", "v< c #616061", "w< c #616162", "x< c #626161", "y< c #616261", "z< c #626261", "A< c #626262", "B< c #626162", "C< c #616262", "D< c #626363", "E< c #636262", "F< c #626263", "G< c #636263", "H< c #626362", "I< c #636362", "J< c #636363", "K< c #646363", "L< c #636364", "M< c #636463", "N< c #636464", "O< c #646364", "P< c #646464", "Q< c #646463", "R< c #646465", "S< c #656464", "T< c #646564", "U< c #656564", "V< c #656465", "W< c #646565", "X< c #656566", "Y< c #656665", "Z< c #666565", "`< c #666665", " [ c #666566", ".[ c #656666", "+[ c #666667", "@[ c #666767", "#[ c #666766", "$[ c #676667", "%[ c #676766", "&[ c #676666", "*[ c #676768", "=[ c #676867", "-[ c #686767", ";[ c #686867", ">[ c #686768", ",[ c #676868", "'[ c #686868", ")[ c #686969", "![ c #686869", "~[ c #686968", "{[ c #696869", "][ c #696968", "^[ c #696969", "/[ c #696868", "([ c #6A6969", "_[ c #696A69", ":[ c #69696A", "<[ c #6A696A", "[[ c #6A6A69", "}[ c #696A6A", "|[ c #6B6A6A", "1[ c #6A6A6B", "2[ c #6A6B6A", "3[ c #6B6B6A", "4[ c #6B6B6B", "5[ c #6A6B6B", "6[ c #6B6A6B", "7[ c #6C6B6B", "8[ c #6B6B6C", "9[ c #6C6C6B", "0[ c #6B6C6C", "a[ c #6B6C6B", "b[ c #6C6B6C", "c[ c #6C6C6C", "d[ c #6D6C6C", "e[ c #6C6C6D", "f[ c #6C6D6C", "g[ c #6D6D6C", "h[ c #6D6D6D", "i[ c #6D6C6D", "j[ c #6C6D6D", "k[ c #6D6E6D", "l[ c #6D6D6E", "m[ c #6E6D6D", "n[ c #6E6E6D", "o[ c #6D6E6E", "p[ c #6E6D6E", "q[ c #6E6F6E", "r[ c #6F6E6E", "s[ c #6E6E6F", "t[ c #6F6F6E", "u[ c #6E6F6F", "v[ c #6F6F6F", "w[ c #6F6E6F", "x[ c #6F6F70", "y[ c #6F706F", "z[ c #70706F", "A[ c #706F6F", "B[ c #6F7070", "C[ c #706F70", "D[ c #717070", "E[ c #707170", "F[ c #707071", "G[ c #717170", "H[ c #707171", "I[ c #717071", "J[ c #717171", "K[ c #717172", "L[ c #727171", "M[ c #727271", "N[ c #727172", "O[ c #717271", "P[ c #717272", "Q[ c #727372", "R[ c #737272", "S[ c #727273", "T[ c #737273", "U[ c #727373", "V[ c #737372", "W[ c #737373", "X[ c #747373", "Y[ c #747473", "Z[ c #737374", "`[ c #737474", " } c #737473", ".} c #747374", "+} c #747475", "@} c #757474", "#} c #757475", "$} c #747574", "%} c #757575", "&} c #757574", "*} c #747575", "=} c #757576", "-} c #757675", ";} c #767575", ">} c #767675", ",} c #757676", "'} c #767676", ")} c #767576", "!} c #777677", "~} c #767776", "{} c #767677", "]} c #777676", "^} c #777777", "/} c #777776", "(} c #767777", "_} c #777877", ":} c #777778", "<} c #787777", "[} c #787877", "}} c #787778", "|} c #777878", "1} c #797878", "2} c #787978", "3} c #787979", "4} c #787879", "5} c #797879", "6} c #797978", "7} c #797979", "8} c #79797A", "9} c #7A7979", "0} c #797A79", "a} c #7A797A", "b} c #7A7A7A", "c} c #7A7A79", "d} c #797A7A", "e} c #7B7A7A", "f} c #7A7B7A", "g} c #7B7B7A", "h} c #7B7B7B", "i} c #7B7A7B", "j} c #7A7A7B", "k} c #7A7B7B", "l} c #7C7B7B", "m} c #7B7C7B", "n} c #7C7B7C", "o} c #7B7B7C", "p} c #7C7C7C", "q} c #7B7C7C", "r} c #7C7C7B", "s} c #7D7C7C", "t} c #7C7C7D", "u} c #7C7D7D", "v} c #7C7D7C", "w} c #7D7C7D", "x} c #7D7D7C", "y} c #7E7D7D", "z} c #7D7D7E", "A} c #7D7E7E", "B} c #7D7E7D", "C} c #7E7D7E", "D} c #7E7E7E", "E} c #7E7E7D", "F} c #7E7E7F", "G} c #7E7F7F", "H} c #7E7F7E", "I} c #7F7E7E", "J} c #7F7F7E", "K} c #7F7E7F", "L} c #807F7F", "M} c #7F7F80", "N} c #7F807F", "O} c #807F80", "P} c #7F8080", "Q} c #808080", "R} c #80807F", "S} c #818080", "T} c #808081", "U} c #818180", "V} c #808181", "W} c #808180", "X} c #818081", "Y} c #818181", "Z} c #818281", "`} c #828281", " | c #818282", ".| c #828182", "+| c #828181", "@| c #818182", "#| c #828282", "$| c #828283", "%| c #838282", "&| c #838283", "*| c #828382", "=| c #838382", "-| c #838383", ";| c #828383", ">| c #848383", ",| c #838384", "'| c #838484", ")| c #838483", "!| c #848483", "~| c #848384", "{| c #848485", "]| c #848584", "^| c #858484", "/| c #858485", "(| c #858584", "_| c #848585", ":| c #858585", "<| c #858586", "[| c #858685", "}| c #858686", "|| c #868685", "1| c #868586", "2| c #868585", "3| c #868687", "4| c #878686", "5| c #868787", "6| c #878786", "7| c #878687", "8| c #878787", "9| c #868786", "0| c #888787", "a| c #878887", "b| c #878788", "c| c #888887", "d| c #878888", "e| c #888788", "f| c #888988", "g| c #898888", "h| c #888889", "i| c #898988", "j| c #898989", "k| c #898889", "l| c #888989", "m| c #8A8989", "n| c #898A89", "o| c #8A898A", "p| c #89898A", "q| c #8A8A89", "r| c #898A8A", "s| c #8A8B8A", "t| c #8A8B8B", "u| c #8A8A8B", "v| c #8B8A8B", "w| c #8B8A8A", "x| c #8B8B8A", "y| c #8B8B8B", "z| c #8C8B8B", "A| c #8B8C8B", "B| c #8B8B8C", "C| c #8B8C8C", "D| c #8C8C8C", "E| c #8C8B8C", "F| c #8C8C8B", "G| c #8C8C8D", "H| c #8D8C8C", "I| c #8C8D8D", "J| c #8C8D8C", "K| c #8D8D8C", "L| c #8D8C8D", "M| c #8D8D8D", "N| c #8D8D8E", "O| c #8E8D8D", "P| c #8E8E8D", "Q| c #8D8E8D", "R| c #8E8D8E", "S| c #8D8E8E", "T| c #8E8E8F", "U| c #8E8F8E", "V| c #8F8E8E", "W| c #8E8F8F", "X| c #8F8F8E", "Y| c #8F8F8F", "Z| c #8F8E8F", "`| c #8F8F90", " 1 c #908F8F", ".1 c #90908F", "+1 c #8F908F", "@1 c #8F9090", "#1 c #908F90", "$1 c #909090", "%1 c #919090", "&1 c #909091", "*1 c #909190", "=1 c #919191", "-1 c #909191", ";1 c #919091", ">1 c #919190", ",1 c #919291", "'1 c #919192", ")1 c #929291", "!1 c #919292", "~1 c #929191", "{1 c #929192", "]1 c #929292", "^1 c #929293", "/1 c #939292", "(1 c #929392", "_1 c #939293", ":1 c #939392", "<1 c #929393", "[1 c #939493", "}1 c #939394", "|1 c #949494", "11 c #949393", "21 c #949394", "31 c #939494", "41 c #949493", "51 c #949595", "61 c #959594", "71 c #959595", "81 c #959494", "91 c #949495", "01 c #949594", "a1 c #959495", "b1 c #969595", "c1 c #959596", "d1 c #969596", "e1 c #959695", "f1 c #959696", "g1 c #969695", "h1 c #969697", "i1 c #969796", "j1 c #979697", "k1 c #979696", "l1 c #979796", "m1 c #979797", "n1 c #969797", "o1 c #979897", "p1 c #979798", "q1 c #989797", "r1 c #989897", "s1 c #979898", "t1 c #989798", "u1 c #989998", "v1 c #999898", "w1 c #989999", "x1 c #989899", "y1 c #999899", "z1 c #999998", "A1 c #999A99", "B1 c #9A9999", "C1 c #99999A", "D1 c #999A9A", "E1 c #9A999A", "F1 c #9A9A9A", "G1 c #9A9A99", "H1 c #9A9B9A", "I1 c #9A9A9B", "J1 c #9B9A9A", "K1 c #9A9B9B", "L1 c #9B9B9B", "M1 c #9B9A9B", "N1 c #9B9B9C", "O1 c #9C9B9B", "P1 c #9B9C9B", "Q1 c #9C9B9C", "R1 c #9B9C9C", "S1 c #9C9C9B", "T1 c #9C9C9C", "U1 c #9D9C9C", "V1 c #9C9D9C", "W1 c #9D9C9D", "X1 c #9C9C9D", "Y1 c #9D9D9C", "Z1 c #9D9D9D", "`1 c #9C9D9D", " 2 c #9E9D9D", ".2 c #9E9E9D", "+2 c #9D9D9E", "@2 c #9D9E9D", "#2 c #9E9D9E", "$2 c #9E9E9E", "%2 c #9D9E9E", "&2 c #9F9E9E", "*2 c #9F9E9F", "=2 c #9E9F9E", "-2 c #9E9E9F", ";2 c #9E9F9F", ">2 c #9F9F9E", ",2 c #9F9F9F", "'2 c #9F9FA0", ")2 c #9FA09F", "!2 c #A0A0A0", "~2 c #A09F9F", "{2 c #A0A09F", "]2 c #A09FA0", "^2 c #9FA0A0", "/2 c #A1A0A0", "(2 c #A0A1A0", "_2 c #A0A0A1", ":2 c #A0A1A1", "<2 c #A1A0A1", "[2 c #A1A1A0", "}2 c #A1A1A2", "|2 c #A2A1A1", "12 c #A1A2A1", "22 c #A2A2A1", "32 c #A1A2A2", "42 c #A2A1A2", "52 c #A2A2A2", "62 c #A2A2A3", "72 c #A3A2A2", "82 c #A2A3A2", "92 c #A2A3A3", "02 c #A3A3A3", "a2 c #A3A2A3", "b2 c #A3A3A2", "c2 c #A3A3A4", "d2 c #A3A4A3", "e2 c #A4A4A3", "f2 c #A4A3A4", "g2 c #A4A3A3", "h2 c #A3A4A4", "i2 c #A4A5A5", "j2 c #A5A4A5", "k2 c #A4A4A5", "l2 c #A5A4A4", "m2 c #A4A5A4", "n2 c #A5A5A4", "o2 c #A5A5A5", "p2 c #A5A6A5", "q2 c #A5A5A6", "r2 c #A6A5A5", "s2 c #A6A6A6", "t2 c #A6A6A5", "u2 c #A5A6A6", "v2 c #A6A5A6", "w2 c #A6A6A7", "x2 c #A6A7A6", "y2 c #A7A6A7", "z2 c #A6A7A7", "A2 c #A7A7A6", "B2 c #A7A6A6", "C2 c #A8A7A7", "D2 c #A8A8A8", "E2 c #A8A8A7", "F2 c #A7A8A7", "G2 c #A7A8A8", "H2 c #A7A7A8", "I2 c #A8A7A8", "J2 c #A9A8A8", "K2 c #A8A9A9", "L2 c #A8A8A9", "M2 c #A9A9A8", "N2 c #A8A9A8", "O2 c #A9A8A9", "P2 c #A9A9A9", "Q2 c #A9AAA9", "R2 c #AAA9A9", "S2 c #AAAAA9", "T2 c #AAAAAA", "U2 c #A9A9AA", "V2 c #A9AAAA", "W2 c #AAA9AA", "X2 c #AAABAA", "Y2 c #ABAAAA", "Z2 c #ABABAA", "`2 c #AAABAB", " 3 c #AAAAAB", ".3 c #ABABAB", "+3 c #ABAAAB", "@3 c #ACABAB", "#3 c #ABACAB", "$3 c #ABABAC", "%3 c #ACACAB", "&3 c #ACABAC", "*3 c #ACACAC", "=3 c #ABACAC", "-3 c #ACACAD", ";3 c #ADACAC", ">3 c #ADADAC", ",3 c #ACADAD", "'3 c #ADACAD", ")3 c #ACADAC", "!3 c #ADADAD", "~3 c #AEADAD", "{3 c #ADAEAD", "]3 c #ADADAE", "^3 c #ADAEAE", "/3 c #AEAEAE", "(3 c #AEADAE", "_3 c #AEAEAD", ":3 c #AEAEAF", "<3 c #AEAFAE", "[3 c #AFAEAF", "}3 c #AFAFAE", "|3 c #AFAEAE", "13 c #AEAFAF", "23 c #B0AFAF", "33 c #AFB0AF", "43 c #AFAFB0", "53 c #B0AFB0", "63 c #AFB0B0", "73 c #B0B0AF", "83 c #B0B0B1", "93 c #B0B1B0", "03 c #B1B0B0", "a3 c #B1B1B0", "b3 c #B1B0B1", "c3 c #B1B1B1", "d3 c #B0B1B1", "e3 c #B1B1B2", "f3 c #B2B1B1", "g3 c #B2B1B2", "h3 c #B1B2B1", "i3 c #B2B2B1", "j3 c #B1B2B2", "k3 c #B3B2B2", "l3 c #B2B3B2", "m3 c #B2B3B3", "n3 c #B2B2B3", "o3 c #B3B3B2", "p3 c #B3B3B4", "q3 c #B3B4B3", "r3 c #B4B3B3", "s3 c #B4B4B4", "t3 c #B3B4B4", "u3 c #B4B3B4", "v3 c #B4B4B3", "w3 c #B5B4B4", "x3 c #B4B5B5", "y3 c #B4B4B5", "z3 c #B5B4B5", "A3 c #B4B5B4", "B3 c #B5B5B4", "C3 c #B6B5B5", "D3 c #B5B6B5", "E3 c #B5B6B6", "F3 c #B6B6B5", "G3 c #B5B5B6", "H3 c #B6B5B6", "I3 c #B7B7B6", "J3 c #B6B6B7", "K3 c #B7B6B7", "L3 c #B6B7B6", "M3 c #B6B7B7", "N3 c #B7B6B6", "O3 c #B7B7B8", "P3 c #B8B7B8", "Q3 c #B7B8B7", "R3 c #B8B7B7", "S3 c #B7B8B8", "T3 c #B8B8B7", "U3 c #B9B9B8", "V3 c #B8B8B9", "W3 c #B9B8B8", "X3 c #B8B9B8", "Y3 c #B9B8B9", "Z3 c #B8B9B9", "`3 c #BAB9B9", " 4 c #B9B9BA", ".4 c #B9BAB9", "+4 c #BABAB9", "@4 c #B9BABA", "#4 c #BAB9BA", "$4 c #BABBBA", "%4 c #BBBABA", "&4 c #BABABB", "*4 c #BABBBB", "=4 c #BBBBBA", "-4 c #BBBABB", ";4 c #BBBCBB", ">4 c #BCBBBB", ",4 c #BBBBBC", "'4 c #BCBCBB", ")4 c #BCBBBC", "!4 c #BCBCBC", "~4 c #BBBCBC", "{4 c #BDBCBC", "]4 c #BCBDBD", "^4 c #BCBDBC", "/4 c #BCBCBD", "(4 c #BDBCBD", "_4 c #BDBDBC", ":4 c #BDBEBD", "<4 c #BDBDBE", "[4 c #BEBDBD", "}4 c #BEBEBD", "|4 c #BDBEBE", "14 c #BEBDBE", "24 c #BEBEBF", "34 c #BFBEBE", "44 c #BEBFBE", "54 c #BEBFBF", "64 c #BFBFBF", "74 c #BFBEBF", "84 c #BFBFBE", "94 c #BFC0C0", "04 c #C0BFBF", "a4 c #BFBFC0", "b4 c #C0BFC0", "c4 c #BFC0BF", "d4 c #C0C0C0", "e4 c #C0C0BF", "f4 c #C0C1C0", "g4 c #C0C0C1", "h4 c #C1C0C0", "i4 c #C1C1C1", "j4 c #C0C1C1", "k4 c #C1C1C0", "l4 c #C1C0C1", "m4 c #C1C2C1", "n4 c #C2C1C1", "o4 c #C2C2C1", "p4 c #C2C1C2", "q4 c #C1C1C2", "r4 c #C1C2C2", "s4 c #C2C2C3", "t4 c #C3C2C2", "u4 c #C2C3C2", "v4 c #C3C3C3", "w4 c #C3C2C3", "x4 c #C2C3C3", "y4 c #C3C3C2", "z4 c #C3C4C3", "A4 c #C4C3C4", "B4 c #C3C3C4", "C4 c #C4C3C3", "D4 c #C3C4C4", "E4 c #C4C4C4", "F4 c #C4C4C3", "G4 c #C5C4C4", "H4 c #C4C5C4", "I4 c #C4C4C5", "J4 c #C5C5C4", "K4 c #C5C4C5", "L4 c #C4C5C5", "M4 c #C5C5C5", "N4 c #C5C6C5", "O4 c #C6C5C5", "P4 c #C5C5C6", "Q4 c #C6C6C5", "R4 c #C6C5C6", "S4 c #C5C6C6", "T4 c #C6C6C6", "U4 c #C7C6C7", "V4 c #C7C6C6", "W4 c #C6C7C6", "X4 c #C6C6C7", "Y4 c #C7C7C6", "Z4 c #C6C7C7", "`4 c #C7C7C7", " 5 c #C8C7C7", ".5 c #C8C7C8", "+5 c #C7C7C8", "@5 c #C7C8C7", "#5 c #C8C8C7", "$5 c #C8C8C8", "%5 c #C7C8C8", "&5 c #C9C8C8", "*5 c #C8C8C9", "=5 c #C8C9C9", "-5 c #C8C9C8", ";5 c #C9C8C9", ">5 c #C9C9C8", ",5 c #C9CAC9", "'5 c #CAC9C9", ")5 c #C9CACA", "!5 c #C9C9CA", "~5 c #CACAC9", "{5 c #CACACA", "]5 c #CAC9CA", "^5 c #CBCACA", "/5 c #CACACB", "(5 c #CACBCA", "_5 c #CBCBCA", ":5 c #CACBCB", "<5 c #CBCACB", "[5 c #CBCBCB", "}5 c #CCCBCB", "|5 c #CBCBCC", "15 c #CBCCCB", "25 c #CCCCCB", "35 c #CBCCCC", "45 c #CCCCCC", "55 c #CCCBCC", "65 c #CDCCCC", "75 c #CCCDCC", "85 c #CCCCCD", "95 c #CDCDCD", "05 c #CDCDCC", "a5 c #CCCDCD", "b5 c #CDCCCD", "c5 c #CECDCD", "d5 c #CDCECD", "e5 c #CDCECE", "f5 c #CDCDCE", "g5 c #CECECD", "h5 c #CECDCE", "i5 c #CECFCE", "j5 c #CECECF", "k5 c #CFCFCE", "l5 c #CFCECE", "m5 c #CECFCF", "n5 c #CFCFCF", "o5 c #CFCECF", "p5 c #CFCFD0", "q5 c #CFD0CF", "r5 c #CFD0D0", "s5 c #D0CFCF", "t5 c #D0D0CF", "u5 c #D0D0D0", "v5 c #D0CFD0", "w5 c #D0D0D1", "x5 c #D0D1D0", "y5 c #D1D0D0", "z5 c #D0D1D1", "A5 c #D1D1D1", "B5 c #D1D1D0", "C5 c #D1D0D1", "D5 c #D2D2D1", "E5 c #D1D1D2", "F5 c #D1D2D1", "G5 c #D2D1D1", "H5 c #D2D1D2", "I5 c #D1D2D2", "J5 c #D3D2D2", "K5 c #D3D2D3", "L5 c #D2D3D2", "M5 c #D3D3D2", "N5 c #D2D2D3", "O5 c #D3D3D3", "P5 c #D2D3D3", "Q5 c #D4D3D3", "R5 c #D3D4D3", "S5 c #D3D3D4", "T5 c #D4D4D3", "U5 c #D3D4D4", "V5 c #D4D3D4", "W5 c #D5D4D4", "X5 c #D4D5D4", "Y5 c #D5D5D4", "Z5 c #D4D4D5", "`5 c #D4D5D5", " 6 c #D5D4D5", ".6 c #D5D6D5", "+6 c #D5D5D6", "@6 c #D6D5D5", "#6 c #D6D5D6", "$6 c #D6D6D5", "%6 c #D5D6D6", "&6 c #D6D7D6", "*6 c #D7D6D6", "=6 c #D7D7D6", "-6 c #D6D6D7", ";6 c #D7D6D7", ">6 c #D6D7D7", ",6 c #D8D7D7", "'6 c #D7D8D7", ")6 c #D7D7D8", "!6 c #D7D8D8", "~6 c #D8D7D8", "{6 c #D8D8D7", "]6 c #D9D8D8", "^6 c #D8D9D8", "/6 c #D8D9D9", "(6 c #D9D8D9", "_6 c #D8D8D9", ":6 c #D9D9D8", "<6 c #D9D9D9", "[6 c #DAD9D9", "}6 c #D9D9DA", "|6 c #D9DAD9", "16 c #DAD9DA", "26 c #DADAD9", "36 c #D9DADA", "46 c #DADADB", "56 c #DBDADB", "66 c #DBDADA", "76 c #DADBDA", "86 c #DBDBDA", "96 c #DADBDB", "06 c #DBDCDB", "a6 c #DBDBDC", "b6 c #DBDCDC", "c6 c #DCDCDB", "d6 c #DCDBDB", "e6 c #DCDBDC", "f6 c #DCDDDC", "g6 c #DDDCDC", "h6 c #DCDCDD", "i6 c #DCDDDD", "j6 c #DDDCDD", "k6 c #DDDDDC", "l6 c #DDDEDD", "m6 c #DDDDDE", "n6 c #DEDEDD", "o6 c #DEDDDD", "p6 c #DDDEDE", "q6 c #DEDDDE", "r6 c #DFDEDE", "s6 c #DEDEDF", "t6 c #DEDFDE", "u6 c #DFDFDE", "v6 c #DFDEDF", "w6 c #DEDFDF", "x6 c #DFE0E0", "y6 c #DFDFE0", "z6 c #E0DFDF", "A6 c #DFE0DF", "B6 c #E0E0DF", "C6 c #E0DFE0", "D6 c #E0E0E1", "E6 c #E0E1E0", "F6 c #E1E0E0", "G6 c #E0E1E1", "H6 c #E1E0E1", "I6 c #E1E1E0", "J6 c #E1E1E2", "K6 c #E1E2E1", "L6 c #E2E1E1", "M6 c #E2E1E2", "N6 c #E2E2E1", "O6 c #E1E2E2", "P6 c #E3E2E2", "Q6 c #E3E3E2", "R6 c #E2E2E3", "S6 c #E2E3E3", "T6 c #E2E3E2", "U6 c #E3E2E3", "V6 c #E4E3E3", "W6 c #E3E4E3", "X6 c #E3E4E4", "Y6 c #E3E3E4", "Z6 c #E4E3E4", "`6 c #E4E4E3", " 7 c #E4E5E4", ".7 c #E5E4E5", "+7 c #E4E4E5", "@7 c #E5E4E4", "#7 c #E4E5E5", "$7 c #E5E5E4", "%7 c #E6E5E5", "&7 c #E5E6E5", "*7 c #E5E5E6", "=7 c #E5E6E6", "-7 c #E6E5E6", ";7 c #E6E6E5", ">7 c #E6E7E6", ",7 c #E6E6E7", "'7 c #E6E7E7", ")7 c #E7E6E6", "!7 c #E7E6E7", "~7 c #E7E7E6", "{7 c #E8E7E7", "]7 c #E7E7E8", "^7 c #E8E7E8", "/7 c #E8E8E8", "(7 c #E7E8E8", "_7 c #E7E8E7", ":7 c #E8E8E7", "<7 c #E9E8E8", "[7 c #E8E8E9", "}7 c #E9E8E9", "|7 c #E8E9E9", "17 c #E8E9E8", "27 c #E9E9E8", "37 c #E9E9EA", "47 c #EAE9E9", "57 c #E9EAE9", "67 c #EAEAE9", "77 c #E9EAEA", "87 c #EAE9EA", "97 c #EBECEB", "07 c #EBECEC", "a7 c #ECEBEB", "b7 c #EBEBEC", "c7 c #ECEBEC", "d7 c #ECECEB", "e7 c #EDEDEE", "f7 c #EEEDED", "g7 c #EDEEEE", "h7 c #EEEEED", "i7 c #EEEDEE", "j7 c #EDEEED", "k7 c #EEEEEF", "l7 c #EEEFEF", "m7 c #EFEEEF", "n7 c #F0F0F1", "o7 c #F0F1F1", "p7 c #F1F0F1", "q7 c #F1F1F2", "r7 c #F2F2F3", ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + . . . @ . . . . + @ # $ $ $ $ $ + @ . % & # * @ @ % + . + * % % + . * + + % % $ @ @ $ * % # * * * * + * * $ & * * # * * * * * ", "% * * * * * * * * * * * * * * * = - ; * > * ; ; ; = * = - ; ; * , - > * , * - * ' > ; , * , * ) ) , > ) * > ' ; > ) = ) ' ; , ) ) ' ' ) ) , ' ) ' , ' ' - ' ) ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ! ' ! ~ ' ", "' ~ ~ ' { ] { ~ ] ' ] ~ ~ ' ' ' ] { ! ~ ! ^ ! / ~ ] ] ] / { ^ ( ( ( ^ ( ^ ^ { ^ ^ ^ ( / / ^ ! ^ ( ^ ] ^ ^ ^ / / ^ . . ( ] ^ ^ ^ ( ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ _ ^ ^ : ^ ^ < : ^ ^ ^ _ : _ ^ _ < < _ [ < ^ ^ ", "} < | [ : | 1 ^ _ 1 : 1 [ | ^ ^ [ | < _ [ } | [ [ [ } } [ < | [ [ 1 } | [ [ } [ | [ | [ [ [ [ [ [ [ [ 2 [ [ [ [ * 3 4 5 [ 6 2 [ 7 [ 2 8 [ 9 6 0 [ [ [ 6 [ 2 0 2 [ 6 8 [ 9 0 8 8 7 9 a 6 0 7 9 2 6 0 [ 7 ", "[ a 8 0 a a a 0 9 a 0 8 a 8 8 8 7 a 8 8 a 0 a a a a a a a a a a a a a a a b a a . c d d . . . e a b e f b b e g h i j k l a m b e n o m e n b n f b n p m e b m o p e b m p p p b p m m m p p p p p p p ", "p m p p p p p p p p p p p q p p p r q p s q p t p p p s u q p t q s q r u p v w x y z z A B C D . q r r q r E F i G H I J K v L L v t r u s q r r s v r L v L L L L r L L L L L L L L L L L L M L L L L ", "L N N N L L N M L M O L P N Q N N R O L L N M R M Q P R M P R O Q N P P S P T U V W X Y Z ` ...+.@.. S S #.$.i %.&.*.J =.K R S S S S S S S S S S S S S S -.;.S -.S S -.>.S ;.S ;.S -.;.S >.>.,.>.,.S >.", "-.'.>.;.>.-.).-.'.S '.).!.-.).S ,.;.'.>.-.'.'.'.>.-.>.).>.>.).).).>.).'.'.~.{.].^./.(._.:.<.[.}.|.1.2.. 3.4.j 5.6.7.J g [ '.'.8.9.'.0.'.a.8.a.'.'.'.9.b.'.c.'.'.b.9.9.b.8.9.a.a.9.9.0.c.0.'.d.0.9.'.d.0.", "0.0.0.9.8.9.b.c.c.c.0.0.c.c.d.b.8.c.c.d.d.0.c.c.c.c.c.c.c.c.c.c.c.c.c.c.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.* B.c.B.C.C.c.D.E.C.C.F.E.D.E.G.E.C.C.G.E.D.F.G.F.G.F.D.H.E.E.F.H.H.E.E.B.E.E.H.F.", "E.H.E.E.E.G.F.E.E.E.E.E.E.E.E.I.J.E.E.E.E.E.K.E.E.L.E.K.K.M.E.N.I.E.L.. O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++@+#+$+%+z.&+c.N.L.M.M.I.N.L.I.E.N.M.M.*+L.*+*+*+M.*+M.*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+=+*+*+*+", "*+*+*+-+*+*+-+*+=+;+=+>+>+-+=+,+*+-+'+=+;+=+=+>+;+*+*+'+,+-+-+'+=+*+=+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+I 6+7+c.8+,+'+>+>+8+,+8+8+8+8+8+>+8+8+9+8+8+8+8+8+0+a+a+8+b+c+a+8+8+8+a+8+9+8+8+c+0+8+8+9+0+", "d+b+9+e+a+c+0+e+c+a+9+0+0+9+c+a+b+0+8+e+9+0+8+e+d+e+d+e+b+e+0+b+e+d+. f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+5+w+x+y+'.e+e+e+e+e+z+e+z+. e+A+e+B+A+B+C+D+D+e+D+E+F+e+e+A+C+A+C+C+A+e+e+B+D+A+B+z+A+D+A+C+E+e+", "C+C+F+F+C+D+E+A+D+D+D+D+F+C+C+E+D+F+F+F+D+F+F+F+F+F+F+E+F+F+F+F+F+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+%.v+5+h V+W+X+Y+. Z+F+`+ @Z+F+S .@+@@@F+F+F+Z+#@F+$@F+%@%@%@&@#@F+&@$@$@&@%@&@%@&@%@%@%@#@`+#@ @`+&@F+", "%@#@%@%@%@#@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@*@=@*@*@=@-@%@=@*@%@;@>@,@'@)@!@~@{@]@^@Q+/@(@_@:@v+5+<@[@}@|@1@2@3@. 4@%@5@4@8+6@7@@+8@9@*@4@*@-@0@=@-@a@5@*@a@5@0@a@a@5@5@5@5@5@5@5@5@5@0@5@5@5@5@5@5@", "5@b@5@5@5@5@5@c@5@5@5@c@5@5@5@5@5@d@5@5@e@f@g@d@5@d@d@g@e@5@5@b@c@h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@w@$+<@x@y@z@A@B@C@D@E@. F@. d@G@i %.H H@I@d@d@d@d@d@d@d@d@d@d@J@d@K@d@d@d@d@J@L@d@J@K@K@d@d@M@d@N@d@L@d@", "L@K@J@J@O@N@O@N@J@L@N@K@9@9@M@9@L@O@9@9@J@M@J@O@N@9@9@N@9@J@9@9@9@P@Q@R@S@T@U@V@W@X@Y@Z@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#. d@H@)#!#x.<@6+~#9@{#]#9@9@{#^#9@9@9@9@9@^#/#]#(#^#(#]#(#(#9@^#(#_#^#/#_#_#9@/#", "^#^#^#/#{#/#/#:#(#_#]#/#{#_#_#_#_#/#_#{#_#/#_#:#_#:#_#_#_#_#_#_#_#<#[#}#|#1#2#3#4#5#6#7#8#9#9#.#0#a#b#c#d#e#f#=#g#h#i#j#k#I j l#$.m#n#o#p#q#r#s#s#s#q#s#t#s#q#r#s#q#q#s#_#u#v#t#r#q#v#p#p#p#q#q#p#t#t#r#", "v#v#p#v#p#r#q#p#p#t#p#t#p#p#p#p#p#p#w#p#w#p#p#p#p#p#x#p#y#p#w#y#w#z#A#B#C#D#E#F#G#H#I#J#K#L#M#N#.#O#P#Q#R#S#T#U#V#W#X#Y#Z#v.#+$+`#A. $.$w#+$@$#$#$x##$#$+$+$p#@$@$p#w#.$#$#$.$.$#$#$#$.$#$#$#$#$#$#$#$#$", "#$#$#$$$#$#$%$$$#$&$$$$$#$$$%$#$#$$$*$#$&$*$$$=$%$*$#$$$#$=$$$$$%$-$;$>$,$'$)$!$~${$]$^$/$($L#_$M#:$<$[$}$|$1$2$3$r+4$5$6$v+5+w+7$P@=$K =$K K K K K K K K K K K K K K K K K K K K K 8$K 9$K K 9$0$K a$K ", "0$0$K K 9$a$0$8$0$b$c$b$9$K b$8$b$a$0$K a$b$b$c$0$d$c$a$b$a$c$c$. e$f$g$h$i$j$k$l$m$n$o$p$q$r$s$_$t$u$v$w$}$x$y$z$A$B$C$H D$E$F$G$b$b$b$b$b$b$H$b$H$H$b$I$J$J$H$I$K$I$H$b$J$L$J$J$b$M$K$H$K$H$I$N$I$N$N$", "J$I$K$H$M$K$L$N$I$K$K$I$K$b$L$L$L$L$M$L$L$H$L$L$K$K$L$L$L$L$L$L$. O$P$Q$R$S$T$U$V$W$X$Y$Z$`$ %r$s$_$9#u$.%+%@%#%$%4.u+H D$w+%%#$. &%*%L$=%L$L$*%-%=%&%L$*%-%;%;%-%;%;%>%&%;%,%-%=%*%>%;%,%-%>%,%;%;%,%;%", ";%,%;%;%=%,%;%;%;%;%;%;%;%;%;%;%;%;%;%;%;%;%;%'%)%!%;%'%;%)%)%;%. ~%{%Q$]%^%U$/%(%_%:%<%[%}%|%1%r$_$2%9#3%4%5%6%H %.v+7%`#8%9%0%a%b%c%d%e%f%g%h%i%j%k%l%k%k%'%k%j%k%j%k%k%k%k%k%k%k%k%k%k%k%!%k%k%k%k%k%", "k%i%k%k%k%k%k%k%k%m%n%n%m%k%i%m%o%k%p%m%n%k%q%p%i%i%m%k%q%o%i%o%. r%s%t%u%v%w%x%y%z%A%B%C%D%E%F%q$G%H%I%3%4%J%K%:@v+$+L%M%N%O%P%Q%R%S%T%U%V%W%X%Y%Z%q%q%q%q%q%q%q%q%q%q%q%q%q%`%q%q% &.& &+&+&q%q%.&q%+&", "q%.& & & &`%.&@&#&+&.&.&.&+&.&`%.&q%`%@& &`%#&q%+&#&q%$&#&@&#& &. %&&&*&=&-&;&>&,&z%'&)&!&~&{&]&^&/&(&_&`@:&4%<&[&5+}&|&1&2&3&4&5&6&7&8&9&0&a&b&c&d&e&#&#&#&#&f&g&f&#&f&h&g&#&i&h&#&h&g&h&i&g&j&k&#&j&h&", "i&g&k&j&h&h&l&h&f&g&h&#&k&l&f&l&j&l&h&l&j&l&k&l&k&l&h&l&l&l&h&l&. m&&&n&o&p&q&r&>&,&s&t&u&v&w&x&y&z&A&B&C&D&D&u@E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V&W&X&Y&Z&`& * *`&.*l&X&.*.*+*Z&+*X&Z&.*X&`& *X&Y&Z&Z&", "X&+* *X&Z&Z&X&Y&X&Z&X&.* *Y&X&X&X&X&X&X&X&X&@*X&X&X&X&#*X&X&X&X&. $*%*&*u%**=*-*;*>*,*'*)*!*~*{*]*^*/*(*_*:*r@<*[*}*|*1*2*3*4*5*6*7*8*9*9*9*0*a*b*c*d*e*f*f*@*@*g*h*h*f*h*h*f*i*g*h*h*h*h*h*i*h*i*h*h*h*", "h*h*h*h*h*j*h*j*h*h*j*h*h*h*j*k*h*h*l*j*m*n*h*h*j*n*j*h*h*o*h*o*. p*q*r*s*t*u*]*-*v*>*r&w*x*y*z*A*B*C*8#D*E*F*G*H*I*J*K*L*M*N*O*P*Q*R*R*R*R*R*S*T*U*V*W*m*m*m*m*m*m*m*m*m*X*m*m*Y*m*Z*m*Z*Y*Y*m*Z*m*Y*X*", "m*X*X*Z*`*m*m*m*X* =Z*`*.=Y*m* =X*Y*X*m*+=m*.=`* =.=+=`* =+=`*`*. @=#=$=%=&=*==*==-=;=>=-=,='=)=!=~={=]=^=/=(=_=:=<=[=n+}=|=1=2=3=4=4=4=4=4=4=5=6=7=8=9=0=a=`*0=`*b=a=b=`*a=a=a=0=`*c=`*b=`*`*0=b=`*d=d=", "c=d=d=a=a=e=b=0=b=f=f=d=d=a=f=c=d=c=`*f=f=e=f=a=f=b=f=f=f=d=c=f=c=g=h=i=j=k=l=*=m=n=o=o=p=q=r=s=t=u=v=~@w=x=y=z=A=N+B=C=D=E=F=G=H=I=I=I=I=I=I=J=K=6=L=M=N=f=O=P=Q=R=P=S=O=S=P=f=O=T=N=S=S=f=O=Q=P=N=O=O=", "O=P=N=N=N=N=N=N=P=O=N=N=N=N=O=R=N=N=N=N=N=N=N=N=U=V=U=N=N=W=X=N=N=Y=Z=`= -.-+-l=l=@-#-@-$-%-&-{=*-=---;->-,-'-)-!-~-{-]-^-/-(-_-:-<-<-<-<-<-<-[-}-|-1-2-3-V=4-V=V=V=V=3-V=3-3-3-V=U=3-4-3-3-3-4-V=3-5-3-", "3-3-3-3-3-3-3-3-3-3-3-3-6-3-l 3-3-3-7-8-9-3-3-3-3-8-7-7-3-8-7-3-0-a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-]+s-t-u-v-w-x-y-z-A-B-C-D-E-F-F-F-F-F-G-H-}-I-J-l l l l K-l l l l l L-l l l l M-l l l N-L-l M-l ", "N-l N-O-P-N-l O-Q-L-L-M-R-N-O-O-L-R-M-R-O-l Q-L-R-Q-M-P-l R-M-P-Q-. S-T-U-V-W-X-Y-Z-`- ;.;+;@;#;q-$;%;&;*;=;-;;;>;,;';);!;~;{;];^;/;/;/;/;/;/;(;_;:;<;[;};|;};1;P-1;P-1;2;P-};P-1;|;1;P-3;4;2;P-|;G$|;1;", "|;P-P-3;G$1;P-|;};2;G$P-G$4;};|;P-2;4;G$2;3;G$};2;G$G$3;3;G$G$G$G$G$Y=5;6;7;8;9;0;&&8;a;b;c;$;j+d;e;f;g;h;i;j;k;l;m;n;o;p;q;r;s;t;u;u;u;u;u;u;v;w;x;:;y;z;A;B;C;A;z;@@@@G$G$D;E;@@A;z;C;G$A;D;@@@@B;D;C;", "C;C;E;z;G$@@@@B;@@@@@@@@@@@@@@@@@@@@D;@@@@@@@@@@@@@@@@@@@@@@@@@@F;@@. G;H;I;J;K;L;L;M;%;s-N;O;f;P;Q;R;S;T;U;V;W;X;Y;Z;`; >.>+>@>#>$>$>$>$>$>$>%>&>*>=>->;>>>,>'>)>>>@@>>;>)>)>,>)>,>>>)>)>)>)>)>)>)>,>)>", ")>)>)>)>)>)>)>)>!>)>)>!>)>)>~>)>)>{>]>)>)>)>)>~>^>]>^>!>)>]>!>^>]>)>/>(>_>:><>[>[>}>|>=;1>2>3>4>S;5>6>l;7>8>9>0>a>b>c>d>e>f>g>h>i>j>k>k>k>k>k>l>m>n>o>p>^>q>r>q>q>q>q>q>q>q>q>q>q>q>q>q>q>s>q>q>q>q>q>q>", "q>q>q>q>q>t>q>q>s>q>s>s>s>q>u>v>v>w>q>v>s>q>x>x>s>v>w>u>v>w>u>t>s>p y>z>A>B>C>C>D>E>F>G>H>5>I>J>K>L>V;8>M>N>O>P>Q>R>S>T>U>V>W>X>Y>Z>Z>Z>Z>Z>Z>`> ,m>.,->+,+,@,@,#,+,#,@,$,%,+,@,$,+,#,$,+,%,&,*,%,+,*,+,", "=,*,+,@,#,@,%,%,=,+,*,&,%,$,*,#,@,*,@,*,%,*,=,&,=,=,*,*,*,*,*,*,' -,;,>,9@,,',),j;!,~,{,],^,7>7>/,(,_,:,<,[,},|,1,2,3,4,5,6,7,8,9,0,0,a,a,a,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,s,t,u,t,s,*,u,v,s,t,*,", "w,u,v,w,x,s,w,w,v,v,v,w,w,v,w,w,w,w,x,w,w,w,w,w,w,w,w,w,w,w,w,. y,z,A,h*. S e.B,C,D,E,F,F,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,`, '.'.'.'+'@'#'$'%'&'*'='-';'>',''')'!'~'{']'^'^'^'/'^'('^'^'^'/'_'", "^'^'^'^'^'^'^':'^'<'^'^'^'^'<'[':'^'^'^'^'<'^'['^'}'^'^'}'['<'|'&+1'2'. ^'^'<''.3'4'5'6'7'8'9'0'a'b'c'd'e'f'g'h'i'j'k'l'm'n'o'p'q'r's't'u'v'v'w'x'y'z'A'B'C'D'E'F'G'H'I'J'K'L'M'N'O'P'P'Q'R'P'P'P'S'T'P'", "P'P'P'P'P'P'Q'U'R'R'Q'U'P'P'V'S'V'P'V'P'V'S'R'T'Q'Q'S'R'W'Q'X&7$z>X'. h*Q'V'V'S'Y'K * Z'`' ).)+)@)#)$)%)&)*)=)-);)>),)')))!)~){)])^)/)()()()()_):)<)#'[)})|)1)2)3);'4)5)6)7)8)9)0)a)b)W'W'c)W'W'c)2'd)d)", "e)W'f)2'c)c)c)c)W'g)c)d)2'e)2'g)f)f)g)g)e)2'2'h)g)f)d)2'2'e+i)j)1'e+X&2'2'2'2'k)k)k)j)l)N=m)n)o)p)q)r)s)t)t)u)v)w)x)y)z)A)B)C)D)E)F)G)H)I)J)J)K)L)M)N)O)P)Q)R)S)T)U)V)W)X)Y)Z)`) !.!+!@!#!$!%!d d $!%!#!", "d #!d @!@!d d d %!d d @!d d @!%!d $!d @!$!d d d %!d d d d d z,&!f=X&d *!d =!d d k)k)k)k)k)-!;!>!,!'!)!!!~!{!]!^!/!(!_!:!~,~'~)~!~~~{~]~^~/~(~_~:~<~[~}~|~1~2~3~4~4~5~5~4~3~2~6~7~8~9~0~a~b~c~d~e~X!f~g~h~i~j~%~k~%~l~%~m~n~%~o~", "l~p~p~k~m~q~%~l~l~q~l~m~l~m~o~n~q~m~m~k~m~l~q~l~m~%~m~o~q~m~m~m~o~o~k~m~m~q~m~m~m~m~m~m~m~=~r~s~t~u~v~w~x~y~z~A~B~C~D~E~F~G~H~I~J~K~L~M~N~O~P~P~Q~R~S~T~U~V~W~X~Y~Z~`~ {e~.{+{@{#{${.~%{&{%{*{={&{%{={={", "*{-{-{={;{={={>{={%{={={>{>{-{&{>{-{*{={={={={={={={={={={={={={={={={,{={={={={,{={={={'{){!{~{{{]{^{/{({_{:{<{[{A~B~}{|{1{2{3{I~4{5{6{7{8{9{0{a{b{c{d{e{f{g{h{i{j{k{l{m{.{n{o{p{q{r{s{t{t{P@P@t{P@P@P@", "P@u{P@P@P@s{P@P@P@P@P@P@P@P@P@P@P@v{P@v{v{P@v{P@w{P@P@P@v{P@x{v{x{w{y{P@v{v{z{v{A{P@B{A{P@C{s!D{E{F{G{H{I{J{K{L{M{N{O{P{P{Q{R{S{T{U{V{W{X{Y{Z{Z{`{ ].]+]d{@]#]W~$]%]&]l{m{.{*]=]-];]>]y{y{y{y{y{,]y{y{y{", ",]'],]y{y{y{y{'])]y{,]!]~]|'y{,],],]']']y{']y{,]']{]'])]y{)],]~])])],],]|'|'{]']']~]~]']|']]!{D{^]/](]_]:]<][]}]|]1]2]3]4]5]6]7]8]9]T%Y{0]a]b]c]d]e]f]g]h]i]j]k]l]m]n]o]p]q]r]s]t]u]v]|'w]x]y]z]A]z]A]y]", "x]w]B]|'w]x]|'B]y]B]w]B]A]|'z]w]y]z]B]|'|'C]B]A]B]C]C]y]C]x]C]y]x]C]x]C]C]C]C]A]C]y]x]y]C]z]D]D{E]F]G]H]I]J]J]J]J]K]L]M]N]O]P]Q]R].]`{S]T]U]V]W]X]Y]Z]`] ^:).^+^@^n>#^$^%^&^*^=^-^;^/>>^,^>^'^'^>^)^C]!^", ")^'^'^/>!^>^)^C]/>!^/>/>,^,^/>/>/>~^!^/>)^,^/>/>/>/>/>/>/>/>/>/>/>/>/>/>/>/>/>/>/>/>/>{^/>/>]^^^E]/^H](^_^:^<^<^:^_^[^}^M]|^O]P]1^ ]2^3^4^5^6^7^8^9^0^a^b^c^d^e^f^&>g^h^i^6=j^k^l^m^n^3.3.o^3.3.3.3.3.p^", "3.3.3.3.p^3.3.3.3.3.q^3.3.3.3.3.3.3.r^s^3.t^3.s^s^3.3.r^s^3.3.3.5 t^s^u^t^r^v^3.t^3.s^u^3.s^v^w^x^y^I]_^<^z^A^A^A^z^<^B^C^D^E^O]F^Z{b]V]G^H^I^J^8^K^L^M^N^O^P^Q^R^S^g^T^U^V^W^X^Y^5 5 u^5 5 5 5 5 5 5 5 ", "5 Z^5 Z^`^ /5 5 5 5 5 5 5 /5 5 ./Z^5 5 +/p!Z^ /@/5 5 ./p!./`^+/5 Z^p! /p!Z^`^p!p!p!+/./`^`^+/Z^p!#/$/%/&/&/&/&/*/&/*/=/-/C^;/>/,/'/3^)/H^!/~/{/]/^///(/_/:/(U/,(>(l)U/*(>(-(,(;(;(>(-(=(l)U/>(-(;(l)=(-(,(-(>(>(,(;(;(l)=(;(l)l),(l)'()(!(C^~({(0]4^](^(/(((_(:(<(K/l)l)l)l)l)l)l)l)l)l)[(l)}(l)l)l)l)l)l)|(l)l)l)[(", "|(1(2(l)[(|(3(l)l)}(l)l)1(}(2(3(|(}(4(|(4(1([(2(4(3(3(4(3(4(}(|(l)3(3(3(2(3(}(}(2(3(l)2(3(3(3(3(3(}(3(4(3(3(3(3(3(3(3(3(5(A^!(}^6(7(.]S]8(](9(0(_(a(b(c(d(d(d(3(d(3(e(3(f(e(g(3(3(3(h(d(d(h(f(e(f(h(h(g(", "3(3(f(e(Y'f(h(g(e(Y'Y'h(e(Y'g(Y'f(h(Y'Y'h(i(Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'j(Y'Y'k(Y'Y'l(Y'Y'l(l(Y'Y'Y'j(j(m(A^:^[^n(o(p(q(`{ (4^r(s(t(u(v(w(x(j(k(j(l(x(j(x(x(k(w(w(x(k(j(w(x(x(x(k(x(y(x(", "y(w(x(x(x(x(x(x(x(x(x(k(x(x(x(x(z(x(x(x(x(x(x(x(x(x(x(A(x(x(x(x(A(x(B(A(x(C(x(C(x(x(D(A(D(x(C(z(B(E(E(E(D(C(B(C(C(X'E(A(F(A^:^G(H(I(J(K(L(M(+]N(O(P(V>v(B(B(X'X'B(E(X'X'X'X'X'X'D(z(E(X'X'X'X'X'X'X'X'X'", "X'X'X'Q(X'R(X'X'X'X'X'S(X'X'X'R(T(T(T(h@X'X'U(T(R(R(R(U(Q(X'Q(V(h@h@X'h@R(h@R(U(X'Q(U(h@h@V(V(V(R(Q(T(R(T(Q(R(h@Q(V(h@h@F(z^_^I]W(X(Y(Z(`( _g{._+_@_#_$_h@h@h@h@h@h@h@h@%_&_h@h@h@*_h@=_h@h@*_h@=_&_h@h@", "=_h@&_=_-_h@&_*_h@;_>_&_=_=_>_;_%_;_h@*_;_;_-_>_&_*_&_*_;_>_%_>_>_;_>_-_=_&_;_;_;_%_;_&_-_;_-_;_;_;_;_-_;_>_;_;_;_,_;_;_'_:^(^)_!_~_{_Z~j{%]]_^_/_(___:_<_<_[_;_;_<_}_|_}_,_,_<_,_;_1_}_,_1_;_;_<_2_<_[_", "<_[_1_1_<_2_1_<_}_<_1_1_|_1_[_1_[_1_1_,_[_1_1_1_,_[_1_[_1_1_1_2_1_1_1_1_1_1_1_1_1_1_1_1_1_1_3_1_1_3_1_1_1_1_1_1_4_1_1_3_5_[^6_7_8_e~9_d~ { {d~0_a_b_c_d_4_1_3_e_f_4_g_h_4_3_g_h_i_g_e_f_4_g_4_4_g_f_3_g_", "i_g_g_g_f_4_g_g_g_g_g_g_g_g_g_g_g_g_g_g_g_j_g_k_g_g_g_g_g_g_g_l_g_j_g_g_j_g_g_>,g_g_g_m_m_g_g_k_g_>,m_g_n_k_k_>,k_k_m_g_o_p_q_r_s_t_u_u_v_w_x_y_z_A_B_C_>,m_m_>,n_n_D_>,n_>,D_>,D_>,>,>,>,>,>,>,>,>,>,>,", ">,>,>,>,>,>,>,E_E_>,>,>,>,>,F_G_G_>,H_H_I_>,>,J_F_I_G_J_I_>,G_E_I_F_E_J_F_>,I_G_I_K_H_F_H_I_F_>,K_K_K_K_I_H_I_I_J_K_J_J_L_M_N_O_P_Q_R_S_T_U_V_W_X_Y_Z_L_J_J_J_J_J_J_J_J_`_J_J_J_J_ :L_J_J_J_J_ :.:.:.:.:", "J_J_+:L_+:`_+:.:`_.:J_@:L_ $L_@: $ : :L_L_+:L_ $ : :J_@:@: $@: $ $ $ : $ $ : $.:.: :@: $ $ $ $ $@:+: $ $ $ $ $ : $ $ $ $ $#:$:%:&:*:=:-:;:>:,:':):!:~:{:]:^: $ $ $ $ $ $/: ${:(:^:_:]:/:::_:^:{:/:/:_:(:", "::::^:_:/:/:::]:/:(:(:/:]: $::::/:/:_:/:_:(:(:_:(:/:/:(:/:/:/:/:::{:/:(:/:/:/:/:/:/:/:/:/:/:/:/:<:/:[:/:/:}:/:/:/:<:/:<:|:/:1:2:3:4:5:6:7:8:9:0:a:b:c:~#/:~#<:|:/:<:|:~#d:/:d:d:d:[:[:~#|:~#c:c:<:[:d:~#", "d:d:c:d:c:<:~#c:~#~#d:~#~#d:d:~#~#~#|:~#~#~#~#~#~#e:~#~#e:~#f:~#~#~#g:e:~#h:~#~#~#h:~#~#h:h:~#h:~#i:h:j:f:h:~#h:h:j:g:e:e:h:g:k:l:m:n:o:p:q:r:s:t:f:u:h:j:u:g:g:e:g:g:j:g:g:g:g:g:j:j:g:g:g:g:g:g:g:g:g:", "g:g:g:g:g:v:g:g:w:g:v:v:v:x:g:g:g:v:v:y:g:w:v:g:z:x:z:y:w:g:z:w:w:v:g:w:A:z:z:w:x:v:v:g:x:v:g:y:z:B:x:z:y:A:w:A:y:g:A:z:B:z:w:A:A:A:z:A:A:y:y:A:y:A:y:A:A:A:A:A:A:A:A:A:A:A:C:A:D:E:A:A:A:A:A:A:A:A:F:A:", "G:D:A:E:A:A:A:A:D:A:E:H:G:H:I:F:H:I:D:I:C:G:F:E:H:I:A:F:F:G:G:H:I:I:G:I:C:C:H:C:G:G:H:H:I:I:H:I:I:H:I:I:I:H:I:I:I:I:G:I:I:I:I:I:I:I:I:J:I:I:K:I:L:K:I:K:I:K:L:I:M:M:I:L:I:I:K:I:I:N:J:I:L:N:L:J:M:O:P:I:", "K:I:M:M:O:M:P:J:J:O:L:O:O:P:K:O:I:M:O:M:M:M:N:N:O:O:P:M:M:O:O:O:P:O:O:O:O:O:O:O:O:O:O:O:O:O:O:O:O:O:O:O:Q:R:O:S:O:S:O:O:R:O:Q:T:O:O:R:O:S:Q:U:U:Q:T:O:V:Q:R:A,S:V:T:A,S:S:V:Q:O:U:Q:T:T:A,U:U:T:O:V:U:A,", "R:R:A,A,U:A,A,U:A,Q:V:V:V:R:A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W:A,X:Y:A,X:A,Z:A,Z:`:A,W:X:A,W:`:X:X: <-<,<><-<><*<=<><'<-<'<=<,<'<'<*<*<;[;[7+>[-[,[>['[7+-[*[;[-[*[*[>[,[;[*['[=[*['[,['['[,[>[*[-['[;['[>['['['['['[;[;[>['[,['['['[,['['['['['['['['['['['['[", "'[)[!['['[!['[~['[{[{[~['['[~['[~['[][!['[)[)[~[~[~[![][][)['[^[][^[![![~[][)[{[/['[^[^[^[^[~['[^[)[][![^[^[~[][^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[([^[_[:[^[^[:[:[<[^[([^[:[^[[[_[<[^[:[:[:[", "[[([<[:[:[:[([^[}[z><[:[^[<[^[:[z>[[:[z>^[z>z>}[z>^[}[([}[}[<[z>z>z>z>z>z>}[z>z>z>z>}[z>z>z>z>z>z>z>z>z>z>z>z>z>z>z>z>z>z>z>|[z>z>1[2[|[3[z>2[z>|[z>z>|[1[z>2[1[2[3[|[1[z>2[1[4[3[2[1[|[z>2[3[2[z>1[1[z>", "1[4[5[4[4[4[5[4[3[5[4[4[6[3[|[6[4[4[4[5[6[4[4[4[4[4[4[4[4[4[4[4[7[4[4[4[4[8[4[8[7[4[4[9[4[7[7[8[8[0[4[a[4[0[8[a[b[a[4[b[8[9[7[8[9[9[4[c[0[4[8[c[c[0[a[c[9[a[7[8[c[9[a[0[0[9[9[7[c[7[b[c[0[9[9[c[9[c[9[9[", "c[c[c[c[c[c[c[c[c[c[c[c[c[c[c[d[c[c[c[c[e[c[c[c[e[d[c[c[c[c[d[c[f[c[e[d[g[f[d[c[g[c[d[h[d[i[e[e[j[j[h[h[h[g[g[h[f[f[h[i[h[j[h[h[i[c[h[h[h[g[j[h[j[i[h[h[h[g[g[h[h[g[h[h[h[i[h[g[h[h[h[h[h[h[h[h[h[h[h[h[", "k[h[k[l[h[l[h[h[m[h[h[h[m[k[l[h[n[k[k[=.l[h[m[o[k[h[k[o[m[=.k[h[=.k[=.=.k[n[o[n[n[h[=.=.o[p[=.=.p[p[=.=.n[=.k[o[=.=.=.=.=.o[o[=.o[=.o[=.=.=.=.=.=.=.=.=.=.q[=.r[q[=.=.s[=.r[r[=.=.q[s[=.=.=.s[t[=.s[=.q[", "u[=.q[q[t[=.q[t[s[s[=.q[u[v[v[q[w[q[t[q[u[v[w[r[w[t[v[u[v[s[r[u[w[v[v[q[t[v[v[u[v[v[t[v[v[t[u[v[v[v[v[v[v[v[v[v[v[v[v[v[v[v[v[x[v[y[v[v[v[z[v[y[A[z[v[v[v[v[v[y[v[B[B[v[x[;,y[y[z[z[v[v[z[z[x[C[A[B[A[v[", "z[;,A[x[y[;,C[z[B[B[B[C[;,z[y[C[;,;,;,;,C[;,;,z[;,B[;,;,;,;,;,;,;,;,;,;,;,D[E[;,F[;,F[;,;,D[E[;,;,D[D[F[D[F[D[E[G[E[;,E[;,F[F[H[E[E[E[D[H[F[F[F[I[J[H[I[J[J[J[H[F[I[J[J[I[I[;,G[I[J[;,D[D[G[J[F[J[J[H[G[", "H[J[J[J[J[H[J[J[J[J[J[J[J[J[J[J[J[J[J[J[K[J[K[J[J[J[J[J[J[J[K[L[J[J[J[J[L[M[M[&!L[J[L[N[&!M[O[M[M[K[K[N[N[L[M[P[N[O[M[&!L[M[P[&!&!M[N[O[&!M[P[O[&!N[&!&!P[L[&!N[&!N[&!K[&!P[&!&!N[&!&!&!&!&!&!&!&!&!&!&!", "Q[&!R[Q[Q[S[R[&!S[S[T[S[R[S[U[&!V[T[&!S[Q[R[Q[U[R[&!U[R[W[S[T[S[U[T[Q[W[V[W[Q[&!T[V[U[V[S[W[R[V[W[U[U[W[W[R[R[S[V[W[W[W[U[U[W[T[W[W[W[W[W[U[W[W[T[W[W[W[W[W[W[W[W[W[X[W[X[Y[W[W[W[X[W[Z[W[Z[W[`[Z[W[ }W[", "W[`[W[Y[j) }W[W[X[ }j)X[`[X[Y[X[.}j)X[j)`[j)Z[Y[j)X[`[.}`[j)j)`[.}Y[Y[j)`[.}`[W[j)j)`[`[`[j)`[j)`[j)`[j)j)j)j)j)j)j)j)+}+}j)j)j)j)j)@}j)@}j)+}j)@}#}$}j)j)j)j)+}j)@}+}+}$}$}j)+}@}j)%}&}&}&}#}*}%}%}*}j)", "*}#}*}#}#}&}%}@}*}*}*}%}&}%}&}*}%}%}%}%}*}%}#}&}&}#}%}%}%}%}%}%}%}%}%}%}%}%}%}%}%}=}%}%}-}%}%}%}%}-}%}%}%}%}%}=}-}%};}=}-}=}%}>}-}%}=},}%}-}'}-},},};};}=})},}'})}'}%}%};}'};}'}>};},})}'}'}>}'}=},}'}'}", "'}'})}'}'})}'}'}'}'}'}'}'}'}'}'}'}'}'}!}'}'}~}'}'}'}~}'}{}'}'}'}'}'}'}'}]}'}]}!}]}'}!}~}{}^}]}^}{}'}]}^}/}^}!}]}^}(}'}]}/}(}^}^}(}]}(}~}^}/}^}{}^}{}'}^}!}^}^}^}^}^}^}!}(}/}^}^}^}/}^}^}^}^}^}^}^}^}^}^}", "_}:}:}^}:}^}<}^}:}^}:}<}[}^}:}_}<}[}<}:}}}[}:}:}<}^}<}_}<}|}<}[}-,-,[}:}-,}}-,<}:}}}^}|}-,[}-,}}-,-,}}|}<}|}-,-,|}|}-,-,-,|}}}-,[}-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,1}-,1}-,-,-,-,1}-,2}-,3}2}4}2}1}5}", "2}5}-,-,1}5}6}6}-,-,3}5}5}5}3}-,2}-,7}2}2}1}2}7}6}7}1}7}4}4}5}1}6}6}4}7}7}7}7}7}6}7}3}3}7}7}5}7}7}6}7}7}7}7}7}7}7}7}7}7}7}7}7}8}9}7}7}8}0}7}9}7}a}7}7}8}7}7}7}7}0}a}9}8}9}0}9}8}7}b}9}0}c}7}b}9}b}a}a}0}", "b}a}a}b}d}c}d}a}7}a}b}b}c}c}b}b}d}c}b}9}b}b}c}8}d}b}b}b}b}b}b}b}a}b}b}b}b}b}b}b}b}b}b}e}b}e}b}e}b}b}b}b}f}e}e}b}e}f}b}b}g}e}e}b}g}h}h}e}b}i}f}j}f}i}b}b}j}e}k}i}e}i}h}h}k}g}g}i}j}h}k}f}h}g}h}h}h}h}h}h}", "h}h}f}i}g}h}h}h}h}h}h}h}h}h}k}h}h}h}h}h}h}l}m}n}h}h}n}h}h}h}l}o}h}h}h}l}h}m}h}h}h}h}n}n}p}h}m}l}n}o}n}q}r}o}o}n}n}q}l}q}m}p}p}q}p}r}n}p}n}q}n}l}r}r}q}l}m}r}p}p}p}p}p}q}p}p}q}r}p}p}p}q}p}p}p}p}p}p}p}p}", "p}s}s}s}s}s}t}u}p}p}s}t}p}p}t}p}v}s}s}p}p}w}v}p}w}x}v}v}p}p}w}k)s}u}x}v}v}u}k)w}x}x}x}k)k)k)p}w}k)u}w}k)w}k)u}k)u}k)k)x}v}w}u}k)w}k)k)k)u}u}x}k)k)k)k)k)k)k)k)k)k)k)y}k)k)k)k)k)k)k)k)k)y}z}k)k)z}k)k)k)", "y}A}k)k)B}A}B}y}C}z}z}k)k)A}k)B}B}D}B}k)D}z}E}E}C}D}E}D}E}C}E}D}D}A}D}C}B}C}D}D}D}C}D}D}D}D}D}D}D}C}D}D}D}D}D}D}D}D}D}D}D}D}D}D}D}F}D}D}D}D}D}G}D}D}D}F}D}D}H}G}D}H}I}G}H}I}D}F}G}J}I}F}F}J}J}F}D}F}G}D}", "z,G}J}G}G}J}z,G}J}K}G}z,G}J}F}J}K}F}z,J}K}K}z,J}G}z,G}z,J}K}K}z,G}z,G}z,z,z,L}z,z,z,L}M}z,z,z,N}z,z,M}z,z,z,z,z,z,z,z,O}N}z,M}N}z,P}M}L}z,P}L}z,M}Q}P}O}L}M}z,R}z,L}P}N}P}z,R}R}N}Q}Q}L}N}Q}Q}P}Q}N}L}Q}", "N}Q}M}Q}P}Q}Q}Q}Q}Q}Q}Q}Q}Q}Q}P}Q}Q}Q}Q}Q}Q}Q}Q}Q}Q}Q}Q}Q}Q}S}Q}Q}Q}T}Q}Q}Q}S}Q}U}T}T}T}V}W}T}X}S}T}W}S}W}W}W}V}U}V}V}Q}U}X}Y}Y}V}U}Y}Y}U}V}Y}U}T}Y}U}Y}W}V}Y}Y}U}Y}T}W}X}Y}Y}Y}Y}Y}U}Y}X}Y}Y}Y}Y}Y}Y}Y}", "Z}Y}Y}Y}Y}Y}Y}Y}`}Y}Y}Z}Y}Y} |Y}.|`}Y}+|Y}Z}Y}Y}Z}`}Y}+|Y}Y}@|+|Z}Y}Y}+|Y}@|Z}Z}@|Y}Z} |`}@|#|Z}#| | |`}#|`}#|`}Z}#| |#|.|#|.| |#|#| |#|#|#|#|#|#|`}#|#|#|#|#|#|#|#|#|#|#|$|$|#|#|%|#|%|&|#|#|$|*|=|%|&|", "*|%|%|#|#|$|#|%|#|$|#|$|*|*|%|&|#|=|*|$|#|$|*|&|*|-|#|&|=|=|&|%|=|;|%|&|=|*|*|-|=|-|%|=|-|-|%|-|-|*|&|-|-|=|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|>|>|-|-|,|-|>|'|)|,|)|-|>|-|-|,|)|-|'|,|,|-|)|)|!|!|,|~|-|", ")|'|'|>|,|3 ~|~|~|'|!|'|'|)|3 3 3 3 !|3 3 '|3 3 3 ~|3 3 '|3 >|3 !|3 3 3 3 3 3 3 3 3 3 3 {|{|]|3 3 3 3 3 ^|^|]|3 3 /|^|{|/|3 3 {|/|/|{|^|{|^|3 /|(|3 3 /|]|_|{|{|3 /|^|(|]|{|^|(|:|:|]|/|_|]|:|:|:|3 _|{|", "^|_|:|:|:|/|:|:|(|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|<|:|:|:|:|<|[|[|:|:|[|}|||[|:|:|:|||:|[|<|:|}|1|}|:|:|:|}|:|:|2|}|:|<|<|||<|||[|:|<|2|<|}|1|g ||}|||<|}|}|||g 1|g g g g ||g g ||||g g ||g }|}|g 1|g g ", "g g g g 3|4|g g g g 4|g g 5|6|g g 7|7|3|3|g g 4|3|g 3|g 8|5|9|5|6|4|4|g 3|8|6|4|7|7|6|4|5|5|6|4|5|8|5|8|8|8|8|7|7|8|6|6|8|8|8|8|6|9|8|9|5|8|5|8|8|8|8|8|7|8|8|8|8|8|0|8|8|8|8|8|a|8|b|8|8|8|8|8|8|8|8|c|", "d|c|b|e|a|a|d|0|8|c|8|0|e|e|0|e|b|a|e|e|d|c|b|c|b|8|0|b|a|0|c|e|8|c|0|F$F$d|c|d|e|F$0|F$F$d|b|F$F$d|F$d|F$F$F$F$F$F$F$F$F$F$F$F$F$F$F$F$F$F$F$F$f|F$F$f|F$g|F$h|i|F$F$F$g|i|F$F$F$F$F$i|g|f|h|h|F$g|h|g|", "j|h|i|h|k|h|l|h|i|l|f|g|j|j|i|f|l|i|k|l|h|h|i|j|k|j|j|f|j|j|k|j|j|i|j|j|k|j|j|j|j|j|j|j|m|j|j|j|j|j|j|j|n|j|j|j|j|n|j|j|o|j|n|j|n|j|i)n|m|p|o|j|q|q|n|p|j|r|o|p|p|q|i)p|m|n|p|q|o|o|n|n|j|q|r|n|i)n|n|q|", "i)r|i)o|q|i)r|i)i)r|i)i)i)i)r|i)i)i)i)i)i)i)i)i)i)i)i)i)i)i)i)i)i)i)s|s|t|i)s|i)u|i)u|u|t|i)s|v|t|v|u|i)w|i)w|x|u|w|i)i)x|x|s|i)s|i)x|v|u|y|u|s|i)v|t|v|x|x|x|y|v|y|y|x|y|t|t|x|t|y|y|y|t|y|y|x|y|y|y|y|", "y|y|y|y|y|z|y|y|y|y|y|y|z|y|y|y|y|y|A|y|z|B|A|z|A|y|y|y|y|y|A|A|A|B|A|C|y|z|D|B|y|D|C|D|y|E|D|B|C|C|D|D|E|C|D|D|D|F|E|D|C|C|D|E|D|y|z|D|D|D|E|D|D|D|D|D|C|C|D|D|D|D|D|D|D|D|D|D|D|D|G|H|H|D|G|G|D|D|D|D|", "I|D|J|D|D|D|D|D|G|K|L|H|H|L|G|K|G|D|K|H|H|D|H|D|L|M|G|H|H|M|I|M|J|M|H|J|M|H|J|M|L|M|I|I|K|M|I|M|I|M|M|M|L|M|L|M|M|M|M|M|M|M|M|M|M|M|M|M|M|M|M|N|O|M|M|M|M|M|N|M|P|O|O|M|M|M|M|O|M|Q|N|Q|R|M|M|N|N|M|R|Q|", "&+O|O|Q|N|R|R|O|R|P|S|O|P|P|O|O|P|O|S|S|&+&+&+&+Q|&+&+Q|R|R|Q|&+R|&+&+P|&+R|&+&+&+&+&+&+&+&+&+&+T|&+U|&+T|&+&+&+&+&+&+T|V|U|T|&+T|V|U|U|&+&+W|&+&+U|&+U|&+T|W|U|V|W|U|X|U|U|Y|&+&+T|V|U|Z|Y|U|Z|Z|Y|Z|Z|", "Y|Y|V|Z|Y|Y|Y|Y|Y|Z|Y|W|X|Y|Y|W|Y|X|Y|Y|Y|Y|Y|Y|Y|Y|`|Y|Y|Y|`|Y|Y|Y|Y|Y| 1.1+1`|.1Y|+1+1Y| 1`|.1`| 1@1Y|@1`|Y| 1@1+1.1.1`|@1#1#1@1@1Y|@1#1`|.1#1Y|#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,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_17$", "<1^1<17$/1]1<1^17$/1_1/17$<1(17$:17$]17$7$_1:1:17$:1^17$7$7$7$7$7$7$_17$7$7$:17$:17$7$7$7$7$7$7$7$7$[17$7$}17$7$7$}17$7$7$}1[17$7$[1[17$|17$7$7$117$117$[1[121}17$21317$|1417$7$}141|1|1}1|17$21417$21|1", "1121|121|131|1|1|1|1|1212131[1213131|1|131|1|1|1|1|1|1|1|1|151|1|1|1|1|161|1|1|1|1|1|171|18181|161|191918101518191|161|1|19101|161a1916161a151a171517101717171617171717171716191a1715161a171017171a17171", "7171717171717171717171717171717171b17171717171717171b1c1d1c1d17171e1e171f1e1c1e17171g1d1f1b1g1d1b1d1c1f1f1d1f1g1d1A.g1A.A.f1f1g1d1A.b1A.f1e1g1g1f1d1A.A.A.A.A.A.f1A.A.A.A.A.A.A.A.A.A.A.A.A.h1A.A.A.A.i1", "A.A.h1h1j1k1l1A.h1k1i1A.A.A.l1h1h1m1j1j1h1i1h1i1A.i1i1m1h1j1i1k1n1l1m1k1h1m1m1i1k1i1m1h1m1j1k1m1l1n1j1n1i1m1m1m1m1i1j1m1n1m1m1m1m1m1m1m1m1m1o1m1m1m1m1p1m1p1m1m1m1q1p1r1m1s1m1t1m1m1p1q1m1p1q1m1p1o1s1s1", "r1n#t1m1q1n#n#s1r1p1q1r1r1o1s1t1q1s1n#o1s1s1n#n#q1p1r1t1n#n#s1n#n#n#n#n#r1n#n#n#n#n#n#n#n#r1n#n#n#n#n#u1n#n#n#n#n#u1n#n#v1w1v1v1n#n#x1y1z1n#n#u1x1n#v1u1n#x1w1x1z1n#y1z1y16+6+w1n#y1y1z16+y1u16+y1y16+6+", "v16+y1u16+6+6+y16+y16+6+v16+6+6+6+z1y1z1u1w1y16+6+6+6+6+6+6+6+6+A1B16+6+6+B16+6+A16+6+C1A1D16+B1E1B16+B16+C1C1B16+6+A1C16+F16+E1D1E1C16+D1F1B1C16+F1E1F1D1B1F1A1F1G1C1F1F1C1G1F1G1D1F1E1F1F1A1F1E1F1F1F1", "F1F1F1F1F1F1F1F1F1F1F1H1F1F1I1F1F1F1J1F1J1K1F1I1F1K1H1H1J1F1I1F1H1H1J1F1L1F1M1K1F1H1H1M1L1J1K1F1F1K1H1K1I1I1M1M1I1L1F1L1K1L1H1I1M1K1L1L1M1L1M1M1M1J1L1K1K1K1L1K1L1L1L1H1M1L1L1L1L1L1L1L1N1L1L1L1L1L1L1L1", "L1L1L1N1N1L1O1L1L1O1O1P1L1L1N1Q1O1P1N1R1S1S1O1L1S1S1T1N1S1T1T1R1N1Q1O1T1Q1T1Q1T1N1O1R1T1R1Q1S1Q1T1Q1N1T1R1T1R1T1S1T1T1T1Q1T1T1T1T1T1T1T1T1T1T1T1T1T1T1U1T1T1U1T1U1T1U1T1V1T1W1X1X1T1T1V1T1T1X1Y1T1U1V1T1", "Z1V1T1U1Y1T1Z1Z1`1V1U1Z1`1V1W1Z1W1X1T1Y1Z1Y1W1W1W1Z1Z1Z1W1Z1`1Z1W1T1Z1U1`1Z1Z1Z1`1Y1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1Z1 2.2Z1+2Z1 2@2Z1@2Z1Z1Z1@2@2.2Z1#2Z1 2Z1.2@2 2 2+2 2.2@2$2$2$2.2 2 2%2.2", "#2%2$2$2Z1#2#2$2$2%2 2$2$2$2%2.2Z1#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(2m#!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/2m#m#:2<2m#<2m#(2(2_2[2:2m#[2m#:2m#m#<2m#m#m#m#<2m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#}2}2m#m#|212}2m#12m#22|2|232}2m#}212", "}242423212|252322222|2}2|232525242m#m#123252522222}25252124232325222225252525252|23242322252522252525252525252627252528252525272525262627272725252927272825202520252a272025272b29252b202828292a202a26252", "62b292b20202b2b2a28202920202620202b272a2020202b2b20202020202b2020202c2020202020202c20202d202d2d2020202d2e202f2c2e202g20202f2f2g2c2c202h2.@d2h2f2e2c2h2h2e202g2d2d2c2c2e202e2f2h2f2d2g2.@f2g2d2f2f2.@.@.@", "h2.@.@.@.@.@f2.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@i2.@j2.@.@.@j2k2.@k2k2l2m2.@i2j2n2l2n2o2k2l2.@.@m2j2i2i2i2l2m2k2j2m2n2o2o2m2k2l2j2n2o2j2n2o2o2j2n2n2o2k2m2o2o2n2o2o2o2o2o2o2o2o2o2o2o2o2o2o2p2q2", "o2o2o2o2o2q2q2r2q2o2o2o2o2o2o2o2p2s2o2o2o2q2t2u2r2u2r2t2s2v2p2s2s2s2p2t2r2v2r2q2v2v2p2t2q2s2s2t2s2s2r2t2r2q2u2s2t2s2v2v2u2t2s2v2t2u2s2s2s2v2s2s2s2s2s2s2s2w2s2x2s2x2y2s2x2z2s2A2s2y2B2x2B2w2y2w2w2x2w2s2", "y2s2z2A2z2z2w2y>y2B2y>B2B2w2A2z2A2x2y>A2z2B2y>z2x2x2s2z2y>y>s2A2B2B2w2y>y>z2z2A2y>y>y>y>y>z2y>y>y>y2y>A2y>y>y>y>y>y>y>C2y>y>y>y>y>C2C2y>y>C2C2y>y>D2y>C2C2D2E2y>y>F2F2C2G2C2H2F2C2G2E2G2F2F2I2H2G2F2G2I2", "D2D2F2C2D2D2D2G2D2H2D2D2I2E2G2D2D2I2D2D2D2D2D2D2D2D2D2D2D2D2D2I2D2D2D2D2D2D2D2D2D2D2D2D2D2J2D2K2D2L2K2K2L2D2D2L2J2D2M2M2M2D2J2D2N2O2D2L2L2P2L2P2K2D2N2D2J2N2L2P2D2O2K2L2P2N2P2M2L2P2J2P2M2P2M2P2P2N2O2P2", "P2P2O2P2P2O2P2P2P2P2P2P2P2P2P2P2Q2P2R2P2S2P2P2T2U2P2P2P2P2P2P2P2Q2V2S2U2U2P2P2Q2U2Q2V2Q2W2Q2Q2V2U2P2S2U2R2W2R2P2P2W2V2W2V2V2S2T2R2S2U2T2T2T2T2R2P2W2S2W2T2V2T2S2S2T2T2T2T2T2T2W2T2T2T2T2T2T2T2T2T2T2T2T2", "T2T2X2X2Y2T2T2Z2Z2T2T2X2T2X2T2T2X2X2`2Y2X2 3Y2T2Z2T2T2Y2.3Z2.3Y2X2.3 3`2Z2 3`2Y2 3+3X2.3.3+3X2T2`2+3Z2+3+3.3+3Z2.3+3X2.3Y2Z2`2.3.3.3.3.3 3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3@3#3#3.3$3$3.3#3%3.3.3.3.3.3", "#3@3@3.3@3%3$3@3&3.3#3#3&3&3.3@3#3$3%3*3#3@3*3=3=3.3%3&3%3=3&3@3%3#3=3=3*3*3&3#3*3*3*3*3%3*3*3*3*3*3*3*3*3*3=3*3*3*3*3-3;3*3*3*3*3*3*3*3*3*3-3-3>3;3*3*3*3-3,3-3-3'3-3;3*3>3)3;3*3)3*3,3>3!3)3-3-3*3'3-3", ",3)3*3'3'3'3-3-3'3,3!3'3>3*3)3-3!3)3!3>3,3>3!3!3!3!3-3!3!3,3!3'3!3!3!3!3!3!3!3!3!3!3!3!3!3!3!3~3{3!3]3{3!3{3{3^3{3!3!3!3!3!3{3~3!3!3^3/3(3~3!3(3^3]3]3~3^3!3]3^3_3{3_3(3^3~3]3]3/3/3_3^3]3/3/3/3/3/3/3_3", "_3/3/3/3/3/3(3/3(3(3^3^3_3/3/3/3/3/3/3/3/3/3/3/3:3/3/3/3/3/3<3/3/3:3/3/3:3[3<3}3|3/3<3[3<3:3<3/3}3[38@:3[3[3:3/3<3:3[3<3|3|3<3}3/38@/3}3}3[3<38@[3}38@8@8@138@8@}3[313<38@8@138@8@8@8@[38@8@8@}38@8@8@8@", "8@8@238@8@8@8@8@338@238@8@8@8@8@8@4333532333433343636373638@2363338@436@7323636@238@43636353536323536@6@6353436@6@7363636@5333436@6@6@636343736@6@6@6@636@6@6@836@6@6@6@6@6@936@6@6@6@93036@6@6@036@936@", "6@6@93a3a303b39393836@836@6@c3a36@83c30383d383c3b3a3a3c3d36@c3d3a3c3b3d3b3c3c3c3c3d383b3c3c3c3c3a3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3e3c3c3f3c3c3g3f3h3f3h3h3e3c3c3c3f3c3c3c3e3i3e3e3c3j3e3h3h3e3c3i3h3c3z.", "c3h3i3z.h3i3j3z.c3g3j3j3z.z.i3c3g3i3z.f3z.g3z.z.g3z.i3z.z.z.z.j3z.g3z.z.z.z.z.z.z.z.z.z.k3z.z.l3z.z.z.z.m3k3z.l3z.z.n3k3z.m3z.o3k3k3z.n3k3n3z.z.o3k3n3l3z.k3k3n3z.l3J m3m3m3m3m3J o3k3k3J J J J m3J J J ", "J J J J m3J m3o3l3J J J J J o3J J J J J J J J J J J J p3J J J q3J p3q3J J p3J r3p3J p3s3q3J J s3q3s3J J t3r3t3r3s3J p3J J J p3u3v3r3q3s3u3r3s3q3s3s3u3s3t3s3t3v3J s3s3s3s3v3u3s3p3s3s3s3s3s3s3s3s3s3s3s3", "s3s3s3s3s3s3s3s3s3s3s3w3s3x3y3s3s3w3s3s3z3s3A3s3A3x3w3A3E$y3B3E$s3z3E$E$w3s3x3y3E$x3E$z3w3y3A3B3y3E$E$z3A3E$B3x3E$E$E$E$E$E$E$z3w3B3E$E$A3x3x3x3E$B3E$E$E$E$E$E$C3E$E$E$E$D3E$E$E$E$E$E$E$E3C3D3E$F3G3E$", "E$E$G3H3D3C3E$E3G3E$G3E$w+D3F3w+C3C3C3w+F3E3G3G3H3w+F3H3D3E3H3F3w+H3D3E3w+C3C3w+E3H3D3w+H3w+w+E3w+H3w+w+w+w+w+w+w+w+w+w+w+w+w+w+w+I3w+w+w+w+w+J3w+w+K3L3I3L3w+w+M3L3L3w+w+N3w+w+N3N3N3M3w+I3K3J3w+`#J3N3", "L3K3`#`#w+w+J3L3J3M3J3w+M3I3`#`#N3`#I3I3I3`#K3M3`#`#`#`#`#M3`#`#`#`#`#I3`#`#`#`#`#`#`#`#`#`#`#`#`#O3P3`#`#`#Q3`#`#R3R3`#R3O3S3T3T3`#S3`#S3`#`#`#R3`#`#Q3S3`#`#`#R3S3R3Q3`#R3`#P3h h P3T3O3h h O3R3h T3h ", "T3Q3h h R3P3h T3P3h P3h h h h h h h h h h h h U3h h V3W3h h W3U3h W3h U3W3h V3h h U3U3h V3X3W3W3Y3V3L%h U3W3h X3h X3Y3X3U3h Z3U3U3h W3L%X3U3X3Z3W3X3Y3V3V3L%h X3L%Y3Z3L%L%Y3U3L%L%L%Y3L%L%L%L%L%L%L%L%Y3", "L%L%L%L%L%L%L%L%L%L%L%L%`3 4L%.4<@L%L%.4`3.4+4L% 4L%L%@4 4@4L%<@.4@4.4+4L%L%@4L%<@@4`3`3+4`3+4<@.4 4 4@4#4<@+4@4.4#4+4@4<@+4+4.4#4+4+4`3 4<@#4+4<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@$4%4<@%4<@%4%4<@&4&4", "*4<@&4%4&4<@$4*4<@$4&4=4=4%4%4*4=4$4$4&4$4=4}&}&%4*4}&=4}&&4=4*4=4=4%4=4}&*4*4$4}&%4-4}&-4-4-4=4=4=4=4}&}&*4*4}&$4}&}&}&*4}&}&}&}&}&}&;4}&}&>4}&}&;4}&}&}&}&>4}&}&}&,4}&>4}&;4'4}&,4;4>4}&}&;4'4}&'4,4)4", "'4'4}&>4)4'4!4~4;4~4>4!4}&!4!4)4;4!4~4'4!4!4'4)4!4!4!4!4!4!4!4~4~4!4!4'4)4!4!4!4!4!4!4!4!4!4!4{4!4!4!4!4!4!4]4!4!4!4!4{4^4!4!4]4!4/4!4^4(4/4!4!4^4!4!4G@_4(4/4]4{4/4G@G@G@]4G@{4G@_4G@_4G@{4G@^4^4]4G@G@", "G@_4_4G@G@_4G@G@(4]4G@(4_4(4G@G@G@^4G@G@G@G@G@G@G@G@G@G@G@G@G@G@G@:4:4:4<4[4G@<4G@:4[4}4G@G@G@<4:4<4|4G@+@G@:414G@G@:4G@14<4+@+@[4}4+@14<4|4141414}4+@+@+@}4G@G@+@:414}4+@<4+@+@+@+@+@|4+@+@+@14+@+@|4+@", "+@+@+@+@+@24+@+@34+@+@+@+@+@+@24+@4454+@44+@+@24+@+@+@+@+@24645444746424347484548424+@4424843434+@642484648424846424845464+@848474643474646464847484646464746464646464646464646464646464940464646464a464", "64b46404c4c4c4d4c46464c464e4e4c464c4b40404c4c46464a4c494b40494b4d4b4b4d4a4b4d404e4d4d4d4d4d4e4d4d4e4d4b4a4b4d4d4d494d4d4d4d4b4d4d4d4d4d4d4d4f4g4f4h4h4d4f4d4d4d4d4d4d4g4d4d4d4i4d4d4f4d4d4j4f4i4k4g4k4g4", "h4d4g4g4h4f4h4g4k4d4d4g4k4j4k4k4d4g4k4k4k4f4i4i4i4h4k4k4i4j4i4l4j4f4l4l4i4j4l4k4i4i4i4i4i4i4i4i4i4i4i4i4i4i4m4i4i4i4i4i4i4i4n4o4n4i4i4p4q4i4m4i4n4i4n4n4p4k k n4q4m4i4q4n4r4o4q4p4p4p4o4p4p4m4k q4o4r4n4", "p4k q4p4k r4o4p4r4k k r4k k k p4o4r4k p4k k k k k s4k t4k k k u4k k k s4k k k k k k k t4k v4k t4k u4k k w4t4x4u4u4t4s4x4t4s4u4u4v4v4t4w4k v4t4v4t4v4s4v4k w4w4v4s4v4x4x4w4w4k s4y4v4v4y4v4y4w4v4v4v4w4v4", "v4v4v4v4v4v4v4v4v4v4v4v4z4A4v4B4v4v4A4v4v4v4v4v4v4v4z4z4C4v4v4B4D4A4D4B4v4z4D4E4v4E4z4z4v4B4v4E4B4B4A4D4B4v4C4E4E4A4D4E4B4z4A4F4E4F4E4E4E4E4E4F4D4E4E4E4z4E4E4A4E4E4E4E4E4E4E4E4E4E4E4G4H4E4E4I4E4E4I4E4", "E4E4H4E4E4J4E4H4H4H4K4H4G4L4H4H4E4H4J4E4M4G4I4K4M4M4H4M4H4K4M4M4L4K4K4H4J4K4G4L4M4M4L4H4L4L4M4L4M4K4M4M4M4M4K4M4L4M4M4M4M4M4M4M4K4M4M4M4M4N4M4M4N4M4M4O4M4M4M4M4M4O4M4P4M4Q4M4M4Q4R4M4M4R4P4O4O4S4Q4R4P4", "R4M4N4O4M4T4P4R4R4S4R4Q4M4P4T4O4M4R4T4R4O4P4R4S4S4T4T4T4T4T4T4R4M4S4T4S4N4T4S4T4T4T4T4T4T4T4T4T4T4T4T4T4T4T4U4T4T4T4T4T4T4V4T4T4U4W4T4T4X4W4Y4V4Y4U4Z4Z4Y4T4V4T4Y4V4X4Z4X4`4V4Y4W4`4T4U4Z4`4V4U4Z4Y4V4V4", "U4`4`4V4`4Z4W4`4`4`4Y4`4Z4`4`4`4`4`4`4`4`4`4`4`4`4`4`4`4`4`4 5`4`4`4 5`4`4.5`4`4`4`4+5`4 5`4`4`4`4`4+5+5 5.5.5+5`4@5+5+5@5 5@5+5#5.5.5+5.5`4+5@5$5@5`4%5$5$5`4+5%5#5#5$5$5@5.5$5`4$5%5$5$5$5$5$5$5`4$5$5", "%5$5$5$5$5.5$5$5&5$5$5$5$5*5$5$5$5=5&5$5$5$5$5$5&5-5*5*5$5;5&5$5$5-5*5-5$5>5*5*5;5$5;5$5*5-5;5*5H@*5-5&5H@;5=5>5-5>5=5;5;5H@=5H@&5H@H@-5;5>5&5=5;5=5H@H@*5H@H@H@;5H@H@H@H@H@H@H@H@H@H@H@,5H@'5H@H@H@H@H@", ")5,5H@'5!5H@'5,5!5,5H@'5~5)5'5,5H@!5{5!5{5!5{5H@!5]5)5{5!5!5H@~5{5!5]5{5~5]5{5]5{5{5]5)5{5{5{5]5{5{5]5~5)5{5]5{5~5{5{5{5{5{5{5{5{5{5{5{5{5{5{5^5{5{5{5{5{5{5{5{5{5^5/5{5{5{5(5{5{5/5^5(5_5{5(5/5(5/5/5:5", "<5(5<5{5(5{5(5(5(5_5[5<5:5^5[5_5[5:5_5:5[5_5_5_5(5/5[5<5[5_5<5[5[5[5[5[5[5[5[5[5[5[5[5[5[5<5[5[5[5[5[5[5}5|515[5[5[5[5[5[5|5}5|5[525[5[535[545[5}53535[52555[5[515[5}5|5}5[5154545[5|5|53525|545[5[545|5", "25}52545}5453535354545453545254545254555454545454545454545456545454545754545757585954545450505857575454575a5a575b575459505b5758595a5b5b5a59545a56595458545a5a5a54575a5b595950595959565956595959595950595", "9595959595959595959595c59595959595c59595c59595c59595d5c5e59595f595c5g59595c5e5c5c5c54 f5f5c595d595c5h5g5h5e5f5h5g5f5d54 g54 f5d5e54 e5d5h5c54 4 4 g5d54 g5g5g54 g54 e54 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 ", "4 i54 j54 k5j54 4 l54 l5l5l54 4 j54 m5n5k5i5i5j5l54 n5m54 i5i5k5m5k5m5n5m5j5j5j54 n5m5o5j5k5n5o5n5k5j5l5o5i5k5o5n5n5n5j5o5n5n5n5n5m5n5n5n5n5n5n5n5n5n5n5n5n5p5n5n5n5n5n5q5n5n5n5n5q5n5q5n5p5r5r5n5s5s5n5", "q5n5n5t5n5q5t5u5r5s5u5p5q5t5u5v5u5t5u5t5r5u5n5v5v5n5u5v5r5v5u5v5v5u5u5u5u5u5u5r5r5u5u5u5u5u5u5u5u5u5u5u5u5u5u5w5x5y5y5u5y5u5u5u5z5y5y5A5u5y5u5u5u5B5y5x5u5y5y5A5u5C5y5z5w5u5B5B5B5y5z5x5y5u5B5z5C5x5z5B5", "C5A5C5z5y5A5A5z5A5z5z5z5A5z5w5B5z5A5A5A5A5A5A5A5A5A5A5B5z5A5A5A5A5A5A5A5A5A5A5A5A5D5A5A5E5F5E5G5F5D5G5A5A5H5A5H5E5F5G5F5A5A5E5A5D5H5A5F5I E5H5E5G5A5I5D5E5F5I A5I D5E5I G5G5I D5D5I5I5I E5E5I H5G5F5D5I ", "D5I D5I I I I I I I I I I I I I I I I I I J5I I K5L5M5J5I J5N5L5J5J5I O5I I I I N5J5P5O5I M5I P5M5O5I O5O5O5I P5N5J5M5L5J5O5O5L5O5M5P5K5K5N5O5O5P5O5M5O5P5L5K5K5O5O5M5O5O5O5K5O5O5O5O5O5O5O5O5O5Q5R5O5O5", "O5O5O5Q5Q5O5O5Q5O5O5S5T5S5%+Q5O5S5T5U5%+R5T5Q5R5R5S5Q5Q5R5V5U5%+R5%+Q5T5O5T5S5V5T5T5U5Q5S5V5T5%+%+V5V5%+T5U5%+%+V5%+U5%+U5%+%+U5%+%+U5%+%+%+%+%+%+%+%+W5%+%+%+W5%+%+%+%+X5%+%+Y5W5Z5%+%+%+%+`5W5 6 6`5%+", "%+%+X5W5W5%+Z5X5y. 6Y5Y5Z5 6X5y.`5%+y.Y5Y5Y5%+X5Y5y.Y5y. 6`5`5y.`5`5Z5y.y.y.Z5`5 6y.y.y.y.y.Y5y.y.y.y.y.y.y.y.y.y.y.y..6y..6y.+6y.y.@6.6y.y.y.@6.6+6y.#6y.#67..6+6+6$6+6y.@6.6+67.$6%6$6$6%6$67.y.@6#6$6", "%6.6#67.#6+67.@67.7.7.$67.#6#6%6#67.%67.7.7.7.#67.7.#67.$67.7.7.7.7.7.7.7.7.7.&67.*67.7.*6&6&6=67.-67.7.;67.-6&6=6*6&6-6-6&67.*6*.;6*6;6-6-6*.>6-6>6*.&6*.=6*.=6=6*67.-6-67.=6>6;6*.=6>6=6*.*.=6>6*.*.*.", "*.*.*.*.=6;6*.*.*.*.*.*.*.*.*.*.,6*.*.*.*.'6*.*.*.'6*.*.*.)6)6*.'6*.*.*.*.*.,6)6'6)6!6*.'6F ,6~6*.{6'6~6~6{6)6{6{6F *.{6F )6F !6~6F ,6!6!6!6F '6!6F '6)6!6~6~6F F ~6F ,6F F F F F F {6F F F F F F F F F ", "F F F ]6F ^6^6F F ]6F F F F ]6F F /6(6^6F (6F F /6_6_6^6:6^6F (6_6_6<6:6<6(6_6^6F F <6<6<6_6^6<6_6(6(6:6(6]6<6<6<6]6<6<6<6<6(6<6<6(6(6/6<6(6<6<6<6<6<6<6<6<6<6<6<6[6}6}6<6}6<6<6<6[6|6D$<6[6<616<626}6<6", "|616}6D$<6<63636162616}636|616}6D$|636|636D$[6[626162626D$2616[6161616D$16D$36D$D$D$163636D$26D$D$D$D$D$D$D$D$D$D$D$D$D$D$46D$D$D$D$D$D$D$D$D$56D$D$D$6676867%D$D$86D$4646967676D$D$66665656D$767%669686", "D$867%7%7%667%665656764656867%7%567%7%865646867%86867%7%7%967%7%7%7%7%7%067%7%7%7%7%a67%7%7%7%7%b6a67%06a6c606b6067%7%067%0606a67%06a67%7%7%d6d6e6e6d6d6b6d6c6b65+7%7%5+5+7%d65+5+5+5+c65+d6b65+5+b65+5+", "5+c6e65+5+5+5+5+5+5+5+5+5+5+5+5+5+5+5+5+5+f65+5+5+5+5+g6h65+i6f65+h6f6h65+h6f6h6f65+f6j6k65+g65+5+$+$+5+f6j6g6j65+5+h6i6j65+h6$+5+f6$+k6k6$+$+$+i6h6k6i6h6$+$+j6$+i6$+j6$+$+h6$+$+$+$+$+$+$+$+$+$+$+$+$+", "$+$+$+$+$+$+l6m6$+n6o6p6m6m6$+$+$+$+l6q6l6m6p6n6p6$+l6$+$.m6$.q6l6n6n6q6m6o6m6m6n6p6$+q6$.n6p6p6n6$.o6$.m6q6n6p6q6q6n6$.n6$.m6$.$.p6$+p6$.$.o6$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.r6$.$.$.s6$.$.$.$.$.t6u6t6$.", "t6s6r6$.v6r6v6x.w6t6s6s6s6x.v6t6t6v6t6v6s6w6x.x.v6$.t6s6u6t6v6w6r6x.v6v6w6u6w6v6x.x.x.x.u6x.x.x.u6x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x6x.x.y6z6A6y6x.y6y6z6z6B6x.z66.A6x.y6x.z6A6C6y6x6C6x6x6z6x6x.x.", "6.6.C66.6.z6C66.y6C6z6B6x6x66.6.B66.x66.6.A6B66.x66.6.6.6.C66.6.6.x66.6.6.6.D66.6.6.6.6.6.D66.6.E66.D6D6D6F6G6G6E6&.D6G66.H66.E6D6D66.G66.D6D6F6H66.D6&.&.D6H6G66.E6I6G6F6H6F6H6&.&.G6G6G6F6F6G6&.H6&.&.", "E6H6&.6.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.J6K6&.&.&.L6J6&.&.M6J6&.L6N6&.L6&.K6&.&.&.J6L6K6K6M6J6J6J6J6L6K6K6O6N6K6O6J6L6u.u.L6N6M6N6L6O6L6u.N6u.u.L6u.K6L6u.N6M6M6K6u.O6O6u.u.O6u.O6u.u.u.u.u.u.u.u.", "u.u.u.u.P6P6u.Q6R6u.u.P6R6u.R6P6R6R6u.S6R6T6R6u.U6R6Q6Q6u.u.Q6U6P6T6S6P6T64.4.P6T6U6S6u.U6T6S6Q64.U6u.Q64.4.4.4.4.R64.Q64.4.4.Q64.Q6T64.4.S64.4.4.4.4.4.4.4.4.4.4.V64.4.4.4.4.4.4.4.4.4.4.W6W6X64.4.V6V6", "V64.H H Y6Y64.Z6X6H 4.V64.Y6W6H X6X6X6Z64.Y6Z6V6H X6`6X6Z6`6H `6`6`6H H `6H Z6H H X6Z6H H H X6`6`6H H H H H H H H H H H H H H 7.7H +7H @7H H 7+7H H H H H @7H .7 7H H @7H @7#7+7v+$7$7H @7H .7H .7$7 7", " 7#7@7#7#7#7v+v++7$7$7 7v++7.7.7.7#7v+$7#7+7v+v+v+v+@7v+v+$7v+v+v+v+v+v+v+v+v+v+v+v+v+v+v+v+v+%7v+v+&7v+v+v+*7*7%7v+4+v+*74+&7&7&7&7v+=7v+v+4+*7=7v+%7-7=7;7=7%7v+=7&7-7-7%7;74+4+-7=7&7&74+%7%7*7-7=74+", "4+4+%7;74+4+-74+4+4+4+4+=74+4+4+4+4+4+4+4+4+4+4+4+4+>74+4+4+,7'74+4+)7)7)74+4+4+!7>74+,7,7!74+)7'7)74+'7)7,74+>7)7#+!7,7#+'7#+'7#+#+~7!7!7'7~7#+!7'7)7#+#+#+~7)7'7#+'7#+#+#+>7#+#+#+#+#+!7!7#+#+#+#+#+#+", "#+#+{7#+#+#+#+]7{7#+#+#+^7#+{7/7(7#+_7(7_7]7#+#+#+_7_7#+:7:7_7:7]7/7(7#+^7#+^7/7{7]7]7(7_7:7{7^7^7(7/7]7:7#+_7/7/7_7:7(7/7(7/7/7:7/7/7:7/7/7/7/7/7/7/7/7/7/7/7/7/7/7/7/7<7/7<7/7/7[7/7}7/7<7|7/7/7<7l#<7", "/717}7[7[717[717l#/727<7l#|717|717l#}7|7[7l#[7[7|7[7l#[7l#}7}7l#<7l#27}717|7l#|7}7<7l#}7l#l#|7l#l#l#l#}7l#l#l#l#l#l#l#l#l#l#l#l#l#37l#374737l#37375767l#l#l#l#47374757l#47477757l#4737!#37!#7737l#57!#47", "37774777878767678747!#675787575777!#6747!#!#!#7757!#!#87676787!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#97!#970797a7b7a7b7b7c7a7b7!#!#b7b707!#!#07b7c7!#!#97a7b7:@d7c7a79707a7a7d7d7:@b7b7b70707d7:@97", "97:@07:@:@c7:@:@:@d7:@d7:@:@:@:@:@:@:@:@:@:@:@e7f7:@:@:@:@e7e7g7:@g7e7h7h7:@f7e7:@f7e7g7i7j7g7g7f7:@:@i7j7e7f7k7j7i7g7:@g7i7j7i7i7k7i7h7e7h7k7k7k7k7h7k7i7k7k7h7k7i7j7k7k7k7g7h7g7k7k7k7k7k7k7k7k7h7k7k7", "k7k7k7l7k7k7k7k7k7k7k7k7k7k7k7k7k7k7k7k7k7k7k7k7k7m7k7l7k7k7k7k7m7m7l7m7k7m7u+k7k7k7m7C$k7C$l7C$C$u+l7C$m7m7l7l7u+C$l7m7l7l7u+u+C$l7k7C$C$C$C$C$m7C$C$u+C$C$u+C$C$C$C$C$C$C$C$C$C$n7C$C$C$C$C$C$C$C$C$C$", "C$n7C$C$C$n7C$n7C$C$C$n7n7n7C$n7C$C$n7C$n7n7n7n7n7C$n7C$n7C$n7n7C$n7n7C$n7n7n7C$n7n7C$n7n7n7n7C$n7n7n7n7n7n7n7n7n7n7n7n7n7n7n7n7o7n7n7n7n7o7o7n7p7p7n7o7p7o7o7n7p7o7o7p7n7G p7p7o7o7n7p7n7n7n7n7o7p7n7p7", "n7p7o7p7n7n7o7o7o7n7q7q7G G n7n7q7o7p7q7q7p7q7G p7G q7q7q7q7p7o7q7q7o7q7q7o7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7q7r7q7q7q7q7q7r7r7q7q7r7q7r7q7", "q7r7r7r7r7q7r7q7r7r7r7r7r7r7r7r7q7r7q7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7", "r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7r7"}; unixODBC-2.2.14-p2/exe/0040755000076400007640000000000011150523337012761 5ustar nicknickunixODBC-2.2.14-p2/exe/README0100644000076400007640000000325010342504557013643 0ustar nicknick*************************************************************** * This code is GPL. * * This software is a unixODBC component and may NOT be * * distributed seperately. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | unixODBC | +-------------------------------------------------------------+ isql/iusql This is a utility which can be used to submit SQL to a data source and to format/output results. It can be used in batch or interactive mode. odbcinst This utility has been created for install script/RPM writers. It is a command line interface to key functionality in the odbcinst lib. It does not copy any files (ie libs) but it will modify the ODBC System Information for the user. dltest This is a utility which can be used to check a share library to see if it can be loaded and if a given symbol exists in it. This can be useful when debugging a problem with a share library or in a makefile situation. dbfio This utility is used to test the functionality of the DBFIO library. +-------------------------------------------------------------+ | Peter Harvey | | pharvey@codebydesign.com | | www.unixodbc.org | 27.JAN.99 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/exe/Makefile.am0100644000076400007640000000355411111034645015015 0ustar nicknickbin_PROGRAMS = isql dltest odbcinst iusql odbc_config INCLUDES = -I@top_srcdir@/include $(LTDLINCL) \ -DPREFIX=\"@prefix@\" \ -DEXEC_PREFIX=\"@exec_prefix@\" \ -DLIB_PREFIX=\"@libdir@\" \ -DBIN_PREFIX=\"@bindir@\" \ -DINCLUDE_PREFIX=\"@includedir@\" \ -DUNIXODBC_SOURCE \ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" EXTRA_DIST = \ isql.h \ COPYING if QNX odbcinst_LDADD = \ -L$(prefix)/lib -lodbcinst \ $(LIBLTDL) $(LIBADD_DL) odbcinst_DEPENDENCIES = \ $(LIBLTDL) else odbcinst_LDADD = \ ../odbcinst/libodbcinst.la \ ../ini/libinilc.la \ $(LIBLTDL) $(LIBADD_DL) if WITHLT odbcinst_DEPENDENCIES = \ $(LIBLTDL) \ ../odbcinst/libodbcinst.la \ ../ini/libinilc.la else odbcinst_DEPENDENCIES = \ ../odbcinst/libodbcinst.la \ ../ini/libinilc.la endif endif odbcinst_SOURCES = odbcinst.c if QNX isql_LDADD = \ -L$(prefix)/lib -lodbc \ $(READLINE) isql_DEPENDENCIES = \ $(LIBLTDL) else isql_LDADD = \ ../DriverManager/libodbc.la \ ../extras/libodbcextraslc.la \ $(READLINE) if WITHLT isql_DEPENDENCIES = \ ../DriverManager/libodbc.la \ $(LIBLTDL) else isql_DEPENDENCIES = \ ../DriverManager/libodbc.la endif endif isql_SOURCES = isql.c if QNX iusql_LDADD = \ -L$(prefix)/lib -lodbc \ -lodbcinst \ $(READLINE) iusql_DEPENDENCIES = \ $(LIBLTDL) else iusql_LDADD = \ ../DriverManager/libodbc.la \ ../odbcinst/libodbcinst.la \ ../ini/libinilc.la \ $(READLINE) if WITHLT iusql_DEPENDENCIES = \ ../odbcinst/libodbcinst.la \ ../DriverManager/libodbc.la \ ../ini/libinilc.la \ ../extras/libodbcextraslc.la \ $(LIBLTDL) else iusql_DEPENDENCIES = \ ../odbcinst/libodbcinst.la \ ../DriverManager/libodbc.la \ ../ini/libinilc.la \ ../extras/libodbcextraslc.la endif endif iusql_SOURCES = iusql.c dltest_SOURCES = dltest.c odbc_config_SOURCES = odbc-config.c if WITHLT dltest_DEPENDENCIES = $(LIBLTDL) dltest_LDADD = $(LIBLTDL) $(LIBADD_DL) else endif unixODBC-2.2.14-p2/exe/Makefile.in0100644000076400007640000004617011111035253015023 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ bin_PROGRAMS = isql$(EXEEXT) dltest$(EXEEXT) odbcinst$(EXEEXT) \ iusql$(EXEEXT) odbc_config$(EXEEXT) subdir = exe DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ COPYING ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_dltest_OBJECTS = dltest.$(OBJEXT) dltest_OBJECTS = $(am_dltest_OBJECTS) am__DEPENDENCIES_1 = am_isql_OBJECTS = isql.$(OBJEXT) isql_OBJECTS = $(am_isql_OBJECTS) am_iusql_OBJECTS = iusql.$(OBJEXT) iusql_OBJECTS = $(am_iusql_OBJECTS) am_odbc_config_OBJECTS = odbc-config.$(OBJEXT) odbc_config_OBJECTS = $(am_odbc_config_OBJECTS) odbc_config_LDADD = $(LDADD) am_odbcinst_OBJECTS = odbcinst.$(OBJEXT) odbcinst_OBJECTS = $(am_odbcinst_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(dltest_SOURCES) $(isql_SOURCES) $(iusql_SOURCES) \ $(odbc_config_SOURCES) $(odbcinst_SOURCES) DIST_SOURCES = $(dltest_SOURCES) $(isql_SOURCES) $(iusql_SOURCES) \ $(odbc_config_SOURCES) $(odbcinst_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = -I@top_srcdir@/include $(LTDLINCL) \ -DPREFIX=\"@prefix@\" \ -DEXEC_PREFIX=\"@exec_prefix@\" \ -DLIB_PREFIX=\"@libdir@\" \ -DBIN_PREFIX=\"@bindir@\" \ -DINCLUDE_PREFIX=\"@includedir@\" \ -DUNIXODBC_SOURCE \ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" EXTRA_DIST = \ isql.h \ COPYING @QNX_FALSE@odbcinst_LDADD = \ @QNX_FALSE@ ../odbcinst/libodbcinst.la \ @QNX_FALSE@ ../ini/libinilc.la \ @QNX_FALSE@ $(LIBLTDL) $(LIBADD_DL) @QNX_TRUE@odbcinst_LDADD = \ @QNX_TRUE@ -L$(prefix)/lib -lodbcinst \ @QNX_TRUE@ $(LIBLTDL) $(LIBADD_DL) @QNX_FALSE@@WITHLT_FALSE@odbcinst_DEPENDENCIES = \ @QNX_FALSE@@WITHLT_FALSE@ ../odbcinst/libodbcinst.la \ @QNX_FALSE@@WITHLT_FALSE@ ../ini/libinilc.la @QNX_FALSE@@WITHLT_TRUE@odbcinst_DEPENDENCIES = \ @QNX_FALSE@@WITHLT_TRUE@ $(LIBLTDL) \ @QNX_FALSE@@WITHLT_TRUE@ ../odbcinst/libodbcinst.la \ @QNX_FALSE@@WITHLT_TRUE@ ../ini/libinilc.la @QNX_TRUE@odbcinst_DEPENDENCIES = \ @QNX_TRUE@ $(LIBLTDL) odbcinst_SOURCES = odbcinst.c @QNX_FALSE@isql_LDADD = \ @QNX_FALSE@ ../DriverManager/libodbc.la \ @QNX_FALSE@ ../extras/libodbcextraslc.la \ @QNX_FALSE@ $(READLINE) @QNX_TRUE@isql_LDADD = \ @QNX_TRUE@ -L$(prefix)/lib -lodbc \ @QNX_TRUE@ $(READLINE) @QNX_FALSE@@WITHLT_FALSE@isql_DEPENDENCIES = \ @QNX_FALSE@@WITHLT_FALSE@ ../DriverManager/libodbc.la @QNX_FALSE@@WITHLT_TRUE@isql_DEPENDENCIES = \ @QNX_FALSE@@WITHLT_TRUE@ ../DriverManager/libodbc.la \ @QNX_FALSE@@WITHLT_TRUE@ $(LIBLTDL) @QNX_TRUE@isql_DEPENDENCIES = \ @QNX_TRUE@ $(LIBLTDL) isql_SOURCES = isql.c @QNX_FALSE@iusql_LDADD = \ @QNX_FALSE@ ../DriverManager/libodbc.la \ @QNX_FALSE@ ../odbcinst/libodbcinst.la \ @QNX_FALSE@ ../ini/libinilc.la \ @QNX_FALSE@ $(READLINE) @QNX_TRUE@iusql_LDADD = \ @QNX_TRUE@ -L$(prefix)/lib -lodbc \ @QNX_TRUE@ -lodbcinst \ @QNX_TRUE@ $(READLINE) @QNX_FALSE@@WITHLT_FALSE@iusql_DEPENDENCIES = \ @QNX_FALSE@@WITHLT_FALSE@ ../odbcinst/libodbcinst.la \ @QNX_FALSE@@WITHLT_FALSE@ ../DriverManager/libodbc.la \ @QNX_FALSE@@WITHLT_FALSE@ ../ini/libinilc.la \ @QNX_FALSE@@WITHLT_FALSE@ ../extras/libodbcextraslc.la @QNX_FALSE@@WITHLT_TRUE@iusql_DEPENDENCIES = \ @QNX_FALSE@@WITHLT_TRUE@ ../odbcinst/libodbcinst.la \ @QNX_FALSE@@WITHLT_TRUE@ ../DriverManager/libodbc.la \ @QNX_FALSE@@WITHLT_TRUE@ ../ini/libinilc.la \ @QNX_FALSE@@WITHLT_TRUE@ ../extras/libodbcextraslc.la \ @QNX_FALSE@@WITHLT_TRUE@ $(LIBLTDL) @QNX_TRUE@iusql_DEPENDENCIES = \ @QNX_TRUE@ $(LIBLTDL) iusql_SOURCES = iusql.c dltest_SOURCES = dltest.c odbc_config_SOURCES = odbc-config.c @WITHLT_TRUE@dltest_DEPENDENCIES = $(LIBLTDL) @WITHLT_TRUE@dltest_LDADD = $(LIBLTDL) $(LIBADD_DL) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu exe/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu exe/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done dltest$(EXEEXT): $(dltest_OBJECTS) $(dltest_DEPENDENCIES) @rm -f dltest$(EXEEXT) $(LINK) $(dltest_LDFLAGS) $(dltest_OBJECTS) $(dltest_LDADD) $(LIBS) isql$(EXEEXT): $(isql_OBJECTS) $(isql_DEPENDENCIES) @rm -f isql$(EXEEXT) $(LINK) $(isql_LDFLAGS) $(isql_OBJECTS) $(isql_LDADD) $(LIBS) iusql$(EXEEXT): $(iusql_OBJECTS) $(iusql_DEPENDENCIES) @rm -f iusql$(EXEEXT) $(LINK) $(iusql_LDFLAGS) $(iusql_OBJECTS) $(iusql_LDADD) $(LIBS) odbc_config$(EXEEXT): $(odbc_config_OBJECTS) $(odbc_config_DEPENDENCIES) @rm -f odbc_config$(EXEEXT) $(LINK) $(odbc_config_LDFLAGS) $(odbc_config_OBJECTS) $(odbc_config_LDADD) $(LIBS) odbcinst$(EXEEXT): $(odbcinst_OBJECTS) $(odbcinst_DEPENDENCIES) @rm -f odbcinst$(EXEEXT) $(LINK) $(odbcinst_LDFLAGS) $(odbcinst_OBJECTS) $(odbcinst_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dltest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isql.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iusql.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odbc-config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odbcinst.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) installdirs: for dir in "$(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) 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-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: 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-info-am .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-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ 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-info-am # 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: unixODBC-2.2.14-p2/exe/COPYING0100644000076400007640000003545210021406100014002 0ustar nicknick 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 unixODBC-2.2.14-p2/exe/dltest.c0100644000076400007640000000647110100571607014426 0ustar nicknick/************************************************** * dltest * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include #include #include char *szSyntax = "\n" \ "**********************************************\n" \ "* unixODBC - dltest *\n" \ "**********************************************\n" \ "* Syntax *\n" \ "* *\n" \ "* dltest libName Symbol *\n" \ "* *\n" \ "* libName *\n" \ "* *\n" \ "* Full path + file name of share to test*\n" \ "* *\n" \ "* Symbol *\n" \ "* *\n" \ "* ie a function name in the share *\n" \ "* *\n" \ "* Notes *\n" \ "* *\n" \ "* This can be placed into a makefile *\n" \ "* to throw an error if test fails. *\n" \ "* *\n" \ "* If this segfaults you probably have an*\n" \ "* unresolved symbol in the lib. This is *\n" \ "* not caught since dltest started using *\n" \ "* libtool. Linux users can refer to the *\n" \ "* man page for dlopen to create a *\n" \ "* better test. *\n" \ "* *\n" \ "* *\n" \ "* Examples *\n" \ "* *\n" \ "* dltest /usr/lib/libMy.so MyFunc *\n" \ "* *\n" \ "* Please visit; *\n" \ "* *\n" \ "* http://www.unixodbc.org/ *\n" \ "* Peter Harvey *\n" \ "**********************************************\n\n"; int main( int argc, char *argv[] ) { void *hDLL; void (*pFunc)(); const char *pError; if ( argc < 2 ) { printf( szSyntax ); exit( 1 ); } /* * initialize libtool */ if ( lt_dlinit() ) { printf( "ERROR: Failed to lt_dlinit()\n" ); exit( 1 ); } hDLL = lt_dlopen( argv[1] ); if ( !hDLL ) { printf( "[dltest] ERROR dlopen: %s\n", lt_dlerror() ); exit( 1 ); } printf( "SUCCESS: Loaded %s\n", argv[1] ); if ( argc > 2 ) { pFunc = (void (*)()) lt_dlsym( hDLL, argv[2] ); /* PAH - lt_dlerror() is not a good indicator of success */ /* if ( (pError = lt_dlerror()) != NULL ) */ if ( !pFunc ) { if ( (pError = lt_dlerror()) != NULL ) printf( "ERROR: %s\n Could not find %s\n", pError, argv[2] ); else printf( "ERROR: Could not find %s\n", argv[2] ); exit( 1 ); } printf( "SUCCESS: Found %s\n", argv[2] ); } lt_dlclose( hDLL ); return ( 0 ); } unixODBC-2.2.14-p2/exe/isql.c0100644000076400007640000012644011025444217014101 0ustar nicknick /************************************************** * isql * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "isql.h" #ifdef HAVE_READLINE #include #include #endif #ifdef HAVE_SETLOCALE #ifdef HAVE_LOCALE_H #include #endif #endif int bVerbose = 0; int nUserWidth = 0; SQLHENV hEnv = 0; SQLHDBC hDbc = 0; int bQuote = 0; int version3 = 0; int bBatch = 0; int ac_off = 0; int bHTMLTable = 0; int cDelimiter = 0; int bColumnNames = 0; SQLUSMALLINT has_moreresults = 1; int main( int argc, char *argv[] ) { int nArg, count; int bNewStyle = 0; int rc = 0; char *szDSN; char *szUID; char *szPWD; char *szSQL; char *line_buffer; char *pEscapeChar; int buffer_size = 9000; int line_buffer_size = 9000; int contget = 1; int bufpos,linen; char prompt[24]; szDSN = NULL; szUID = NULL; szPWD = NULL; if ( argc < 2 ) { fprintf( stderr, szSyntax ); exit( 1 ); } #ifdef HAVE_SETLOCALE /* * Default locale */ setlocale( LC_ALL, "" ); #endif /**************************** * PARSE ARGS ***************************/ for ( nArg = 1, count = 1 ; nArg < argc; nArg++ ) { if ( argv[nArg][0] == '-' ) { /* Options */ switch ( argv[nArg][1] ) { case 'd': cDelimiter = argv[nArg][2]; break; case 'm': nUserWidth = atoi( &(argv[nArg][2]) ); break; case 's': buffer_size = atoi( &(argv[nArg][2]) ); line_buffer_size = buffer_size; break; case 'w': bHTMLTable = 1; break; case 'b': bBatch = 1; break; case 'c': bColumnNames = 1; break; case '3': version3 = 1; case 'v': bVerbose = 1; break; case 'q': bQuote = 1; break; case 'n': bNewStyle = 1; break; case '-': printf( "unixODBC " VERSION "\n" ); exit(0); #ifdef HAVE_STRTOL case 'x': cDelimiter = strtol( argv[nArg]+2, NULL, 0 ); break; #endif #ifdef HAVE_SETLOCALE case 'l': if ( !setlocale( LC_ALL, argv[nArg]+2 )) { fprintf( stderr, "isql: can't set locale to '%s'\n", argv[nArg]+2 ); exit ( -1 ); } break; #endif default: fprintf( stderr, szSyntax ); exit( 1 ); } continue; } else if ( count == 1 ) szDSN = argv[nArg]; else if ( count == 2 ) szUID = argv[nArg]; else if ( count == 3 ) szPWD = argv[nArg]; count++; } szSQL = calloc( 1, buffer_size + 1 ); line_buffer = calloc( 1, buffer_size + 1 ); /**************************** * CONNECT ***************************/ if ( !OpenDatabase( &hEnv, &hDbc, szDSN, szUID, szPWD ) ) exit( 1 ); /**************************** * EXECUTE ***************************/ if ( !bBatch ) { printf( "+---------------------------------------+\n" ); printf( "| Connected! |\n" ); printf( "| |\n" ); if ( bNewStyle ) { printf( "| sql-statement(s)[;] |\n" ); printf( "| go |\n" ); printf( "| \\noac |\n" ); printf( "| \\ac |\n" ); printf( "| \\commit |\n" ); printf( "| \\rollback |\n" ); printf( "| \\tables |\n" ); printf( "| \\columns |\n" ); printf( "| \\quit |\n" ); } else { printf( "| sql-statement |\n" ); printf( "| help [tablename] |\n" ); printf( "| quit |\n" ); } printf( "| |\n" ); printf( "+---------------------------------------+\n" ); } linen = 0; bufpos = 0; do { char *line = NULL; int malloced = 0; int len = 0; int dont_copy, exec_now; szSQL[ bufpos ] = '\0'; if ( bNewStyle ) { if ( ac_off ) { sprintf( prompt, "*%d SQL> ", ++linen ); } else { sprintf( prompt, "%d SQL> ", ++linen ); } } else { sprintf( prompt, "SQL> " ); } if ( !bBatch ) { #ifdef HAVE_READLINE line=readline( prompt ); if ( !line ) /* EOF - ctrl D */ { malloced = 1; line = strdup( "quit" ); } else { malloced = 0; } add_history(line); #else printf( prompt ); line = fgets( line_buffer, line_buffer_size, stdin ); if ( !line ) /* EOF - ctrl D */ { malloced = 1; line = strdup( "quit" ); } else { malloced = 0; } #endif } else { char *line; int malloced; line = fgets( line_buffer, line_buffer_size, stdin ); if ( !line ) /* EOF - ctrl D */ { malloced = 1; line = strdup( "quit" ); } else { malloced = 0; } } /* remove any ctrl chars, and find the length */ len = 0; while ( line[ len ] ) { if ( line[ len ] == '\n' ) { line[ len ] = ' '; } if ( line[ len ] == '\r' ) { line[ len ] = ' '; } len ++; } /* * is it a comment? */ if ( bNewStyle ) { if ( len >= 2 && line[ 0 ] == '-' && line[ 1 ] == '-' ) { /* * it can't have been malloc'd */ continue; } } dont_copy = 0; exec_now = 0; if ( bNewStyle ) { if ( len > 0 && line[ len - 1 ] == ';' ) { line[ len - 1 ] = '\0'; exec_now = 1; len --; } else if ( len == 2 && memcmp( line, "go", 2 ) == 0 ) { exec_now = 1; dont_copy = 1; } else if ( len > 1 && line[ 0 ] == '\\' ) { bufpos = 0; linen = 1; exec_now = 1; } } else { exec_now = 1; } if ( !bNewStyle ) { if ( len >= 4 && memcmp( line, "quit", 4 ) == 0 ) { if ( malloced ) { free(line); } break; } } /* * stop on a blank line */ if ( !bNewStyle ) { if ( line[ 0 ] == '\0' ) { break; } } if ( !dont_copy ) { /* * is there space */ if ( len > 0 && bufpos + len + 2 > buffer_size ) { szSQL = realloc( szSQL, bufpos + len + 2 ); buffer_size = bufpos + len + 2; } /* * insert space between the lines * the above length check will make sure there is room for * the extra space */ if ( linen > 1 ) { szSQL[ bufpos ] = ' '; bufpos ++; } memcpy( szSQL + bufpos, line, len ); bufpos += len; szSQL[ bufpos ] = '\0'; } if ( exec_now ) { if ( bNewStyle ) { if ( bufpos >= 1 && szSQL[ 0 ] == '\\' ) { if ( ExecuteSlash( hDbc, szSQL, cDelimiter, bColumnNames, bHTMLTable ) == 0 ) { break; } } else { ExecuteSQL( hDbc, szSQL, cDelimiter, bColumnNames, bHTMLTable ); } } else { if ( bufpos >= 4 && memcmp( szSQL, "help", 4 ) == 0 ) { ExecuteHelp( hDbc, szSQL, cDelimiter, bColumnNames, bHTMLTable ); } else { ExecuteSQL( hDbc, szSQL, cDelimiter, bColumnNames, bHTMLTable ); } } linen = 0; bufpos = 0; } } while ( 1 ); /**************************** * DISCONNECT ***************************/ CloseDatabase( hEnv, hDbc ); exit( 0 ); } /**************************** * OptimalDisplayWidth ***************************/ static SQLUINTEGER OptimalDisplayWidth( SQLHSTMT hStmt, SQLINTEGER nCol, int nUserWidth ) { SQLUINTEGER nLabelWidth = 10; SQLULEN nDataWidth = 10; SQLUINTEGER nOptimalDisplayWidth = 10; SQLCHAR szColumnName[MAX_DATA_WIDTH+1]; *szColumnName = '\0'; SQLColAttribute( hStmt, nCol, SQL_DESC_DISPLAY_SIZE, NULL, 0, NULL, (SQLLEN*)&nDataWidth ); SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), NULL, NULL ); nLabelWidth = strlen((char*) szColumnName ); nOptimalDisplayWidth = max( nLabelWidth, nDataWidth ); if ( nUserWidth > 0 ) nOptimalDisplayWidth = min( nOptimalDisplayWidth, nUserWidth ); if ( nOptimalDisplayWidth > MAX_DATA_WIDTH ) nOptimalDisplayWidth = MAX_DATA_WIDTH; return nOptimalDisplayWidth; } /**************************** * OpenDatabase - do everything we have to do to get a viable connection to szDSN ***************************/ static int OpenDatabase( SQLHENV *phEnv, SQLHDBC *phDbc, char *szDSN, char *szUID, char *szPWD ) { if ( version3 ) { if ( SQLAllocHandle( SQL_HANDLE_ENV, NULL, phEnv ) != SQL_SUCCESS ) { fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocHandle( SQL_HANDLE_ENV )\n" ); return 0; } if ( SQLSetEnvAttr( *phEnv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) 3, 0 ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, 0, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLSetEnvAttr( SQL_HANDLE_DBC )\n" ); SQLFreeHandle( SQL_HANDLE_ENV, *phEnv ); return 0; } if ( SQLAllocHandle( SQL_HANDLE_DBC, *phEnv, phDbc ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, 0, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocHandle( SQL_HANDLE_DBC )\n" ); SQLFreeHandle( SQL_HANDLE_ENV, *phEnv ); return 0; } if ( !SQL_SUCCEEDED( SQLConnect( *phDbc, (SQLCHAR*)szDSN, SQL_NTS, (SQLCHAR*)szUID, SQL_NTS, (SQLCHAR*)szPWD, SQL_NTS ))) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLConnect\n" ); SQLFreeHandle( SQL_HANDLE_DBC, *phDbc ); SQLFreeHandle( SQL_HANDLE_ENV, *phEnv ); return 0; } } else { if ( SQLAllocEnv( phEnv ) != SQL_SUCCESS ) { fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocEnv\n" ); return 0; } if ( SQLAllocConnect( *phEnv, phDbc ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, 0, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocConnect\n" ); SQLFreeEnv( *phEnv ); return 0; } if ( !SQL_SUCCEEDED( SQLConnect( *phDbc, (SQLCHAR*)szDSN, SQL_NTS, (SQLCHAR*)szUID, SQL_NTS, (SQLCHAR*)szPWD, SQL_NTS ))) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLConnect\n" ); SQLFreeConnect( *phDbc ); SQLFreeEnv( *phEnv ); return 0; } } /* * does the driver support SQLMoreResults */ if ( !SQL_SUCCEEDED( SQLGetFunctions( *phDbc, SQL_API_SQLMORERESULTS, &has_moreresults ))) { has_moreresults = 0; } return 1; } static void display_result_set( SQLHDBC hDbc, SQLHSTMT hStmt ) { SQLCHAR *szSepLine; SQLRETURN ret; int mr; SQLSMALLINT cols; SQLLEN nRows = 0; szSepLine = calloc(1, 32001); /* * Loop while SQLMoreResults returns success */ mr = 0; do { if ( mr ) { if ( ret == SQL_SUCCESS_WITH_INFO ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]INFO: SQLMoreResults returned SQL_SUCCESS_WITH_INFO\n" ); } } mr = 1; strcpy ((char*) szSepLine, "" ) ; /* * check to see if it has generated a result set */ if ( SQLNumResultCols( hStmt, &cols ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLNumResultCols\n" ); SQLFreeStmt( hStmt, SQL_DROP ); free(szSepLine); } if ( cols > 0 ) { /**************************** * WRITE HEADER ***************************/ if ( bHTMLTable ) WriteHeaderHTMLTable( hStmt ); else if ( cDelimiter == 0 ) WriteHeaderNormal( hStmt, szSepLine ); else if ( cDelimiter && bColumnNames ) WriteHeaderDelimited( hStmt, cDelimiter ); /**************************** * WRITE BODY ***************************/ if ( bHTMLTable ) WriteBodyHTMLTable( hStmt ); else if ( cDelimiter == 0 ) nRows = WriteBodyNormal( hStmt ); else WriteBodyDelimited( hStmt, cDelimiter ); } /**************************** * WRITE FOOTER ***************************/ if ( bHTMLTable ) WriteFooterHTMLTable( hStmt ); else if ( cDelimiter == 0 ) WriteFooterNormal( hStmt, szSepLine, nRows ); } while ( has_moreresults && SQL_SUCCEEDED( ret = SQLMoreResults( hStmt ))); free( szSepLine ); } static int display_tables( SQLHDBC hDbc ) { SQLHSTMT hStmt; SQLRETURN ret; if ( version3 ) { if ( SQLAllocHandle( SQL_HANDLE_STMT, hDbc, &hStmt ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocHandle( SQL_HANDLE_STMT )\n" ); return 0; } } else { if ( SQLAllocStmt( hDbc, &hStmt ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocStmt\n" ); return 0; } } ret = SQLTables( hStmt, NULL, 0, NULL, 0, NULL, 0, NULL, 0 ); if ( ret == SQL_ERROR ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLTables\n" ); } else { display_result_set( hDbc, hStmt ); } SQLFreeStmt( hStmt, SQL_DROP ); return 1; } static int display_columns( SQLHDBC hDbc, char *sql ) { SQLHSTMT hStmt; SQLRETURN ret; char *args[10]; int n_args; SQLCHAR *table; int len; if ( version3 ) { if ( SQLAllocHandle( SQL_HANDLE_STMT, hDbc, &hStmt ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocHandle( SQL_HANDLE_STMT )\n" ); return 0; } } else { if ( SQLAllocStmt( hDbc, &hStmt ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocStmt\n" ); return 0; } } n_args = get_args(sql, &args[0], sizeof(args) / sizeof(args[0])); if ( n_args == 0 ) { table = NULL; len = 0; } else { table = (SQLCHAR*)args[ 0 ]; len = SQL_NTS; } ret = SQLColumns( hStmt, NULL, 0, NULL, 0, table, len, NULL, 0 ); if ( ret == SQL_ERROR ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLTables\n" ); } else { display_result_set( hDbc, hStmt ); } SQLFreeStmt( hStmt, SQL_DROP ); free_args(args, sizeof(args) / sizeof(args[0])); return 1; } /**************************** * ExecuteSlash - meta commands ***************************/ static int ExecuteSlash( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNames, int bHTMLTable ) { SQLRETURN ret; szSQL ++; if ( memcmp( szSQL, "tables", 6 ) == 0 ) { return display_tables( hDbc ); } else if ( memcmp( szSQL, "columns", 7 ) == 0 ) { return display_columns( hDbc, szSQL + 7 ); } else if ( memcmp( szSQL, "ac", 2 ) == 0 ) { if ( version3 ) { ret = SQLSetConnectAttr( hDbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_ON, 0 ); if ( SQL_SUCCEEDED( ret ) ) { ac_off = 0; } } else { ret = SQLSetConnectOption( hDbc, SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_ON ); if ( SQL_SUCCEEDED( ret ) ) { ac_off = 0; } } if ( !bBatch ) { printf( "AUTOCOMMIT ON (return status = %d)\n", ret ); } if ( bVerbose && !SQL_SUCCEEDED( ret )) { DumpODBCLog( hEnv, hDbc, 0 ); } } else if ( memcmp( szSQL, "noac", 4 ) == 0 ) { if ( version3 ) { ret = SQLSetConnectAttr( hDbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_OFF, 0 ); if ( SQL_SUCCEEDED( ret ) ) { ac_off = 1; } } else { ret = SQLSetConnectOption( hDbc, SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF ); if ( SQL_SUCCEEDED( ret ) ) { ac_off = 1; } } if ( !bBatch ) { printf( "AUTOCOMMIT OFF (return status = %d)\n", ret ); } if ( bVerbose && !SQL_SUCCEEDED( ret )) { DumpODBCLog( hEnv, hDbc, 0 ); } } else if ( memcmp( szSQL, "commit", 6 ) == 0 ) { if ( version3 ) { ret = SQLEndTran( SQL_HANDLE_DBC, hDbc, SQL_COMMIT ); } else { ret = SQLTransact( hEnv, hDbc, SQL_COMMIT ); } if ( !bBatch ) { printf( "COMMIT (return status = %d)\n", ret ); } if ( bVerbose && !SQL_SUCCEEDED( ret )) { DumpODBCLog( hEnv, hDbc, 0 ); } } else if ( memcmp( szSQL, "rollback", 8 ) == 0 ) { if ( version3 ) { ret = SQLEndTran( SQL_HANDLE_DBC, hDbc, SQL_ROLLBACK ); } else { ret = SQLTransact( hEnv, hDbc, SQL_ROLLBACK ); } if ( !bBatch ) { printf( "ROLLBACK (return status = %d)\n", ret ); } if ( bVerbose && !SQL_SUCCEEDED( ret )) { DumpODBCLog( hEnv, hDbc, 0 ); } } else if ( memcmp( szSQL, "quit", 4 ) == 0 ) { return 0; } else { printf( "\nUnknown metacommand '%s'\n\n", szSQL ); } return 1; } /**************************** * ExecuteSQL - create a statement, execute the SQL, and get rid of the statement * - show results as per request; bHTMLTable has precedence over other options ***************************/ static int ExecuteSQL( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNames, int bHTMLTable ) { SQLHSTMT hStmt; SQLSMALLINT cols; SQLLEN nRows = 0; SQLINTEGER ret; SQLCHAR *szSepLine; int mr; szSepLine = calloc(1, 32001); /**************************** * EXECUTE SQL ***************************/ if ( version3 ) { if ( SQLAllocHandle( SQL_HANDLE_STMT, hDbc, &hStmt ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocHandle( SQL_HANDLE_STMT )\n" ); free(szSepLine); return 0; } } else { if ( SQLAllocStmt( hDbc, &hStmt ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocStmt\n" ); free(szSepLine); return 0; } } if ( SQLPrepare( hStmt, (SQLCHAR*)szSQL, SQL_NTS ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLPrepare\n" ); SQLFreeStmt( hStmt, SQL_DROP ); free(szSepLine); return 0; } ret = SQLExecute( hStmt ); if ( ret == SQL_NO_DATA ) { fprintf( stderr, "[ISQL]INFO: SQLExecute returned SQL_NO_DATA\n" ); } else if ( ret == SQL_SUCCESS_WITH_INFO ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]INFO: SQLExecute returned SQL_SUCCESS_WITH_INFO\n" ); } else if ( ret != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLExecute\n" ); SQLFreeStmt( hStmt, SQL_DROP ); free(szSepLine); return 0; } /* * Loop while SQLMoreResults returns success */ mr = 0; do { if ( mr ) { if ( ret == SQL_SUCCESS_WITH_INFO ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]INFO: SQLMoreResults returned SQL_SUCCESS_WITH_INFO\n" ); } } mr = 1; strcpy ((char*) szSepLine, "" ) ; /* * check to see if it has generated a result set */ if ( SQLNumResultCols( hStmt, &cols ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLNumResultCols\n" ); SQLFreeStmt( hStmt, SQL_DROP ); free(szSepLine); return 0; } if ( cols > 0 ) { /**************************** * WRITE HEADER ***************************/ if ( bHTMLTable ) WriteHeaderHTMLTable( hStmt ); else if ( cDelimiter == 0 ) WriteHeaderNormal( hStmt, szSepLine ); else if ( cDelimiter && bColumnNames ) WriteHeaderDelimited( hStmt, cDelimiter ); /**************************** * WRITE BODY ***************************/ if ( bHTMLTable ) WriteBodyHTMLTable( hStmt ); else if ( cDelimiter == 0 ) nRows = WriteBodyNormal( hStmt ); else WriteBodyDelimited( hStmt, cDelimiter ); } /**************************** * WRITE FOOTER ***************************/ if ( bHTMLTable ) WriteFooterHTMLTable( hStmt ); else if ( cDelimiter == 0 ) WriteFooterNormal( hStmt, szSepLine, nRows ); } while ( has_moreresults && SQL_SUCCEEDED( ret = SQLMoreResults( hStmt ))); /**************************** * CLEANUP ***************************/ SQLFreeStmt( hStmt, SQL_DROP ); free(szSepLine); return 1; } /**************************** * ExecuteHelp - create a statement, execute the SQL, and get rid of the statement * - show results as per request; bHTMLTable has precedence over other options ***************************/ static int ExecuteHelp( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNames, int bHTMLTable ) { SQLHSTMT hStmt; SQLLEN nRows = 0; SQLRETURN nReturn; SQLCHAR *szSepLine; char *args[10]; int n_args; if (!(szSepLine = calloc(1, 32001))) { fprintf(stderr, "[ISQL]ERROR: Failed to allocate line"); return 0; } /**************************** * EXECUTE SQL ***************************/ if ( version3 ) { if ( SQLAllocHandle( SQL_HANDLE_STMT, hDbc, &hStmt ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocHandle( SQL_HANDLE_STMT )\n" ); free(szSepLine); return 0; } } else { if ( SQLAllocStmt( hDbc, &hStmt ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocStmt\n" ); free(szSepLine); return 0; } } n_args = get_args(szSQL, &args[0], sizeof(args) / sizeof(args[0])); if (n_args == 2 ) { if (strcmp(args[1], "help") == 0) { output_help(); free(szSepLine); return 0; } /* COLUMNS */ nReturn = SQLColumns( hStmt, NULL, 0, NULL, 0, (SQLCHAR*)args[1], SQL_NTS, NULL, 0 ); if ( (nReturn != SQL_SUCCESS) && (nReturn != SQL_SUCCESS_WITH_INFO) ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLColumns\n" ); SQLFreeStmt( hStmt, SQL_DROP ); free(szSepLine); return 0; } } else { SQLCHAR *catalog = NULL; SQLCHAR *schema = NULL; SQLCHAR *table = NULL; SQLCHAR *type = NULL; if (n_args > 2) { catalog = (SQLCHAR*)args[1]; schema = (SQLCHAR*)args[2]; table = (SQLCHAR*)args[3]; type = (SQLCHAR*)args[4]; } /* TABLES */ nReturn = SQLTables( hStmt, catalog, SQL_NTS, schema, SQL_NTS, table, SQL_NTS, type, SQL_NTS ); if ( (nReturn != SQL_SUCCESS) && (nReturn != SQL_SUCCESS_WITH_INFO) ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLTables\n" ); SQLFreeStmt( hStmt, SQL_DROP ); free(szSepLine); free_args(args, sizeof(args) / sizeof(args[0])); return 0; } } /**************************** * WRITE HEADER ***************************/ if ( bHTMLTable ) WriteHeaderHTMLTable( hStmt ); else if ( cDelimiter == 0 ) WriteHeaderNormal( hStmt, szSepLine ); else if ( cDelimiter && bColumnNames ) WriteHeaderDelimited( hStmt, cDelimiter ); /**************************** * WRITE BODY ***************************/ if ( bHTMLTable ) WriteBodyHTMLTable( hStmt ); else if ( cDelimiter == 0 ) nRows = WriteBodyNormal( hStmt ); else WriteBodyDelimited( hStmt, cDelimiter ); /**************************** * WRITE FOOTER ***************************/ if ( bHTMLTable ) WriteFooterHTMLTable( hStmt ); else if ( cDelimiter == 0 ) WriteFooterNormal( hStmt, szSepLine, nRows ); /**************************** * CLEANUP ***************************/ SQLFreeStmt( hStmt, SQL_DROP ); free(szSepLine); free_args(args, sizeof(args) / sizeof(args[0])); return 1; } /**************************** * CloseDatabase - cleanup in prep for exiting the program ***************************/ static int CloseDatabase( SQLHENV hEnv, SQLHDBC hDbc ) { SQLDisconnect( hDbc ); if ( version3 ) { SQLFreeHandle( SQL_HANDLE_DBC, hDbc ); SQLFreeHandle( SQL_HANDLE_ENV, hEnv ); } else { SQLFreeConnect( hDbc ); SQLFreeEnv( hEnv ); } return 1; } /**************************** * WRITE HTML ***************************/ static void WriteHeaderHTMLTable( SQLHSTMT hStmt ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLCHAR szColumnName[MAX_DATA_WIDTH+1]; *szColumnName = '\0'; printf( "\n" ); printf( "\n" ); if ( SQLNumResultCols( hStmt, &nColumns ) != SQL_SUCCESS ) nColumns = -1; for ( nCol = 1; nCol <= nColumns; nCol++ ) { SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), NULL, NULL ); printf( "\n" ); } printf( "\n" ); } static void WriteBodyHTMLTable( SQLHSTMT hStmt ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLLEN nIndicator = 0; SQLCHAR szColumnValue[MAX_DATA_WIDTH+1]; SQLRETURN nReturn = 0; SQLRETURN ret; *szColumnValue = '\0'; if ( SQLNumResultCols( hStmt, &nColumns ) != SQL_SUCCESS ) nColumns = -1; while ( (ret = SQLFetch( hStmt )) == SQL_SUCCESS ) /* ROWS */ { printf( "\n" ); for ( nCol = 1; nCol <= nColumns; nCol++ ) /* COLS */ { printf( "\n" ); } if (ret != SQL_SUCCESS) break; printf( "\n" ); } } static void WriteFooterHTMLTable( SQLHSTMT hStmt ) { printf( "
\n" ); printf( "\n" ); printf( "%s\n", szColumnName ); printf( "\n" ); printf( "
\n" ); printf( "\n" ); nReturn = SQLGetData( hStmt, nCol, SQL_C_CHAR, (SQLPOINTER)szColumnValue, sizeof(szColumnValue), &nIndicator ); if ( nReturn == SQL_SUCCESS && nIndicator != SQL_NULL_DATA ) { fputs((char*) szColumnValue, stdout ); } else if ( nReturn == SQL_ERROR ) { ret = SQL_ERROR; break; } else printf( "%s\n", "" ); printf( "\n" ); printf( "
\n" ); } /**************************** * WRITE DELIMITED * - this output can be used by the ODBC Text File driver * - last column no longer has a delimit char (it is implicit)... * this is consistent with odbctxt ***************************/ static void WriteHeaderDelimited( SQLHSTMT hStmt, char cDelimiter ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLCHAR szColumnName[MAX_DATA_WIDTH+1]; *szColumnName = '\0'; if ( SQLNumResultCols( hStmt, &nColumns ) != SQL_SUCCESS ) nColumns = -1; for ( nCol = 1; nCol <= nColumns; nCol++ ) { SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), NULL, NULL ); fputs((char*) szColumnName, stdout ); if ( nCol < nColumns ) putchar( cDelimiter ); } putchar( '\n' ); } static void WriteBodyDelimited( SQLHSTMT hStmt, char cDelimiter ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLLEN nIndicator = 0; SQLCHAR szColumnValue[MAX_DATA_WIDTH+1]; SQLRETURN nReturn = 0; SQLRETURN ret; SQLINTEGER *types; *szColumnValue = '\0'; if ( SQLNumResultCols( hStmt, &nColumns ) != SQL_SUCCESS ) nColumns = -1; if ( bQuote && nColumns > 0 ) { types = malloc( nColumns * sizeof ( SQLINTEGER )); for ( nCol = 1; nCol <= nColumns && types; nCol++ ) { SQLSMALLINT type = 0; nReturn = SQLDescribeCol( hStmt, nCol, NULL, 0, NULL, &type, NULL, NULL, NULL ); switch ( type ) { case SQL_CHAR: case SQL_VARCHAR: case SQL_WCHAR: case SQL_WVARCHAR: case SQL_LONGVARCHAR: case SQL_WLONGVARCHAR: types[ nCol - 1 ] = 1; break; default: types[ nCol - 1 ] = 0; break; } } } else { types = NULL; } /* ROWS */ while (( ret = SQLFetch( hStmt )) == SQL_SUCCESS ) { /* COLS */ for ( nCol = 1; nCol <= nColumns; nCol++ ) { nReturn = SQLGetData( hStmt, nCol, SQL_C_CHAR, (SQLPOINTER)szColumnValue, sizeof(szColumnValue), &nIndicator ); if ( nReturn == SQL_SUCCESS && nIndicator != SQL_NULL_DATA ) { if ( types && types[ nCol - 1 ] ) { putchar( '"' ); } fputs((char*) szColumnValue, stdout ); if ( types && types[ nCol - 1 ] ) { putchar( '"' ); } if ( nCol < nColumns ) { putchar( cDelimiter ); } } else if ( nReturn == SQL_ERROR ) { ret = SQL_ERROR; break; } else { if ( nCol < nColumns ) { putchar( cDelimiter ); } } } if (ret != SQL_SUCCESS) { break; } printf( "\n" ); } if ( ret == SQL_ERROR ) { if ( bVerbose ) DumpODBCLog( 0, 0, hStmt ); } if ( types ) { free( types ); } } /**************************** * WRITE NORMAL ***************************/ static void WriteHeaderNormal( SQLHSTMT hStmt, SQLCHAR *szSepLine ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLCHAR szColumn[MAX_DATA_WIDTH+20]; SQLCHAR szColumnName[MAX_DATA_WIDTH+1]; /*SQLCHAR szHdrLine[32001] = ""; */ SQLCHAR *szHdrLine; SQLUINTEGER nOptimalDisplayWidth = 10; szHdrLine = calloc(1, 32001); *szColumn = '\0'; *szColumnName = '\0'; if ( SQLNumResultCols( hStmt, &nColumns ) != SQL_SUCCESS ) nColumns = -1; for ( nCol = 1; nCol <= nColumns; nCol++ ) { int sret; nOptimalDisplayWidth = OptimalDisplayWidth( hStmt, nCol, nUserWidth ); SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), NULL, NULL ); /* SEP */ memset( szColumn, '\0', sizeof(szColumn) ); memset( szColumn, '-', nOptimalDisplayWidth + 1 ); strcat((char*) szSepLine, "+" ); strcat((char*) szSepLine,(char*) szColumn ); /* HDR */ sret = sprintf( (char*)szColumn, "| %-*.*s", nOptimalDisplayWidth, nOptimalDisplayWidth, szColumnName ); if (sret < 0) sprintf((char *)szColumn, "| %-*.*s", nOptimalDisplayWidth, nOptimalDisplayWidth, "**ERROR**"); strcat( (char*)szHdrLine,(char*) szColumn ); } strcat((char*) szSepLine, "+\n" ); strcat((char*) szHdrLine, "|\n" ); printf((char*) szSepLine ); printf((char*) szHdrLine ); printf((char*) szSepLine ); free(szHdrLine); } static SQLLEN WriteBodyNormal( SQLHSTMT hStmt ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLLEN nIndicator = 0; SQLCHAR szColumn[MAX_DATA_WIDTH+20]; SQLCHAR szColumnValue[MAX_DATA_WIDTH+1]; SQLRETURN nReturn = 0; SQLLEN nRows = 0; SQLUINTEGER nOptimalDisplayWidth = 10; *szColumn = '\0'; *szColumnValue = '\0'; nReturn = SQLNumResultCols( hStmt, &nColumns ); if ( nReturn != SQL_SUCCESS && nReturn != SQL_SUCCESS_WITH_INFO ) nColumns = -1; /* ROWS */ nReturn = SQLFetch( hStmt ); while ( nReturn == SQL_SUCCESS || nReturn == SQL_SUCCESS_WITH_INFO ) { /* COLS */ for ( nCol = 1; nCol <= nColumns; nCol++ ) { int sret; nOptimalDisplayWidth = OptimalDisplayWidth( hStmt, nCol, nUserWidth ); nReturn = SQLGetData( hStmt, nCol, SQL_C_CHAR, (SQLPOINTER)szColumnValue, sizeof(szColumnValue), &nIndicator ); szColumnValue[MAX_DATA_WIDTH] = '\0'; if ( nReturn == SQL_SUCCESS && nIndicator != SQL_NULL_DATA ) { sret = sprintf( (char*)szColumn, "| %-*.*s", nOptimalDisplayWidth, nOptimalDisplayWidth, szColumnValue ); if (sret < 0) sprintf( (char*)szColumn, "| %-*.*s", nOptimalDisplayWidth, nOptimalDisplayWidth, "**ERROR**" ); } else if ( nReturn == SQL_ERROR ) { break; } else { sprintf( (char*)szColumn, "| %-*s", nOptimalDisplayWidth, "" ); } fputs( (char*)szColumn, stdout ); } /* for columns */ nRows++; printf( "|\n" ); nReturn = SQLFetch( hStmt ); } /* while rows */ if ( nReturn == SQL_ERROR ) { if ( bVerbose ) DumpODBCLog( 0, 0, hStmt ); } return nRows; } static void WriteFooterNormal( SQLHSTMT hStmt, SQLCHAR *szSepLine, SQLLEN nRows ) { SQLLEN nRowsAffected = -1; printf( (char*)szSepLine ); SQLRowCount( hStmt, &nRowsAffected ); printf( "SQLRowCount returns %d\n", nRowsAffected ); if ( nRows ) { printf( "%d rows fetched\n", nRows ); } } static int DumpODBCLog( SQLHENV hEnv, SQLHDBC hDbc, SQLHSTMT hStmt ) { SQLCHAR szError[501]; SQLCHAR szSqlState[10]; SQLINTEGER nNativeError; SQLSMALLINT nErrorMsg; if ( version3 ) { int rec; if ( hStmt ) { rec = 0; while ( SQLGetDiagRec( SQL_HANDLE_STMT, hStmt, ++rec, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "[%s]%s\n", szSqlState, szError ); } } if ( hDbc ) { rec = 0; while ( SQLGetDiagRec( SQL_HANDLE_DBC, hDbc, ++rec, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "[%s]%s\n", szSqlState, szError ); } } if ( hEnv ) { rec = 0; while ( SQLGetDiagRec( SQL_HANDLE_ENV, hEnv, ++rec, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "[%s]%s\n", szSqlState, szError ); } } } else { if ( hStmt ) { while ( SQLError( hEnv, hDbc, hStmt, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "[%s]%s\n", szSqlState, szError ); } } if ( hDbc ) { while ( SQLError( hEnv, hDbc, 0, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "[%s]%s\n", szSqlState, szError ); } } if ( hEnv ) { while ( SQLError( hEnv, 0, 0, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "[%s]%s\n", szSqlState, szError ); } } } return 1; } static int get_args(char *string, char **args, int maxarg) { int nargs = 0; char *copy; char *p; const char *sep = " "; char *arg; unsigned int i; if (!string || !args) return 0; if (!(copy = strdup(string))) return 0; for (i = 0; i < maxarg; i++) { args[i] = NULL; } p = copy; while ((arg = strtok(p, sep))) { p = NULL; if (strcmp(arg, "\"\"") == 0) args[nargs++] = strdup(""); else if (strcmp(arg, "null") == 0) args[nargs++] = NULL; else args[nargs++] = strdup(arg); if (nargs > maxarg) return maxarg; } free(copy); return nargs; } static void free_args(char **args, int maxarg) { unsigned int i; for (i = 0; i < maxarg; i++) { if (args[i]) { free(args[i]); args[i] = NULL; } } } static void output_help(void) { fprintf(stderr, \ "help usage:\n\n" \ "help help - output this help\n" \ "help - call SQLTables and output the result-set\n" \ "help table_name - call SQLColumns for table_name and output the result-set\n" \ "help catalog schema table type - call SQLTables with these arguments\n" \ " where any argument may be specified as \"\" (for the empty string) \n" \ " or null to pass a null pointer argument.\n" \ "\n" \ " e.g.\n" \ " help %% \"\" \"\" \"\" - output list of catalogs\n" \ " help \"\" %% \"\" \"\" - output list of schemas\n" \ " help null null b%% null - output all tables beginning with b\n" \ " help null null null VIEW - output list of views\n" \ "\n"); } unixODBC-2.2.14-p2/exe/iusql.c0100644000076400007640000006142711057002760014267 0ustar nicknick/************************************************** * isql * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #define UNICODE #include "isql.h" #include "ini.h" #include "sqlucode.h" #ifdef HAVE_READLINE #include #include #endif #ifdef HAVE_SETLOCALE #ifdef HAVE_LOCALE_H #include #endif #endif int bVerbose = 0; SQLHENV hEnv = 0; SQLHDBC hDbc = 0; void UWriteHeaderNormal( SQLHSTMT hStmt, SQLTCHAR *szSepLine ); void UWriteFooterNormal( SQLHSTMT hStmt, SQLTCHAR *szSepLine, SQLLEN nRows ); static char * uc_to_ascii( SQLWCHAR *uc ) { char *ascii = (char *)uc; int i; for ( i = 0; uc[ i ]; i ++ ) { ascii[ i ] = uc[ i ] & 0x00ff; } ascii[ i ] = 0; return ascii; } static void ansi_to_unicode( char *szSQL, SQLWCHAR *szUcSQL ) { int i; for ( i = 0; szSQL[ i ]; i ++ ) { szUcSQL[ i ] = szSQL[ i ]; } szUcSQL[ i ] = 0; } int main( int argc, char *argv[] ) { int nArg, count; int bHTMLTable = 0; int bBatch = 0; int cDelimiter = 0; int bColumnNames = 0; char *szDSN; char *szUID; char *szPWD; char *szSQL; char *pEscapeChar; int buffer_size = 9000; szDSN = NULL; szUID = NULL; szPWD = NULL; if ( argc < 2 ) { fprintf( stderr, szSyntax ); exit( 1 ); } #ifdef HAVE_SETLOCALE /* * Default locale */ setlocale( LC_ALL, "" ); #endif /**************************** * PARSE ARGS ***************************/ for ( nArg = 1, count = 1 ; nArg < argc; nArg++ ) { if ( argv[nArg][0] == '-' ) { /* Options */ switch ( argv[nArg][1] ) { case 'd': cDelimiter = argv[nArg][2]; break; case 's': buffer_size = atoi( &(argv[nArg][2]) ); break; case 'w': bHTMLTable = 1; break; case 'b': bBatch = 1; break; case 'c': bColumnNames = 1; break; case 'v': bVerbose = 1; break; case '-': printf( "unixODBC " VERSION "\n" ); exit(0); #ifdef HAVE_STRTOL case 'x': cDelimiter = strtol( argv[nArg]+2, NULL, 0 ); break; #endif #ifdef HAVE_SETLOCALE case 'l': if ( !setlocale( LC_ALL, argv[nArg]+2 )) { fprintf( stderr, "isql: can't set locale to '%s'\n", argv[nArg]+2 ); exit ( -1 ); } break; #endif default: fprintf( stderr, szSyntax ); exit( 1 ); } continue; } else if ( count == 1 ) szDSN = argv[nArg]; else if ( count == 2 ) szUID = argv[nArg]; else if ( count == 3 ) szPWD = argv[nArg]; count++; } szSQL = calloc( 1, buffer_size + 1 ); /**************************** * CONNECT ***************************/ if ( !OpenDatabase( &hEnv, &hDbc, szDSN, szUID, szPWD ) ) exit( 1 ); /**************************** * EXECUTE ***************************/ if ( !bBatch ) { printf( "+---------------------------------------+\n" ); printf( "| Connected! |\n" ); printf( "| |\n" ); printf( "| sql-statement |\n" ); printf( "| help [tablename] |\n" ); printf( "| quit |\n" ); printf( "| |\n" ); printf( "+---------------------------------------+\n" ); } do { if ( !bBatch ) #ifndef HAVE_READLINE printf( "SQL> " ); #else { char *line; int malloced; line=readline("SQL> "); if ( !line ) /* EOF - ctrl D */ { malloced = 1; line = strdup( "quit" ); } else { malloced = 0; } strncpy(szSQL, line, buffer_size ); add_history(line); if ( malloced ) { free(line); } } else #endif { char *line; int malloced; line = fgets( szSQL, buffer_size, stdin ); if ( !line ) /* EOF - ctrl D */ { malloced = 1; line = strdup( "quit" ); } else { malloced = 0; } strncpy(szSQL, line, buffer_size ); if ( malloced ) { free(line); } } /* strip away escape chars */ while ( (pEscapeChar=(char*)strchr(szSQL, '\n')) != NULL || (pEscapeChar=(char*)strchr(szSQL, '\r')) != NULL ) *pEscapeChar = ' '; if ( szSQL[1] != '\0' ) { if ( strncmp( szSQL, "quit", 4 ) == 0 ) szSQL[1] = '\0'; else if ( strncmp( szSQL, "help", 4 ) == 0 ) ExecuteHelp( hDbc, szSQL, cDelimiter, bColumnNames, bHTMLTable ); else if (memcmp(szSQL, "--", 2) != 0) ExecuteSQL( hDbc, szSQL, cDelimiter, bColumnNames, bHTMLTable ); } } while ( szSQL[1] != '\0' ); /**************************** * DISCONNECT ***************************/ CloseDatabase( hEnv, hDbc ); exit( 0 ); } /**************************** * OpenDatabase - do everything we have to do to get a viable connection to szDSN ***************************/ int OpenDatabase( SQLHENV *phEnv, SQLHDBC *phDbc, char *szDSN, char *szUID, char *szPWD ) { SQLCHAR dsn[ 1024 ], uid[ 1024 ], pwd[ 1024 ]; SQLTCHAR cstr[ 1024 ]; char zcstr[ 1024 ], tmp[ 1024 ]; int i; size_t zclen; if ( SQLAllocEnv( phEnv ) != SQL_SUCCESS ) { fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocEnv\n" ); return 0; } if ( SQLAllocConnect( *phEnv, phDbc ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, 0, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocConnect\n" ); SQLFreeEnv( *phEnv ); return 0; } if ( szDSN ) { size_t DSNlen=strlen( szDSN ); for ( i = 0; i < DSNlen; i ++ ) { dsn[ i ] = szDSN[ i ]; } dsn[ i ] = '\0'; } else { dsn[ 0 ] = '\0'; } if ( szUID ) { size_t UIDlen=strlen( szUID ); for ( i = 0; i < UIDlen; i ++ ) { uid[ i ] = szUID[ i ]; } uid[ i ] = '\0'; } else { uid[ 0 ] = '\0'; } if ( szPWD ) { size_t PWDlen=strlen( szPWD ); for ( i = 0; i < PWDlen; i ++ ) { pwd[ i ] = szPWD[ i ]; } pwd[ i ] = '\0'; } else { pwd[ 0 ] = '\0'; } sprintf( zcstr, "DSN=%s", dsn ); if ( szUID ) { sprintf( tmp, ";UID=%s", uid ); strcat( zcstr, tmp ); } if ( szPWD ) { sprintf( tmp, ";PWD=%s", pwd ); strcat( zcstr, tmp ); } zclen=strlen( zcstr ); for ( i = 0; i < zclen; i ++ ) { cstr[ i ] = zcstr[ i ]; } if ( !SQL_SUCCEEDED( SQLDriverConnect( *phDbc, NULL, cstr, SQL_NTS, NULL, 0, NULL, SQL_DRIVER_NOPROMPT ))) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLDriverConnect\n" ); SQLFreeConnect( *phDbc ); SQLFreeEnv( *phEnv ); return 0; } if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); return 1; } /**************************** * ExecuteSQL - create a statement, execute the SQL, and get rid of the statement * - show results as per request; bHTMLTable has precedence over other options ***************************/ int ExecuteSQL( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNames, int bHTMLTable ) { SQLHSTMT hStmt; SQLTCHAR szSepLine[32001]; SQLTCHAR szUcSQL[32001]; SQLSMALLINT cols; SQLINTEGER ret; SQLLEN nRows = 0; szSepLine[ 0 ] = 0; ansi_to_unicode( szSQL, szUcSQL ); /**************************** * EXECUTE SQL ***************************/ if ( SQLAllocStmt( hDbc, &hStmt ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocStmt\n" ); return 0; } if ( SQLPrepare( hStmt, szUcSQL, SQL_NTS ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLPrepare\n" ); SQLFreeStmt( hStmt, SQL_DROP ); return 0; } ret = SQLExecute( hStmt ); if ( ret == SQL_NO_DATA ) { fprintf( stderr, "[ISQL]INFO: SQLExecute returned SQL_NO_DATA\n" ); } else if ( ret == SQL_SUCCESS_WITH_INFO ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]INFO: SQLExecute returned SQL_SUCCESS_WITH_INFO\n" ); } else if ( ret != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLExecute\n" ); SQLFreeStmt( hStmt, SQL_DROP ); return 0; } do { /* * check to see if it has generated a result set */ if ( SQLNumResultCols( hStmt, &cols ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLNumResultCols\n" ); SQLFreeStmt( hStmt, SQL_DROP ); return 0; } if ( cols > 0 ) { /**************************** * WRITE HEADER ***************************/ if ( bHTMLTable ) WriteHeaderHTMLTable( hStmt ); else if ( cDelimiter == 0 ) UWriteHeaderNormal( hStmt, szSepLine ); else if ( cDelimiter && bColumnNames ) WriteHeaderDelimited( hStmt, cDelimiter ); /**************************** * WRITE BODY ***************************/ if ( bHTMLTable ) WriteBodyHTMLTable( hStmt ); else if ( cDelimiter == 0 ) nRows = WriteBodyNormal( hStmt ); else WriteBodyDelimited( hStmt, cDelimiter ); } /**************************** * WRITE FOOTER ***************************/ if ( bHTMLTable ) WriteFooterHTMLTable( hStmt ); else if ( cDelimiter == 0 ) UWriteFooterNormal( hStmt, szSepLine, nRows ); } while ( SQL_SUCCEEDED( SQLMoreResults( hStmt ))); /**************************** * CLEANUP ***************************/ SQLFreeStmt( hStmt, SQL_DROP ); return 1; } /**************************** * ExecuteHelp - create a statement, execute the SQL, and get rid of the statement * - show results as per request; bHTMLTable has precedence over other options ***************************/ int ExecuteHelp( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNames, int bHTMLTable ) { char szTable[250] = ""; SQLHSTMT hStmt; SQLTCHAR szSepLine[32001]; SQLLEN nRows = 0; szSepLine[ 0 ] = 0; /**************************** * EXECUTE SQL ***************************/ if ( SQLAllocStmt( hDbc, &hStmt ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, 0 ); fprintf( stderr, "[ISQL]ERROR: Could not SQLAllocStmt\n" ); return 0; } if ( iniElement( szSQL, ' ', '\0', 1, szTable, sizeof(szTable) ) == INI_SUCCESS ) { SQLWCHAR tname[ 1024 ]; ansi_to_unicode( szTable, tname ); /* COLUMNS */ if ( SQLColumns( hStmt, NULL, 0, NULL, 0, tname, SQL_NTS, NULL, 0 ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLColumns\n" ); SQLFreeStmt( hStmt, SQL_DROP ); return 0; } } else { /* TABLES */ if ( SQLTables( hStmt, NULL, 0, NULL, 0, NULL, 0, NULL, 0 ) != SQL_SUCCESS ) { if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt ); fprintf( stderr, "[ISQL]ERROR: Could not SQLTables\n" ); SQLFreeStmt( hStmt, SQL_DROP ); return 0; } } /**************************** * WRITE HEADER ***************************/ if ( bHTMLTable ) WriteHeaderHTMLTable( hStmt ); else if ( cDelimiter == 0 ) UWriteHeaderNormal( hStmt, szSepLine ); else if ( cDelimiter && bColumnNames ) WriteHeaderDelimited( hStmt, cDelimiter ); /**************************** * WRITE BODY ***************************/ if ( bHTMLTable ) WriteBodyHTMLTable( hStmt ); else if ( cDelimiter == 0 ) nRows = WriteBodyNormal( hStmt ); else WriteBodyDelimited( hStmt, cDelimiter ); /**************************** * WRITE FOOTER ***************************/ if ( bHTMLTable ) WriteFooterHTMLTable( hStmt ); else if ( cDelimiter == 0 ) UWriteFooterNormal( hStmt, szSepLine, nRows ); /**************************** * CLEANUP ***************************/ SQLFreeStmt( hStmt, SQL_DROP ); return 1; } /**************************** * CloseDatabase - cleanup in prep for exiting the program ***************************/ int CloseDatabase( SQLHENV hEnv, SQLHDBC hDbc ) { SQLDisconnect( hDbc ); SQLFreeConnect( hDbc ); SQLFreeEnv( hEnv ); return 1; } /**************************** * WRITE HTML ***************************/ void WriteHeaderHTMLTable( SQLHSTMT hStmt ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLTCHAR szColumnName[MAX_DATA_WIDTH+1]; szColumnName[ 0 ] = 0; printf( "\n" ); printf( "\n" ); if ( SQLNumResultCols( hStmt, &nColumns ) != SQL_SUCCESS ) nColumns = -1; for ( nCol = 1; nCol <= nColumns; nCol++ ) { SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), NULL, NULL ); printf( "\n" ); } printf( "\n" ); } void WriteBodyHTMLTable( SQLHSTMT hStmt ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLLEN nIndicator = 0; SQLTCHAR szColumnValue[MAX_DATA_WIDTH+1]; SQLRETURN nReturn = 0; SQLRETURN ret; szColumnValue[ 0 ] = 0; if ( SQLNumResultCols( hStmt, &nColumns ) != SQL_SUCCESS ) nColumns = -1; while ( (ret = SQLFetch( hStmt )) == SQL_SUCCESS ) /* ROWS */ { printf( "\n" ); for ( nCol = 1; nCol <= nColumns; nCol++ ) /* COLS */ { printf( "\n" ); } if (ret != SQL_SUCCESS) break; printf( "\n" ); } } void WriteFooterHTMLTable( SQLHSTMT hStmt ) { printf( "
\n" ); printf( "\n" ); printf( "%s\n", uc_to_ascii( szColumnName )); printf( "\n" ); printf( "
\n" ); printf( "\n" ); nReturn = SQLGetData( hStmt, nCol, SQL_C_WCHAR, (SQLPOINTER)szColumnValue, sizeof(szColumnValue), &nIndicator ); if ( nReturn == SQL_SUCCESS && nIndicator != SQL_NULL_DATA ) { uc_to_ascii( szColumnValue ); fputs((char*) szColumnValue, stdout ); } else if ( nReturn == SQL_ERROR ) { ret = SQL_ERROR; break; } else printf( "%s\n", "" ); printf( "\n" ); printf( "
\n" ); } /**************************** * WRITE DELIMITED * - this output can be used by the ODBC Text File driver * - last column no longer has a delimit char (it is implicit)... * this is consistent with odbctxt ***************************/ void WriteHeaderDelimited( SQLHSTMT hStmt, char cDelimiter ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLTCHAR szColumnName[MAX_DATA_WIDTH+1]; szColumnName[ 0 ] = 0; if ( SQLNumResultCols( hStmt, &nColumns ) != SQL_SUCCESS ) nColumns = -1; for ( nCol = 1; nCol <= nColumns; nCol++ ) { SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), NULL, NULL ); fputs((char*) uc_to_ascii( szColumnName ), stdout ); if ( nCol < nColumns ) putchar( cDelimiter ); } putchar( '\n' ); } void WriteBodyDelimited( SQLHSTMT hStmt, char cDelimiter ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLLEN nIndicator = 0; SQLTCHAR szColumnValue[MAX_DATA_WIDTH+1]; SQLRETURN nReturn = 0; SQLRETURN ret; szColumnValue[ 0 ] = 0; if ( SQLNumResultCols( hStmt, &nColumns ) != SQL_SUCCESS ) nColumns = -1; /* ROWS */ while (( ret = SQLFetch( hStmt )) == SQL_SUCCESS ) { /* COLS */ for ( nCol = 1; nCol <= nColumns; nCol++ ) { nReturn = SQLGetData( hStmt, nCol, SQL_C_WCHAR, (SQLPOINTER)szColumnValue, sizeof(szColumnValue), &nIndicator ); if ( nReturn == SQL_SUCCESS && nIndicator != SQL_NULL_DATA ) { uc_to_ascii( szColumnValue ); fputs((char*) szColumnValue, stdout ); if ( nCol < nColumns ) putchar( cDelimiter ); } else if ( nReturn == SQL_ERROR ) { ret = SQL_ERROR; break; } else { if ( nCol < nColumns ) putchar( cDelimiter ); } } if (ret != SQL_SUCCESS) break; printf( "\n" ); } if ( ret == SQL_ERROR ) { if ( bVerbose ) DumpODBCLog( 0, 0, hStmt ); } } /**************************** * WRITE NORMAL ***************************/ void UWriteHeaderNormal( SQLHSTMT hStmt, SQLTCHAR *szSepLine ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLULEN nMaxLength = 10; SQLTCHAR szColumn[MAX_DATA_WIDTH+20]; SQLTCHAR szColumnName[MAX_DATA_WIDTH+1]; SQLTCHAR szHdrLine[32001]; szColumn[ 0 ] = 0; szColumnName[ 0 ] = 0; szHdrLine[ 0 ] = 0; if ( SQLNumResultCols( hStmt, &nColumns ) != SQL_SUCCESS ) nColumns = -1; for ( nCol = 1; nCol <= nColumns; nCol++ ) { SQLColAttribute( hStmt, nCol, SQL_DESC_DISPLAY_SIZE, NULL, 0, NULL, (SQLLEN*)&nMaxLength ); SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), NULL, NULL ); if ( nMaxLength > MAX_DATA_WIDTH ) nMaxLength = MAX_DATA_WIDTH; uc_to_ascii( szColumnName ); /* SEP */ memset( szColumn, '\0', sizeof(szColumn) ); memset( szColumn, '-', max( nMaxLength, strlen((char*)szColumnName) ) + 1 ); strcat((char*) szSepLine, "+" ); strcat((char*) szSepLine,(char*) szColumn ); /* HDR */ sprintf((char*) szColumn, "| %-*s", max( nMaxLength, strlen((char*)szColumnName) ), (char*)szColumnName ); strcat((char*) szHdrLine,(char*) szColumn ); } strcat((char*) szSepLine, "+\n" ); strcat((char*) szHdrLine, "|\n" ); printf((char*) szSepLine ); printf((char*) szHdrLine ); printf((char*) szSepLine ); } SQLLEN WriteBodyNormal( SQLHSTMT hStmt ) { SQLINTEGER nCol = 0; SQLSMALLINT nColumns = 0; SQLLEN nIndicator = 0; SQLTCHAR szColumn[MAX_DATA_WIDTH+20]; SQLTCHAR szColumnValue[MAX_DATA_WIDTH+1]; SQLTCHAR szColumnName[MAX_DATA_WIDTH+1]; SQLULEN nMaxLength = 10; SQLRETURN nReturn = 0; SQLRETURN ret; SQLLEN nRows = 0; szColumn[ 0 ] = 0; szColumnValue[ 0 ] = 0; szColumnName[ 0 ] = 0; if ( SQLNumResultCols( hStmt, &nColumns ) != SQL_SUCCESS ) nColumns = -1; /* ROWS */ while (( ret = SQLFetch( hStmt )) == SQL_SUCCESS ) { /* COLS */ for ( nCol = 1; nCol <= nColumns; nCol++ ) { SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), NULL, NULL ); SQLColAttribute( hStmt, nCol, SQL_DESC_DISPLAY_SIZE, NULL, 0, NULL, (SQLLEN*)&nMaxLength ); uc_to_ascii( szColumnName ); if ( nMaxLength > MAX_DATA_WIDTH ) nMaxLength = MAX_DATA_WIDTH; nReturn = SQLGetData( hStmt, nCol, SQL_C_WCHAR, (SQLPOINTER)szColumnValue, sizeof(szColumnValue), &nIndicator ); szColumnValue[MAX_DATA_WIDTH] = '\0'; uc_to_ascii( szColumnValue ); if ( nReturn == SQL_SUCCESS && nIndicator != SQL_NULL_DATA ) { if ( strlen((char*)szColumnValue) < max( nMaxLength, strlen((char*)szColumnName ))) { int i; size_t maxlen=max( nMaxLength, strlen((char*)szColumnName )); strcpy((char*) szColumn, "| " ); strcat((char*) szColumn, (char*) szColumnValue ); for ( i = strlen((char*) szColumnValue ); i < maxlen; i ++ ) { strcat((char*) szColumn, " " ); } } else { strcpy((char*) szColumn, "| " ); strcat((char*) szColumn, (char*) szColumnValue ); } } else if ( nReturn == SQL_ERROR ) { ret = SQL_ERROR; break; } else { sprintf((char*) szColumn, "| %-*s", max( nMaxLength, strlen((char*) szColumnName) ), "" ); } fputs((char*) szColumn, stdout ); } if (ret != SQL_SUCCESS) break; printf( "|\n" ); nRows++; } if ( ret == SQL_ERROR ) { if ( bVerbose ) DumpODBCLog( 0, 0, hStmt ); } return nRows; } void UWriteFooterNormal( SQLHSTMT hStmt, SQLTCHAR *szSepLine, SQLLEN nRows ) { SQLLEN nRowsAffected = -1; printf( (char*)szSepLine ); SQLRowCount( hStmt, &nRowsAffected ); printf( "SQLRowCount returns %d\n", nRowsAffected ); if ( nRows ) { printf( "%d rows fetched\n", nRows ); } } int DumpODBCLog( SQLHENV hEnv, SQLHDBC hDbc, SQLHSTMT hStmt ) { SQLTCHAR szError[501]; SQLTCHAR szSqlState[10]; SQLINTEGER nNativeError; SQLSMALLINT nErrorMsg; if ( hStmt ) { while ( SQLError( hEnv, hDbc, hStmt, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "%s\n", uc_to_ascii( szError )); } } if ( hDbc ) { while ( SQLError( hEnv, hDbc, 0, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "%s\n", uc_to_ascii( szError )); } } if ( hEnv ) { while ( SQLError( hEnv, 0, 0, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "%s\n", uc_to_ascii( szError )); } } return 1; } unixODBC-2.2.14-p2/exe/odbc-config.c0100644000076400007640000001442411014545351015300 0ustar nicknick/********************************************************************* * * Written, as part of unixODBC by Nick Gorham * (nick@easysoft.com). * * copyright (c) 2004 Nick Gorham * * This program is free software; you can 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 * **********************************************************************/ #include #include #include #include static void usage( void ) { fprintf( stderr, "Usage: odbc_config\n\t\t[--prefix]\n\t\t[--exec-prefix]\n\t\t[--include-prefix]\n\t\t[--lib-prefix]\n\t\t[--bin-prefix]\n\t\t[--version]\n\t\t[--libs]\n\t\t[--static-libs]\n\t\t[--libtool-libs]\n\t\t[--cflags]\n\t\t[--odbcversion]\n\t\t[--longodbcversion]\n\t\t[--odbcini]\n\t\t[--odbcinstini]\n\t\t[--header]\n\t\t[--ulen]\n" ); } static void cInc( void ) { #ifdef HAVE_UNISTD_H printf( "#ifndef HAVE_UNISTD_H\n #define HAVE_UNISTD_H\n#endif\n" ); #endif #ifdef HAVE_PWD_H printf( "#ifndef HAVE_PWD_H\n #define HAVE_PWD_H\n#endif\n" ); #endif #ifdef HAVE_SYS_TYPES_H printf( "#ifndef HAVE_SYS_TYPES_H\n #define HAVE_SYS_TYPES_H\n#endif\n" ); #endif #ifdef ODBC_STD printf( "#ifndef ODBC_STD\n #define ODBC_STD\n#endif\n" ); #endif #ifdef UNICODE printf( "#ifndef UNICODE\n #define UNICODE\n#endif\n" ); #endif #ifdef GUID_DEFINED printf( "#ifndef GUID_DEFINED\n #define GUID_DEFINED\n#endif\n" ); #endif #ifdef SQL_WCHART_CONVERT printf( "#ifndef SQL_WCHART_CONVERT\n #define SQL_WCHART_CONVERT\n#endif\n" ); #endif #ifdef HAVE_LONG_LONG printf( "#ifndef HAVE_LONG_LONG\n #define HAVE_LONG_LONG\n#endif\n" ); #endif #ifdef ODBCINT64 printf( "#ifndef ODBCINT64\n #define ODBCINT64\n#endif\n" ); #endif #ifdef UODBCINT64 printf( "#ifndef UODBCINT64\n #define UODBCINT64\n#endif\n" ); #endif #ifdef DISABLE_INI_CACHING printf( "#ifndef DISABLE_INI_CACHING\n #define DISABLE_INI_CACHING\n#endif\n" ); #endif #ifdef SIZEOF_LONG_INT printf( "#ifndef SIZEOF_LONG_INT\n #define SIZEOF_LONG_INT %d\n#endif\n", SIZEOF_LONG_INT ); #endif #ifdef ALLREADY_HAVE_WINDOWS_TYPE printf( "#ifndef ALLREADY_HAVE_WINDOWS_TYPE\n #define ALLREADY_HAVE_WINDOWS_TYPE\n#endif\n" ); #endif #ifdef DONT_TD_VOID printf( "#ifndef DONT_TD_VOID\n #define DONT_TD_VOID\n#endif\n" ); #endif #ifdef DO_YOU_KNOW_WHAT_YOUR_ARE_DOING printf( "#ifndef DO_YOU_KNOW_WHAT_YOUR_ARE_DOING\n #define DO_YOU_KNOW_WHAT_YOUR_ARE_DOING\n#endif\n" ); #endif } static void cflags( void ) { #ifdef HAVE_UNISTD_H printf( "-DHAVE_UNISTD_H " ); #endif #ifdef HAVE_PWD_H printf( "-DHAVE_PWD_H " ); #endif #ifdef HAVE_SYS_TYPES_H printf( "-DHAVE_SYS_TYPES_H " ); #endif #ifdef ODBC_STD printf( "-DODBC_STD " ); #endif #ifdef UNICODE printf( "-DUNICODE " ); #endif #ifdef GUID_DEFINED printf( "-DGUID_DEFINED " ); #endif #ifdef SQL_WCHART_CONVERT printf( "-DSQL_WCHART_CONVERT " ); #endif #ifdef HAVE_LONG_LONG printf( "-DHAVE_LONG_LONG " ); #endif #ifdef DISABLE_INI_CACHING printf( "-DDISABLE_INI_CACHING " ); #endif #ifdef SIZEOF_LONG_INT printf( "-DSIZEOF_LONG_INT=%d ", SIZEOF_LONG_INT ); #endif #ifdef ALLREADY_HAVE_WINDOWS_TYPE printf( "-DALLREADY_HAVE_WINDOWS_TYPE " ); #endif #ifdef DONT_TD_VOID printf( "-DDONT_TD_VOID " ); #endif #ifdef DO_YOU_KNOW_WHAT_YOUR_ARE_DOING printf( "-DDO_YOU_KNOW_WHAT_YOUR_ARE_DOING " ); #endif #ifdef INCLUDE_PREFIX printf( "-I%s ", INCLUDE_PREFIX ); #else printf( "-I%s/include ", PREFIX ); #endif printf( "\n" ); } static void ulen( void ) { printf( "-DSIZEOF_SQLULEN=%d\n", sizeof( SQLULEN )); } int main( int argc, char **argv ) { int i; if ( argc < 2 ) { usage(); exit( -1 ); } for ( i = 1; i < argc; i ++ ) { if ( strcmp( argv[ i ], "--prefix" ) == 0 ) { printf( "%s\n", PREFIX ); } else if ( strcmp( argv[ i ], "--exec-prefix" ) == 0 ) { printf( "%s\n", EXEC_PREFIX ); } else if ( strcmp( argv[ i ], "--bin-prefix" ) == 0 ) { printf( "%s\n", BIN_PREFIX ); } else if ( strcmp( argv[ i ], "--include-prefix" ) == 0 ) { printf( "%s\n", INCLUDE_PREFIX ); } else if ( strcmp( argv[ i ], "--lib-prefix" ) == 0 ) { printf( "%s\n", LIB_PREFIX ); } else if ( strcmp( argv[ i ], "--version" ) == 0 ) { printf( "%s\n", VERSION ); } else if ( strcmp( argv[ i ], "--libs" ) == 0 ) { printf( "-L%s -lodbc\n", LIB_PREFIX ); } else if ( strcmp( argv[ i ], "--static-libs" ) == 0 ) { printf( "%s/libodbc.a\n", LIB_PREFIX ); } else if ( strcmp( argv[ i ], "--libtool-libs" ) == 0 ) { printf( "%s/libodbc.la\n", LIB_PREFIX ); } else if ( strcmp( argv[ i ], "--cflags" ) == 0 ) { cflags(); } else if ( strcmp( argv[ i ], "--header" ) == 0 ) { cInc(); } else if ( strcmp( argv[ i ], "--odbcversion" ) == 0 ) { printf( "3\n" ); } else if ( strcmp( argv[ i ], "--longodbcversion" ) == 0 ) { printf( "3.52\n" ); } else if ( strcmp( argv[ i ], "--odbcini" ) == 0 ) { printf( "%s/odbc.ini\n", SYSTEM_FILE_PATH ); } else if ( strcmp( argv[ i ], "--odbcinstini" ) == 0 ) { printf( "%s/odbcinst.ini\n", SYSTEM_FILE_PATH ); } else if ( strcmp( argv[ i ], "--ulen" ) == 0 ) { ulen(); } else { usage(); exit( -1 ); } } exit(0); } unixODBC-2.2.14-p2/exe/odbcinst.c0100644000076400007640000005074111111030146014722 0ustar nicknick/******************************************** * odbcinst - command line tool * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include char *szSyntax = "\n" \ "**********************************************\n" \ "* unixODBC - odbcinst *\n" \ "**********************************************\n" \ "* *\n" \ "* Purpose: *\n" \ "* *\n" \ "* An ODBC Installer and Uninstaller. *\n" \ "* Updates system files, and *\n" \ "* increases/decreases usage counts but *\n" \ "* does not actually copy or remove any *\n" \ "* files. *\n" \ "* *\n" \ "* Syntax: *\n" \ "* *\n" \ "* odbcinst Action Object Options *\n" \ "* *\n" \ "* Action: *\n" \ "* *\n" \ "* -i install *\n" \ "* -u uninstall *\n" \ "* -q query *\n" \ "* -j print config info *\n" \ "* -c call SQLCreateDataSource *\n" \ "* -m call SQLManageDataSources *\n" \ "* --version version *\n" \ "* *\n" \ "* Object: *\n" \ "* *\n" \ "* -d driver *\n" \ "* -s data source *\n" \ "* *\n" \ "* Options: *\n" \ "* *\n" \ "* -f file name of template.ini follows *\n" \ "* this (valid for -i) *\n" \ "* -r get template.ini from stdin, not *\n" \ "* a template file *\n" \ "* -n Driver or Data Source Name follows *\n" \ "* -v turn verbose off (no info, warning *\n" \ "* or error msgs) *\n" \ "* -l system dsn *\n" \ "* -h user dsn *\n" \ "* *\n" \ "* Returns: *\n" \ "* *\n" \ "* 0 Success *\n" \ "* !0 Failed *\n" \ "* *\n" \ "* Please visit; *\n" \ "* *\n" \ "* http://www.unixodbc.org *\n" \ "* pharvey@codebydesign.com *\n" \ "**********************************************\n\n"; char szError[ODBC_FILENAME_MAX+1]; DWORD nError; char cVerbose; int from_stdin = 0; int system_dsn = 0; int user_dsn = 0; /*! * \brief Invoke UI to Create Data Source wizard. * * This exists so we can test calling SQLCreateDataSource from an * app which does not provide the UI used by SQLCreateDataSource. * * At the moment we have "odbcinstQ4" (the Qt4 based UI) requested * explicitly but this could be changed to simply request the default * or to use a ncurses based UI when that becomes available. * * There are at least 3 ways to invoke SQLCreateDataSource; * * \li ODBCCreateDataSourceQ4 at the command-line * \li a custom application * \li "odbcinst -c [-nMyDsn]" at the command-line * * \sa ManageDataSources */ int CreateDataSource( char *pszDataSourceName ) { ODBCINSTWND odbcinstwnd; odbcinstwnd.hWnd = 0; strcpy( odbcinstwnd.szUI, "odbcinstQ4" ); if ( SQLCreateDataSource( (HWND)&(odbcinstwnd), ( (pszDataSourceName && *pszDataSourceName) ? pszDataSourceName : 0 ) ) == FALSE ) return 1; return 0; } /*! * \brief Invoke UI to Manage Data Sources. * * This exists so we can test calling SQLManageDataSources from an * app which does not provide the UI used by SQLManageDataSources. * * At the moment we have "odbcinstQ4" (the Qt4 based UI) requested * explicitly but this could be changed to simply request the default * or to use a ncurses based UI when that becomes available. * * There are at least 3 ways to invoke SQLManageDataSources; * * \li ODBCManageDataSourcesQ4 at the command-line * \li a custom application * \li "odbcinst -m" at the command-line * * \sa CreateDataSource */ int ManageDataSources() { ODBCINSTWND odbcinstwnd; odbcinstwnd.hWnd = 0; strcpy( odbcinstwnd.szUI, "odbcinstQ4" ); if ( SQLManageDataSources( (HWND)&(odbcinstwnd) ) == FALSE ) return 1; return 0; } int DriverInstall( char *pszTemplate ) { HINI hIni; char szObject[INI_MAX_OBJECT_NAME+1]; char szProperty[INI_MAX_PROPERTY_NAME+1]; char szValue[INI_MAX_PROPERTY_VALUE+1]; char szDriver[10000]; char szPathOut[ODBC_FILENAME_MAX+1]; DWORD nUsageCount = 0; char *pChar = NULL; #ifdef __OS2__ if ( iniOpen( &hIni, pszTemplate, "#;", '[', ']', '=', FALSE, 0L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, pszTemplate, "#;", '[', ']', '=', FALSE ) != INI_SUCCESS ) #endif { if ( cVerbose == 0 ) printf( "odbcinst: iniOpen failed on %s.\n", pszTemplate ); return 1; } memset( szDriver, '\0', 10000 ); pChar = szDriver; iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { iniObject( hIni, szObject ); sprintf( pChar, "%s", szObject ); pChar += ( strlen( szObject ) + 1 ); iniPropertyFirst( hIni ); while ( iniPropertyEOL( hIni ) == FALSE ) { iniProperty( hIni, szProperty ); iniValue( hIni, szValue ); sprintf( pChar, "%s=%s", szProperty, szValue ); pChar += ( strlen( szProperty ) + strlen( szValue ) + 2 ); iniPropertyNext( hIni ); } if ( SQLInstallDriverEx( szDriver, NULL, szPathOut, ODBC_FILENAME_MAX, NULL, ODBC_INSTALL_COMPLETE, &nUsageCount ) == FALSE ) { SQLInstallerError( 1, &nError, szError, ODBC_FILENAME_MAX, NULL ); if ( cVerbose == 0 ) printf( "odbcinst: SQLInstallDriverEx failed with %s.\n", szError ); return 1; } if ( cVerbose == 0 ) printf( "odbcinst: Driver installed. Usage count increased to %d. \n Target directory is %s\n", (int)nUsageCount, szPathOut ); memset( szDriver, '\0', 10000 ); pChar = szDriver; iniObjectNext( hIni ); } iniClose( hIni ); return 0; } int DriverUninstall( char *pszDriver ) { DWORD nUsageCount; if ( SQLRemoveDriver( pszDriver, FALSE, &nUsageCount ) == FALSE ) { SQLInstallerError( 1, &nError, szError, ODBC_FILENAME_MAX, NULL ); if ( cVerbose == 0 ) printf( "odbcinst: SQLRemoveDriver failed with %s.\n", szError ); return 1; } if ( nUsageCount == 0 ) { if ( cVerbose == 0 ) printf( "%s has been deleted (if it existed at all) because its usage count became zero\n", pszDriver ); } else { if ( cVerbose == 0 ) printf( "%s usage count has been reduced to %d\n", pszDriver, (int)nUsageCount ); } return 0; } int DriverQuery( char *pszDriver ) { char szResults[4048]; char szValue[501]; char *ptr; if ( pszDriver && (*pszDriver) ) { /* list Driver details */ if ( SQLGetPrivateProfileString( pszDriver, NULL, NULL, szResults, sizeof( szResults ) - 1, "ODBCINST.INI" ) < 1 ) { SQLInstallerError( 1, &nError, szError, ODBC_FILENAME_MAX, NULL ); if ( cVerbose == 0 ) printf( "odbcinst: SQLGetPrivateProfileString failed with %s.\n", szError ); return 1; } printf( "[%s]\n", pszDriver ); ptr = szResults; while ( *ptr ) { printf( "%s=", ptr ); if ( SQLGetPrivateProfileString( pszDriver, ptr, "", szValue, sizeof( szValue ) - 1, "ODBCINST.INI" ) > 0 ) { printf( "%s", szValue ); } printf( "\n" ); ptr += strlen( ptr ) + 1; } } else { /* list Drivers */ if ( SQLGetPrivateProfileString( NULL, NULL, NULL, szResults, sizeof( szResults ) - 1, "ODBCINST.INI" ) < 1 ) { SQLInstallerError( 1, &nError, szError, ODBC_FILENAME_MAX, NULL ); if ( cVerbose == 0 ) printf( "odbcinst: SQLGetPrivateProfileString failed with %s.\n", szError ); return 1; } ptr = szResults; while ( *ptr ) { printf( "[%s]\n", ptr ); ptr += strlen( ptr ) + 1; } } return 0; } int DSNInstall( char *pszTemplate ) { HINI hIni; char szFileName[ODBC_FILENAME_MAX+1]; char szObject[INI_MAX_OBJECT_NAME+1]; char szProperty[INI_MAX_PROPERTY_NAME+1]; char szValue[INI_MAX_PROPERTY_VALUE+1]; #ifdef __OS2__ if ( iniOpen( &hIni, pszTemplate, "#;", '[', ']', '=', FALSE, 0L ) != INI_SUCCESS ) #else if ( iniOpen( &hIni, pszTemplate, "#;", '[', ']', '=', FALSE ) != INI_SUCCESS ) #endif { if ( cVerbose == 0 ) printf( "odbcinst: iniOpen failed on %s.\n", pszTemplate ); return 1; } if ( system_dsn ) { SQLSetConfigMode( ODBC_SYSTEM_DSN ); } else if ( user_dsn ) { SQLSetConfigMode( ODBC_USER_DSN ); } strcpy( szFileName, "ODBC.INI" ); iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { iniObject( hIni, szObject ); if ( SQLWritePrivateProfileString( szObject, NULL, NULL, szFileName ) == FALSE ) { int i = 1; int ret; do { ret = SQLInstallerError( i, &nError, szError, ODBC_FILENAME_MAX, NULL ); if ( cVerbose == 0 ) printf( "odbcinst: SQLWritePrivateProfileString failed with %s.\n", szError ); i ++; } while ( ret == SQL_SUCCESS ); iniClose( hIni ); SQLSetConfigMode( ODBC_BOTH_DSN ); return 1; } iniPropertyFirst( hIni ); while ( iniPropertyEOL( hIni ) == FALSE ) { iniProperty( hIni, szProperty ); iniValue( hIni, szValue ); if ( SQLWritePrivateProfileString( szObject, szProperty, szValue, szFileName ) == FALSE ) { SQLInstallerError( 1, &nError, szError, ODBC_FILENAME_MAX, NULL ); if ( cVerbose == 0 ) printf( "odbcinst: SQLWritePrivateProfileString failed with %s.\n", szError ); iniClose( hIni ); SQLSetConfigMode( ODBC_BOTH_DSN ); return 1; } iniPropertyNext( hIni ); } iniObjectNext( hIni ); } iniClose( hIni ); if ( cVerbose == 0 && from_stdin ) printf( "odbcinst: Sections and Entries from stdin have been added to %s\n", szFileName ); else if ( cVerbose ) printf( "odbcinst: Sections and Entries from %s have been added to %s\n", pszTemplate, szFileName ); return 0; } int DSNUninstall( char *pszDSN ) { UWORD nConfigMode; char *pMode; if ( SQLGetConfigMode( &nConfigMode ) == FALSE ) { SQLInstallerError( 1, &nError, szError, ODBC_FILENAME_MAX, NULL ); if ( cVerbose == 0 ) printf( "odbcinst: SQLGetConfigMode failed with %s.\n", szError ); return 1; } if ( SQLRemoveDSNFromIni( pszDSN ) == FALSE ) { SQLInstallerError( 1, &nError, szError, ODBC_FILENAME_MAX, NULL ); if ( cVerbose == 0 ) printf( "odbcinst: SQLRemoveDSNFromIni failed with %s.\n", szError ); return 1; } switch ( nConfigMode ) { case ODBC_SYSTEM_DSN: pMode = "ODBC_SYSTEM_DSN"; break; case ODBC_USER_DSN: pMode = "ODBC_USER_DSN"; break; case ODBC_BOTH_DSN: pMode = "ODBC_BOTH_DSN"; break; default: pMode = "Unknown mode"; } if ( cVerbose == 0 ) printf( "odbcinst: DSN removed (if it existed at all). %s was used as the search path.\n", pMode ); return 0; } int DSNQuery( char *pszDSN ) { char szResults[9601]; char szValue[501]; char *ptr; szResults[0] = '\0'; if ( system_dsn ) SQLSetConfigMode( ODBC_SYSTEM_DSN ); else if ( user_dsn ) SQLSetConfigMode( ODBC_USER_DSN ); if ( pszDSN && (*pszDSN) ) { /* list DSN details */ if ( SQLGetPrivateProfileString( pszDSN, NULL, NULL, szResults, sizeof( szResults ) - 1, "ODBC.INI" ) < 1 ) { SQLInstallerError( 1, &nError, szError, ODBC_FILENAME_MAX, NULL ); if ( cVerbose == 0 ) printf( "odbcinst: SQLGetPrivateProfileString failed with %s.\n", szError ); SQLSetConfigMode( ODBC_BOTH_DSN ); return 1; } printf( "[%s]\n", pszDSN ); ptr = szResults; while ( *ptr ) { printf( "%s=", ptr ); if ( SQLGetPrivateProfileString( pszDSN, ptr, "", szValue, sizeof( szValue ) - 1, "ODBC.INI" ) > 0 ) { printf( "%s\n", szValue ); } ptr += strlen( ptr ) + 1; } } else { /* list DSNs */ if ( SQLGetPrivateProfileString( NULL, NULL, NULL, szResults, sizeof( szResults ) - 1, "ODBC.INI" ) < 1 ) { SQLInstallerError( 1, &nError, szError, ODBC_FILENAME_MAX, NULL ); if ( cVerbose == 0 ) printf( "odbcinst: SQLGetPrivateProfileString failed with %s.\n", szError ); SQLSetConfigMode( ODBC_BOTH_DSN ); return 1; } ptr = szResults; while ( *ptr ) { printf( "[%s]\n", ptr ); ptr += strlen( ptr ) + 1; } } SQLSetConfigMode( ODBC_BOTH_DSN ); return 0; } void Syntax() { if ( cVerbose != 0 ) return; printf( szSyntax ); } void PrintConfigInfo() { char szFileName[ODBC_FILENAME_MAX+1]; char b1[ 256 ], b2[ 256 ]; printf( "unixODBC " VERSION "\n" ); *szFileName = '\0'; sprintf( szFileName, "%s/odbcinst.ini", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 )); printf( "DRIVERS............: %s\n", szFileName ); *szFileName = '\0'; _odbcinst_SystemINI( szFileName, FALSE ); printf( "SYSTEM DATA SOURCES: %s\n", szFileName ); *szFileName = '\0'; _odbcinst_FileINI( szFileName ); printf( "FILE DATA SOURCES..: %s\n", szFileName ); *szFileName = '\0'; _odbcinst_UserINI( szFileName, FALSE ); printf( "USER DATA SOURCES..: %s\n", szFileName ); printf( "SQLULEN Size.......: %d\n", sizeof( SQLULEN )); printf( "SQLLEN Size........: %d\n", sizeof( SQLLEN )); printf( "SQLSETPOSIROW Size.: %d\n", sizeof( SQLSETPOSIROW )); } int main( int argc, char *argv[] ) { int nArg; char cAction = 0; char cObject = 0; char szTemplateINI[ODBC_FILENAME_MAX+1]; char szObjectName[INI_MAX_OBJECT_NAME+1]; int nReturn = 0; cVerbose = 0; if ( argc < 2 ) { Syntax(); exit ( 1 ); } szTemplateINI[0] = '\0'; szObjectName[0] = '\0'; for ( nArg = 1; nArg < argc; nArg++ ) { if ( argv[nArg][0] == '-' ) { switch ( argv[nArg][1] ) { /* Action */ case 'i': case 'u': case 'q': cAction = argv[nArg][1]; break; case 'j': PrintConfigInfo(); exit(0); case '-': printf( "unixODBC " VERSION "\n" ); exit(0); /* Object */ case 'c': case 'd': case 's': case 'm': cObject = argv[nArg][1]; break; /* Options */ case 'n': if ( nArg < argc-1 ) strncpy( szObjectName, argv[nArg+1], INI_MAX_OBJECT_NAME ); break; case 'f': if ( nArg < argc-1 ) strncpy( szTemplateINI, argv[nArg+1], ODBC_FILENAME_MAX ); break; case 'r': from_stdin = 1; break; case 'v': cVerbose = argv[nArg][1]; break; case 'l': system_dsn = 1; if ( user_dsn ) { if ( cVerbose == 0 ) printf( "odbcinst: cannot install both user and system dsn at the same time"); exit( -2 ); } break; case 'h': user_dsn = 1; if ( system_dsn ) { if ( cVerbose == 0 ) printf( "odbcinst: cannot install both user and system dsn at the same time"); exit( -2 ); } break; default: if ( cVerbose == 0 ) printf( "odbcinst: Unknown option %c\n", argv[nArg][1] ); exit( -1 ); } } } /* DRIVERS */ if ( cObject == 'd' ) { /* install */ if ( cAction == 'i' ) { if ( szTemplateINI[0] != '\0' ) nReturn = DriverInstall( szTemplateINI ); else if ( from_stdin ) nReturn = DriverInstall( STDINFILE ); else { if ( cVerbose == 0 ) printf( "odbcinst: Please supply -f template.ini (The fileformat of template.ini is identical to odbcinst.ini and odbc.ini, respectively)\n" ); Syntax(); exit( 1 ); } } /* uninstall */ else if ( cAction == 'u' ) { if ( szObjectName[0] != '\0' ) nReturn = DriverUninstall( szObjectName ); else { if ( cVerbose == 0 ) printf( "odbcinst: Please supply -n FriendlyDriverName \n" ); Syntax(); exit( 1 ); } } /* query */ else if ( cAction == 'q' ) nReturn = DriverQuery( szObjectName ); else { if ( cVerbose == 0 ) printf( "odbcinst: Invalid Action for Object\n" ); Syntax(); exit( 1 ); } } /* DATA SOURCES */ else if ( cObject == 's' ) { /* install */ if ( cAction == 'i' ) { if ( szTemplateINI[0] != '\0' ) nReturn = DSNInstall( szTemplateINI ); else if ( from_stdin ) nReturn = DSNInstall( STDINFILE ); else { if ( cVerbose == 0 ) printf( "odbcinst: Please supply -f template.ini \n" ); Syntax(); exit( 1 ); } } /* uninstall */ else if ( cAction == 'u' ) { if ( szObjectName[0] != '\0' ) nReturn = DSNUninstall( szObjectName ); else { if ( cVerbose == 0 ) printf( "odbcinst: Please supply -n DataSourceName \n" ); Syntax(); exit( 1 ); } } /* query */ else if ( cAction == 'q' ) nReturn = DSNQuery( szObjectName ); else { if ( cVerbose == 0 ) printf( "odbcinst: Invalid Action for Object\n" ); Syntax(); exit( 1 ); } } else if ( cObject == 'c' ) { nReturn = CreateDataSource( szObjectName ); } else if ( cObject == 'm' ) { nReturn = ManageDataSources(); } else { if ( cVerbose == 0 ) printf( "odbcinst: Invalid Object\n" ); Syntax(); exit( 1 ); } exit( nReturn ); } unixODBC-2.2.14-p2/exe/isql.h0100644000076400007640000001453111025444217014103 0ustar nicknick/************************************************** * isql * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include #include #include #include #ifdef HAVE_STRTOL char *szSyntax = "\n" \ "**********************************************\n" \ "* unixODBC - isql *\n" \ "**********************************************\n" \ "* Syntax *\n" \ "* *\n" \ "* isql DSN [UID [PWD]] [options] *\n" \ "* *\n" \ "* Options *\n" \ "* *\n" \ "* -b batch.(no prompting etc) *\n" \ "* -dx delimit columns with x *\n" \ "* -x0xXX delimit columns with XX, where *\n" \ "* x is in hex, ie 0x09 is tab *\n" \ "* -w wrap results in an HTML table *\n" \ "* -c column names on first row. *\n" \ "* (only used when -d) *\n" \ "* -mn limit column display width to n *\n" \ "* -v verbose. *\n" \ "* -lx set locale to x *\n" \ "* -q wrap char fields in dquotes *\n" \ "* -3 Use ODBC 3 calls *\n" \ "* -n Use new line processing *\n" \ "* --version version *\n" \ "* *\n" \ "* Commands *\n" \ "* *\n" \ "* help - list tables *\n" \ "* help table - list columns in table *\n" \ "* help help - list all help options *\n" \ "* *\n" \ "* Examples *\n" \ "* *\n" \ "* isql WebDB MyID MyPWD -w < My.sql *\n" \ "* *\n" \ "* Each line in My.sql must contain *\n" \ "* exactly 1 SQL command except for the *\n" \ "* last line which must be blank (unless *\n" \ "* -n option specified). *\n" \ "* *\n" \ "* Please visit; *\n" \ "* *\n" \ "* http://www.unixodbc.org *\n" \ "* pharvey@codebydesign.com *\n" \ "* nick@easysoft.com *\n" \ "**********************************************\n\n"; #else char *szSyntax = "\n" \ "**********************************************\n" \ "* unixODBC - isql *\n" \ "**********************************************\n" \ "* Syntax *\n" \ "* *\n" \ "* isql DSN [UID [PWD]] [options] *\n" \ "* *\n" \ "* Options *\n" \ "* *\n" \ "* -b batch.(no prompting etc) *\n" \ "* -dx delimit columns with x *\n" \ "* -x0xXX delimit columns with XX, where *\n" \ "* x is in hex, ie 0x09 is tab *\n" \ "* -w wrap results in an HTML table *\n" \ "* -c column names on first row. *\n" \ "* (only used when -d) *\n" \ "* -mn limit column display width to n *\n" \ "* -v verbose. *\n" \ "* -q wrap char fields in dquotes *\n" \ "* --version version *\n" \ "* --version version *\n" \ "* *\n" \ "* Commands *\n" \ "* *\n" \ "* help - list tables *\n" \ "* help table - list columns in table *\n" \ "* help help - list all help options *\n" \ "* *\n" \ "* Examples *\n" \ "* *\n" \ "* isql WebDB MyID MyPWD -w < My.sql *\n" \ "* *\n" \ "* Each line in My.sql must contain *\n" \ "* exactly 1 SQL command except for the *\n" \ "* last line which must be blank. *\n" \ "* *\n" \ "* Please visit; *\n" \ "* *\n" \ "* http://www.unixodbc.org *\n" \ "* pharvey@codebydesign.com *\n" \ "* nick@easysoft.com *\n" \ "**********************************************\n\n"; #endif #define MAX_DATA_WIDTH 300 #ifndef max #define max( a, b ) (((a) > (b)) ? (a) : (b)) #endif #ifndef min #define min( a, b ) (((a) < (b)) ? (a) : (b)) #endif static int OpenDatabase( SQLHENV *phEnv, SQLHDBC *phDbc, char *szDSN, char *szUID, char *szPWD ); static int ExecuteSQL( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNames, int bHTMLTable ); static int ExecuteHelp( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNames, int bHTMLTable ); static int ExecuteSlash( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNames, int bHTMLTable ); static int CloseDatabase( SQLHENV hEnv, SQLHDBC hDbc ); static void WriteHeaderHTMLTable( SQLHSTMT hStmt ); static void WriteHeaderNormal( SQLHSTMT hStmt, SQLCHAR *szSepLine ); static void WriteHeaderDelimited( SQLHSTMT hStmt, char cDelimiter ); static void WriteBodyHTMLTable( SQLHSTMT hStmt ); static SQLLEN WriteBodyNormal( SQLHSTMT hStmt ); static void WriteBodyDelimited( SQLHSTMT hStmt, char cDelimiter ); static void WriteFooterHTMLTable( SQLHSTMT hStmt ); static void WriteFooterNormal( SQLHSTMT hStmt, SQLCHAR *szSepLine, SQLLEN nRows ); static int DumpODBCLog( SQLHENV hEnv, SQLHDBC hDbc, SQLHSTMT hStmt ); static int get_args(char *string, char **args, int maxarg); static void free_args(char **args, int maxarg); static void output_help(void); unixODBC-2.2.14-p2/cur/0040755000076400007640000000000011150523340012763 5ustar nicknickunixODBC-2.2.14-p2/cur/README0100644000076400007640000000024407363332157013657 0ustar nicknickA ODBC cursor lib provides cursor functionality ( client-side data caching and navigation ) in a generic manner so that drivers of any type can rely on it. unixODBC-2.2.14-p2/cur/Makefile.am0100644000076400007640000000336211025707577015041 0ustar nicknicklib_LTLIBRARIES = libodbccr.la INCLUDES = -I@top_srcdir@/include \ -I@top_srcdir@/DriverManager $(LTDLINCL) EXTRA_DIST = \ cursorlibrary.h \ cur.exp libodbccr_la_LDFLAGS = \ -no-undefined \ -version-info @LIB_VERSION@ \ -export-symbols @srcdir@/cur.exp -export-dynamic libodbccr_la_SOURCES = \ SQLAllocHandle.c \ SQLAllocHandleStd.c \ SQLAllocStmt.c \ SQLBindCol.c \ SQLBindParam.c \ SQLBindParameter.c \ SQLCancel.c \ SQLCloseCursor.c \ SQLColAttribute.c \ SQLColAttributes.c \ SQLColumnPrivileges.c \ SQLColumns.c \ SQLConnect.c \ SQLCopyDesc.c \ SQLDescribeCol.c \ SQLDescribeParam.c \ SQLEndTran.c \ SQLError.c \ SQLExecDirect.c \ SQLExecute.c \ SQLExtendedFetch.c \ SQLFetch.c \ SQLFetchScroll.c \ SQLForeignKeys.c \ SQLFreeHandle.c \ SQLFreeStmt.c \ SQLGetConnectAttr.c \ SQLGetConnectOption.c \ SQLGetCursorName.c \ SQLGetData.c \ SQLGetDescField.c \ SQLGetDescRec.c \ SQLGetDiagRec.c \ SQLGetDiagField.c \ SQLGetInfo.c \ SQLGetStmtAttr.c \ SQLGetStmtOption.c \ SQLGetTypeInfo.c \ SQLMoreResults.c \ SQLNativeSql.c \ SQLNumParams.c \ SQLNumResultCols.c \ SQLParamData.c \ SQLParamOptions.c \ SQLPrepare.c \ SQLPrimaryKeys.c \ SQLProcedureColumns.c \ SQLProcedures.c \ SQLPutData.c \ SQLRowCount.c \ SQLSetConnectAttr.c \ SQLSetConnectOption.c \ SQLSetCursorName.c \ SQLSetDescRec.c \ SQLSetDescField.c \ SQLSetParam.c \ SQLSetPos.c \ SQLSetScrollOptions.c \ SQLSetStmtAttr.c \ SQLSetStmtOption.c \ SQLSpecialColumns.c \ SQLStatistics.c \ SQLTablePrivileges.c \ SQLTables.c \ SQLTransact.c unixODBC-2.2.14-p2/cur/Makefile.in0100644000076400007640000005636111111035243015035 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = cur DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libodbccr_la_LIBADD = am_libodbccr_la_OBJECTS = SQLAllocHandle.lo SQLAllocHandleStd.lo \ SQLAllocStmt.lo SQLBindCol.lo SQLBindParam.lo \ SQLBindParameter.lo SQLCancel.lo SQLCloseCursor.lo \ SQLColAttribute.lo SQLColAttributes.lo SQLColumnPrivileges.lo \ SQLColumns.lo SQLConnect.lo SQLCopyDesc.lo SQLDescribeCol.lo \ SQLDescribeParam.lo SQLEndTran.lo SQLError.lo SQLExecDirect.lo \ SQLExecute.lo SQLExtendedFetch.lo SQLFetch.lo \ SQLFetchScroll.lo SQLForeignKeys.lo SQLFreeHandle.lo \ SQLFreeStmt.lo SQLGetConnectAttr.lo SQLGetConnectOption.lo \ SQLGetCursorName.lo SQLGetData.lo SQLGetDescField.lo \ SQLGetDescRec.lo SQLGetDiagRec.lo SQLGetDiagField.lo \ SQLGetInfo.lo SQLGetStmtAttr.lo SQLGetStmtOption.lo \ SQLGetTypeInfo.lo SQLMoreResults.lo SQLNativeSql.lo \ SQLNumParams.lo SQLNumResultCols.lo SQLParamData.lo \ SQLParamOptions.lo SQLPrepare.lo SQLPrimaryKeys.lo \ SQLProcedureColumns.lo SQLProcedures.lo SQLPutData.lo \ SQLRowCount.lo SQLSetConnectAttr.lo SQLSetConnectOption.lo \ SQLSetCursorName.lo SQLSetDescRec.lo SQLSetDescField.lo \ SQLSetParam.lo SQLSetPos.lo SQLSetScrollOptions.lo \ SQLSetStmtAttr.lo SQLSetStmtOption.lo SQLSpecialColumns.lo \ SQLStatistics.lo SQLTablePrivileges.lo SQLTables.lo \ SQLTransact.lo libodbccr_la_OBJECTS = $(am_libodbccr_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbccr_la_SOURCES) DIST_SOURCES = $(libodbccr_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbccr.la INCLUDES = -I@top_srcdir@/include \ -I@top_srcdir@/DriverManager $(LTDLINCL) EXTRA_DIST = \ cursorlibrary.h \ cur.exp libodbccr_la_LDFLAGS = \ -no-undefined \ -version-info @LIB_VERSION@ \ -export-symbols @srcdir@/cur.exp -export-dynamic libodbccr_la_SOURCES = \ SQLAllocHandle.c \ SQLAllocHandleStd.c \ SQLAllocStmt.c \ SQLBindCol.c \ SQLBindParam.c \ SQLBindParameter.c \ SQLCancel.c \ SQLCloseCursor.c \ SQLColAttribute.c \ SQLColAttributes.c \ SQLColumnPrivileges.c \ SQLColumns.c \ SQLConnect.c \ SQLCopyDesc.c \ SQLDescribeCol.c \ SQLDescribeParam.c \ SQLEndTran.c \ SQLError.c \ SQLExecDirect.c \ SQLExecute.c \ SQLExtendedFetch.c \ SQLFetch.c \ SQLFetchScroll.c \ SQLForeignKeys.c \ SQLFreeHandle.c \ SQLFreeStmt.c \ SQLGetConnectAttr.c \ SQLGetConnectOption.c \ SQLGetCursorName.c \ SQLGetData.c \ SQLGetDescField.c \ SQLGetDescRec.c \ SQLGetDiagRec.c \ SQLGetDiagField.c \ SQLGetInfo.c \ SQLGetStmtAttr.c \ SQLGetStmtOption.c \ SQLGetTypeInfo.c \ SQLMoreResults.c \ SQLNativeSql.c \ SQLNumParams.c \ SQLNumResultCols.c \ SQLParamData.c \ SQLParamOptions.c \ SQLPrepare.c \ SQLPrimaryKeys.c \ SQLProcedureColumns.c \ SQLProcedures.c \ SQLPutData.c \ SQLRowCount.c \ SQLSetConnectAttr.c \ SQLSetConnectOption.c \ SQLSetCursorName.c \ SQLSetDescRec.c \ SQLSetDescField.c \ SQLSetParam.c \ SQLSetPos.c \ SQLSetScrollOptions.c \ SQLSetStmtAttr.c \ SQLSetStmtOption.c \ SQLSpecialColumns.c \ SQLStatistics.c \ SQLTablePrivileges.c \ SQLTables.c \ SQLTransact.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cur/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu cur/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbccr.la: $(libodbccr_la_OBJECTS) $(libodbccr_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbccr_la_LDFLAGS) $(libodbccr_la_OBJECTS) $(libodbccr_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocHandleStd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindParameter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCancel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCloseCursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColAttribute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColAttributes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColumnPrivileges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCopyDesc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDescribeCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDescribeParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLEndTran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLError.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExecDirect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExecute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExtendedFetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFetchScroll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLForeignKeys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConnectAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetCursorName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDescField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDescRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDiagField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDiagRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetStmtAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetStmtOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetTypeInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLMoreResults.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNativeSql.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNumParams.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNumResultCols.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLParamData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLParamOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPrepare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPrimaryKeys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLProcedureColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLProcedures.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPutData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLRowCount.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetConnectAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetCursorName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetDescField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetDescRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetPos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetScrollOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetStmtAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetStmtOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSpecialColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLStatistics.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTablePrivileges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTables.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTransact.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/cur/SQLAllocHandle.c0100644000076400007640000001061410263466553015674 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLAllocHandle.c,v 1.4 2005/07/08 12:11:23 lurcher Exp $ * * $Log: SQLAllocHandle.c,v $ * Revision 1.4 2005/07/08 12:11:23 lurcher * * Fix a cursor lib problem (it was broken if you did metadata calls) * Alter the params to SQLParamOptions to use SQLULEN * * Revision 1.3 2004/07/24 17:55:38 lurcher * Sync up CVS * * Revision 1.2 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/03/28 14:57:22 nick * * Fix bugs in corsor lib introduced bu UNCODE and other changes * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/11/20 20:54:00 ngorham * * Asorted portability fixes * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLAllocHandle( SQLSMALLINT handle_type, SQLHANDLE input_handle, SQLHANDLE *output_handle, SQLHANDLE dm_handle ) { switch ( handle_type ) { case SQL_HANDLE_ENV: case SQL_HANDLE_DBC: /* * shouldn't be here */ return SQL_ERROR; break; case SQL_HANDLE_STMT: { CLHDBC cl_connection = (CLHDBC) input_handle; CLHSTMT cl_statement; DMHDBC connection = cl_connection -> dm_connection; SQLRETURN ret; /* * allocate a cursor lib statement */ cl_statement = malloc( sizeof( *cl_statement )); if ( !cl_statement ) { cl_connection -> dh.dm_log_write( "CL " __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); cl_connection -> dh.__post_internal_error( &connection -> error, ERROR_HY001, NULL, connection -> environment -> requested_version ); return SQL_ERROR; } memset( cl_statement, 0, sizeof( *cl_statement )); cl_statement -> cl_connection = cl_connection; cl_statement -> dm_statement = ( DMHSTMT ) dm_handle; cl_statement -> error_count = 0; cl_statement -> fetch_statement = SQL_NULL_HSTMT; ret = SQLALLOCHANDLE( cl_connection, handle_type, cl_connection -> driver_dbc, &cl_statement -> driver_stmt, NULL ); if ( SQL_SUCCEEDED( ret )) { *output_handle = ( SQLHSTMT ) cl_statement; } else { free( cl_statement ); } return ret; } break; case SQL_HANDLE_DESC: { CLHDBC cl_connection = (CLHDBC) input_handle; return SQLALLOCHANDLE( cl_connection, handle_type, input_handle, output_handle, NULL ); } break; } } unixODBC-2.2.14-p2/cur/SQLAllocHandleStd.c0100644000076400007640000000346007363332157016347 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLAllocHandleStd.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLAllocHandleStd.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLAllocHandleStd( SQLSMALLINT handle_type, SQLHANDLE input_handle, SQLHANDLE *output_handle, SQLHANDLE dm_handle ) { return CLAllocHandle( handle_type, input_handle, output_handle, dm_handle ); } unixODBC-2.2.14-p2/cur/SQLAllocStmt.c0100644000076400007640000000606507566504154015437 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLAllocStmt.c,v 1.2 2002/11/19 18:52:28 lurcher Exp $ * * $Log: SQLAllocStmt.c,v $ * Revision 1.2 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/11/20 20:54:00 ngorham * * Asorted portability fixes * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLAllocStmt( SQLHDBC connection_handle, SQLHSTMT *statement_handle, SQLHANDLE dm_handle ) { CLHDBC cl_connection = (CLHDBC) connection_handle; CLHSTMT cl_statement; DMHDBC connection = cl_connection -> dm_connection; SQLRETURN ret; /* * allocate a cursor lib statement */ cl_statement = malloc( sizeof( *cl_statement )); if ( !cl_statement ) { cl_connection -> dh.dm_log_write( "CL " __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); cl_statement -> cl_connection -> dh.__post_internal_error( &connection -> error, ERROR_HY001, NULL, connection -> environment -> requested_version ); return SQL_ERROR; } memset( cl_statement, 0, sizeof( *cl_statement )); cl_statement -> cl_connection = cl_connection; cl_statement -> dm_statement = ( DMHSTMT ) dm_handle; ret = SQLALLOCSTMT( cl_connection, cl_connection -> driver_dbc, &cl_statement -> driver_stmt, NULL ); if ( SQL_SUCCEEDED( ret )) { *statement_handle = ( SQLHSTMT ) cl_statement; } else { free( cl_statement ); } return ret; } unixODBC-2.2.14-p2/cur/SQLBindCol.c0100644000076400007640000002004710716336431015033 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLBindCol.c,v 1.5 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLBindCol.c,v $ * Revision 1.5 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.4 2005/10/21 16:49:53 lurcher * Fix a problem with the cursor lib and rowsets * * Revision 1.3 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.2 2001/12/13 13:00:33 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.2 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/10/03 23:05:17 ngorham * * First public outing of the cursor lib * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" /* * release all the bound columns */ int free_bound_columns( CLHSTMT cl_statement ) { CLBCOL *bcol; bcol = cl_statement -> bound_columns; while( bcol ) { CLBCOL *next; if ( bcol -> local_buffer ); { free( bcol -> local_buffer ); } next = bcol -> next; free( bcol ); bcol = next; } cl_statement -> bound_columns = NULL; return 0; } static int get_bound_length( int target_type, int len ) { switch( target_type ) { case SQL_C_STINYINT: case SQL_C_UTINYINT: case SQL_C_TINYINT: return 1; case SQL_C_SBIGINT: case SQL_C_UBIGINT: return 8; case SQL_C_SSHORT: case SQL_C_USHORT: case SQL_C_SHORT: return 2; case SQL_C_SLONG: case SQL_C_ULONG: case SQL_C_LONG: return 4; case SQL_C_DOUBLE: return 8; case SQL_C_FLOAT: return 4; case SQL_C_NUMERIC: return sizeof( SQL_NUMERIC_STRUCT ); case SQL_C_TYPE_DATE: case SQL_C_DATE: return sizeof( SQL_DATE_STRUCT ); case SQL_C_TYPE_TIME: case SQL_C_TIME: return sizeof( SQL_TIME_STRUCT ); case SQL_C_TYPE_TIMESTAMP: case SQL_C_TIMESTAMP: return sizeof( SQL_TIMESTAMP_STRUCT ); case SQL_C_INTERVAL_YEAR: case SQL_C_INTERVAL_MONTH: case SQL_C_INTERVAL_DAY: case SQL_C_INTERVAL_HOUR: case SQL_C_INTERVAL_MINUTE: case SQL_C_INTERVAL_SECOND: case SQL_C_INTERVAL_YEAR_TO_MONTH: case SQL_C_INTERVAL_DAY_TO_HOUR: case SQL_C_INTERVAL_DAY_TO_MINUTE: case SQL_C_INTERVAL_DAY_TO_SECOND: case SQL_C_INTERVAL_HOUR_TO_MINUTE: case SQL_C_INTERVAL_HOUR_TO_SECOND: case SQL_C_INTERVAL_MINUTE_TO_SECOND: return sizeof( SQL_INTERVAL_STRUCT ); default: return len; } } SQLRETURN CLBindCol( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLSMALLINT target_type, SQLPOINTER target_value, SQLLEN buffer_length, SQLLEN *strlen_or_ind ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; CLBCOL *bcol; int b_len; SQLRETURN ret; /* * check in the list of bound columns for a entry */ bcol = cl_statement -> bound_columns; while ( bcol ) { if ( bcol -> column_number == column_number ) break; bcol = bcol -> next; } if ( !bcol ) { /* * do we want to bind anything */ bcol = malloc( sizeof( CLBCOL )); if ( !bcol ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_HY001, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } memset( bcol, 0, sizeof( CLBCOL )); bcol -> column_number = column_number; /* * insert into to list */ if ( cl_statement -> bound_columns ) { CLBCOL *ptr, *prev; ptr = cl_statement -> bound_columns; prev = NULL; while( ptr && ptr -> column_number < column_number ) { prev = ptr; ptr = ptr -> next; } if ( prev ) { bcol -> next = ptr; prev -> next = bcol; } else { bcol -> next = cl_statement -> bound_columns; cl_statement -> bound_columns = bcol; } } else { bcol -> next = NULL; cl_statement -> bound_columns = bcol; } } /* * setup bound info */ /* * find length */ b_len = get_bound_length( target_type, buffer_length ); if ( bcol -> local_buffer ) { free( bcol -> local_buffer ); } bcol -> local_buffer = NULL; if ( target_value && b_len > 0 ) { bcol -> local_buffer = malloc( b_len ); if ( !bcol -> local_buffer ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_HY001, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } } bcol -> bound_buffer = target_value; bcol -> bound_length = b_len; bcol -> bound_type = target_type; if ( strlen_or_ind ) { bcol -> bound_ind = strlen_or_ind; } else { bcol -> bound_ind = NULL; } /* * call the driver to bind a column, but not bookmarks */ if ( column_number > 0 ) { ret = SQLBINDCOL( cl_statement -> cl_connection, cl_statement -> driver_stmt, column_number, target_type, bcol -> local_buffer, bcol -> bound_length, &bcol -> len_ind ); } else { ret = SQL_SUCCESS; } /* * are we unbinding ? */ if ( !target_value && !strlen_or_ind ) { CLBCOL *ptr, *prev; /* * remove from the list */ ptr = cl_statement -> bound_columns; prev = NULL; while( ptr && ptr != bcol ) { prev = ptr; ptr = ptr -> next; } if ( prev ) { prev -> next = bcol -> next; } else { cl_statement -> bound_columns = bcol -> next; } free( bcol ); } return ret; } unixODBC-2.2.14-p2/cur/SQLBindParam.c0100644000076400007640000000434510716336431015361 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLBindParam.c,v 1.2 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLBindParam.c,v $ * Revision 1.2 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLBindParam( SQLHSTMT statement_handle, SQLUSMALLINT parameter_number, SQLSMALLINT value_type, SQLSMALLINT parameter_type, SQLULEN length_precision, SQLSMALLINT parameter_scale, SQLPOINTER parameter_value, SQLLEN *strlen_or_ind ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLBINDPARAM( cl_statement -> cl_connection, cl_statement -> driver_stmt, parameter_number, value_type, parameter_type, length_precision, parameter_scale, parameter_value, strlen_or_ind ); } unixODBC-2.2.14-p2/cur/SQLBindParameter.c0100644000076400007640000000447710716336431016247 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLBindParameter.c,v 1.2 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLBindParameter.c,v $ * Revision 1.2 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLBindParameter( SQLHSTMT statement_handle, SQLUSMALLINT ipar, SQLSMALLINT f_param_type, SQLSMALLINT f_c_type, SQLSMALLINT f_sql_type, SQLULEN cb_col_def, SQLSMALLINT ib_scale, SQLPOINTER rgb_value, SQLLEN cb_value_max, SQLLEN *pcb_value ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLBINDPARAMETER( cl_statement -> cl_connection, cl_statement -> driver_stmt, ipar, f_param_type, f_c_type, f_sql_type, cb_col_def, ib_scale, rgb_value, cb_value_max, pcb_value ); } unixODBC-2.2.14-p2/cur/SQLCancel.c0100644000076400007640000000330407363332157014710 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLCancel.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLCancel.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLCancel( SQLHSTMT statement_handle ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLCANCEL( cl_statement -> cl_connection, cl_statement -> driver_stmt ); } unixODBC-2.2.14-p2/cur/SQLCloseCursor.c0100644000076400007640000000344307363332157015772 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLCloseCursor.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLCloseCursor.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLCloseCursor( SQLHSTMT statement_handle ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; /* * free up any rowset */ free_rowset( cl_statement ); return SQLCLOSECURSOR( cl_statement -> cl_connection, cl_statement -> driver_stmt ); } unixODBC-2.2.14-p2/cur/SQLColAttribute.c0100644000076400007640000001352710716336431016127 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColAttribute.c,v 1.4 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLColAttribute.c,v $ * Revision 1.4 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.3 2004/06/21 10:01:14 lurcher * * Fix a couple of 64 bit issues * * Revision 1.2 2003/12/01 16:37:17 lurcher * * Fix a bug in SQLWritePrivateProfileString * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLColAttribute ( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLUSMALLINT field_identifier, SQLPOINTER character_attribute, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLLEN *numeric_attribute ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; /* * Catch any requests for bookmark info */ if ( field_identifier != SQL_DESC_COUNT && field_identifier != SQL_COLUMN_COUNT ) { if ( column_number == 0 ) { if ( cl_statement -> use_bookmarks ) { SQLLEN ival; switch( field_identifier ) { case SQL_DESC_AUTO_UNIQUE_VALUE: case SQL_DESC_CASE_SENSITIVE: case SQL_DESC_NULLABLE: case SQL_DESC_UPDATABLE: case SQL_COLUMN_NULLABLE: case SQL_DESC_UNSIGNED: ival = SQL_FALSE; break; case SQL_DESC_CONCISE_TYPE: ival = SQL_C_SLONG; break; case SQL_DESC_DISPLAY_SIZE: ival = 4; break; case SQL_DESC_FIXED_PREC_SCALE: case SQL_DESC_SEARCHABLE: ival = SQL_TRUE; break; case SQL_DESC_NUM_PREC_RADIX: ival = 0; break; case SQL_DESC_LENGTH: case SQL_COLUMN_LENGTH: case SQL_DESC_OCTET_LENGTH: ival = 4; break; case SQL_DESC_PRECISION: case SQL_DESC_SCALE: case SQL_COLUMN_PRECISION: case SQL_COLUMN_SCALE: ival = 0; break; case SQL_DESC_BASE_COLUMN_NAME: case SQL_DESC_BASE_TABLE_NAME: case SQL_DESC_CATALOG_NAME: case SQL_DESC_LABEL: case SQL_DESC_LITERAL_PREFIX: case SQL_DESC_LITERAL_SUFFIX: case SQL_DESC_LOCAL_TYPE_NAME: case SQL_DESC_NAME: case SQL_DESC_SCHEMA_NAME: case SQL_DESC_TABLE_NAME: case SQL_DESC_TYPE_NAME: case SQL_COLUMN_NAME: if ( string_length ) { *string_length = 0; } if ( character_attribute ) { *((SQLCHAR*)character_attribute) = '\0'; } return SQL_SUCCESS; default: return SQLCOLATTRIBUTE( cl_statement -> cl_connection, cl_statement -> driver_stmt, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } if ( numeric_attribute ) { *((SQLLEN*)numeric_attribute) = ival; } return SQL_SUCCESS; } else { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_07009, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } } } return SQLCOLATTRIBUTE( cl_statement -> cl_connection, cl_statement -> driver_stmt, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } unixODBC-2.2.14-p2/cur/SQLColAttributes.c0100644000076400007640000000431210716336431016302 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColAttributes.c,v 1.2 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLColAttributes.c,v $ * Revision 1.2 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLColAttributes( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLUSMALLINT field_identifier, SQLPOINTER character_attribute, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLLEN *numeric_attribute ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLCOLATTRIBUTES( cl_statement -> cl_connection, cl_statement -> driver_stmt, column_number, field_identifier, character_attribute, buffer_length, string_length, numeric_attribute ); } unixODBC-2.2.14-p2/cur/SQLColumnPrivileges.c0100644000076400007640000000551007363332157017013 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColumnPrivileges.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLColumnPrivileges.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/09/23 21:46:37 ngorham * * Added cursor support for metadata functions * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLColumnPrivileges( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *column_name, SQLSMALLINT name_length4 ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLCOLUMNPRIVILEGES( cl_statement -> cl_connection, cl_statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, column_name, name_length4 ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; cl_statement -> not_from_select = 1; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLColumns.c0100644000076400007640000000536407363332157015153 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLColumns.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLColumns.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/09/23 21:46:37 ngorham * * Added cursor support for metadata functions * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLColumns( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *column_name, SQLSMALLINT name_length4 ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLCOLUMNS( cl_statement -> cl_connection, cl_statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, column_name, name_length4 ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; cl_statement -> not_from_select = 1; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLConnect.c0100644000076400007640000004316310564052117015113 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLConnect.c,v 1.6 2007/02/12 11:49:35 lurcher Exp $ * * $Log: SQLConnect.c,v $ * Revision 1.6 2007/02/12 11:49:35 lurcher * Add QT4 support to existing GUI parts * * Revision 1.5 2005/07/08 12:11:23 lurcher * * Fix a cursor lib problem (it was broken if you did metadata calls) * Alter the params to SQLParamOptions to use SQLULEN * * Revision 1.4 2005/05/03 17:16:49 lurcher * Backport a couple of changes from the Debian build * * Revision 1.3 2002/11/25 15:37:54 lurcher * * Fix problems in the cursor lib * * Revision 1.2 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.3 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.2 2001/03/28 14:57:22 nick * * Fix bugs in corsor lib introduced bu UNCODE and other changes * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.3 1999/11/20 20:54:00 ngorham * * Asorted portability fixes * * Revision 1.2 1999/11/10 03:51:35 ngorham * * Update the error reporting in the DM to enable ODBC 3 and 2 calls to * work at the same time * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" static struct driver_func cl_template_func[] = { /* 00 */ { SQL_API_SQLALLOCCONNECT, "SQLAllocConnect", NULL, NULL, NULL }, /* 01 */ { SQL_API_SQLALLOCENV, "SQLAllocEnv", NULL, NULL, NULL }, /* 02 */ { SQL_API_SQLALLOCHANDLE, "SQLAllocHandle", NULL, NULL, (SQLRETURN (*)())CLAllocHandle }, /* 03 */ { SQL_API_SQLALLOCSTMT, "SQLAllocStmt", NULL, NULL, (SQLRETURN (*)())CLAllocStmt }, /* 04 */ { SQL_API_SQLALLOCHANDLESTD, "SQLAllocHandleStd", NULL, NULL, (SQLRETURN (*)())CLAllocHandleStd }, /* 05 */ { SQL_API_SQLBINDCOL, "SQLBindCol", NULL, NULL, (SQLRETURN (*)())CLBindCol }, /* 06 */ { SQL_API_SQLBINDPARAM, "SQLBindParam", NULL, NULL, (SQLRETURN (*)())CLBindParam }, /* 07 */ { SQL_API_SQLBINDPARAMETER, "SQLBindParameter", NULL, NULL, (SQLRETURN (*)())CLBindParameter }, /* 08 */ { SQL_API_SQLBROWSECONNECT, "SQLBrowseConnect", NULL, NULL, NULL }, /* 09 */ { SQL_API_SQLBULKOPERATIONS, "SQLBulkOperations", NULL, NULL, NULL }, /* 10 */ { SQL_API_SQLCANCEL, "SQLCancel", NULL, NULL, (SQLRETURN (*)())CLCancel }, /* 11 */ { SQL_API_SQLCLOSECURSOR, "SQLCloseCursor", NULL, NULL, (SQLRETURN (*)())CLCloseCursor }, /* 12 */ { SQL_API_SQLCOLATTRIBUTE, "SQLColAttribute", NULL, NULL, (SQLRETURN (*)())CLColAttribute }, /* 13 */ { SQL_API_SQLCOLATTRIBUTES, "SQLColAttributes", NULL, NULL, (SQLRETURN (*)())CLColAttributes }, /* 14 */ { SQL_API_SQLCOLUMNPRIVILEGES, "SQLColumnPrivileges", NULL, NULL, (SQLRETURN (*)())CLColumnPrivileges }, /* 15 */ { SQL_API_SQLCOLUMNS, "SQLColumns", NULL, NULL, (SQLRETURN (*)())CLColumns }, /* 16 */ { SQL_API_SQLCONNECT, "SQLConnect", NULL, NULL, NULL }, /* 17 */ { SQL_API_SQLCOPYDESC, "SQLCopyDesc", NULL, NULL, (SQLRETURN (*)())CLCopyDesc }, /* 18 */ { SQL_API_SQLDATASOURCES, "SQLDataSources", NULL, NULL, NULL }, /* 19 */ { SQL_API_SQLDESCRIBECOL, "SQLDescribeCol", NULL, NULL, (SQLRETURN (*)())CLDescribeCol }, /* 20 */ { SQL_API_SQLDESCRIBEPARAM, "SQLDescribeParam", NULL, NULL, (SQLRETURN (*)())CLDescribeParam }, /* 21 */ { SQL_API_SQLDISCONNECT, "SQLDisconnect", NULL, NULL, (SQLRETURN (*)())CLDisconnect }, /* 22 */ { SQL_API_SQLDRIVERCONNECT, "SQLDriverConnect", NULL, NULL, NULL }, /* 23 */ { SQL_API_SQLDRIVERS, "SQLDrivers", NULL, NULL, NULL }, /* 24 */ { SQL_API_SQLENDTRAN, "SQLEndTran", NULL, NULL, (SQLRETURN (*)())CLEndTran }, /* 25 */ { SQL_API_SQLERROR, "SQLError", NULL, NULL, (SQLRETURN (*)())CLError }, /* 26 */ { SQL_API_SQLEXECDIRECT, "SQLExecDirect", NULL, NULL, (SQLRETURN (*)())CLExecDirect }, /* 27 */ { SQL_API_SQLEXECUTE, "SQLExecute", NULL, NULL, (SQLRETURN (*)())CLExecute }, /* 28 */ { SQL_API_SQLEXTENDEDFETCH, "SQLExtendedFetch", NULL, NULL, (SQLRETURN (*)())CLExtendedFetch }, /* 29 */ { SQL_API_SQLFETCH, "SQLFetch", NULL, NULL, (SQLRETURN (*)())CLFetch }, /* 30 */ { SQL_API_SQLFETCHSCROLL, "SQLFetchScroll", NULL, NULL, (SQLRETURN (*)())CLFetchScroll }, /* 31 */ { SQL_API_SQLFOREIGNKEYS, "SQLForeignKeys", NULL, NULL, (SQLRETURN (*)())CLForeignKeys }, /* 32 */ { SQL_API_SQLFREEENV, "SQLFreeEnv", NULL, NULL, NULL }, /* 33 */ { SQL_API_SQLFREEHANDLE, "SQLFreeHandle", NULL, NULL, (SQLRETURN (*)())CLFreeHandle }, /* 34 */ { SQL_API_SQLFREESTMT, "SQLFreeStmt", NULL, NULL, (SQLRETURN (*)())CLFreeStmt }, /* 35 */ { SQL_API_SQLFREECONNECT, "SQLFreeConnect", NULL, NULL, NULL }, /* 36 */ { SQL_API_SQLGETCONNECTATTR, "SQLGetConnectAttr", NULL, NULL, (SQLRETURN (*)())CLGetConnectAttr }, /* 37 */ { SQL_API_SQLGETCONNECTOPTION, "SQLGetConnectOption", NULL, NULL, (SQLRETURN (*)())CLGetConnectOption }, /* 38 */ { SQL_API_SQLGETCURSORNAME, "SQLGetCursorName", NULL, NULL, (SQLRETURN (*)())CLGetCursorName }, /* 39 */ { SQL_API_SQLGETDATA, "SQLGetData", NULL, NULL, (SQLRETURN (*)())CLGetData }, /* 40 */ { SQL_API_SQLGETDESCFIELD, "SQLGetDescField", NULL, NULL, (SQLRETURN (*)())CLGetDescField }, /* 41 */ { SQL_API_SQLGETDESCREC, "SQLGetDescRec", NULL, NULL, (SQLRETURN (*)())CLGetDescRec }, /* 42 */ { SQL_API_SQLGETDIAGFIELD, "SQLGetDiagField", NULL, NULL, (SQLRETURN (*)())CLGetDiagField }, /* 43 */ { SQL_API_SQLGETENVATTR, "SQLGetEnvAttr", NULL, NULL, NULL }, /* 44 */ { SQL_API_SQLGETFUNCTIONS, "SQLGetFunctions", NULL, NULL, NULL }, /* 45 */ { SQL_API_SQLGETINFO, "SQLGetInfo", NULL, NULL, (SQLRETURN (*)())CLGetInfo }, /* 46 */ { SQL_API_SQLGETSTMTATTR, "SQLGetStmtAttr", NULL, NULL, (SQLRETURN (*)())CLGetStmtAttr }, /* 47 */ { SQL_API_SQLGETSTMTOPTION, "SQLGetStmtOption", NULL, NULL, (SQLRETURN (*)())CLGetStmtOption }, /* 48 */ { SQL_API_SQLGETTYPEINFO, "SQLGetTypeInfo", NULL, NULL, (SQLRETURN (*)())CLGetTypeInfo }, /* 49 */ { SQL_API_SQLMORERESULTS, "SQLMoreResults", NULL, NULL, (SQLRETURN (*)())CLMoreResults }, /* 50 */ { SQL_API_SQLNATIVESQL, "SQLNativeSql", NULL, NULL, (SQLRETURN (*)())CLNativeSql }, /* 51 */ { SQL_API_SQLNUMPARAMS, "SQLNumParams", NULL, NULL, (SQLRETURN (*)())CLNumParams }, /* 52 */ { SQL_API_SQLNUMRESULTCOLS, "SQLNumResultCols", NULL, NULL, (SQLRETURN (*)())CLNumResultCols }, /* 53 */ { SQL_API_SQLPARAMDATA, "SQLParamData", NULL, NULL, (SQLRETURN (*)())CLParamData }, /* 54 */ { SQL_API_SQLPARAMOPTIONS, "SQLParamOptions", NULL, NULL, (SQLRETURN (*)())CLParamOptions }, /* 55 */ { SQL_API_SQLPREPARE, "SQLPrepare", NULL, NULL, (SQLRETURN (*)())CLPrepare }, /* 56 */ { SQL_API_SQLPRIMARYKEYS, "SQLPrimaryKeys", NULL, NULL, (SQLRETURN (*)())CLPrimaryKeys }, /* 57 */ { SQL_API_SQLPROCEDURECOLUMNS, "SQLProcedureColumns", NULL, NULL, (SQLRETURN (*)())CLProcedureColumns }, /* 58 */ { SQL_API_SQLPROCEDURES, "SQLProcedures", NULL, NULL, (SQLRETURN (*)())CLProcedures }, /* 59 */ { SQL_API_SQLPUTDATA, "SQLPutData", NULL, NULL, (SQLRETURN (*)())CLPutData }, /* 60 */ { SQL_API_SQLROWCOUNT, "SQLRowCount", NULL, NULL, (SQLRETURN (*)())CLRowCount }, /* 61 */ { SQL_API_SQLSETCONNECTATTR, "SQLSetConnectAttr", NULL, NULL, (SQLRETURN (*)())CLSetConnectAttr }, /* 62 */ { SQL_API_SQLSETCONNECTOPTION, "SQLSetConnectOption", NULL, NULL, (SQLRETURN (*)())CLSetConnectOption }, /* 63 */ { SQL_API_SQLSETCURSORNAME, "SQLSetCursorName", NULL, NULL, (SQLRETURN (*)())CLSetCursorName }, /* 64 */ { SQL_API_SQLSETDESCFIELD, "SQLSetDescField", NULL, NULL, (SQLRETURN (*)())CLSetDescField }, /* 65 */ { SQL_API_SQLSETDESCREC, "SQLSetDescRec", NULL, NULL, (SQLRETURN (*)())CLSetDescRec }, /* 66 */ { SQL_API_SQLSETENVATTR, "SQLSetEnvAttr", NULL, NULL, NULL }, /* 67 */ { SQL_API_SQLSETPARAM, "SQLSetParam", NULL, NULL, (SQLRETURN (*)())CLSetParam }, /* 68 */ { SQL_API_SQLSETPOS, "SQLSetPos", NULL, NULL, (SQLRETURN (*)())CLSetPos }, /* 69 */ { SQL_API_SQLSETSCROLLOPTIONS, "SQLSetScrollOptions", NULL, NULL, (SQLRETURN (*)())CLSetScrollOptions }, /* 70 */ { SQL_API_SQLSETSTMTATTR, "SQLSetStmtAttr", NULL, NULL, (SQLRETURN (*)())CLSetStmtAttr }, /* 71 */ { SQL_API_SQLSETSTMTOPTION, "SQLSetStmtOption", NULL, NULL, (SQLRETURN (*)())CLSetStmtOption }, /* 72 */ { SQL_API_SQLSPECIALCOLUMNS, "SQLSpecialColumns", NULL, NULL, (SQLRETURN (*)())CLSpecialColumns }, /* 73 */ { SQL_API_SQLSTATISTICS, "SQLStatistics", NULL, NULL, (SQLRETURN (*)())CLStatistics }, /* 74 */ { SQL_API_SQLTABLEPRIVILEGES, "SQLTablePrivileges", NULL, NULL, (SQLRETURN (*)())CLTablePrivileges }, /* 75 */ { SQL_API_SQLTABLES, "SQLTables", NULL, NULL, (SQLRETURN (*)())CLTables }, /* 76 */ { SQL_API_SQLTRANSACT, "SQLTransact", NULL, NULL, (SQLRETURN (*)())CLTransact }, /* 77 */ { SQL_API_SQLGETDIAGREC, "SQLGetDiagRec", NULL, NULL, (SQLRETURN (*)())CLGetDiagRec }, }; /* * connect is done by the driver manager, the is called to put the * cursor lib in the call chain */ SQLRETURN CLConnect( DMHDBC connection, struct driver_helper_funcs *dh ) { int i; CLHDBC cl_connection; SQLRETURN ret; /* * Allocated a cursor connection structure */ cl_connection = malloc( sizeof( struct cl_connection )); if ( !cl_connection ) { dh ->dm_log_write( "CL " __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); dh ->__post_internal_error( &connection -> error, ERROR_HY001, NULL, connection -> environment -> requested_version ); return SQL_ERROR; } memset( cl_connection, 0, sizeof( struct cl_connection )); cl_connection -> functions = connection -> functions; cl_connection -> dm_connection = connection; cl_connection -> dh.__post_internal_error_ex = dh -> __post_internal_error_ex; cl_connection -> dh.__post_internal_error = dh -> __post_internal_error; cl_connection -> dh.dm_log_write = dh -> dm_log_write; /* * allocated a copy of the functions */ if ( !( cl_connection -> functions = malloc( sizeof( cl_template_func )))) { dh ->dm_log_write( "CL " __FILE__, __LINE__, LOG_INFO, LOG_INFO, "Error: IM001" ); cl_connection -> dh.__post_internal_error( &connection -> error, ERROR_HY001, NULL, connection -> environment -> requested_version ); return SQL_ERROR; } /* * replace the function pointers with the ones in the * cursor lib */ for ( i = 0; i < sizeof( cl_template_func ) / sizeof( cl_template_func[ 0 ] ); i ++ ) { cl_connection -> functions[ i ] = connection -> functions[ i ]; /* * if set replace the driver function with the function in * the template */ if ( cl_template_func[ i ].func && connection -> functions[ i ].func ) { connection -> functions[ i ] = cl_template_func[ i ]; /* * copy the can_supply from the drivers list */ connection -> functions[ i ].can_supply = cl_connection -> functions[ i ].can_supply; } } /* * add some functions the cursor lib will supply */ connection -> functions[ DM_SQLSETPOS ].can_supply = 1; connection -> functions[ DM_SQLSETPOS ].func = cl_template_func[ DM_SQLSETPOS ].func; connection -> functions[ DM_SQLSETSCROLLOPTIONS ].can_supply = 1; connection -> functions[ DM_SQLSETSCROLLOPTIONS ].func = cl_template_func[ DM_SQLSETSCROLLOPTIONS ].func; connection -> functions[ DM_SQLFETCHSCROLL ].can_supply = 1; connection -> functions[ DM_SQLFETCHSCROLL ].func = cl_template_func[ DM_SQLFETCHSCROLL ].func; connection -> functions[ DM_SQLEXTENDEDFETCH ].can_supply = 1; connection -> functions[ DM_SQLEXTENDEDFETCH ].func = cl_template_func[ DM_SQLEXTENDEDFETCH ].func; /* * blank off what we don't do */ connection -> functions[ DM_SQLBULKOPERATIONS ].can_supply = 0; connection -> functions[ DM_SQLBULKOPERATIONS ].func = NULL; /* * intercept the driver dbc */ cl_connection -> driver_dbc = connection -> driver_dbc; connection -> driver_dbc = ( DRV_SQLHANDLE ) cl_connection; /* * check the number of alowed active statements */ if ( CHECK_SQLGETINFO( cl_connection )) { ret = SQLGETINFO( cl_connection, cl_connection -> driver_dbc, SQL_MAX_CONCURRENT_ACTIVITIES, &cl_connection -> active_statement_allowed, sizeof( cl_connection -> active_statement_allowed ), NULL ); /* * assume the worst */ if ( !SQL_SUCCEEDED( ret )) { cl_connection -> active_statement_allowed = 1; } } else { cl_connection -> active_statement_allowed = 1; } return SQL_SUCCESS; } SQLRETURN CLDisconnect( SQLHDBC connection_handle ) { SQLRETURN ret; int i; CLHDBC cl_connection = (CLHDBC)connection_handle; DMHDBC connection = cl_connection -> dm_connection; /* * disconnect from the driver */ ret = SQLDISCONNECT( cl_connection, cl_connection -> driver_dbc ); if ( SQL_SUCCEEDED( ret )) { /* * replace the function pointers with the ones from the * cursor lib */ for ( i = 0; i < sizeof( cl_template_func ) / sizeof( cl_template_func[ 0 ] ); i ++ ) { connection -> functions[ i ] = cl_connection -> functions[ i ]; } /* * replace the driver dbc */ connection -> driver_dbc = cl_connection -> driver_dbc; } return ret; } unixODBC-2.2.14-p2/cur/SQLCopyDesc.c0100644000076400007640000000321507363332157015235 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLCopyDesc.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLCopyDesc.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLCopyDesc( SQLHDESC source_desc_handle, SQLHDESC target_desc_handle ) { /* * todo */ return SQL_ERROR; } unixODBC-2.2.14-p2/cur/SQLDescribeCol.c0100644000076400007640000000440710716336431015701 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDescribeCol.c,v 1.2 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLDescribeCol.c,v $ * Revision 1.2 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLDescribeCol( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLCHAR *column_name, SQLSMALLINT buffer_length, SQLSMALLINT *name_length, SQLSMALLINT *data_type, SQLULEN *column_size, SQLSMALLINT *decimal_digits, SQLSMALLINT *nullable ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLDESCRIBECOL( cl_statement -> cl_connection, cl_statement -> driver_stmt, column_number, column_name, buffer_length, name_length, data_type, column_size, decimal_digits, nullable ); } unixODBC-2.2.14-p2/cur/SQLDescribeParam.c0100644000076400007640000000414210716336431016220 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLDescribeParam.c,v 1.2 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLDescribeParam.c,v $ * Revision 1.2 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLDescribeParam( SQLHSTMT statement_handle, SQLUSMALLINT ipar, SQLSMALLINT *pf_sql_type, SQLULEN *pcb_param_def, SQLSMALLINT *pib_scale, SQLSMALLINT *pf_nullable ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLDESCRIBEPARAM( cl_statement -> cl_connection, cl_statement -> driver_stmt, ipar, pf_sql_type, pcb_param_def, pib_scale, pf_nullable ); } unixODBC-2.2.14-p2/cur/SQLEndTran.c0100644000076400007640000000407507363332157015064 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLEndTran.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLEndTran.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLEndTran( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT completion_type ) { switch ( handle_type ) { case SQL_HANDLE_ENV: /* * the driver manager will not call this */ break; case SQL_HANDLE_DBC: { CLHDBC cl_connection = (CLHDBC) handle; return SQLENDTRAN( cl_connection, SQL_HANDLE_DBC, cl_connection -> driver_dbc, completion_type ); } break; default: return SQL_ERROR; } } unixODBC-2.2.14-p2/cur/SQLError.c0100644000076400007640000001066210736724551014622 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLError.c,v 1.3 2008/01/02 15:10:33 lurcher Exp $ * * $Log: SQLError.c,v $ * Revision 1.3 2008/01/02 15:10:33 lurcher * Fix problems trying to use the cursor lib on a non select statement * * Revision 1.2 2005/09/05 09:49:48 lurcher * New QT detection macros added * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.2 2001/03/28 14:57:22 nick * * Fix bugs in corsor lib introduced bu UNCODE and other changes * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLError( SQLHENV environment_handle, SQLHDBC connection_handle, SQLHSTMT statement_handle, SQLCHAR *sqlstate, SQLINTEGER *native_error, SQLCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length ) { if ( statement_handle ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; if ( cl_statement -> driver_stmt_closed ) { return SQL_NO_DATA; } if ( CHECK_SQLERROR( cl_statement -> cl_connection )) { return SQLERROR( cl_statement -> cl_connection, SQL_NULL_HENV, SQL_NULL_HDBC, cl_statement -> driver_stmt, sqlstate, native_error, message_text, buffer_length, text_length ); } else { SQLRETURN ret; ret = SQLGETDIAGREC( cl_statement -> cl_connection, SQL_HANDLE_STMT, cl_statement -> driver_stmt, cl_statement -> error_count, sqlstate, native_error, message_text, buffer_length, text_length ); if ( SQL_SUCCEEDED( ret )) { cl_statement -> error_count ++; } else { cl_statement -> error_count = 0; } return ret; } } else if ( connection_handle ) { CLHDBC cl_connection = (CLHDBC) connection_handle; if ( CHECK_SQLERROR( cl_connection )) { return SQLERROR( cl_connection, SQL_NULL_HENV, cl_connection -> driver_dbc, SQL_NULL_HSTMT, sqlstate, native_error, message_text, buffer_length, text_length ); } else { SQLRETURN ret; ret = SQLGETDIAGREC( cl_connection, SQL_HANDLE_DBC, cl_connection -> driver_dbc, cl_connection -> error_count, sqlstate, native_error, message_text, buffer_length, text_length ); if ( SQL_SUCCEEDED( ret )) { cl_connection -> error_count ++; } else { cl_connection -> error_count = 0; } return ret; } } else if ( environment_handle ) { /* * shouldn't get here */ return SQL_NO_DATA; } } unixODBC-2.2.14-p2/cur/SQLExecDirect.c0100644000076400007640000002053511103610120015517 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLExecDirect.c,v 1.5 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLExecDirect.c,v $ * Revision 1.5 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.4 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.3 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.2 2001/12/13 13:00:33 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" /* * free the rowset info */ void free_rowset( CLHSTMT cl_statement ) { if ( cl_statement -> rowset_buffer ) { free( cl_statement -> rowset_buffer ); cl_statement -> rowset_buffer = NULL; } if ( cl_statement -> rowset_file ) { fclose( cl_statement -> rowset_file ); cl_statement -> rowset_file = NULL; } if ( cl_statement -> sql_text ) { free( cl_statement -> sql_text ); cl_statement -> sql_text = NULL; } if ( cl_statement -> column_names ) { int i; for ( i = 0; i < cl_statement -> column_count; i ++ ) { free( cl_statement -> column_names[ i ] ); } free( cl_statement -> column_names ); cl_statement -> column_names = NULL; } if ( cl_statement -> data_type ) { free( cl_statement -> data_type ); cl_statement -> data_type = NULL; } if ( cl_statement -> column_size ) { free( cl_statement -> column_size ); cl_statement -> column_size = NULL; } if ( cl_statement -> decimal_digits ) { free( cl_statement -> decimal_digits ); cl_statement -> decimal_digits = NULL; } } /* * run through the bound columns, calculating the offsets */ int calculate_buffers( CLHSTMT cl_statement, int column_count ) { CLBCOL *bcol; cl_statement -> rowset_position = CL_BEFORE_START; cl_statement -> rowset_count = 0; cl_statement -> rowset_complete = 0; cl_statement -> column_count = column_count; /* * row status value */ cl_statement -> buffer_length = sizeof( SQLUSMALLINT ); bcol = cl_statement -> bound_columns; while ( bcol ) { if ( bcol -> column_number <= column_count ) { bcol -> rs_buffer_offset = cl_statement -> buffer_length; cl_statement -> buffer_length += bcol -> bound_length; bcol -> rs_ind_offset = cl_statement -> buffer_length; cl_statement -> buffer_length += sizeof( SQLULEN ); } bcol = bcol -> next; } /* * allocate buffer */ cl_statement -> rowset_buffer = malloc( cl_statement -> buffer_length ); if ( !cl_statement -> rowset_buffer ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_HY001, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } /* * open temp file */ cl_statement -> rowset_file = tmpfile(); if ( !cl_statement -> rowset_file ) { cl_statement -> cl_connection -> dh.__post_internal_error_ex( &cl_statement -> dm_statement -> error, (SQLCHAR*)"S1000", 0, (SQLCHAR*)"General Error, Unable to create file buffer", SUBCLASS_ODBC, SUBCLASS_ODBC ); return SQL_ERROR; } return SQL_SUCCESS; } SQLRETURN get_column_names( CLHSTMT cl_statement ) { int i; char cname[ 256 ]; /* * already done ? */ if ( cl_statement -> column_names ) { return SQL_SUCCESS; } /* * get the names of all the columns */ cl_statement -> column_names = malloc( sizeof(char *) * cl_statement -> column_count ); cl_statement -> data_type = malloc( sizeof( SQLSMALLINT ) * cl_statement -> column_count ); cl_statement -> column_size = malloc( sizeof( SQLULEN ) * cl_statement -> column_count ); cl_statement -> decimal_digits = malloc( sizeof( SQLSMALLINT ) * cl_statement -> column_count ); for ( i = 1; i <= cl_statement -> column_count; i ++ ) { SQLRETURN ret; if ( !CHECK_SQLDESCRIBECOL( cl_statement -> cl_connection )) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_01000, "Driver does not support SQLDescribeCol", cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } ret = SQLDESCRIBECOL( cl_statement -> cl_connection, cl_statement -> driver_stmt, i, cname, sizeof( cname ), NULL, &cl_statement -> data_type[ i - 1 ], &cl_statement -> column_size[ i - 1 ], &cl_statement -> decimal_digits[ i - 1 ], NULL ); if ( !SQL_SUCCEEDED( ret )) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_01000, "SQLDescribeCol failed in driver", cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } cl_statement -> column_names[ i - 1 ] = strdup( cname ); } return SQL_SUCCESS; } SQLRETURN CLExecDirect( SQLHSTMT statement_handle, SQLCHAR *statement_text, SQLINTEGER text_length ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; /* * save the statement for later use */ if ( cl_statement -> sql_text ) { free( cl_statement -> sql_text ); } if ( text_length < 0 ) { cl_statement -> sql_text = strdup((char*) statement_text ); } else { cl_statement -> sql_text = malloc( text_length + 1 ); memcpy( cl_statement -> sql_text, statement_text, text_length ); cl_statement -> sql_text[ text_length ] = '\0'; } ret = SQLEXECDIRECT( cl_statement -> cl_connection, cl_statement -> driver_stmt, statement_text, text_length ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLExecute.c0100644000076400007640000000475107363332157015134 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLExecute.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLExecute.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.2 2001/03/28 14:57:22 nick * * Fix bugs in corsor lib introduced bu UNCODE and other changes * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLExecute( SQLHSTMT statement_handle ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLEXECUTE( cl_statement -> cl_connection, cl_statement -> driver_stmt ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; /* * if its a SELECT statement it will generate columns * WARNING a stored procedure could get here as well */ if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } else { /* TODO Do DELETE/UPDATE WHERE CURRENT OF */ } } return ret; } unixODBC-2.2.14-p2/cur/SQLExtendedFetch.c0100644000076400007640000006714410745426472016253 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLExtendedFetch.c,v 1.12 2008/01/22 17:51:54 lurcher Exp $ * * $Log: SQLExtendedFetch.c,v $ * Revision 1.12 2008/01/22 17:51:54 lurcher * Another SQLULEN mismatch * * Revision 1.11 2007/11/29 12:00:36 lurcher * Add 64 bit type changes to SQLExtendedFetch etc * * Revision 1.10 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.9 2005/10/27 17:54:49 lurcher * fix what I suspect is a typo in qt.m4 * * Revision 1.8 2005/10/21 16:49:53 lurcher * Fix a problem with the cursor lib and rowsets * * Revision 1.7 2004/07/24 17:55:38 lurcher * Sync up CVS * * Revision 1.6 2003/12/01 16:37:17 lurcher * * Fix a bug in SQLWritePrivateProfileString * * Revision 1.5 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2002/11/25 15:37:54 lurcher * * Fix problems in the cursor lib * * Revision 1.2 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.2 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.3 1999/11/20 20:54:00 ngorham * * Asorted portability fixes * * Revision 1.2 1999/10/03 23:05:17 ngorham * * First public outing of the cursor lib * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" #define ABS(x) (((x)>=0)?(x):(-(x))) #define SQL_FETCH_PART_ROWSET SQL_NO_DATA + 1 SQLRETURN fetch_row( CLHSTMT cl_statement, int row_number, int offset ) { SQLSMALLINT ret; /* * is the row in the cache ? */ if ( row_number < cl_statement -> rowset_count ) { CLBCOL *cbuf; /* * read the file buffer */ if ( fseek( cl_statement -> rowset_file, cl_statement -> buffer_length * row_number, SEEK_SET )) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1000, "General error: fseek fails", cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } if ( fread( cl_statement -> rowset_buffer, cl_statement -> buffer_length, 1, cl_statement -> rowset_file ) != 1 ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1000, "General error: Unable to read from file buffer", cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } /* * extract the data * * status ptr */ memcpy( &ret, cl_statement -> rowset_buffer, sizeof( SQLUSMALLINT )); /* * columninfo */ cbuf = cl_statement -> bound_columns; while ( cbuf ) { char *buffer = NULL; char *ind_ptr = NULL; /* * copy from the file buffer */ memcpy( cbuf -> local_buffer, cl_statement -> rowset_buffer + cbuf -> rs_buffer_offset, cbuf -> bound_length ); memcpy( &cbuf -> len_ind, cl_statement -> rowset_buffer + cbuf -> rs_ind_offset, sizeof( cbuf -> len_ind )); if ( offset >= 0 ) { /* * copy to the application buffer */ if ( cl_statement -> row_bind_type ) { if ( cbuf -> bound_buffer ) { buffer = ((char*)cbuf -> bound_buffer) + cl_statement -> row_bind_type * offset; } if ( cbuf -> bound_ind ) { ind_ptr = ( char * ) cbuf -> bound_ind; ind_ptr += cl_statement -> row_bind_type * offset; } } else { if ( cbuf -> bound_buffer ) { buffer = ((char*)cbuf -> bound_buffer) + cbuf -> bound_length * offset; } if ( cbuf -> bound_ind ) { ind_ptr = ( char * ) cbuf -> bound_ind; ind_ptr += offset * sizeof( SQLULEN ); } } if ( buffer && cbuf -> len_ind >= 0 ) { if ( cbuf -> bound_type == SQL_C_CHAR ) { strcpy( buffer, cbuf -> local_buffer ); } else { memcpy( buffer, cbuf -> local_buffer, cbuf -> bound_length ); } } if ( ind_ptr ) { memcpy( ind_ptr, &cbuf -> len_ind, sizeof( cbuf -> len_ind )); } } cbuf = cbuf -> next; } return SQL_SUCCESS; } else { if ( cl_statement -> rowset_complete ) { return SQL_NO_DATA; } ret = SQLFETCH( cl_statement -> cl_connection, cl_statement -> driver_stmt ); if ( ret == SQL_NO_DATA ) { /* * at the end */ cl_statement -> rowset_complete = 1; cl_statement -> rowset_position = CL_AFTER_END; } else { CLBCOL *cbuf; /* * insert into the cache */ /* * status ptr */ memcpy( cl_statement -> rowset_buffer, &ret, sizeof( SQLUSMALLINT )); /* * columninfo */ cbuf = cl_statement -> bound_columns; while ( cbuf ) { char *buffer = NULL; char *ind_ptr = NULL; /* * copy to the file buffer */ memcpy( cl_statement -> rowset_buffer + cbuf -> rs_buffer_offset, cbuf -> local_buffer, cbuf -> bound_length ); memcpy( cl_statement -> rowset_buffer + cbuf -> rs_ind_offset, &cbuf -> len_ind, sizeof( cbuf -> len_ind )); if ( offset >= 0 ) { /* * copy to the application buffer */ if ( cl_statement -> row_bind_type ) { if ( cbuf -> bound_buffer ) { buffer = ((char*)cbuf -> bound_buffer) + cl_statement -> row_bind_type * offset; } if ( cbuf -> bound_ind ) { ind_ptr = ( char * ) cbuf -> bound_ind; ind_ptr += cl_statement -> row_bind_type * offset; } } else { if ( cbuf -> bound_buffer ) { buffer = ((char*)cbuf -> bound_buffer) + cbuf -> bound_length * offset; } if ( cbuf -> bound_ind ) { ind_ptr = ( char * ) cbuf -> bound_ind; ind_ptr += offset * sizeof( SQLULEN ); } } /* * Not quite sure if the check is valid, I think I can see where * I got it from, but not sure if its correct * if ( buffer && cbuf -> bound_ind && *cbuf -> bound_ind >= 0 ) */ if ( buffer && cbuf -> bound_ind ) { if ( cbuf -> bound_type == SQL_C_CHAR ) { strcpy( buffer, cbuf -> local_buffer ); } else { memcpy( buffer, cbuf -> local_buffer, cbuf -> bound_length ); } } if ( ind_ptr ) { memcpy( ind_ptr, &cbuf -> len_ind, sizeof( cbuf -> len_ind )); } } cbuf = cbuf -> next; } /* * write the file buffer */ if ( fseek( cl_statement -> rowset_file, cl_statement -> buffer_length * row_number, SEEK_SET )) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1000, "General error: fseek fails", cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } if ( fwrite( cl_statement -> rowset_buffer, cl_statement -> buffer_length, 1, cl_statement -> rowset_file ) != 1 ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1000, "General error: Unable to write to file buffer", cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } cl_statement -> rowset_count ++; } return ret; } } /* * read the rowset until the specied row, or the end if 0 supplied */ SQLRETURN complete_rowset( CLHSTMT cl_statement, int complete_to ) { int row; SQLRETURN ret; if ( complete_to == 0 ) { row = cl_statement -> rowset_count; do { ret = fetch_row( cl_statement, row, -1 ); if ( SQL_SUCCEEDED( ret )) { row ++; } else if ( ret == SQL_NO_DATA ) { cl_statement -> rowset_complete = 1; ret = SQL_SUCCESS; break; } } while ( SQL_SUCCEEDED( ret )); } else { row = cl_statement -> rowset_count; do { ret = fetch_row( cl_statement, row, -1 ); if ( SQL_SUCCEEDED( ret )) { row ++; } else if ( ret == SQL_NO_DATA ) { cl_statement -> rowset_complete = 1; ret = SQL_SUCCESS; break; } } while ( SQL_SUCCEEDED( ret ) && row < complete_to ); } return ret; } /* * rows_in_set is the sizeof the rowset * row_offset is the row number of the first row */ static SQLRETURN fetch_rowset( CLHSTMT cl_statement, int rows_in_set, int row_offset, int *fetched_rows, SQLUSMALLINT *row_status_array, SQLULEN *rows_fetched_ptr ) { SQLRETURN ret; int row_count = 0; int row; for ( row = 0; row < rows_in_set; row ++ ) { ret = fetch_row( cl_statement, row + row_offset, row ); if ( row_status_array ) { row_status_array[ row ] = ret; } if ( SQL_SUCCEEDED( ret )) { row_count ++; } else { break; } ret = SQL_SUCCESS; } if ( ret == SQL_NO_DATA && row > 0 ) { *fetched_rows = row; if ( rows_fetched_ptr ) { *rows_fetched_ptr = row_count; } ret = SQL_FETCH_PART_ROWSET; } if ( SQL_SUCCEEDED( ret )) { *fetched_rows = row; } if ( rows_fetched_ptr ) { *rows_fetched_ptr = row_count; } return ret; } SQLRETURN do_fetch_scroll( CLHSTMT cl_statement, int fetch_orientation, SQLLEN fetch_offset, SQLUSMALLINT *row_status_ptr, SQLULEN *rows_fetched_ptr, int ext_fetch ) { SQLRETURN ret; int rows_in_set, row_offset, fetched_rows, info = 0; cl_statement -> fetch_done = 1; if ( !cl_statement -> first_fetch_done ) { if ( cl_statement -> column_count > 0 && calculate_buffers( cl_statement, cl_statement -> column_count ) == SQL_ERROR ) { /* * tidy up after a failure */ SQLFREESTMT( cl_statement -> cl_connection, cl_statement -> driver_stmt, SQL_CLOSE ); return SQL_ERROR; } cl_statement -> first_fetch_done = 1; } if ( ext_fetch ) { if ( cl_statement -> rowset_size < 1 ) rows_in_set = 1; else rows_in_set = cl_statement -> rowset_size; } else { if ( cl_statement -> rowset_array_size < 1 ) rows_in_set = 1; else rows_in_set = cl_statement -> rowset_array_size; } /* * I refuse to document all these conditions, you have to * look in the book, its just a copy of that */ switch( fetch_orientation ) { case SQL_FETCH_FIRST: cl_statement -> rowset_position = 0; row_offset = 0; cl_statement -> curr_rowset_start = cl_statement -> rowset_position; ret = fetch_rowset( cl_statement, rows_in_set, row_offset, &fetched_rows, row_status_ptr, rows_fetched_ptr ); if ( SQL_SUCCEEDED( ret )) { cl_statement -> curr_rowset_start = cl_statement -> rowset_position; cl_statement -> rowset_position += fetched_rows; } else if ( ret == SQL_FETCH_PART_ROWSET ) { ret = SQL_SUCCESS; } break; case SQL_FETCH_NEXT: if ( cl_statement -> rowset_position == CL_BEFORE_START ) { cl_statement -> rowset_position = 0; row_offset = 0; } else if ( cl_statement -> rowset_position == CL_AFTER_END ) { ret = SQL_NO_DATA; break; } else { row_offset = cl_statement -> rowset_position; } cl_statement -> cursor_pos = 1; ret = fetch_rowset( cl_statement, rows_in_set, row_offset, &fetched_rows, row_status_ptr, rows_fetched_ptr ); if ( SQL_SUCCEEDED( ret )) { cl_statement -> curr_rowset_start = cl_statement -> rowset_position; cl_statement -> rowset_position += fetched_rows; } else if ( ret == SQL_FETCH_PART_ROWSET ) { cl_statement -> rowset_position == CL_AFTER_END; ret = SQL_SUCCESS; } break; case SQL_FETCH_PRIOR: if ( cl_statement -> rowset_position == CL_BEFORE_START ) { ret = SQL_NO_DATA; break; } else if ( cl_statement -> rowset_position == CL_AFTER_END ) { if ( cl_statement -> rowset_count < rows_in_set ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_01S06, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); info = 1; } else { row_offset = cl_statement -> rowset_count - rows_in_set; cl_statement -> rowset_position = row_offset; } } else if ( cl_statement -> rowset_position <= rows_in_set ) { ret = SQL_NO_DATA; cl_statement -> rowset_position = CL_BEFORE_START; break; } else if ( cl_statement -> rowset_position - rows_in_set < rows_in_set ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_01S06, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); ret = SQL_SUCCESS_WITH_INFO; break; } else { row_offset = cl_statement -> rowset_position -= rows_in_set * 2; } cl_statement -> cursor_pos = 1; ret = fetch_rowset( cl_statement, rows_in_set, row_offset, &fetched_rows, row_status_ptr, rows_fetched_ptr ); if ( SQL_SUCCEEDED( ret )) { cl_statement -> curr_rowset_start = cl_statement -> rowset_position; cl_statement -> rowset_position += fetched_rows; } else if ( ret == SQL_FETCH_PART_ROWSET ) { ret = SQL_SUCCESS; } break; case SQL_FETCH_RELATIVE: if (( cl_statement -> rowset_position == CL_BEFORE_START && fetch_offset > 0 ) || ( cl_statement -> rowset_position == CL_AFTER_END && fetch_offset < 0 )) { return do_fetch_scroll( cl_statement, SQL_FETCH_ABSOLUTE, fetch_offset, row_status_ptr, rows_fetched_ptr, ext_fetch ); } else if ( cl_statement -> rowset_position == CL_BEFORE_START && fetch_offset <= 0 ) { ret = SQL_NO_DATA; cl_statement -> rowset_position = CL_BEFORE_START; break; } else if ( cl_statement -> curr_rowset_start == 0 && fetch_offset <= 0 ) { ret = SQL_NO_DATA; cl_statement -> rowset_position = CL_BEFORE_START; break; } else if ( cl_statement -> curr_rowset_start > 0 && cl_statement -> curr_rowset_start + fetch_offset < 1 && ABS( fetch_offset ) > rows_in_set ) { ret = SQL_NO_DATA; cl_statement -> rowset_position = CL_BEFORE_START; break; } else if ( cl_statement -> curr_rowset_start > 0 && cl_statement -> curr_rowset_start + fetch_offset < 1 && ABS( fetch_offset ) > rows_in_set ) { cl_statement -> rowset_position = 0; } else { /* * these conditions requires completing the rowset */ if ( !cl_statement -> rowset_complete ) { ret = complete_rowset( cl_statement, 0 ); if ( !SQL_SUCCEEDED( ret )) break; } if ( 1 <= cl_statement -> curr_rowset_start + fetch_offset && cl_statement -> curr_rowset_start + fetch_offset <= cl_statement -> rowset_count ) { cl_statement -> curr_rowset_start = cl_statement -> rowset_position = cl_statement -> curr_rowset_start + fetch_offset; } else if ( cl_statement -> curr_rowset_start + fetch_offset > cl_statement -> rowset_count ) { ret = SQL_NO_DATA; cl_statement -> rowset_position = CL_AFTER_END; break; } else if ( cl_statement -> rowset_position == CL_AFTER_END && fetch_offset >= 0 ) { ret = SQL_NO_DATA; cl_statement -> rowset_position = CL_AFTER_END; break; } } row_offset = cl_statement -> rowset_position; cl_statement -> cursor_pos = 1; ret = fetch_rowset( cl_statement, rows_in_set, row_offset, &fetched_rows, row_status_ptr, rows_fetched_ptr ); if ( SQL_SUCCEEDED( ret )) { cl_statement -> curr_rowset_start = cl_statement -> rowset_position; cl_statement -> rowset_position += fetched_rows; } else if ( ret == SQL_FETCH_PART_ROWSET ) { ret = SQL_SUCCESS; } break; /* * The code before this turns the bookmark into a absolute */ case SQL_FETCH_BOOKMARK: case SQL_FETCH_ABSOLUTE: /* * close the rowset if needed */ if ( fetch_offset < 0 && !cl_statement -> rowset_complete ) { ret = complete_rowset( cl_statement, 0 ); if ( !SQL_SUCCEEDED( ret )) break; } if ( fetch_offset < 0 && ABS( fetch_offset ) <= cl_statement -> rowset_count ) { cl_statement -> curr_rowset_start = cl_statement -> rowset_count + fetch_offset; cl_statement -> rowset_position = cl_statement -> curr_rowset_start; } else if ( fetch_offset < 0 && ABS( fetch_offset ) > cl_statement -> rowset_count && ABS( fetch_offset ) > rows_in_set ) { cl_statement -> rowset_position = CL_BEFORE_START; ret = SQL_NO_DATA; break; } else if ( fetch_offset < 0 && ABS( fetch_offset ) > cl_statement -> rowset_count && ABS( fetch_offset ) <= rows_in_set ) { cl_statement -> curr_rowset_start = 0; cl_statement -> rowset_position = cl_statement -> curr_rowset_start; cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_01S06, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); info = 1; } else if ( fetch_offset == 0 ) { cl_statement -> rowset_position = CL_BEFORE_START; ret = SQL_NO_DATA; break; } else if ( fetch_offset > cl_statement -> rowset_count ) { ret = complete_rowset( cl_statement, fetch_offset ); if ( ret == SQL_NO_DATA ) { cl_statement -> rowset_position = CL_AFTER_END; break; } else if ( !SQL_SUCCEEDED( ret )) { break; } else { cl_statement -> curr_rowset_start = fetch_offset; cl_statement -> rowset_position = cl_statement -> curr_rowset_start; } } else { cl_statement -> curr_rowset_start = fetch_offset; cl_statement -> rowset_position = cl_statement -> curr_rowset_start; } row_offset = cl_statement -> rowset_position - 1; cl_statement -> cursor_pos = 1; ret = fetch_rowset( cl_statement, rows_in_set, row_offset, &fetched_rows, row_status_ptr, rows_fetched_ptr ); if ( SQL_SUCCEEDED( ret )) { cl_statement -> curr_rowset_start = cl_statement -> rowset_position; cl_statement -> rowset_position += fetched_rows; } else if ( ret == SQL_FETCH_PART_ROWSET ) { ret = SQL_SUCCESS; } break; case SQL_FETCH_LAST: /* * close the rowset if needed */ if ( !cl_statement -> rowset_complete ) { ret = complete_rowset( cl_statement, 0 ); if ( !SQL_SUCCEEDED( ret )) break; } if ( cl_statement -> rowset_count <= rows_in_set ) { cl_statement -> curr_rowset_start = cl_statement -> rowset_position = 0; } else { cl_statement -> curr_rowset_start = cl_statement -> rowset_position = cl_statement -> rowset_count - rows_in_set; } row_offset = cl_statement -> rowset_position; cl_statement -> cursor_pos = 1; ret = fetch_rowset( cl_statement, rows_in_set, row_offset, &fetched_rows, row_status_ptr, rows_fetched_ptr ); if ( SQL_SUCCEEDED( ret )) { cl_statement -> curr_rowset_start = cl_statement -> rowset_position = CL_AFTER_END; } else if ( ret == SQL_FETCH_PART_ROWSET ) { ret = SQL_SUCCESS; } break; } if ( ret == SQL_SUCCESS && info ) ret = SQL_SUCCESS_WITH_INFO; return ret; } SQLRETURN CLExtendedFetch( SQLHSTMT statement_handle, SQLUSMALLINT f_fetch_type, SQLLEN irow, SQLULEN *pcrow, SQLUSMALLINT *rgf_row_status ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; if ( !cl_statement -> bound_columns ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_SL009, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } return do_fetch_scroll( cl_statement, f_fetch_type, irow, rgf_row_status, pcrow, 1 ); } unixODBC-2.2.14-p2/cur/SQLFetch.c0100644000076400007640000000561510330212151014536 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLFetch.c,v 1.5 2005/10/27 17:54:49 lurcher Exp $ * * $Log: SQLFetch.c,v $ * Revision 1.5 2005/10/27 17:54:49 lurcher * fix what I suspect is a typo in qt.m4 * * Revision 1.4 2005/07/08 12:11:24 lurcher * * Fix a cursor lib problem (it was broken if you did metadata calls) * Alter the params to SQLParamOptions to use SQLULEN * * Revision 1.3 2003/10/06 15:43:47 lurcher * * Fix cursor lib to work with SQLFetch as well as the other fetch calls * Update README.OSX to detail building the cursor lib * * Revision 1.2 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/10/03 23:05:17 ngorham * * First public outing of the cursor lib * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLFetch( SQLHSTMT statement_handle ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; if ( cl_statement -> not_from_select ) { return SQLFETCH( cl_statement -> cl_connection, cl_statement -> driver_stmt ); } if ( !cl_statement -> bound_columns ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_SL009, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } return do_fetch_scroll( cl_statement, SQL_FETCH_NEXT, 0, cl_statement -> row_status_ptr, cl_statement -> rows_fetched_ptr, 0 ); } unixODBC-2.2.14-p2/cur/SQLFetchScroll.c0100644000076400007640000000664710723524744015747 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLFetchScroll.c,v 1.6 2007/11/29 12:00:36 lurcher Exp $ * * $Log: SQLFetchScroll.c,v $ * Revision 1.6 2007/11/29 12:00:36 lurcher * Add 64 bit type changes to SQLExtendedFetch etc * * Revision 1.5 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.4 2005/10/27 17:54:49 lurcher * fix what I suspect is a typo in qt.m4 * * Revision 1.3 2003/12/01 16:37:17 lurcher * * Fix a bug in SQLWritePrivateProfileString * * Revision 1.2 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/10/03 23:05:17 ngorham * * First public outing of the cursor lib * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLFetchScroll( SQLHSTMT statement_handle, SQLSMALLINT fetch_orientation, SQLLEN fetch_offset ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; if ( !cl_statement -> bound_columns ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_SL009, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } /* * get the value from the bookmark pointer and add the offset */ if ( fetch_orientation == SQL_FETCH_BOOKMARK ) { if ( cl_statement -> fetch_bookmark_ptr ) { SQLINTEGER bm_offset = *((SQLINTEGER*)cl_statement -> fetch_bookmark_ptr); fetch_offset += bm_offset; } else { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_HY111, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); } } return do_fetch_scroll( cl_statement, fetch_orientation, fetch_offset, cl_statement -> row_status_ptr, cl_statement -> rows_fetched_ptr, 0 ); } unixODBC-2.2.14-p2/cur/SQLForeignKeys.c0100644000076400007640000000622107363332157015751 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLForeignKeys.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLForeignKeys.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/09/23 21:46:37 ngorham * * Added cursor support for metadata functions * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLForeignKeys( SQLHSTMT statement_handle, SQLCHAR *szpk_catalog_name, SQLSMALLINT cbpk_catalog_name, SQLCHAR *szpk_schema_name, SQLSMALLINT cbpk_schema_name, SQLCHAR *szpk_table_name, SQLSMALLINT cbpk_table_name, SQLCHAR *szfk_catalog_name, SQLSMALLINT cbfk_catalog_name, SQLCHAR *szfk_schema_name, SQLSMALLINT cbfk_schema_name, SQLCHAR *szfk_table_name, SQLSMALLINT cbfk_table_name ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLFOREIGNKEYS( cl_statement -> cl_connection, cl_statement -> driver_stmt, szpk_catalog_name, cbpk_catalog_name, szpk_schema_name, cbpk_schema_name, szpk_table_name, cbpk_table_name, szfk_catalog_name, cbfk_catalog_name, szfk_schema_name, cbfk_schema_name, szfk_table_name, cbfk_table_name ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; cl_statement -> not_from_select = 1; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLFreeHandle.c0100644000076400007640000000730610100521232015477 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLFreeHandle.c,v 1.2 2004/07/24 17:55:38 lurcher Exp $ * * $Log: SQLFreeHandle.c,v $ * Revision 1.2 2004/07/24 17:55:38 lurcher * Sync up CVS * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLFreeHandle( SQLSMALLINT handle_type, SQLHANDLE handle ) { switch ( handle_type ) { case SQL_HANDLE_ENV: case SQL_HANDLE_DBC: return SQL_ERROR; case SQL_HANDLE_STMT: { CLHSTMT cl_statement = (CLHSTMT) handle; SQLRETURN ret; /* * call the driver */ if ( !cl_statement -> driver_stmt_closed ) { if ( CHECK_SQLFREEHANDLE( cl_statement -> cl_connection )) { ret = SQLFREEHANDLE( cl_statement -> cl_connection, handle_type, cl_statement -> driver_stmt ); } else { ret = SQLFREESTMT( cl_statement -> cl_connection, cl_statement -> driver_stmt, SQL_DROP ); } if ( cl_statement -> fetch_statement != SQL_NULL_HSTMT ) { if ( CHECK_SQLFREEHANDLE( cl_statement -> cl_connection )) { ret = SQLFREEHANDLE( cl_statement -> cl_connection, handle_type, cl_statement -> fetch_statement ); } else { ret = SQLFREESTMT( cl_statement -> cl_connection, cl_statement -> fetch_statement, SQL_DROP ); } cl_statement -> fetch_statement = SQL_NULL_HSTMT; } } if ( SQL_SUCCEEDED( ret )) { /* * free any bound columns */ free_bound_columns( cl_statement ); /* * free up any rowset */ free_rowset( cl_statement ); free( cl_statement ); } return ret; } case SQL_HANDLE_DESC: /* * worry about this later, we need to get the connection */ return SQL_ERROR; } } unixODBC-2.2.14-p2/cur/SQLFreeStmt.c0100644000076400007640000000575310100521232015237 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLFreeStmt.c,v 1.2 2004/07/24 17:55:38 lurcher Exp $ * * $Log: SQLFreeStmt.c,v $ * Revision 1.2 2004/07/24 17:55:38 lurcher * Sync up CVS * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/10/03 23:05:17 ngorham * * First public outing of the cursor lib * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLFreeStmt( SQLHSTMT statement_handle, SQLUSMALLINT option ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; /* * call the driver */ if ( !cl_statement -> driver_stmt_closed ) { ret = SQLFREESTMT( cl_statement -> cl_connection, cl_statement -> driver_stmt, option ); } if ( SQL_SUCCEEDED( ret )) { if ( option == SQL_DROP ) { if ( cl_statement -> fetch_statement != SQL_NULL_HSTMT ) { ret = SQLFREESTMT( cl_statement -> cl_connection, cl_statement -> fetch_statement, SQL_DROP ); cl_statement -> fetch_statement = SQL_NULL_HSTMT; } /* * free all bound columns */ free_bound_columns( cl_statement ); /* * free up any rowset */ free_rowset( cl_statement ); free( cl_statement ); } else if ( option == SQL_CLOSE ) { /* * free up any rowset */ free_rowset( cl_statement ); } else if ( option == SQL_UNBIND ) { /* * free all bound columns */ free_bound_columns( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLGetConnectAttr.c0100644000076400007640000000367007363332157016415 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetConnectAttr.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLGetConnectAttr.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetConnectAttr( SQLHDBC connection_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { CLHDBC cl_connection = (CLHDBC) connection_handle; return SQLGETCONNECTATTR( cl_connection, cl_connection -> driver_dbc, attribute, value, buffer_length, string_length ); } unixODBC-2.2.14-p2/cur/SQLGetConnectOption.c0100644000076400007640000000347507363332157016756 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetConnectOption.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLGetConnectOption.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetConnectOption( SQLHDBC connection_handle, SQLUSMALLINT option, SQLPOINTER value ) { CLHDBC cl_connection = (CLHDBC) connection_handle; return SQLGETCONNECTOPTION( cl_connection, cl_connection -> driver_dbc, option, value ); } unixODBC-2.2.14-p2/cur/SQLGetCursorName.c0100644000076400007640000000566707566504154016262 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetCursorName.c,v 1.3 2002/11/19 18:52:28 lurcher Exp $ * * $Log: SQLGetCursorName.c,v $ * Revision 1.3 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.2 2001/12/13 13:00:33 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetCursorName( SQLHSTMT statement_handle, SQLCHAR *cursor_name, SQLSMALLINT buffer_length, SQLSMALLINT *name_length ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret = SQL_SUCCESS; if ( cursor_name ) { if ( buffer_length < strlen((char*) cl_statement -> cursor_name ) + 1 ) { memcpy( cursor_name, cl_statement -> cursor_name, buffer_length ); cursor_name[ buffer_length ] = '\0'; ret = SQL_SUCCESS_WITH_INFO; cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_01004, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); } else { strcpy((char*) cursor_name, (char*) cl_statement -> cursor_name ); } } if ( name_length ) { *name_length = strlen((char*) cl_statement -> cursor_name ); } return ret; } unixODBC-2.2.14-p2/cur/SQLGetData.c0100644000076400007640000005413010736724551015040 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetData.c,v 1.11 2008/01/02 15:10:33 lurcher Exp $ * * $Log: SQLGetData.c,v $ * Revision 1.11 2008/01/02 15:10:33 lurcher * Fix problems trying to use the cursor lib on a non select statement * * Revision 1.10 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.9 2005/07/08 12:11:24 lurcher * * Fix a cursor lib problem (it was broken if you did metadata calls) * Alter the params to SQLParamOptions to use SQLULEN * * Revision 1.8 2004/12/23 14:51:04 lurcher * Fix problem in the cursor lib with blobs * * Revision 1.7 2004/08/17 17:17:38 lurcher * * Fix problem in the cursor lib when rereading records with NULLs in * * Revision 1.6 2004/07/24 17:55:38 lurcher * Sync up CVS * * Revision 1.5 2003/12/01 16:37:17 lurcher * * Fix a bug in SQLWritePrivateProfileString * * Revision 1.4 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.3 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.2 2001/12/13 13:00:33 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.2 2001/03/28 14:57:22 nick * * Fix bugs in corsor lib introduced bu UNCODE and other changes * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetData( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLSMALLINT target_type, SQLPOINTER target_value, SQLLEN buffer_length, SQLLEN *strlen_or_ind ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; CLHDBC cl_connection = cl_statement -> cl_connection; SQLRETURN ret; SQLCHAR sql[ 4095 ]; CLBCOL *bound_columns; int next_bind, first; if ( cl_statement -> cursor_type == SQL_CURSOR_FORWARD_ONLY ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_SL008, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } if ( cl_statement -> not_from_select ) { return SQLGETDATA( cl_connection, cl_statement -> driver_stmt, column_number, target_type, target_value, buffer_length, strlen_or_ind ); } /* * check we have what we need */ if ( !CHECK_SQLBINDPARAM( cl_connection ) && !CHECK_SQLBINDPARAMETER( cl_connection )) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1000, "Driver can not bind parameters", cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } if ( !CHECK_SQLEXECDIRECT( cl_connection ) && !( CHECK_SQLPREPARE( cl_connection ) && CHECK_SQLEXECUTE( cl_connection ))) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1000, "Driver can not prepare or execute", cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } if ( !CHECK_SQLFETCH( cl_connection )) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1000, "Driver can not fetch", cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } if ( !CHECK_SQLGETDATA( cl_connection )) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1000, "Driver can not getdata", cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } /* * if it's not and closed resultset, and the driver * can only support one active statement, then close * the result set first */ if ( !cl_statement -> rowset_complete && cl_statement -> cl_connection -> active_statement_allowed == 1 ) { int sav_start, sav_pos; sav_start = cl_statement -> curr_rowset_start; sav_pos = cl_statement -> rowset_position; complete_rowset( cl_statement, 0 ); SQLFREESTMT( cl_connection, cl_statement -> driver_stmt, SQL_DROP ); cl_statement -> driver_stmt_closed = 1; /* * restore the position */ cl_statement -> curr_rowset_start = sav_start; cl_statement -> rowset_position = sav_pos; } /* * Are we looking for the bookmark... */ if ( column_number == 0 ) { if ( cl_statement -> use_bookmarks ) { switch( target_type ) { case SQL_C_LONG: case SQL_C_SLONG: case SQL_C_ULONG: if ( target_value ) { *((SQLINTEGER*)target_value) = cl_statement -> curr_rowset_start; } if ( strlen_or_ind ) { *strlen_or_ind = sizeof( SQLINTEGER ); } return SQL_SUCCESS; case SQL_C_NUMERIC: case SQL_C_CHAR: case SQL_C_WCHAR: case SQL_C_SSHORT: case SQL_C_SHORT: case SQL_C_USHORT: case SQL_C_FLOAT: case SQL_C_DOUBLE: case SQL_C_BIT: case SQL_C_STINYINT: case SQL_C_TINYINT: case SQL_C_UTINYINT: case SQL_C_SBIGINT: case SQL_C_UBIGINT: case SQL_C_BINARY: case SQL_C_TYPE_DATE: case SQL_C_DATE: case SQL_C_TYPE_TIME: case SQL_C_TIME: case SQL_C_TYPE_TIMESTAMP: case SQL_C_TIMESTAMP: cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1003, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } } else { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_07009, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } } /* * refresh the data */ if ( !cl_statement -> fetch_done ) { ret = SQLGETDATA( cl_connection, cl_statement -> fetch_statement, column_number, target_type, target_value, buffer_length, strlen_or_ind ); if ( !SQL_SUCCEEDED( ret ) && ret != SQL_NO_DATA ) { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; int rec; /* * get the error from the driver before * loseing the connection */ do { if ( CHECK_SQLERROR( cl_connection )) { ret = SQLERROR( cl_connection, SQL_NULL_HENV, SQL_NULL_HSTMT, cl_statement -> fetch_statement, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); } else if ( CHECK_SQLGETDIAGREC( cl_connection )) { ret = SQLGETDIAGREC( cl_connection, SQL_HANDLE_STMT, cl_statement -> fetch_statement, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); } else { ret = SQL_NO_DATA; } if ( ret != SQL_NO_DATA ) { cl_statement -> cl_connection -> dh.__post_internal_error_ex( &cl_statement -> dm_statement -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while ( SQL_SUCCEEDED( ret )); } if ( !SQL_SUCCEEDED( ret ) && ret != SQL_NO_DATA ) { SQLFREESTMT( cl_connection, cl_statement -> fetch_statement, SQL_DROP ); cl_statement -> fetch_statement = SQL_NULL_HSTMT; } return ret; } cl_statement -> fetch_done = 0; ret = fetch_row( cl_statement, cl_statement -> curr_rowset_start + cl_statement -> cursor_pos - 1, -1 ); if ( cl_statement -> fetch_statement != SQL_NULL_HSTMT ) { SQLFREESTMT( cl_connection, cl_statement -> fetch_statement, SQL_DROP ); cl_statement -> fetch_statement = SQL_NULL_HSTMT; } ret = SQLALLOCSTMT( cl_connection, cl_connection -> driver_dbc, &cl_statement -> fetch_statement, NULL ); if ( !SQL_SUCCEEDED( ret )) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1000, "SQLAllocStmt failed in driver", cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } /* * append the cryterior to the end of the statement, binding * the comumns while we are at it */ strcpy((char*) sql, cl_statement -> sql_text ); /* * This is somewhat simplistic, but workable */ if ( strstr( (char*) sql, "WHERE" )) { strcat((char*) sql, " AND" ); } else { strcat((char*) sql, " WHERE" ); } /* * this works because the bound list is in column order */ bound_columns = cl_statement -> bound_columns; first = 1; next_bind = 0; while( bound_columns ) { char addon[ 256 ]; int col = bound_columns -> column_number; /* * Don't bind long types */ if ( cl_statement -> data_type[ col ] == SQL_LONGVARCHAR || cl_statement -> data_type[ col ] == SQL_LONGVARBINARY ) { } else { if ( bound_columns -> len_ind == -1 ) { sprintf( addon, " %s IS NULL", cl_statement -> column_names[ col - 1 ] ); if ( !first ) { strcat((char*) sql, " AND" ); } strcat((char*) sql, addon ); first = 0; } else { sprintf( addon, " %s = ?", cl_statement -> column_names[ col - 1 ] ); if ( !first ) { strcat((char*) sql, " AND" ); } strcat((char*) sql, addon ); first = 0; if ( CHECK_SQLBINDPARAMETER( cl_connection )) { ret = SQLBINDPARAMETER( cl_connection, cl_statement -> fetch_statement, next_bind + 1, SQL_PARAM_INPUT, bound_columns -> bound_type, cl_statement -> data_type[ col - 1 ], cl_statement -> column_size[ col - 1 ], cl_statement -> decimal_digits[ col - 1 ], bound_columns -> local_buffer, bound_columns -> bound_length, &bound_columns -> len_ind ); } else { ret = SQLBINDPARAM( cl_connection, cl_statement -> fetch_statement, next_bind + 1, bound_columns -> bound_type, cl_statement -> data_type[ col - 1 ], cl_statement -> column_size[ col - 1 ], cl_statement -> decimal_digits[ col - 1 ], bound_columns -> local_buffer, &bound_columns -> len_ind ); } if ( !SQL_SUCCEEDED( ret )) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_SL010, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); if ( !SQL_SUCCEEDED( ret ) && ret != SQL_NO_DATA ) { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; int rec; /* * get the error from the driver before * loseing the stmt */ do { if ( CHECK_SQLERROR( cl_connection )) { ret = SQLERROR( cl_connection, SQL_NULL_HENV, SQL_NULL_HSTMT, cl_statement -> fetch_statement, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); } else if ( CHECK_SQLGETDIAGREC( cl_connection )) { ret = SQLGETDIAGREC( cl_connection, SQL_HANDLE_STMT, cl_statement -> fetch_statement, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); } else { ret = SQL_NO_DATA; } if ( ret != SQL_NO_DATA ) { cl_statement -> cl_connection -> dh.__post_internal_error_ex( &cl_statement -> dm_statement -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while ( SQL_SUCCEEDED( ret )); } SQLFREESTMT( cl_connection, cl_statement -> fetch_statement, SQL_DROP ); cl_statement -> fetch_statement = SQL_NULL_HSTMT; return SQL_ERROR; } next_bind ++; } } bound_columns = bound_columns -> next; } if ( CHECK_SQLEXECDIRECT( cl_connection )) { ret = SQLEXECDIRECT( cl_connection, cl_statement -> fetch_statement, sql, strlen((char*) sql )); } else { ret = SQLPREPARE( cl_connection, cl_statement -> fetch_statement, sql, strlen((char*) sql )); if ( SQL_SUCCEEDED( ret )) { ret = SQLEXECUTE( cl_connection, cl_statement -> fetch_statement ); } } if ( !SQL_SUCCEEDED( ret )) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_SL004, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); if ( !SQL_SUCCEEDED( ret ) && ret != SQL_NO_DATA ) { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; int rec; /* * get the error from the driver before * loseing the stmt */ do { if ( CHECK_SQLERROR( cl_connection )) { ret = SQLERROR( cl_connection, SQL_NULL_HENV, SQL_NULL_HSTMT, cl_statement -> fetch_statement, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); } else if ( CHECK_SQLGETDIAGREC( cl_connection )) { ret = SQLGETDIAGREC( cl_connection, SQL_HANDLE_STMT, cl_statement -> fetch_statement, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); } else { ret = SQL_NO_DATA; } if ( ret != SQL_NO_DATA ) { cl_statement -> cl_connection -> dh.__post_internal_error_ex( &cl_statement -> dm_statement -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while ( SQL_SUCCEEDED( ret )); } SQLFREESTMT( cl_connection, cl_statement -> fetch_statement, SQL_DROP ); cl_statement -> fetch_statement = SQL_NULL_HSTMT; return SQL_ERROR; } ret = SQLFETCH( cl_connection, cl_statement -> fetch_statement ); if ( !SQL_SUCCEEDED( ret )) { if ( ret == SQL_NO_DATA ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_SL004, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); } else { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; int rec = 1; /* * get the error from the driver before * loseing the connection */ do { if ( CHECK_SQLERROR( cl_connection )) { ret = SQLERROR( cl_connection, SQL_NULL_HENV, SQL_NULL_HSTMT, cl_statement -> fetch_statement, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); } else if ( CHECK_SQLGETDIAGREC( cl_connection )) { ret = SQLGETDIAGREC( cl_connection, SQL_HANDLE_STMT, cl_statement -> fetch_statement, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); } else { ret = SQL_NO_DATA; } if ( ret != SQL_NO_DATA ) { cl_statement -> cl_connection -> dh.__post_internal_error_ex( &cl_statement -> dm_statement -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while ( SQL_SUCCEEDED( ret )); } SQLFREESTMT( cl_connection, cl_statement -> fetch_statement, SQL_DROP ); cl_statement -> fetch_statement = SQL_NULL_HSTMT; return SQL_ERROR; } ret = SQLGETDATA( cl_connection, cl_statement -> fetch_statement, column_number, target_type, target_value, buffer_length, strlen_or_ind ); if ( !SQL_SUCCEEDED( ret )) { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native_error; SQLSMALLINT ind; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH + 1 ]; SQLRETURN ret; int rec; /* * get the error from the driver before * loseing the connection */ do { if ( CHECK_SQLERROR( cl_connection )) { ret = SQLERROR( cl_connection, SQL_NULL_HENV, SQL_NULL_HSTMT, cl_statement -> fetch_statement, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); } else if ( CHECK_SQLGETDIAGREC( cl_connection )) { ret = SQLGETDIAGREC( cl_connection, SQL_HANDLE_STMT, cl_statement -> fetch_statement, rec ++, sqlstate, &native_error, message_text, sizeof( message_text ), &ind ); } else { ret = SQL_NO_DATA; } if ( ret != SQL_NO_DATA ) { cl_statement -> cl_connection -> dh.__post_internal_error_ex( &cl_statement -> dm_statement -> error, sqlstate, native_error, message_text, SUBCLASS_ODBC, SUBCLASS_ODBC ); } } while ( SQL_SUCCEEDED( ret )); } if ( !SQL_SUCCEEDED( ret )) { SQLFREESTMT( cl_connection, cl_statement -> fetch_statement, SQL_DROP ); cl_statement -> fetch_statement = SQL_NULL_HSTMT; } return ret; } unixODBC-2.2.14-p2/cur/SQLGetDescField.c0100644000076400007640000000353010307012274015771 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDescField.c,v 1.2 2005/09/05 09:49:48 lurcher Exp $ * * $Log: SQLGetDescField.c,v $ * Revision 1.2 2005/09/05 09:49:48 lurcher * New QT detection macros added * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetDescField( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { return SQL_ERROR; } unixODBC-2.2.14-p2/cur/SQLGetDescRec.c0100644000076400007640000000376010307012274015464 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDescRec.c,v 1.2 2005/09/05 09:49:48 lurcher Exp $ * * $Log: SQLGetDescRec.c,v $ * Revision 1.2 2005/09/05 09:49:48 lurcher * New QT detection macros added * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetDescRec( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLCHAR *name, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLSMALLINT *type, SQLSMALLINT *sub_type, SQLINTEGER *length, SQLSMALLINT *precision, SQLSMALLINT *scale, SQLSMALLINT *nullable ) { return SQL_ERROR; } unixODBC-2.2.14-p2/cur/SQLGetDiagRec.c0100644000076400007640000000574710736724551015477 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDiagRec.c,v 1.5 2008/01/02 15:10:33 lurcher Exp $ * * $Log: SQLGetDiagRec.c,v $ * Revision 1.5 2008/01/02 15:10:33 lurcher * Fix problems trying to use the cursor lib on a non select statement * * Revision 1.4 2007/02/12 11:49:35 lurcher * Add QT4 support to existing GUI parts * * Revision 1.3 2005/08/26 09:31:39 lurcher * Add call to allow the cursor lib to call SQLGetDiagRec * * Revision 1.2 2004/07/24 20:00:39 peteralexharvey * for OS2 port * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetDiagRec( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT rec_number, SQLCHAR *sqlstate, SQLINTEGER *native, SQLCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length_ptr ) { SQLRETURN ret; CLHDBC cl_connection = (CLHDBC) handle; DRV_SQLHANDLE dhandle; switch(handle_type) { case SQL_HANDLE_ENV: { return SQL_NO_DATA; } case SQL_HANDLE_DBC: { dhandle = cl_connection->driver_dbc; break; } case SQL_HANDLE_STMT: { CLHSTMT cl_statement = (CLHSTMT)handle; cl_connection = cl_statement->cl_connection; if ( cl_statement -> driver_stmt_closed ) { return SQL_NO_DATA; } dhandle = cl_statement->driver_stmt; break; } } return SQLGETDIAGREC(cl_connection, handle_type, dhandle, rec_number, sqlstate, native, message_text, buffer_length, text_length_ptr); } DMHDBC __get_connection( EHEAD * head ) { return 0; } unixODBC-2.2.14-p2/cur/SQLGetDiagField.c0100644000076400007640000000347107363332157016000 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetDiagField.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLGetDiagField.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetDiagField( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT rec_number, SQLSMALLINT diag_identifier, SQLPOINTER diag_info_ptr, SQLSMALLINT buffer_length, SQLSMALLINT *string_length_ptr ) { /* * todo */ return SQL_ERROR; } unixODBC-2.2.14-p2/cur/SQLGetInfo.c0100644000076400007640000001305607363332157015063 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetInfo.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLGetInfo.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetInfo( SQLHDBC connection_handle, SQLUSMALLINT info_type, SQLPOINTER info_value, SQLSMALLINT buffer_length, SQLSMALLINT *string_length ) { CLHDBC cl_connection = (CLHDBC) connection_handle; int do_it_here = 1; SQLUINTEGER value; SQLRETURN ret; char *cval = NULL; switch( info_type ) { case SQL_BOOKMARK_PERSISTENCE: value = 0; break; case SQL_DYNAMIC_CURSOR_ATTRIBUTES1: value = 0; break; case SQL_DYNAMIC_CURSOR_ATTRIBUTES2: value = 0; break; case SQL_FETCH_DIRECTION: value = SQL_FD_FETCH_ABSOLUTE | SQL_FD_FETCH_FIRST | SQL_FD_FETCH_LAST | SQL_FD_FETCH_NEXT | SQL_FD_FETCH_PRIOR | SQL_FD_FETCH_RELATIVE | SQL_FD_FETCH_BOOKMARK; break; case SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1: value = SQL_CA1_NEXT | SQL_CA1_ABSOLUTE | SQL_CA1_RELATIVE | SQL_CA1_LOCK_NO_CHANGE | SQL_CA1_POS_POSITION | SQL_CA1_POSITIONED_DELETE | SQL_CA1_POSITIONED_UPDATE | SQL_CA1_SELECT_FOR_UPDATE; break; case SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2: value = SQL_CA2_READ_ONLY_CONCURRENCY | SQL_CA2_OPT_VALUES_CONCURRENCY | SQL_CA2_SENSITIVITY_UPDATES; break; case SQL_KEYSET_CURSOR_ATTRIBUTES1: value = 0; break; case SQL_KEYSET_CURSOR_ATTRIBUTES2: value = 0; break; case SQL_LOCK_TYPES: value = SQL_LCK_NO_CHANGE; break; case SQL_STATIC_CURSOR_ATTRIBUTES1: value = SQL_CA1_NEXT | SQL_CA1_ABSOLUTE | SQL_CA1_RELATIVE | SQL_CA1_BOOKMARK | SQL_CA1_LOCK_NO_CHANGE | SQL_CA1_POS_POSITION | SQL_CA1_POSITIONED_DELETE | SQL_CA1_POSITIONED_UPDATE | SQL_CA1_SELECT_FOR_UPDATE; break; case SQL_STATIC_CURSOR_ATTRIBUTES2: value = SQL_CA2_READ_ONLY_CONCURRENCY | SQL_CA2_OPT_VALUES_CONCURRENCY | SQL_CA2_SENSITIVITY_UPDATES; break; case SQL_POS_OPERATIONS: value = SQL_POS_POSITION; break; case SQL_POSITIONED_STATEMENTS: value = SQL_PS_POSITIONED_DELETE | SQL_PS_POSITIONED_UPDATE | SQL_PS_SELECT_FOR_UPDATE; case SQL_ROW_UPDATES: cval = "Y"; break; case SQL_SCROLL_CONCURRENCY: value = SQL_SCCO_READ_ONLY | SQL_SCCO_OPT_VALUES; break; case SQL_SCROLL_OPTIONS: value = SQL_SO_FORWARD_ONLY | SQL_SO_STATIC; break; case SQL_STATIC_SENSITIVITY: value = SQL_SS_UPDATES; break; default: do_it_here = 0; break; } if ( do_it_here ) { if ( cval ) { if ( buffer_length > 2 && info_value ) { strcpy( info_value, cval ); ret = SQL_SUCCESS; } else { ret = SQL_SUCCESS_WITH_INFO; } if ( string_length ) { *string_length = 1; } } else { *((SQLINTEGER*)info_value) = value; ret = SQL_SUCCESS; } } else { ret = SQLGETINFO( cl_connection, cl_connection -> driver_dbc, info_type, info_value, buffer_length, string_length ); if ( SQL_SUCCEEDED( ret )) { if ( info_type == SQL_GETDATA_EXTENSIONS && info_value ) { *((SQLINTEGER*)info_value) |= SQL_GD_BLOCK; } } } return ret; } unixODBC-2.2.14-p2/cur/SQLGetStmtAttr.c0100644000076400007640000000761710330212151015733 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetStmtAttr.c,v 1.3 2005/10/27 17:54:49 lurcher Exp $ * * $Log: SQLGetStmtAttr.c,v $ * Revision 1.3 2005/10/27 17:54:49 lurcher * fix what I suspect is a typo in qt.m4 * * Revision 1.2 2003/12/01 16:37:17 lurcher * * Fix a bug in SQLWritePrivateProfileString * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/12/04 17:01:26 ngorham * * Remove C++ comments from the Postgres code * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetStmtAttr( SQLHSTMT statement_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; switch( attribute ) { case SQL_ATTR_CONCURRENCY: *(( SQLUINTEGER * ) value ) = cl_statement -> concurrency; break; case SQL_ATTR_CURSOR_TYPE: *(( SQLUINTEGER * ) value ) = cl_statement -> cursor_type; break; case SQL_ATTR_PARAM_BIND_OFFSET_PTR: *(( SQLPOINTER * ) value ) = cl_statement -> param_bind_offset_ptr; break; case SQL_ATTR_PARAM_BIND_TYPE: *(( SQLUINTEGER * ) value ) = cl_statement -> param_bind_type; break; case SQL_ATTR_ROW_BIND_OFFSET_PTR: *(( SQLPOINTER * ) value ) = cl_statement -> row_bind_offset_ptr; break; case SQL_ATTR_ROW_BIND_TYPE: *(( SQLUINTEGER * ) value ) = cl_statement -> row_bind_type; break; case SQL_ATTR_ROW_ARRAY_SIZE: *(( SQLUINTEGER * ) value ) = cl_statement -> rowset_array_size; break; case SQL_ROWSET_SIZE: *(( SQLUINTEGER * ) value ) = cl_statement -> rowset_size; break; case SQL_ATTR_SIMULATE_CURSOR: *(( SQLUINTEGER * ) value ) = cl_statement -> simulate_cursor; break; case SQL_ATTR_USE_BOOKMARKS: *(( SQLUINTEGER * ) value ) = cl_statement -> use_bookmarks; break; case SQL_ATTR_ROW_STATUS_PTR: *(( SQLUSMALLINT ** ) value ) = cl_statement -> row_status_ptr; break; case SQL_ATTR_ROWS_FETCHED_PTR: *(( SQLUINTEGER ** ) value ) = cl_statement -> rows_fetched_ptr; break; case SQL_ATTR_FETCH_BOOKMARK_PTR: *(( SQLPOINTER * ) value ) = cl_statement -> fetch_bookmark_ptr; break; default: return SQLGETSTMTATTR( cl_statement -> cl_connection, cl_statement -> driver_stmt, attribute, value, buffer_length, string_length ); } return SQL_SUCCESS; } unixODBC-2.2.14-p2/cur/SQLGetStmtOption.c0100644000076400007640000000703310330212151016261 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetStmtOption.c,v 1.2 2005/10/27 17:54:49 lurcher Exp $ * * $Log: SQLGetStmtOption.c,v $ * Revision 1.2 2005/10/27 17:54:49 lurcher * fix what I suspect is a typo in qt.m4 * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetStmtOption( SQLHSTMT statement_handle, SQLUSMALLINT option, SQLPOINTER value ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; switch( option ) { case SQL_CONCURRENCY: *(( SQLUINTEGER * ) value ) = cl_statement -> concurrency; break; case SQL_CURSOR_TYPE: *(( SQLUINTEGER * ) value ) = cl_statement -> cursor_type; break; case SQL_BIND_TYPE: *(( SQLUINTEGER * ) value ) = cl_statement -> row_bind_type; break; case SQL_GET_BOOKMARK: *(( SQLUINTEGER * ) value ) = cl_statement -> use_bookmarks; break; case SQL_ROWSET_SIZE: *(( SQLUINTEGER * ) value ) = cl_statement -> rowset_size; break; case SQL_SIMULATE_CURSOR: *(( SQLUINTEGER * ) value ) = cl_statement -> simulate_cursor; break; case SQL_ATTR_PARAM_BIND_OFFSET_PTR: *(( SQLPOINTER * ) value ) = cl_statement -> param_bind_offset_ptr; break; case SQL_ATTR_PARAM_BIND_TYPE: *(( SQLUINTEGER * ) value ) = cl_statement -> concurrency; break; case SQL_ATTR_ROW_BIND_OFFSET_PTR: *(( SQLPOINTER * ) value ) = cl_statement -> row_bind_offset_ptr; break; case SQL_ATTR_ROW_ARRAY_SIZE: *(( SQLUINTEGER * ) value ) = cl_statement -> rowset_array_size; break; case SQL_ATTR_ROW_STATUS_PTR: *(( SQLUSMALLINT ** ) value ) = cl_statement -> row_status_ptr; break; case SQL_ATTR_ROWS_FETCHED_PTR: *(( SQLUINTEGER ** ) value ) = cl_statement -> rows_fetched_ptr; break; case SQL_ATTR_USE_BOOKMARKS: *(( SQLUINTEGER * ) value ) = cl_statement -> use_bookmarks; break; default: return SQLGETSTMTOPTION( cl_statement -> cl_connection, cl_statement -> driver_stmt, option, value ); } return SQL_SUCCESS; } unixODBC-2.2.14-p2/cur/SQLGetTypeInfo.c0100644000076400007640000000415310263466554015725 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLGetTypeInfo.c,v 1.2 2005/07/08 12:11:24 lurcher Exp $ * * $Log: SQLGetTypeInfo.c,v $ * Revision 1.2 2005/07/08 12:11:24 lurcher * * Fix a cursor lib problem (it was broken if you did metadata calls) * Alter the params to SQLParamOptions to use SQLULEN * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/09/23 21:46:37 ngorham * * Added cursor support for metadata functions * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLGetTypeInfo( SQLHSTMT statement_handle, SQLSMALLINT data_type ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLGETTYPEINFO( cl_statement -> cl_connection, cl_statement -> driver_stmt, data_type ); cl_statement -> not_from_select = 1; return ret; } unixODBC-2.2.14-p2/cur/SQLMoreResults.c0100644000076400007640000000436411103610151015772 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLMoreResults.c,v 1.2 2008/11/03 14:53:29 lurcher Exp $ * * $Log: SQLMoreResults.c,v $ * Revision 1.2 2008/11/03 14:53:29 lurcher * Allow cursor lib to handle multiple result sets * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLMoreResults( SQLHSTMT statement_handle ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLMORERESULTS( cl_statement -> cl_connection, cl_statement -> driver_stmt ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLNativeSql.c0100644000076400007640000000411007363332157015425 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLNativeSql.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLNativeSql.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLNativeSql( SQLHDBC connection_handle, SQLCHAR *sz_sql_str_in, SQLINTEGER cb_sql_str_in, SQLCHAR *sz_sql_str, SQLINTEGER cb_sql_str_max, SQLINTEGER *pcb_sql_str ) { CLHDBC cl_connection = (CLHDBC) connection_handle; /* * the cursor lib will take a part in this */ return SQLNATIVESQL( cl_connection, cl_connection -> driver_dbc, sz_sql_str_in, cb_sql_str_in, sz_sql_str, cb_sql_str_max, pcb_sql_str ); } unixODBC-2.2.14-p2/cur/SQLNumParams.c0100644000076400007640000000342007363332157015425 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLNumParams.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLNumParams.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLNumParams( SQLHSTMT statement_handle, SQLSMALLINT *pcpar ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLNUMPARAMS( cl_statement -> cl_connection, cl_statement -> driver_stmt, pcpar ); } unixODBC-2.2.14-p2/cur/SQLNumResultCols.c0100644000076400007640000000343607363332157016310 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLNumResultCols.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLNumResultCols.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLNumResultCols( SQLHSTMT statement_handle, SQLSMALLINT *column_count ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, column_count ); } unixODBC-2.2.14-p2/cur/SQLParamData.c0100644000076400007640000000350410025273057015347 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLParamData.c,v 1.2 2004/03/15 09:23:59 lurcher Exp $ * * $Log: SQLParamData.c,v $ * Revision 1.2 2004/03/15 09:23:59 lurcher * * Add SQL_NULL_DESC * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLParamData( SQLHSTMT statement_handle, SQLPOINTER *value ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLPARAMDATA( cl_statement -> cl_connection, cl_statement -> driver_stmt, value ); } unixODBC-2.2.14-p2/cur/SQLParamOptions.c0100644000076400007640000000362610564052117016136 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLParamOptions.c,v 1.2 2007/02/12 11:49:35 lurcher Exp $ * * $Log: SQLParamOptions.c,v $ * Revision 1.2 2007/02/12 11:49:35 lurcher * Add QT4 support to existing GUI parts * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLParamOptions( SQLHSTMT statement_handle, SQLULEN crow, SQLULEN *pirow ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLPARAMOPTIONS( cl_statement -> cl_connection, cl_statement -> driver_stmt, crow, *pirow ); } unixODBC-2.2.14-p2/cur/SQLPrepare.c0100644000076400007640000000501107406123161015105 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLPrepare.c,v 1.2 2001/12/13 13:00:33 lurcher Exp $ * * $Log: SQLPrepare.c,v $ * Revision 1.2 2001/12/13 13:00:33 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLPrepare( SQLHSTMT statement_handle, SQLCHAR *statement_text, SQLINTEGER text_length ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; /* * save the statement for later use */ if ( cl_statement -> sql_text ) { free( cl_statement -> sql_text ); } if ( text_length < 0 ) { cl_statement -> sql_text = strdup((char*) statement_text ); } else { cl_statement -> sql_text = malloc( text_length + 1 ); memcpy( cl_statement -> sql_text, statement_text, text_length ); cl_statement -> sql_text[ text_length ] = '\0'; } return SQLPREPARE( cl_statement -> cl_connection, cl_statement -> driver_stmt, statement_text, text_length ); } unixODBC-2.2.14-p2/cur/SQLPrimaryKeys.c0100644000076400007640000000531407363332157016005 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLPrimaryKeys.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLPrimaryKeys.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/09/23 21:46:37 ngorham * * Added cursor support for metadata functions * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLPrimaryKeys( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_table_name, SQLSMALLINT cb_table_name ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLPRIMARYKEYS( cl_statement -> cl_connection, cl_statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_table_name, cb_table_name ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; cl_statement -> not_from_select = 1; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLProcedureColumns.c0100644000076400007640000000554307363332157017023 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLProcedureColumns.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLProcedureColumns.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/09/23 21:46:37 ngorham * * Added cursor support for metadata functions * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLProcedureColumns( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_proc_name, SQLSMALLINT cb_proc_name, SQLCHAR *sz_column_name, SQLSMALLINT cb_column_name ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLPROCEDURECOLUMNS( cl_statement -> cl_connection, cl_statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_proc_name, cb_proc_name, sz_column_name, cb_column_name ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; cl_statement -> not_from_select = 1; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLProcedures.c0100644000076400007640000000530407363332157015640 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLProcedures.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLProcedures.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/09/23 21:46:37 ngorham * * Added cursor support for metadata functions * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLProcedures( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_proc_name, SQLSMALLINT cb_proc_name ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLPROCEDURES( cl_statement -> cl_connection, cl_statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_proc_name, cb_proc_name ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; cl_statement -> not_from_select = 1; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLPutData.c0100644000076400007640000000346307363332157015073 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLPutData.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLPutData.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLPutData( SQLHSTMT statement_handle, SQLPOINTER data, SQLINTEGER strlen_or_ind ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLPUTDATA( cl_statement -> cl_connection, cl_statement -> driver_stmt, data, strlen_or_ind ); } unixODBC-2.2.14-p2/cur/SQLRowCount.c0100644000076400007640000000443310564052117015277 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLRowCount.c,v 1.3 2007/02/12 11:49:35 lurcher Exp $ * * $Log: SQLRowCount.c,v $ * Revision 1.3 2007/02/12 11:49:35 lurcher * Add QT4 support to existing GUI parts * * Revision 1.2 2001/12/13 13:00:33 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLRowCount( SQLHSTMT statement_handle, SQLLEN *rowcount ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; if ( cl_statement -> first_fetch_done ) { if ( rowcount ) { *rowcount = cl_statement -> rowset_count; } return SQL_SUCCESS; } else { return DEF_SQLROWCOUNT( cl_statement -> cl_connection, cl_statement -> driver_stmt, rowcount ); } } unixODBC-2.2.14-p2/cur/SQLSetConnectAttr.c0100644000076400007640000000357007363332157016430 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetConnectAttr.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLSetConnectAttr.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLSetConnectAttr( SQLHDBC connection_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER string_length ) { CLHDBC cl_connection = (CLHDBC) connection_handle; return SQLSETCONNECTATTR( cl_connection, cl_connection -> driver_dbc, attribute, value, string_length ); } unixODBC-2.2.14-p2/cur/SQLSetConnectOption.c0100644000076400007640000000360307631343775016771 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetConnectOption.c,v 1.2 2003/03/05 09:48:45 lurcher Exp $ * * $Log: SQLSetConnectOption.c,v $ * Revision 1.2 2003/03/05 09:48:45 lurcher * * Add some 64 bit fixes * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLSetConnectOption( SQLHDBC connection_handle, SQLUSMALLINT option, SQLULEN value ) { CLHDBC cl_connection = (CLHDBC) connection_handle; return SQLSETCONNECTOPTION( cl_connection, cl_connection -> driver_dbc, option, value ); } unixODBC-2.2.14-p2/cur/SQLSetCursorName.c0100644000076400007640000000651707566504154016271 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetCursorName.c,v 1.3 2002/11/19 18:52:28 lurcher Exp $ * * $Log: SQLSetCursorName.c,v $ * Revision 1.3 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.2 2001/12/13 13:00:33 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLSetCursorName( SQLHSTMT statement_handle, SQLCHAR *cursor_name, SQLSMALLINT name_length ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret = SQL_SUCCESS; if ( name_length == SQL_NTS ) { if ( strlen((char*) cursor_name ) > MAX_CURSOR_NAME ) { memcpy( cl_statement -> cursor_name, cursor_name, MAX_CURSOR_NAME ); cl_statement -> cursor_name[ MAX_CURSOR_NAME ] = '\0'; ret = SQL_SUCCESS_WITH_INFO; } else { strcpy((char*) cl_statement -> cursor_name, (char*) cursor_name ); } } else { if ( name_length > MAX_CURSOR_NAME ) { memcpy( cl_statement -> cursor_name, cursor_name, MAX_CURSOR_NAME ); cl_statement -> cursor_name[ MAX_CURSOR_NAME ] = '\0'; ret = SQL_SUCCESS_WITH_INFO; } else { memcpy( cl_statement -> cursor_name, cursor_name, name_length ); cl_statement -> cursor_name[ name_length ] = '\0'; } } if ( ret == SQL_SUCCESS_WITH_INFO ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_01004, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); } return ret; } unixODBC-2.2.14-p2/cur/SQLSetDescRec.c0100644000076400007640000000372110716336431015505 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetDescRec.c,v 1.2 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLSetDescRec.c,v $ * Revision 1.2 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLSetDescRec( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT type, SQLSMALLINT subtype, SQLLEN length, SQLSMALLINT precision, SQLSMALLINT scale, SQLPOINTER data, SQLLEN *string_length, SQLLEN *indicator ) { /* * todo */ return SQL_ERROR; } unixODBC-2.2.14-p2/cur/SQLSetDescField.c0100644000076400007640000000340007363332157016016 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetDescField.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLSetDescField.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:50 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLSetDescField( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length ) { /* * todo */ return SQL_ERROR; } unixODBC-2.2.14-p2/cur/SQLSetParam.c0100644000076400007640000000435010716336431015234 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetParam.c,v 1.2 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLSetParam.c,v $ * Revision 1.2 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:51 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLSetParam( SQLHSTMT statement_handle, SQLUSMALLINT parameter_number, SQLSMALLINT value_type, SQLSMALLINT parameter_type, SQLULEN length_precision, SQLSMALLINT parameter_scale, SQLPOINTER parameter_value, SQLLEN *strlen_or_ind ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; return SQLSETPARAM( cl_statement -> cl_connection, cl_statement -> driver_stmt, parameter_number, value_type, parameter_type, length_precision, parameter_scale, parameter_value, strlen_or_ind ); } unixODBC-2.2.14-p2/cur/SQLSetPos.c0100644000076400007640000000605610716336431014742 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetPos.c,v 1.3 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLSetPos.c,v $ * Revision 1.3 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.2 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:51 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLSetPos( SQLHSTMT statement_handle, SQLSETPOSIROW irow, SQLUSMALLINT foption, SQLUSMALLINT flock ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; /* * this is implemented by the cursor lib */ if ( irow == 0 ) { /* * one day maybe, but what do you want, blood ? */ cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_HYC00, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); } else if ( irow > cl_statement -> rowset_array_size ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1107, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); } else if ( foption != SQL_POSITION || flock != SQL_LOCK_NO_CHANGE ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_HYC00, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); } cl_statement -> cursor_pos = irow; return SQL_SUCCESS; } unixODBC-2.2.14-p2/cur/SQLSetScrollOptions.c0100644000076400007640000000617010716336431017010 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetScrollOptions.c,v 1.4 2007/11/13 15:04:57 lurcher Exp $ * * $Log: SQLSetScrollOptions.c,v $ * Revision 1.4 2007/11/13 15:04:57 lurcher * Fix 64 bit cursor lib issues * * Revision 1.3 2005/10/27 17:54:49 lurcher * fix what I suspect is a typo in qt.m4 * * Revision 1.2 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/10/03 23:05:17 ngorham * * First public outing of the cursor lib * * Revision 1.1 1999/09/19 22:22:51 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLSetScrollOptions( SQLHSTMT statement_handle, SQLUSMALLINT f_concurrency, SQLLEN crow_keyset, SQLUSMALLINT crow_rowset ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; if ( crow_keyset != SQL_SCROLL_FORWARD_ONLY && crow_keyset != SQL_SCROLL_STATIC ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1107, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } if ( f_concurrency != SQL_CONCUR_READ_ONLY && f_concurrency != SQL_CONCUR_VALUES ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_S1108, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); return SQL_ERROR; } cl_statement -> cursor_type = crow_keyset; cl_statement -> concurrency = f_concurrency; cl_statement -> rowset_array_size = crow_rowset; cl_statement -> rowset_size = crow_rowset; return SQL_SUCCESS; } unixODBC-2.2.14-p2/cur/SQLSetStmtAttr.c0100644000076400007640000001242210330212151015735 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetStmtAttr.c,v 1.6 2005/10/27 17:54:49 lurcher Exp $ * * $Log: SQLSetStmtAttr.c,v $ * Revision 1.6 2005/10/27 17:54:49 lurcher * fix what I suspect is a typo in qt.m4 * * Revision 1.5 2003/12/01 16:37:17 lurcher * * Fix a bug in SQLWritePrivateProfileString * * Revision 1.4 2003/10/30 18:20:46 lurcher * * Fix broken thread protection * Remove SQLNumResultCols after execute, lease S4/S% to driver * Fix string overrun in SQLDriverConnect * Add initial support for Interix * * Revision 1.3 2003/03/05 09:48:45 lurcher * * Add some 64 bit fixes * * Revision 1.2 2002/11/19 18:52:28 lurcher * * Alter the cursor lib to not require linking to the driver manager. * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:51 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLSetStmtAttr( SQLHSTMT statement_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER string_length ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLUINTEGER val; SQLRETURN ret = SQL_SUCCESS; switch( attribute ) { case SQL_ATTR_CONCURRENCY: val = ( SQLULEN ) value; if ( cl_statement -> concurrency == SQL_CURSOR_FORWARD_ONLY ) { if ( val != SQL_CONCUR_READ_ONLY ) { ret = SQL_SUCCESS_WITH_INFO; } } else { if ( val != SQL_CONCUR_READ_ONLY && val != SQL_CONCUR_VALUES ) { ret = SQL_SUCCESS_WITH_INFO; } } if ( ret == SQL_SUCCESS ) { cl_statement -> concurrency = ( SQLULEN ) value; } break; case SQL_ATTR_CURSOR_TYPE: val = ( SQLULEN ) value; if ( val != SQL_CURSOR_FORWARD_ONLY && val != SQL_CURSOR_STATIC ) { ret = SQL_SUCCESS_WITH_INFO; } else { cl_statement -> cursor_type = ( SQLULEN ) value; } break; case SQL_ATTR_PARAM_BIND_OFFSET_PTR: cl_statement -> param_bind_offset_ptr = ( SQLPOINTER ) value; break; case SQL_ATTR_PARAM_BIND_TYPE: cl_statement -> concurrency = ( SQLULEN ) value; break; case SQL_ATTR_ROW_BIND_OFFSET_PTR: cl_statement -> row_bind_offset_ptr = ( SQLPOINTER ) value; break; case SQL_ATTR_ROW_BIND_TYPE: cl_statement -> row_bind_type = ( SQLULEN ) value; break; case SQL_ATTR_ROW_ARRAY_SIZE: cl_statement -> rowset_array_size = ( SQLULEN ) value; break; case SQL_ROWSET_SIZE: cl_statement -> rowset_size = ( SQLULEN ) value; break; case SQL_ATTR_ROW_STATUS_PTR: cl_statement -> row_status_ptr = ( SQLUSMALLINT * ) value; break; case SQL_ATTR_ROWS_FETCHED_PTR: cl_statement -> rows_fetched_ptr = ( SQLUINTEGER * ) value; break; case SQL_ATTR_SIMULATE_CURSOR: val = ( SQLULEN ) value; if ( val != SQL_SC_NON_UNIQUE ) { ret = SQL_SUCCESS_WITH_INFO; } else { cl_statement -> simulate_cursor = ( SQLULEN ) value; } break; case SQL_ATTR_USE_BOOKMARKS: cl_statement -> use_bookmarks = ( SQLULEN ) value; break; case SQL_ATTR_FETCH_BOOKMARK_PTR: cl_statement -> fetch_bookmark_ptr = ( SQLPOINTER ) value; break; default: return SQLSETSTMTATTR( cl_statement -> cl_connection, cl_statement -> driver_stmt, attribute, value, string_length ); } if ( ret == SQL_SUCCESS_WITH_INFO ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_01S02, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); } return ret; } unixODBC-2.2.14-p2/cur/SQLSetStmtOption.c0100644000076400007640000001156510330212151016302 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSetStmtOption.c,v 1.4 2005/10/27 17:54:49 lurcher Exp $ * * $Log: SQLSetStmtOption.c,v $ * Revision 1.4 2005/10/27 17:54:49 lurcher * fix what I suspect is a typo in qt.m4 * * Revision 1.3 2005/05/03 17:16:50 lurcher * Backport a couple of changes from the Debian build * * Revision 1.2 2003/03/05 09:48:45 lurcher * * Add some 64 bit fixes * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:51 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLSetStmtOption( SQLHSTMT statement_handle, SQLUSMALLINT option, SQLULEN value ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLUINTEGER val; SQLRETURN ret = SQL_SUCCESS; switch( option ) { case SQL_CONCURRENCY: val = ( SQLUINTEGER ) value; if ( cl_statement -> concurrency == SQL_CURSOR_FORWARD_ONLY ) { if ( val != SQL_CONCUR_READ_ONLY ) { ret = SQL_SUCCESS_WITH_INFO; } } else { if ( val != SQL_CONCUR_READ_ONLY && val != SQL_CONCUR_VALUES ) { ret = SQL_SUCCESS_WITH_INFO; } } if ( ret == SQL_SUCCESS ) { cl_statement -> concurrency = ( SQLUINTEGER ) value; } break; case SQL_CURSOR_TYPE: val = ( SQLUINTEGER ) value; if ( val != SQL_CURSOR_FORWARD_ONLY && val != SQL_CURSOR_TYPE ) { ret = SQL_SUCCESS_WITH_INFO; } else { cl_statement -> cursor_type = ( SQLUINTEGER ) value; } break; case SQL_BIND_TYPE: cl_statement -> row_bind_type = ( SQLUINTEGER ) value; break; case SQL_GET_BOOKMARK: cl_statement -> use_bookmarks = ( SQLUINTEGER ) value; break; case SQL_ROWSET_SIZE: cl_statement -> rowset_size = ( SQLUINTEGER ) value; break; case SQL_SIMULATE_CURSOR: val = ( SQLUINTEGER ) value; if ( val != SQL_SC_NON_UNIQUE ) { ret = SQL_SUCCESS_WITH_INFO; } else { cl_statement -> simulate_cursor = ( SQLUINTEGER ) value; } break; case SQL_ATTR_PARAM_BIND_OFFSET_PTR: cl_statement -> param_bind_offset_ptr = ( SQLPOINTER ) value; break; case SQL_ATTR_PARAM_BIND_TYPE: cl_statement -> concurrency = ( SQLUINTEGER ) value; break; case SQL_ATTR_ROW_BIND_OFFSET_PTR: cl_statement -> row_bind_offset_ptr = ( SQLPOINTER ) value; break; case SQL_ATTR_ROW_ARRAY_SIZE: cl_statement -> rowset_array_size = ( SQLUINTEGER ) value; break; case SQL_ATTR_ROW_STATUS_PTR: cl_statement -> row_status_ptr = ( SQLUSMALLINT * ) value; break; case SQL_ATTR_ROWS_FETCHED_PTR: cl_statement -> rows_fetched_ptr = ( SQLUINTEGER * ) value; break; case SQL_ATTR_USE_BOOKMARKS: cl_statement -> use_bookmarks = ( SQLUINTEGER ) value; break; default: return SQLSETSTMTOPTION( cl_statement -> cl_connection, cl_statement -> driver_stmt, option, value ); } if ( ret == SQL_SUCCESS_WITH_INFO ) { cl_statement -> cl_connection -> dh.__post_internal_error( &cl_statement -> dm_statement -> error, ERROR_01S02, NULL, cl_statement -> dm_statement -> connection -> environment -> requested_version ); } return ret; } unixODBC-2.2.14-p2/cur/SQLSpecialColumns.c0100644000076400007640000000550607363332157016452 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLSpecialColumns.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLSpecialColumns.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/09/23 21:46:37 ngorham * * Added cursor support for metadata functions * * Revision 1.1 1999/09/19 22:22:51 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLSpecialColumns( SQLHSTMT statement_handle, SQLUSMALLINT identifier_type, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLUSMALLINT scope, SQLUSMALLINT nullable ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLSPECIALCOLUMNS( cl_statement -> cl_connection, cl_statement -> driver_stmt, identifier_type, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, scope, nullable ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; cl_statement -> not_from_select = 1; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLStatistics.c0100644000076400007640000000536307363332157015664 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLStatistics.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLStatistics.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/09/23 21:46:37 ngorham * * Added cursor support for metadata functions * * Revision 1.1 1999/09/19 22:22:51 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLStatistics( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLUSMALLINT unique, SQLUSMALLINT reserved ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLSTATISTICS( cl_statement -> cl_connection, cl_statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, unique, reserved ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; cl_statement -> not_from_select = 1; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLTablePrivileges.c0100644000076400007640000000533407363332157016611 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLTablePrivileges.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLTablePrivileges.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/09/23 21:46:37 ngorham * * Added cursor support for metadata functions * * Revision 1.1 1999/09/19 22:22:51 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLTablePrivileges( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_table_name, SQLSMALLINT cb_table_name ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLTABLEPRIVILEGES( cl_statement -> cl_connection, cl_statement -> driver_stmt, sz_catalog_name, cb_catalog_name, sz_schema_name, cb_schema_name, sz_table_name, cb_table_name ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; cl_statement -> not_from_select = 1; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLTables.c0100644000076400007640000000535607363332157014746 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLTables.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: SQLTables.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.2 1999/09/23 21:46:37 ngorham * * Added cursor support for metadata functions * * Revision 1.1 1999/09/19 22:22:51 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLTables( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *table_type, SQLSMALLINT name_length4 ) { CLHSTMT cl_statement = (CLHSTMT) statement_handle; SQLRETURN ret; ret = SQLTABLES( cl_statement -> cl_connection, cl_statement -> driver_stmt, catalog_name, name_length1, schema_name, name_length2, table_name, name_length3, table_type, name_length4 ); if ( SQL_SUCCEEDED( ret )) { SQLSMALLINT column_count; ret = SQLNUMRESULTCOLS( cl_statement -> cl_connection, cl_statement -> driver_stmt, &column_count ); cl_statement -> column_count = column_count; cl_statement -> first_fetch_done = 0; cl_statement -> not_from_select = 1; if ( column_count > 0 ) { ret = get_column_names( cl_statement ); } } return ret; } unixODBC-2.2.14-p2/cur/SQLTransact.c0100644000076400007640000000423610271207452015276 0ustar nicknick/********************************************************************* * * unixODBC Cursor Library * * Created by Nick Gorham * (nick@easysoft.com). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: SQLTransact.c,v 1.2 2005/07/25 16:11:22 lurcher Exp $ * * $Log: SQLTransact.c,v $ * Revision 1.2 2005/07/25 16:11:22 lurcher * Fix swapped about args in the cursor lib * * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 1999/09/19 22:22:51 ngorham * * * Added first cursor library work, read only at the moment and only works * with selects with no where clause * * **********************************************************************/ #include "cursorlibrary.h" SQLRETURN CLTransact( SQLHENV environment_handle, SQLHDBC connection_handle, SQLUSMALLINT completion_type ) { if ( environment_handle ) { /* * the driver manager will not call this */ return SQL_ERROR; } else if ( connection_handle ) { CLHDBC cl_connection = (CLHDBC) connection_handle; return SQLTRANSACT( cl_connection, SQL_NULL_HENV, cl_connection -> driver_dbc, completion_type ); } else { return SQL_ERROR; } } unixODBC-2.2.14-p2/cur/cursorlibrary.h0100644000076400007640000004461010723524744016056 0ustar nicknick#ifndef _CURSORLIBRARY_H #define _CURSORLIBRARY_H #define ODBCVER 0x0351 #include #include #include #include #include /* THIS WILL BRING IN sql.h and sqltypes.h AS WELL AS PROVIDE MS EXTENSIONS */ #define MAX_CURSOR_NAME 18 /* * cursor positions */ #define CL_BEFORE_START -1 #define CL_AFTER_END -2 #include "drivermanager.h" typedef struct bound_column { struct bound_column *next; int column_number; SQLLEN len_ind; SQLPOINTER local_buffer; /* buffer that the CL binds in */ /* the driver (malloc'd) */ SQLPOINTER bound_buffer; /* buffer that the app binds */ SQLINTEGER bound_type; /* data type of binding */ SQLLEN bound_length; /* length of binding */ SQLLEN *bound_ind; /* ind ptr bound */ int rs_buffer_offset; int rs_ind_offset; /* offset onto the current rowset */ /* buffer */ } CLBCOL; typedef struct cl_connection { struct driver_func *functions; /* entry points, from the original */ /* driver */ DRV_SQLHANDLE driver_dbc; /* HDBC of the driver */ DMHDBC dm_connection; /* driver manager connection str */ DMHSTMT cl_handle; /* dummy to make the macro valid */ SQLUSMALLINT active_statement_allowed; /* can we have more than one active */ /* statement */ int error_count; /* used to call SQLGetDiagRec */ /* * Use these as entry points back to the driver manager */ struct driver_helper_funcs dh; } *CLHDBC; typedef struct cl_statement { DRV_SQLHANDLE driver_stmt; /* driver statement handle */ CLHDBC cl_connection; /* parent cursor lib connection */ DMHSTMT dm_statement; /* Driver manager statement */ DMHSTMT fetch_statement; /* Driver manager statement */ SQLUINTEGER cursor_type; /* statment attr's */ SQLUINTEGER concurrency; SQLPOINTER *fetch_bookmark_ptr; SQLUINTEGER *param_bind_offset_ptr; SQLUINTEGER param_bind_type; SQLPOINTER row_bind_offset_ptr; SQLUINTEGER row_bind_type; SQLUINTEGER rowset_array_size; SQLUINTEGER rowset_size; SQLUINTEGER simulate_cursor; SQLUINTEGER use_bookmarks; SQLUINTEGER *rows_fetched_ptr; SQLUSMALLINT *row_status_ptr; SQLCHAR cursor_name[ MAX_CURSOR_NAME + 1 ]; CLBCOL *bound_columns; int first_fetch_done; char *sql_text; /* text of current statement */ char **column_names; /* names of each column */ SQLSMALLINT *data_type; SQLLEN *column_size; SQLSMALLINT *decimal_digits; int driver_stmt_closed; int not_from_select; int read_only; int fetch_done; /* * rowset info */ int rowset_position; int rowset_count; int rowset_complete; FILE *rowset_file; char *rowset_buffer; int buffer_length; int column_count; int curr_rowset_start; int cursor_pos; int error_count; /* used to call SQLGetDiagRec */ } *CLHSTMT; /* * cursor lib function defs */ SQLRETURN SQL_API CLAllocHandle( SQLSMALLINT handle_type, SQLHANDLE input_handle, SQLHANDLE *output_handle, SQLHANDLE dm_handle ); SQLRETURN SQL_API CLAllocHandleStd( SQLSMALLINT handle_type, SQLHANDLE input_handle, SQLHANDLE *output_handle, SQLHANDLE dm_handle ); SQLRETURN SQL_API CLAllocStmt( SQLHDBC connection_handle, SQLHSTMT *statement_handle, SQLHANDLE dm_handle ); SQLRETURN SQL_API CLBindCol( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLSMALLINT target_type, SQLPOINTER target_value, SQLLEN buffer_length, SQLLEN *strlen_or_ind ); SQLRETURN SQL_API CLBindParam( SQLHSTMT statement_handle, SQLUSMALLINT parameter_number, SQLSMALLINT value_type, SQLSMALLINT parameter_type, SQLULEN length_precision, SQLSMALLINT parameter_scale, SQLPOINTER parameter_value, SQLLEN *strlen_or_ind ); SQLRETURN SQL_API CLBindParameter( SQLHSTMT statement_handle, SQLUSMALLINT ipar, SQLSMALLINT f_param_type, SQLSMALLINT f_c_type, SQLSMALLINT f_sql_type, SQLULEN cb_col_def, SQLSMALLINT ib_scale, SQLPOINTER rgb_value, SQLLEN cb_value_max, SQLLEN *pcb_value ); SQLRETURN SQL_API CLBulkOperations( SQLHSTMT statement_handle, SQLSMALLINT operation ); SQLRETURN SQL_API CLCancel( SQLHSTMT statement_handle ); SQLRETURN SQL_API CLCloseCursor( SQLHSTMT statement_handle ); SQLRETURN SQL_API CLColAttribute ( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLUSMALLINT field_identifier, SQLPOINTER character_attribute, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLLEN *numeric_attribute ); SQLRETURN SQL_API CLColAttributes( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLUSMALLINT field_identifier, SQLPOINTER character_attribute, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLLEN *numeric_attribute ); SQLRETURN SQL_API CLColumnPrivileges( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *column_name, SQLSMALLINT name_length4 ); SQLRETURN SQL_API CLColumns( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *column_name, SQLSMALLINT name_length4 ); SQLRETURN SQL_API CLCopyDesc( SQLHDESC source_desc_handle, SQLHDESC target_desc_handle ); SQLRETURN SQL_API CLDescribeCol( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLCHAR *column_name, SQLSMALLINT buffer_length, SQLSMALLINT *name_length, SQLSMALLINT *data_type, SQLULEN *column_size, SQLSMALLINT *decimal_digits, SQLSMALLINT *nullable ); SQLRETURN SQL_API CLDescribeParam( SQLHSTMT statement_handle, SQLUSMALLINT ipar, SQLSMALLINT *pf_sql_type, SQLULEN *pcb_param_def, SQLSMALLINT *pib_scale, SQLSMALLINT *pf_nullable ); SQLRETURN SQL_API CLDisconnect( SQLHDBC connection_handle ); SQLRETURN SQL_API CLEndTran( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT completion_type ); SQLRETURN SQL_API CLError( SQLHENV environment_handle, SQLHDBC connection_handle, SQLHSTMT statement_handle, SQLCHAR *sqlstate, SQLINTEGER *native_error, SQLCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length ); SQLRETURN SQL_API CLExecDirect( SQLHSTMT statement_handle, SQLCHAR *statement_text, SQLINTEGER text_length ); SQLRETURN SQL_API CLExecute( SQLHSTMT statement_handle ); SQLRETURN SQL_API CLExtendedFetch( SQLHSTMT statement_handle, SQLUSMALLINT f_fetch_type, SQLLEN irow, SQLULEN *pcrow, SQLUSMALLINT *rgf_row_status ); SQLRETURN SQL_API CLFetch( SQLHSTMT statement_handle ); SQLRETURN SQL_API CLFetchScroll( SQLHSTMT statement_handle, SQLSMALLINT fetch_orientation, SQLLEN fetch_offset ); SQLRETURN SQL_API CLForeignKeys( SQLHSTMT statement_handle, SQLCHAR *szpk_catalog_name, SQLSMALLINT cbpk_catalog_name, SQLCHAR *szpk_schema_name, SQLSMALLINT cbpk_schema_name, SQLCHAR *szpk_table_name, SQLSMALLINT cbpk_table_name, SQLCHAR *szfk_catalog_name, SQLSMALLINT cbfk_catalog_name, SQLCHAR *szfk_schema_name, SQLSMALLINT cbfk_schema_name, SQLCHAR *szfk_table_name, SQLSMALLINT cbfk_table_name ); SQLRETURN SQL_API CLFreeHandle( SQLSMALLINT handle_type, SQLHANDLE handle ); SQLRETURN SQL_API CLFreeStmt( SQLHSTMT statement_handle, SQLUSMALLINT option ); SQLRETURN SQL_API CLGetConnectOption( SQLHDBC connection_handle, SQLUSMALLINT option, SQLPOINTER value ); SQLRETURN SQL_API CLGetConnectAttr( SQLHDBC connection_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ); SQLRETURN SQL_API CLGetCursorName( SQLHSTMT statement_handle, SQLCHAR *cursor_name, SQLSMALLINT buffer_length, SQLSMALLINT *name_length ); SQLRETURN SQL_API CLGetData( SQLHSTMT statement_handle, SQLUSMALLINT column_number, SQLSMALLINT target_type, SQLPOINTER target_value, SQLLEN buffer_length, SQLLEN *strlen_or_ind ); SQLRETURN SQL_API CLGetDescField( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ); SQLRETURN SQL_API CLGetDescRec( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLCHAR *name, SQLSMALLINT buffer_length, SQLSMALLINT *string_length, SQLSMALLINT *type, SQLSMALLINT *sub_type, SQLINTEGER *length, SQLSMALLINT *precision, SQLSMALLINT *scale, SQLSMALLINT *nullable ); SQLRETURN SQL_API CLGetDiagField( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT rec_number, SQLSMALLINT diag_identifier, SQLPOINTER diag_info_ptr, SQLSMALLINT buffer_length, SQLSMALLINT *string_length_ptr ); SQLRETURN SQL_API CLGetDiagRec( SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT rec_number, SQLCHAR *sqlstate, SQLINTEGER *native, SQLCHAR *message_text, SQLSMALLINT buffer_length, SQLSMALLINT *text_length_ptr ); SQLRETURN SQL_API CLGetInfo( SQLHDBC connection_handle, SQLUSMALLINT info_type, SQLPOINTER info_value, SQLSMALLINT buffer_length, SQLSMALLINT *string_length ); SQLRETURN SQL_API CLGetStmtAttr( SQLHSTMT statement_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER buffer_length, SQLINTEGER *string_length ); SQLRETURN SQL_API CLGetStmtOption( SQLHSTMT statement_handle, SQLUSMALLINT option, SQLPOINTER value ); SQLRETURN SQL_API CLGetTypeInfo( SQLHSTMT statement_handle, SQLSMALLINT data_type ); SQLRETURN SQL_API CLMoreResults( SQLHSTMT statement_handle ); SQLRETURN SQL_API CLNativeSql( SQLHDBC hdbc, SQLCHAR *sz_sql_str_in, SQLINTEGER cb_sql_str_in, SQLCHAR *sz_sql_str, SQLINTEGER cb_sql_str_max, SQLINTEGER *pcb_sql_str ); SQLRETURN SQL_API CLNumParams( SQLHSTMT statement_handle, SQLSMALLINT *pcpar ); SQLRETURN SQL_API CLNumResultCols( SQLHSTMT statement_handle, SQLSMALLINT *column_count ); SQLRETURN SQL_API CLParamData( SQLHSTMT statement_handle, SQLPOINTER *value ); SQLRETURN SQL_API CLParamOptions( SQLHSTMT statement_handle, SQLULEN crow, SQLULEN *pirow ); SQLRETURN SQL_API CLPrepare( SQLHSTMT statement_handle, SQLCHAR *statement_text, SQLINTEGER text_length ); SQLRETURN SQL_API CLPrimaryKeys( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_table_name, SQLSMALLINT cb_table_name ); SQLRETURN SQL_API CLProcedureColumns( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_proc_name, SQLSMALLINT cb_proc_name, SQLCHAR *sz_column_name, SQLSMALLINT cb_column_name ); SQLRETURN SQL_API CLProcedures( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_proc_name, SQLSMALLINT cb_proc_name ); SQLRETURN SQL_API CLPutData( SQLHSTMT statement_handle, SQLPOINTER data, SQLINTEGER strlen_or_ind ); SQLRETURN SQL_API CLRowCount( SQLHSTMT statement_handle, SQLLEN *rowcount ); SQLRETURN SQL_API CLSetConnectAttr( SQLHDBC connection_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER string_length ); SQLRETURN SQL_API CLSetConnectOption( SQLHDBC connection_handle, SQLUSMALLINT option, SQLULEN value ); SQLRETURN SQL_API CLSetCursorName( SQLHSTMT statement_handle, SQLCHAR *cursor_name, SQLSMALLINT name_length ); SQLRETURN SQL_API CLSetDescField( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length ); SQLRETURN SQL_API CLSetDescRec( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT type, SQLSMALLINT subtype, SQLLEN length, SQLSMALLINT precision, SQLSMALLINT scale, SQLPOINTER data, SQLLEN *string_length, SQLLEN *indicator ); SQLRETURN SQL_API CLSetParam( SQLHSTMT statement_handle, SQLUSMALLINT parameter_number, SQLSMALLINT value_type, SQLSMALLINT parameter_type, SQLULEN length_precision, SQLSMALLINT parameter_scale, SQLPOINTER parameter_value, SQLLEN *strlen_or_ind ); SQLRETURN SQL_API CLSetPos( SQLHSTMT statement_handle, SQLSETPOSIROW irow, SQLUSMALLINT foption, SQLUSMALLINT flock ); SQLRETURN SQL_API CLSetScrollOptions( SQLHSTMT statement_handle, SQLUSMALLINT f_concurrency, SQLLEN crow_keyset, SQLUSMALLINT crow_rowset ); SQLRETURN SQL_API CLSetStmtAttr( SQLHSTMT statement_handle, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER string_length ); SQLRETURN SQL_API CLSetStmtOption( SQLHSTMT statement_handle, SQLUSMALLINT option, SQLULEN value ); SQLRETURN SQL_API CLSpecialColumns( SQLHSTMT statement_handle, SQLUSMALLINT identifier_type, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLUSMALLINT scope, SQLUSMALLINT nullable ); SQLRETURN SQL_API CLStatistics( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLUSMALLINT unique, SQLUSMALLINT reserved ); SQLRETURN SQL_API CLTablePrivileges( SQLHSTMT statement_handle, SQLCHAR *sz_catalog_name, SQLSMALLINT cb_catalog_name, SQLCHAR *sz_schema_name, SQLSMALLINT cb_schema_name, SQLCHAR *sz_table_name, SQLSMALLINT cb_table_name ); SQLRETURN SQL_API CLTables( SQLHSTMT statement_handle, SQLCHAR *catalog_name, SQLSMALLINT name_length1, SQLCHAR *schema_name, SQLSMALLINT name_length2, SQLCHAR *table_name, SQLSMALLINT name_length3, SQLCHAR *table_type, SQLSMALLINT name_length4 ); SQLRETURN SQL_API CLTransact( SQLHENV environment_handle, SQLHDBC connection_handle, SQLUSMALLINT completion_type ); /* * internal prototypes */ void free_rowset( CLHSTMT cl_statement ); int calculate_buffers( CLHSTMT cl_statement, int column_count ); int free_bound_columns( CLHSTMT cl_statement ); SQLRETURN do_fetch_scroll( CLHSTMT cl_statement, int fetch_orientation, SQLLEN fetch_offset, SQLUSMALLINT *row_status_ptr, SQLULEN *rows_fetched_ptr, int ext_fetch ); #endif unixODBC-2.2.14-p2/cur/cur.exp0100644000076400007640000000001207363332157014277 0ustar nicknickCLConnect unixODBC-2.2.14-p2/DRVConfig/0040755000076400007640000000000011150523341013754 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/README0100644000076400007640000000223607363332141014643 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | DRVConfig | +-------------------------------------------------------------+ These are the setup libs for the various drivers. There are two generic ones; drvcfg1 - SQL servers (host, port etc) drvcfg2 - file based (database dir) These are typically installed into the same directory as the drivers (often /usr/local/lib) and are denoted by a simple naming convention (*S.so). The driver lib and setup lib are key to registering an ODBC driver - a task which is done by a root user. +-------------------------------------------------------------+ | Peter Harvey pharvey@codebydesign.com | | http://www.unixodbc.org | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/DRVConfig/Makefile.am0100644000076400007640000000024510010426475016012 0ustar nicknickif DRIVERS SUBDIRS = \ drvcfg1 \ drvcfg2 \ PostgreSQL \ MiniSQL \ MySQL \ nn \ esoob \ oplodbc \ template \ tds \ txt \ Oracle \ sapdb \ Mimer endif unixODBC-2.2.14-p2/DRVConfig/Makefile.in0100644000076400007640000003717011111035177016030 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = drvcfg1 drvcfg2 PostgreSQL MiniSQL MySQL nn esoob \ oplodbc template tds txt Oracle sapdb Mimer DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @DRIVERS_TRUE@SUBDIRS = \ @DRIVERS_TRUE@ drvcfg1 \ @DRIVERS_TRUE@ drvcfg2 \ @DRIVERS_TRUE@ PostgreSQL \ @DRIVERS_TRUE@ MiniSQL \ @DRIVERS_TRUE@ MySQL \ @DRIVERS_TRUE@ nn \ @DRIVERS_TRUE@ esoob \ @DRIVERS_TRUE@ oplodbc \ @DRIVERS_TRUE@ template \ @DRIVERS_TRUE@ tds \ @DRIVERS_TRUE@ txt \ @DRIVERS_TRUE@ Oracle \ @DRIVERS_TRUE@ sapdb \ @DRIVERS_TRUE@ Mimer all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # 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): @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; \ (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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @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; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ 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) 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-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: 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: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # 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: unixODBC-2.2.14-p2/DRVConfig/drvcfg1/0040755000076400007640000000000011150523340015307 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/drvcfg1/README0100644000076400007640000000247311052232231016167 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | Driver Config for basic SQL Server options | +-------------------------------------------------------------+ This is an example of a driver setup which can be called by ODBC Config to allow the driver specific options to be set. This particular example is for SQL Server type setups and can be used as a substitute for drivers which serve SQL Servers but are missing a driver setup of its own. This is the Driver Config that is used when ODBC Config does not have a specific config for an installed driver. Each driver in /etc/odbcinst.ini should have a Setup entry such as; Setup = /usr/lib/libodbcminiS.so This will allow ODBCConfig to prompt for Data Source options. +-------------------------------------------------------------+ | Peter Harvey pharvey@codebydesign.com | | http://www.unixodbc.org | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/DRVConfig/drvcfg1/Makefile.am0100644000076400007640000000034111025707220017340 0ustar nicknicklib_LTLIBRARIES = libodbcdrvcfg1S.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcdrvcfg1S_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ libodbcdrvcfg1S_la_SOURCES = drvcfg1.c unixODBC-2.2.14-p2/DRVConfig/drvcfg1/Makefile.in0100644000076400007640000003736211111035206017360 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/drvcfg1 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libodbcdrvcfg1S_la_LIBADD = am_libodbcdrvcfg1S_la_OBJECTS = drvcfg1.lo libodbcdrvcfg1S_la_OBJECTS = $(am_libodbcdrvcfg1S_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcdrvcfg1S_la_SOURCES) DIST_SOURCES = $(libodbcdrvcfg1S_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbcdrvcfg1S.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcdrvcfg1S_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module libodbcdrvcfg1S_la_SOURCES = drvcfg1.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/drvcfg1/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/drvcfg1/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcdrvcfg1S.la: $(libodbcdrvcfg1S_la_OBJECTS) $(libodbcdrvcfg1S_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbcdrvcfg1S_la_LDFLAGS) $(libodbcdrvcfg1S_la_OBJECTS) $(libodbcdrvcfg1S_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drvcfg1.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/drvcfg1/drvcfg1.c0100644000076400007640000000340107363332141017012 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include static const char *aHost[] = { "localhost", NULL }; int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty ) { hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof( aHost ) ); memcpy( hLastProperty->aPromptData, aHost, sizeof( aHost ) ); strncpy( hLastProperty->szName, "Host", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Database", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Port", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); return 1; } unixODBC-2.2.14-p2/DRVConfig/drvcfg2/0040755000076400007640000000000011150523340015310 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/drvcfg2/README0100644000076400007640000000253307363332141016200 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | Driver Config for basic file options | +-------------------------------------------------------------+ This is an example of a driver setup which can be called by ODBC Config to allow the driver specific options to be set. This particular example is for File Based data sources. Each driver in /etc/odbcinst.ini should have a Setup entry such as; Setup = /usr/lib/libodbcminiS.so This will allow ODBCConfig to prompt for Data Source options. +-------------------------------------------------------------+ | Peter Harvey | | pharvey@codebydesign.com | | http://www.genix.net/unixODBC | | 10.APR.99 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/DRVConfig/drvcfg2/Makefile.am0100644000076400007640000000034111025707225017346 0ustar nicknicklib_LTLIBRARIES = libodbcdrvcfg2S.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcdrvcfg2S_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ libodbcdrvcfg2S_la_SOURCES = drvcfg2.c unixODBC-2.2.14-p2/DRVConfig/drvcfg2/Makefile.in0100644000076400007640000003737711111035210017362 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/drvcfg2 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libodbcdrvcfg2S_la_LIBADD = am_libodbcdrvcfg2S_la_OBJECTS = drvcfg2.lo libodbcdrvcfg2S_la_OBJECTS = $(am_libodbcdrvcfg2S_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcdrvcfg2S_la_SOURCES) DIST_SOURCES = $(libodbcdrvcfg2S_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbcdrvcfg2S.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcdrvcfg2S_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module libodbcdrvcfg2S_la_SOURCES = drvcfg2.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/drvcfg2/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/drvcfg2/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcdrvcfg2S.la: $(libodbcdrvcfg2S_la_OBJECTS) $(libodbcdrvcfg2S_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbcdrvcfg2S_la_LDFLAGS) $(libodbcdrvcfg2S_la_OBJECTS) $(libodbcdrvcfg2S_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drvcfg2.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/drvcfg2/ChangeLog0100644000076400007640000000012107363332141017061 0ustar nicknick1999-04-10 Peter Harvey * All: Created ChangeLog unixODBC-2.2.14-p2/DRVConfig/drvcfg2/drvcfg2.c0100644000076400007640000000210007363332141017007 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include /********************************************** * HELP **********************************************/ /********************************************** * STATIC LOOKUP VALUES **********************************************/ int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty ) { hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; strncpy( hLastProperty->szName, "Database", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); return 1; } unixODBC-2.2.14-p2/DRVConfig/PostgreSQL/0040755000076400007640000000000011150523340015756 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/PostgreSQL/README0100644000076400007640000000174107363332141016646 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. This software is a LinuxODBC component and * * may NOT be distributed seperately. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | LinuxODBC | | Driver Config for PostgreSQL ODBC driver | +-------------------------------------------------------------+ Use this Driver Config when using the PostgreSQL ODBC Driver. It allows ODBCConfig to prompt the user for Data Source options. ODBCConfig will read the "Setup" entry in /etc/odbcinst.ini to determine the name of the config lib to use. Peter Harvey pharvey@codebydesign.com 02.FEB.99 unixODBC-2.2.14-p2/DRVConfig/PostgreSQL/Makefile.am0100644000076400007640000000033211025707213020011 0ustar nicknicklib_LTLIBRARIES = libodbcpsqlS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcpsqlS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ libodbcpsqlS_la_SOURCES = odbcpsqlS.c unixODBC-2.2.14-p2/DRVConfig/PostgreSQL/Makefile.in0100644000076400007640000003732411111035205020024 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/PostgreSQL DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libodbcpsqlS_la_LIBADD = am_libodbcpsqlS_la_OBJECTS = odbcpsqlS.lo libodbcpsqlS_la_OBJECTS = $(am_libodbcpsqlS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcpsqlS_la_SOURCES) DIST_SOURCES = $(libodbcpsqlS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbcpsqlS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcpsqlS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module libodbcpsqlS_la_SOURCES = odbcpsqlS.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/PostgreSQL/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/PostgreSQL/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcpsqlS.la: $(libodbcpsqlS_la_OBJECTS) $(libodbcpsqlS_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbcpsqlS_la_LDFLAGS) $(libodbcpsqlS_la_OBJECTS) $(libodbcpsqlS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odbcpsqlS.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/PostgreSQL/odbcpsqlS.c0100644000076400007640000001717607754717565020122 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include /********************************************** * HELP **********************************************/ static const char *szHelpPassword = "Your Password will be used to gain additional information from the DBMS and will not be saved anywhere."; /********************************************** * STATIC LOOKUP VALUES **********************************************/ static const char *aServer[] = { "localhost", NULL }; static const char *aPort[] = { "5432", NULL }; static const char *aProtocol[] = { "6.4", "6.3", "6.2", NULL }; static const char *aYesNo[] = { "Yes", "No", NULL }; static const char *aTrueFalse[] = { "True", "False", NULL }; int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty ) { hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof(aYesNo) ); memcpy( hLastProperty->aPromptData, aYesNo, sizeof(aYesNo) ); strncpy( hLastProperty->szName, "Trace", INI_MAX_PROPERTY_NAME ); strcpy( hLastProperty->szValue, "No" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; strncpy( hLastProperty->szName, "TraceFile", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Database", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof( aServer ) ); memcpy( hLastProperty->aPromptData, aServer, sizeof( aServer ) ); strncpy( hLastProperty->szName, "Servername", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "localhost", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Username", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT_PASSWORD; hLastProperty->pszHelp = (char *)strdup( szHelpPassword ); strncpy( hLastProperty->szName, "Password", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof(aPort) ); memcpy( hLastProperty->aPromptData, aPort, sizeof(aPort) ); strncpy( hLastProperty->szName, "Port", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "5432", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof(aProtocol) ); memcpy( hLastProperty->aPromptData, aProtocol, sizeof(aProtocol) ); strncpy( hLastProperty->szName, "Protocol", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "6.4", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof(aYesNo) ); memcpy( hLastProperty->aPromptData, aYesNo, sizeof(aYesNo) ); strncpy( hLastProperty->szName, "ReadOnly", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "No", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof(aYesNo) ); memcpy( hLastProperty->aPromptData, aYesNo, sizeof(aYesNo) ); strncpy( hLastProperty->szName, "RowVersioning", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "No", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof(aYesNo) ); memcpy( hLastProperty->aPromptData, aYesNo, sizeof(aYesNo) ); strncpy( hLastProperty->szName, "ShowSystemTables", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "No", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof(aYesNo) ); memcpy( hLastProperty->aPromptData, aYesNo, sizeof(aYesNo) ); strncpy( hLastProperty->szName, "ShowOidColumn", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "No", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof(aYesNo) ); memcpy( hLastProperty->aPromptData, aYesNo, sizeof(aYesNo) ); strncpy( hLastProperty->szName, "FakeOidIndex", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "No", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "ConnSettings", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); return 1; } unixODBC-2.2.14-p2/DRVConfig/MiniSQL/0040755000076400007640000000000011150523340015227 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/MiniSQL/README0100644000076400007640000000173607363332141016123 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. This software is a LinuxODBC component and * * may NOT be distributed seperately. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | LinuxODBC | | Driver Config for MiniSQL ODBC driver | +-------------------------------------------------------------+ Use this Driver Config when using the MiniSQL ODBC Driver. It allows ODBCConfig to prompt the user for Data Source options. ODBCConfig will read the "Setup" entry in /etc/odbcinst.ini to determine the name of the config lib to use. Peter Harvey pharvey@codebydesign.com 10.FEB.99 unixODBC-2.2.14-p2/DRVConfig/MiniSQL/Makefile.am0100644000076400007640000000033211025707171017265 0ustar nicknicklib_LTLIBRARIES = libodbcminiS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcminiS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ libodbcminiS_la_SOURCES = odbcminiS.c unixODBC-2.2.14-p2/DRVConfig/MiniSQL/Makefile.in0100644000076400007640000003731311111035201017267 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/MiniSQL DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libodbcminiS_la_LIBADD = am_libodbcminiS_la_OBJECTS = odbcminiS.lo libodbcminiS_la_OBJECTS = $(am_libodbcminiS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcminiS_la_SOURCES) DIST_SOURCES = $(libodbcminiS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbcminiS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcminiS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module libodbcminiS_la_SOURCES = odbcminiS.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/MiniSQL/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/MiniSQL/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcminiS.la: $(libodbcminiS_la_OBJECTS) $(libodbcminiS_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbcminiS_la_LDFLAGS) $(libodbcminiS_la_OBJECTS) $(libodbcminiS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odbcminiS.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/MiniSQL/odbcminiS.c0100644000076400007640000000415107363332141017310 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include /********************************************** * HELP **********************************************/ static const char *szHelpHost = "blank is faster than localhost"; /********************************************** * STATIC LOOKUP VALUES **********************************************/ static const char *aHost[] = { "localhost", NULL }; int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty ) { hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof( aHost ) ); memcpy( hLastProperty->aPromptData, aHost, sizeof( aHost ) ); hLastProperty->pszHelp = (char*)strdup( szHelpHost ); strncpy( hLastProperty->szName, "Host", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Database", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; strncpy( hLastProperty->szName, "ConfigFile", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); return 1; } unixODBC-2.2.14-p2/DRVConfig/MySQL/0040755000076400007640000000000011150523340014720 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/MySQL/README0100644000076400007640000000173407363332141015612 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. This software is a LinuxODBC component and * * may NOT be distributed seperately. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | Driver Config for MySQL ODBC driver | +-------------------------------------------------------------+ Use this Driver Config when using the MySQL ODBC Driver. It allows ODBCConfig to prompt the user for Data Source options. ODBCConfig will read the "Setup" entry in /etc/odbcinst.ini to determine the name of the config lib to use. Peter Harvey pharvey@codebydesign.com 19.FEB.99 unixODBC-2.2.14-p2/DRVConfig/MySQL/Makefile.am0100644000076400007640000000032211025707177016763 0ustar nicknicklib_LTLIBRARIES = libodbcmyS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcmyS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ libodbcmyS_la_SOURCES = odbcmyS.c unixODBC-2.2.14-p2/DRVConfig/MySQL/Makefile.in0100644000076400007640000003724111111035202016761 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/MySQL DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libodbcmyS_la_LIBADD = am_libodbcmyS_la_OBJECTS = odbcmyS.lo libodbcmyS_la_OBJECTS = $(am_libodbcmyS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcmyS_la_SOURCES) DIST_SOURCES = $(libodbcmyS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbcmyS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcmyS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module libodbcmyS_la_SOURCES = odbcmyS.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/MySQL/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/MySQL/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcmyS.la: $(libodbcmyS_la_OBJECTS) $(libodbcmyS_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbcmyS_la_LDFLAGS) $(libodbcmyS_la_OBJECTS) $(libodbcmyS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odbcmyS.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/MySQL/odbcmyS.c0100644000076400007640000001272007452707311016477 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include /********************************************** * HELP **********************************************/ /********************************************** * STATIC LOOKUP VALUES **********************************************/ static const char *aHost[] = { "localhost", NULL }; static const char *aDatabase[] = { "test", "mysql", NULL }; int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty ) { hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof( aHost ) ); memcpy( hLastProperty->aPromptData, aHost, sizeof( aHost ) ); strncpy( hLastProperty->szName, "Server", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = strdup( "Host name or IP address of the machine running the MySQL server." ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof( aDatabase ) ); memcpy( hLastProperty->aPromptData, aDatabase, sizeof( aDatabase ) ); strncpy( hLastProperty->szName, "Database", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "test", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = strdup( "The database you want to connect to.\nYou can use test or mysql to test this DSN." ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Port", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = strdup( "Port number. Leave blank to accept the default." ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Socket", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = strdup( "Socket number. Leave blank to accept the default." ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Option", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = strdup( "\ Add the desired option values and enter resulting number here...\n\n\ 1 The client can't handle that MyODBC returns the real width of a column.\n \ 2 The client can't handle that MySQL returns the true value of affected rows\n \ 4 Make a debug log. \ 8 Don't set any packet limit for results and parameters.\n \ 16 Don't prompt for questions even if driver would like to prompt\n \ 32 Enable or disable the dynamic cursor support. This is not allowed in MyODBC.\n \ 64 Ignore use of database name in 'database.table.column'.\n \ 128 Force use of ODBC manager cursors (experimental).\n \ 256 Disable the use of extended fetch (experimental).\n \ 512 Pad CHAR fields to full column length.\n \ 1024 SQLDescribeCol() will return fully qualified column names\n \ 2048 Use the compressed server/client protocol\n \ 4096 Tell server to ignore space after function name and before '('\n \ 8192 Connect with named pipes to a mysqld server running on NT.\n \ 16384 Change LONGLONG columns to INT columns\n \ 32768 Return 'user' as Table_qualifier and Table_owner from SQLTables\n \ 65536 Read parameters from the client and odbc groups from `my.cnf'\n \ 131072 Add some extra safety checks (should not bee needed but...)" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Stmt", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = strdup( "statement to execute upon connect" ); return 1; } unixODBC-2.2.14-p2/DRVConfig/nn/0040755000076400007640000000000011150523340014366 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/nn/README0100644000076400007640000000210007363332141015244 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | Driver Config for the Internet News Server (NN) driver | +-------------------------------------------------------------+ This is a driver setup which can be called by ODBC Config to allow the driver specific options to be set for the internet News Server (NN) ODBC driver. Each driver in /etc/odbcinst.ini should have a Setup entry such as; Setup = /usr/lib/libodbcnnS.so This will allow ODBCConfig to prompt for Data Source options. +-------------------------------------------------------------+ | Peter Harvey pharvey@codebydesign.com | | http://www.genix.net/unixODBC | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/DRVConfig/nn/Makefile.am0100644000076400007640000000032111025707240016417 0ustar nicknicklib_LTLIBRARIES = libodbcnnS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcnnS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ libodbcnnS_la_SOURCES = drvcfg.c unixODBC-2.2.14-p2/DRVConfig/nn/Makefile.in0100644000076400007640000003722511111035212016432 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/nn DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libodbcnnS_la_LIBADD = am_libodbcnnS_la_OBJECTS = drvcfg.lo libodbcnnS_la_OBJECTS = $(am_libodbcnnS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcnnS_la_SOURCES) DIST_SOURCES = $(libodbcnnS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbcnnS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbcnnS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module libodbcnnS_la_SOURCES = drvcfg.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/nn/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/nn/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcnnS.la: $(libodbcnnS_la_OBJECTS) $(libodbcnnS_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbcnnS_la_LDFLAGS) $(libodbcnnS_la_OBJECTS) $(libodbcnnS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drvcfg.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/nn/drvcfg.c0100644000076400007640000000210107363332141016004 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 13.MAY.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include static const char *aServer[] = { "localhost", /* put some public news servers here */ NULL }; int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty ) { hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof( aServer ) ); memcpy( hLastProperty->aPromptData, aServer, sizeof( aServer ) ); strncpy( hLastProperty->szName, "Server", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); return 1; } unixODBC-2.2.14-p2/DRVConfig/esoob/0040755000076400007640000000000011150523340015062 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/esoob/Makefile.am0100644000076400007640000000031611025707232017120 0ustar nicknicklib_LTLIBRARIES = libesoobS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libesoobS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ libesoobS_la_SOURCES = esoobS.c unixODBC-2.2.14-p2/DRVConfig/esoob/Makefile.in0100644000076400007640000003721011111035211017117 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/esoob DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libesoobS_la_LIBADD = am_libesoobS_la_OBJECTS = esoobS.lo libesoobS_la_OBJECTS = $(am_libesoobS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libesoobS_la_SOURCES) DIST_SOURCES = $(libesoobS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libesoobS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libesoobS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module libesoobS_la_SOURCES = esoobS.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/esoob/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/esoob/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libesoobS.la: $(libesoobS_la_OBJECTS) $(libesoobS_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libesoobS_la_LDFLAGS) $(libesoobS_la_OBJECTS) $(libesoobS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esoobS.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/esoob/esoobS.c0100644000076400007640000002076407363332141016476 0ustar nicknick/* * Copyright (c) 1999 Easysoft Ltd. All rights reserved. * * This file contains the ODBCINSTGetProperties function required by * unixODBC (http://www.unixodbc.org) to define Easysoft ODBC-ODBC Bridge * DSNs. * * $Id: esoobS.c,v 1.1.1.1 2001/10/17 16:40:01 lurcher Exp $ * * $Log: esoobS.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:01 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.3 2000/06/19 15:54:53 ngorham * * Added DisguiseWide attribute to esoob. * * Revision 1.2 2001/05/27 10:35:18 ngorham * * Added MetaDataBlockFetch connection attribute to esoob driver. * * Revision 1.1 2000/02/20 10:21:08 ngorham * * Setup files for Easysoft ODBC-ODBC Bridge * * Revision 1.4 2000/02/10 17:53:50 martin * Change protocol to transport. * * Revision 1.3 1999/09/06 10:58:55 martin * Add description and copyright. * * Revision 1.2 1999/09/06 10:49:55 martin * Add BlockFetchSize, MetaData_ID_Identifier and Unquote_Catalog_Fns. * * Revision 1.1 1999/09/06 09:44:37 martin * Initial revision * */ #include char *help_strings[] = { "Name of the server to connect to.", "Name of the network transport to use.", "Number of the port the server is listening on.", "Name of the remote DSN to connect to.", "Name of the user to log on to server box as.", "Password of the user to log on to server box as.", "Name of the remote database user.", "Password of the remote datbase user.", "Number of rows to bind in Block-Fetch-Mode.", "Remove quotes on catalog functions (Applix's AXData).", "Tell driver to treat strings as literal and treat wildcard " "characters as literals.", "Enable (1) or Disable (0) OOB's metadata blockfetchmode", "Enable (1) or Disable (0) disguise wide characters mode" }; int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty) { hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Server", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[0]) + 1); strcpy(hLastProperty->pszHelp, help_strings[0]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Transport", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "TCP/IP", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[1]) + 1); strcpy(hLastProperty->pszHelp, help_strings[1]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Port", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "8888", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[2]) + 1); strcpy(hLastProperty->pszHelp, help_strings[2]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "TargetDSN", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[3]) + 1); strcpy(hLastProperty->pszHelp, help_strings[3]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "LogonUser", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[4]) + 1); strcpy(hLastProperty->pszHelp, help_strings[4]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "LogonAuth", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[5]) + 1); strcpy(hLastProperty->pszHelp, help_strings[5]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "TargetUser", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[6]) + 1); strcpy(hLastProperty->pszHelp, help_strings[6]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "TargetAuth", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[7]) + 1); strcpy(hLastProperty->pszHelp, help_strings[7]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "BlockFetchSize", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "0", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[8]) + 1); strcpy(hLastProperty->pszHelp, help_strings[8]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Unquote_Catalog_Fns", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "0", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[9]) + 1); strcpy(hLastProperty->pszHelp, help_strings[9]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "MetaData_ID_Identifiers", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "0", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[10]) + 1); strcpy(hLastProperty->pszHelp, help_strings[10]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "MetaDataBlockFetch", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "1", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[11]) + 1); strcpy(hLastProperty->pszHelp, help_strings[11]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "DisguiseWide", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "0", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[12]) + 1); strcpy(hLastProperty->pszHelp, help_strings[12]); return 1; } unixODBC-2.2.14-p2/DRVConfig/oplodbc/0040755000076400007640000000000011150523340015375 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/oplodbc/README0100644000076400007640000000146007363332141016263 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. This software is a LinuxODBC component and * * may NOT be distributed seperately. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | LinuxODBC | | Driver Config for OpenLinks ODBC driver | +-------------------------------------------------------------+ Use this Driver Config when using the OpenLink ODBC Driver. Peter Harvey pharvey@codebydesign.com 25.FEB.99 unixODBC-2.2.14-p2/DRVConfig/oplodbc/Makefile.am0100644000076400007640000000032511025707245017437 0ustar nicknicklib_LTLIBRARIES = liboplodbcS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) liboplodbcS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ liboplodbcS_la_SOURCES = oplodbc.c unixODBC-2.2.14-p2/DRVConfig/oplodbc/Makefile.in0100644000076400007640000003726611111035213017447 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/oplodbc DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) liboplodbcS_la_LIBADD = am_liboplodbcS_la_OBJECTS = oplodbc.lo liboplodbcS_la_OBJECTS = $(am_liboplodbcS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(liboplodbcS_la_SOURCES) DIST_SOURCES = $(liboplodbcS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = liboplodbcS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) liboplodbcS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module liboplodbcS_la_SOURCES = oplodbc.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/oplodbc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/oplodbc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 liboplodbcS.la: $(liboplodbcS_la_OBJECTS) $(liboplodbcS_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(liboplodbcS_la_LDFLAGS) $(liboplodbcS_la_OBJECTS) $(liboplodbcS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oplodbc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/oplodbc/oplodbc.c0100644000076400007640000001610207754717565017215 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include /********************************************** * HELP **********************************************/ static const char *szHelpDatabase = "Databases on Server. I can try to present a list if Host, Login ID and Password are given."; static const char *szHelpPassword = "Your Password will be used to gain additional information from the DBMS and will not be saved anywhere."; /********************************************** * STATIC LOOKUP VALUES **********************************************/ static const char *aHost[] = { "localhost", NULL }; static const char *aServerType[] = { "DB2", "Informix 5", "Informix 6", "Informix 7", "Ingres 6", "Odbc", "OpenIngres 1", "OpenIngres 2", "Oracle 6", "Oracle 7", "Oracle 8", "Postgres 95", "Progress 63C", "Progress 63E", "Progress 63F", "Progress 72D", "Progress 73A", "Progress 73C", "Progress 73D", "Progress 73E", "Progress 81A", "Progress 82A", "Progress 82C", "Progress 83A", "Progress 90A", "Proxy", "Solid", "Sybase 4", "Sybase 10", "Sybase 11", "SQLServer", "Unify", "Velocis", "Virtuoso", NULL }; static const char *aProtocol[] = { "TCP/IP", NULL }; static const char *aYesNo[] = { "Yes", "No", NULL }; static const char *aTrueFalse[] = { "True", "False", NULL }; int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty ) { hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "ServerOptions", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Options", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; hLastProperty->pszHelp = malloc( strlen(szHelpDatabase)+1 ); strcpy( hLastProperty->pszHelp, szHelpDatabase ); strncpy( hLastProperty->szName, "Database", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof( aHost ) ); memcpy( hLastProperty->aPromptData, aHost, sizeof( aHost ) ); strncpy( hLastProperty->szName, "Host", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "UserName", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT_PASSWORD; hLastProperty->pszHelp = malloc( strlen(szHelpPassword)+1 ); strcpy( hLastProperty->pszHelp, szHelpPassword ); strncpy( hLastProperty->szName, "Password", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof(aServerType) ); memcpy( hLastProperty->aPromptData, aServerType, sizeof(aServerType) ); strncpy( hLastProperty->szName, "ServerType", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof(aProtocol) ); memcpy( hLastProperty->aPromptData, aProtocol, sizeof(aProtocol) ); strncpy( hLastProperty->szName, "Protocol", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "LastUser", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof(aYesNo) ); memcpy( hLastProperty->aPromptData, aYesNo, sizeof(aYesNo) ); strncpy( hLastProperty->szName, "ReadOnly", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof(aTrueFalse) ); memcpy( hLastProperty->aPromptData, aTrueFalse, sizeof(aTrueFalse) ); strncpy( hLastProperty->szName, "NoLoginBox", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "FetchBufferSize", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); return 1; } unixODBC-2.2.14-p2/DRVConfig/template/0040755000076400007640000000000011150523340015566 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/template/README0100644000076400007640000000203307363332141016451 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. This software is a LinuxODBC component and * * may NOT be distributed seperately. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | LinuxODBC | | Driver Config template | +-------------------------------------------------------------+ A Driver Config is too simple. So simple in fact that it would be pointless to create a real template. So go to a working Driver Config and check it out. I recommend starting with; 1. drvcfg1 - basics for an SQL Server type data source 2. drvcfg2 - basics for a File type data source Enjoy... Peter Harvey pharvey@codebydesign.com 25.FEB.99 unixODBC-2.2.14-p2/DRVConfig/template/Makefile.am0100644000076400007640000000000007363332141017615 0ustar nicknickunixODBC-2.2.14-p2/DRVConfig/template/Makefile.in0100644000076400007640000002365311111035217017637 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/template DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/template/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/template/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) 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-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .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-exec install-exec-am \ install-info install-info-am install-man 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-info-am # 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: unixODBC-2.2.14-p2/DRVConfig/tds/0040755000076400007640000000000011150523341014546 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/tds/Makefile.am0100644000076400007640000000030611025707270016604 0ustar nicknicklib_LTLIBRARIES = libtdsS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libtdsS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ libtdsS_la_SOURCES = tdsS.c unixODBC-2.2.14-p2/DRVConfig/tds/Makefile.in0100644000076400007640000003713611111035216016616 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/tds DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libtdsS_la_LIBADD = am_libtdsS_la_OBJECTS = tdsS.lo libtdsS_la_OBJECTS = $(am_libtdsS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libtdsS_la_SOURCES) DIST_SOURCES = $(libtdsS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libtdsS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libtdsS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module libtdsS_la_SOURCES = tdsS.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/tds/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/tds/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libtdsS.la: $(libtdsS_la_OBJECTS) $(libtdsS_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libtdsS_la_LDFLAGS) $(libtdsS_la_OBJECTS) $(libtdsS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdsS.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/tds/tdsS.c0100644000076400007640000000636407754717565015671 0ustar nicknick/* * This file contains the ODBCINSTGetProperties function required by * unixODBC (http://www.unixodbc.org) to define tds DSNs. * * This may be used for the FreeTDS driver or some other driver so * be careful about removing any properties. - PAH * * $Log: tdsS.c,v $ * Revision 1.3 2003/11/13 15:12:53 lurcher * * small change to ODBCConfig to have the password field in the driver * properties hide the password * Make both # and ; comments in ini files * * Revision 1.2 2002/02/22 17:27:20 peteralexharvey * - * * Revision 1.1.1.1 2001/10/17 16:40:01 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 2000/07/09 22:17:52 ngorham * * Added tds setup lib * */ #include static const char *aYesNo[] = { "Yes", "No", NULL }; int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty) { hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Servername", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = (char*)strdup( "Name of server to connect to. This should\nmatch the name used in the interfaces\nor freetds.conf file." ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Database", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = (char*)strdup( "Default database" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "UID", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = (char*)strdup( "User ID" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT_PASSWORD; strncpy( hLastProperty->szName, "PWD", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = (char*)strdup( "Password" ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Port", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "4100", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = (char*)strdup( "Port to connect to (some drivers do not use)" ); return 1; } unixODBC-2.2.14-p2/DRVConfig/txt/0040755000076400007640000000000011150523341014573 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/txt/README0100644000076400007640000000170607363332141015463 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | Driver Config for the Text File Driver | +-------------------------------------------------------------+ This is a driver setup which can be called by ODBC Config to allow the driver specific options to be set for the Text File Driver. This will allow ODBCConfig to prompt for Data Source options. +-------------------------------------------------------------+ | Peter Harvey pharvey@codebydesign.com | | http://www.unixodbc.org | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/DRVConfig/txt/Makefile.am0100644000076400007640000000032411025707303016626 0ustar nicknicklib_LTLIBRARIES = libodbctxtS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbctxtS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ libodbctxtS_la_SOURCES = drvcfg.c unixODBC-2.2.14-p2/DRVConfig/txt/Makefile.in0100644000076400007640000003724711111035220016641 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/txt DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libodbctxtS_la_LIBADD = am_libodbctxtS_la_OBJECTS = drvcfg.lo libodbctxtS_la_OBJECTS = $(am_libodbctxtS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbctxtS_la_SOURCES) DIST_SOURCES = $(libodbctxtS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbctxtS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libodbctxtS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module libodbctxtS_la_SOURCES = drvcfg.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/txt/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/txt/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbctxtS.la: $(libodbctxtS_la_OBJECTS) $(libodbctxtS_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbctxtS_la_LDFLAGS) $(libodbctxtS_la_OBJECTS) $(libodbctxtS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drvcfg.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/txt/drvcfg.c0100644000076400007640000000711111055554371016222 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 10.APR.01 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include /********************************************** * HELP **********************************************/ /********************************************** * STATIC LOOKUP VALUES **********************************************/ static const char *aColumnSeperators[] = { "|", ",", NULL }; static const char *aYesNo[] = { "Yes", "No", NULL }; int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty ) { hLastProperty->pNext = (HODBCINSTPROPERTY)calloc( 1, sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "Directory", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = strdup( "Directory where table files can/will be found.\nLeave blank for default (~/.odbctxt)." ); hLastProperty->pNext = (HODBCINSTPROPERTY)calloc( 1, sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof( aYesNo ) ); memcpy( hLastProperty->aPromptData, aYesNo, sizeof( aYesNo ) ); strncpy( hLastProperty->szName, "ReadOnly", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "No", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = strdup( "Set this to Yes if you do not want anyone changing the data." ); hLastProperty->pNext = (HODBCINSTPROPERTY)calloc( 1, sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof( aYesNo ) ); memcpy( hLastProperty->aPromptData, aYesNo, sizeof( aYesNo ) ); strncpy( hLastProperty->szName, "CaseSensitive", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "Yes", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = strdup( "Yes if data is compared as case-sensitive." ); hLastProperty->pNext = (HODBCINSTPROPERTY)calloc( 1, sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc( sizeof( aYesNo ) ); memcpy( hLastProperty->aPromptData, aYesNo, sizeof( aYesNo ) ); strncpy( hLastProperty->szName, "Catalog", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "No", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = strdup( "Yes if you want to use a special file to describe all tables/columns.\n\nNo if column names on the first row are enough." ); hLastProperty->pNext = (HODBCINSTPROPERTY)calloc( 1, sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof( aColumnSeperators ) ); memcpy( hLastProperty->aPromptData, aColumnSeperators, sizeof( aColumnSeperators ) ); strncpy( hLastProperty->szName, "ColumnSeperator", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "|", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = strdup( "Column seperator character used in table files.\nCAN NOT EXIST IN COLUMN VALUES." ); return 1; } unixODBC-2.2.14-p2/DRVConfig/Oracle/0040755000076400007640000000000011150523341015161 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/Oracle/Makefile.am0100644000076400007640000000032611025707205017217 0ustar nicknicklib_LTLIBRARIES = liboraodbcS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) liboraodbcS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ liboraodbcS_la_SOURCES = oraodbcS.c unixODBC-2.2.14-p2/DRVConfig/Oracle/Makefile.in0100644000076400007640000003725711111035204017232 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/Oracle DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) liboraodbcS_la_LIBADD = am_liboraodbcS_la_OBJECTS = oraodbcS.lo liboraodbcS_la_OBJECTS = $(am_liboraodbcS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(liboraodbcS_la_SOURCES) DIST_SOURCES = $(liboraodbcS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = liboraodbcS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) liboraodbcS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module liboraodbcS_la_SOURCES = oraodbcS.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/Oracle/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/Oracle/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 liboraodbcS.la: $(liboraodbcS_la_OBJECTS) $(liboraodbcS_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(liboraodbcS_la_LDFLAGS) $(liboraodbcS_la_OBJECTS) $(liboraodbcS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oraodbcS.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/Oracle/oraodbcS.c0100644000076400007640000000737407707017161017104 0ustar nicknick/* * This file contains the ODBCINSTGetProperties function required by * unixODBC (http://www.unixodbc.org) to define tds DSNs. * * $Log: oraodbcS.c,v $ * Revision 1.3 2003/07/21 17:10:09 lurcher * * Start new version and add missing comma to oracle setup * * Revision 1.2 2002/12/20 11:36:46 lurcher * * Update DMEnvAttr code to allow setting in the odbcinst.ini entry * * Revision 1.1.1.1 2001/10/17 16:40:01 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:52 nick * Imported Sources * * Revision 1.1 2000/08/11 12:45:38 ngorham * * Add Oracle setup * */ #include static const char *aYesNo[] = { "Yes", "No", NULL }; static char *help_strings[] = { "Name of the server to connect to.", "User name to connect with.", "Password of user.", "Path name of the Oracle version to use.", "Path name of the TNS files." }; int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty) { hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "DB", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[0]) + 1); strcpy(hLastProperty->pszHelp, help_strings[0]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "USER", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[1]) + 1); strcpy(hLastProperty->pszHelp, help_strings[1]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "PASSWORD", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[2]) + 1); strcpy(hLastProperty->pszHelp, help_strings[2]); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; strncpy( hLastProperty->szName, "ORACLE_HOME", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[3]) + 1); strcpy(hLastProperty->pszHelp, help_strings[3]); /* Idea for the future: * make the nPromptType an ODBCINST_PROMPTTYPE_COMBOBOX and * present the user with aPromptData containing * the current value of the ORACLE_HOME environment variable * same for TNS_ADMIN below */ hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; strncpy( hLastProperty->szName, "TNS_ADMIN", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pszHelp = malloc(strlen(help_strings[4]) + 1); strcpy(hLastProperty->pszHelp, help_strings[4]); return 1; } unixODBC-2.2.14-p2/DRVConfig/sapdb/0040755000076400007640000000000011150523341015045 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/sapdb/README0100644000076400007640000000233607363332141015735 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | Driver Config for SAP DB SQL Server options | +-------------------------------------------------------------+ SAP DB awaits it's odbc.ini file in /usr/spool/sql/config/odbc.ini. That's weird enought, because it's not even FHS (that would be /var/spool/...) There are two ways you can fix this: - Edit the libsqlod.so file - make a symlink from /usr/spool/sql/config/odbc.ini to /etc/odbc.ini Also note that currently (09-Mar-2001) unixODBC crashes when you use the libsqlod from the sapdb-srv or sapdb-if RPM packages. If you use the one from the the sapdb-web RPM, then it works. +-------------------------------------------------------------+ | Holger Schurig holgerschurig@gmx.de | | http://home.nikocity.de/hschurig | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/DRVConfig/sapdb/Makefile.am0100644000076400007640000000034111025707253017103 0ustar nicknicklib_LTLIBRARIES = libsapdbS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libsapdbS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ libsapdbS_la_SOURCES = sapdb.c EXTRA_DIST = README unixODBC-2.2.14-p2/DRVConfig/sapdb/Makefile.in0100644000076400007640000003724111111035215017111 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/sapdb DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libsapdbS_la_LIBADD = am_libsapdbS_la_OBJECTS = sapdb.lo libsapdbS_la_OBJECTS = $(am_libsapdbS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libsapdbS_la_SOURCES) DIST_SOURCES = $(libsapdbS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libsapdbS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libsapdbS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module libsapdbS_la_SOURCES = sapdb.c EXTRA_DIST = README all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/sapdb/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/sapdb/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libsapdbS.la: $(libsapdbS_la_OBJECTS) $(libsapdbS_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libsapdbS_la_LDFLAGS) $(libsapdbS_la_OBJECTS) $(libsapdbS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sapdb.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/sapdb/sapdb.c0100644000076400007640000000601510240071217016300 0ustar nicknick/************************************************** * This code was created by Holger Schurig @ mn-logistik.de. * Released under LGPL 08.MAR.2001 * * Additional MaxDB ODBC properties added by * Martin Kittel , 08.05.2005 * ----------------------------------------------- **************************************************/ #include static const char *aHost[] = { "localhost", NULL }; static const char *aSqlModes[] = { "INTERNAL", "ORACLE", "ANSI", "DB2", NULL }; static const char *aIsoLevel[] = { "Uncommitted", "Committed", "Repeatable", "Serializable", NULL }; int ODBCINSTGetProperties( HODBCINSTPROPERTY hLastProperty ) { hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "ServerNode", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "localhost", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy( hLastProperty->szName, "ServerDB", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof( aSqlModes ) ); memcpy( hLastProperty->aPromptData, aSqlModes, sizeof( aSqlModes ) ); strncpy( hLastProperty->szName, "SQLMode", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "INTERNAL", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc( sizeof( aIsoLevel ) ); memcpy( hLastProperty->aPromptData, aIsoLevel, sizeof( aIsoLevel ) ); strncpy( hLastProperty->szName, "IsolationLevel", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "Committed", INI_MAX_PROPERTY_VALUE ); hLastProperty->pNext = (HODBCINSTPROPERTY)malloc( sizeof(ODBCINSTPROPERTY) ); hLastProperty = hLastProperty->pNext; memset( hLastProperty, 0, sizeof(ODBCINSTPROPERTY) ); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; strncpy( hLastProperty->szName, "TraceFileName", INI_MAX_PROPERTY_NAME ); strncpy( hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE ); return 1; } unixODBC-2.2.14-p2/DRVConfig/Mimer/0040755000076400007640000000000011150523341015025 5ustar nicknickunixODBC-2.2.14-p2/DRVConfig/Mimer/Makefile.am0100644000076400007640000000031511025707157017067 0ustar nicknicklib_LTLIBRARIES = libmimerS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libmimerS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ libmimerS_la_SOURCES = mimerS.c unixODBC-2.2.14-p2/DRVConfig/Mimer/Makefile.in0100644000076400007640000003720711111035200017065 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = DRVConfig/Mimer DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libmimerS_la_LIBADD = am_libmimerS_la_OBJECTS = mimerS.lo libmimerS_la_OBJECTS = $(am_libmimerS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libmimerS_la_SOURCES) DIST_SOURCES = $(libmimerS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libmimerS.la INCLUDES = -I@top_srcdir@/include $(LTDLINCL) libmimerS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module libmimerS_la_SOURCES = mimerS.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DRVConfig/Mimer/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DRVConfig/Mimer/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libmimerS.la: $(libmimerS_la_OBJECTS) $(libmimerS_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libmimerS_la_LDFLAGS) $(libmimerS_la_OBJECTS) $(libmimerS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mimerS.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/DRVConfig/Mimer/mimerS.c0100644000076400007640000001043510013641552016427 0ustar nicknick/* * This file contains the ODBCINSTGetProperties function. * * It is required by unixODBC (http://www.unixodbc.org) to define DSNs. * * This version is the setup for Mimer SQL (http://developer.mimer.se). * * Revision 1.1 2004/01/21 per.bengtsson@mimer.se * */ #include static const char *vHost[] = { "localhost", NULL }; static const char *vPort[] = { "1360", NULL }; static const char *vUser[] = { "SYSADM", NULL }; static const char *vDescr[] = { "Mimer SQL", NULL }; static const char *vYesNo[] = { "Yes", "No", NULL }; int ODBCINSTGetProperties(HODBCINSTPROPERTY hLastProperty) { /* * Database name */ hLastProperty->pNext = (HODBCINSTPROPERTY)malloc(sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset(hLastProperty, 0, sizeof(ODBCINSTPROPERTY)); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy(hLastProperty->szName, "Database", INI_MAX_PROPERTY_NAME); strncpy(hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE); hLastProperty->pszHelp = strdup("The name of the Mimer SQL database server"); /* * Host name */ hLastProperty->pNext = (HODBCINSTPROPERTY)malloc(sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset(hLastProperty, 0, sizeof(ODBCINSTPROPERTY)); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc(sizeof(vHost)); memcpy(hLastProperty->aPromptData, vHost, sizeof(vHost)); strncpy(hLastProperty->szName, "Host", INI_MAX_PROPERTY_NAME); strncpy(hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE); hLastProperty->pszHelp = strdup("Hostname or IP address of computer running the Mimer SQL database server"); /* * Port number */ hLastProperty->pNext = (HODBCINSTPROPERTY)malloc(sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset(hLastProperty, 0, sizeof(ODBCINSTPROPERTY)); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc(sizeof(vPort)); memcpy(hLastProperty->aPromptData, vPort, sizeof(vPort)); strncpy(hLastProperty->szName, "Port", INI_MAX_PROPERTY_NAME); strncpy(hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE); hLastProperty->pszHelp = strdup("Port number (default is 1360)"); /* * User name */ hLastProperty->pNext = (HODBCINSTPROPERTY)malloc(sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset(hLastProperty, 0, sizeof(ODBCINSTPROPERTY)); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_COMBOBOX; hLastProperty->aPromptData = malloc(sizeof(vUser)); memcpy(hLastProperty->aPromptData, vUser, sizeof(vUser)); strncpy(hLastProperty->szName, "User", INI_MAX_PROPERTY_NAME); strncpy(hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE); hLastProperty->pszHelp = strdup("Database user to connect as (optional)"); /* * Password */ hLastProperty->pNext = (HODBCINSTPROPERTY)malloc(sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset(hLastProperty, 0, sizeof(ODBCINSTPROPERTY)); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_TEXTEDIT; strncpy(hLastProperty->szName, "Password", INI_MAX_PROPERTY_NAME); strncpy(hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE); hLastProperty->pszHelp = strdup("Password for the database user (optional)"); /* * Trace option */ hLastProperty->pNext = (HODBCINSTPROPERTY)malloc(sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset(hLastProperty, 0, sizeof(ODBCINSTPROPERTY)); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_LISTBOX; hLastProperty->aPromptData = malloc(sizeof(vYesNo)); memcpy(hLastProperty->aPromptData, vYesNo, sizeof(vYesNo)); strncpy(hLastProperty->szName, "Trace", INI_MAX_PROPERTY_NAME); strcpy(hLastProperty->szValue, "No"); hLastProperty->pszHelp = strdup("ODBC trace feature (optional)"); /* * Trace file name */ hLastProperty->pNext = (HODBCINSTPROPERTY)malloc(sizeof(ODBCINSTPROPERTY)); hLastProperty = hLastProperty->pNext; memset(hLastProperty, 0, sizeof(ODBCINSTPROPERTY)); hLastProperty->nPromptType = ODBCINST_PROMPTTYPE_FILENAME; strncpy(hLastProperty->szName, "TraceFile", INI_MAX_PROPERTY_NAME); strncpy(hLastProperty->szValue, "", INI_MAX_PROPERTY_VALUE); hLastProperty->pszHelp = strdup("ODBC trace file name (used if Trace is enabled)"); return 1; } /**************************************************/ unixODBC-2.2.14-p2/Drivers/0040755000076400007640000000000011150523345013615 5ustar nicknickunixODBC-2.2.14-p2/Drivers/README0100644000076400007640000000354707363332151014507 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | Drivers | +-------------------------------------------------------------+ Some unixODBC drivers have been coded from scratch while others have been integerated (tweeked to compile and tested) into unixODBC. It is unlikely that you have all of the required libs to build all of these drivers so edit the Makefile in this dir... comment out any unwanted drivers. Getting all drivers up to the latest ODBC Level (ie 3.51) is an ongoing effort. You will find that each driver will implement a different level of compliance but, hopefully, enough to be quite usefull. If you develop a new driver than please let us know. We have created a Template to help you (see template dir). Drivers which are under development or are currently being tested with unixODBC may not be included in this distribution and some others may have to be downloaded from the DBMS vendor. The txt and nn drivers are good candidates for testing when you do not want to install a full DBMS. The txt driver will use a text file based database which may take a bit of time to understand in terms of setting it up. The nn driver uses internet News Servers as a data server so it is, perhaps, the easiest to get started with. +-------------------------------------------------------------+ | Peter Harvey pharvey@codebydesign.com | | www.genix.net/unixODBC | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/Drivers/Makefile.am0100644000076400007640000000016111057267456015662 0ustar nicknickif DRIVERS SUBDIRS = \ PostgreSQL \ Postgre7.1 \ odbc \ template \ MiniSQL \ nn endif unixODBC-2.2.14-p2/Drivers/Makefile.in0100644000076400007640000003663411111035227015665 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = Drivers DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = PostgreSQL Postgre7.1 odbc template MiniSQL nn DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @DRIVERS_TRUE@SUBDIRS = \ @DRIVERS_TRUE@ PostgreSQL \ @DRIVERS_TRUE@ Postgre7.1 \ @DRIVERS_TRUE@ odbc \ @DRIVERS_TRUE@ template \ @DRIVERS_TRUE@ MiniSQL \ @DRIVERS_TRUE@ nn all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Drivers/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Drivers/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # 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): @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; \ (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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @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; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ 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) 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-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: 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: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # 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: unixODBC-2.2.14-p2/Drivers/PostgreSQL/0040755000076400007640000000000011150523341015614 5ustar nicknickunixODBC-2.2.14-p2/Drivers/PostgreSQL/README0100644000076400007640000000234607405566541016517 0ustar nicknick*************************************************************** * This code is LGPL * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | PostgreSQL Driver | +-------------------------------------------------------------+ This is the PostgreSQL ODBC Driver with changes and enhancements made during testing with unixODBC. The driver source originated from the Win32 zip download on Byrons web site and was not derived from the source included in the server distribution. This was done to ensure that we started with the most current code. News of this source was posted to the pgsql-interfaces news group and it is hoped that these enhancements have since been integrated into the original source. +-------------------------------------------------------------+ | Peter Harvey pharvey@codebydesign.com | | http://www.postgresql.org | | http://www.unixODBC.org | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/Drivers/PostgreSQL/Makefile.am0100644000076400007640000000211411025707420017646 0ustar nicknicklib_LTLIBRARIES = libodbcpsql.la INCLUDES = -I@top_srcdir@/include libodbcpsql_la_LDFLAGS = \ -no-undefined \ -version-info 1:0:0 \ $(LIBSOCKET) $(LIBNSL) \ -module DEFS = -DUNIXODBC @DEFS@ EXTRA_DIST = \ bind.h \ columninfo.h \ connection.h \ convert.h \ dlg_specific.h \ environ.h \ lobj.h \ misc.h \ pgtypes.h \ psqlodbc.h \ qresult.h \ resource.h \ socket.h \ statement.h \ tuple.h \ tuplelist.h libodbcpsql_la_LIBADD = \ ../../lst/liblstlc.la \ ../../log/libloglc.la \ ../../ini/libinilc.la \ ../../odbcinst/libodbcinstlc.la \ $(LIBLTDL) $(LIBADD_DL) \ $(LIBADD_CRYPT) $(LIBADD_POW) libodbcpsql_la_DEPENDENCIES = \ ../../lst/liblstlc.la \ ../../log/libloglc.la \ ../../ini/libinilc.la \ ../../odbcinst/libodbcinstlc.la \ ../../extras/libodbcextraslc.la libodbcpsql_la_SOURCES = \ bind.c \ columninfo.c \ connection.c \ convert.c \ dlg_specific.c \ drvconn.c \ environ.c \ execute.c \ info.c \ lobj.c \ misc.c \ options.c \ parse.c \ pgtypes.c \ psqlodbc.c \ qresult.c \ results.c \ socket.c \ statement.c \ tuple.c \ tuplelist.c unixODBC-2.2.14-p2/Drivers/PostgreSQL/Makefile.in0100644000076400007640000004426711111035234017667 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = Drivers/PostgreSQL DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = am_libodbcpsql_la_OBJECTS = bind.lo columninfo.lo connection.lo \ convert.lo dlg_specific.lo drvconn.lo environ.lo execute.lo \ info.lo lobj.lo misc.lo options.lo parse.lo pgtypes.lo \ psqlodbc.lo qresult.lo results.lo socket.lo statement.lo \ tuple.lo tuplelist.lo libodbcpsql_la_OBJECTS = $(am_libodbcpsql_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcpsql_la_SOURCES) DIST_SOURCES = $(libodbcpsql_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbcpsql.la INCLUDES = -I@top_srcdir@/include libodbcpsql_la_LDFLAGS = \ -no-undefined \ -version-info 1:0:0 \ $(LIBSOCKET) $(LIBNSL) \ -module EXTRA_DIST = \ bind.h \ columninfo.h \ connection.h \ convert.h \ dlg_specific.h \ environ.h \ lobj.h \ misc.h \ pgtypes.h \ psqlodbc.h \ qresult.h \ resource.h \ socket.h \ statement.h \ tuple.h \ tuplelist.h libodbcpsql_la_LIBADD = \ ../../lst/liblstlc.la \ ../../log/libloglc.la \ ../../ini/libinilc.la \ ../../odbcinst/libodbcinstlc.la \ $(LIBLTDL) $(LIBADD_DL) \ $(LIBADD_CRYPT) $(LIBADD_POW) libodbcpsql_la_DEPENDENCIES = \ ../../lst/liblstlc.la \ ../../log/libloglc.la \ ../../ini/libinilc.la \ ../../odbcinst/libodbcinstlc.la \ ../../extras/libodbcextraslc.la libodbcpsql_la_SOURCES = \ bind.c \ columninfo.c \ connection.c \ convert.c \ dlg_specific.c \ drvconn.c \ environ.c \ execute.c \ info.c \ lobj.c \ misc.c \ options.c \ parse.c \ pgtypes.c \ psqlodbc.c \ qresult.c \ results.c \ socket.c \ statement.c \ tuple.c \ tuplelist.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Drivers/PostgreSQL/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Drivers/PostgreSQL/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcpsql.la: $(libodbcpsql_la_OBJECTS) $(libodbcpsql_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbcpsql_la_LDFLAGS) $(libodbcpsql_la_OBJECTS) $(libodbcpsql_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/columninfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlg_specific.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drvconn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/environ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lobj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgtypes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psqlodbc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qresult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/results.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tuple.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tuplelist.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/Drivers/PostgreSQL/bind.c0100644000076400007640000003071210564052116016701 0ustar nicknick /* Module: bind.c * * Description: This module contains routines related to binding * columns and parameters. * * Classes: BindInfoClass, ParameterInfoClass * * API functions: SQLBindParameter, SQLBindCol, SQLDescribeParam, SQLNumParams, * SQLParamOptions(NI) * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "bind.h" #include "environ.h" #include "statement.h" #include "qresult.h" #include "pgtypes.h" #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_MALLOC_H #include #elif HAVE_SYS_MALLOC_H #include #endif #ifndef WIN32 #ifdef UNIXODBC #include #include #else #include "iodbc.h" #include "isql.h" #include "isqlext.h" #endif #else #include #include #endif /* Bind parameters on a statement handle */ SQLRETURN SQLBindParameter( SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT fParamType, SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLULEN cbColDef, SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue) { StatementClass *stmt = (StatementClass *) hstmt; static char *func="SQLBindParameter"; mylog( "%s: entering...\n", func); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if(stmt->parameters_allocated < ipar) { ParameterInfoClass *old_parameters; int i, old_parameters_allocated; old_parameters = stmt->parameters; old_parameters_allocated = stmt->parameters_allocated; stmt->parameters = (ParameterInfoClass *) malloc(sizeof(ParameterInfoClass)*(ipar)); if ( ! stmt->parameters) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Could not allocate memory for statement parameters"; SC_log_error(func, "", stmt); return SQL_ERROR; } stmt->parameters_allocated = ipar; /* copy the old parameters over */ for(i = 0; i < old_parameters_allocated; i++) { /* a structure copy should work */ stmt->parameters[i] = old_parameters[i]; } /* get rid of the old parameters, if there were any */ if(old_parameters) free(old_parameters); /* zero out the newly allocated parameters (in case they skipped some, so we don't accidentally try to use them later) */ for(; i < stmt->parameters_allocated; i++) { stmt->parameters[i].buflen = 0; stmt->parameters[i].buffer = 0; stmt->parameters[i].used = 0; stmt->parameters[i].paramType = 0; stmt->parameters[i].CType = 0; stmt->parameters[i].SQLType = 0; stmt->parameters[i].precision = 0; stmt->parameters[i].scale = 0; stmt->parameters[i].data_at_exec = FALSE; stmt->parameters[i].lobj_oid = 0; stmt->parameters[i].EXEC_used = NULL; stmt->parameters[i].EXEC_buffer = NULL; } } ipar--; /* use zero based column numbers for the below part */ /* store the given info */ stmt->parameters[ipar].buflen = cbValueMax; stmt->parameters[ipar].buffer = rgbValue; stmt->parameters[ipar].used = pcbValue; stmt->parameters[ipar].paramType = fParamType; stmt->parameters[ipar].CType = fCType; stmt->parameters[ipar].SQLType = fSqlType; stmt->parameters[ipar].precision = cbColDef; stmt->parameters[ipar].scale = ibScale; /* If rebinding a parameter that had data-at-exec stuff in it, then free that stuff */ if (stmt->parameters[ipar].EXEC_used) { free(stmt->parameters[ipar].EXEC_used); stmt->parameters[ipar].EXEC_used = NULL; } if (stmt->parameters[ipar].EXEC_buffer) { if ( stmt -> parameters[ ipar ].SQLType != SQL_LONGVARBINARY ) free(stmt->parameters[ipar].EXEC_buffer); stmt->parameters[ipar].EXEC_buffer = NULL; } /* Data at exec macro only valid for C char/binary data */ if ((fSqlType == SQL_LONGVARBINARY || fSqlType == SQL_LONGVARCHAR) && pcbValue && (*pcbValue <= SQL_LEN_DATA_AT_EXEC_OFFSET || *pcbValue == SQL_DATA_AT_EXEC )) stmt->parameters[ipar].data_at_exec = TRUE; else stmt->parameters[ipar].data_at_exec = FALSE; mylog("SQLBindParamater: ipar=%d, paramType=%d, fCType=%d, fSqlType=%d, cbColDef=%d, ibScale=%d, rgbValue=%d, *pcbValue = %d, data_at_exec = %d\n", ipar, fParamType, fCType, fSqlType, cbColDef, ibScale, rgbValue, pcbValue ? *pcbValue: -777, stmt->parameters[ipar].data_at_exec); return SQL_SUCCESS; } /* - - - - - - - - - Associate a user-supplied buffer with a database column. */ RETCODE SQL_API PG__SQLBindCol( HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue) { StatementClass *stmt = (StatementClass *) hstmt; static char *func="SQLBindCol"; mylog( "%s: entering...\n", func); mylog("**** SQLBindCol: stmt = %u, icol = %d\n", stmt, icol); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } SC_clear_error(stmt); if( stmt->status == STMT_EXECUTING) { stmt->errormsg = "Can't bind columns while statement is still executing."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } /* If the bookmark column is being bound, then just save it */ if (icol == 0) { if (rgbValue == NULL) { stmt->bookmark.buffer = NULL; stmt->bookmark.used = NULL; } else { /* Make sure it is the bookmark data type */ if ( fCType != SQL_C_BOOKMARK && fCType != SQL_C_BINARY ) { stmt->errormsg = "Column 0 is not of type SQL_C_BOOKMARK"; stmt->errornumber = STMT_PROGRAM_TYPE_OUT_OF_RANGE; SC_log_error(func, "", stmt); return SQL_ERROR; } stmt->bookmark.buffer = rgbValue; stmt->bookmark.used = pcbValue; } return SQL_SUCCESS; } /* allocate enough bindings if not already done Most likely, execution of a statement would have setup the necessary bindings. But some apps call BindCol before any statement is executed. */ if ( icol > stmt->bindings_allocated) extend_bindings(stmt, icol); /* check to see if the bindings were allocated */ if ( ! stmt->bindings) { stmt->errormsg = "Could not allocate memory for bindings."; stmt->errornumber = STMT_NO_MEMORY_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } icol--; /* use zero based col numbers from here out */ /* Reset for SQLGetData */ stmt->bindings[icol].data_left = -1; if (rgbValue == NULL) { /* we have to unbind the column */ stmt->bindings[icol].buflen = 0; stmt->bindings[icol].buffer = NULL; stmt->bindings[icol].used = NULL; stmt->bindings[icol].returntype = SQL_C_CHAR; } else { /* ok, bind that column */ stmt->bindings[icol].buflen = cbValueMax; stmt->bindings[icol].buffer = rgbValue; stmt->bindings[icol].used = pcbValue; stmt->bindings[icol].returntype = fCType; mylog(" bound buffer[%d] = %u\n", icol, stmt->bindings[icol].buffer); } return SQL_SUCCESS; } SQLRETURN SQLBindCol(SQLHSTMT hstmt, SQLUSMALLINT icol, SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue) { return PG__SQLBindCol( hstmt, icol, fCType, rgbValue, cbValueMax, pcbValue ); } /* - - - - - - - - - Returns the description of a parameter marker. This function is listed as not being supported by SQLGetFunctions() because it is used to describe "parameter markers" (not bound parameters), in which case, the dbms should return info on the markers. Since Postgres doesn't support that, it is best to say this function is not supported and let the application assume a data type (most likely varchar). */ RETCODE SQL_API SQLDescribeParam( HSTMT hstmt, UWORD ipar, SWORD *pfSqlType, SQLULEN *pcbColDef, SWORD *pibScale, SWORD *pfNullable) { StatementClass *stmt = (StatementClass *) hstmt; static char *func = "SQLDescribeParam"; mylog( "%s: entering...\n", func); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if( (ipar < 1) || (ipar > stmt->parameters_allocated) ) { stmt->errormsg = "Invalid parameter number for SQLDescribeParam."; stmt->errornumber = STMT_BAD_PARAMETER_NUMBER_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } ipar--; /* This implementation is not very good, since it is supposed to describe parameter markers, not bound parameters. */ if(pfSqlType) *pfSqlType = stmt->parameters[ipar].SQLType; if(pcbColDef) *pcbColDef = stmt->parameters[ipar].precision; if(pibScale) *pibScale = stmt->parameters[ipar].scale; if(pfNullable) *pfNullable = pgtype_nullable(stmt, stmt->parameters[ipar].paramType); return SQL_SUCCESS; } /* - - - - - - - - - Sets multiple values (arrays) for the set of parameter markers. */ RETCODE SQL_API SQLParamOptions( HSTMT hstmt, SQLULEN crow, SQLULEN FAR *pirow) { static char *func = "SQLParamOptions"; mylog( "%s: entering...\n", func); SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } /* - - - - - - - - - This function should really talk to the dbms to determine the number of "parameter markers" (not bound parameters) in the statement. But, since Postgres doesn't support that, the driver should just count the number of markers and return that. The reason the driver just can't say this function is unsupported like it does for SQLDescribeParam is that some applications don't care and try to call it anyway. If the statement does not have parameters, it should just return 0. */ RETCODE SQL_API SQLNumParams( HSTMT hstmt, SWORD FAR *pcpar) { StatementClass *stmt = (StatementClass *) hstmt; char in_quote = FALSE; unsigned int i; static char *func = "SQLNumParams"; mylog( "%s: entering...\n", func); if(!stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if (pcpar) *pcpar = 0; else { SC_log_error(func, "pcpar was null", stmt); return SQL_ERROR; } if(!stmt->statement) { /* no statement has been allocated */ stmt->errormsg = "SQLNumParams called with no statement ready."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } else { int stlen=(int)strlen(stmt->statement); for(i=0; i < stlen; i++) { if(stmt->statement[i] == '?' && !in_quote) (*pcpar)++; else { if (stmt->statement[i] == '\'') in_quote = (in_quote ? FALSE : TRUE); } } return SQL_SUCCESS; } } /******************************************************************** * Bindings Implementation */ BindInfoClass * create_empty_bindings(int num_columns) { BindInfoClass *new_bindings; int i; new_bindings = (BindInfoClass *)malloc(num_columns * sizeof(BindInfoClass)); if(!new_bindings) { return 0; } for(i=0; i < num_columns; i++) { new_bindings[i].buflen = 0; new_bindings[i].buffer = NULL; new_bindings[i].used = NULL; new_bindings[i].data_left = -1; } return new_bindings; } void extend_bindings(StatementClass *stmt, int num_columns) { static char *func="extend_bindings"; BindInfoClass *new_bindings; int i; mylog("%s: entering ... stmt=%u, bindings_allocated=%d, num_columns=%d\n", func, stmt, stmt->bindings_allocated, num_columns); /* if we have too few, allocate room for more, and copy the old */ /* entries into the new structure */ if(stmt->bindings_allocated < num_columns) { new_bindings = create_empty_bindings(num_columns); if ( ! new_bindings) { mylog("%s: unable to create %d new bindings from %d old bindings\n", func, num_columns, stmt->bindings_allocated); if (stmt->bindings) { free(stmt->bindings); stmt->bindings = NULL; } stmt->bindings_allocated = 0; return; } if(stmt->bindings) { for(i=0; ibindings_allocated; i++) new_bindings[i] = stmt->bindings[i]; free(stmt->bindings); } stmt->bindings = new_bindings; stmt->bindings_allocated = num_columns; } /* There is no reason to zero out extra bindings if there are more than needed. If an app has allocated extra bindings, let it worry about it by unbinding those columns. SQLBindCol(1..) ... SQLBindCol(10...) # got 10 bindings SQLExecDirect(...) # returns 5 cols SQLExecDirect(...) # returns 10 cols (now OK) */ mylog("exit extend_bindings\n"); } unixODBC-2.2.14-p2/Drivers/PostgreSQL/columninfo.c0100644000076400007640000001002707530133126020133 0ustar nicknick /* Module: columninfo.c * * Description: This module contains routines related to * reading and storing the field information from a query. * * Classes: ColumnInfoClass (Functions prefix: "CI_") * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include "columninfo.h" #include "connection.h" #include "socket.h" #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_MALLOC_H #include #elif HAVE_SYS_MALLOC_H #include #endif #include ColumnInfoClass * CI_Constructor() { ColumnInfoClass *rv; rv = (ColumnInfoClass *) malloc(sizeof(ColumnInfoClass)); if (rv) { rv->num_fields = 0; rv->name = NULL; rv->adtid = NULL; rv->adtsize = NULL; rv->display_size = NULL; rv->atttypmod = NULL; } return rv; } void CI_Destructor(ColumnInfoClass *self) { if ( self ) { CI_free_memory(self); free(self); } } /* Read in field descriptions. If self is not null, then also store the information. If self is null, then just read, don't store. */ char CI_read_fields(ColumnInfoClass *self, ConnectionClass *conn) { Int2 lf; int new_num_fields; Oid new_adtid; Int2 new_adtsize; Int4 new_atttypmod = -1; char new_field_name[MAX_MESSAGE_LEN+1]; SocketClass *sock; ConnInfo *ci; sock = CC_get_socket(conn); ci = &conn->connInfo; /* at first read in the number of fields that are in the query */ new_num_fields = (Int2) SOCK_get_int(sock, sizeof(Int2)); mylog("num_fields = %d\n", new_num_fields); if (self) { /* according to that allocate memory */ CI_set_num_fields(self, new_num_fields); } /* now read in the descriptions */ for(lf = 0; lf < new_num_fields; lf++) { SOCK_get_string(sock, new_field_name, MAX_MESSAGE_LEN); new_adtid = (Oid) SOCK_get_int(sock, 4); new_adtsize = (Int2) SOCK_get_int(sock, 2); /* If 6.4 protocol, then read the atttypmod field */ if ( ! PROTOCOL_63(ci) && ! PROTOCOL_62(ci)) { mylog("READING ATTTYPMOD\n"); new_atttypmod = (Int4) SOCK_get_int(sock, 4); /* Subtract the header length */ new_atttypmod -= 4; if (new_atttypmod < 0) new_atttypmod = -1; } mylog("CI_read_fields: fieldname='%s', adtid=%d, adtsize=%d, atttypmod=%d\n", new_field_name, new_adtid, new_adtsize, new_atttypmod); if (self) CI_set_field_info(self, lf, new_field_name, new_adtid, new_adtsize, new_atttypmod); } return (SOCK_get_errcode(sock) == 0); } void CI_free_memory(ColumnInfoClass *self) { register Int2 lf; int num_fields = self->num_fields; for (lf = 0; lf < num_fields; lf++) { if( self->name[lf]) free (self->name[lf]); } /* Safe to call even if null */ self->num_fields = 0; if (self->name) free(self->name); self->name = NULL; if (self->adtid) free(self->adtid); self->adtid = NULL; if (self->adtsize) free(self->adtsize); self->adtsize = NULL; if (self->display_size) free(self->display_size); self->display_size = NULL; if (self->atttypmod) free(self->atttypmod); self->atttypmod = NULL; } void CI_set_num_fields(ColumnInfoClass *self, int new_num_fields) { CI_free_memory(self); /* always safe to call */ self->num_fields = new_num_fields; self->name = (char **) malloc (sizeof(char *) * self->num_fields); self->adtid = (Oid *) malloc (sizeof(Oid) * self->num_fields); self->adtsize = (Int2 *) malloc (sizeof(Int2) * self->num_fields); self->display_size = (Int2 *) malloc(sizeof(Int2) * self->num_fields); self->atttypmod = (Int4 *) malloc(sizeof(Int4) * self->num_fields); } void CI_set_field_info(ColumnInfoClass *self, int field_num, char *new_name, Oid new_adtid, Int2 new_adtsize, Int4 new_atttypmod) { /*// check bounds */ if((field_num < 0) || (field_num >= self->num_fields)) { return; } /*// store the info */ self->name[field_num] = strdup(new_name); self->adtid[field_num] = new_adtid; self->adtsize[field_num] = new_adtsize; self->atttypmod[field_num] = new_atttypmod; self->display_size[field_num] = 0; } unixODBC-2.2.14-p2/Drivers/PostgreSQL/connection.c0100644000076400007640000011347010625610770020133 0ustar nicknick /* Module: connection.c * * Description: This module contains routines related to * connecting to and disconnecting from the Postgres DBMS. * * Classes: ConnectionClass (Functions prefix: "CC_") * * API functions: SQLAllocConnect, SQLConnect, SQLDisconnect, SQLFreeConnect, * SQLBrowseConnect(NI) * * Comments: See "notice.txt" for copyright and license information. * */ #include "environ.h" #include "connection.h" #include "socket.h" #include "statement.h" #include "qresult.h" #include "lobj.h" #include "dlg_specific.h" #include #include #ifdef WIN32 #include #endif #ifdef UNIXODBC #include #ifdef HAVE_CRYPT_H #include #endif #endif #define STMT_INCREMENT 16 /* how many statement holders to allocate at a time */ extern GLOBAL_VALUES globals; RETCODE SQL_API SQLAllocConnect( HENV henv, HDBC FAR *phdbc) { EnvironmentClass *env = (EnvironmentClass *)henv; ConnectionClass *conn; static char *func="SQLAllocConnect"; mylog( "%s: entering...\n", func); conn = CC_Constructor(); mylog("**** %s: henv = %u, conn = %u\n", func, henv, conn); if( ! conn) { env->errormsg = "Couldn't allocate memory for Connection object."; env->errornumber = ENV_ALLOC_ERROR; *phdbc = SQL_NULL_HDBC; EN_log_error(func, "", env); return SQL_ERROR; } if ( ! EN_add_connection(env, conn)) { env->errormsg = "Maximum number of connections exceeded."; env->errornumber = ENV_ALLOC_ERROR; CC_Destructor(conn); *phdbc = SQL_NULL_HDBC; EN_log_error(func, "", env); return SQL_ERROR; } *phdbc = (HDBC) conn; return SQL_SUCCESS; } /* - - - - - - - - - */ RETCODE SQL_API SQLConnect( HDBC hdbc, UCHAR FAR *szDSN, SWORD cbDSN, UCHAR FAR *szUID, SWORD cbUID, UCHAR FAR *szAuthStr, SWORD cbAuthStr) { ConnectionClass *conn = (ConnectionClass *) hdbc; ConnInfo *ci; static char *func = "SQLConnect"; mylog( "%s: entering...\n", func); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } ci = &conn->connInfo; make_string((char*)szDSN, cbDSN, ci->dsn); /* get the values for the DSN from the registry */ getDSNinfo(ci, CONN_OVERWRITE); /* override values from DSN info with UID and authStr(pwd) This only occurs if the values are actually there. */ make_string((char*)szUID, cbUID, ci->username); make_string((char*)szAuthStr, cbAuthStr, ci->password); /* fill in any defaults */ getDSNdefaults(ci); qlog("conn = %u, %s(DSN='%s', UID='%s', PWD='%s')\n", conn, func, ci->dsn, ci->username, ci->password); if ( CC_connect(conn, FALSE) <= 0) { /* Error messages are filled in */ CC_log_error(func, "Error on CC_connect", conn); return SQL_ERROR; } mylog( "%s: returning...\n", func); return SQL_SUCCESS; } /* - - - - - - - - - */ RETCODE SQL_API SQLBrowseConnect( HDBC hdbc, UCHAR FAR *szConnStrIn, SWORD cbConnStrIn, UCHAR FAR *szConnStrOut, SWORD cbConnStrOutMax, SWORD FAR *pcbConnStrOut) { static char *func="SQLBrowseConnect"; mylog( "%s: entering...\n", func); return SQL_SUCCESS; } /* - - - - - - - - - */ /* Drop any hstmts open on hdbc and disconnect from database */ RETCODE SQL_API SQLDisconnect( HDBC hdbc) { ConnectionClass *conn = (ConnectionClass *) hdbc; static char *func = "SQLDisconnect"; mylog( "%s: entering...\n", func); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } qlog("conn=%u, %s\n", conn, func); if (conn->status == CONN_EXECUTING) { conn->errornumber = CONN_IN_USE; conn->errormsg = "A transaction is currently being executed"; CC_log_error(func, "", conn); return SQL_ERROR; } mylog("%s: about to CC_cleanup\n", func); /* Close the connection and free statements */ CC_cleanup(conn); mylog("%s: done CC_cleanup\n", func); mylog("%s: returning...\n", func); return SQL_SUCCESS; } /* - - - - - - - - - */ RETCODE SQL_API SQLFreeConnect( HDBC hdbc) { ConnectionClass *conn = (ConnectionClass *) hdbc; static char *func = "SQLFreeConnect"; mylog( "%s: entering...\n", func); mylog("**** in %s: hdbc=%u\n", func, hdbc); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } /* Remove the connection from the environment */ if ( ! EN_remove_connection((EnvironmentClass*)conn->henv, conn)) { conn->errornumber = CONN_IN_USE; conn->errormsg = "A transaction is currently being executed"; CC_log_error(func, "", conn); return SQL_ERROR; } CC_Destructor(conn); mylog("%s: returning...\n", func); return SQL_SUCCESS; } /* * * IMPLEMENTATION CONNECTION CLASS * */ ConnectionClass *CC_Constructor() { ConnectionClass *rv; rv = (ConnectionClass *)malloc(sizeof(ConnectionClass)); if (rv != NULL) { rv->henv = (HENV)NULL; /* not yet associated with an environment */ rv->errormsg = NULL; rv->errornumber = 0; rv->errormsg_created = FALSE; rv->status = CONN_NOT_CONNECTED; rv->transact_status = CONN_IN_AUTOCOMMIT; /* autocommit by default */ memset(&rv->connInfo, 0, sizeof(ConnInfo)); rv->sock = SOCK_Constructor(); if ( ! rv->sock) return NULL; rv->stmts = (StatementClass **) malloc( sizeof(StatementClass *) * STMT_INCREMENT); if ( ! rv->stmts) return NULL; memset(rv->stmts, 0, sizeof(StatementClass *) * STMT_INCREMENT); rv->num_stmts = STMT_INCREMENT; rv->lobj_type = PG_TYPE_LO; rv->ntables = 0; rv->col_info = NULL; rv->translation_option = 0; rv->translation_handle = NULL; rv->DataSourceToDriver = NULL; rv->DriverToDataSource = NULL; /* Initialize statement options to defaults */ /* Statements under this conn will inherit these options */ InitializeStatementOptions(&rv->stmtOptions); } return rv; } char CC_Destructor(ConnectionClass *self) { mylog("enter CC_Destructor, self=%u\n", self); if (self->status == CONN_EXECUTING) return 0; CC_cleanup(self); /* cleanup socket and statements */ mylog("after CC_Cleanup\n"); /* Free up statement holders */ if (self->stmts) { free(self->stmts); self->stmts = NULL; } mylog("after free statement holders\n"); /* Free cached table info */ if (self->col_info) { int i; for (i = 0; i < self->ntables; i++) { if (self->col_info[i]->result) /* Free the SQLColumns result structure */ QR_Destructor(self->col_info[i]->result); free(self->col_info[i]); } free(self->col_info); } free(self); mylog("exit CC_Destructor\n"); return 1; } /* Return how many cursors are opened on this connection */ int CC_cursor_count(ConnectionClass *self) { StatementClass *stmt; int i, count = 0; mylog("CC_cursor_count: self=%u, num_stmts=%d\n", self, self->num_stmts); for (i = 0; i < self->num_stmts; i++) { stmt = self->stmts[i]; if (stmt && stmt->result && stmt->result->cursor) count++; } mylog("CC_cursor_count: returning %d\n", count); return count; } void CC_clear_error(ConnectionClass *self) { self->errornumber = 0; self->errormsg = NULL; self->errormsg_created = FALSE; } /*// Used to cancel a transaction */ /*// We are almost always in the middle of a transaction. */ char CC_abort(ConnectionClass *self) { QResultClass *res; if ( CC_is_in_trans(self)) { res = NULL; mylog("CC_abort: sending ABORT!\n"); res = CC_send_query(self, "ABORT", NULL); CC_set_no_trans(self); if (res != NULL) QR_Destructor(res); else return FALSE; } return TRUE; } /* This is called by SQLDisconnect also */ char CC_cleanup(ConnectionClass *self) { int i; StatementClass *stmt; if (self->status == CONN_EXECUTING) return FALSE; mylog("in CC_Cleanup, self=%u\n", self); /*// Cancel an ongoing transaction */ /*// We are always in the middle of a transaction, */ /*// even if we are in auto commit. */ if (self->sock) CC_abort(self); /* * mimic closePGconn */ if ( self->sock) { SOCK_put_string( self->sock, "X" ); SOCK_flush_output( self->sock ); } mylog("after CC_abort\n"); /* This actually closes the connection to the dbase */ if (self->sock) { SOCK_Destructor(self->sock); self->sock = NULL; } mylog("after SOCK destructor\n"); /* Free all the stmts on this connection */ for (i = 0; i < self->num_stmts; i++) { stmt = self->stmts[i]; if (stmt) { stmt->hdbc = NULL; /* prevent any more dbase interactions */ SC_Destructor(stmt); self->stmts[i] = NULL; } } /* Check for translation dll */ #ifdef WIN32 if ( self->translation_handle) { FreeLibrary (self->translation_handle); self->translation_handle = NULL; } #endif mylog("exit CC_Cleanup\n"); return TRUE; } int CC_set_translation (ConnectionClass *self) { #ifdef WIN32 if (self->translation_handle != NULL) { FreeLibrary (self->translation_handle); self->translation_handle = NULL; } if (self->connInfo.translation_dll[0] == 0) return TRUE; self->translation_option = atoi (self->connInfo.translation_option); self->translation_handle = LoadLibrary (self->connInfo.translation_dll); if (self->translation_handle == NULL) { self->errornumber = CONN_UNABLE_TO_LOAD_DLL; self->errormsg = "Could not load the translation DLL."; return FALSE; } self->DataSourceToDriver = (DataSourceToDriverProc) GetProcAddress (self->translation_handle, "SQLDataSourceToDriver"); self->DriverToDataSource = (DriverToDataSourceProc) GetProcAddress (self->translation_handle, "SQLDriverToDataSource"); if (self->DataSourceToDriver == NULL || self->DriverToDataSource == NULL) { self->errornumber = CONN_UNABLE_TO_LOAD_DLL; self->errormsg = "Could not find translation DLL functions."; return FALSE; } #endif return TRUE; } char CC_connect(ConnectionClass *self, char do_password) { StartupPacket sp; StartupPacket6_2 sp62; QResultClass *res; SocketClass *sock; ConnInfo *ci = &(self->connInfo); int areq = -1; int beresp; char msgbuffer[ERROR_MSG_LENGTH]; char salt[2]; static char *func="CC_connect"; mylog("%s: entering...\n", func); if ( do_password) sock = self->sock; /* already connected, just authenticate */ else { qlog("Global Options: Version='%s', fetch=%d, socket=%d, unknown_sizes=%d, max_varchar_size=%d, max_longvarchar_size=%d\n", POSTGRESDRIVERVERSION, globals.fetch_max, globals.socket_buffersize, globals.unknown_sizes, globals.max_varchar_size, globals.max_longvarchar_size); qlog(" disable_optimizer=%d, ksqo=%d, unique_index=%d, use_declarefetch=%d\n", globals.disable_optimizer, globals.ksqo, globals.unique_index, globals.use_declarefetch); qlog(" text_as_longvarchar=%d, unknowns_as_longvarchar=%d, bools_as_char=%d\n", globals.text_as_longvarchar, globals.unknowns_as_longvarchar, globals.bools_as_char); qlog(" extra_systable_prefixes='%s', conn_settings='%s'\n", globals.extra_systable_prefixes, globals.conn_settings); if (self->status != CONN_NOT_CONNECTED) { self->errormsg = "Already connected."; self->errornumber = CONN_OPENDB_ERROR; return 0; } if ( ci->server[0] == '\0' || ci->port[0] == '\0' || ci->database[0] == '\0') { self->errornumber = CONN_INIREAD_ERROR; self->errormsg = "Missing server name, port, or database name in call to CC_connect."; return 0; } mylog("CC_connect(): DSN = '%s', server = '%s', port = '%s', database = '%s', username = '%s', password='%s'\n", ci->dsn, ci->server, ci->port, ci->database, ci->username, ci->password); /* If the socket was closed for some reason (like a SQLDisconnect, but no SQLFreeConnect then create a socket now. */ if ( ! self->sock) { self->sock = SOCK_Constructor(); if ( ! self->sock) { self->errornumber = CONNECTION_SERVER_NOT_REACHED; self->errormsg = "Could not open a socket to the server"; return 0; } } sock = self->sock; mylog("connecting to the server socket...\n"); SOCK_connect_to(sock, (short) atoi(ci->port), ci->server, ci->uds ); if (SOCK_get_errcode(sock) != 0) { mylog("connection to the server socket failed.\n"); self->errornumber = CONNECTION_SERVER_NOT_REACHED; self->errormsg = "Could not connect to the server"; return 0; } mylog("connection to the server socket succeeded.\n"); if ( PROTOCOL_62(ci)) { sock->reverse = TRUE; /* make put_int and get_int work for 6.2 */ memset(&sp62, 0, sizeof(StartupPacket6_2)); SOCK_put_int(sock, htonl(4+sizeof(StartupPacket6_2)), 4); sp62.authtype = htonl(NO_AUTHENTICATION); strncpy(sp62.database, ci->database, PATH_SIZE); strncpy(sp62.user, ci->username, NAMEDATALEN); SOCK_put_n_char(sock, (char *) &sp62, sizeof(StartupPacket6_2)); SOCK_flush_output(sock); } else { memset(&sp, 0, sizeof(StartupPacket)); mylog("sizeof startup packet = %d\n", sizeof(StartupPacket)); /*// Send length of Authentication Block */ SOCK_put_int(sock, 4+sizeof(StartupPacket), 4); if ( PROTOCOL_63(ci)) sp.protoVersion = (ProtocolVersion) htonl(PG_PROTOCOL_63); else sp.protoVersion = (ProtocolVersion) htonl(PG_PROTOCOL_LATEST); strncpy(sp.database, ci->database, SM_DATABASE); strncpy(sp.user, ci->username, SM_USER); SOCK_put_n_char(sock, (char *) &sp, sizeof(StartupPacket)); SOCK_flush_output(sock); } mylog("sent the authentication block.\n"); if (sock->errornumber != 0) { mylog("couldn't send the authentication block properly.\n"); self->errornumber = CONN_INVALID_AUTHENTICATION; self->errormsg = "Sending the authentication packet failed"; return 0; } mylog("sent the authentication block successfully.\n"); } mylog("gonna do authentication\n"); /*// *************************************************** */ /*// Now get the authentication request from backend */ /*// *************************************************** */ if ( ! PROTOCOL_62(ci)) do { if (do_password) beresp = 'R'; else beresp = SOCK_get_char(sock); switch(beresp) { case 'E': mylog("auth got 'E'\n"); SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); self->errornumber = CONN_INVALID_AUTHENTICATION; self->errormsg = msgbuffer; qlog("ERROR from backend during authentication: '%s'\n", self->errormsg); return 0; case 'R': if (do_password) { mylog("in 'R' do_password\n"); areq = AUTH_REQ_PASSWORD; do_password = FALSE; } else { mylog("auth got 'R'\n"); areq = SOCK_get_int(sock, 4); if (areq == AUTH_REQ_CRYPT) SOCK_get_n_char(sock, salt, 2); mylog("areq = %d\n", areq); } switch(areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: self->errormsg = "Kerberos 4 authentication not supported"; self->errornumber = CONN_AUTH_TYPE_UNSUPPORTED; return 0; case AUTH_REQ_KRB5: self->errormsg = "Kerberos 5 authentication not supported"; self->errornumber = CONN_AUTH_TYPE_UNSUPPORTED; return 0; case AUTH_REQ_PASSWORD: mylog("in AUTH_REQ_PASSWORD\n"); if (ci->password[0] == '\0') { self->errornumber = CONNECTION_NEED_PASSWORD; self->errormsg = "A password is required for this connection."; return -1; /* need password */ } mylog("past need password\n"); SOCK_put_int(sock, 4+strlen(ci->password)+1, 4); SOCK_put_n_char(sock, ci->password, strlen(ci->password) + 1); SOCK_flush_output(sock); mylog("past flush\n"); break; case AUTH_REQ_CRYPT: #ifdef HAVE_LIBCRYPT { char *password; mylog("in AUTH_REQ_CRYPT\n"); if (ci->password[0] == '\0') { self->errornumber = CONNECTION_NEED_PASSWORD; self->errormsg = "A password is required for this connection."; return -1; /* need password */ } mylog("past need password\n"); password = crypt( ci -> password, salt ); SOCK_put_int(sock, 4+strlen(password)+1, 4); SOCK_put_n_char(sock, password, strlen(password) + 1); SOCK_flush_output(sock); mylog("past flush\n"); break; } #else self->errormsg = "Password crypt authentication not supported"; self->errornumber = CONN_AUTH_TYPE_UNSUPPORTED; #endif return 0; default: self->errormsg = "Unknown authentication type"; self->errornumber = CONN_AUTH_TYPE_UNSUPPORTED; return 0; } break; default: self->errormsg = "Unexpected protocol character during authentication"; self->errornumber = CONN_INVALID_AUTHENTICATION; return 0; } } while (areq != AUTH_REQ_OK); CC_clear_error(self); /* clear any password error */ /* send an empty query in order to find out whether the specified */ /* database really exists on the server machine */ mylog("sending an empty query...\n"); res = CC_send_query(self, " ", NULL); if ( res == NULL || QR_get_status(res) != PGRES_EMPTY_QUERY) { mylog("got no result from the empty query. (probably database does not exist)\n"); self->errornumber = CONNECTION_NO_SUCH_DATABASE; self->errormsg = "The database does not exist on the server\nor user authentication failed."; if (res != NULL) QR_Destructor(res); return 0; } if (res) QR_Destructor(res); mylog("empty query seems to be OK.\n"); CC_set_translation (self); /**********************************************/ /******* Send any initial settings *********/ /**********************************************/ /* Since these functions allocate statements, and since the connection is not established yet, it would violate odbc state transition rules. Therefore, these functions call the corresponding local function instead. */ CC_send_settings(self); CC_lookup_lo(self); /* a hack to get the oid of our large object oid type */ CC_clear_error(self); /* clear any initial command errors */ self->status = CONN_CONNECTED; mylog("%s: returning...\n", func); return 1; } char CC_add_statement(ConnectionClass *self, StatementClass *stmt) { int i; mylog("CC_add_statement: self=%u, stmt=%u\n", self, stmt); for (i = 0; i < self->num_stmts; i++) { if ( ! self->stmts[i]) { stmt->hdbc = self; self->stmts[i] = stmt; return TRUE; } } /* no more room -- allocate more memory */ self->stmts = (StatementClass **) realloc( self->stmts, sizeof(StatementClass *) * (STMT_INCREMENT + self->num_stmts)); if ( ! self->stmts) return FALSE; memset(&self->stmts[self->num_stmts], 0, sizeof(StatementClass *) * STMT_INCREMENT); stmt->hdbc = self; self->stmts[self->num_stmts] = stmt; self->num_stmts += STMT_INCREMENT; return TRUE; } char CC_remove_statement(ConnectionClass *self, StatementClass *stmt) { int i; for (i = 0; i < self->num_stmts; i++) { if (self->stmts[i] == stmt && stmt->status != STMT_EXECUTING) { self->stmts[i] = NULL; return TRUE; } } return FALSE; } /* Create a more informative error message by concatenating the connection error message with its socket error message. */ char * CC_create_errormsg(ConnectionClass *self) { SocketClass *sock = self->sock; int pos; static char msg[4096]; mylog("enter CC_create_errormsg\n"); msg[0] = '\0'; if (self->errormsg) strcpy(msg, self->errormsg); mylog("msg = '%s'\n", msg); if (sock && sock->errormsg && sock->errormsg[0] != '\0') { pos = strlen(msg); sprintf(&msg[pos], ";\n%s", sock->errormsg); } mylog("exit CC_create_errormsg\n"); return msg; } char CC_get_error(ConnectionClass *self, int *number, char **message) { int rv; mylog("enter CC_get_error\n"); /*// Create a very informative errormsg if it hasn't been done yet. */ if ( ! self->errormsg_created) { self->errormsg = CC_create_errormsg(self); self->errormsg_created = TRUE; } if (self->errornumber) { *number = self->errornumber; *message = self->errormsg; } rv = (self->errornumber != 0); self->errornumber = 0; /*// clear the error */ mylog("exit CC_get_error\n"); return rv; } /* The "result_in" is only used by QR_next_tuple() to fetch another group of rows into the same existing QResultClass (this occurs when the tuple cache is depleted and needs to be re-filled). The "cursor" is used by SQLExecute to associate a statement handle as the cursor name (i.e., C3326857) for SQL select statements. This cursor is then used in future 'declare cursor C3326857 for ...' and 'fetch 100 in C3326857' statements. */ QResultClass * CC_send_query(ConnectionClass *self, char *query, QueryInfo *qi) { QResultClass *result_in, *res = NULL; int id; char swallow; SocketClass *sock = self->sock; static char msgbuffer[MAX_MESSAGE_LEN+1]; char cmdbuffer[MAX_MESSAGE_LEN+1]; /*// QR_set_command() dups this string so dont need static */ mylog("send_query(): conn=%u, query='%s'\n", self, query); qlog("conn=%u, query='%s'\n", self, query); /*// Indicate that we are sending a query to the backend */ if(strlen(query) > MAX_MESSAGE_LEN-2) { self->errornumber = CONNECTION_MSG_TOO_LONG; self->errormsg = "Query string is too long"; return NULL; } if ((NULL == query) || (query[0] == '\0')) return NULL; if (SOCK_get_errcode(sock) != 0) { self->errornumber = CONNECTION_COULD_NOT_SEND; self->errormsg = "Could not send Query to backend"; CC_set_no_trans(self); return NULL; } SOCK_put_char(sock, 'Q'); if (SOCK_get_errcode(sock) != 0) { self->errornumber = CONNECTION_COULD_NOT_SEND; self->errormsg = "Could not send Query to backend"; CC_set_no_trans(self); return NULL; } SOCK_put_string(sock, query); SOCK_flush_output(sock); if (SOCK_get_errcode(sock) != 0) { self->errornumber = CONNECTION_COULD_NOT_SEND; self->errormsg = "Could not send Query to backend"; CC_set_no_trans(self); return NULL; } mylog("send_query: done sending query\n"); while(1) { /* what type of message is coming now ? */ id = SOCK_get_char(sock); if ((SOCK_get_errcode(sock) != 0) || (id == EOF)) { self->errornumber = CONNECTION_NO_RESPONSE; self->errormsg = "No response from the backend"; if (res) QR_Destructor(res); mylog("send_query: 'id' - %s\n", self->errormsg); CC_set_no_trans(self); return NULL; } mylog("send_query: got id = '%c'\n", id); switch (id) { case 'A' : /* Asynchronous Messages are ignored */ (void)SOCK_get_int(sock, 4); /* id of notification */ SOCK_get_string(sock, msgbuffer, MAX_MESSAGE_LEN); /* name of the relation the message comes from */ break; case 'C' : /* portal query command, no tuples returned */ /* read in the return message from the backend */ SOCK_get_string(sock, cmdbuffer, MAX_MESSAGE_LEN); if (SOCK_get_errcode(sock) != 0) { self->errornumber = CONNECTION_NO_RESPONSE; self->errormsg = "No response from backend while receiving a portal query command"; mylog("send_query: 'C' - %s\n", self->errormsg); CC_set_no_trans(self); if (res) QR_Destructor(res); return NULL; } else { char clear = 0; mylog("send_query: ok - 'C' - %s\n", cmdbuffer); if (res == NULL) /* allow for "show" style notices */ res = QR_Constructor(); mylog("send_query: setting cmdbuffer = '%s'\n", cmdbuffer); /* Only save the first command */ QR_set_status(res, PGRES_COMMAND_OK); QR_set_command(res, cmdbuffer); /* (Quotation from the original comments) since backend may produce more than one result for some commands we need to poll until clear so we send an empty query, and keep reading out of the pipe until an 'I' is received */ SOCK_put_string(sock, "Q "); SOCK_flush_output(sock); while( ! clear) { id = SOCK_get_char(sock); if ((SOCK_get_errcode(sock) != 0) || (id == EOF)) { self->errornumber = CONNECTION_NO_RESPONSE; self->errormsg = "No response from the backend"; if (res) { QR_Destructor(res); } mylog("send_query: id=%d error=%s \n", id, self->errormsg); CC_set_no_trans(self); return NULL; } switch(id) { case 'I': (void) SOCK_get_char(sock); clear = TRUE; break; case 'Z': break; case 'C': SOCK_get_string(sock, cmdbuffer, ERROR_MSG_LENGTH); qlog("Command response: '%s'\n", cmdbuffer); break; case 'N': SOCK_get_string(sock, cmdbuffer, ERROR_MSG_LENGTH); QR_set_status(res, PGRES_NONFATAL_ERROR); QR_set_notice(res, cmdbuffer); /* will dup this string */ qlog("NOTICE from backend during clear: '%s'\n", cmdbuffer); break; case 'E': SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); /* Remove a newline */ if (msgbuffer[0] != '\0' && msgbuffer[strlen(msgbuffer)-1] == '\n') msgbuffer[strlen(msgbuffer)-1] = '\0'; self->errormsg = msgbuffer; mylog("clear: 'E' - %s\n", self->errormsg); qlog("ERROR from backend during clear: '%s'\n", cmdbuffer); if ( ! strncmp(self->errormsg, "FATAL", 5)) { self->errornumber = CONNECTION_SERVER_REPORTED_ERROR; CC_set_no_trans(self); } else self->errornumber = CONNECTION_SERVER_REPORTED_WARNING; QR_Destructor(res); return NULL; } } mylog("send_query: returning res = %u\n", res); return res; } case 'K': /* Secret key (6.4 protocol) */ (void)SOCK_get_int(sock, 4); /* pid */ (void)SOCK_get_int(sock, 4); /* key */ break; case 'Z': /* Backend is ready for new query (6.4) */ break; case 'N' : /* NOTICE: */ SOCK_get_string(sock, cmdbuffer, ERROR_MSG_LENGTH); if (res) QR_Destructor(res); res = QR_Constructor(); QR_set_status(res, PGRES_NONFATAL_ERROR); QR_set_notice(res, cmdbuffer); /* will dup this string */ mylog("~~~ NOTICE: '%s'\n", cmdbuffer); qlog("NOTICE from backend during send_query: '%s'\n", cmdbuffer); continue; /*// dont return a result -- continue reading */ case 'I' : /* The server sends an empty query */ /* There is a closing '\0' following the 'I', so we eat it */ swallow = SOCK_get_char(sock); if ((swallow != '\0') || SOCK_get_errcode(sock) != 0) { self->errornumber = CONNECTION_BACKEND_CRAZY; self->errormsg = "Unexpected protocol character from backend (send_query - I)"; if (res) QR_Destructor(res); res = QR_Constructor(); QR_set_status(res, PGRES_FATAL_ERROR); return res; } else { /* We return the empty query */ if (res) QR_Destructor(res); res = QR_Constructor(); QR_set_status(res, PGRES_EMPTY_QUERY); return res; } break; case 'E' : SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); /* Remove a newline */ if (msgbuffer[0] != '\0' && msgbuffer[strlen(msgbuffer)-1] == '\n') msgbuffer[strlen(msgbuffer)-1] = '\0'; self->errormsg = msgbuffer; mylog("send_query: 'E' - %s\n", self->errormsg); qlog("ERROR from backend during send_query: '%s'\n", self->errormsg); if ( ! strncmp(self->errormsg, "FATAL", 5)) { self->errornumber = CONNECTION_SERVER_REPORTED_ERROR; CC_set_no_trans(self); } else self->errornumber = CONNECTION_SERVER_REPORTED_WARNING; if (res) QR_Destructor(res); return NULL; case 'P' : /* get the Portal name */ SOCK_get_string(sock, msgbuffer, MAX_MESSAGE_LEN); break; case 'T': /* Tuple results start here */ result_in = qi ? qi->result_in : NULL; if ( result_in == NULL) { result_in = QR_Constructor(); mylog("send_query: 'T' no result_in: res = %u\n", result_in); if ( ! result_in) { self->errornumber = CONNECTION_COULD_NOT_RECEIVE; self->errormsg = "Could not create result info in send_query."; if (res) QR_Destructor(res); return NULL; } if (qi) QR_set_cache_size(result_in, qi->row_size); if ( ! QR_fetch_tuples(result_in, self, qi ? qi->cursor : NULL)) { self->errornumber = CONNECTION_COULD_NOT_RECEIVE; self->errormsg = QR_get_message(result_in); if (res) QR_Destructor(res); return NULL; } } else { /*// next fetch, so reuse an existing result */ if ( ! QR_fetch_tuples(result_in, NULL, NULL)) { self->errornumber = CONNECTION_COULD_NOT_RECEIVE; self->errormsg = QR_get_message(result_in); if (res) QR_Destructor(res); return NULL; } } return result_in; case 'D': /* Copy in command began successfully */ if (res) QR_Destructor(res); res = QR_Constructor(); QR_set_status(res, PGRES_COPY_IN); return res; case 'B': /* Copy out command began successfully */ if (res) QR_Destructor(res); res = QR_Constructor(); QR_set_status(res, PGRES_COPY_OUT); return res; default: self->errornumber = CONNECTION_BACKEND_CRAZY; self->errormsg = "Unexpected protocol character from backend (send_query)"; CC_set_no_trans(self); mylog("send_query: error - %s\n", self->errormsg); if (res) QR_Destructor(res); return NULL; } } } int CC_send_function(ConnectionClass *self, int fnid, void *result_buf, int *actual_result_len, int result_is_int, LO_ARG *args, int nargs) { char id, c, done; SocketClass *sock = self->sock; static char msgbuffer[MAX_MESSAGE_LEN+1]; int i; mylog("send_function(): conn=%u, fnid=%d, result_is_int=%d, nargs=%d\n", self, fnid, result_is_int, nargs); if (SOCK_get_errcode(sock) != 0) { self->errornumber = CONNECTION_COULD_NOT_SEND; self->errormsg = "Could not send function to backend"; CC_set_no_trans(self); return FALSE; } SOCK_put_string(sock, "F "); if (SOCK_get_errcode(sock) != 0) { self->errornumber = CONNECTION_COULD_NOT_SEND; self->errormsg = "Could not send function to backend"; CC_set_no_trans(self); return FALSE; } SOCK_put_int(sock, fnid, 4); SOCK_put_int(sock, nargs, 4); mylog("send_function: done sending function\n"); for (i = 0; i < nargs; ++i) { mylog(" arg[%d]: len = %d, isint = %d, integer = %d, ptr = %u\n", i, args[i].len, args[i].isint, args[i].u.integer, args[i].u.ptr); SOCK_put_int(sock, args[i].len, 4); if (args[i].isint) SOCK_put_int(sock, args[i].u.integer, 4); else SOCK_put_n_char(sock, (char *) args[i].u.ptr, args[i].len); } mylog(" done sending args\n"); SOCK_flush_output(sock); mylog(" after flush output\n"); done = FALSE; while ( ! done) { id = SOCK_get_char(sock); mylog(" got id = %c\n", id); switch(id) { case 'V': done = TRUE; break; /* ok */ case 'N': SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); mylog("send_function(V): 'N' - %s\n", msgbuffer); /* continue reading */ break; case 'E': SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); self->errormsg = msgbuffer; mylog("send_function(V): 'E' - %s\n", self->errormsg); qlog("ERROR from backend during send_function: '%s'\n", self->errormsg); return FALSE; case 'Z': break; default: self->errornumber = CONNECTION_BACKEND_CRAZY; self->errormsg = "Unexpected protocol character from backend (send_function, args)"; CC_set_no_trans(self); mylog("send_function: error - %s\n", self->errormsg); return FALSE; } } id = SOCK_get_char(sock); for (;;) { switch (id) { case 'G': /* function returned properly */ mylog(" got G!\n"); *actual_result_len = SOCK_get_int(sock, 4); mylog(" actual_result_len = %d\n", *actual_result_len); if (result_is_int) *((int *) result_buf) = SOCK_get_int(sock, 4); else SOCK_get_n_char(sock, (char *) result_buf, *actual_result_len); mylog(" after get result\n"); c = SOCK_get_char(sock); /* get the last '0' */ mylog(" after get 0\n"); return TRUE; case 'E': SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); self->errormsg = msgbuffer; mylog("send_function(G): 'E' - %s\n", self->errormsg); qlog("ERROR from backend during send_function: '%s'\n", self->errormsg); return FALSE; case 'N': SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); mylog("send_function(G): 'N' - %s\n", msgbuffer); qlog("NOTICE from backend during send_function: '%s'\n", msgbuffer); continue; /*// dont return a result -- continue reading */ case '0': /* empty result */ return TRUE; default: self->errornumber = CONNECTION_BACKEND_CRAZY; self->errormsg = "Unexpected protocol character from backend (send_function, result)"; CC_set_no_trans(self); mylog("send_function: error - %s\n", self->errormsg); return FALSE; } } } char CC_send_settings(ConnectionClass *self) { /*// char ini_query[MAX_MESSAGE_LEN]; */ ConnInfo *ci = &(self->connInfo); /*// QResultClass *res; */ HSTMT hstmt; StatementClass *stmt; RETCODE result; char status = TRUE; char *cs, *ptr; static char *func="CC_send_settings"; mylog("%s: entering...\n", func); /* This function must use the local odbc API functions since the odbc state has not transitioned to "connected" yet. */ result = PG__SQLAllocStmt( (HDBC)self, &hstmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { return FALSE; } stmt = (StatementClass *) hstmt; stmt->internal = TRUE; /* ensure no BEGIN/COMMIT/ABORT stuff */ /* Set the Datestyle to the format the driver expects it to be in */ result = PG__SQLExecDirect(hstmt, (unsigned char*) "set DateStyle to 'ISO'", SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) status = FALSE; mylog("%s: result %d, status %d from set DateStyle\n", func, result, status); /* Disable genetic optimizer based on global flag */ if (globals.disable_optimizer) { result = PG__SQLExecDirect(hstmt, (unsigned char*) "set geqo to 'OFF'", SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) status = FALSE; mylog("%s: result %d, status %d from set geqo\n", func, result, status); } /* KSQO */ if (globals.ksqo) { result = PG__SQLExecDirect(hstmt, (unsigned char*) "set ksqo to 'ON'", SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) status = FALSE; mylog("%s: result %d, status %d from set ksqo\n", func, result, status); } /* Global settings */ if (globals.conn_settings[0] != '\0') { cs = strdup(globals.conn_settings); ptr = strtok(cs, ";"); while (ptr) { result = PG__SQLExecDirect(hstmt, (unsigned char*) ptr, SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) status = FALSE; mylog("%s: result %d, status %d from '%s'\n", func, result, status, ptr); ptr = strtok(NULL, ";"); } free(cs); } /* Per Datasource settings */ if (ci->conn_settings[0] != '\0') { cs = strdup(ci->conn_settings); ptr = strtok(cs, ";"); while (ptr) { result = PG__SQLExecDirect(hstmt, (unsigned char*) ptr, SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) status = FALSE; mylog("%s: result %d, status %d from '%s'\n", func, result, status, ptr); ptr = strtok(NULL, ";"); } free(cs); } PG__SQLFreeStmt(hstmt, SQL_DROP); return status; } /* This function is just a hack to get the oid of our Large Object oid type. If a real Large Object oid type is made part of Postgres, this function will go away and the define 'PG_TYPE_LO' will be updated. */ void CC_lookup_lo(ConnectionClass *self) { HSTMT hstmt; StatementClass *stmt; RETCODE result; static char *func = "CC_lookup_lo"; mylog( "%s: entering...\n", func); /* This function must use the local odbc API functions since the odbc state has not transitioned to "connected" yet. */ result = PG__SQLAllocStmt( self, &hstmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { return; } stmt = (StatementClass *) hstmt; result = PG__SQLExecDirect(hstmt, (unsigned char*) "select oid from pg_type where typname='" PG_TYPE_LO_NAME "'", SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { PG__SQLFreeStmt(hstmt, SQL_DROP); return; } result = PG__SQLFetch(hstmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { PG__SQLFreeStmt(hstmt, SQL_DROP); return; } result = PG__SQLGetData(hstmt, 1, SQL_C_SLONG, &self->lobj_type, sizeof(self->lobj_type), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { PG__SQLFreeStmt(hstmt, SQL_DROP); return; } mylog("Got the large object oid: %d\n", self->lobj_type); qlog(" [ Large Object oid = %d ]\n", self->lobj_type); result = PG__SQLFreeStmt(hstmt, SQL_DROP); } void CC_log_error(char *func, char *desc, ConnectionClass *self) { if (self) { qlog("CONN ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->errornumber, self->errormsg); mylog("CONN ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->errornumber, self->errormsg); qlog(" ------------------------------------------------------------\n"); qlog(" henv=%u, conn=%u, status=%u, num_stmts=%d\n", self->henv, self, self->status, self->num_stmts); qlog(" sock=%u, stmts=%u, lobj_type=%d\n", self->sock, self->stmts, self->lobj_type); qlog(" ---------------- Socket Info -------------------------------\n"); if (self->sock) { SocketClass *sock = self->sock; qlog(" socket=%d, reverse=%d, errornumber=%d, errormsg='%s'\n", sock->socket, sock->reverse, sock->errornumber, sock->errormsg); qlog(" buffer_in=%u, buffer_out=%u\n", sock->buffer_in, sock->buffer_out); qlog(" buffer_filled_in=%d, buffer_filled_out=%d, buffer_read_in=%d\n", sock->buffer_filled_in, sock->buffer_filled_out, sock->buffer_read_in); } } else qlog("INVALID CONNECTION HANDLE ERROR: func=%s, desc='%s'\n", func, desc); } unixODBC-2.2.14-p2/Drivers/PostgreSQL/convert.c0100644000076400007640000012263010311277025017444 0ustar nicknick/* Module: convert.c * * Description: This module contains routines related to * converting parameters and columns into requested data types. * Parameters are converted from their SQL_C data types into * the appropriate postgres type. Columns are converted from * their postgres type (SQL type) into the appropriate SQL_C * data type. * * Classes: n/a * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "psqlodbc.h" #ifndef WIN32 #ifdef UNIXODBC #include #include #else #include "iodbc.h" #include "isql.h" #include "isqlext.h" #endif #else #include #include #include #endif #include #ifdef HAVE_LOCALE_H #include #endif #include #include "convert.h" #include "statement.h" #include "qresult.h" #include "bind.h" #include "pgtypes.h" #include "lobj.h" #include "connection.h" #ifndef WIN32 #ifndef HAVE_STRICMP #define stricmp(s1,s2) strcasecmp(s1,s2) #define strnicmp(s1,s2,n) strncasecmp(s1,s2,n) #endif #ifndef UNIXODBC #ifndef SCHAR typedef signed char SCHAR; #endif #endif #endif extern GLOBAL_VALUES globals; /* How to map ODBC scalar functions {fn func(args)} to Postgres */ /* This is just a simple substitution */ char *mapFuncs[][2] = { { "CONCAT", "textcat" }, { "LCASE", "lower" }, { "LOCATE", "strpos" }, { "LENGTH", "textlen" }, { "LTRIM", "ltrim" }, { "RTRIM", "rtrim" }, { "SUBSTRING", "substr" }, { "UCASE", "upper" }, { "NOW", "now" }, { 0, 0 } }; char *mapFunction(char *func); unsigned int conv_from_octal(unsigned char *s); unsigned int conv_from_hex(unsigned char *s); char *conv_to_octal(unsigned char val); /******** A Guide for date/time/timestamp conversions ************** field_type fCType Output ---------- ------ ---------- PG_TYPE_DATE SQL_C_DEFAULT SQL_C_DATE PG_TYPE_DATE SQL_C_DATE SQL_C_DATE PG_TYPE_DATE SQL_C_TIMESTAMP SQL_C_TIMESTAMP (time = 0 (midnight)) PG_TYPE_TIME SQL_C_DEFAULT SQL_C_TIME PG_TYPE_TIME SQL_C_TIME SQL_C_TIME PG_TYPE_TIME SQL_C_TIMESTAMP SQL_C_TIMESTAMP (date = current date) PG_TYPE_ABSTIME SQL_C_DEFAULT SQL_C_TIMESTAMP PG_TYPE_ABSTIME SQL_C_DATE SQL_C_DATE (time is truncated) PG_TYPE_ABSTIME SQL_C_TIME SQL_C_TIME (date is truncated) PG_TYPE_ABSTIME SQL_C_TIMESTAMP SQL_C_TIMESTAMP ******************************************************************************/ /* This is called by SQLFetch() */ int copy_and_convert_field_bindinfo(StatementClass *stmt, Int4 field_type, void *value, int col) { BindInfoClass *bic = &(stmt->bindings[col]); return copy_and_convert_field(stmt, field_type, value, (Int2)bic->returntype, (PTR)bic->buffer, (SDWORD)bic->buflen, (SQLLEN *)bic->used); } static void setup_ts( SIMPLE_TIME st ) { time_t t = time( NULL ); struct tm *tim; #ifdef HAVE_LOCALTIME_R struct tm tp; #endif #ifdef HAVE_LOCALTIME_R tim = localtime_r(&t, &tp); #else tim = localtime(&t); #endif st.m = tim->tm_mon + 1; st.d = tim->tm_mday; st.y = tim->tm_year + 1900; st.hh = tim->tm_hour; st.mm = tim->tm_min; st.ss = tim->tm_sec; } /* This is called by SQLGetData() */ int copy_and_convert_field(StatementClass *stmt, Int4 field_type, void *value, Int2 fCType, PTR rgbValue, SDWORD cbValueMax, SQLLEN *pcbValue) { Int4 len = 0, copy_len = 0; SIMPLE_TIME st; time_t t = time(NULL); struct tm *tim; int pcbValueOffset, rgbValueOffset; char *rgbValueBindRow, *ptr; int bind_row = stmt->bind_row; int bind_size = stmt->options.bind_size; int result = COPY_OK; char tempBuf[TEXT_FIELD_SIZE+5]; #ifdef HAVE_LOCALTIME_R struct tm tp; #endif #ifdef HAVE_LOCALE_H char saved_locale[256]; #endif /* rgbValueOffset is *ONLY* for character and binary data */ /* pcbValueOffset is for computing any pcbValue location */ if (bind_size > 0) { pcbValueOffset = rgbValueOffset = (bind_size * bind_row); } else { pcbValueOffset = bind_row * sizeof(SDWORD); rgbValueOffset = bind_row * cbValueMax; } mylog("copy_and_convert: field_type = %d, fctype = %d, value = '%s', cbValueMax=%d\n", field_type, fCType, (value==NULL)?"":value, cbValueMax); if ( ! value) { /* handle a null just by returning SQL_NULL_DATA in pcbValue, */ /* and doing nothing to the buffer. */ if(pcbValue) { *(SDWORD *) ((char *) pcbValue + pcbValueOffset) = SQL_NULL_DATA; } return COPY_OK; } if (stmt->hdbc->DataSourceToDriver != NULL) { int length = strlen (value); stmt->hdbc->DataSourceToDriver (stmt->hdbc->translation_option, SQL_CHAR, value, length, value, length, NULL, NULL, 0, NULL); } /******************************************************************** First convert any specific postgres types into more useable data. NOTE: Conversions from PG char/varchar of a date/time/timestamp value to SQL_C_DATE,SQL_C_TIME, SQL_C_TIMESTAMP not supported *********************************************************************/ switch(field_type) { /* $$$ need to add parsing for date/time/timestamp strings in PG_TYPE_CHAR,VARCHAR $$$ */ case PG_TYPE_DATE: setup_ts( st ); sscanf(value, "%4d-%2d-%2d", &st.y, &st.m, &st.d); break; case PG_TYPE_TIME: setup_ts( st ); sscanf(value, "%2d:%2d:%2d", &st.hh, &st.mm, &st.ss); break; case PG_TYPE_ABSTIME: case PG_TYPE_TIMESTAMP: case PG_TYPE_DATETIME: case PG_TYPE_TIMESTAMP_NO_TMZONE: setup_ts( st ); if (strnicmp(value, "invalid", 7) != 0) { sscanf(value, "%4d-%2d-%2d %2d:%2d:%2d", &st.y, &st.m, &st.d, &st.hh, &st.mm, &st.ss); } else { /* The timestamp is invalid so set something conspicuous, like the epoch */ t = 0; #ifdef HAVE_LOCALTIME_R tim = localtime_r(&t, &tp); #else tim = localtime(&t); #endif st.m = tim->tm_mon + 1; st.d = tim->tm_mday; st.y = tim->tm_year + 1900; st.hh = tim->tm_hour; st.mm = tim->tm_min; st.ss = tim->tm_sec; } break; case PG_TYPE_BOOL: { /* change T/F to 1/0 */ char *s = (char *) value; if (s[0] == 'T' || s[0] == 't' || s[0] == '1' ) s[0] = '1'; else s[0] = '0'; } break; /* This is for internal use by SQLStatistics() */ case PG_TYPE_INT28: { /*// this is an array of eight integers */ short *short_array = (short *) ( (char *) rgbValue + rgbValueOffset); len = 16; sscanf(value, "%hd %hd %hd %hd %hd %hd %hd %hd", &short_array[0], &short_array[1], &short_array[2], &short_array[3], &short_array[4], &short_array[5], &short_array[6], &short_array[7]); /* There is no corresponding fCType for this. */ if(pcbValue) *(SDWORD *) ((char *) pcbValue + pcbValueOffset) = len; return COPY_OK; /* dont go any further or the data will be trashed */ } /* This is a large object OID, which is used to store LONGVARBINARY objects. */ case PG_TYPE_LO: return convert_lo( stmt, value, fCType, ((char *) rgbValue + rgbValueOffset), cbValueMax, (SDWORD *) ((char *) pcbValue + pcbValueOffset)); default: if (field_type == stmt->hdbc->lobj_type) /* hack until permanent type available */ return convert_lo( stmt, value, fCType, ((char *) rgbValue + rgbValueOffset), cbValueMax, (SDWORD *) ((char *) pcbValue + pcbValueOffset)); } /* Change default into something useable */ if (fCType == SQL_C_DEFAULT) { fCType = pgtype_to_ctype(stmt, field_type); mylog("copy_and_convert, SQL_C_DEFAULT: fCType = %d\n", fCType); } rgbValueBindRow = (char *) rgbValue + rgbValueOffset; if(fCType == SQL_C_CHAR) { /* Special character formatting as required */ /* These really should return error if cbValueMax is not big enough. */ switch(field_type) { case PG_TYPE_DATE: len = 10; if (cbValueMax > len) sprintf(rgbValueBindRow, "%.4d-%.2d-%.2d", st.y, st.m, st.d); break; case PG_TYPE_TIME: len = 8; if (cbValueMax > len) sprintf(rgbValueBindRow, "%.2d:%.2d:%.2d", st.hh, st.mm, st.ss); break; case PG_TYPE_ABSTIME: case PG_TYPE_TIMESTAMP: case PG_TYPE_DATETIME: case PG_TYPE_TIMESTAMP_NO_TMZONE: len = 19; if (cbValueMax > len) sprintf(rgbValueBindRow, "%.4d-%.2d-%.2d %.2d:%.2d:%.2d", st.y, st.m, st.d, st.hh, st.mm, st.ss); break; case PG_TYPE_BOOL: len = 1; if (cbValueMax > len) { strcpy(rgbValueBindRow, value); mylog("PG_TYPE_BOOL: rgbValueBindRow = '%s'\n", rgbValueBindRow); } break; /* Currently, data is SILENTLY TRUNCATED for BYTEA and character data types if there is not enough room in cbValueMax because the driver can't handle multiple calls to SQLGetData for these, yet. Most likely, the buffer passed in will be big enough to handle the maximum limit of postgres, anyway. LongVarBinary types are handled correctly above, observing truncation and all that stuff since there is essentially no limit on the large object used to store those. */ case PG_TYPE_BYTEA: /*// convert binary data to hex strings (i.e, 255 = "FF") */ len = convert_pgbinary_to_char(value, rgbValueBindRow, cbValueMax); /***** THIS IS NOT PROPERLY IMPLEMENTED *****/ break; default: /* convert linefeeds to carriage-return/linefeed */ len = convert_linefeeds(value, tempBuf, sizeof(tempBuf)); ptr = tempBuf; mylog("DEFAULT: len = %d, ptr = '%s'\n", len, ptr); if (stmt->current_col >= 0) { if (stmt->bindings[stmt->current_col].data_left == 0) return COPY_NO_DATA_FOUND; else if (stmt->bindings[stmt->current_col].data_left > 0) { ptr += len - stmt->bindings[stmt->current_col].data_left; len = stmt->bindings[stmt->current_col].data_left; } else stmt->bindings[stmt->current_col].data_left = strlen(ptr); } if (cbValueMax > 0) { copy_len = (len >= cbValueMax) ? cbValueMax -1 : len; #ifdef HAVE_LOCALE_H switch (field_type) { case PG_TYPE_FLOAT4: case PG_TYPE_FLOAT8: case PG_TYPE_NUMERIC: { char *dot, string_format[32]; char *new_string; double d; int total, precision; new_string = malloc( cbValueMax ); strcpy(saved_locale, setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); sscanf(ptr, "%lf", &d); /* Compute the string format for the string representation of the float/double/etc. value */ total = strlen(ptr); dot = strstr(ptr, "."); if (dot) precision = total - (int)((dot + 1) - ptr); else precision = 0; sprintf(string_format, "%%%d.%df", total, precision); setlocale(LC_ALL, saved_locale); sprintf(new_string, string_format, d); strncpy_null(rgbValueBindRow, new_string, copy_len + 1); free( new_string ); break; } default: /* Copy the data */ strncpy_null(rgbValueBindRow, ptr, copy_len + 1); } #else /* Copy the data */ strncpy_null(rgbValueBindRow, ptr, copy_len + 1); #endif /* Adjust data_left for next time */ if (stmt->current_col >= 0) { stmt->bindings[stmt->current_col].data_left -= copy_len; } } /* Finally, check for truncation so that proper status can be returned */ if ( len >= cbValueMax) result = COPY_RESULT_TRUNCATED; mylog(" SQL_C_CHAR, default: len = %d, cbValueMax = %d, rgbValueBindRow = '%s'\n", len, cbValueMax, rgbValueBindRow); break; } } else { /* for SQL_C_CHAR, its probably ok to leave currency symbols in. But to convert to numeric types, it is necessary to get rid of those. */ if (field_type == PG_TYPE_MONEY) convert_money(value); switch(fCType) { case SQL_C_DATE: len = 6; { DATE_STRUCT *ds; if (bind_size > 0) { ds = (DATE_STRUCT *) ((char *) rgbValue + (bind_row * bind_size)); } else { ds = (DATE_STRUCT *) rgbValue + bind_row; } ds->year = st.y; ds->month = st.m; ds->day = st.d; } break; case SQL_C_TIME: len = 6; { TIME_STRUCT *ts; if (bind_size > 0) { ts = (TIME_STRUCT *) ((char *) rgbValue + (bind_row * bind_size)); } else { ts = (TIME_STRUCT *) rgbValue + bind_row; } ts->hour = st.hh; ts->minute = st.mm; ts->second = st.ss; } break; case SQL_C_TIMESTAMP: len = 16; { TIMESTAMP_STRUCT *ts; if (bind_size > 0) { ts = (TIMESTAMP_STRUCT *) ((char *) rgbValue + (bind_row * bind_size)); } else { ts = (TIMESTAMP_STRUCT *) rgbValue + bind_row; } ts->year = st.y; ts->month = st.m; ts->day = st.d; ts->hour = st.hh; ts->minute = st.mm; ts->second = st.ss; ts->fraction = 0; } break; case SQL_C_BIT: len = 1; if (bind_size > 0) { *(UCHAR *) ((char *) rgbValue + (bind_row * bind_size)) = atoi(value); } else { *((UCHAR *)rgbValue + bind_row) = atoi(value); } /*// mylog("SQL_C_BIT: val = %d, cb = %d, rgb=%d\n", atoi(value), cbValueMax, *((UCHAR *)rgbValue)); */ break; case SQL_C_STINYINT: case SQL_C_TINYINT: len = 1; if (bind_size > 0) { *(SCHAR *) ((char *) rgbValue + (bind_row * bind_size)) = atoi(value); } else { *((SCHAR *) rgbValue + bind_row) = atoi(value); } break; case SQL_C_UTINYINT: len = 1; if (bind_size > 0) { *(UCHAR *) ((char *) rgbValue + (bind_row * bind_size)) = atoi(value); } else { *((UCHAR *) rgbValue + bind_row) = atoi(value); } break; case SQL_C_FLOAT: #ifdef HAVE_LOCALE_H strcpy(saved_locale,setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); #endif len = 4; if (bind_size > 0) { *(SFLOAT *) ((char *) rgbValue + (bind_row * bind_size)) = (float) atof(value); } else { *((SFLOAT *)rgbValue + bind_row) = (float) atof(value); } #ifdef HAVE_LOCALE_H setlocale(LC_ALL, saved_locale); #endif break; case SQL_C_DOUBLE: #ifdef HAVE_LOCALE_H strcpy(saved_locale, setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); #endif len = 8; if (bind_size > 0) { *((SDOUBLE *) ((char *) rgbValue + (bind_row * bind_size))) = atof(value); } else { *(((SDOUBLE *)rgbValue) + bind_row) = atof(value); } #ifdef HAVE_LOCALE_H setlocale(LC_ALL, saved_locale); #endif break; case SQL_C_SSHORT: case SQL_C_SHORT: len = 2; if (bind_size > 0) { *(SWORD *) ((char *) rgbValue + (bind_row * bind_size)) = atoi(value); } else { *((SWORD *)rgbValue + bind_row) = atoi(value); } break; case SQL_C_USHORT: len = 2; if (bind_size > 0) { *(UWORD *) ((char *) rgbValue + (bind_row * bind_size)) = atoi(value); } else { *((UWORD *)rgbValue + bind_row) = atoi(value); } break; case SQL_C_SLONG: case SQL_C_LONG: len = 4; if (bind_size > 0) { *(SDWORD *) ((char *) rgbValue + (bind_row * bind_size)) = atol(value); } else { *((SDWORD *)rgbValue + bind_row) = atol(value); } break; case SQL_C_ULONG: len = 4; if (bind_size > 0) { *(UDWORD *) ((char *) rgbValue + (bind_row * bind_size)) = atol(value); } else { *((UDWORD *)rgbValue + bind_row) = atol(value); } break; case SQL_C_BINARY: /*// truncate if necessary */ /*// convert octal escapes to bytes */ len = convert_from_pgbinary(value, (unsigned char*)tempBuf, sizeof(tempBuf)); ptr = tempBuf; if (stmt->current_col >= 0) { /* No more data left for this column */ if (stmt->bindings[stmt->current_col].data_left == 0) return COPY_NO_DATA_FOUND; /* Second (or more) call to SQLGetData so move the pointer */ else if (stmt->bindings[stmt->current_col].data_left > 0) { ptr += len - stmt->bindings[stmt->current_col].data_left; len = stmt->bindings[stmt->current_col].data_left; } /* First call to SQLGetData so initialize data_left */ else stmt->bindings[stmt->current_col].data_left = len; } if (cbValueMax > 0) { copy_len = (len > cbValueMax) ? cbValueMax : len; /* Copy the data */ memcpy(rgbValueBindRow, ptr, copy_len); /* Adjust data_left for next time */ if (stmt->current_col >= 0) { stmt->bindings[stmt->current_col].data_left -= copy_len; } } /* Finally, check for truncation so that proper status can be returned */ if ( len > cbValueMax) result = COPY_RESULT_TRUNCATED; mylog("SQL_C_BINARY: len = %d, copy_len = %d\n", len, copy_len); break; default: return COPY_UNSUPPORTED_TYPE; } } /*// store the length of what was copied, if there's a place for it */ if(pcbValue) { *(SDWORD *) ((char *)pcbValue + pcbValueOffset) = len; } return result; } /* This function inserts parameters into an SQL statements. It will also modify a SELECT statement for use with declare/fetch cursors. This function no longer does any dynamic memory allocation! */ int copy_statement_with_parameters(StatementClass *stmt) { static char *func="copy_statement_with_parameters"; unsigned int opos, npos; char param_string[128], tmp[256], cbuf[TEXT_FIELD_SIZE+5]; int param_number; Int2 param_ctype, param_sqltype; char *old_statement = stmt->statement; char *new_statement = stmt->stmt_with_params; SIMPLE_TIME st; time_t t = time(NULL); struct tm *tim; SDWORD used; char *buffer, *buf; char in_quote = FALSE; Oid lobj_oid; int lobj_fd, retval; #ifdef HAVE_LOCALTIME_R struct tm tp; #endif size_t ollen; if ( ! old_statement) { SC_log_error(func, "No statement string", stmt); return SQL_ERROR; } memset(&st, 0, sizeof(SIMPLE_TIME)); /* If the application hasn't set a cursor name, then generate one */ if ( stmt->cursor_name[0] == '\0') sprintf(stmt->cursor_name, "SQL_CUR%p", stmt); /*// For selects, prepend a declare cursor to the statement */ if (stmt->statement_type == STMT_TYPE_SELECT && globals.use_declarefetch) { sprintf(new_statement, "declare %s cursor for ", stmt->cursor_name); npos = strlen(new_statement); } else { new_statement[0] = '0'; npos = 0; } param_number = -1; ollen = strlen(old_statement); for (opos = 0; opos < ollen; opos++) { /*// Squeeze carriage-returns/linfeed pairs to linefeed only */ if (old_statement[opos] == '\r' && opos+1= stmt->parameters_allocated) break; /* Assign correct buffers based on data at exec param or not */ if ( stmt->parameters[param_number].data_at_exec) { used = stmt->parameters[param_number].EXEC_used ? *stmt->parameters[param_number].EXEC_used : SQL_NTS; buffer = stmt->parameters[param_number].EXEC_buffer; } else { used = stmt->parameters[param_number].used ? *stmt->parameters[param_number].used : SQL_NTS; buffer = stmt->parameters[param_number].buffer; } /* Handle NULL parameter data */ if (used == SQL_NULL_DATA) { strcpy(&new_statement[npos], "NULL"); npos += 4; continue; } /* If no buffer, and its not null, then what the hell is it? Just leave it alone then. */ if ( ! buffer) { new_statement[npos++] = '?'; continue; } param_ctype = stmt->parameters[param_number].CType; param_sqltype = stmt->parameters[param_number].SQLType; mylog("copy_statement_with_params: from(fcType)=%d, to(fSqlType)=%d\n", param_ctype, param_sqltype); /*// replace DEFAULT with something we can use */ if(param_ctype == SQL_C_DEFAULT) param_ctype = sqltype_to_default_ctype(param_sqltype); buf = NULL; param_string[0] = '\0'; cbuf[0] = '\0'; /* Convert input C type to a neutral format */ switch(param_ctype) { case SQL_C_BINARY: buf = buffer; break; #ifdef HAVE_LOCALE_H case SQL_C_CHAR: if (param_sqltype == SQL_NUMERIC || param_sqltype == SQL_DECIMAL || param_sqltype == SQL_FLOAT || param_sqltype == SQL_REAL || param_sqltype == SQL_DOUBLE) { double d; sscanf(buffer, "%lf", &d); strcpy(tmp, setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); sprintf(param_string, "%f", d); setlocale(LC_ALL, tmp); } else buf = buffer; break; #else case SQL_C_CHAR: buf = buffer; break; #endif #ifdef HAVE_LOCALE_H case SQL_C_DOUBLE: strcpy(tmp, setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); sprintf(param_string, "%f", *((SDOUBLE *) buffer)); setlocale(LC_ALL, tmp); break; #else case SQL_C_DOUBLE: sprintf(param_string, "%f", *((SDOUBLE *) buffer)); break; #endif #ifdef HAVE_LOCALE_H case SQL_C_FLOAT: strcpy(tmp, setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); sprintf(param_string, "%f", *((SFLOAT *) buffer)); setlocale(LC_ALL, tmp); break; #else case SQL_C_FLOAT: sprintf(param_string, "%f", *((SFLOAT *) buffer)); break; #endif case SQL_C_SLONG: case SQL_C_LONG: #if (SIZEOF_LONG == 4) sprintf(param_string, "%ld", #else sprintf(param_string, "%d", #endif *((SDWORD *) buffer)); break; case SQL_C_SSHORT: case SQL_C_SHORT: sprintf(param_string, "%d", *((SWORD *) buffer)); break; case SQL_C_STINYINT: case SQL_C_TINYINT: sprintf(param_string, "%d", *((SCHAR *) buffer)); break; case SQL_C_ULONG: #if (SIZEOF_LONG == 4) sprintf(param_string, "%lu", #else sprintf(param_string, "%u", #endif *((UDWORD *) buffer)); break; case SQL_C_USHORT: sprintf(param_string, "%u", *((UWORD *) buffer)); break; case SQL_C_UTINYINT: sprintf(param_string, "%u", *((UCHAR *) buffer)); break; case SQL_C_BIT: { int i = *((UCHAR *) buffer); sprintf(param_string, "%d", i ? 1 : 0); break; } case SQL_C_DATE: { DATE_STRUCT *ds = (DATE_STRUCT *) buffer; setup_ts( st ); st.m = ds->month; st.d = ds->day; st.y = ds->year; break; } case SQL_C_TIME: { TIME_STRUCT *ts = (TIME_STRUCT *) buffer; setup_ts( st ); st.hh = ts->hour; st.mm = ts->minute; st.ss = ts->second; break; } case SQL_C_TIMESTAMP: { TIMESTAMP_STRUCT *tss = (TIMESTAMP_STRUCT *) buffer; setup_ts( st ); st.m = tss->month; st.d = tss->day; st.y = tss->year; st.hh = tss->hour; st.mm = tss->minute; st.ss = tss->second; mylog("m=%d,d=%d,y=%d,hh=%d,mm=%d,ss=%d\n", st.m, st.d, st.y, st.hh, st.mm, st.ss); break; } default: /*// error */ stmt->errormsg = "Unrecognized C_parameter type in copy_statement_with_parameters"; stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR; new_statement[npos] = '\0'; /*// just in case */ SC_log_error(func, "", stmt); return SQL_ERROR; } /* Now that the input data is in a neutral format, convert it to the desired output format (sqltype) */ switch(param_sqltype) { case SQL_CHAR: case SQL_VARCHAR: case SQL_LONGVARCHAR: new_statement[npos++] = '\''; /* Open Quote */ /* it was a SQL_C_CHAR */ if (buf) { convert_special_chars(buf, &new_statement[npos], used); npos += strlen(&new_statement[npos]); } /* it was a numeric type */ else if (param_string[0] != '\0') { strcpy(&new_statement[npos], param_string); npos += strlen(param_string); } /* it was date,time,timestamp -- use m,d,y,hh,mm,ss */ else { #ifdef HAVE_LOCALTIME_R tim = localtime_r(&t, &tp); #else tim = localtime(&t); #endif st.m = tim->tm_mon + 1; st.d = tim->tm_mday; st.y = tim->tm_year + 1900; st.hh = tim->tm_hour; st.mm = tim->tm_min; st.ss = tim->tm_sec; sprintf(tmp, "%.4d-%.2d-%.2d %.2d:%.2d:%.2d", st.y, st.m, st.d, st.hh, st.mm, st.ss); strcpy(&new_statement[npos], tmp); npos += strlen(tmp); } new_statement[npos++] = '\''; /* Close Quote */ break; case SQL_DATE: if (buf) { /* copy char data to time */ my_strcpy(cbuf, sizeof(cbuf), buf, used); parse_datetime(cbuf, &st); } sprintf(tmp, "'%.4d-%.2d-%.2d'", st.y, st.m, st.d); strcpy(&new_statement[npos], tmp); npos += strlen(tmp); break; case SQL_TIME: if (buf) { /* copy char data to time */ my_strcpy(cbuf, sizeof(cbuf), buf, used); parse_datetime(cbuf, &st); } sprintf(tmp, "'%.2d:%.2d:%.2d'", st.hh, st.mm, st.ss); strcpy(&new_statement[npos], tmp); npos += strlen(tmp); break; case SQL_TIMESTAMP: if (buf) { my_strcpy(cbuf, sizeof(cbuf), buf, used); parse_datetime(cbuf, &st); } sprintf(tmp, "'%.4d-%.2d-%.2d %.2d:%.2d:%.2d'", st.y, st.m, st.d, st.hh, st.mm, st.ss); strcpy(&new_statement[npos], tmp); npos += strlen(tmp); break; case SQL_BINARY: case SQL_VARBINARY: /* non-ascii characters should be converted to octal */ new_statement[npos++] = '\''; /* Open Quote */ mylog("SQL_VARBINARY: about to call convert_to_pgbinary, used = %d\n", used); npos += convert_to_pgbinary((unsigned char*)buf, &new_statement[npos], used); new_statement[npos++] = '\''; /* Close Quote */ break; case SQL_LONGVARBINARY: if ( stmt->parameters[param_number].data_at_exec) { lobj_oid = stmt->parameters[param_number].lobj_oid; } else { /* begin transaction if needed */ if(!CC_is_in_trans(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "BEGIN", NULL); if (!res) { stmt->errormsg = "Could not begin (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { stmt->errormsg = "Could not begin (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } CC_set_in_trans(stmt->hdbc); } /* store the oid */ lobj_oid = odbc_lo_creat(stmt->hdbc, INV_READ | INV_WRITE); if (lobj_oid == 0) { stmt->errornumber = STMT_EXEC_ERROR; stmt->errormsg = "Couldnt create (in-line) large object."; SC_log_error(func, "", stmt); return SQL_ERROR; } /* store the fd */ lobj_fd = odbc_lo_open(stmt->hdbc, lobj_oid, INV_WRITE); if ( lobj_fd < 0) { stmt->errornumber = STMT_EXEC_ERROR; stmt->errormsg = "Couldnt open (in-line) large object for writing."; SC_log_error(func, "", stmt); return SQL_ERROR; } retval = odbc_lo_write(stmt->hdbc, lobj_fd, buffer, used); odbc_lo_close(stmt->hdbc, lobj_fd); /* commit transaction if needed */ if (!globals.use_declarefetch && CC_is_in_autocommit(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "COMMIT", NULL); if (!res) { stmt->errormsg = "Could not commit (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { stmt->errormsg = "Could not commit (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } CC_set_no_trans(stmt->hdbc); } } /* the oid of the large object -- just put that in for the parameter marker -- the data has already been sent to the large object */ sprintf(param_string, "'%d'", lobj_oid); strcpy(&new_statement[npos], param_string); npos += strlen(param_string); break; default: /* a numeric type or SQL_BIT */ new_statement[npos++] = '\''; /* Open Quote */ if (buf) { my_strcpy(&new_statement[npos], sizeof(stmt->stmt_with_params) - npos, buf, used); npos += strlen(&new_statement[npos]); } else { strcpy(&new_statement[npos], param_string); npos += strlen(param_string); } new_statement[npos++] = '\''; /* Close Quote */ break; } } /* end, for */ /*// make sure new_statement is always null-terminated */ new_statement[npos] = '\0'; if(stmt->hdbc->DriverToDataSource != NULL) { int length = strlen (new_statement); stmt->hdbc->DriverToDataSource (stmt->hdbc->translation_option, SQL_CHAR, new_statement, length, new_statement, length, NULL, NULL, 0, NULL); } return SQL_SUCCESS; } char * mapFunction(char *func) { int i; for (i = 0; mapFuncs[i][0]; i++) if ( ! stricmp(mapFuncs[i][0], func)) return mapFuncs[i][1]; return NULL; } /*// This function returns a pointer to static memory! */ char * convert_escape(char *value) { char key[32], val[256]; static char escape[1024]; char func[32], the_rest[1024]; char *mapFunc; sscanf(value, "%s %[^\r]", key, val); mylog("convert_escape: key='%s', val='%s'\n", key, val); if ( ! strcmp(key, "d") || ! strcmp(key, "t") || ! strcmp(key, "ts" ) || ! stricmp(key, "oj")) { strcpy(escape, val); } else if ( ! strcmp(key, "fn")) { sscanf(val, "%[^(]%[^\r]", func, the_rest); mapFunc = mapFunction(func); if ( ! mapFunc) return NULL; else { strcpy(escape, mapFunc); strcat(escape, the_rest); } } else { return NULL; } return escape; } char * convert_money(char *s) { size_t i = 0, out = 0, slen=strlen(s); for (i = 0; i < slen; i++) { if (s[i] == '$' || s[i] == ',' || s[i] == ')') ; /*// skip these characters */ else if (s[i] == '(') s[out++] = '-'; else s[out++] = s[i]; } s[out] = '\0'; return s; } /* This function parses a character string for date/time info and fills in SIMPLE_TIME */ /* It does not zero out SIMPLE_TIME in case it is desired to initialize it with a value */ char parse_datetime(char *buf, SIMPLE_TIME *st) { int y,m,d,hh,mm,ss; int nf; y = m = d = hh = mm = ss = 0; if (buf[4] == '-') /* year first */ nf = sscanf(buf, "%4d-%2d-%2d %2d:%2d:%2d", &y,&m,&d,&hh,&mm,&ss); else nf = sscanf(buf, "%2d-%2d-%4d %2d:%2d:%2d", &m,&d,&y,&hh,&mm,&ss); if (nf == 5 || nf == 6) { st->y = y; st->m = m; st->d = d; st->hh = hh; st->mm = mm; st->ss = ss; return TRUE; } if (buf[4] == '-') /* year first */ nf = sscanf(buf, "%4d-%2d-%2d", &y, &m, &d); else nf = sscanf(buf, "%2d-%2d-%4d", &m, &d, &y); if (nf == 3) { st->y = y; st->m = m; st->d = d; return TRUE; } nf = sscanf(buf, "%2d:%2d:%2d", &hh, &mm, &ss); if (nf == 2 || nf == 3) { st->hh = hh; st->mm = mm; st->ss = ss; return TRUE; } return FALSE; } /* Change linefeed to carriage-return/linefeed */ int convert_linefeeds(char *si, char *dst, size_t max) { size_t i = 0, out = 0; int in_len = strlen(si); for (i = 0; i < in_len && out < max - 1; i++) { if (si[i] == '\n') { /* Only add the carriage-return if needed */ if (i > 0 && si[i-1] == '\r') { dst[out++] = si[i]; continue; } dst[out++] = '\r'; dst[out++] = '\n'; } else dst[out++] = si[i]; } dst[out] = '\0'; return out; } /* Change carriage-return/linefeed to just linefeed Plus, escape any special characters. */ char * convert_special_chars(char *si, char *dst, int used) { size_t i = 0, out = 0, max; static char sout[TEXT_FIELD_SIZE+5]; char *p; int in_len = strlen( si ); if (dst) p = dst; else p = sout; p[0] = '\0'; if (used == SQL_NTS) max = strlen(si); else max = used; for (i = 0; i < max; i++) { if (si[i] == '\r' && i+1 < in_len && si[i+1] == '\n') continue; else if (si[i] == '\'' || si[i] == '\\') p[out++] = '\\'; p[out++] = si[i]; } p[out] = '\0'; return p; } /* !!! Need to implement this function !!! */ int convert_pgbinary_to_char(char *value, char *rgbValue, int cbValueMax) { mylog("convert_pgbinary_to_char: value = '%s'\n", value); strncpy_null(rgbValue, value, cbValueMax); return 0; } unsigned int conv_from_octal(unsigned char *s) { int i, y=0; for (i = 1; i <= 3; i++) { y += (s[i] - 48) * (int) pow(8, 3-i); } return y; } unsigned int conv_from_hex(unsigned char *s) { int i, y=0, val; for (i = 1; i <= 2; i++) { if (s[i] >= 'a' && s[i] <= 'f') val = s[i] - 'a' + 10; else if (s[i] >= 'A' && s[i] <= 'F') val = s[i] - 'A' + 10; else val = s[i] - '0'; y += val * (int) pow(16, 2-i); } return y; } /*// convert octal escapes to bytes */ int convert_from_pgbinary(unsigned char *value, unsigned char *rgbValue, int cbValueMax) { size_t i, valen=strlen((char*)value); int o=0; for (i = 0; i < valen && o < cbValueMax; ) { if (value[i] == '\\') { rgbValue[o] = conv_from_octal(&value[i]); i += 4; } else { rgbValue[o] = value[i++]; } mylog("convert_from_pgbinary: i=%d, rgbValue[%d] = %d, %c\n", i, o, rgbValue[o], rgbValue[o]); o++; } rgbValue[o] = '\0'; /*// extra protection */ return o; } char * conv_to_octal(unsigned char val) { int i; static char x[6]; x[0] = '\\'; x[1] = '\\'; x[5] = '\0'; for (i = 4; i > 1; i--) { x[i] = (val & 7) + 48; val >>= 3; } return x; } /*// convert non-ascii bytes to octal escape sequences */ int convert_to_pgbinary(unsigned char *in, char *out, int len) { int i, o=0; for (i = 0; i < len; i++) { mylog("convert_to_pgbinary: in[%d] = %d, %c\n", i, in[i], in[i]); if ( isalnum(in[i]) || in[i] == ' ') { out[o++] = in[i]; } else { strcpy(&out[o], conv_to_octal(in[i])); o += 5; } } mylog("convert_to_pgbinary: returning %d, out='%.*s'\n", o, o, out); return o; } void encode(char *in, char *out) { unsigned int i, o = 0; size_t inlen=strlen(in); for (i = 0; i < inlen; i++) { if ( in[i] == '+') { sprintf(&out[o], "%%2B"); o += 3; } else if ( isspace(in[i])) { out[o++] = '+'; } else if ( ! isalnum(in[i])) { sprintf(&out[o], "%%%02x", in[i]); o += 3; } else out[o++] = in[i]; } out[o++] = '\0'; } void decode(char *in, char *out) { unsigned int i, o = 0; size_t inlen=strlen(in); for (i = 0; i < inlen; i++) { if (in[i] == '+') out[o++] = ' '; else if (in[i] == '%') { sprintf((char*)&out[o++], "%c", conv_from_hex((SQLCHAR*)&in[i])); i+=2; } else out[o++] = in[i]; } out[o++] = '\0'; } /* 1. get oid (from 'value') 2. open the large object 3. read from the large object (handle multiple GetData) 4. close when read less than requested? -OR- lseek/read each time handle case where application receives truncated and decides not to continue reading. CURRENTLY, ONLY LONGVARBINARY is handled, since that is the only data type currently mapped to a PG_TYPE_LO. But, if any other types are desired to map to a large object (PG_TYPE_LO), then that would need to be handled here. For example, LONGVARCHAR could possibly be mapped to PG_TYPE_LO someday, instead of PG_TYPE_TEXT as it is now. */ int convert_lo(StatementClass *stmt, void *value, Int2 fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD *pcbValue) { Oid oid; int retval, result, left = -1; int bind_row = stmt->bind_row; BindInfoClass *bindInfo = NULL; /* If using SQLGetData, then current_col will be set */ if (stmt->current_col >= 0) { bindInfo = &stmt->bindings[stmt->current_col]; left = bindInfo->data_left; } /* if this is the first call for this column, open the large object for reading */ if ( ! bindInfo || bindInfo->data_left == -1) { /* begin transaction if needed */ if(!CC_is_in_trans(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "BEGIN", NULL); if (!res) { stmt->errormsg = "Could not begin (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; return COPY_GENERAL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { stmt->errormsg = "Could not begin (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; return COPY_GENERAL_ERROR; } CC_set_in_trans(stmt->hdbc); } oid = atoi(value); stmt->lobj_fd = odbc_lo_open(stmt->hdbc, oid, INV_READ); if (stmt->lobj_fd < 0) { stmt->errornumber = STMT_EXEC_ERROR; stmt->errormsg = "Couldnt open large object for reading."; return COPY_GENERAL_ERROR; } /* Get the size */ retval = odbc_lo_lseek(stmt->hdbc, stmt->lobj_fd, 0L, SEEK_END); if (retval >= 0) { left = odbc_lo_tell(stmt->hdbc, stmt->lobj_fd); if (bindInfo) bindInfo->data_left = left; /* return to beginning */ odbc_lo_lseek(stmt->hdbc, stmt->lobj_fd, 0L, SEEK_SET); } } if (left == 0) { return COPY_NO_DATA_FOUND; } if (stmt->lobj_fd < 0) { stmt->errornumber = STMT_EXEC_ERROR; stmt->errormsg = "Large object FD undefined for multiple read."; return COPY_GENERAL_ERROR; } retval = odbc_lo_read(stmt->hdbc, stmt->lobj_fd, (char *) rgbValue, cbValueMax); if (retval < 0) { odbc_lo_close(stmt->hdbc, stmt->lobj_fd); /* commit transaction if needed */ if (!globals.use_declarefetch && CC_is_in_autocommit(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "COMMIT", NULL); if (!res) { stmt->errormsg = "Could not commit (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; return COPY_GENERAL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { stmt->errormsg = "Could not commit (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; return COPY_GENERAL_ERROR; } CC_set_no_trans(stmt->hdbc); } stmt->lobj_fd = -1; stmt->errornumber = STMT_EXEC_ERROR; stmt->errormsg = "Error reading from large object."; return COPY_GENERAL_ERROR; } if (retval < left) result = COPY_RESULT_TRUNCATED; else result = COPY_OK; if (pcbValue) *pcbValue = left < 0 ? SQL_NO_TOTAL : left; if (bindInfo && bindInfo->data_left > 0) bindInfo->data_left -= retval; if (! bindInfo || bindInfo->data_left == 0) { odbc_lo_close(stmt->hdbc, stmt->lobj_fd); /* commit transaction if needed */ if (!globals.use_declarefetch && CC_is_in_autocommit(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "COMMIT", NULL); if (!res) { stmt->errormsg = "Could not commit (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; return COPY_GENERAL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { stmt->errormsg = "Could not commit (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; return COPY_GENERAL_ERROR; } CC_set_no_trans(stmt->hdbc); } stmt->lobj_fd = -1; /* prevent further reading */ } return result; } unixODBC-2.2.14-p2/Drivers/PostgreSQL/dlg_specific.c0100644000076400007640000006556107563762203020424 0ustar nicknick /* Module: dlg_specific.c * * Description: This module contains any specific code for handling * dialog boxes such as driver/datasource options. Both the * ConfigDSN() and the SQLDriverConnect() functions use * functions in this module. If you were to add a new option * to any dialog box, you would most likely only have to change * things in here rather than in 2 separate places as before. * * Classes: none * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef WIN32 #include #include #ifdef UNIXODBC #include #else #include "gpps.h" #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f) #define SQLWritePrivateProfileString(a,b,c,d) WritePrivateProfileString(a,b,c,d) #endif #ifndef HAVE_STRICMP #define stricmp(s1,s2) strcasecmp(s1,s2) #define strnicmp(s1,s2,n) strncasecmp(s1,s2,n) #endif #endif #include "dlg_specific.h" #include "convert.h" #ifndef BOOL #define BOOL int #endif #ifndef FALSE #define FALSE (BOOL)0 #endif #ifndef TRUE #define TRUE (BOOL)1 #endif extern GLOBAL_VALUES globals; #ifdef WIN32 void SetDlgStuff(HWND hdlg, ConnInfo *ci) { /* If driver attribute NOT present, then set the datasource name and description */ if (ci->driver[0] == '\0') { SetDlgItemText(hdlg, IDC_DSNAME, ci->dsn); SetDlgItemText(hdlg, IDC_DESC, ci->desc); } SetDlgItemText(hdlg, IDC_DATABASE, ci->database); SetDlgItemText(hdlg, IDC_SERVER, ci->server); SetDlgItemText(hdlg, IDC_USER, ci->username); SetDlgItemText(hdlg, IDC_PASSWORD, ci->password); SetDlgItemText(hdlg, IDC_PORT, ci->port); } void GetDlgStuff(HWND hdlg, ConnInfo *ci) { GetDlgItemText(hdlg, IDC_DESC, ci->desc, sizeof(ci->desc)); GetDlgItemText(hdlg, IDC_DATABASE, ci->database, sizeof(ci->database)); GetDlgItemText(hdlg, IDC_SERVER, ci->server, sizeof(ci->server)); GetDlgItemText(hdlg, IDC_USER, ci->username, sizeof(ci->username)); GetDlgItemText(hdlg, IDC_PASSWORD, ci->password, sizeof(ci->password)); GetDlgItemText(hdlg, IDC_PORT, ci->port, sizeof(ci->port)); GetDlgItemText(hdlg, IDC_UDS, ci->uds, sizeof(ci->uds)); } int CALLBACK driver_optionsProc(HWND hdlg, WORD wMsg, WPARAM wParam, LPARAM lParam) { switch (wMsg) { case WM_INITDIALOG: CheckDlgButton(hdlg, DRV_COMMLOG, globals.commlog); CheckDlgButton(hdlg, DRV_OPTIMIZER, globals.disable_optimizer); CheckDlgButton(hdlg, DRV_KSQO, globals.ksqo); CheckDlgButton(hdlg, DRV_UNIQUEINDEX, globals.unique_index); CheckDlgButton(hdlg, DRV_READONLY, globals.readonly); CheckDlgButton(hdlg, DRV_USEDECLAREFETCH, globals.use_declarefetch); /* Unknown (Default) Data Type sizes */ switch(globals.unknown_sizes) { case UNKNOWNS_AS_DONTKNOW: CheckDlgButton(hdlg, DRV_UNKNOWN_DONTKNOW, 1); break; case UNKNOWNS_AS_LONGEST: CheckDlgButton(hdlg, DRV_UNKNOWN_LONGEST, 1); break; case UNKNOWNS_AS_MAX: default: CheckDlgButton(hdlg, DRV_UNKNOWN_MAX, 1); break; } CheckDlgButton(hdlg, DRV_TEXT_LONGVARCHAR, globals.text_as_longvarchar); CheckDlgButton(hdlg, DRV_UNKNOWNS_LONGVARCHAR, globals.unknowns_as_longvarchar); CheckDlgButton(hdlg, DRV_BOOLS_CHAR, globals.bools_as_char); CheckDlgButton(hdlg, DRV_PARSE, globals.parse); CheckDlgButton(hdlg, DRV_CANCELASFREESTMT, globals.cancel_as_freestmt); SetDlgItemInt(hdlg, DRV_CACHE_SIZE, globals.fetch_max, FALSE); SetDlgItemInt(hdlg, DRV_VARCHAR_SIZE, globals.max_varchar_size, FALSE); SetDlgItemInt(hdlg, DRV_LONGVARCHAR_SIZE, globals.max_longvarchar_size, TRUE); SetDlgItemText(hdlg, DRV_EXTRASYSTABLEPREFIXES, globals.extra_systable_prefixes); /* Driver Connection Settings */ SetDlgItemText(hdlg, DRV_CONNSETTINGS, globals.conn_settings); break; case WM_COMMAND: switch (GET_WM_COMMAND_ID(wParam, lParam)) { case IDOK: globals.commlog = IsDlgButtonChecked(hdlg, DRV_COMMLOG); globals.disable_optimizer = IsDlgButtonChecked(hdlg, DRV_OPTIMIZER); globals.ksqo = IsDlgButtonChecked(hdlg, DRV_KSQO); globals.unique_index = IsDlgButtonChecked(hdlg, DRV_UNIQUEINDEX); globals.readonly = IsDlgButtonChecked(hdlg, DRV_READONLY); globals.use_declarefetch = IsDlgButtonChecked(hdlg, DRV_USEDECLAREFETCH); /* Unknown (Default) Data Type sizes */ if (IsDlgButtonChecked(hdlg, DRV_UNKNOWN_MAX)) globals.unknown_sizes = UNKNOWNS_AS_MAX; else if (IsDlgButtonChecked(hdlg, DRV_UNKNOWN_DONTKNOW)) globals.unknown_sizes = UNKNOWNS_AS_DONTKNOW; else if (IsDlgButtonChecked(hdlg, DRV_UNKNOWN_LONGEST)) globals.unknown_sizes = UNKNOWNS_AS_LONGEST; else globals.unknown_sizes = UNKNOWNS_AS_MAX; globals.text_as_longvarchar = IsDlgButtonChecked(hdlg, DRV_TEXT_LONGVARCHAR); globals.unknowns_as_longvarchar = IsDlgButtonChecked(hdlg, DRV_UNKNOWNS_LONGVARCHAR); globals.bools_as_char = IsDlgButtonChecked(hdlg, DRV_BOOLS_CHAR); globals.parse = IsDlgButtonChecked(hdlg, DRV_PARSE); globals.cancel_as_freestmt = IsDlgButtonChecked(hdlg, DRV_CANCELASFREESTMT); globals.fetch_max = GetDlgItemInt(hdlg, DRV_CACHE_SIZE, NULL, FALSE); globals.max_varchar_size = GetDlgItemInt(hdlg, DRV_VARCHAR_SIZE, NULL, FALSE); globals.max_longvarchar_size= GetDlgItemInt(hdlg, DRV_LONGVARCHAR_SIZE, NULL, TRUE); /*// allows for SQL_NO_TOTAL */ GetDlgItemText(hdlg, DRV_EXTRASYSTABLEPREFIXES, globals.extra_systable_prefixes, sizeof(globals.extra_systable_prefixes)); /* Driver Connection Settings */ GetDlgItemText(hdlg, DRV_CONNSETTINGS, globals.conn_settings, sizeof(globals.conn_settings)); updateGlobals(); /*// fall through */ case IDCANCEL: EndDialog(hdlg, GET_WM_COMMAND_ID(wParam, lParam) == IDOK); return TRUE; case IDDEFAULTS: CheckDlgButton(hdlg, DRV_COMMLOG, DEFAULT_COMMLOG); CheckDlgButton(hdlg, DRV_OPTIMIZER, DEFAULT_OPTIMIZER); CheckDlgButton(hdlg, DRV_KSQO, DEFAULT_KSQO); CheckDlgButton(hdlg, DRV_UNIQUEINDEX, DEFAULT_UNIQUEINDEX); CheckDlgButton(hdlg, DRV_READONLY, DEFAULT_READONLY); CheckDlgButton(hdlg, DRV_USEDECLAREFETCH, DEFAULT_USEDECLAREFETCH); CheckDlgButton(hdlg, DRV_PARSE, DEFAULT_PARSE); CheckDlgButton(hdlg, DRV_CANCELASFREESTMT, DEFAULT_CANCELASFREESTMT); /* Unknown Sizes */ CheckDlgButton(hdlg, DRV_UNKNOWN_DONTKNOW, 0); CheckDlgButton(hdlg, DRV_UNKNOWN_LONGEST, 0); CheckDlgButton(hdlg, DRV_UNKNOWN_MAX, 0); switch(DEFAULT_UNKNOWNSIZES) { case UNKNOWNS_AS_DONTKNOW: CheckDlgButton(hdlg, DRV_UNKNOWN_DONTKNOW, 1); break; case UNKNOWNS_AS_LONGEST: CheckDlgButton(hdlg, DRV_UNKNOWN_LONGEST, 1); break; case UNKNOWNS_AS_MAX: CheckDlgButton(hdlg, DRV_UNKNOWN_MAX, 1); break; } CheckDlgButton(hdlg, DRV_TEXT_LONGVARCHAR, DEFAULT_TEXTASLONGVARCHAR); CheckDlgButton(hdlg, DRV_UNKNOWNS_LONGVARCHAR, DEFAULT_UNKNOWNSASLONGVARCHAR); CheckDlgButton(hdlg, DRV_BOOLS_CHAR, DEFAULT_BOOLSASCHAR); SetDlgItemInt(hdlg, DRV_CACHE_SIZE, FETCH_MAX, FALSE); SetDlgItemInt(hdlg, DRV_VARCHAR_SIZE, MAX_VARCHAR_SIZE, FALSE); SetDlgItemInt(hdlg, DRV_LONGVARCHAR_SIZE, TEXT_FIELD_SIZE, TRUE); SetDlgItemText(hdlg, DRV_EXTRASYSTABLEPREFIXES, DEFAULT_EXTRASYSTABLEPREFIXES); /* Driver Connection Settings */ SetDlgItemText(hdlg, DRV_CONNSETTINGS, ""); break; } } return FALSE; } int CALLBACK ds_optionsProc(HWND hdlg, WORD wMsg, WPARAM wParam, LPARAM lParam) { ConnInfo *ci; char buf[128]; switch (wMsg) { case WM_INITDIALOG: ci = (ConnInfo *) lParam; SetWindowLong(hdlg, DWL_USER, lParam); /*// save for OK */ /* Change window caption */ if (ci->driver[0]) SetWindowText(hdlg, "Advanced Options (Connection)"); else { sprintf(buf, "Advanced Options (%s)", ci->dsn); SetWindowText(hdlg, buf); } /* Readonly */ CheckDlgButton(hdlg, DS_READONLY, atoi(ci->readonly)); /* Protocol */ if (strncmp(ci->protocol, PG62, strlen(PG62)) == 0) CheckDlgButton(hdlg, DS_PG62, 1); else if (strncmp(ci->protocol, PG63, strlen(PG63)) == 0) CheckDlgButton(hdlg, DS_PG63, 1); else /* latest */ CheckDlgButton(hdlg, DS_PG64, 1); CheckDlgButton(hdlg, DS_SHOWOIDCOLUMN, atoi(ci->show_oid_column)); CheckDlgButton(hdlg, DS_FAKEOIDINDEX, atoi(ci->fake_oid_index)); CheckDlgButton(hdlg, DS_ROWVERSIONING, atoi(ci->row_versioning)); CheckDlgButton(hdlg, DS_SHOWSYSTEMTABLES, atoi(ci->show_system_tables)); EnableWindow(GetDlgItem(hdlg, DS_FAKEOIDINDEX), atoi(ci->show_oid_column)); /* Datasource Connection Settings */ SetDlgItemText(hdlg, DS_CONNSETTINGS, ci->conn_settings); break; case WM_COMMAND: switch (GET_WM_COMMAND_ID(wParam, lParam)) { case DS_SHOWOIDCOLUMN: mylog("WM_COMMAND: DS_SHOWOIDCOLUMN\n"); EnableWindow(GetDlgItem(hdlg, DS_FAKEOIDINDEX), IsDlgButtonChecked(hdlg, DS_SHOWOIDCOLUMN)); return TRUE; case IDOK: ci = (ConnInfo *)GetWindowLong(hdlg, DWL_USER); mylog("IDOK: got ci = %u\n", ci); /* Readonly */ sprintf(ci->readonly, "%d", IsDlgButtonChecked(hdlg, DS_READONLY)); /* Protocol */ if ( IsDlgButtonChecked(hdlg, DS_PG62)) strcpy(ci->protocol, PG62); else if ( IsDlgButtonChecked(hdlg, DS_PG63)) strcpy(ci->protocol, PG63); else /* latest */ strcpy(ci->protocol, PG64); sprintf(ci->show_system_tables, "%d", IsDlgButtonChecked(hdlg, DS_SHOWSYSTEMTABLES)); sprintf(ci->row_versioning, "%d", IsDlgButtonChecked(hdlg, DS_ROWVERSIONING)); /* OID Options*/ sprintf(ci->fake_oid_index, "%d", IsDlgButtonChecked(hdlg, DS_FAKEOIDINDEX)); sprintf(ci->show_oid_column, "%d", IsDlgButtonChecked(hdlg, DS_SHOWOIDCOLUMN)); /* Datasource Connection Settings */ GetDlgItemText(hdlg, DS_CONNSETTINGS, ci->conn_settings, sizeof(ci->conn_settings)); /*// fall through */ case IDCANCEL: EndDialog(hdlg, GET_WM_COMMAND_ID(wParam, lParam) == IDOK); return TRUE; } } return FALSE; } #endif /* WIN32 */ void makeConnectString(char *connect_string, ConnInfo *ci) { char got_dsn = (ci->dsn[0] != '\0'); char encoded_conn_settings[LARGE_REGISTRY_LEN]; /* fundamental info */ sprintf(connect_string, "%s=%s;DATABASE=%s;SERVER=%s;PORT=%s;UID=%s;PWD=%s", got_dsn ? "DSN" : "DRIVER", got_dsn ? ci->dsn : ci->driver, ci->database, ci->server, ci->port, ci->username, ci->password); encode(ci->conn_settings, encoded_conn_settings); /* extra info */ sprintf(&connect_string[strlen(connect_string)], ";READONLY=%s;PROTOCOL=%s;FAKEOIDINDEX=%s;SHOWOIDCOLUMN=%s;ROWVERSIONING=%s;SHOWSYSTEMTABLES=%s;CONNSETTINGS=%s;UDS=%s", ci->readonly, ci->protocol, ci->fake_oid_index, ci->show_oid_column, ci->row_versioning, ci->show_system_tables, encoded_conn_settings, ci->uds); } void copyAttributes(ConnInfo *ci, char *attribute, char *value) { if(stricmp(attribute, "DSN") == 0) strcpy(ci->dsn, value); else if(stricmp(attribute, "driver") == 0) strcpy(ci->driver, value); else if(stricmp(attribute, INI_DATABASE) == 0) strcpy(ci->database, value); else if(stricmp(attribute, INI_SERVER) == 0 || stricmp(attribute, "server") == 0) strcpy(ci->server, value); else if(stricmp(attribute, INI_USER) == 0 || stricmp(attribute, "uid") == 0) strcpy(ci->username, value); else if(stricmp(attribute, INI_PASSWORD) == 0 || stricmp(attribute, "pwd") == 0) strcpy(ci->password, value); else if(stricmp(attribute, INI_PORT) == 0) strcpy(ci->port, value); else if(stricmp(attribute, INI_UDS) == 0) strcpy(ci->uds, value); else if (stricmp(attribute, INI_READONLY) == 0) strcpy(ci->readonly, value); else if (stricmp(attribute, INI_PROTOCOL) == 0) strcpy(ci->protocol, value); else if (stricmp(attribute, INI_SHOWOIDCOLUMN) == 0) strcpy(ci->show_oid_column, value); else if (stricmp(attribute, INI_FAKEOIDINDEX) == 0) strcpy(ci->fake_oid_index, value); else if (stricmp(attribute, INI_ROWVERSIONING) == 0) strcpy(ci->row_versioning, value); else if (stricmp(attribute, INI_SHOWSYSTEMTABLES) == 0) strcpy(ci->show_system_tables, value); else if (stricmp(attribute, INI_CONNSETTINGS) == 0) { decode(value, ci->conn_settings); /*// strcpy(ci->conn_settings, value); */ } mylog("copyAttributes: DSN='%s',server='%s',dbase='%s',user='%s',passwd='%s',port='%s',readonly='%s',protocol='%s', conn_settings='%s', uds='%s')\n", ci->dsn, ci->server,ci->database,ci->username,ci->password,ci->port,ci->readonly,ci->protocol,ci->conn_settings,ci->uds); } void getDSNdefaults(ConnInfo *ci) { if (ci->port[0] == '\0') strcpy(ci->port, DEFAULT_PORT); if (ci->uds[0] == '\0') strcpy(ci->uds, DEFAULT_UDS); if (ci->readonly[0] == '\0') sprintf(ci->readonly, "%d", globals.readonly); if (ci->protocol[0] == '\0') strcpy(ci->protocol, globals.protocol); if (ci->fake_oid_index[0] == '\0') sprintf(ci->fake_oid_index, "%d", DEFAULT_FAKEOIDINDEX); if (ci->show_oid_column[0] == '\0') sprintf(ci->show_oid_column, "%d", DEFAULT_SHOWOIDCOLUMN); if (ci->show_system_tables[0] == '\0') sprintf(ci->show_system_tables, "%d", DEFAULT_SHOWSYSTEMTABLES); if (ci->row_versioning[0] == '\0') sprintf(ci->row_versioning, "%d", DEFAULT_ROWVERSIONING); } void getDSNinfo(ConnInfo *ci, char overwrite) { char *DSN = ci->dsn; char encoded_conn_settings[LARGE_REGISTRY_LEN]; /*// If a driver keyword was present, then dont use a DSN and return. */ /*// If DSN is null and no driver, then use the default datasource. */ if ( DSN[0] == '\0') { if ( ci->driver[0] != '\0') return; else strcpy(DSN, INI_DSN); } /*// brute-force chop off trailing blanks... */ while (*(DSN+strlen(DSN)-1) == ' ') *(DSN+strlen(DSN)-1) = '\0'; /*// Proceed with getting info for the given DSN. */ /*// */ if ( ci->desc[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_KDESC, "", ci->desc, sizeof(ci->desc), ODBC_INI); if ( ci->server[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_SERVER, "", ci->server, sizeof(ci->server), ODBC_INI); if ( ci->database[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_DATABASE, "", ci->database, sizeof(ci->database), ODBC_INI); if ( ci->username[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_USER, "", ci->username, sizeof(ci->username), ODBC_INI); if ( ci->password[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_PASSWORD, "", ci->password, sizeof(ci->password), ODBC_INI); if ( ci->port[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_PORT, "", ci->port, sizeof(ci->port), ODBC_INI); if ( ci->uds[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_UDS, "", ci->uds, sizeof(ci->uds), ODBC_INI); if ( ci->readonly[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_READONLY, "", ci->readonly, sizeof(ci->readonly), ODBC_INI); if ( toupper(ci->readonly[0]) == 'Y' ) strcpy( ci->readonly, "1" ); if ( ci->show_oid_column[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_SHOWOIDCOLUMN, "", ci->show_oid_column, sizeof(ci->show_oid_column), ODBC_INI); if ( toupper(ci->show_oid_column[0]) == 'Y' ) strcpy( ci->show_oid_column, "1" ); if ( ci->fake_oid_index[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_FAKEOIDINDEX, "", ci->fake_oid_index, sizeof(ci->fake_oid_index), ODBC_INI); if ( toupper(ci->fake_oid_index[0]) == 'Y' ) strcpy( ci->fake_oid_index, "1" ); if ( ci->row_versioning[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_ROWVERSIONING, "", ci->row_versioning, sizeof(ci->row_versioning), ODBC_INI); if ( toupper(ci->row_versioning[0]) == 'Y' ) strcpy( ci->row_versioning, "1" ); if ( ci->show_system_tables[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_SHOWSYSTEMTABLES, "", ci->show_system_tables, sizeof(ci->show_system_tables), ODBC_INI); if ( toupper(ci->show_system_tables[0]) == 'Y' ) strcpy( ci->show_system_tables, "1" ); if ( ci->protocol[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_PROTOCOL, "", ci->protocol, sizeof(ci->protocol), ODBC_INI); if ( ci->conn_settings[0] == '\0' || overwrite) { SQLGetPrivateProfileString(DSN, INI_CONNSETTINGS, "", encoded_conn_settings, sizeof(encoded_conn_settings), ODBC_INI); decode(encoded_conn_settings, ci->conn_settings); } if ( ci->translation_dll[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_TRANSLATIONDLL, "", ci->translation_dll, sizeof(ci->translation_dll), ODBC_INI); if ( ci->translation_option[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_TRANSLATIONOPTION, "", ci->translation_option, sizeof(ci->translation_option), ODBC_INI); /* Allow override of odbcinst.ini parameters here */ /* getGlobalDefaults(DSN, ODBC_INI, TRUE); */ qlog("DSN info: DSN='%s',server='%s',port='%s',dbase='%s',user='%s',passwd='%s'\n", DSN, ci->server, ci->port, ci->database, ci->username, ci->password); qlog(" readonly='%s',protocol='%s',showoid='%s',fakeoidindex='%s',showsystable='%s'\n", ci->readonly, ci->protocol, ci->show_oid_column, ci->fake_oid_index, ci->show_system_tables); qlog(" conn_settings='%s'\n", ci->conn_settings); qlog(" translation_dll='%s',translation_option='%s',uds='%s'\n", ci->translation_dll, ci->translation_option, ci->uds); } /* This is for datasource based options only */ void writeDSNinfo(ConnInfo *ci) { char *DSN = ci->dsn; char encoded_conn_settings[LARGE_REGISTRY_LEN]; encode(ci->conn_settings, encoded_conn_settings); SQLWritePrivateProfileString(DSN, INI_KDESC, ci->desc, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_DATABASE, ci->database, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_SERVER, ci->server, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_PORT, ci->port, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_UDS, ci->uds, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_USER, ci->username, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_PASSWORD, ci->password, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_READONLY, ci->readonly, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_SHOWOIDCOLUMN, ci->show_oid_column, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_FAKEOIDINDEX, ci->fake_oid_index, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_ROWVERSIONING, ci->row_versioning, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_SHOWSYSTEMTABLES, ci->show_system_tables, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_PROTOCOL, ci->protocol, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_CONNSETTINGS, encoded_conn_settings, ODBC_INI); } /* This function reads the ODBCINST.INI portion of the registry and gets any driver defaults. */ void getGlobalDefaults(char *section, char *filename, char override) { char temp[256]; /*// Fetch Count is stored in driver section */ SQLGetPrivateProfileString(section, INI_FETCH, "", temp, sizeof(temp), filename); if ( temp[0] ) { globals.fetch_max = atoi(temp); /* sanity check if using cursors */ if (globals.fetch_max <= 0) globals.fetch_max = FETCH_MAX; } else if ( ! override) globals.fetch_max = FETCH_MAX; /*// Socket Buffersize is stored in driver section */ SQLGetPrivateProfileString(section, INI_SOCKET, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.socket_buffersize = atoi(temp); else if ( ! override) globals.socket_buffersize = SOCK_BUFFER_SIZE; /*// Debug is stored in the driver section */ SQLGetPrivateProfileString(section, INI_DEBUG, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.debug = atoi(temp); else if ( ! override) globals.debug = DEFAULT_DEBUG; /*// CommLog is stored in the driver section */ SQLGetPrivateProfileString(section, INI_COMMLOG, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.commlog = atoi(temp); else if ( ! override) globals.commlog = DEFAULT_COMMLOG; /*// Optimizer is stored in the driver section only */ SQLGetPrivateProfileString(section, INI_OPTIMIZER, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.disable_optimizer = atoi(temp); else if ( ! override) globals.disable_optimizer = DEFAULT_OPTIMIZER; /*// KSQO is stored in the driver section only */ SQLGetPrivateProfileString(section, INI_KSQO, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.ksqo = atoi(temp); else if ( ! override) globals.ksqo = DEFAULT_KSQO; /*// Recognize Unique Index is stored in the driver section only */ SQLGetPrivateProfileString(section, INI_UNIQUEINDEX, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.unique_index = atoi(temp); else if ( ! override) globals.unique_index = DEFAULT_UNIQUEINDEX; /*// Unknown Sizes is stored in the driver section only */ SQLGetPrivateProfileString(section, INI_UNKNOWNSIZES, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.unknown_sizes = atoi(temp); else if ( ! override) globals.unknown_sizes = DEFAULT_UNKNOWNSIZES; /*// Lie about supported functions? */ SQLGetPrivateProfileString(section, INI_LIE, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.lie = atoi(temp); else if ( ! override) globals.lie = DEFAULT_LIE; /*// Parse statements */ SQLGetPrivateProfileString(section, INI_PARSE, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.parse = atoi(temp); else if ( ! override) globals.parse = DEFAULT_PARSE; /*// SQLCancel calls SQLFreeStmt in Driver Manager */ SQLGetPrivateProfileString(section, INI_CANCELASFREESTMT, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.cancel_as_freestmt = atoi(temp); else if ( ! override) globals.cancel_as_freestmt = DEFAULT_CANCELASFREESTMT; /*// UseDeclareFetch is stored in the driver section only */ SQLGetPrivateProfileString(section, INI_USEDECLAREFETCH, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.use_declarefetch = atoi(temp); else if ( ! override) globals.use_declarefetch = DEFAULT_USEDECLAREFETCH; /*// Max Varchar Size */ SQLGetPrivateProfileString(section, INI_MAXVARCHARSIZE, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.max_varchar_size = atoi(temp); else if ( ! override) globals.max_varchar_size = MAX_VARCHAR_SIZE; /*// Max TextField Size */ SQLGetPrivateProfileString(section, INI_MAXLONGVARCHARSIZE, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.max_longvarchar_size = atoi(temp); else if ( ! override) globals.max_longvarchar_size = TEXT_FIELD_SIZE; /*// Text As LongVarchar */ SQLGetPrivateProfileString(section, INI_TEXTASLONGVARCHAR, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.text_as_longvarchar = atoi(temp); else if ( ! override) globals.text_as_longvarchar = DEFAULT_TEXTASLONGVARCHAR; /*// Unknowns As LongVarchar */ SQLGetPrivateProfileString(section, INI_UNKNOWNSASLONGVARCHAR, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.unknowns_as_longvarchar = atoi(temp); else if ( ! override) globals.unknowns_as_longvarchar = DEFAULT_UNKNOWNSASLONGVARCHAR; /*// Bools As Char */ SQLGetPrivateProfileString(section, INI_BOOLSASCHAR, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.bools_as_char = atoi(temp); else if ( ! override) globals.bools_as_char = DEFAULT_BOOLSASCHAR; /*// Extra Systable prefixes */ /*// Use @@@ to distinguish between blank extra prefixes and no key entry */ SQLGetPrivateProfileString(section, INI_EXTRASYSTABLEPREFIXES, "@@@", temp, sizeof(temp), filename); if ( strcmp(temp, "@@@" )) strcpy(globals.extra_systable_prefixes, temp); else if ( ! override) strcpy(globals.extra_systable_prefixes, DEFAULT_EXTRASYSTABLEPREFIXES); mylog("globals.extra_systable_prefixes = '%s'\n", globals.extra_systable_prefixes); /*// Dont allow override of an override! */ if ( ! override) { /*// ConnSettings is stored in the driver section and per datasource for override */ SQLGetPrivateProfileString(section, INI_CONNSETTINGS, "", globals.conn_settings, sizeof(globals.conn_settings), filename); /*// Default state for future DSN's Readonly attribute */ SQLGetPrivateProfileString(section, INI_READONLY, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.readonly = atoi(temp); else globals.readonly = DEFAULT_READONLY; /* Default state for future DSN's protocol attribute This isn't a real driver option YET. This is more intended for customization from the install. */ SQLGetPrivateProfileString(section, INI_PROTOCOL, "@@@", temp, sizeof(temp), filename); if ( strcmp(temp, "@@@" )) strcpy(globals.protocol, temp); else strcpy(globals.protocol, DEFAULT_PROTOCOL); } } /* This function writes any global parameters (that can be manipulated) to the ODBCINST.INI portion of the registry */ void updateGlobals(void) { char tmp[128]; sprintf(tmp, "%d", globals.fetch_max); SQLWritePrivateProfileString(DBMS_NAME, INI_FETCH, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.commlog); SQLWritePrivateProfileString(DBMS_NAME, INI_COMMLOG, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.disable_optimizer); SQLWritePrivateProfileString(DBMS_NAME, INI_OPTIMIZER, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.ksqo); SQLWritePrivateProfileString(DBMS_NAME, INI_KSQO, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.unique_index); SQLWritePrivateProfileString(DBMS_NAME, INI_UNIQUEINDEX, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.readonly); SQLWritePrivateProfileString(DBMS_NAME, INI_READONLY, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.use_declarefetch); SQLWritePrivateProfileString(DBMS_NAME, INI_USEDECLAREFETCH, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.unknown_sizes); SQLWritePrivateProfileString(DBMS_NAME, INI_UNKNOWNSIZES, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.text_as_longvarchar); SQLWritePrivateProfileString(DBMS_NAME, INI_TEXTASLONGVARCHAR, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.unknowns_as_longvarchar); SQLWritePrivateProfileString(DBMS_NAME, INI_UNKNOWNSASLONGVARCHAR, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.bools_as_char); SQLWritePrivateProfileString(DBMS_NAME, INI_BOOLSASCHAR, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.parse); SQLWritePrivateProfileString(DBMS_NAME, INI_PARSE, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.cancel_as_freestmt); SQLWritePrivateProfileString(DBMS_NAME, INI_CANCELASFREESTMT, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.max_varchar_size); SQLWritePrivateProfileString(DBMS_NAME, INI_MAXVARCHARSIZE, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.max_longvarchar_size); SQLWritePrivateProfileString(DBMS_NAME, INI_MAXLONGVARCHARSIZE, tmp, ODBCINST_INI); SQLWritePrivateProfileString(DBMS_NAME, INI_EXTRASYSTABLEPREFIXES, globals.extra_systable_prefixes, ODBCINST_INI); SQLWritePrivateProfileString(DBMS_NAME, INI_CONNSETTINGS, globals.conn_settings, ODBCINST_INI); } unixODBC-2.2.14-p2/Drivers/PostgreSQL/drvconn.c0100644000076400007640000002154007406123160017434 0ustar nicknick /* Module: drvconn.c * * Description: This module contains only routines related to * implementing SQLDriverConnect. * * Classes: n/a * * API functions: SQLDriverConnect * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "psqlodbc.h" #include "connection.h" #ifndef WIN32 #include #include #define NEAR #else #include #include #endif #include #ifndef WIN32 #define stricmp(s1,s2) strcasecmp(s1,s2) #define strnicmp(s1,s2,n) strncasecmp(s1,s2,n) #else #include #include #include #include "resource.h" #endif #ifndef TRUE #define TRUE (BOOL)1 #endif #ifndef FALSE #define FALSE (BOOL)0 #endif #include "dlg_specific.h" /* prototypes */ void dconn_get_connect_attributes(UCHAR FAR *connect_string, ConnInfo *ci); #ifdef WIN32 BOOL FAR PASCAL dconn_FDriverConnectProc(HWND hdlg, UINT wMsg, WPARAM wParam, LPARAM lParam); RETCODE dconn_DoDialog(HWND hwnd, ConnInfo *ci); extern HINSTANCE NEAR s_hModule; /* Saved module handle. */ #endif extern GLOBAL_VALUES globals; RETCODE SQL_API SQLDriverConnect( HDBC hdbc, HWND hwnd, UCHAR FAR *szConnStrIn, SWORD cbConnStrIn, UCHAR FAR *szConnStrOut, SWORD cbConnStrOutMax, SWORD FAR *pcbConnStrOut, UWORD fDriverCompletion) { static char *func = "SQLDriverConnect"; ConnectionClass *conn = (ConnectionClass *) hdbc; ConnInfo *ci; #ifdef WIN32 RETCODE dialog_result; #endif RETCODE result; char connStrIn[MAX_CONNECT_STRING]; char connStrOut[MAX_CONNECT_STRING]; int retval; char password_required = FALSE; int len = 0; mylog("%s: entering...\n", func); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } make_string((char*)szConnStrIn, cbConnStrIn, connStrIn); mylog("**** SQLDriverConnect: fDriverCompletion=%d, connStrIn='%s'\n", fDriverCompletion, connStrIn); qlog("conn=%u, SQLDriverConnect( in)='%s', fDriverCompletion=%d\n", conn, connStrIn, fDriverCompletion); ci = &(conn->connInfo); /*// Parse the connect string and fill in conninfo for this hdbc. */ dconn_get_connect_attributes((SQLCHAR*)connStrIn, ci); /*// If the ConnInfo in the hdbc is missing anything, */ /*// this function will fill them in from the registry (assuming */ /*// of course there is a DSN given -- if not, it does nothing!) */ getDSNinfo(ci, CONN_DONT_OVERWRITE); /*// Fill in any default parameters if they are not there. */ getDSNdefaults(ci); #ifdef WIN32 dialog: #endif ci->focus_password = password_required; switch(fDriverCompletion) { #ifdef WIN32 case SQL_DRIVER_PROMPT: dialog_result = dconn_DoDialog(hwnd, ci); if(dialog_result != SQL_SUCCESS) { return dialog_result; } break; case SQL_DRIVER_COMPLETE_REQUIRED: /* Fall through */ case SQL_DRIVER_COMPLETE: /* Password is not a required parameter. */ if( ci->username[0] == '\0' || ci->server[0] == '\0' || ci->database[0] == '\0' || ci->port[0] == '\0' || password_required) { dialog_result = dconn_DoDialog(hwnd, ci); if(dialog_result != SQL_SUCCESS) { return dialog_result; } } break; #else case SQL_DRIVER_PROMPT: case SQL_DRIVER_COMPLETE: case SQL_DRIVER_COMPLETE_REQUIRED: #endif case SQL_DRIVER_NOPROMPT: break; } /* Password is not a required parameter unless authentication asks for it. For now, I think its better to just let the application ask over and over until a password is entered (the user can always hit Cancel to get out) */ if( ci->username[0] == '\0' || ci->server[0] == '\0' || ci->database[0] == '\0' || ci->port[0] == '\0') { /*// (password_required && ci->password[0] == '\0')) */ return SQL_NO_DATA_FOUND; } /*// do the actual connect */ retval = CC_connect(conn, password_required); if (retval < 0) { /* need a password */ if (fDriverCompletion == SQL_DRIVER_NOPROMPT) { CC_log_error(func, "Need password but Driver_NoPrompt", conn); return SQL_ERROR; /* need a password but not allowed to prompt so error */ } else { #ifdef WIN32 password_required = TRUE; goto dialog; #else return SQL_ERROR; /* until a better solution is found. */ #endif } } else if (retval == 0) { /*// error msg filled in above */ CC_log_error(func, "Error from CC_Connect", conn); return SQL_ERROR; } /*********************************************/ /* Create the Output Connection String */ /*********************************************/ result = SQL_SUCCESS; makeConnectString(connStrOut, ci); len = strlen(connStrOut); if(szConnStrOut) { /* Return the completed string to the caller. The correct method is to only construct the connect string if a dialog was put up, otherwise, it should just copy the connection input string to the output. However, it seems ok to just always construct an output string. There are possible bad side effects on working applications (Access) by implementing the correct behavior, anyway. */ strncpy_null((char*)szConnStrOut, connStrOut, cbConnStrOutMax); if (len >= cbConnStrOutMax) { result = SQL_SUCCESS_WITH_INFO; conn->errornumber = CONN_TRUNCATED; conn->errormsg = "The buffer was too small for the result."; } } if(pcbConnStrOut) *pcbConnStrOut = len; mylog("szConnStrOut = '%s'\n", szConnStrOut); qlog("conn=%u, SQLDriverConnect(out)='%s'\n", conn, szConnStrOut); mylog("SQLDRiverConnect: returning %d\n", result); return result; } #ifdef WIN32 RETCODE dconn_DoDialog(HWND hwnd, ConnInfo *ci) { int dialog_result; mylog("dconn_DoDialog: ci = %u\n", ci); if(hwnd) { dialog_result = DialogBoxParam(s_hModule, MAKEINTRESOURCE(DLG_CONFIG), hwnd, dconn_FDriverConnectProc, (LPARAM) ci); if(!dialog_result || (dialog_result == -1)) { return SQL_NO_DATA_FOUND; } else { return SQL_SUCCESS; } } return SQL_ERROR; } BOOL FAR PASCAL dconn_FDriverConnectProc( HWND hdlg, UINT wMsg, WPARAM wParam, LPARAM lParam) { ConnInfo *ci; switch (wMsg) { case WM_INITDIALOG: ci = (ConnInfo *) lParam; /* Change the caption for the setup dialog */ SetWindowText(hdlg, "PostgreSQL Connection"); SetWindowText(GetDlgItem(hdlg, IDC_DATASOURCE), "Connection"); /* Hide the DSN and description fields */ ShowWindow(GetDlgItem(hdlg, IDC_DSNAMETEXT), SW_HIDE); ShowWindow(GetDlgItem(hdlg, IDC_DSNAME), SW_HIDE); ShowWindow(GetDlgItem(hdlg, IDC_DESCTEXT), SW_HIDE); ShowWindow(GetDlgItem(hdlg, IDC_DESC), SW_HIDE); SetWindowLong(hdlg, DWL_USER, lParam);/*// Save the ConnInfo for the "OK" */ SetDlgStuff(hdlg, ci); if (ci->database[0] == '\0') ; /* default focus */ else if (ci->server[0] == '\0') SetFocus(GetDlgItem(hdlg, IDC_SERVER)); else if (ci->port[0] == '\0') SetFocus(GetDlgItem(hdlg, IDC_PORT)); else if (ci->username[0] == '\0') SetFocus(GetDlgItem(hdlg, IDC_USER)); else if (ci->focus_password) SetFocus(GetDlgItem(hdlg, IDC_PASSWORD)); break; case WM_COMMAND: switch (GET_WM_COMMAND_ID(wParam, lParam)) { case IDOK: ci = (ConnInfo *) GetWindowLong(hdlg, DWL_USER); GetDlgStuff(hdlg, ci); case IDCANCEL: EndDialog(hdlg, GET_WM_COMMAND_ID(wParam, lParam) == IDOK); return TRUE; case IDC_DRIVER: DialogBoxParam(s_hModule, MAKEINTRESOURCE(DLG_OPTIONS_DRV), hdlg, driver_optionsProc, (LPARAM) NULL); break; case IDC_DATASOURCE: ci = (ConnInfo *) GetWindowLong(hdlg, DWL_USER); DialogBoxParam(s_hModule, MAKEINTRESOURCE(DLG_OPTIONS_DS), hdlg, ds_optionsProc, (LPARAM) ci); break; } } return FALSE; } #endif /* WIN32 */ void dconn_get_connect_attributes(UCHAR FAR *connect_string, ConnInfo *ci) { char *our_connect_string; char *pair, *attribute, *value, *equals; char *strtok_arg; memset(ci, 0, sizeof(ConnInfo)); our_connect_string = strdup((char*)connect_string); strtok_arg = our_connect_string; mylog("our_connect_string = '%s'\n", our_connect_string); while(1) { pair = strtok(strtok_arg, ";"); if(strtok_arg) { strtok_arg = 0; } if(!pair) { break; } equals = strchr(pair, '='); if ( ! equals) continue; *equals = '\0'; attribute = pair; /*// ex. DSN */ value = equals + 1; /*// ex. 'CEO co1' */ mylog("attribute = '%s', value = '%s'\n", attribute, value); if( !attribute || !value) continue; /*// Copy the appropriate value to the conninfo */ copyAttributes(ci, attribute, value); } free(our_connect_string); } unixODBC-2.2.14-p2/Drivers/PostgreSQL/environ.c0100644000076400007640000003426207563762204017464 0ustar nicknick /* Module: environ.c * * Description: This module contains routines related to * the environment, such as storing connection handles, * and returning errors. * * Classes: EnvironmentClass (Functions prefix: "EN_") * * API functions: SQLAllocEnv, SQLFreeEnv, SQLError * * Comments: See "notice.txt" for copyright and license information. * */ #include "environ.h" #include "connection.h" #include "statement.h" #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_MALLOC_H #include #elif HAVE_SYS_MALLOC_H #include #endif #ifdef UNIXODBC #include #include #include "dlg_specific.h" #else #include "iodbc.h" #include "isql.h" #include "isqlext.h" #endif /* The one instance of the handles */ ConnectionClass *conns[MAX_CONNECTIONS]; RETCODE SQL_API SQLAllocEnv(HENV FAR *phenv) { static char *func = "SQLAllocEnv"; mylog("**** in SQLAllocEnv ** \n"); /* * add this here from _init (NG) */ getGlobalDefaults(DBMS_NAME, ODBCINST_INI, FALSE); *phenv = (HENV) EN_Constructor(); if ( ! *phenv) { *phenv = SQL_NULL_HENV; EN_log_error(func, "Error allocating environment", NULL); return SQL_ERROR; } mylog("** exit SQLAllocEnv: phenv = %u **\n", *phenv); return SQL_SUCCESS; } RETCODE SQL_API SQLFreeEnv(HENV henv) { static char *func = "SQLFreeEnv"; EnvironmentClass *env = (EnvironmentClass *) henv; mylog("**** in SQLFreeEnv: env = %u ** \n", env); if (env && EN_Destructor(env)) { mylog(" ok\n"); return SQL_SUCCESS; } mylog(" error\n"); EN_log_error(func, "Error freeing environment", env); return SQL_ERROR; } /*// Returns the next SQL error information. */ SQLRETURN SQLError(SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLCHAR *szSqlState, SQLINTEGER *pfNativeError, SQLCHAR *szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT *pcbErrorMsg) { char *msg; int status; mylog("**** SQLError: henv=%u, hdbc=%u, hstmt=%u\n", henv, hdbc, hstmt); if (SQL_NULL_HSTMT != hstmt) { /*// CC: return an error of a hstmt */ StatementClass *stmt = (StatementClass *) hstmt; if (SC_get_error(stmt, &status, &msg)) { mylog("SC_get_error: status = %d, msg = #%s#\n", status, msg); if (NULL == msg) { if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } if (NULL != pcbErrorMsg) *pcbErrorMsg = (SWORD)strlen((char*)msg); if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) strncpy_null((char*)szErrorMsg, msg, cbErrorMsgMax); if (NULL != pfNativeError) *pfNativeError = status; if (NULL != szSqlState) switch (status) { case STMT_TRUNCATED: strcpy((char*)szSqlState, "01004"); break; case STMT_INFO_ONLY: strcpy((char*)szSqlState, "01000"); break; case STMT_BAD_ERROR: strcpy((char*)szSqlState, "08S01"); break; case STMT_CREATE_TABLE_ERROR: strcpy((char*)szSqlState, "S0001"); break; case STMT_STATUS_ERROR: case STMT_SEQUENCE_ERROR: strcpy((char*)szSqlState, "S1010"); break; case STMT_NO_MEMORY_ERROR: strcpy((char*)szSqlState, "S1001"); break; case STMT_COLNUM_ERROR: strcpy((char*)szSqlState, "S1002"); break; case STMT_NO_STMTSTRING: strcpy((char*)szSqlState, "S1001"); break; case STMT_ERROR_TAKEN_FROM_BACKEND: strcpy((char*)szSqlState, "S1000"); break; case STMT_INTERNAL_ERROR: strcpy((char*)szSqlState, "S1000"); break; case STMT_ROW_OUT_OF_RANGE: strcpy((char*)szSqlState, "S1107"); break; case STMT_OPERATION_CANCELLED: strcpy((char*)szSqlState, "S1008"); break; case STMT_NOT_IMPLEMENTED_ERROR: strcpy((char*)szSqlState, "S1C00"); break; case STMT_OPTION_OUT_OF_RANGE_ERROR: strcpy((char*)szSqlState, "S1092"); break; case STMT_BAD_PARAMETER_NUMBER_ERROR: strcpy((char*)szSqlState, "S1093"); break; case STMT_INVALID_COLUMN_NUMBER_ERROR: strcpy((char*)szSqlState, "S1002"); break; case STMT_RESTRICTED_DATA_TYPE_ERROR: strcpy((char*)szSqlState, "07006"); break; case STMT_INVALID_CURSOR_STATE_ERROR: strcpy((char*)szSqlState, "24000"); break; case STMT_OPTION_VALUE_CHANGED: strcpy((char*)szSqlState, "01S02"); break; case STMT_INVALID_CURSOR_NAME: strcpy((char*)szSqlState, "34000"); break; case STMT_NO_CURSOR_NAME: strcpy((char*)szSqlState, "S1015"); break; case STMT_INVALID_ARGUMENT_NO: strcpy((char*)szSqlState, "S1009"); break; case STMT_INVALID_CURSOR_POSITION: strcpy((char*)szSqlState, "S1109"); break; case STMT_VALUE_OUT_OF_RANGE: strcpy((char*)szSqlState, "22003"); break; case STMT_OPERATION_INVALID: strcpy((char*)szSqlState, "S1011"); break; case STMT_EXEC_ERROR: default: strcpy((char*)szSqlState, "S1000"); break; } mylog(" szSqlState = '%s', szError='%s'\n", szSqlState, szErrorMsg); } else { if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; mylog(" returning NO_DATA_FOUND\n"); return SQL_NO_DATA_FOUND; } return SQL_SUCCESS; } else if (SQL_NULL_HDBC != hdbc) { ConnectionClass *conn = (ConnectionClass *) hdbc; mylog("calling CC_get_error\n"); if (CC_get_error(conn, &status, &msg)) { mylog("CC_get_error: status = %d, msg = #%s#\n", status, msg); if (NULL == msg) { if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } if (NULL != pcbErrorMsg) *pcbErrorMsg = (SWORD)strlen(msg); if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) strncpy_null((char*)szErrorMsg, msg, cbErrorMsgMax); if (NULL != pfNativeError) *pfNativeError = status; if (NULL != szSqlState) switch(status) { case STMT_OPTION_VALUE_CHANGED: case CONN_OPTION_VALUE_CHANGED: strcpy((char*)szSqlState, "01S02"); break; case STMT_TRUNCATED: case CONN_TRUNCATED: strcpy((char*)szSqlState, "01004"); /*// data truncated */ break; case CONN_INIREAD_ERROR: strcpy((char*)szSqlState, "IM002"); /*// data source not found */ break; case CONN_OPENDB_ERROR: strcpy((char*)szSqlState, "08001"); /*// unable to connect to data source */ break; case CONN_INVALID_AUTHENTICATION: case CONN_AUTH_TYPE_UNSUPPORTED: strcpy((char*)szSqlState, "28000"); break; case CONN_STMT_ALLOC_ERROR: strcpy((char*)szSqlState, "S1001"); /*// memory allocation failure */ break; case CONN_IN_USE: strcpy((char*)szSqlState, "S1000"); /*// general error */ break; case CONN_UNSUPPORTED_OPTION: strcpy((char*)szSqlState, "IM001"); /*// driver does not support this function */ case CONN_INVALID_ARGUMENT_NO: strcpy((char*)szSqlState, "S1009"); /*// invalid argument value */ break; case CONN_TRANSACT_IN_PROGRES: strcpy((char*)szSqlState, "S1010"); /*// when the user tries to switch commit mode in a transaction */ /*// -> function sequence error */ break; case CONN_NO_MEMORY_ERROR: strcpy((char*)szSqlState, "S1001"); break; case CONN_NOT_IMPLEMENTED_ERROR: case STMT_NOT_IMPLEMENTED_ERROR: strcpy((char*)szSqlState, "S1C00"); break; case CONN_VALUE_OUT_OF_RANGE: case STMT_VALUE_OUT_OF_RANGE: strcpy((char*)szSqlState, "22003"); break; default: strcpy((char*)szSqlState, "S1000"); /*// general error */ break; } } else { mylog("CC_Get_error returned nothing.\n"); if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } return SQL_SUCCESS; } else if (SQL_NULL_HENV != henv) { EnvironmentClass *env = (EnvironmentClass *)henv; if(EN_get_error(env, &status, &msg)) { mylog("EN_get_error: status = %d, msg = #%s#\n", status, msg); if (NULL == msg) { if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } if (NULL != pcbErrorMsg) *pcbErrorMsg = (SWORD)strlen(msg); if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) strncpy_null((char*)szErrorMsg, msg, cbErrorMsgMax); if (NULL != pfNativeError) *pfNativeError = status; if(szSqlState) { switch(status) { case ENV_ALLOC_ERROR: /*// memory allocation failure */ strcpy((char*)szSqlState, "S1001"); break; default: strcpy((char*)szSqlState, "S1000"); /*// general error */ break; } } } else { if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } return SQL_SUCCESS; } if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } /*********************************************************************/ /* * EnvironmentClass implementation */ EnvironmentClass *EN_Constructor(void) { EnvironmentClass *rv; rv = (EnvironmentClass *) malloc(sizeof(EnvironmentClass)); if( rv) { rv->errormsg = 0; rv->errornumber = 0; } return rv; } char EN_Destructor(EnvironmentClass *self) { int lf; char rv = 1; mylog("in EN_Destructor, self=%u\n", self); /*// the error messages are static strings distributed throughout */ /*// the source--they should not be freed */ /* Free any connections belonging to this environment */ for (lf = 0; lf < MAX_CONNECTIONS; lf++) { if (conns[lf] && conns[lf]->henv == (HENV) self) rv = rv && CC_Destructor(conns[lf]); } mylog("exit EN_Destructor: rv = %d\n", rv); free( self ); return rv; } char EN_get_error(EnvironmentClass *self, int *number, char **message) { if(self && self->errormsg && self->errornumber) { *message = self->errormsg; *number = self->errornumber; self->errormsg = 0; self->errornumber = 0; return 1; } else { return 0; } } char EN_add_connection(EnvironmentClass *self, ConnectionClass *conn) { int i; mylog("EN_add_connection: self = %u, conn = %u\n", self, conn); for (i = 0; i < MAX_CONNECTIONS; i++) { if ( ! conns[i]) { conn->henv = (HENV) self; conns[i] = conn; mylog(" added at i =%d, conn->henv = %u, conns[i]->henv = %u\n", i, conn->henv, conns[i]->henv); return TRUE; } } return FALSE; } char EN_remove_connection(EnvironmentClass *self, ConnectionClass *conn) { int i; for (i = 0; i < MAX_CONNECTIONS; i++) if (conns[i] == conn && conns[i]->status != CONN_EXECUTING) { conns[i] = NULL; return TRUE; } return FALSE; } void EN_log_error(char *func, char *desc, EnvironmentClass *self) { if (self) { qlog("ENVIRON ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->errornumber, self->errormsg); } else qlog("INVALID ENVIRON HANDLE ERROR: func=%s, desc='%s'\n", func, desc); } unixODBC-2.2.14-p2/Drivers/PostgreSQL/execute.c0100644000076400007640000005470410021405715017431 0ustar nicknick /* Module: execute.c * * Description: This module contains routines related to * preparing and executing an SQL statement. * * Classes: n/a * * API functions: SQLPrepare, SQLExecute, SQLExecDirect, SQLTransact, * SQLCancel, SQLNativeSql, SQLParamData, SQLPutData * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #include #include #include #ifndef WIN32 #ifdef UNIXODBC #include #else #include "iodbc.h" #include "isqlext.h" #endif #else #include #include #endif #include "connection.h" #include "statement.h" #include "qresult.h" #include "convert.h" #include "bind.h" #include "lobj.h" extern GLOBAL_VALUES globals; RETCODE SQL_API PG__SQLExecute( HSTMT hstmt); /*// Perform a Prepare on the SQL statement */ SQLRETURN SQLPrepare(SQLHSTMT hstmt, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStr) { static char *func = "SQLPrepare"; StatementClass *self = (StatementClass *) hstmt; int sqllen = 0; /* used for MAX_ROWS if specified */ int limlen = 0; char buffer[32]; mylog( "%s: entering...\n", func); if ( ! self) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } /* According to the ODBC specs it is valid to call SQLPrepare mulitple times. In that case, the bound SQL statement is replaced by the new one */ switch(self->status) { case STMT_PREMATURE: mylog("**** SQLPrepare: STMT_PREMATURE, recycle\n"); SC_recycle_statement(self); /* recycle the statement, but do not remove parameter bindings */ break; case STMT_FINISHED: mylog("**** SQLPrepare: STMT_FINISHED, recycle\n"); SC_recycle_statement(self); /* recycle the statement, but do not remove parameter bindings */ break; case STMT_ALLOCATED: mylog("**** SQLPrepare: STMT_ALLOCATED, copy\n"); self->status = STMT_READY; break; case STMT_READY: mylog("**** SQLPrepare: STMT_READY, change SQL\n"); break; case STMT_EXECUTING: mylog("**** SQLPrepare: STMT_EXECUTING, error!\n"); self->errornumber = STMT_SEQUENCE_ERROR; self->errormsg = "SQLPrepare(): The handle does not point to a statement that is ready to be executed"; SC_log_error(func, "", self); return SQL_ERROR; default: self->errornumber = STMT_INTERNAL_ERROR; self->errormsg = "An Internal Error has occured -- Unknown statement status."; SC_log_error(func, "", self); return SQL_ERROR; } if (self->statement) free(self->statement); self->statement_type = statement_type((char*)szSqlStr); if (self->statement_type == STMT_TYPE_SELECT && 0 != self->options.maxRows) { limlen = sprintf(buffer," LIMIT %d", self->options.maxRows); } sqllen = my_strlen((char*)szSqlStr, cbSqlStr) + limlen; self->statement = make_string((char*)szSqlStr, sqllen, NULL); if ( ! self->statement) { self->errornumber = STMT_NO_MEMORY_ERROR; self->errormsg = "No memory available to store statement"; SC_log_error(func, "", self); return SQL_ERROR; } if (self->statement_type == STMT_TYPE_SELECT && 0 != self->options.maxRows) { strcat(self->statement, buffer); } self->prepare = TRUE; /*// Check if connection is readonly (only selects are allowed) */ if ( CC_is_readonly(self->hdbc) && STMT_UPDATE(self)) { self->errornumber = STMT_EXEC_ERROR; self->errormsg = "Connection is readonly, only select statements are allowed."; SC_log_error(func, "", self); return SQL_ERROR; } return SQL_SUCCESS; } /*// - - - - - - - - - */ /*// Performs the equivalent of SQLPrepare, followed by SQLExecute. */ RETCODE SQL_API PG__SQLExecDirect( HSTMT hstmt, UCHAR FAR *szSqlStr, SDWORD cbSqlStr) { StatementClass *stmt = (StatementClass *) hstmt; RETCODE result; static char *func = "SQLExecDirect"; mylog( "%s: entering...\n", func); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if (stmt->statement) free(stmt->statement); /*// keep a copy of the un-parametrized statement, in case */ /*// they try to execute this statement again */ stmt->statement = make_string((char*)szSqlStr, cbSqlStr, NULL); if ( ! stmt->statement) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "No memory available to store statement"; SC_log_error(func, "", stmt); return SQL_ERROR; } mylog("**** %s: hstmt=%u, statement='%s'\n", func, hstmt, stmt->statement); stmt->prepare = FALSE; stmt->statement_type = statement_type(stmt->statement); /*// Check if connection is readonly (only selects are allowed) */ if ( CC_is_readonly(stmt->hdbc) && STMT_UPDATE(stmt)) { stmt->errornumber = STMT_EXEC_ERROR; stmt->errormsg = "Connection is readonly, only select statements are allowed."; SC_log_error(func, "", stmt); return SQL_ERROR; } mylog("%s: calling SQLExecute...\n", func); result = PG__SQLExecute(hstmt); mylog("%s: returned %hd from SQLExecute\n", func, result); return result; } SQLRETURN SQLExecDirect(SQLHSTMT hstmt, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStr) { return PG__SQLExecDirect( hstmt, szSqlStr, cbSqlStr ); } /*// Execute a prepared SQL statement */ RETCODE SQL_API PG__SQLExecute( HSTMT hstmt) { static char *func="SQLExecute"; StatementClass *stmt = (StatementClass *) hstmt; ConnectionClass *conn; int i, retval; mylog("%s: entering...\n", func); if ( ! stmt) { SC_log_error(func, "", NULL); mylog("%s: NULL statement so return SQL_INVALID_HANDLE\n", func); return SQL_INVALID_HANDLE; } /* If the statement is premature, it means we already executed it from an SQLPrepare/SQLDescribeCol type of scenario. So just return success. */ if ( stmt->prepare && stmt->status == STMT_PREMATURE) { stmt->status = STMT_FINISHED; if (stmt->errormsg == NULL) { mylog("%s: premature statement but return SQL_SUCCESS\n", func); return SQL_SUCCESS; } else { SC_log_error(func, "", stmt); mylog("%s: premature statement so return SQL_ERROR\n", func); return SQL_ERROR; } } mylog("%s: clear errors...\n", func); SC_clear_error(stmt); conn = SC_get_conn(stmt); if (conn->status == CONN_EXECUTING) { stmt->errormsg = "Connection is already in use."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); mylog("%s: problem with connection\n", func); return SQL_ERROR; } if ( ! stmt->statement) { stmt->errornumber = STMT_NO_STMTSTRING; stmt->errormsg = "This handle does not have a SQL statement stored in it"; SC_log_error(func, "", stmt); mylog("%s: problem with handle\n", func); return SQL_ERROR; } /* If SQLExecute is being called again, recycle the statement. Note this should have been done by the application in a call to SQLFreeStmt(SQL_CLOSE) or SQLCancel. */ if (stmt->status == STMT_FINISHED) { mylog("%s: recycling statement (should have been done by app)...\n", func); SC_recycle_statement(stmt); } /* Check if the statement is in the correct state */ if ((stmt->prepare && stmt->status != STMT_READY) || (stmt->status != STMT_ALLOCATED && stmt->status != STMT_READY)) { stmt->errornumber = STMT_STATUS_ERROR; stmt->errormsg = "The handle does not point to a statement that is ready to be executed"; SC_log_error(func, "", stmt); mylog("%s: problem with statement\n", func); return SQL_ERROR; } /* The bound parameters could have possibly changed since the last execute of this statement? Therefore check for params and re-copy. */ stmt->data_at_exec = -1; for (i = 0; i < stmt->parameters_allocated; i++) { /* Check for data at execution parameters */ if ( stmt->parameters[i].data_at_exec == TRUE) { if (stmt->data_at_exec < 0) stmt->data_at_exec = 1; else stmt->data_at_exec++; } } /*// If there are some data at execution parameters, return need data */ /*// SQLParamData and SQLPutData will be used to send params and execute the statement. */ if (stmt->data_at_exec > 0) return SQL_NEED_DATA; mylog("%s: copying statement params: trans_status=%d, len=%d, stmt='%s'\n", func, conn->transact_status, strlen(stmt->statement), stmt->statement); /*// Create the statement with parameters substituted. */ retval = copy_statement_with_parameters(stmt); if( retval != SQL_SUCCESS) /* error msg passed from above */ return retval; mylog(" stmt_with_params = '%s'\n", stmt->stmt_with_params); return SC_execute(stmt); } RETCODE SQL_API SQLExecute( HSTMT hstmt) { return PG__SQLExecute( hstmt ); } /*// - - - - - - - - - */ RETCODE SQL_API PG__SQLTransact( HENV henv, HDBC hdbc, UWORD fType) { static char *func = "SQLTransact"; extern ConnectionClass *conns[]; ConnectionClass *conn; QResultClass *res; char ok, *stmt_string; int lf; mylog("entering %s: hdbc=%u, henv=%u\n", func, hdbc, henv); if (hdbc == SQL_NULL_HDBC && henv == SQL_NULL_HENV) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } /* If hdbc is null and henv is valid, it means transact all connections on that henv. */ if (hdbc == SQL_NULL_HDBC && henv != SQL_NULL_HENV) { for (lf=0; lf henv == henv) if ( PG__SQLTransact(henv, (HDBC) conn, fType) != SQL_SUCCESS) return SQL_ERROR; } return SQL_SUCCESS; } conn = (ConnectionClass *) hdbc; if (fType == SQL_COMMIT) { stmt_string = "COMMIT"; } else if (fType == SQL_ROLLBACK) { stmt_string = "ROLLBACK"; } else { conn->errornumber = CONN_INVALID_ARGUMENT_NO; conn->errormsg ="SQLTransact can only be called with SQL_COMMIT or SQL_ROLLBACK as parameter"; CC_log_error(func, "", conn); return SQL_ERROR; } /* If manual commit and in transaction, then proceed. */ if ( ! CC_is_in_autocommit(conn) && CC_is_in_trans(conn)) { mylog("SQLTransact: sending on conn %d '%s'\n", conn, stmt_string); res = CC_send_query(conn, stmt_string, NULL); CC_set_no_trans(conn); if ( ! res) { /*// error msg will be in the connection */ CC_log_error(func, "", conn); return SQL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { CC_log_error(func, "", conn); return SQL_ERROR; } } return SQL_SUCCESS; } RETCODE SQL_API SQLTransact( HENV henv, HDBC hdbc, UWORD fType) { return PG__SQLTransact( henv, hdbc, fType ); } /*// - - - - - - - - - */ RETCODE SQL_API SQLCancel( HSTMT hstmt) /*// Statement to cancel. */ { static char *func="SQLCancel"; StatementClass *stmt = (StatementClass *) hstmt; RETCODE result; #ifdef WIN32 HMODULE hmodule; FARPROC addr; #endif mylog( "%s: entering...\n", func); /*// Check if this can handle canceling in the middle of a SQLPutData? */ if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } /*// Not in the middle of SQLParamData/SQLPutData so cancel like a close. */ if (stmt->data_at_exec < 0) { /* MAJOR HACK for Windows to reset the driver manager's cursor state: Because of what seems like a bug in the Odbc driver manager, SQLCancel does not act like a SQLFreeStmt(CLOSE), as many applications depend on this behavior. So, this brute force method calls the driver manager's function on behalf of the application. */ #ifdef WIN32 if (globals.cancel_as_freestmt) { hmodule = GetModuleHandle("ODBC32"); addr = GetProcAddress(hmodule, "SQLFreeStmt"); result = addr( (char *) (stmt->phstmt) - 96, SQL_CLOSE); } else { result = PG__SQLFreeStmt( hstmt, SQL_CLOSE); } #else result = PG__SQLFreeStmt( hstmt, SQL_CLOSE); #endif mylog("SQLCancel: SQLFreeStmt returned %d\n", result); SC_clear_error((StatementClass*)hstmt); return SQL_SUCCESS; } /*// In the middle of SQLParamData/SQLPutData, so cancel that. */ /*// Note, any previous data-at-exec buffers will be freed in the recycle */ /*// if they call SQLExecDirect or SQLExecute again. */ stmt->data_at_exec = -1; stmt->current_exec_param = -1; stmt->put_data = FALSE; return SQL_SUCCESS; } /*// - - - - - - - - - */ /*// Returns the SQL string as modified by the driver. */ /*// Currently, just copy the input string without modification */ /*// observing buffer limits and truncation. */ SQLRETURN SQLNativeSql( SQLHDBC hdbc, SQLCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr) { static char *func="SQLNativeSql"; int len = 0; char *ptr; ConnectionClass *conn = (ConnectionClass *) hdbc; RETCODE result; mylog( "%s: entering...cbSqlStrIn=%d\n", func, cbSqlStrIn); ptr = (cbSqlStrIn == 0) ? "" : make_string((char*)szSqlStrIn, cbSqlStrIn, NULL); if ( ! ptr) { conn->errornumber = CONN_NO_MEMORY_ERROR; conn->errormsg = "No memory available to store native sql string"; CC_log_error(func, "", conn); return SQL_ERROR; } result = SQL_SUCCESS; len = strlen(ptr); if (szSqlStr) { strncpy_null((char*)szSqlStr, ptr, cbSqlStrMax); if (len >= cbSqlStrMax) { result = SQL_SUCCESS_WITH_INFO; conn->errornumber = STMT_TRUNCATED; conn->errormsg = "The buffer was too small for the result."; } } if (pcbSqlStr) *pcbSqlStr = len; free(ptr); return result; } /*// - - - - - - - - - */ /*// Supplies parameter data at execution time. Used in conjuction with */ /*// SQLPutData. */ RETCODE SQL_API SQLParamData( HSTMT hstmt, PTR FAR *prgbValue) { static char *func = "SQLParamData"; StatementClass *stmt = (StatementClass *) hstmt; int i, retval; mylog( "%s: entering...\n", func); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } mylog("%s: data_at_exec=%d, params_alloc=%d\n", func, stmt->data_at_exec, stmt->parameters_allocated); if (stmt->data_at_exec < 0) { stmt->errornumber = STMT_SEQUENCE_ERROR; stmt->errormsg = "No execution-time parameters for this statement"; SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->data_at_exec > stmt->parameters_allocated) { stmt->errornumber = STMT_SEQUENCE_ERROR; stmt->errormsg = "Too many execution-time parameters were present"; SC_log_error(func, "", stmt); return SQL_ERROR; } /* close the large object */ if ( stmt->lobj_fd >= 0) { odbc_lo_close(stmt->hdbc, stmt->lobj_fd); /* commit transaction if needed */ if (!globals.use_declarefetch && CC_is_in_autocommit(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "COMMIT", NULL); if (!res) { stmt->errormsg = "Could not commit (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { stmt->errormsg = "Could not commit (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } CC_set_no_trans(stmt->hdbc); } stmt->lobj_fd = -1; } /* Done, now copy the params and then execute the statement */ if (stmt->data_at_exec == 0) { retval = copy_statement_with_parameters(stmt); if (retval != SQL_SUCCESS) return retval; stmt->current_exec_param = -1; return SC_execute(stmt); } /* Set beginning param; if first time SQLParamData is called , start at 0. Otherwise, start at the last parameter + 1. */ i = stmt->current_exec_param >= 0 ? stmt->current_exec_param+1 : 0; /* At least 1 data at execution parameter, so Fill in the token value */ for ( ; i < stmt->parameters_allocated; i++) { if (stmt->parameters[i].data_at_exec == TRUE) { stmt->data_at_exec--; stmt->current_exec_param = i; stmt->put_data = FALSE; *prgbValue = stmt->parameters[i].buffer; /* token */ break; } } return SQL_NEED_DATA; } /*// - - - - - - - - - */ /*// Supplies parameter data at execution time. Used in conjunction with */ /*// SQLParamData. */ SQLRETURN SQLPutData(SQLHSTMT hstmt, SQLPOINTER rgbValue, SQLLEN cbValue) { static char *func = "SQLPutData"; StatementClass *stmt = (StatementClass *) hstmt; int old_pos, retval; ParameterInfoClass *current_param; char *buffer; mylog( "%s: entering...\n", func); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if (stmt->current_exec_param < 0) { stmt->errornumber = STMT_SEQUENCE_ERROR; stmt->errormsg = "Previous call was not SQLPutData or SQLParamData"; SC_log_error(func, "", stmt); return SQL_ERROR; } current_param = &(stmt->parameters[stmt->current_exec_param]); if ( ! stmt->put_data) { /* first call */ mylog("SQLPutData: (1) cbValue = %d\n", cbValue); stmt->put_data = TRUE; current_param->EXEC_used = malloc(sizeof(SDWORD)); if ( ! current_param->EXEC_used) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Out of memory in SQLPutData (1)"; SC_log_error(func, "", stmt); return SQL_ERROR; } *current_param->EXEC_used = cbValue; if (cbValue == SQL_NULL_DATA) return SQL_SUCCESS; /* Handle Long Var Binary with Large Objects */ if ( current_param->SQLType == SQL_LONGVARBINARY) { /* begin transaction if needed */ if(!CC_is_in_trans(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "BEGIN", NULL); if (!res) { stmt->errormsg = "Could not begin (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { stmt->errormsg = "Could not begin (in-line) a transaction"; stmt->errornumber = STMT_EXEC_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } CC_set_in_trans(stmt->hdbc); } /* store the oid */ current_param->lobj_oid = odbc_lo_creat(stmt->hdbc, INV_READ | INV_WRITE); if (current_param->lobj_oid == 0) { stmt->errornumber = STMT_EXEC_ERROR; stmt->errormsg = "Couldnt create large object."; SC_log_error(func, "", stmt); return SQL_ERROR; } /* major hack -- to allow convert to see somethings there */ /* have to modify convert to handle this better */ current_param->EXEC_buffer = (char *) ¤t_param->lobj_oid; /* store the fd */ stmt->lobj_fd = odbc_lo_open(stmt->hdbc, current_param->lobj_oid, INV_WRITE); if ( stmt->lobj_fd < 0) { stmt->errornumber = STMT_EXEC_ERROR; stmt->errormsg = "Couldnt open large object for writing."; SC_log_error(func, "", stmt); return SQL_ERROR; } retval = odbc_lo_write(stmt->hdbc, stmt->lobj_fd, rgbValue, cbValue); mylog("odbc_lo_write: cbValue=%d, wrote %d bytes\n", cbValue, retval); } else { /* for handling text fields and small binaries */ if (cbValue == SQL_NTS) { current_param->EXEC_buffer = strdup(rgbValue); if ( ! current_param->EXEC_buffer) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Out of memory in SQLPutData (2)"; SC_log_error(func, "", stmt); return SQL_ERROR; } } else { current_param->EXEC_buffer = malloc(cbValue + 1); if ( ! current_param->EXEC_buffer) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Out of memory in SQLPutData (2)"; SC_log_error(func, "", stmt); return SQL_ERROR; } memcpy(current_param->EXEC_buffer, rgbValue, cbValue); current_param->EXEC_buffer[cbValue] = '\0'; } } } else { /* calling SQLPutData more than once */ mylog("SQLPutData: (>1) cbValue = %d\n", cbValue); if (current_param->SQLType == SQL_LONGVARBINARY) { /* the large object fd is in EXEC_buffer */ retval = odbc_lo_write(stmt->hdbc, stmt->lobj_fd, rgbValue, cbValue); mylog("odbc_lo_write(2): cbValue = %d, wrote %d bytes\n", cbValue, retval); *current_param->EXEC_used += cbValue; } else { buffer = current_param->EXEC_buffer; if (cbValue == SQL_NTS) { buffer = realloc(buffer, strlen(buffer) + strlen(rgbValue) + 1); if ( ! buffer) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Out of memory in SQLPutData (3)"; SC_log_error(func, "", stmt); return SQL_ERROR; } strcat(buffer, rgbValue); mylog(" cbValue = SQL_NTS: strlen(buffer) = %d\n", strlen(buffer)); *current_param->EXEC_used = cbValue; /* reassign buffer incase realloc moved it */ current_param->EXEC_buffer = buffer; } else if (cbValue > 0) { old_pos = *current_param->EXEC_used; *current_param->EXEC_used += cbValue; mylog(" cbValue = %d, old_pos = %d, *used = %d\n", cbValue, old_pos, *current_param->EXEC_used); /* dont lose the old pointer in case out of memory */ buffer = realloc(current_param->EXEC_buffer, *current_param->EXEC_used + 1); if ( ! buffer) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Out of memory in SQLPutData (3)"; SC_log_error(func, "", stmt); return SQL_ERROR; } memcpy(&buffer[old_pos], rgbValue, cbValue); buffer[*current_param->EXEC_used] = '\0'; /* reassign buffer incase realloc moved it */ current_param->EXEC_buffer = buffer; } else { SC_log_error(func, "bad cbValue", stmt); return SQL_ERROR; } } } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/PostgreSQL/info.c0100644000076400007640000026410010065530750016721 0ustar nicknick /* Module: info.c * * Description: This module contains routines related to * ODBC informational functions. * * Classes: n/a * * API functions: SQLGetInfo, SQLGetTypeInfo, SQLGetFunctions, * SQLTables, SQLColumns, SQLStatistics, SQLSpecialColumns, * SQLPrimaryKeys, SQLForeignKeys, * SQLProcedureColumns(NI), SQLProcedures(NI), * SQLTablePrivileges(NI), SQLColumnPrivileges(NI) * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "psqlodbc.h" #ifndef WIN32 #ifdef UNIXODBC #include #include #else #include "iodbc.h" #include "isql.h" #include "isqlext.h" #endif #include /* for tolower function */ #else #include #include #include #endif #include "tuple.h" #include "pgtypes.h" #include "environ.h" #include "connection.h" #include "statement.h" #include "qresult.h" #include "bind.h" #include "misc.h" #include "pgtypes.h" /* Trigger related stuff for SQLForeign Keys */ #define TRIGGER_SHIFT 3 #define TRIGGER_MASK 0x03 #define TRIGGER_DELETE 0x01 #define TRIGGER_UPDATE 0x02 extern GLOBAL_VALUES globals; /*// - - - - - - - - - */ RETCODE SQL_API SQLGetInfo( HDBC hdbc, UWORD fInfoType, PTR rgbInfoValue, SWORD cbInfoValueMax, SWORD FAR *pcbInfoValue) { static char *func = "SQLGetInfo"; ConnectionClass *conn = (ConnectionClass *) hdbc; ConnInfo *ci; char *p = NULL; int len = 0, value = 0; RETCODE result; mylog( "%s: entering...fInfoType=%d\n", func, fInfoType); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } ci = &conn->connInfo; switch (fInfoType) { case SQL_ACCESSIBLE_PROCEDURES: /* ODBC 1.0 */ p = "N"; break; case SQL_ACCESSIBLE_TABLES: /* ODBC 1.0 */ p = "N"; break; case SQL_ACTIVE_CONNECTIONS: /* ODBC 1.0 */ len = 2; value = MAX_CONNECTIONS; break; case SQL_ACTIVE_STATEMENTS: /* ODBC 1.0 */ len = 2; value = 0; break; case SQL_ALTER_TABLE: /* ODBC 2.0 */ len = 4; value = SQL_AT_ADD_COLUMN; break; case SQL_BOOKMARK_PERSISTENCE: /* ODBC 2.0 */ /* very simple bookmark support */ len = 4; value = globals.use_declarefetch ? 0 : (SQL_BP_SCROLL); break; case SQL_COLUMN_ALIAS: /* ODBC 2.0 */ p = "N"; break; case SQL_CONCAT_NULL_BEHAVIOR: /* ODBC 1.0 */ len = 2; value = SQL_CB_NON_NULL; break; case SQL_CONVERT_BIGINT: case SQL_CONVERT_BINARY: case SQL_CONVERT_BIT: case SQL_CONVERT_CHAR: case SQL_CONVERT_DATE: case SQL_CONVERT_DECIMAL: case SQL_CONVERT_DOUBLE: case SQL_CONVERT_FLOAT: case SQL_CONVERT_INTEGER: case SQL_CONVERT_LONGVARBINARY: case SQL_CONVERT_LONGVARCHAR: case SQL_CONVERT_NUMERIC: case SQL_CONVERT_REAL: case SQL_CONVERT_SMALLINT: case SQL_CONVERT_TIME: case SQL_CONVERT_TIMESTAMP: case SQL_CONVERT_TINYINT: case SQL_CONVERT_VARBINARY: case SQL_CONVERT_VARCHAR: /* ODBC 1.0 */ len = 4; value = fInfoType; break; case SQL_CONVERT_FUNCTIONS: /* ODBC 1.0 */ len = 4; value = 0; break; case SQL_CORRELATION_NAME: /* ODBC 1.0 */ /* Saying no correlation name makes Query not work right. value = SQL_CN_NONE; */ len = 2; value = SQL_CN_ANY; break; case SQL_CURSOR_COMMIT_BEHAVIOR: /* ODBC 1.0 */ len = 2; value = SQL_CB_CLOSE; break; case SQL_CURSOR_ROLLBACK_BEHAVIOR: /* ODBC 1.0 */ len = 2; value = SQL_CB_CLOSE; break; case SQL_DATA_SOURCE_NAME: /* ODBC 1.0 */ p = CC_get_DSN(conn); break; case SQL_DATA_SOURCE_READ_ONLY: /* ODBC 1.0 */ p = CC_is_readonly(conn) ? "Y" : "N"; break; case SQL_DATABASE_NAME: /* Support for old ODBC 1.0 Apps */ /* Returning the database name causes problems in MS Query. It generates query like: "SELECT DISTINCT a FROM byronncrap3 crap3" p = CC_get_database(conn); */ p = ""; break; case SQL_DBMS_NAME: /* ODBC 1.0 */ p = DBMS_NAME; break; case SQL_DBMS_VER: /* ODBC 1.0 */ p = DBMS_VERSION; break; case SQL_DEFAULT_TXN_ISOLATION: /* ODBC 1.0 */ len = 4; value = SQL_TXN_READ_COMMITTED; /*//SQL_TXN_SERIALIZABLE; */ break; case SQL_DRIVER_NAME: /* ODBC 1.0 */ p = DRIVER_FILE_NAME; break; case SQL_DRIVER_ODBC_VER: p = DRIVER_ODBC_VER; break; case SQL_DRIVER_VER: /* ODBC 1.0 */ p = POSTGRESDRIVERVERSION; break; case SQL_EXPRESSIONS_IN_ORDERBY: /* ODBC 1.0 */ p = "N"; break; case SQL_FETCH_DIRECTION: /* ODBC 1.0 */ len = 4; value = globals.use_declarefetch ? (SQL_FD_FETCH_NEXT) : (SQL_FD_FETCH_NEXT | SQL_FD_FETCH_FIRST | SQL_FD_FETCH_LAST | SQL_FD_FETCH_PRIOR | SQL_FD_FETCH_ABSOLUTE | SQL_FD_FETCH_RELATIVE | SQL_FD_FETCH_BOOKMARK); break; case SQL_FILE_USAGE: /* ODBC 2.0 */ len = 2; value = SQL_FILE_NOT_SUPPORTED; break; case SQL_GETDATA_EXTENSIONS: /* ODBC 2.0 */ len = 4; value = (SQL_GD_ANY_COLUMN | SQL_GD_ANY_ORDER | SQL_GD_BOUND | SQL_GD_BLOCK); break; case SQL_GROUP_BY: /* ODBC 2.0 */ len = 2; value = SQL_GB_GROUP_BY_EQUALS_SELECT; break; case SQL_IDENTIFIER_CASE: /* ODBC 1.0 */ /* are identifiers case-sensitive (yes, but only when quoted. If not quoted, they default to lowercase) */ len = 2; value = SQL_IC_LOWER; break; case SQL_IDENTIFIER_QUOTE_CHAR: /* ODBC 1.0 */ /* the character used to quote "identifiers" */ p = PROTOCOL_62(ci) ? " " : "\""; break; case SQL_KEYWORDS: /* ODBC 2.0 */ p = ""; break; case SQL_LIKE_ESCAPE_CLAUSE: /* ODBC 2.0 */ /* is there a character that escapes '%' and '_' in a LIKE clause? not as far as I can tell */ p = "N"; break; case SQL_LOCK_TYPES: /* ODBC 2.0 */ len = 4; value = globals.lie ? (SQL_LCK_NO_CHANGE | SQL_LCK_EXCLUSIVE | SQL_LCK_UNLOCK) : SQL_LCK_NO_CHANGE; break; case SQL_MAX_BINARY_LITERAL_LEN: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_MAX_CHAR_LITERAL_LEN: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_MAX_COLUMN_NAME_LEN: /* ODBC 1.0 */ len = 2; value = MAX_COLUMN_LEN; break; case SQL_MAX_COLUMNS_IN_GROUP_BY: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_COLUMNS_IN_INDEX: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_COLUMNS_IN_ORDER_BY: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_COLUMNS_IN_SELECT: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_COLUMNS_IN_TABLE: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_CURSOR_NAME_LEN: /* ODBC 1.0 */ len = 2; value = MAX_CURSOR_LEN; break; case SQL_MAX_INDEX_SIZE: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_MAX_OWNER_NAME_LEN: /* ODBC 1.0 */ len = 2; value = 0; break; case SQL_MAX_PROCEDURE_NAME_LEN: /* ODBC 1.0 */ len = 2; value = 0; break; case SQL_MAX_QUALIFIER_NAME_LEN: /* ODBC 1.0 */ len = 2; value = 0; break; case SQL_MAX_ROW_SIZE: /* ODBC 2.0 */ len = 4; value = 8192; break; case SQL_MAX_ROW_SIZE_INCLUDES_LONG: /* ODBC 2.0 */ /* does the preceding value include LONGVARCHAR and LONGVARBINARY fields? Well, it does include longvarchar, but not longvarbinary. */ p = "Y"; break; case SQL_MAX_STATEMENT_LEN: /* ODBC 2.0 */ /* maybe this should be 8192? */ len = 4; value = 0; break; case SQL_MAX_TABLE_NAME_LEN: /* ODBC 1.0 */ len = 2; value = MAX_TABLE_LEN; break; case SQL_MAX_TABLES_IN_SELECT: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_USER_NAME_LEN: len = 2; value = 0; break; case SQL_MULT_RESULT_SETS: /* ODBC 1.0 */ /* Don't support multiple result sets but say yes anyway? */ p = "Y"; break; case SQL_MULTIPLE_ACTIVE_TXN: /* ODBC 1.0 */ p = "Y"; break; case SQL_NEED_LONG_DATA_LEN: /* ODBC 2.0 */ /* Dont need the length, SQLPutData can handle any size and multiple calls */ p = "N"; break; case SQL_NON_NULLABLE_COLUMNS: /* ODBC 1.0 */ len = 2; value = SQL_NNC_NON_NULL; break; case SQL_NULL_COLLATION: /* ODBC 2.0 */ /* where are nulls sorted? */ len = 2; value = SQL_NC_END; break; case SQL_NUMERIC_FUNCTIONS: /* ODBC 1.0 */ len = 4; value = 0; break; case SQL_ODBC_API_CONFORMANCE: /* ODBC 1.0 */ len = 2; value = SQL_OAC_LEVEL1; break; case SQL_ODBC_SAG_CLI_CONFORMANCE: /* ODBC 1.0 */ len = 2; value = SQL_OSCC_NOT_COMPLIANT; break; case SQL_ODBC_SQL_CONFORMANCE: /* ODBC 1.0 */ len = 2; value = SQL_OSC_CORE; break; case SQL_ODBC_SQL_OPT_IEF: /* ODBC 1.0 */ p = "N"; break; case SQL_ORDER_BY_COLUMNS_IN_SELECT: /* ODBC 2.0 */ p = "Y"; break; case SQL_OUTER_JOINS: /* ODBC 1.0 */ p = "N"; break; case SQL_OWNER_TERM: /* ODBC 1.0 */ p = "owner"; break; case SQL_OWNER_USAGE: /* ODBC 2.0 */ /* BEGIN - This says that we do not support owner name prefixs on table names. (OWNER col should also be NULL in SQLTables... see SQLGetData) */ /* END - Peter Harvey */ len = 4; value = 0; break; case SQL_POS_OPERATIONS: /* ODBC 2.0 */ len = 4; value = globals.lie ? (SQL_POS_POSITION | SQL_POS_REFRESH | SQL_POS_UPDATE | SQL_POS_DELETE | SQL_POS_ADD) : (SQL_POS_POSITION | SQL_POS_REFRESH); break; case SQL_POSITIONED_STATEMENTS: /* ODBC 2.0 */ len = 4; value = globals.lie ? (SQL_PS_POSITIONED_DELETE | SQL_PS_POSITIONED_UPDATE | SQL_PS_SELECT_FOR_UPDATE) : 0; break; case SQL_PROCEDURE_TERM: /* ODBC 1.0 */ p = "procedure"; break; case SQL_PROCEDURES: /* ODBC 1.0 */ p = "Y"; break; case SQL_QUALIFIER_LOCATION: /* ODBC 2.0 */ len = 2; value = SQL_QL_START; break; case SQL_QUALIFIER_NAME_SEPARATOR: /* ODBC 1.0 */ p = ""; break; case SQL_QUALIFIER_TERM: /* ODBC 1.0 */ p = ""; break; case SQL_QUALIFIER_USAGE: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_QUOTED_IDENTIFIER_CASE: /* ODBC 2.0 */ /* are "quoted" identifiers case-sensitive? YES! */ len = 2; value = SQL_IC_SENSITIVE; break; case SQL_ROW_UPDATES: /* ODBC 1.0 */ /* Driver doesn't support keyset-driven or mixed cursors, so not much point in saying row updates are supported */ p = globals.lie ? "Y" : "N"; break; case SQL_SCROLL_CONCURRENCY: /* ODBC 1.0 */ len = 4; value = globals.lie ? (SQL_SCCO_READ_ONLY | SQL_SCCO_LOCK | SQL_SCCO_OPT_ROWVER | SQL_SCCO_OPT_VALUES) : (SQL_SCCO_READ_ONLY); break; case SQL_SCROLL_OPTIONS: /* ODBC 1.0 */ len = 4; value = globals.lie ? (SQL_SO_FORWARD_ONLY | SQL_SO_STATIC | SQL_SO_KEYSET_DRIVEN | SQL_SO_DYNAMIC | SQL_SO_MIXED) : (globals.use_declarefetch ? SQL_SO_FORWARD_ONLY : (SQL_SO_FORWARD_ONLY | SQL_SO_STATIC)); break; case SQL_SEARCH_PATTERN_ESCAPE: /* ODBC 1.0 */ p = ""; break; case SQL_SERVER_NAME: /* ODBC 1.0 */ p = CC_get_server(conn); break; case SQL_SPECIAL_CHARACTERS: /* ODBC 2.0 */ p = "_"; break; case SQL_STATIC_SENSITIVITY: /* ODBC 2.0 */ len = 4; value = globals.lie ? (SQL_SS_ADDITIONS | SQL_SS_DELETIONS | SQL_SS_UPDATES) : 0; break; case SQL_STRING_FUNCTIONS: /* ODBC 1.0 */ len = 4; value = (SQL_FN_STR_CONCAT | SQL_FN_STR_LCASE | SQL_FN_STR_LENGTH | SQL_FN_STR_LOCATE | SQL_FN_STR_LTRIM | SQL_FN_STR_RTRIM | SQL_FN_STR_SUBSTRING | SQL_FN_STR_UCASE); break; case SQL_SUBQUERIES: /* ODBC 2.0 */ /* postgres 6.3 supports subqueries */ len = 4; value = (SQL_SQ_QUANTIFIED | SQL_SQ_IN | SQL_SQ_EXISTS | SQL_SQ_COMPARISON); break; case SQL_SYSTEM_FUNCTIONS: /* ODBC 1.0 */ len = 4; value = 0; break; case SQL_TABLE_TERM: /* ODBC 1.0 */ p = "table"; break; case SQL_TIMEDATE_ADD_INTERVALS: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_TIMEDATE_DIFF_INTERVALS: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_TIMEDATE_FUNCTIONS: /* ODBC 1.0 */ len = 4; value = (SQL_FN_TD_NOW); break; case SQL_TXN_CAPABLE: /* ODBC 1.0 */ /* Postgres can deal with create or drop table statements in a transaction */ len = 2; value = SQL_TC_ALL; break; case SQL_TXN_ISOLATION_OPTION: /* ODBC 1.0 */ len = 4; value = SQL_TXN_READ_COMMITTED; /*// SQL_TXN_SERIALIZABLE; */ break; case SQL_UNION: /* ODBC 2.0 */ /* unions with all supported in postgres 6.3 */ len = 4; value = (SQL_U_UNION | SQL_U_UNION_ALL); break; case SQL_USER_NAME: /* ODBC 1.0 */ p = CC_get_username(conn); break; /* * These have been added even though they are ODBC 3 attributes to enable * StarOffice 6.0 and OpenOffice to work, its a problem in the app, but * we do what we can... */ case /*SQL_CREATE_VIEW*/ 134: len = 4; value = SQL_CV_CREATE_VIEW; break; case /*SQL_STATIC_CURSOR_ATTRIBUTES1*/ 167: len = 4; /*value = SQL_CA1_NEXT | SQL_CA1_ABSOLUTE | SQL_CA1_RELATIVE | SQL_CA1_BOOKMARK;*/ value = 0x00000001L | 0x00000002L | 0x00000004L | 0x00000008L; break; default: /* unrecognized key */ conn->errormsg = "Unrecognized key passed to SQLGetInfo."; conn->errornumber = CONN_NOT_IMPLEMENTED_ERROR; CC_log_error(func, "", conn); return SQL_ERROR; } result = SQL_SUCCESS; mylog("SQLGetInfo: p='%s', len=%d, value=%d, cbMax=%d\n", p?p:"", len, value, cbInfoValueMax); /* NOTE, that if rgbInfoValue is NULL, then no warnings or errors should result and just pcbInfoValue is returned, which indicates what length would be required if a real buffer had been passed in. */ if (p) { /* char/binary data */ len = strlen(p); if (rgbInfoValue) { strncpy_null((char *)rgbInfoValue, p, (size_t)cbInfoValueMax); if (len >= cbInfoValueMax) { result = SQL_SUCCESS_WITH_INFO; conn->errornumber = STMT_TRUNCATED; conn->errormsg = "The buffer was too small for the result."; } } } else { /* numeric data */ if (rgbInfoValue) { if (len == 2 ) *((WORD *)rgbInfoValue) = (WORD) value; else if (len == 4) *((DWORD *)rgbInfoValue) = (DWORD) value; } } if (pcbInfoValue) *pcbInfoValue = len; return result; } /*// - - - - - - - - - */ RETCODE SQL_API SQLGetTypeInfo( HSTMT hstmt, SWORD fSqlType) { static char *func = "SQLGetTypeInfo"; StatementClass *stmt = (StatementClass *) hstmt; TupleNode *row; int i; /*// Int4 type; */ Int4 pgType; Int2 sqlType; mylog("%s: entering...fSqlType = %d\n", func, fSqlType); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->result = QR_Constructor(); if( ! stmt->result) { SC_log_error(func, "Error creating result.", stmt); return SQL_ERROR; } extend_bindings(stmt, 15); QR_set_num_fields(stmt->result, 15); QR_set_field_info(stmt->result, 0, "TYPE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "DATA_TYPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 2, "PRECISION", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 3, "LITERAL_PREFIX", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "LITERAL_SUFFIX", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 5, "CREATE_PARAMS", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 6, "NULLABLE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 7, "CASE_SENSITIVE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 8, "SEARCHABLE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 9, "UNSIGNED_ATTRIBUTE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 10, "MONEY", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 11, "AUTO_INCREMENT", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 12, "LOCAL_TYPE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 13, "MINIMUM_SCALE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 14, "MAXIMUM_SCALE", PG_TYPE_INT2, 2); for(i=0, sqlType = sqlTypes[0]; sqlType; sqlType = sqlTypes[++i]) { pgType = sqltype_to_pgtype(sqlType); if (fSqlType == SQL_ALL_TYPES || fSqlType == sqlType) { row = (TupleNode *)malloc(sizeof(TupleNode) + (15 - 1)*sizeof(TupleField)); /* These values can't be NULL */ set_tuplefield_string(&row->tuple[0], pgtype_to_name(stmt, pgType)); set_tuplefield_int2(&row->tuple[1], (Int2) sqlType); set_tuplefield_int2(&row->tuple[6], pgtype_nullable(stmt, pgType)); set_tuplefield_int2(&row->tuple[7], pgtype_case_sensitive(stmt, pgType)); set_tuplefield_int2(&row->tuple[8], pgtype_searchable(stmt, pgType)); set_tuplefield_int2(&row->tuple[10], pgtype_money(stmt, pgType)); /* Localized data-source dependent data type name (always NULL) */ set_tuplefield_null(&row->tuple[12]); /* These values can be NULL */ set_nullfield_int4(&row->tuple[2], pgtype_precision(stmt, pgType, PG_STATIC, PG_STATIC)); set_nullfield_string(&row->tuple[3], pgtype_literal_prefix(stmt, pgType)); set_nullfield_string(&row->tuple[4], pgtype_literal_suffix(stmt, pgType)); set_nullfield_string(&row->tuple[5], pgtype_create_params(stmt, pgType)); set_nullfield_int2(&row->tuple[9], pgtype_unsigned(stmt, pgType)); set_nullfield_int2(&row->tuple[11], pgtype_auto_increment(stmt, pgType)); set_nullfield_int2(&row->tuple[13], pgtype_scale(stmt, pgType)); set_nullfield_int2(&row->tuple[14], pgtype_scale(stmt, pgType)); QR_add_tuple(stmt->result, row); } } stmt->status = STMT_FINISHED; stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; return SQL_SUCCESS; } /*// - - - - - - - - - */ RETCODE SQL_API SQLGetFunctions( HDBC hdbc, UWORD fFunction, UWORD FAR *pfExists) { static char *func="SQLGetFunctions"; mylog( "%s: entering...\n", func); if (fFunction == SQL_API_ALL_FUNCTIONS) { if (globals.lie) { int i; memset(pfExists, 0, sizeof(UWORD)*100); pfExists[SQL_API_SQLALLOCENV] = TRUE; pfExists[SQL_API_SQLFREEENV] = TRUE; for (i = SQL_API_SQLALLOCCONNECT; i <= 99; i++) pfExists[i] = TRUE; for (i = 1; i <= 99; i++) pfExists[i] = TRUE; } else { memset(pfExists, 0, sizeof(UWORD)*100); /*// ODBC core functions */ pfExists[SQL_API_SQLALLOCCONNECT] = TRUE; pfExists[SQL_API_SQLALLOCENV] = TRUE; pfExists[SQL_API_SQLALLOCSTMT] = TRUE; pfExists[SQL_API_SQLBINDCOL] = TRUE; pfExists[SQL_API_SQLCANCEL] = TRUE; pfExists[SQL_API_SQLCOLATTRIBUTES] = TRUE; pfExists[SQL_API_SQLCONNECT] = TRUE; pfExists[SQL_API_SQLDESCRIBECOL] = TRUE; /*// partial */ pfExists[SQL_API_SQLDISCONNECT] = TRUE; pfExists[SQL_API_SQLERROR] = TRUE; pfExists[SQL_API_SQLEXECDIRECT] = TRUE; pfExists[SQL_API_SQLEXECUTE] = TRUE; pfExists[SQL_API_SQLFETCH] = TRUE; pfExists[SQL_API_SQLFREECONNECT] = TRUE; pfExists[SQL_API_SQLFREEENV] = TRUE; pfExists[SQL_API_SQLFREESTMT] = TRUE; pfExists[SQL_API_SQLGETCURSORNAME] = TRUE; pfExists[SQL_API_SQLNUMRESULTCOLS] = TRUE; pfExists[SQL_API_SQLPREPARE] = TRUE; /*// complete? */ pfExists[SQL_API_SQLROWCOUNT] = TRUE; pfExists[SQL_API_SQLSETCURSORNAME] = TRUE; pfExists[SQL_API_SQLSETPARAM] = FALSE; /*// odbc 1.0 */ pfExists[SQL_API_SQLTRANSACT] = TRUE; /*// ODBC level 1 functions */ pfExists[SQL_API_SQLBINDPARAMETER] = TRUE; pfExists[SQL_API_SQLCOLUMNS] = TRUE; pfExists[SQL_API_SQLDRIVERCONNECT] = TRUE; pfExists[SQL_API_SQLGETCONNECTOPTION] = TRUE; /*// partial */ pfExists[SQL_API_SQLGETDATA] = TRUE; pfExists[SQL_API_SQLGETFUNCTIONS] = TRUE; pfExists[SQL_API_SQLGETINFO] = TRUE; pfExists[SQL_API_SQLGETSTMTOPTION] = TRUE; /*// partial */ pfExists[SQL_API_SQLGETTYPEINFO] = TRUE; pfExists[SQL_API_SQLPARAMDATA] = TRUE; pfExists[SQL_API_SQLPUTDATA] = TRUE; pfExists[SQL_API_SQLSETCONNECTOPTION] = TRUE; /*// partial */ pfExists[SQL_API_SQLSETSTMTOPTION] = TRUE; pfExists[SQL_API_SQLSPECIALCOLUMNS] = TRUE; pfExists[SQL_API_SQLSTATISTICS] = TRUE; pfExists[SQL_API_SQLTABLES] = TRUE; /*// ODBC level 2 functions */ pfExists[SQL_API_SQLBROWSECONNECT] = FALSE; pfExists[SQL_API_SQLCOLUMNPRIVILEGES] = FALSE; pfExists[SQL_API_SQLDATASOURCES] = FALSE; /*// only implemented by DM */ pfExists[SQL_API_SQLDESCRIBEPARAM] = FALSE; /*// not properly implemented */ pfExists[SQL_API_SQLDRIVERS] = FALSE; /*// only implemented by DM */ pfExists[SQL_API_SQLEXTENDEDFETCH] = TRUE; pfExists[SQL_API_SQLFOREIGNKEYS] = TRUE; pfExists[SQL_API_SQLMORERESULTS] = TRUE; pfExists[SQL_API_SQLNATIVESQL] = TRUE; pfExists[SQL_API_SQLNUMPARAMS] = TRUE; pfExists[SQL_API_SQLPARAMOPTIONS] = FALSE; pfExists[SQL_API_SQLPRIMARYKEYS] = TRUE; pfExists[SQL_API_SQLPROCEDURECOLUMNS] = FALSE; pfExists[SQL_API_SQLPROCEDURES] = FALSE; pfExists[SQL_API_SQLSETPOS] = TRUE; pfExists[SQL_API_SQLSETSCROLLOPTIONS] = TRUE; /*// odbc 1.0 */ pfExists[SQL_API_SQLTABLEPRIVILEGES] = FALSE; } } else { if (globals.lie) *pfExists = TRUE; else { switch(fFunction) { case SQL_API_SQLALLOCCONNECT: *pfExists = TRUE; break; case SQL_API_SQLALLOCENV: *pfExists = TRUE; break; case SQL_API_SQLALLOCSTMT: *pfExists = TRUE; break; case SQL_API_SQLBINDCOL: *pfExists = TRUE; break; case SQL_API_SQLCANCEL: *pfExists = TRUE; break; case SQL_API_SQLCOLATTRIBUTES: *pfExists = TRUE; break; case SQL_API_SQLCONNECT: *pfExists = TRUE; break; case SQL_API_SQLDESCRIBECOL: *pfExists = TRUE; break; /*// partial */ case SQL_API_SQLDISCONNECT: *pfExists = TRUE; break; case SQL_API_SQLERROR: *pfExists = TRUE; break; case SQL_API_SQLEXECDIRECT: *pfExists = TRUE; break; case SQL_API_SQLEXECUTE: *pfExists = TRUE; break; case SQL_API_SQLFETCH: *pfExists = TRUE; break; case SQL_API_SQLFREECONNECT: *pfExists = TRUE; break; case SQL_API_SQLFREEENV: *pfExists = TRUE; break; case SQL_API_SQLFREESTMT: *pfExists = TRUE; break; case SQL_API_SQLGETCURSORNAME: *pfExists = TRUE; break; case SQL_API_SQLNUMRESULTCOLS: *pfExists = TRUE; break; case SQL_API_SQLPREPARE: *pfExists = TRUE; break; case SQL_API_SQLROWCOUNT: *pfExists = TRUE; break; case SQL_API_SQLSETCURSORNAME: *pfExists = TRUE; break; case SQL_API_SQLSETPARAM: *pfExists = FALSE; break; /*// odbc 1.0 */ case SQL_API_SQLTRANSACT: *pfExists = TRUE; break; /*// ODBC level 1 functions */ case SQL_API_SQLBINDPARAMETER: *pfExists = TRUE; break; case SQL_API_SQLCOLUMNS: *pfExists = TRUE; break; case SQL_API_SQLDRIVERCONNECT: *pfExists = TRUE; break; case SQL_API_SQLGETCONNECTOPTION: *pfExists = TRUE; break; /*// partial */ case SQL_API_SQLGETDATA: *pfExists = TRUE; break; case SQL_API_SQLGETFUNCTIONS: *pfExists = TRUE; break; case SQL_API_SQLGETINFO: *pfExists = TRUE; break; case SQL_API_SQLGETSTMTOPTION: *pfExists = TRUE; break; /*// partial */ case SQL_API_SQLGETTYPEINFO: *pfExists = TRUE; break; case SQL_API_SQLPARAMDATA: *pfExists = TRUE; break; case SQL_API_SQLPUTDATA: *pfExists = TRUE; break; case SQL_API_SQLSETCONNECTOPTION: *pfExists = TRUE; break; /*// partial */ case SQL_API_SQLSETSTMTOPTION: *pfExists = TRUE; break; case SQL_API_SQLSPECIALCOLUMNS: *pfExists = TRUE; break; case SQL_API_SQLSTATISTICS: *pfExists = TRUE; break; case SQL_API_SQLTABLES: *pfExists = TRUE; break; /*// ODBC level 2 functions */ case SQL_API_SQLBROWSECONNECT: *pfExists = FALSE; break; case SQL_API_SQLCOLUMNPRIVILEGES: *pfExists = FALSE; break; case SQL_API_SQLDATASOURCES: *pfExists = FALSE; break; /*// only implemented by DM */ case SQL_API_SQLDESCRIBEPARAM: *pfExists = FALSE; break; /*// not properly implemented */ case SQL_API_SQLDRIVERS: *pfExists = FALSE; break; /*// only implemented by DM */ case SQL_API_SQLEXTENDEDFETCH: *pfExists = TRUE; break; case SQL_API_SQLFOREIGNKEYS: *pfExists = TRUE; break; case SQL_API_SQLMORERESULTS: *pfExists = TRUE; break; case SQL_API_SQLNATIVESQL: *pfExists = TRUE; break; case SQL_API_SQLNUMPARAMS: *pfExists = TRUE; break; case SQL_API_SQLPARAMOPTIONS: *pfExists = FALSE; break; case SQL_API_SQLPRIMARYKEYS: *pfExists = TRUE; break; case SQL_API_SQLPROCEDURECOLUMNS: *pfExists = FALSE; break; case SQL_API_SQLPROCEDURES: *pfExists = FALSE; break; case SQL_API_SQLSETPOS: *pfExists = TRUE; break; case SQL_API_SQLSETSCROLLOPTIONS: *pfExists = TRUE; break; /*// odbc 1.0 */ case SQL_API_SQLTABLEPRIVILEGES: *pfExists = FALSE; break; } } } return SQL_SUCCESS; } RETCODE SQL_API SQLTables( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UCHAR FAR * szTableType, SWORD cbTableType) { static char *func = "SQLTables"; StatementClass *stmt = (StatementClass *) hstmt; StatementClass *tbl_stmt; TupleNode *row; HSTMT htbl_stmt; RETCODE result; char *tableType; char tables_query[MAX_STATEMENT_LEN]; char table_name[MAX_INFO_STRING], table_owner[MAX_INFO_STRING], relhasrules[MAX_INFO_STRING]; ConnInfo *ci; char *prefix[32], prefixes[MEDIUM_REGISTRY_LEN]; char *table_type[32], table_types[MAX_INFO_STRING]; char show_system_tables, show_regular_tables, show_views; char regular_table, view, systable; int i; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->errormsg_created = TRUE; ci = &stmt->hdbc->connInfo; result = PG__SQLAllocStmt( stmt->hdbc, &htbl_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Couldn't allocate statement for SQLTables result."; SC_log_error(func, "", stmt); return SQL_ERROR; } tbl_stmt = (StatementClass *) htbl_stmt; /*// ********************************************************************** */ /*// Create the query to find out the tables */ /*// ********************************************************************** */ strcpy(tables_query, "select relname, usename, relhasrules from pg_class, pg_user"); strcat(tables_query, " where relkind = 'r'"); my_strcat(tables_query, " and usename like '%.*s'", (char*)szTableOwner, cbTableOwner); my_strcat(tables_query, " and relname like '%.*s'", (char*)szTableName, cbTableName); /*// Parse the extra systable prefix */ strcpy(prefixes, globals.extra_systable_prefixes); i = 0; prefix[i] = strtok(prefixes, ";"); while (prefix[i] && i<32) { prefix[++i] = strtok(NULL, ";"); } /* Parse the desired table types to return */ show_system_tables = FALSE; show_regular_tables = FALSE; show_views = FALSE; /* make_string mallocs memory */ tableType = make_string((char*)szTableType, cbTableType, NULL); if (tableType) { strcpy(table_types, tableType); free(tableType); i = 0; table_type[i] = strtok(table_types, ","); while (table_type[i] && i<32) { table_type[++i] = strtok(NULL, ","); } /* Check for desired table types to return */ i = 0; while (table_type[i]) { if ( strstr(table_type[i], "SYSTEM TABLE")) show_system_tables = TRUE; else if ( strstr(table_type[i], "TABLE")) show_regular_tables = TRUE; else if ( strstr(table_type[i], "VIEW")) show_views = TRUE; i++; } } else { show_regular_tables = TRUE; show_views = TRUE; } /* If not interested in SYSTEM TABLES then filter them out to save some time on the query. If treating system tables as regular tables, then dont filter either. */ if ( ! atoi(ci->show_system_tables) && ! show_system_tables) { strcat(tables_query, " and relname !~ '^" POSTGRES_SYS_PREFIX); /* Also filter out user-defined system table types */ i = 0; while(prefix[i]) { strcat(tables_query, "|^"); strcat(tables_query, prefix[i]); i++; } strcat(tables_query, "'"); } /* filter out large objects unconditionally (they are not system tables) and match users */ strcat(tables_query, " and relname !~ '^xinv[0-9]+'"); strcat(tables_query, " and int4out(usesysid) = int4out(relowner)"); strcat(tables_query, "order by relname"); /*// ********************************************************************** */ result = PG__SQLExecDirect(htbl_stmt, (unsigned char *) tables_query, strlen(tables_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = SC_create_errormsg((StatementClass*)htbl_stmt); stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(htbl_stmt, 1, SQL_C_CHAR, table_name, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = tbl_stmt->errormsg; stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(htbl_stmt, 2, SQL_C_CHAR, table_owner, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = tbl_stmt->errormsg; stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(htbl_stmt, 3, SQL_C_CHAR, relhasrules, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = tbl_stmt->errormsg; stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } stmt->result = QR_Constructor(); if(!stmt->result) { stmt->errormsg = "Couldn't allocate memory for SQLTables result."; stmt->errornumber = STMT_NO_MEMORY_ERROR; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } /*// the binding structure for a statement is not set up until */ /*// a statement is actually executed, so we'll have to do this ourselves. */ extend_bindings(stmt, 5); /*// set the field names */ QR_set_num_fields(stmt->result, 5); QR_set_field_info(stmt->result, 0, "TABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "TABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "TABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "TABLE_TYPE", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "REMARKS", PG_TYPE_TEXT, 254); /*// add the tuples */ result = PG__SQLFetch(htbl_stmt); while((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO)) { /* Determine if this table name is a system table. If treating system tables as regular tables, then no need to do this test. */ systable = FALSE; if( ! atoi(ci->show_system_tables)) { if ( strncmp(table_name, POSTGRES_SYS_PREFIX, strlen(POSTGRES_SYS_PREFIX)) == 0) systable = TRUE; else { /* Check extra system table prefixes */ i = 0; while (prefix[i]) { mylog("table_name='%s', prefix[%d]='%s'\n", table_name, i, prefix[i]); if (strncmp(table_name, prefix[i], strlen(prefix[i])) == 0) { systable = TRUE; break; } i++; } } } /* Determine if the table name is a view */ view = (relhasrules[0] == '1'); /* It must be a regular table */ regular_table = ( ! systable && ! view); /* Include the row in the result set if meets all criteria */ /* NOTE: Unsupported table types (i.e., LOCAL TEMPORARY, ALIAS, etc) will return nothing */ if ( (systable && show_system_tables) || (view && show_views) || (regular_table && show_regular_tables)) { row = (TupleNode *)malloc(sizeof(TupleNode) + (5 - 1) * sizeof(TupleField)); set_tuplefield_string(&row->tuple[0], ""); /*// I have to hide the table owner from Access, otherwise it */ /*// insists on referring to the table as 'owner.table'. */ /*// (this is valid according to the ODBC SQL grammar, but */ /*// Postgres won't support it.) */ /*// set_tuplefield_string(&row->tuple[1], table_owner); */ mylog("SQLTables: table_name = '%s'\n", table_name); set_tuplefield_string(&row->tuple[0], ""); set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); set_tuplefield_string(&row->tuple[3], systable ? "SYSTEM TABLE" : (view ? "VIEW" : "TABLE")); set_tuplefield_string(&row->tuple[4], ""); QR_add_tuple(stmt->result, row); } result = PG__SQLFetch(htbl_stmt); } if(result != SQL_NO_DATA_FOUND) { stmt->errormsg = SC_create_errormsg((StatementClass*)htbl_stmt); stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } /*// also, things need to think that this statement is finished so */ /*// the results can be retrieved. */ stmt->status = STMT_FINISHED; /*// set up the current tuple pointer for SQLFetch */ stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; PG__SQLFreeStmt(htbl_stmt, SQL_DROP); mylog("SQLTables(): EXIT, stmt=%u\n", stmt); return SQL_SUCCESS; } RETCODE SQL_API PG__SQLColumns( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UCHAR FAR * szColumnName, SWORD cbColumnName) { static char *func = "SQLColumns"; StatementClass *stmt = (StatementClass *) hstmt; TupleNode *row; HSTMT hcol_stmt; StatementClass *col_stmt; char columns_query[MAX_STATEMENT_LEN]; RETCODE result; char table_owner[MAX_INFO_STRING], table_name[MAX_INFO_STRING], field_name[MAX_INFO_STRING], field_type_name[MAX_INFO_STRING]; Int2 field_number, result_cols; Int4 field_type, the_type, field_length, mod_length; char not_null[MAX_INFO_STRING]; ConnInfo *ci; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->errormsg_created = TRUE; ci = &stmt->hdbc->connInfo; /*// ********************************************************************** */ /*// Create the query to find out the columns (Note: pre 6.3 did not have the atttypmod field) */ /*// ********************************************************************** */ sprintf(columns_query, "select u.usename, c.relname, a.attname, a.atttypid,t.typname, a.attnum, a.attlen, %s, a.attnotnull from pg_user u, pg_class c, pg_attribute a, pg_type t where " "int4out(u.usesysid) = int4out(c.relowner) and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0)", PROTOCOL_62(ci) ? "a.attlen" : "a.atttypmod"); my_strcat(columns_query, " and c.relname like '%.*s'", (char*)szTableName, cbTableName); my_strcat(columns_query, " and u.usename like '%.*s'", (char*)szTableOwner, cbTableOwner); my_strcat(columns_query, " and a.attname like '%.*s'", (char*)szColumnName, cbColumnName); /*// give the output in the order the columns were defined */ /*// when the table was created */ strcat(columns_query, " order by attnum"); /*// ********************************************************************** */ result = PG__SQLAllocStmt( stmt->hdbc, &hcol_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Couldn't allocate statement for SQLColumns result."; SC_log_error(func, "", stmt); return SQL_ERROR; } col_stmt = (StatementClass *) hcol_stmt; mylog("SQLColumns: hcol_stmt = %u, col_stmt = %u\n", hcol_stmt, col_stmt); result = PG__SQLExecDirect(hcol_stmt, (unsigned char *) columns_query, strlen(columns_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = SC_create_errormsg((StatementClass*)hcol_stmt); stmt->errornumber = col_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(hcol_stmt, 1, SQL_C_CHAR, table_owner, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = col_stmt->errormsg; stmt->errornumber = col_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(hcol_stmt, 2, SQL_C_CHAR, table_name, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = col_stmt->errormsg; stmt->errornumber = col_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(hcol_stmt, 3, SQL_C_CHAR, field_name, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = col_stmt->errormsg; stmt->errornumber = col_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(hcol_stmt, 4, SQL_C_LONG, &field_type, 4, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = col_stmt->errormsg; stmt->errornumber = col_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(hcol_stmt, 5, SQL_C_CHAR, field_type_name, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = col_stmt->errormsg; stmt->errornumber = col_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(hcol_stmt, 6, SQL_C_SHORT, &field_number, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = col_stmt->errormsg; stmt->errornumber = col_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(hcol_stmt, 7, SQL_C_LONG, &field_length, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = col_stmt->errormsg; stmt->errornumber = col_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(hcol_stmt, 8, SQL_C_LONG, &mod_length, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = col_stmt->errormsg; stmt->errornumber = col_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(hcol_stmt, 9, SQL_C_CHAR, not_null, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = col_stmt->errormsg; stmt->errornumber = col_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } stmt->result = QR_Constructor(); if(!stmt->result) { stmt->errormsg = "Couldn't allocate memory for SQLColumns result."; stmt->errornumber = STMT_NO_MEMORY_ERROR; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } /*// the binding structure for a statement is not set up until */ /*// a statement is actually executed, so we'll have to do this ourselves. */ result_cols = 14; extend_bindings(stmt, result_cols); /*// set the field names */ QR_set_num_fields(stmt->result, result_cols); QR_set_field_info(stmt->result, 0, "TABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "TABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "TABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "COLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "DATA_TYPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 5, "TYPE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 6, "PRECISION", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 7, "LENGTH", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 8, "SCALE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 9, "RADIX", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 10, "NULLABLE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 11, "REMARKS", PG_TYPE_TEXT, 254); /*// User defined fields */ QR_set_field_info(stmt->result, 12, "DISPLAY_SIZE", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 13, "FIELD_TYPE", PG_TYPE_INT4, 4); result = PG__SQLFetch(hcol_stmt); /* Only show oid if option AND there are other columns AND its not being called by SQLStatistics . Always show OID if its a system table */ if (result != SQL_ERROR && ! stmt->internal) { if (atoi(ci->show_oid_column) || strncmp(table_name, POSTGRES_SYS_PREFIX, strlen(POSTGRES_SYS_PREFIX)) == 0) { /* For OID fields */ the_type = PG_TYPE_OID; row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); set_tuplefield_string(&row->tuple[0], ""); /*// see note in SQLTables() */ /*// set_tuplefield_string(&row->tuple[1], table_owner); */ set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); set_tuplefield_string(&row->tuple[3], "oid"); set_tuplefield_int2(&row->tuple[4], pgtype_to_sqltype(stmt, the_type)); set_tuplefield_string(&row->tuple[5], "OID"); set_tuplefield_int4(&row->tuple[7], pgtype_length(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[6], pgtype_precision(stmt, the_type, PG_STATIC, PG_STATIC)); set_nullfield_int2(&row->tuple[8], pgtype_scale(stmt, the_type)); set_nullfield_int2(&row->tuple[9], pgtype_radix(stmt, the_type)); set_tuplefield_int2(&row->tuple[10], SQL_NO_NULLS); set_tuplefield_string(&row->tuple[11], ""); set_tuplefield_int4(&row->tuple[12], pgtype_display_size(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[13], the_type); QR_add_tuple(stmt->result, row); } } while((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO)) { row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); set_tuplefield_string(&row->tuple[0], ""); /*// see note in SQLTables() */ /*// set_tuplefield_string(&row->tuple[1], table_owner); */ set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); set_tuplefield_string(&row->tuple[3], field_name); set_tuplefield_int2(&row->tuple[4], pgtype_to_sqltype(stmt, field_type)); set_tuplefield_string(&row->tuple[5], field_type_name); /* Some Notes about Postgres Data Types: VARCHAR - the length is stored in the pg_attribute.atttypmod field BPCHAR - the length is also stored as varchar is */ if((field_type == PG_TYPE_VARCHAR) || (field_type == PG_TYPE_BPCHAR)) { if (mod_length >= 4) mod_length -= 4; /*// the length is in atttypmod - 4 */ if (mod_length > globals.max_varchar_size || mod_length <= 0) mod_length = globals.max_varchar_size; mylog("SQLColumns: field type is VARCHAR,BPCHAR: field_type = %d, mod_length = %d\n", field_type, mod_length); set_tuplefield_int4(&row->tuple[7], mod_length); set_tuplefield_int4(&row->tuple[6], mod_length); set_tuplefield_int4(&row->tuple[12], mod_length); } else { mylog("SQLColumns: field type is OTHER: field_type = %d, pgtype_length = %d\n", field_type, pgtype_length(stmt, field_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[7], pgtype_length(stmt, field_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[6], pgtype_precision(stmt, field_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[12], pgtype_display_size(stmt, field_type, PG_STATIC, PG_STATIC)); } set_nullfield_int2(&row->tuple[8], pgtype_scale(stmt, field_type)); set_nullfield_int2(&row->tuple[9], pgtype_radix(stmt, field_type)); set_tuplefield_int2(&row->tuple[10], (Int2) (not_null[0] == '1' ? SQL_NO_NULLS : pgtype_nullable(stmt, field_type))); set_tuplefield_string(&row->tuple[11], ""); set_tuplefield_int4(&row->tuple[13], field_type); QR_add_tuple(stmt->result, row); result = PG__SQLFetch(hcol_stmt); } if(result != SQL_NO_DATA_FOUND) { stmt->errormsg = SC_create_errormsg((StatementClass*)hcol_stmt); stmt->errornumber = col_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } /*// Put the row version column at the end so it might not be */ /*// mistaken for a key field. */ if ( ! stmt->internal && atoi(ci->row_versioning)) { /* For Row Versioning fields */ the_type = PG_TYPE_INT4; row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); set_tuplefield_string(&row->tuple[0], ""); set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); set_tuplefield_string(&row->tuple[3], "xmin"); set_tuplefield_int2(&row->tuple[4], pgtype_to_sqltype(stmt, the_type)); set_tuplefield_string(&row->tuple[5], pgtype_to_name(stmt, the_type)); set_tuplefield_int4(&row->tuple[6], pgtype_precision(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[7], pgtype_length(stmt, the_type, PG_STATIC, PG_STATIC)); set_nullfield_int2(&row->tuple[8], pgtype_scale(stmt, the_type)); set_nullfield_int2(&row->tuple[9], pgtype_radix(stmt, the_type)); set_tuplefield_int2(&row->tuple[10], SQL_NO_NULLS); set_tuplefield_string(&row->tuple[11], ""); set_tuplefield_int4(&row->tuple[12], pgtype_display_size(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[13], the_type); QR_add_tuple(stmt->result, row); } /*// also, things need to think that this statement is finished so */ /*// the results can be retrieved. */ stmt->status = STMT_FINISHED; /*// set up the current tuple pointer for SQLFetch */ stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; PG__SQLFreeStmt(hcol_stmt, SQL_DROP); mylog("SQLColumns(): EXIT, stmt=%u\n", stmt); return SQL_SUCCESS; } RETCODE SQL_API SQLColumns( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UCHAR FAR * szColumnName, SWORD cbColumnName) { return PG__SQLColumns( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName ); } RETCODE SQL_API SQLSpecialColumns( HSTMT hstmt, UWORD fColType, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UWORD fScope, UWORD fNullable) { static char *func = "SQLSpecialColumns"; TupleNode *row; StatementClass *stmt = (StatementClass *) hstmt; ConnInfo *ci; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } ci = &stmt->hdbc->connInfo; stmt->manual_result = TRUE; stmt->result = QR_Constructor(); extend_bindings(stmt, 8); QR_set_num_fields(stmt->result, 8); QR_set_field_info(stmt->result, 0, "SCOPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 1, "COLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "DATA_TYPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 3, "TYPE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "PRECISION", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 5, "LENGTH", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 6, "SCALE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 7, "PSEUDO_COLUMN", PG_TYPE_INT2, 2); /* use the oid value for the rowid */ if(fColType == SQL_BEST_ROWID) { row = (TupleNode *)malloc(sizeof(TupleNode) + (8 - 1) * sizeof(TupleField)); set_tuplefield_int2(&row->tuple[0], SQL_SCOPE_SESSION); set_tuplefield_string(&row->tuple[1], "oid"); set_tuplefield_int2(&row->tuple[2], pgtype_to_sqltype(stmt, PG_TYPE_OID)); set_tuplefield_string(&row->tuple[3], "OID"); set_tuplefield_int4(&row->tuple[4], pgtype_precision(stmt, PG_TYPE_OID, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[5], pgtype_length(stmt, PG_TYPE_OID, PG_STATIC, PG_STATIC)); set_tuplefield_int2(&row->tuple[6], pgtype_scale(stmt, PG_TYPE_OID)); set_tuplefield_int2(&row->tuple[7], SQL_PC_PSEUDO); QR_add_tuple(stmt->result, row); } else if(fColType == SQL_ROWVER) { Int2 the_type = PG_TYPE_INT4; if (atoi(ci->row_versioning)) { row = (TupleNode *)malloc(sizeof(TupleNode) + (8 - 1) * sizeof(TupleField)); set_tuplefield_null(&row->tuple[0]); set_tuplefield_string(&row->tuple[1], "xmin"); set_tuplefield_int2(&row->tuple[2], pgtype_to_sqltype(stmt, the_type)); set_tuplefield_string(&row->tuple[3], pgtype_to_name(stmt, the_type)); set_tuplefield_int4(&row->tuple[4], pgtype_precision(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[5], pgtype_length(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int2(&row->tuple[6], pgtype_scale(stmt, the_type)); set_tuplefield_int2(&row->tuple[7], SQL_PC_PSEUDO); QR_add_tuple(stmt->result, row); } } stmt->status = STMT_FINISHED; stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; mylog("SQLSpecialColumns(): EXIT, stmt=%u\n", stmt); return SQL_SUCCESS; } RETCODE SQL_API SQLStatistics( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UWORD fUnique, UWORD fAccuracy) { static char *func="SQLStatistics"; StatementClass *stmt = (StatementClass *) hstmt; char index_query[MAX_STATEMENT_LEN]; HSTMT hindx_stmt; RETCODE result; char *table_name; char index_name[MAX_INFO_STRING]; short fields_vector[8]; char isunique[10], isclustered[10]; SDWORD index_name_len, fields_vector_len; TupleNode *row; int i; HSTMT hcol_stmt; StatementClass *col_stmt, *indx_stmt; char column_name[MAX_INFO_STRING]; char **column_names = 0; Int4 column_name_len; int total_columns = 0; char error = TRUE; ConnInfo *ci; char buf[256]; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->errormsg_created = TRUE; ci = &stmt->hdbc->connInfo; stmt->result = QR_Constructor(); if(!stmt->result) { stmt->errormsg = "Couldn't allocate memory for SQLStatistics result."; stmt->errornumber = STMT_NO_MEMORY_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } /*// the binding structure for a statement is not set up until */ /*// a statement is actually executed, so we'll have to do this ourselves. */ extend_bindings(stmt, 13); /*// set the field names */ QR_set_num_fields(stmt->result, 13); QR_set_field_info(stmt->result, 0, "TABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "TABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "TABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "NON_UNIQUE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 4, "INDEX_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 5, "INDEX_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 6, "TYPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 7, "SEQ_IN_INDEX", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 8, "COLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 9, "COLLATION", PG_TYPE_CHAR, 1); QR_set_field_info(stmt->result, 10, "CARDINALITY", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 11, "PAGES", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 12, "FILTER_CONDITION", PG_TYPE_TEXT, MAX_INFO_STRING); /*// only use the table name... the owner should be redundant, and */ /*// we never use qualifiers. */ table_name = make_string((char*)szTableName, cbTableName, NULL); if ( ! table_name) { stmt->errormsg = "No table name passed to SQLStatistics."; stmt->errornumber = STMT_INTERNAL_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } /*// we need to get a list of the field names first, */ /*// so we can return them later. */ result = PG__SQLAllocStmt( stmt->hdbc, &hcol_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = "SQLAllocStmt failed in SQLStatistics for columns."; stmt->errornumber = STMT_NO_MEMORY_ERROR; goto SEEYA; } col_stmt = (StatementClass *) hcol_stmt; /* "internal" prevents SQLColumns from returning the oid if it is being shown. This would throw everything off. */ col_stmt->internal = TRUE; result = PG__SQLColumns(hcol_stmt, (SQLCHAR*)"", 0, (SQLCHAR*)"", 0, (SQLCHAR*)table_name, (SWORD) strlen(table_name), (SQLCHAR*)"", 0); col_stmt->internal = FALSE; if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = col_stmt->errormsg; /*// "SQLColumns failed in SQLStatistics."; */ stmt->errornumber = col_stmt->errornumber; /*// STMT_EXEC_ERROR; */ PG__SQLFreeStmt(hcol_stmt, SQL_DROP); goto SEEYA; } result = PG__SQLBindCol(hcol_stmt, 4, SQL_C_CHAR, column_name, MAX_INFO_STRING, (SQLLEN*)&column_name_len); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = col_stmt->errormsg; stmt->errornumber = col_stmt->errornumber; PG__SQLFreeStmt(hcol_stmt, SQL_DROP); goto SEEYA; } result = PG__SQLFetch(hcol_stmt); while((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO)) { total_columns++; column_names = (char **)realloc(column_names, total_columns * sizeof(char *)); column_names[total_columns-1] = (char *)malloc(strlen(column_name)+1); strcpy(column_names[total_columns-1], column_name); mylog("SQLStatistics: column_name = '%s'\n", column_name); result = PG__SQLFetch(hcol_stmt); } if(result != SQL_NO_DATA_FOUND || total_columns == 0) { stmt->errormsg = SC_create_errormsg((StatementClass*)hcol_stmt); /*// "Couldn't get column names in SQLStatistics."; */ stmt->errornumber = col_stmt->errornumber; PG__SQLFreeStmt(hcol_stmt, SQL_DROP); goto SEEYA; } PG__SQLFreeStmt(hcol_stmt, SQL_DROP); /*// get a list of indexes on this table */ result = PG__SQLAllocStmt( stmt->hdbc, &hindx_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = "SQLAllocStmt failed in SQLStatistics for indices."; stmt->errornumber = STMT_NO_MEMORY_ERROR; goto SEEYA; } indx_stmt = (StatementClass *) hindx_stmt; sprintf(index_query, "select c.relname, i.indkey, i.indisunique, i.indisclustered from pg_index i, pg_class c, pg_class d where c.oid = i.indexrelid and d.relname = '%s' and d.oid = i.indrelid", table_name); result = PG__SQLExecDirect(hindx_stmt, (unsigned char *) index_query, strlen(index_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = SC_create_errormsg((StatementClass*)hindx_stmt); /*// "Couldn't execute index query (w/SQLExecDirect) in SQLStatistics."; */ stmt->errornumber = indx_stmt->errornumber; PG__SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } /*// bind the index name column */ result = PG__SQLBindCol(hindx_stmt, 1, SQL_C_CHAR, index_name, MAX_INFO_STRING, (SQLLEN*) &index_name_len); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = indx_stmt->errormsg; /*// "Couldn't bind column in SQLStatistics."; */ stmt->errornumber = indx_stmt->errornumber; PG__SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } /*// bind the vector column */ result = PG__SQLBindCol(hindx_stmt, 2, SQL_C_DEFAULT, fields_vector, 16, (SQLLEN*)&fields_vector_len); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = indx_stmt->errormsg; /*// "Couldn't bind column in SQLStatistics."; */ stmt->errornumber = indx_stmt->errornumber; PG__SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } /*// bind the "is unique" column */ result = PG__SQLBindCol(hindx_stmt, 3, SQL_C_CHAR, isunique, sizeof(isunique), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = indx_stmt->errormsg; /*// "Couldn't bind column in SQLStatistics."; */ stmt->errornumber = indx_stmt->errornumber; PG__SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } /*// bind the "is clustered" column */ result = PG__SQLBindCol(hindx_stmt, 4, SQL_C_CHAR, isclustered, sizeof(isclustered), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = indx_stmt->errormsg; /*// "Couldn't bind column in SQLStatistics."; */ stmt->errornumber = indx_stmt->errornumber; PG__SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } /* fake index of OID */ if (atoi(ci->show_oid_column) && atoi(ci->fake_oid_index)) { row = (TupleNode *)malloc(sizeof(TupleNode) + (13 - 1) * sizeof(TupleField)); /*// no table qualifier */ set_tuplefield_string(&row->tuple[0], ""); /*// don't set the table owner, else Access tries to use it */ set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); /*// non-unique index? */ set_tuplefield_int2(&row->tuple[3], (Int2) (globals.unique_index ? FALSE : TRUE)); /*// no index qualifier */ set_tuplefield_string(&row->tuple[4], ""); sprintf(buf, "%s_idx_fake_oid", table_name); set_tuplefield_string(&row->tuple[5], buf); /*// Clustered index? I think non-clustered should be type OTHER not HASHED */ set_tuplefield_int2(&row->tuple[6], (Int2) SQL_INDEX_OTHER); set_tuplefield_int2(&row->tuple[7], (Int2) 1); set_tuplefield_string(&row->tuple[8], "oid"); set_tuplefield_string(&row->tuple[9], "A"); set_tuplefield_null(&row->tuple[10]); set_tuplefield_null(&row->tuple[11]); set_tuplefield_null(&row->tuple[12]); QR_add_tuple(stmt->result, row); } result = PG__SQLFetch(hindx_stmt); while((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO)) { /*// If only requesting unique indexs, then just return those. */ if (fUnique == SQL_INDEX_ALL || (fUnique == SQL_INDEX_UNIQUE && atoi(isunique))) { i = 0; /*// add a row in this table for each field in the index */ while(i < 8 && fields_vector[i] != 0) { row = (TupleNode *)malloc(sizeof(TupleNode) + (13 - 1) * sizeof(TupleField)); /*// no table qualifier */ set_tuplefield_string(&row->tuple[0], ""); /*// don't set the table owner, else Access tries to use it */ set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); /*// non-unique index? */ if (globals.unique_index) set_tuplefield_int2(&row->tuple[3], (Int2) (atoi(isunique) ? FALSE : TRUE)); else set_tuplefield_int2(&row->tuple[3], TRUE); /*// no index qualifier */ set_tuplefield_string(&row->tuple[4], ""); set_tuplefield_string(&row->tuple[5], index_name); /*// Clustered index? I think non-clustered should be type OTHER not HASHED */ set_tuplefield_int2(&row->tuple[6], (Int2) (atoi(isclustered) ? SQL_INDEX_CLUSTERED : SQL_INDEX_OTHER)); set_tuplefield_int2(&row->tuple[7], (Int2) (i+1)); if(fields_vector[i] == OID_ATTNUM) { set_tuplefield_string(&row->tuple[8], "oid"); mylog("SQLStatistics: column name = oid\n"); } else if(fields_vector[i] < 0 || fields_vector[i] > total_columns) { set_tuplefield_string(&row->tuple[8], "UNKNOWN"); mylog("SQLStatistics: column name = UNKNOWN\n"); } else { set_tuplefield_string(&row->tuple[8], column_names[fields_vector[i]-1]); mylog("SQLStatistics: column name = '%s'\n", column_names[fields_vector[i]-1]); } set_tuplefield_string(&row->tuple[9], "A"); set_tuplefield_null(&row->tuple[10]); set_tuplefield_null(&row->tuple[11]); set_tuplefield_null(&row->tuple[12]); QR_add_tuple(stmt->result, row); i++; } } result = PG__SQLFetch(hindx_stmt); } if(result != SQL_NO_DATA_FOUND) { stmt->errormsg = SC_create_errormsg((StatementClass*)hindx_stmt); /*// "SQLFetch failed in SQLStatistics."; */ stmt->errornumber = indx_stmt->errornumber; PG__SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } PG__SQLFreeStmt(hindx_stmt, SQL_DROP); /*// also, things need to think that this statement is finished so */ /*// the results can be retrieved. */ stmt->status = STMT_FINISHED; /*// set up the current tuple pointer for SQLFetch */ stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; error = FALSE; SEEYA: /* These things should be freed on any error ALSO! */ free(table_name); for(i = 0; i < total_columns; i++) { free(column_names[i]); } free(column_names); mylog("SQLStatistics(): EXIT, %s, stmt=%u\n", error ? "error" : "success", stmt); if (error) { SC_log_error(func, "", stmt); return SQL_ERROR; } else return SQL_SUCCESS; } RETCODE SQL_API SQLColumnPrivileges( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UCHAR FAR * szColumnName, SWORD cbColumnName) { static char *func="SQLColumnPrivileges"; mylog("%s: entering...\n", func); /* Neither Access or Borland care about this. */ SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } RETCODE SQL_API PG__SQLPrimaryKeys( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName) { static char *func = "SQLPrimaryKeys"; StatementClass *stmt = (StatementClass *) hstmt; TupleNode *row; RETCODE result; int seq = 0; HSTMT htbl_stmt; StatementClass *tbl_stmt; char tables_query[MAX_STATEMENT_LEN]; char attname[MAX_INFO_STRING]; SDWORD attname_len; char pktab[MAX_TABLE_LEN + 1]; Int2 result_cols; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->errormsg_created = TRUE; /*** Moved error check here Christian Kirsch (ck@ix.heise.de) 6/6/1999 */ pktab[0] = '\0'; make_string((char*)szTableName, cbTableName, pktab); if ( pktab[0] == '\0') { stmt->errormsg = "No Table specified to SQLPrimaryKeys."; stmt->errornumber = STMT_INTERNAL_ERROR; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } stmt->result = QR_Constructor(); if(!stmt->result) { stmt->errormsg = "Couldn't allocate memory for SQLPrimaryKeys result."; stmt->errornumber = STMT_NO_MEMORY_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } /*// the binding structure for a statement is not set up until */ /*// a statement is actually executed, so we'll have to do this ourselves. */ result_cols = 6; extend_bindings(stmt, result_cols); /*// set the field names */ QR_set_num_fields(stmt->result, result_cols); QR_set_field_info(stmt->result, 0, "TABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "TABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "TABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "COLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "KEY_SEQ", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 5, "PK_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); result = PG__SQLAllocStmt( stmt->hdbc, &htbl_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Couldn't allocate statement for Primary Key result."; SC_log_error(func, "", stmt); return SQL_ERROR; } tbl_stmt = (StatementClass *) htbl_stmt; sprintf(tables_query, "select a.attname from pg_attribute a, pg_class c1, pg_class c2, pg_index i where c1.relname = '%s' and c1.oid = i.indrelid and i.indexrelid = c2.oid and a.attrelid = c2.oid", pktab); /*** BEGIN changed to statement above - easier and more reliable. Christian Kirsch (ck@ix.heise.de), 6/6/1999 sprintf(tables_query, "select distinct on attnum a2.attname, a2.attnum from pg_attribute a1, pg_attribute a2, pg_class c, pg_index i where c.relname = '%s_pkey' AND c.oid = i.indexrelid AND a1.attrelid = c.oid AND a2.attrelid = c.oid AND (i.indkey[0] = a1.attnum OR i.indkey[1] = a1.attnum OR i.indkey[2] = a1.attnum OR i.indkey[3] = a1.attnum OR i.indkey[4] = a1.attnum OR i.indkey[5] = a1.attnum OR i.indkey[6] = a1.attnum OR i.indkey[7] = a1.attnum) order by a2.attnum", pktab); *** END */ mylog("SQLPrimaryKeys: tables_query='%s'\n", tables_query); result = PG__SQLExecDirect(htbl_stmt, (unsigned char *) tables_query, strlen(tables_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = SC_create_errormsg((StatementClass*)htbl_stmt); stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(htbl_stmt, 1, SQL_C_CHAR, attname, MAX_INFO_STRING, (SQLLEN*)&attname_len); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = tbl_stmt->errormsg; stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLFetch(htbl_stmt); while((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO)) { row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); set_tuplefield_null(&row->tuple[0]); /*// I have to hide the table owner from Access, otherwise it */ /*// insists on referring to the table as 'owner.table'. */ /*// (this is valid according to the ODBC SQL grammar, but */ /*// Postgres won't support it.) */ set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], pktab); set_tuplefield_string(&row->tuple[3], attname); set_tuplefield_int2(&row->tuple[4], (Int2) (++seq)); set_tuplefield_null(&row->tuple[5]); QR_add_tuple(stmt->result, row); mylog(">> primaryKeys: pktab = '%s', attname = '%s', seq = %d\n", pktab, attname, seq); result = PG__SQLFetch(htbl_stmt); } if(result != SQL_NO_DATA_FOUND) { stmt->errormsg = SC_create_errormsg((StatementClass*)htbl_stmt); stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } PG__SQLFreeStmt(htbl_stmt, SQL_DROP); /*// also, things need to think that this statement is finished so */ /*// the results can be retrieved. */ stmt->status = STMT_FINISHED; /*// set up the current tuple pointer for SQLFetch */ stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; mylog("SQLPrimaryKeys(): EXIT, stmt=%u\n", stmt); return SQL_SUCCESS; } RETCODE SQL_API SQLPrimaryKeys( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName) { return PG__SQLPrimaryKeys( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName ); } RETCODE SQL_API SQLForeignKeys( HSTMT hstmt, UCHAR FAR * szPkTableQualifier, SWORD cbPkTableQualifier, UCHAR FAR * szPkTableOwner, SWORD cbPkTableOwner, UCHAR FAR * szPkTableName, SWORD cbPkTableName, UCHAR FAR * szFkTableQualifier, SWORD cbFkTableQualifier, UCHAR FAR * szFkTableOwner, SWORD cbFkTableOwner, UCHAR FAR * szFkTableName, SWORD cbFkTableName) { static char *func = "SQLForeignKeys"; StatementClass *stmt = (StatementClass *) hstmt; TupleNode *row; HSTMT htbl_stmt, hpkey_stmt; StatementClass *tbl_stmt; RETCODE result, keyresult; char tables_query[MAX_STATEMENT_LEN]; char args[1024], tgname[MAX_INFO_STRING]; char pktab[MAX_TABLE_LEN + 1], fktab[MAX_TABLE_LEN + 1]; char *ptr, *pkey_ptr, *pkptr, *fkptr, *frel, *prel; int i, k, pkeys, seq, ntabs; SWORD nargs, rule_type, action; char pkey[MAX_INFO_STRING]; Int2 result_cols; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->errormsg_created = TRUE; stmt->result = QR_Constructor(); if(!stmt->result) { stmt->errormsg = "Couldn't allocate memory for SQLForeignKeys result."; stmt->errornumber = STMT_NO_MEMORY_ERROR; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } /*// the binding structure for a statement is not set up until */ /*// a statement is actually executed, so we'll have to do this ourselves. */ result_cols = 14; extend_bindings(stmt, result_cols); /*// set the field names */ QR_set_num_fields(stmt->result, result_cols); QR_set_field_info(stmt->result, 0, "PKTABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "PKTABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "PKTABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "PKCOLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "FKTABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 5, "FKTABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 6, "FKTABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 7, "FKCOLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 8, "KEY_SEQ", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 9, "UPDATE_RULE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 10, "DELETE_RULE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 11, "FK_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 12, "PK_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 13, "TRIGGER_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); /*// also, things need to think that this statement is finished so */ /*// the results can be retrieved. */ stmt->status = STMT_FINISHED; /*// set up the current tuple pointer for SQLFetch */ stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; result = PG__SQLAllocStmt( stmt->hdbc, &htbl_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Couldn't allocate statement for SQLForeignKeys result."; SC_log_error(func, "", stmt); return SQL_ERROR; } tbl_stmt = (StatementClass *) htbl_stmt; pktab[0] = '\0'; fktab[0] = '\0'; make_string((char*)szPkTableName, cbPkTableName, pktab); make_string((char*)szFkTableName, cbFkTableName, fktab); /* Case #2 -- Get the foreign keys in the specified table (fktab) that refer to the primary keys of other table(s). */ if (fktab[0] != '\0') { sprintf(tables_query, "select pg_trigger.tgargs, pg_trigger.tgnargs, pg_trigger.tgname from pg_proc, pg_trigger, pg_class where pg_proc.oid = pg_trigger.tgfoid and pg_trigger.tgrelid = pg_class.oid AND pg_proc.proname = 'check_primary_key' AND pg_class.relname = '%s'", fktab); result = PG__SQLExecDirect(htbl_stmt, (unsigned char *) tables_query, strlen(tables_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = SC_create_errormsg((StatementClass*)htbl_stmt); stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(htbl_stmt, 1, SQL_C_BINARY, args, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = tbl_stmt->errormsg; stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(htbl_stmt, 2, SQL_C_SHORT, &nargs, 0, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = tbl_stmt->errormsg; stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(htbl_stmt, 3, SQL_C_CHAR, tgname, sizeof(tgname), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = tbl_stmt->errormsg; stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLFetch(htbl_stmt); if (result == SQL_NO_DATA_FOUND) return SQL_SUCCESS; if(result != SQL_SUCCESS) { stmt->errormsg = SC_create_errormsg((StatementClass*)htbl_stmt); stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } keyresult = PG__SQLAllocStmt( stmt->hdbc, &hpkey_stmt); if((keyresult != SQL_SUCCESS) && (keyresult != SQL_SUCCESS_WITH_INFO)) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Couldn't allocate statement for SQLForeignKeys (pkeys) result."; SC_log_error(func, "", stmt); return SQL_ERROR; } keyresult = PG__SQLBindCol(hpkey_stmt, 4, SQL_C_CHAR, pkey, sizeof(pkey), NULL); if (keyresult != SQL_SUCCESS) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Couldn't bindcol for primary keys for SQLForeignKeys result."; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hpkey_stmt, SQL_DROP); return SQL_ERROR; } while (result == SQL_SUCCESS) { /* Compute the number of keyparts. */ pkeys = nargs / 2; mylog("Foreign Key Case#2: nargs = %d, pkeys = %d\n", nargs, pkeys); ptr = args; /* Get to the PK Table Name */ for (k = 0; k < pkeys; k++) ptr += strlen(ptr) + 1; prel = ptr; mylog("prel = '%s'\n", prel); /* If there is a pk table specified, then check it. */ if (pktab[0] != '\0') { /* If it doesn't match, then continue */ if ( strcmp(prel, pktab)) { result = PG__SQLFetch(htbl_stmt); continue; } } keyresult = PG__SQLPrimaryKeys(hpkey_stmt, NULL, 0, NULL, 0, (SQLCHAR*)prel, SQL_NTS); if (keyresult != SQL_SUCCESS) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Couldn't get primary keys for SQLForeignKeys result."; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hpkey_stmt, SQL_DROP); return SQL_ERROR; } /* Check that the key listed is the primary key */ keyresult = PG__SQLFetch(hpkey_stmt); for (k = 0; k < pkeys; k++) { ptr += strlen(ptr) + 1; if ( keyresult != SQL_SUCCESS || strcmp(ptr, pkey)) { pkeys = 0; break; } keyresult = PG__SQLFetch(hpkey_stmt); } ptr = prel; /* Set to first fk column */ fkptr = args; seq = 0; for (k = 0; k < pkeys; k++) { row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); set_tuplefield_null(&row->tuple[0]); set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], prel); /*// Get to the primary key */ ptr += strlen(ptr) + 1; mylog("prel = '%s', ptr = '%s'\n", prel, ptr); set_tuplefield_string(&row->tuple[3], ptr); set_tuplefield_null(&row->tuple[4]); set_tuplefield_string(&row->tuple[5], ""); set_tuplefield_string(&row->tuple[6], fktab); set_tuplefield_string(&row->tuple[7], fkptr); mylog("fktab = '%s', fkptr = '%s'\n", fktab, fkptr); set_tuplefield_int2(&row->tuple[8], (Int2) (++seq)); set_tuplefield_null(&row->tuple[9]); set_tuplefield_null(&row->tuple[10]); set_tuplefield_null(&row->tuple[11]); set_tuplefield_null(&row->tuple[12]); set_tuplefield_string(&row->tuple[13], tgname); QR_add_tuple(stmt->result, row); /*// next foreign key */ fkptr += strlen(fkptr) + 1; } result = PG__SQLFetch(htbl_stmt); } } /* Case #1 -- Get the foreign keys in other tables that refer to the primary key in the specified table (pktab). i.e., Who points to me? */ else if (pktab[0] != '\0') { sprintf(tables_query, "select pg_trigger.tgargs, pg_trigger.tgnargs, pg_trigger.tgtype, pg_trigger.tgname from pg_proc, pg_trigger, pg_class where pg_proc.oid = pg_trigger.tgfoid and pg_trigger.tgrelid = pg_class.oid AND pg_proc.proname = 'check_foreign_key' AND pg_class.relname = '%s'", pktab); result = PG__SQLExecDirect(htbl_stmt, (unsigned char *) tables_query, strlen(tables_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = SC_create_errormsg((StatementClass*)htbl_stmt); stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(htbl_stmt, 1, SQL_C_BINARY, args, sizeof(args), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = tbl_stmt->errormsg; stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(htbl_stmt, 2, SQL_C_SHORT, &nargs, 0, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = tbl_stmt->errormsg; stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(htbl_stmt, 3, SQL_C_SHORT, &rule_type, 0, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = tbl_stmt->errormsg; stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLBindCol(htbl_stmt, 4, SQL_C_CHAR, tgname, sizeof(tgname), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = tbl_stmt->errormsg; stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG__SQLFetch(htbl_stmt); if (result == SQL_NO_DATA_FOUND) return SQL_SUCCESS; if(result != SQL_SUCCESS) { stmt->errormsg = SC_create_errormsg((StatementClass*)htbl_stmt); stmt->errornumber = tbl_stmt->errornumber; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } keyresult = PG__SQLAllocStmt( stmt->hdbc, &hpkey_stmt); if((keyresult != SQL_SUCCESS) && (keyresult != SQL_SUCCESS_WITH_INFO)) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Couldn't allocate statement for SQLForeignKeys (pkeys) result."; SC_log_error(func, "", stmt); return SQL_ERROR; } keyresult = PG__SQLPrimaryKeys(hpkey_stmt, NULL, 0, NULL, 0, (SQLCHAR*)pktab, SQL_NTS); if (keyresult != SQL_SUCCESS) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Couldn't get primary keys for SQLForeignKeys result."; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hpkey_stmt, SQL_DROP); return SQL_ERROR; } keyresult = PG__SQLBindCol(hpkey_stmt, 4, SQL_C_CHAR, pkey, sizeof(pkey), NULL); if (keyresult != SQL_SUCCESS) { stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->errormsg = "Couldn't bindcol for primary keys for SQLForeignKeys result."; SC_log_error(func, "", stmt); PG__SQLFreeStmt(hpkey_stmt, SQL_DROP); return SQL_ERROR; } while (result == SQL_SUCCESS) { /*// Get the number of tables */ ptr = args; ntabs = atoi(args); ptr += strlen(ptr) + 1; /*// Handle action (i.e., 'cascade', 'restrict', 'setnull') */ switch(tolower(ptr[0])) { case 'c': action = SQL_CASCADE; break; case 'r': action = SQL_RESTRICT; break; case 's': action = SQL_SET_NULL; break; default: action = -1; break; } rule_type >>= TRIGGER_SHIFT; ptr += strlen(ptr) + 1; /*// Calculate the number of key parts */ pkeys = (nargs - ( 2 + ntabs)) / (ntabs + 1); pkey_ptr = ptr; keyresult = PG__SQLExtendedFetch(hpkey_stmt, SQL_FETCH_FIRST, -1, NULL, NULL); if ( keyresult != SQL_SUCCESS || strcmp(pkey, ptr)) { ntabs = 0; } /*// Get to the last primary keypart */ for (i = 1; i < pkeys; i++) { /*// If keypart doesnt match, skip this entry */ if ( keyresult != SQL_SUCCESS || strcmp(pkey, ptr)) { ntabs = 0; break; } ptr += strlen(ptr) + 1; keyresult = PG__SQLExtendedFetch(hpkey_stmt, SQL_FETCH_NEXT, -1, NULL, NULL); } mylog("Foreign Key Case#1: nargs = %d, ntabs = %d, pkeys = %d\n", nargs, ntabs, pkeys); /*// Get Foreign Key Tables */ for (i = 0; i < ntabs; i++) { seq = 0; pkptr = pkey_ptr; ptr += strlen(ptr) + 1; frel = ptr; for (k = 0; k < pkeys; k++) { row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); set_tuplefield_null(&row->tuple[0]); set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], pktab); set_tuplefield_string(&row->tuple[3], pkptr); mylog("pktab = '%s', pkptr = '%s'\n", pktab, pkptr); set_tuplefield_null(&row->tuple[4]); set_tuplefield_string(&row->tuple[5], ""); set_tuplefield_string(&row->tuple[6], frel); /*// Get to the foreign key */ ptr += strlen(ptr) + 1; set_tuplefield_string(&row->tuple[7], ptr); mylog("frel = '%s', ptr = '%s'\n", frel, ptr); mylog("rule_type = %d, action = %d\n", rule_type, action); set_tuplefield_int2(&row->tuple[8], (Int2) (++seq)); set_nullfield_int2(&row->tuple[9], (Int2) ((rule_type & TRIGGER_UPDATE) ? action : -1)); set_nullfield_int2(&row->tuple[10], (Int2) ((rule_type & TRIGGER_DELETE) ? action : -1)); set_tuplefield_null(&row->tuple[11]); set_tuplefield_null(&row->tuple[12]); set_tuplefield_string(&row->tuple[13], tgname); QR_add_tuple(stmt->result, row); /*// next primary key */ pkptr += strlen(pkptr) + 1; } } result = PG__SQLFetch(htbl_stmt); } } else { stmt->errormsg = "No tables specified to SQLForeignKeys."; stmt->errornumber = STMT_INTERNAL_ERROR; SC_log_error(func, "", stmt); PG__SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } PG__SQLFreeStmt(htbl_stmt, SQL_DROP); PG__SQLFreeStmt(hpkey_stmt, SQL_DROP); mylog("SQLForeignKeys(): EXIT, stmt=%u\n", stmt); return SQL_SUCCESS; } RETCODE SQL_API SQLProcedureColumns( HSTMT hstmt, UCHAR FAR * szProcQualifier, SWORD cbProcQualifier, UCHAR FAR * szProcOwner, SWORD cbProcOwner, UCHAR FAR * szProcName, SWORD cbProcName, UCHAR FAR * szColumnName, SWORD cbColumnName) { static char *func="SQLProcedureColumns"; mylog("%s: entering...\n", func); SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } RETCODE SQL_API SQLProcedures( HSTMT hstmt, UCHAR FAR * szProcQualifier, SWORD cbProcQualifier, UCHAR FAR * szProcOwner, SWORD cbProcOwner, UCHAR FAR * szProcName, SWORD cbProcName) { static char *func="SQLProcedures"; mylog("%s: entering...\n", func); SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } RETCODE SQL_API SQLTablePrivileges( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName) { static char *func="SQLTablePrivileges"; mylog("%s: entering...\n", func); SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/PostgreSQL/lobj.c0100644000076400007640000000600510021405715016704 0ustar nicknick /* Module: lobj.c * * Description: This module contains routines related to manipulating * large objects. * * Classes: none * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include "lobj.h" #include "psqlodbc.h" #include "connection.h" Oid odbc_lo_creat(ConnectionClass *conn, int mode) { LO_ARG argv[1]; int retval, result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = mode; if ( ! CC_send_function(conn, LO_CREAT, &retval, &result_len, 1, argv, 1)) return 0; /*// invalid oid */ else return retval; } int odbc_lo_open(ConnectionClass *conn, int lobjId, int mode) { int fd; int result_len; LO_ARG argv[2]; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = lobjId; argv[1].isint = 1; argv[1].len = 4; argv[1].u.integer = mode; if ( ! CC_send_function(conn, LO_OPEN, &fd, &result_len, 1, argv, 2)) return -1; if (fd >= 0 && odbc_lo_lseek(conn, fd, 0L, SEEK_SET) < 0) return -1; return fd; } int odbc_lo_close(ConnectionClass *conn, int fd) { LO_ARG argv[1]; int retval, result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = fd; if ( ! CC_send_function(conn, LO_CLOSE, &retval, &result_len, 1, argv, 1)) return -1; else return retval; } int odbc_lo_read(ConnectionClass *conn, int fd, char *buf, int len) { LO_ARG argv[2]; int result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = fd; argv[1].isint = 1; argv[1].len = 4; argv[1].u.integer = len; if ( ! CC_send_function(conn, LO_READ, (int *) buf, &result_len, 0, argv, 2)) return -1; else return result_len; } int odbc_lo_write(ConnectionClass *conn, int fd, char *buf, int len) { LO_ARG argv[2]; int retval, result_len; if (len <= 0) return 0; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = fd; argv[1].isint = 0; argv[1].len = len; argv[1].u.ptr = (char *) buf; if ( ! CC_send_function(conn, LO_WRITE, &retval, &result_len, 1, argv, 2)) return -1; else return retval; } int odbc_lo_lseek(ConnectionClass *conn, int fd, int offset, int whence) { LO_ARG argv[3]; int retval, result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = fd; argv[1].isint = 1; argv[1].len = 4; argv[1].u.integer = offset; argv[2].isint = 1; argv[2].len = 4; argv[2].u.integer = whence; if ( ! CC_send_function(conn, LO_LSEEK, &retval, &result_len, 1, argv, 3)) return -1; else return retval; } int odbc_lo_tell(ConnectionClass *conn, int fd) { LO_ARG argv[1]; int retval, result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = fd; if ( ! CC_send_function(conn, LO_TELL, &retval, &result_len, 1, argv, 1)) return -1; else return retval; } int odbc_lo_unlink(ConnectionClass *conn, Oid lobjId) { LO_ARG argv[1]; int retval, result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = lobjId; if ( ! CC_send_function(conn, LO_UNLINK, &retval, &result_len, 1, argv, 1)) return -1; else return retval; } unixODBC-2.2.14-p2/Drivers/PostgreSQL/misc.c0100644000076400007640000001226610311277025016722 0ustar nicknick /* Module: misc.c * * Description: This module contains miscellaneous routines * such as for debugging/logging and string functions. * * Classes: n/a * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include #include #include #include "psqlodbc.h" #ifndef WIN32 #if HAVE_PWD_H #include #endif #include #include #else #include /* Byron: is this where Windows keeps def. of getpid ? */ #endif extern GLOBAL_VALUES globals; void generate_filename(char*,char*,char*); void generate_filename(char* dirname,char* prefix,char* filename) { int pid = 0; #ifndef WIN32 struct passwd *ptr = 0; ptr = (struct passwd *)getpwuid(getuid()); #endif pid = getpid(); if(dirname == 0 || filename == 0) return; strcpy(filename,dirname); strcat(filename,DIRSEPARATOR); if(prefix != 0) strcat(filename,prefix); #ifndef WIN32 strcat( filename, ptr->pw_name); #endif sprintf(filename,"%s%u%s",filename,pid,".log"); return; } #ifdef MY_LOG void mylog( char *fmt, ... ) { va_list ap; char filebuf[80]; FILE* LOGFP = globals.mylogFP; if ( globals.debug) { va_start(ap, fmt); if (! LOGFP) { generate_filename(MYLOGDIR,MYLOGFILE,filebuf); LOGFP = fopen(filebuf, "w"); globals.mylogFP = LOGFP; setbuf(LOGFP, NULL); } if (LOGFP) vfprintf(LOGFP, fmt, ap); va_end(ap); } } #endif #ifdef Q_LOG void qlog( char *fmt, ... ) { va_list ap; char filebuf[80]; FILE* LOGFP = globals.qlogFP; if ( globals.commlog) { va_start(ap, fmt); if (! LOGFP) { generate_filename(QLOGDIR,QLOGFILE,filebuf); LOGFP = fopen(filebuf, "w"); globals.qlogFP = LOGFP; setbuf(LOGFP, NULL); } if (LOGFP) vfprintf(LOGFP, fmt, ap); va_end(ap); } } #endif /* Undefine these because windows.h will redefine and cause a warning */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef WIN32 #undef va_start #undef va_end #endif #ifndef WIN32 #ifdef UNIXODBC #include #include #else #include "iodbc.h" #include "isql.h" #endif #else #include #include #endif /* returns STRCPY_FAIL, STRCPY_TRUNCATED, or #bytes copied (not including null term) */ int my_strcpy(char *dst, int dst_len, char *src, int src_len) { if (dst_len <= 0) return STRCPY_FAIL; if (src_len == SQL_NULL_DATA) { dst[0] = '\0'; return STRCPY_NULL; } else if (src_len == SQL_NTS) src_len = strlen(src); if (src_len <= 0) return STRCPY_FAIL; else { if (src_len < dst_len) { memcpy(dst, src, src_len); dst[src_len] = '\0'; } else { memcpy(dst, src, dst_len-1); dst[dst_len-1] = '\0'; /* truncated */ return STRCPY_TRUNCATED; } } return strlen(dst); } /*// strncpy copies up to len characters, and doesn't terminate */ /*// the destination string if src has len characters or more. */ /*// instead, I want it to copy up to len-1 characters and always */ /*// terminate the destination string. */ char *strncpy_null(char *dst, const char *src, int len) { int i; if (NULL != dst) { /* Just in case, check for special lengths */ if (len == SQL_NULL_DATA) { dst[0] = '\0'; return NULL; } else if (len == SQL_NTS) len = strlen(src) + 1; for(i = 0; src[i] && i < len - 1; i++) { dst[i] = src[i]; } if(len > 0) { dst[i] = '\0'; } } return dst; } /*// Create a null terminated string (handling the SQL_NTS thing): */ /*// 1. If buf is supplied, place the string in there (assumes enough space) and return buf. */ /*// 2. If buf is not supplied, malloc space and return this string */ char * make_string(char *s, int len, char *buf) { int length; char *str; if(s && (len > 0 || (len == SQL_NTS && strlen(s) > 0))) { length = (len > 0) ? len : strlen(s); if (buf) { strncpy_null(buf, s, length+1); return buf; } str = (char*)malloc(length + 1); if ( ! str) return NULL; strncpy_null(str, s, length+1); return str; } return NULL; } /* Return the length of a string (handling the SQL_NTS thing): */ int my_strlen(char *s, int len) { int length = 0; if(s && (len > 0 || (len == SQL_NTS && strlen(s) > 0))) { length = (len > 0) ? len : strlen(s); } return length; } /*// Concatenate a single formatted argument to a given buffer handling the SQL_NTS thing. */ /*// "fmt" must contain somewhere in it the single form '%.*s' */ /*// This is heavily used in creating queries for info routines (SQLTables, SQLColumns). */ /*// This routine could be modified to use vsprintf() to handle multiple arguments. */ char * my_strcat(char *buf, char *fmt, char *s, int len) { if (s && (len > 0 || (len == SQL_NTS && strlen(s) > 0))) { int length = (len > 0) ? len : strlen(s); int pos = strlen(buf); sprintf(&buf[pos], fmt, length, s); return buf; } return NULL; } void remove_newlines(char *string) { unsigned int i; size_t stlen=strlen(string); for(i=0; i < stlen; i++) { if((string[i] == '\n') || (string[i] == '\r')) { string[i] = ' '; } } } char * trim(char *s) { int i; for (i = strlen(s) - 1; i >= 0; i--) { if (s[i] == ' ') s[i] = '\0'; else break; } return s; } unixODBC-2.2.14-p2/Drivers/PostgreSQL/options.c0100644000076400007640000003715710311277025017470 0ustar nicknick /* Module: options.c * * Description: This module contains routines for getting/setting * connection and statement options. * * Classes: n/a * * API functions: SQLSetConnectOption, SQLSetStmtOption, SQLGetConnectOption, * SQLGetStmtOption * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #ifndef WIN32 #ifdef UNIXODBC #include #include #else #include "iodbc.h" #include "isql.h" #include "isqlext.h" #endif #else #include #include #include #endif #include "environ.h" #include "connection.h" #include "statement.h" #include "qresult.h" extern GLOBAL_VALUES globals; RETCODE set_statement_option(ConnectionClass *conn, StatementClass *stmt, UWORD fOption, UDWORD vParam); RETCODE set_statement_option(ConnectionClass *conn, StatementClass *stmt, UWORD fOption, UDWORD vParam) { static char *func="set_statement_option"; char changed = FALSE; switch(fOption) { case SQL_ASYNC_ENABLE:/* ignored */ break; case SQL_BIND_TYPE: /* now support multi-column and multi-row binding */ if (conn) conn->stmtOptions.bind_size = vParam; if (stmt) stmt->options.bind_size = vParam; break; case SQL_CONCURRENCY: /* positioned update isn't supported so cursor concurrency is read-only */ if (conn) conn->stmtOptions.scroll_concurrency = vParam; if (stmt) stmt->options.scroll_concurrency = vParam; break; /* if (globals.lie) { if (conn) conn->stmtOptions.scroll_concurrency = vParam; if (stmt) stmt->options.scroll_concurrency = vParam; } else { if (conn) conn->stmtOptions.scroll_concurrency = SQL_CONCUR_READ_ONLY; if (stmt) stmt->options.scroll_concurrency = SQL_CONCUR_READ_ONLY; if (vParam != SQL_CONCUR_READ_ONLY) changed = TRUE; } break; */ case SQL_CURSOR_TYPE: /* if declare/fetch, then type can only be forward. otherwise, it can only be forward or static. */ mylog("SetStmtOption(): SQL_CURSOR_TYPE = %d\n", vParam); if (globals.lie) { if (conn) conn->stmtOptions.cursor_type = vParam; if (stmt) stmt->options.cursor_type = vParam; } else { if (globals.use_declarefetch) { if (conn) conn->stmtOptions.cursor_type = SQL_CURSOR_FORWARD_ONLY; if (stmt) stmt->options.cursor_type = SQL_CURSOR_FORWARD_ONLY; if (vParam != SQL_CURSOR_FORWARD_ONLY) changed = TRUE; } else { if (vParam == SQL_CURSOR_FORWARD_ONLY || vParam == SQL_CURSOR_STATIC) { if (conn) conn->stmtOptions.cursor_type = vParam; /*// valid type */ if (stmt) stmt->options.cursor_type = vParam; /*// valid type */ } else { if (conn) conn->stmtOptions.cursor_type = SQL_CURSOR_STATIC; if (stmt) stmt->options.cursor_type = SQL_CURSOR_STATIC; changed = TRUE; } } } break; case SQL_KEYSET_SIZE: /* ignored, but saved and returned */ mylog("SetStmtOption(): SQL_KEYSET_SIZE, vParam = %d\n", vParam); if (conn) conn->stmtOptions.keyset_size = vParam; if (stmt) stmt->options.keyset_size = vParam; break; /* if (globals.lie) stmt->keyset_size = vParam; else { stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR; stmt->errormsg = "Driver does not support keyset size option"; SC_log_error(func, "", stmt); return SQL_ERROR; } */ case SQL_MAX_LENGTH:/* ignored, but saved */ mylog("SetStmtOption(): SQL_MAX_LENGTH, vParam = %d\n", vParam); if (conn) conn->stmtOptions.maxLength = vParam; if (stmt) stmt->options.maxLength = vParam; break; case SQL_MAX_ROWS: /* ignored, but saved */ mylog("SetStmtOption(): SQL_MAX_ROWS, vParam = %d\n", vParam); if (conn) conn->stmtOptions.maxRows = vParam; if (stmt) stmt->options.maxRows = vParam; break; case SQL_NOSCAN: /* ignored */ mylog("SetStmtOption: SQL_NOSCAN, vParam = %d\n", vParam); break; case SQL_QUERY_TIMEOUT: /* ignored */ mylog("SetStmtOption: SQL_QUERY_TIMEOUT, vParam = %d\n", vParam); /*// "0" returned in SQLGetStmtOption */ break; case SQL_RETRIEVE_DATA: /* ignored, but saved */ mylog("SetStmtOption(): SQL_RETRIEVE_DATA, vParam = %d\n", vParam); if (conn) conn->stmtOptions.retrieve_data = vParam; if (stmt) stmt->options.retrieve_data = vParam; break; case SQL_ROWSET_SIZE: mylog("SetStmtOption(): SQL_ROWSET_SIZE, vParam = %d\n", vParam); /* Save old rowset size for SQLExtendedFetch purposes If the rowset_size is being changed since the last call to fetch rows. */ if (stmt && stmt->save_rowset_size <= 0 && stmt->last_fetch_count > 0 ) stmt->save_rowset_size = stmt->options.rowset_size; if (vParam < 1) { vParam = 1; changed = TRUE; } if (conn) conn->stmtOptions.rowset_size = vParam; if (stmt) stmt->options.rowset_size = vParam; break; case SQL_SIMULATE_CURSOR: /* NOT SUPPORTED */ if (stmt) { stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR; stmt->errormsg = "Simulated positioned update/delete not supported. Use the cursor library."; SC_log_error(func, "", stmt); } if (conn) { conn->errornumber = STMT_NOT_IMPLEMENTED_ERROR; conn->errormsg = "Simulated positioned update/delete not supported. Use the cursor library."; CC_log_error(func, "", conn); } return SQL_ERROR; case SQL_USE_BOOKMARKS: if (stmt) stmt->options.use_bookmarks = vParam; if (conn) conn->stmtOptions.use_bookmarks = vParam; break; /* * added to be nice to OpenOffice */ case /*SQL_ATTR_CURSOR_SENSITIVITY*/ 65534: break; default: { char option[64]; if (stmt) { stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR; stmt->errormsg = "Unknown statement option (Set)"; sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam); SC_log_error(func, option, stmt); } if (conn) { conn->errornumber = STMT_NOT_IMPLEMENTED_ERROR; conn->errormsg = "Unknown statement option (Set)"; sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam); CC_log_error(func, option, conn); } return SQL_ERROR; } } if (changed) { if (stmt) { stmt->errormsg = "Requested value changed."; stmt->errornumber = STMT_OPTION_VALUE_CHANGED; } if (conn) { conn->errormsg = "Requested value changed."; conn->errornumber = STMT_OPTION_VALUE_CHANGED; } return SQL_SUCCESS_WITH_INFO; } else return SQL_SUCCESS; } /* Implements only SQL_AUTOCOMMIT */ RETCODE SQL_API SQLSetConnectOption( HDBC hdbc, UWORD fOption, SQLULEN vParam) { static char *func="SQLSetConnectOption"; ConnectionClass *conn = (ConnectionClass *) hdbc; char changed = FALSE; RETCODE retval; int i; mylog("%s: entering...\n", func); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } switch (fOption) { /* Statement Options -- (apply to all stmts on the connection and become defaults for new stmts) */ case SQL_ASYNC_ENABLE: case SQL_BIND_TYPE: case SQL_CONCURRENCY: case SQL_CURSOR_TYPE: case SQL_KEYSET_SIZE: case SQL_MAX_LENGTH: case SQL_MAX_ROWS: case SQL_NOSCAN: case SQL_QUERY_TIMEOUT: case SQL_RETRIEVE_DATA: case SQL_ROWSET_SIZE: case SQL_SIMULATE_CURSOR: case SQL_USE_BOOKMARKS: /* Affect all current Statements */ for (i = 0; i < conn->num_stmts; i++) { if ( conn->stmts[i]) { set_statement_option(NULL, conn->stmts[i], fOption, vParam); } } /* Become the default for all future statements on this connection */ retval = set_statement_option(conn, NULL, fOption, vParam); if (retval == SQL_SUCCESS_WITH_INFO) changed = TRUE; else if (retval == SQL_ERROR) return SQL_ERROR; break; /**********************************/ /***** Connection Options *******/ /**********************************/ case SQL_ACCESS_MODE: /* ignored */ break; case SQL_AUTOCOMMIT: /* Since we are almost always in a transaction, this is now ok. Even if we were, the logic will handle it by sending a commit after the statement. if (CC_is_in_trans(conn)) { conn->errormsg = "Cannot switch commit mode while a transaction is in progres"; conn->errornumber = CONN_TRANSACT_IN_PROGRES; CC_log_error(func, "", conn); return SQL_ERROR; } */ mylog("SQLSetConnectOption: AUTOCOMMIT: transact_status=%d, vparam=%d\n", conn->transact_status, vParam); switch(vParam) { case SQL_AUTOCOMMIT_OFF: CC_set_autocommit_off(conn); break; case SQL_AUTOCOMMIT_ON: CC_set_autocommit_on(conn); break; default: conn->errormsg = "Illegal parameter value for SQL_AUTOCOMMIT"; conn->errornumber = CONN_INVALID_ARGUMENT_NO; CC_log_error(func, "", conn); return SQL_ERROR; } break; case SQL_CURRENT_QUALIFIER: /* ignored */ break; case SQL_LOGIN_TIMEOUT: /* ignored */ break; case SQL_PACKET_SIZE: /* ignored */ break; case SQL_QUIET_MODE: /* ignored */ break; case SQL_TXN_ISOLATION: /* ignored */ break; /* These options should be handled by driver manager */ case SQL_ODBC_CURSORS: case SQL_OPT_TRACE: case SQL_OPT_TRACEFILE: case SQL_TRANSLATE_DLL: case SQL_TRANSLATE_OPTION: CC_log_error(func, "This connect option (Set) is only used by the Driver Manager", conn); break; default: { char option[64]; conn->errormsg = "Unknown connect option (Set)"; conn->errornumber = CONN_UNSUPPORTED_OPTION; sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam); CC_log_error(func, option, conn); return SQL_ERROR; } } if (changed) { conn->errornumber = CONN_OPTION_VALUE_CHANGED; conn->errormsg = "Requested value changed."; return SQL_SUCCESS_WITH_INFO; } else return SQL_SUCCESS; } /*// - - - - - - - - - */ /* This function just can tell you whether you are in Autcommit mode or not */ RETCODE SQL_API SQLGetConnectOption( HDBC hdbc, UWORD fOption, PTR pvParam) { static char *func="SQLGetConnectOption"; ConnectionClass *conn = (ConnectionClass *) hdbc; mylog("%s: entering...\n", func); if (! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } switch (fOption) { case SQL_ACCESS_MODE:/* NOT SUPPORTED */ *((UDWORD *) pvParam) = SQL_MODE_READ_WRITE; break; case SQL_AUTOCOMMIT: *((UDWORD *)pvParam) = (UDWORD)( CC_is_in_autocommit(conn) ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF); break; case SQL_CURRENT_QUALIFIER: /* don't use qualifiers */ if(pvParam) { ((char*)pvParam)[0]='\0'; } break; case SQL_LOGIN_TIMEOUT: /* NOT SUPPORTED */ *((UDWORD *) pvParam) = 0; break; case SQL_PACKET_SIZE: /* NOT SUPPORTED */ *((UDWORD *) pvParam) = globals.socket_buffersize; break; case SQL_QUIET_MODE:/* NOT SUPPORTED */ *((UDWORD *) pvParam) = (UDWORD) NULL; break; case SQL_TXN_ISOLATION:/* NOT SUPPORTED */ *((UDWORD *) pvParam) = SQL_TXN_SERIALIZABLE; break; /* These options should be handled by driver manager */ case SQL_ODBC_CURSORS: case SQL_OPT_TRACE: case SQL_OPT_TRACEFILE: case SQL_TRANSLATE_DLL: case SQL_TRANSLATE_OPTION: CC_log_error(func, "This connect option (Get) is only used by the Driver Manager", conn); break; default: { char option[64]; conn->errormsg = "Unknown connect option (Get)"; conn->errornumber = CONN_UNSUPPORTED_OPTION; sprintf(option, "fOption=%d", fOption); CC_log_error(func, option, conn); return SQL_ERROR; break; } } return SQL_SUCCESS; } /*// - - - - - - - - - */ RETCODE SQL_API SQLSetStmtOption( HSTMT hstmt, UWORD fOption, SQLULEN vParam) { static char *func="SQLSetStmtOption"; StatementClass *stmt = (StatementClass *) hstmt; char changed = FALSE; mylog("%s: entering...\n", func); /*// thought we could fake Access out by just returning SQL_SUCCESS */ /*// all the time, but it tries to set a huge value for SQL_MAX_LENGTH */ /*// and expects the driver to reduce it to the real value */ if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } return set_statement_option(NULL, stmt, fOption, vParam); } /*// - - - - - - - - - */ RETCODE SQL_API SQLGetStmtOption( HSTMT hstmt, UWORD fOption, PTR pvParam) { static char *func="SQLGetStmtOption"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; mylog("%s: entering...\n", func); /*// thought we could fake Access out by just returning SQL_SUCCESS */ /*// all the time, but it tries to set a huge value for SQL_MAX_LENGTH */ /*// and expects the driver to reduce it to the real value */ if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } switch(fOption) { case SQL_GET_BOOKMARK: case SQL_ROW_NUMBER: res = stmt->result; if ( stmt->manual_result || ! globals.use_declarefetch) { /*// make sure we're positioned on a valid row */ if((stmt->currTuple < 0) || (stmt->currTuple >= QR_get_num_tuples(res))) { stmt->errormsg = "Not positioned on a valid row."; stmt->errornumber = STMT_INVALID_CURSOR_STATE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } } else { if (stmt->currTuple == -1 || ! res || ! res->tupleField) { stmt->errormsg = "Not positioned on a valid row."; stmt->errornumber = STMT_INVALID_CURSOR_STATE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } } if (fOption == SQL_GET_BOOKMARK && stmt->options.use_bookmarks == SQL_UB_OFF) { stmt->errormsg = "Operation invalid because use bookmarks not enabled."; stmt->errornumber = STMT_OPERATION_INVALID; SC_log_error(func, "", stmt); return SQL_ERROR; } *((UDWORD *) pvParam) = SC_get_bookmark(stmt); break; case SQL_ASYNC_ENABLE: /* NOT SUPPORTED */ *((SDWORD *) pvParam) = SQL_ASYNC_ENABLE_OFF; break; case SQL_BIND_TYPE: *((SDWORD *) pvParam) = stmt->options.bind_size; break; case SQL_CONCURRENCY: /* NOT REALLY SUPPORTED */ mylog("GetStmtOption(): SQL_CONCURRENCY\n"); *((SDWORD *)pvParam) = stmt->options.scroll_concurrency; break; case SQL_CURSOR_TYPE: /* PARTIAL SUPPORT */ mylog("GetStmtOption(): SQL_CURSOR_TYPE\n"); *((SDWORD *)pvParam) = stmt->options.cursor_type; break; case SQL_KEYSET_SIZE: /* NOT SUPPORTED, but saved */ mylog("GetStmtOption(): SQL_KEYSET_SIZE\n"); *((SDWORD *)pvParam) = stmt->options.keyset_size; break; case SQL_MAX_LENGTH: /* NOT SUPPORTED, but saved */ *((SDWORD *)pvParam) = stmt->options.maxLength; break; case SQL_MAX_ROWS: /* NOT SUPPORTED, but saved */ *((SDWORD *)pvParam) = stmt->options.maxRows; mylog("GetSmtOption: MAX_ROWS, returning %d\n", stmt->options.maxRows); break; case SQL_NOSCAN:/* NOT SUPPORTED */ *((SDWORD *) pvParam) = SQL_NOSCAN_ON; break; case SQL_QUERY_TIMEOUT: /* NOT SUPPORTED */ *((SDWORD *) pvParam) = 0; break; case SQL_RETRIEVE_DATA: /* NOT SUPPORTED, but saved */ *((SDWORD *) pvParam) = stmt->options.retrieve_data; break; case SQL_ROWSET_SIZE: *((SDWORD *) pvParam) = stmt->options.rowset_size; break; case SQL_SIMULATE_CURSOR:/* NOT SUPPORTED */ *((SDWORD *) pvParam) = SQL_SC_NON_UNIQUE; break; case SQL_USE_BOOKMARKS: *((SDWORD *) pvParam) = stmt->options.use_bookmarks; break; /* * added to be nice to StarOffice and OpenOffice */ case /*SQL_ATTR_CURSOR_SENSITIVITY*/ 65534: *((SDWORD *) pvParam) = /*SQL_UNSPECIFIED*/ 0; break; default: { char option[64]; stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR; stmt->errormsg = "Unknown statement option (Get)"; sprintf(option, "fOption=%d", fOption); SC_log_error(func, option, stmt); return SQL_ERROR; } } return SQL_SUCCESS; } /*// - - - - - - - - - */ unixODBC-2.2.14-p2/Drivers/PostgreSQL/parse.c0100644000076400007640000004627107563762206017123 0ustar nicknick /* Module: parse.c * * Description: This module contains routines related to parsing SQL statements. * This can be useful for two reasons: * * 1. So the query does not actually have to be executed to return data about it * * 2. To be able to return information about precision, nullability, aliases, etc. * in the functions SQLDescribeCol and SQLColAttributes. Currently, Postgres * doesn't return any information about these things in a query. * * Classes: none * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include #include #include #include "statement.h" #include "connection.h" #include "qresult.h" #include "pgtypes.h" #ifndef WIN32 #ifndef HAVE_STRICMP #define stricmp(s1,s2) strcasecmp(s1,s2) #define strnicmp(s1,s2,n) strncasecmp(s1,s2,n) #endif #endif #define FLD_INCR 32 #define TAB_INCR 8 #define COL_INCR 16 char *getNextToken(char *s, char *token, int smax, char *delim, char *quote, char *dquote, char *numeric); void getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k); char searchColInfo(COL_INFO *col_info, FIELD_INFO *fi); char * getNextToken(char *s, char *token, int smax, char *delim, char *quote, char *dquote, char *numeric) { int i = 0; int out = 0; char qc, in_escape = FALSE; if (smax <= 1) return NULL; smax--; /* skip leading delimiters */ while (isspace(s[i]) || s[i] == ',') { /*// mylog("skipping '%c'\n", s[i]); */ i++; } if (s[0] == '\0') { token[0] = '\0'; return NULL; } if (quote) *quote = FALSE; if (dquote) *dquote = FALSE; if (numeric) *numeric = FALSE; /* get the next token */ while ( ! isspace(s[i]) && s[i] != ',' && s[i] != '\0' && out != smax) { /* Handle quoted stuff */ if ( out == 0 && (s[i] == '\"' || s[i] == '\'')) { qc = s[i]; if (qc == '\"') { if (dquote) *dquote = TRUE; } if (qc == '\'') { if (quote) *quote = TRUE; } i++; /* dont return the quote */ while (s[i] != '\0' && out != smax) { if (s[i] == qc && ! in_escape) { break; } if (s[i] == '\\' && ! in_escape) { in_escape = TRUE; } else { in_escape = FALSE; token[out++] = s[i]; } i++; } if (s[i] == qc) i++; break; } /* Check for numeric literals */ if ( out == 0 && isdigit(s[i])) { if (numeric) *numeric = TRUE; token[out++] = s[i++]; while ( isalnum(s[i]) || s[i] == '.') token[out++] = s[i++]; break; } if ( ispunct(s[i]) && s[i] != '_') { mylog("got ispunct: s[%d] = '%c'\n", i, s[i]); if (out == 0) { token[out++] = s[i++]; break; } else break; } if (out != smax) token[out++] = s[i]; i++; } /*// mylog("done -- s[%d] = '%c'\n", i, s[i]); */ token[out] = '\0'; /* find the delimiter */ while ( isspace(s[i])) i++; /* return the most priority delimiter */ if (s[i] == ',') { if (delim) *delim = s[i]; } else if (s[i] == '\0') { if (delim) *delim = '\0'; } else { if (delim) *delim = ' '; } /* skip trailing blanks */ while ( isspace(s[i])) { i++; } return &s[i]; } /* QR_set_num_fields(stmt->result, 14); QR_set_field_info(stmt->result, 0, "TABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "TABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "TABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "COLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "DATA_TYPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 5, "TYPE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 6, "PRECISION", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 7, "LENGTH", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 8, "SCALE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 9, "RADIX", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 10, "NULLABLE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 11, "REMARKS", PG_TYPE_TEXT, 254); QR_set_field_info(stmt->result, 12, "DISPLAY_SIZE", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 13, "FIELD_TYPE", PG_TYPE_INT4, 4); */ void getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k) { if (fi->name[0] == '\0') strcpy(fi->name, QR_get_value_manual(col_info->result, k, 3)); fi->type = atoi( QR_get_value_manual(col_info->result, k, 13)); fi->precision = atoi( QR_get_value_manual(col_info->result, k, 6)); fi->length = atoi( QR_get_value_manual(col_info->result, k, 7)); fi->nullable = atoi( QR_get_value_manual(col_info->result, k, 10)); fi->display_size = atoi( QR_get_value_manual(col_info->result, k, 12)); } char searchColInfo(COL_INFO *col_info, FIELD_INFO *fi) { int k; char *col; for (k = 0; k < QR_get_num_tuples(col_info->result); k++) { col = QR_get_value_manual(col_info->result, k, 3); if ( ! strcmp(col, fi->name)) { getColInfo(col_info, fi, k); mylog("PARSE: searchColInfo: \n"); return TRUE; } } return FALSE; } char parse_statement(StatementClass *stmt) { static char *func="parse_statement"; char token[256]; char delim, quote, dquote, numeric, unquoted; char *ptr; char in_select = FALSE, in_distinct = FALSE, in_on = FALSE, in_from = FALSE, in_where = FALSE, in_table = FALSE; char in_field = FALSE, in_expr = FALSE, in_func = FALSE, in_dot = FALSE, in_as = FALSE; int j, i, k = 0, n, blevel = 0; FIELD_INFO **fi; TABLE_INFO **ti; char parse; ConnectionClass *conn = stmt->hdbc; HSTMT hcol_stmt; StatementClass *col_stmt; RETCODE result; mylog("%s: entering...\n", func); ptr = stmt->statement; fi = stmt->fi; ti = stmt->ti; stmt->nfld = 0; stmt->ntab = 0; while ((ptr = getNextToken(ptr, token, sizeof(token), &delim, "e, &dquote, &numeric)) != NULL) { unquoted = ! ( quote || dquote ); mylog("unquoted=%d, quote=%d, dquote=%d, numeric=%d, delim='%c', token='%s', ptr='%s'\n", unquoted, quote, dquote, numeric, delim, token, ptr); if ( unquoted && ! stricmp(token, "select")) { in_select = TRUE; mylog("SELECT\n"); continue; } if ( unquoted && in_select && ! stricmp(token, "distinct")) { in_distinct = TRUE; mylog("DISTINCT\n"); continue; } if ( unquoted && ! stricmp(token, "into")) { in_select = FALSE; mylog("INTO\n"); continue; } if ( unquoted && ! stricmp(token, "from")) { in_select = FALSE; in_from = TRUE; mylog("FROM\n"); continue; } if ( unquoted && (! stricmp(token, "where") || ! stricmp(token, "union") || ! stricmp(token, "order") || ! stricmp(token, "group") || ! stricmp(token, "having"))) { in_select = FALSE; in_from = FALSE; in_where = TRUE; mylog("WHERE...\n"); break; } if (in_select) { if ( in_distinct) { mylog("in distinct\n"); if (unquoted && ! stricmp(token, "on")) { in_on = TRUE; mylog("got on\n"); continue; } if (in_on) { in_distinct = FALSE; in_on = FALSE; continue; /* just skip the unique on field */ } mylog("done distinct\n"); in_distinct = FALSE; } if ( in_expr || in_func) { /* just eat the expression */ mylog("in_expr=%d or func=%d\n", in_expr, in_func); if (quote || dquote) continue; if (in_expr && blevel == 0 && delim == ',') { mylog("**** in_expr and Got comma\n"); in_expr = FALSE; in_field = FALSE; } else if (token[0] == '(') { blevel++; mylog("blevel++ = %d\n", blevel); } else if (token[0] == ')') { blevel--; mylog("blevel-- = %d\n", blevel); if (delim==',') { in_func = FALSE; in_expr = FALSE; in_field = FALSE; } } continue; } if ( ! in_field) { if ( ! token[0]) continue; if ( ! (stmt->nfld % FLD_INCR)) { mylog("reallocing at nfld=%d\n", stmt->nfld); fi = (FIELD_INFO **) realloc(fi, (stmt->nfld + FLD_INCR) * sizeof(FIELD_INFO *)); if ( ! fi) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } stmt->fi = fi; } fi[stmt->nfld] = (FIELD_INFO *) malloc( sizeof(FIELD_INFO)); if (fi[stmt->nfld] == NULL) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } /* Initialize the field info */ memset(fi[stmt->nfld], 0, sizeof(FIELD_INFO)); /* double quotes are for qualifiers */ if (dquote) fi[stmt->nfld]->dquote = TRUE; if (quote) { fi[stmt->nfld++]->quote = TRUE; continue; } else if (numeric) { mylog("**** got numeric: nfld = %d\n", stmt->nfld); fi[stmt->nfld]->numeric = TRUE; } else if (token[0] == '(') { /* expression */ mylog("got EXPRESSION\n"); fi[stmt->nfld++]->expr = TRUE; in_expr = TRUE; blevel = 1; continue; } else { strcpy(fi[stmt->nfld]->name, token); fi[stmt->nfld]->dot[0] = '\0'; } mylog("got field='%s', dot='%s'\n", fi[stmt->nfld]->name, fi[stmt->nfld]->dot); if (delim == ',') { mylog("comma (1)\n"); } else { in_field = TRUE; } stmt->nfld++; continue; } /**************************/ /* We are in a field now */ /**************************/ if (in_dot) { stmt->nfld--; strcpy(fi[stmt->nfld]->dot, fi[stmt->nfld]->name); strcpy(fi[stmt->nfld]->name, token); stmt->nfld++; in_dot = FALSE; if (delim == ',') { mylog("in_dot: got comma\n"); in_field = FALSE; } continue; } if (in_as) { stmt->nfld--; strcpy(fi[stmt->nfld]->alias, token); mylog("alias for field '%s' is '%s'\n", fi[stmt->nfld]->name, fi[stmt->nfld]->alias); in_as = FALSE; in_field = FALSE; stmt->nfld++; if (delim == ',') { mylog("comma(2)\n"); } continue; } /* Function */ if (token[0] == '(') { in_func = TRUE; blevel = 1; fi[stmt->nfld-1]->func = TRUE; /* name will have the function name -- maybe useful some day */ mylog("**** got function = '%s'\n", fi[stmt->nfld-1]->name); continue; } if (token[0] == '.') { in_dot = TRUE; mylog("got dot\n"); continue; } if ( ! stricmp(token, "as")) { in_as = TRUE; mylog("got AS\n"); continue; } /* otherwise, its probably an expression */ in_expr = TRUE; fi[stmt->nfld-1]->expr = TRUE; fi[stmt->nfld-1]->name[0] = '\0'; mylog("*** setting expression\n"); } if (in_from) { if ( ! in_table) { if ( ! token[0]) continue; if ( ! (stmt->ntab % TAB_INCR)) { ti = (TABLE_INFO **) realloc(ti, (stmt->ntab + TAB_INCR) * sizeof(TABLE_INFO *)); if ( ! ti) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } stmt->ti = ti; } ti[stmt->ntab] = (TABLE_INFO *) malloc(sizeof(TABLE_INFO)); if (ti[stmt->ntab] == NULL) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } ti[stmt->ntab]->alias[0] = '\0'; strcpy(ti[stmt->ntab]->name, token); mylog("got table = '%s'\n", ti[stmt->ntab]->name); if (delim == ',') { mylog("more than 1 tables\n"); } else { in_table = TRUE; } stmt->ntab++; continue; } strcpy(ti[stmt->ntab-1]->alias, token); mylog("alias for table '%s' is '%s'\n", ti[stmt->ntab-1]->name, ti[stmt->ntab-1]->alias); in_table = FALSE; if (delim == ',') { mylog("more than 1 tables\n"); } } } /*************************************************/ /* Resolve any possible field names with tables */ /*************************************************/ parse = TRUE; /* Resolve field names with tables */ for (i = 0; i < stmt->nfld; i++) { if (fi[i]->func || fi[i]->expr || fi[i]->numeric) { fi[i]->ti = NULL; fi[i]->type = -1; parse = FALSE; continue; } else if (fi[i]->quote) { /* handle as text */ fi[i]->ti = NULL; fi[i]->type = PG_TYPE_TEXT; fi[i]->precision = 0; continue; } /* its a dot, resolve to table or alias */ else if (fi[i]->dot[0]) { for (k = 0; k < stmt->ntab; k++) { if ( ! stricmp(ti[k]->name, fi[i]->dot)) { fi[i]->ti = ti[k]; break; } else if ( ! stricmp(ti[k]->alias, fi[i]->dot)) { fi[i]->ti = ti[k]; break; } } } else if (stmt->ntab == 1) fi[i]->ti = ti[0]; } mylog("--------------------------------------------\n"); mylog("nfld=%d, ntab=%d\n", stmt->nfld, stmt->ntab); for (i=0; i < stmt->nfld; i++) { mylog("Field %d: expr=%d, func=%d, quote=%d, dquote=%d, numeric=%d, name='%s', alias='%s', dot='%s'\n", i, fi[i]->expr, fi[i]->func, fi[i]->quote, fi[i]->dquote, fi[i]->numeric, fi[i]->name, fi[i]->alias, fi[i]->dot); if (fi[i]->ti) mylog(" ----> table_name='%s', table_alias='%s'\n", fi[i]->ti->name, fi[i]->ti->alias); } for (i=0; i < stmt->ntab; i++) { mylog("Table %d: name='%s', alias='%s'\n", i, ti[i]->name, ti[i]->alias); } /******************************************************/ /* Now save the SQLColumns Info for the parse tables */ /******************************************************/ /* Call SQLColumns for each table and store the result */ for (i = 0; i < stmt->ntab; i++) { /* See if already got it */ char found = FALSE; for (k = 0; k < conn->ntables; k++) { if ( ! stricmp(conn->col_info[k]->name, ti[i]->name)) { mylog("FOUND col_info table='%s'\n", ti[i]->name); found = TRUE; break; } } if ( ! found) { mylog("PARSE: Getting SQLColumns for table[%d]='%s'\n", i, ti[i]->name); result = PG__SQLAllocStmt( stmt->hdbc, &hcol_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { stmt->errormsg = "SQLAllocStmt failed in parse_statement for columns."; stmt->errornumber = STMT_NO_MEMORY_ERROR; stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } col_stmt = (StatementClass *) hcol_stmt; col_stmt->internal = TRUE; result = PG__SQLColumns(hcol_stmt, (unsigned char*) "", 0, (unsigned char*) "", 0, (unsigned char*) ti[i]->name, (SWORD) strlen(ti[i]->name), (unsigned char*) "", 0); mylog(" Past SQLColumns\n"); if (result == SQL_SUCCESS) { mylog(" Success\n"); if ( ! (conn->ntables % COL_INCR)) { mylog("PARSE: Allocing col_info at ntables=%d\n", conn->ntables); conn->col_info = (COL_INFO **) realloc(conn->col_info, (conn->ntables + COL_INCR) * sizeof(COL_INFO *)); if ( ! conn->col_info) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } } mylog("PARSE: malloc at conn->col_info[%d]\n", conn->ntables); conn->col_info[conn->ntables] = (COL_INFO *) malloc(sizeof(COL_INFO)); if ( ! conn->col_info[conn->ntables]) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } /* Store the table name and the SQLColumns result structure */ strcpy(conn->col_info[conn->ntables]->name, ti[i]->name); conn->col_info[conn->ntables]->result = col_stmt->result; /* The connection will now free the result structures, so make sure that the statement doesn't free it */ col_stmt->result = NULL; conn->ntables++; PG__SQLFreeStmt(hcol_stmt, SQL_DROP); mylog("Created col_info table='%s', ntables=%d\n", ti[i]->name, conn->ntables); } else { PG__SQLFreeStmt(hcol_stmt, SQL_DROP); break; } } /* Associate a table from the statement with a SQLColumn info */ ti[i]->col_info = conn->col_info[k]; mylog("associate col_info: i=%d, k=%d\n", i, k); } mylog("Done SQLColumns\n"); /******************************************************/ /* Now resolve the fields to point to column info */ /******************************************************/ for (i = 0; i < stmt->nfld;) { /* Dont worry about functions or quotes */ if (fi[i]->func || fi[i]->quote || fi[i]->numeric) { i++; continue; } /* Stars get expanded to all fields in the table */ else if (fi[i]->name[0] == '*') { char do_all_tables; int total_cols, old_size, need, cols; mylog("expanding field %d\n", i); total_cols = 0; if (fi[i]->ti) /* The star represents only the qualified table */ total_cols = QR_get_num_tuples(fi[i]->ti->col_info->result); else { /* The star represents all tables */ /* Calculate the total number of columns after expansion */ for (k = 0; k < stmt->ntab; k++) { total_cols += QR_get_num_tuples(ti[k]->col_info->result); } } total_cols--; /* makes up for the star */ /* Allocate some more field pointers if necessary */ /*//------------------------------------------------------------- */ old_size = (stmt->nfld / FLD_INCR * FLD_INCR + FLD_INCR); need = total_cols - (old_size - stmt->nfld); mylog("k=%d, total_cols=%d, old_size=%d, need=%d\n", k,total_cols,old_size,need); if (need > 0) { int new_size = need / FLD_INCR * FLD_INCR + FLD_INCR; mylog("need more cols: new_size = %d\n", new_size); fi = (FIELD_INFO **) realloc(fi, (old_size + new_size) * sizeof(FIELD_INFO *)); if ( ! fi) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } } /*//------------------------------------------------------------- */ /*// copy any other fields (if there are any) up past the expansion */ for (j = stmt->nfld - 1; j > i; j--) { mylog("copying field %d to %d\n", j, total_cols + j); fi[total_cols + j] = fi[j]; } mylog("done copying fields\n"); /*//------------------------------------------------------------- */ /*// Set the new number of fields */ stmt->nfld += total_cols; mylog("stmt->nfld now at %d\n", stmt->nfld); /*//------------------------------------------------------------- */ /*// copy the new field info */ do_all_tables = (fi[i]->ti ? FALSE : TRUE); for (k = 0; k < (do_all_tables ? stmt->ntab : 1); k++) { TABLE_INFO *the_ti = do_all_tables ? ti[k] : fi[i]->ti; cols = QR_get_num_tuples(the_ti->col_info->result); for (n = 0; n < cols; n++) { mylog("creating field info: n=%d\n", n); /*// skip malloc (already did it for the Star) */ if (k > 0 || n > 0) { mylog("allocating field info at %d\n", n + i); fi[n + i] = (FIELD_INFO *) malloc( sizeof(FIELD_INFO)); if (fi[n + i] == NULL) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } } /* Initialize the new space (or the * field) */ memset(fi[n + i], 0, sizeof(FIELD_INFO)); fi[n + i]->ti = the_ti; mylog("about to copy at %d\n", n + i); getColInfo(the_ti->col_info, fi[n + i], n); mylog("done copying\n"); } i += cols; mylog("i now at %d\n", i); } /*//------------------------------------------------------------- */ } /* We either know which table the field was in because it was qualified with a table name or alias -OR- there was only 1 table. */ else if (fi[i]->ti) { if ( ! searchColInfo(fi[i]->ti->col_info, fi[i])) parse = FALSE; i++; } /* Don't know the table -- search all tables in "from" list */ else { parse = FALSE; for (k = 0; k < stmt->ntab; k++) { if ( searchColInfo(ti[k]->col_info, fi[i])) { fi[i]->ti = ti[k]; /* now know the table */ parse = TRUE; break; } } i++; } } if ( ! parse) stmt->parse_status = STMT_PARSE_INCOMPLETE; else stmt->parse_status = STMT_PARSE_COMPLETE; mylog("done parse_statement: parse=%d, parse_status=%d\n", parse, stmt->parse_status); return parse; } unixODBC-2.2.14-p2/Drivers/PostgreSQL/pgtypes.c0100644000076400007640000003645507363332153017477 0ustar nicknick /* Module: pgtypes.c * * Description: This module contains routines for getting information * about the supported Postgres data types. Only the function * pgtype_to_sqltype() returns an unknown condition. All other * functions return a suitable default so that even data types that * are not directly supported can be used (it is handled as char data). * * Classes: n/a * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #include "dlg_specific.h" #include "pgtypes.h" #include "statement.h" #include "connection.h" #include "qresult.h" #ifndef WIN32 #ifdef UNIXODBC #include #include #else #include "iodbc.h" #include "isql.h" #include "isqlext.h" #endif #else #include #include #include #endif extern GLOBAL_VALUES globals; Int4 getCharPrecision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as); /* these are the types we support. all of the pgtype_ functions should */ /* return values for each one of these. */ /* Even types not directly supported are handled as character types so all types should work (points, etc.) */ /* ALL THESE TYPES ARE NO LONGER REPORTED in SQLGetTypeInfo. Instead, all the SQL TYPES are reported and mapped to a corresponding Postgres Type */ /* Int4 pgtypes_defined[] = { PG_TYPE_CHAR, PG_TYPE_CHAR2, PG_TYPE_CHAR4, PG_TYPE_CHAR8, PG_TYPE_CHAR16, PG_TYPE_NAME, PG_TYPE_VARCHAR, PG_TYPE_BPCHAR, PG_TYPE_DATE, PG_TYPE_TIME, PG_TYPE_ABSTIME, PG_TYPE_TIMESTAMP, PG_TYPE_TEXT, PG_TYPE_INT2, PG_TYPE_INT4, PG_TYPE_FLOAT4, PG_TYPE_FLOAT8, PG_TYPE_NUMERIC, PG_TYPE_OID, PG_TYPE_MONEY, PG_TYPE_BOOL, PG_TYPE_BYTEA, PG_TYPE_LO, 0 }; */ /* These are NOW the SQL Types reported in SQLGetTypeInfo. */ Int2 sqlTypes [] = { SQL_BIGINT, /* SQL_BINARY, -- Commented out because VarBinary is more correct. */ SQL_BIT, SQL_CHAR, SQL_DATE, SQL_DECIMAL, SQL_DOUBLE, SQL_FLOAT, SQL_INTEGER, SQL_LONGVARBINARY, SQL_LONGVARCHAR, SQL_NUMERIC, SQL_REAL, SQL_SMALLINT, SQL_TIME, SQL_TIMESTAMP, SQL_TINYINT, SQL_VARBINARY, SQL_VARCHAR, 0 }; Int4 sqltype_to_pgtype(SWORD fSqlType) { Int4 pgType; switch(fSqlType) { case SQL_BINARY: pgType = PG_TYPE_BYTEA; break; case SQL_CHAR: pgType = PG_TYPE_BPCHAR; break; case SQL_BIT: pgType = globals.bools_as_char ? PG_TYPE_CHAR : PG_TYPE_BOOL; break; case SQL_DATE: pgType = PG_TYPE_DATE; break; case SQL_DOUBLE: case SQL_FLOAT: pgType = PG_TYPE_FLOAT8; break; case SQL_NUMERIC: case SQL_DECIMAL: pgType = PG_TYPE_NUMERIC; break; case SQL_INTEGER: case SQL_BIGINT: pgType = PG_TYPE_INT4; break; case SQL_LONGVARBINARY: pgType = PG_TYPE_LO; break; case SQL_LONGVARCHAR: pgType = globals.text_as_longvarchar ? PG_TYPE_TEXT : PG_TYPE_VARCHAR; break; case SQL_REAL: pgType = PG_TYPE_FLOAT4; break; case SQL_SMALLINT: case SQL_TINYINT: pgType = PG_TYPE_INT2; break; case SQL_TIME: pgType = PG_TYPE_TIME; break; case SQL_TIMESTAMP: pgType = PG_TYPE_TIMESTAMP; break; case SQL_VARBINARY: pgType = PG_TYPE_BYTEA; break; case SQL_VARCHAR: pgType = PG_TYPE_VARCHAR; break; default: break; } return pgType; } /* There are two ways of calling this function: 1. When going through the supported PG types (SQLGetTypeInfo) 2. When taking any type id (SQLColumns, SQLGetData) The first type will always work because all the types defined are returned here. The second type will return a default based on global parameter when it does not know. This allows for supporting types that are unknown. All other pg routines in here return a suitable default. */ Int2 pgtype_to_sqltype(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_CHAR: case PG_TYPE_CHAR2: case PG_TYPE_CHAR4: case PG_TYPE_CHAR8: case PG_TYPE_CHAR16: case PG_TYPE_NAME: return SQL_CHAR; case PG_TYPE_BPCHAR: return SQL_CHAR; case PG_TYPE_VARCHAR: return SQL_VARCHAR; case PG_TYPE_TEXT: return globals.text_as_longvarchar ? SQL_LONGVARCHAR : SQL_VARCHAR; case PG_TYPE_BYTEA: return SQL_VARBINARY; case PG_TYPE_LO: return SQL_LONGVARBINARY; case PG_TYPE_INT2: return SQL_SMALLINT; case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: return SQL_INTEGER; case PG_TYPE_FLOAT4: return SQL_REAL; case PG_TYPE_FLOAT8: return SQL_FLOAT; case PG_TYPE_NUMERIC: return SQL_NUMERIC; case PG_TYPE_DATE: return SQL_DATE; case PG_TYPE_TIME: return SQL_TIME; case PG_TYPE_ABSTIME: case PG_TYPE_TIMESTAMP: return SQL_TIMESTAMP; case PG_TYPE_MONEY: return SQL_FLOAT; case PG_TYPE_BOOL: return globals.bools_as_char ? SQL_CHAR : SQL_BIT; default: /* first, check to see if 'type' is in list. If not, look up with query. Add oid, name to list. If its already in list, just return. */ if (type == stmt->hdbc->lobj_type) /* hack until permanent type is available */ return SQL_LONGVARBINARY; return globals.unknowns_as_longvarchar ? SQL_LONGVARCHAR : SQL_VARCHAR; } } Int2 pgtype_to_ctype(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_INT2: return SQL_C_SSHORT; case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: return SQL_C_SLONG; case PG_TYPE_FLOAT4: return SQL_C_FLOAT; case PG_TYPE_NUMERIC: case PG_TYPE_FLOAT8: return SQL_C_DOUBLE; case PG_TYPE_DATE: return SQL_C_DATE; case PG_TYPE_TIME: return SQL_C_TIME; case PG_TYPE_ABSTIME: case PG_TYPE_TIMESTAMP: return SQL_C_TIMESTAMP; case PG_TYPE_MONEY: return SQL_C_FLOAT; case PG_TYPE_BOOL: return globals.bools_as_char ? SQL_C_CHAR : SQL_C_BIT; case PG_TYPE_BYTEA: return SQL_C_BINARY; case PG_TYPE_LO: return SQL_C_BINARY; default: if (type == stmt->hdbc->lobj_type) /* hack until permanent type is available */ return SQL_C_BINARY; return SQL_C_CHAR; } } char *pgtype_to_name(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_CHAR: return "char"; case PG_TYPE_CHAR2: return "char2"; case PG_TYPE_CHAR4: return "char4"; case PG_TYPE_CHAR8: return "char8"; case PG_TYPE_CHAR16: return "char16"; case PG_TYPE_VARCHAR: return "varchar"; case PG_TYPE_BPCHAR: return "char"; case PG_TYPE_TEXT: return "text"; case PG_TYPE_NAME: return "name"; case PG_TYPE_INT2: return "int2"; case PG_TYPE_OID: return "oid"; case PG_TYPE_INT4: return "int4"; case PG_TYPE_FLOAT4: return "float4"; case PG_TYPE_FLOAT8: return "float8"; case PG_TYPE_NUMERIC: return "numeric"; case PG_TYPE_DATE: return "date"; case PG_TYPE_TIME: return "time"; case PG_TYPE_ABSTIME: return "abstime"; case PG_TYPE_TIMESTAMP: return "timestamp"; case PG_TYPE_MONEY: return "money"; case PG_TYPE_BOOL: return "bool"; case PG_TYPE_BYTEA: return "bytea"; case PG_TYPE_LO: return PG_TYPE_LO_NAME; default: if (type == stmt->hdbc->lobj_type) /* hack until permanent type is available */ return PG_TYPE_LO_NAME; /* "unknown" can actually be used in alter table because it is a real PG type! */ return "unknown"; } } Int4 getCharPrecision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as) { int p = -1, maxsize; QResultClass *result; ColumnInfoClass *flds; mylog("getCharPrecision: type=%d, col=%d, unknown = %d\n", type,col,handle_unknown_size_as); /* Assign Maximum size based on parameters */ switch(type) { case PG_TYPE_TEXT: if (globals.text_as_longvarchar) maxsize = globals.max_longvarchar_size; else maxsize = globals.max_varchar_size; break; case PG_TYPE_VARCHAR: case PG_TYPE_BPCHAR: maxsize = globals.max_varchar_size; break; default: if (globals.unknowns_as_longvarchar) maxsize = globals.max_longvarchar_size; else maxsize = globals.max_varchar_size; break; } /* Static Precision (i.e., the Maximum Precision of the datatype) This has nothing to do with a result set. */ if (col < 0) return maxsize; result = SC_get_Result(stmt); /* Manual Result Sets -- use assigned column width (i.e., from set_tuplefield_string) */ if (stmt->manual_result) { flds = result->fields; if (flds) return flds->adtsize[col]; else return maxsize; } /* Size is unknown -- handle according to parameter */ if (QR_get_atttypmod(result, col) > -1) return QR_get_atttypmod(result, col); if (type == PG_TYPE_BPCHAR || handle_unknown_size_as == UNKNOWNS_AS_LONGEST) { p = QR_get_display_size(result, col); mylog("getCharPrecision: LONGEST: p = %d\n", p); } if (p < 0 && handle_unknown_size_as == UNKNOWNS_AS_MAX) return maxsize; else return p; } /* For PG_TYPE_VARCHAR, PG_TYPE_BPCHAR, SQLColumns will override this length with the atttypmod length from pg_attribute . If col >= 0, then will attempt to get the info from the result set. This is used for functions SQLDescribeCol and SQLColAttributes. */ Int4 pgtype_precision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as) { switch(type) { case PG_TYPE_CHAR: return 1; case PG_TYPE_CHAR2: return 2; case PG_TYPE_CHAR4: return 4; case PG_TYPE_CHAR8: return 8; case PG_TYPE_CHAR16: return 16; case PG_TYPE_NAME: return NAME_FIELD_SIZE; case PG_TYPE_INT2: return 5; case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: return 10; case PG_TYPE_FLOAT4: case PG_TYPE_MONEY: return 7; case PG_TYPE_FLOAT8: return 15; case PG_TYPE_DATE: return 10; case PG_TYPE_TIME: return 8; case PG_TYPE_ABSTIME: case PG_TYPE_TIMESTAMP: return 19; case PG_TYPE_BOOL: return 1; case PG_TYPE_LO: return SQL_NO_TOTAL; default: if (type == stmt->hdbc->lobj_type) /* hack until permanent type is available */ return SQL_NO_TOTAL; /* Handle Character types and unknown types */ return getCharPrecision(stmt, type, col, handle_unknown_size_as); } } Int4 pgtype_display_size(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as) { switch(type) { case PG_TYPE_INT2: return 6; case PG_TYPE_OID: case PG_TYPE_XID: return 10; case PG_TYPE_INT4: return 11; case PG_TYPE_MONEY: return 15; /* ($9,999,999.99) */ case PG_TYPE_FLOAT4: return 13; case PG_TYPE_FLOAT8: return 22; /* Character types use regular precision */ default: return pgtype_precision(stmt, type, col, handle_unknown_size_as); } } /* For PG_TYPE_VARCHAR, PG_TYPE_BPCHAR, SQLColumns will override this length with the atttypmod length from pg_attribute */ Int4 pgtype_length(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as) { switch(type) { case PG_TYPE_INT2: return 2; case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: return 4; case PG_TYPE_FLOAT4: case PG_TYPE_MONEY: return 4; case PG_TYPE_FLOAT8: return 8; case PG_TYPE_DATE: case PG_TYPE_TIME: return 6; case PG_TYPE_ABSTIME: case PG_TYPE_TIMESTAMP: return 16; /* Character types use the default precision */ default: return pgtype_precision(stmt, type, col, handle_unknown_size_as); } } Int2 pgtype_scale(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_INT2: case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: case PG_TYPE_FLOAT4: case PG_TYPE_FLOAT8: case PG_TYPE_NUMERIC: case PG_TYPE_MONEY: case PG_TYPE_BOOL: /* Number of digits to the right of the decimal point in "yyyy-mm=dd hh:mm:ss[.f...]" */ case PG_TYPE_ABSTIME: case PG_TYPE_TIMESTAMP: return 0; default: return -1; } } Int2 pgtype_radix(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_INT2: case PG_TYPE_OID: case PG_TYPE_INT4: case PG_TYPE_FLOAT4: case PG_TYPE_MONEY: case PG_TYPE_NUMERIC: case PG_TYPE_FLOAT8: return 10; default: return -1; } } Int2 pgtype_nullable(StatementClass *stmt, Int4 type) { return SQL_NULLABLE; /* everything should be nullable */ } Int2 pgtype_auto_increment(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_INT2: case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: case PG_TYPE_FLOAT4: case PG_TYPE_MONEY: case PG_TYPE_BOOL: case PG_TYPE_FLOAT8: case PG_TYPE_NUMERIC: case PG_TYPE_DATE: case PG_TYPE_TIME: case PG_TYPE_ABSTIME: case PG_TYPE_TIMESTAMP: return FALSE; default: return -1; } } Int2 pgtype_case_sensitive(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_CHAR: case PG_TYPE_CHAR2: case PG_TYPE_CHAR4: case PG_TYPE_CHAR8: case PG_TYPE_CHAR16: case PG_TYPE_VARCHAR: case PG_TYPE_BPCHAR: case PG_TYPE_TEXT: case PG_TYPE_NAME: return TRUE; default: return FALSE; } } Int2 pgtype_money(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_MONEY: return TRUE; default: return FALSE; } } Int2 pgtype_searchable(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_CHAR: case PG_TYPE_CHAR2: case PG_TYPE_CHAR4: case PG_TYPE_CHAR8: case PG_TYPE_CHAR16: case PG_TYPE_VARCHAR: case PG_TYPE_BPCHAR: case PG_TYPE_TEXT: case PG_TYPE_NAME: return SQL_SEARCHABLE; default: return SQL_ALL_EXCEPT_LIKE; } } Int2 pgtype_unsigned(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_OID: case PG_TYPE_XID: return TRUE; case PG_TYPE_INT2: case PG_TYPE_INT4: case PG_TYPE_FLOAT4: case PG_TYPE_FLOAT8: case PG_TYPE_NUMERIC: case PG_TYPE_MONEY: return FALSE; default: return -1; } } char *pgtype_literal_prefix(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_INT2: case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: case PG_TYPE_FLOAT4: case PG_TYPE_FLOAT8: case PG_TYPE_NUMERIC: case PG_TYPE_MONEY: return NULL; default: return "'"; } } char *pgtype_literal_suffix(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_INT2: case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: case PG_TYPE_FLOAT4: case PG_TYPE_FLOAT8: case PG_TYPE_NUMERIC: case PG_TYPE_MONEY: return NULL; default: return "'"; } } char *pgtype_create_params(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_CHAR: case PG_TYPE_VARCHAR: return "max. length"; default: return NULL; } } Int2 sqltype_to_default_ctype(Int2 sqltype) { /*// from the table on page 623 of ODBC 2.0 Programmer's Reference */ /*// (Appendix D) */ switch(sqltype) { case SQL_CHAR: case SQL_VARCHAR: case SQL_LONGVARCHAR: /* FIXME: */ /* case SQL_DECIMAL: case SQL_NUMERIC: */ case SQL_BIGINT: return SQL_C_CHAR; case SQL_BIT: return SQL_C_BIT; case SQL_TINYINT: return SQL_C_STINYINT; case SQL_SMALLINT: return SQL_C_SSHORT; case SQL_INTEGER: return SQL_C_SLONG; case SQL_REAL: return SQL_C_FLOAT; case SQL_FLOAT: case SQL_DOUBLE: case SQL_DECIMAL: case SQL_NUMERIC: return SQL_C_DOUBLE; case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY: return SQL_C_BINARY; case SQL_DATE: return SQL_C_DATE; case SQL_TIME: return SQL_C_TIME; case SQL_TIMESTAMP: return SQL_C_TIMESTAMP; default: /* should never happen */ return SQL_C_CHAR; } } unixODBC-2.2.14-p2/Drivers/PostgreSQL/psqlodbc.c0100644000076400007640000000504107363332153017576 0ustar nicknick /* Module: psqlodbc.c * * Description: This module contains the main entry point (DllMain) for the library. * It also contains functions to get and set global variables for the * driver in the registry. * * Classes: n/a * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #include "dlg_specific.h" #ifndef WIN32 #ifdef UNIXODBC #include #include #else #include "iodbc.h" #include "isql.h" #include "isqlext.h" #endif #else #include #include #include #include #endif GLOBAL_VALUES globals; /* BOOL _init(void); BOOL _fini(void); */ RETCODE SQL_API SQLDummyOrdinal(void); #ifdef WIN32 HINSTANCE NEAR s_hModule; /* Saved module handle. */ /* This is where the Driver Manager attaches to this Driver */ BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) { WORD wVersionRequested; WSADATA wsaData; switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: s_hModule = hInst; /* Save for dialog boxes */ /* Load the WinSock Library */ wVersionRequested = MAKEWORD(1, 1); if ( WSAStartup(wVersionRequested, &wsaData)) return FALSE; /* Verify that this is the minimum version of WinSock */ if ( LOBYTE( wsaData.wVersion ) != 1 || HIBYTE( wsaData.wVersion ) != 1 ) { WSACleanup(); return FALSE; } getGlobalDefaults(DBMS_NAME, ODBCINST_INI, FALSE); break; case DLL_THREAD_ATTACH: break; case DLL_PROCESS_DETACH: WSACleanup(); return TRUE; case DLL_THREAD_DETACH: break; default: break; } return TRUE; UNREFERENCED_PARAMETER(lpReserved); } #else /* WIN32 */ #ifndef TRUE #define TRUE (BOOL)1 #endif #ifndef FALSE #define FALSE (BOOL)0 #endif #ifdef DONT_DO_IT /* These two functions do shared library initialziation on UNIX, well at least * on Linux. I don't know about other systems. * Should work on SUN - PAH */ BOOL _init(void) { getGlobalDefaults(DBMS_NAME, ODBCINST_INI, FALSE); return TRUE; } BOOL _fini(void) { return TRUE; } #endif #endif /* This function is used to cause the Driver Manager to call functions by number rather than name, which is faster. The ordinal value of this function must be 199 to have the Driver Manager do this. Also, the ordinal values of the functions must match the value of fFunction in SQLGetFunctions() */ RETCODE SQL_API SQLDummyOrdinal(void) { return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/PostgreSQL/qresult.c0100644000076400007640000004025207363332153017471 0ustar nicknick /* Module: qresult.c * * Description: This module contains functions related to * managing result information (i.e, fetching rows from the backend, * managing the tuple cache, etc.) and retrieving it. * Depending on the situation, a QResultClass will hold either data * from the backend or a manually built result (see "qresult.h" to * see which functions/macros are for manual or backend results. * For manually built results, the QResultClass simply points to * TupleList and ColumnInfo structures, which actually hold the data. * * Classes: QResultClass (Functions prefix: "QR_") * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include "qresult.h" #include "misc.h" #include #include #ifndef TRUE #define TRUE (BOOL)1 #endif #ifndef FALSE #define FALSE (BOOL)0 #endif extern GLOBAL_VALUES globals; /* Used for building a Manual Result only */ /* All info functions call this function to create the manual result set. */ void QR_set_num_fields(QResultClass *self, int new_num_fields) { mylog("in QR_set_num_fields\n"); CI_set_num_fields(self->fields, new_num_fields); if(self->manual_tuples) TL_Destructor(self->manual_tuples); self->manual_tuples = TL_Constructor(new_num_fields); mylog("exit QR_set_num_fields\n"); } void QR_set_position(QResultClass *self, int pos) { self->tupleField = self->backend_tuples + ((self->base + pos) * self->num_fields); } void QR_set_cache_size(QResultClass *self, int cache_size) { self->cache_size = cache_size; } void QR_set_rowset_size(QResultClass *self, int rowset_size) { self->rowset_size = rowset_size; } void QR_inc_base(QResultClass *self, int base_inc) { self->base += base_inc; } /************************************/ /* CLASS QResult */ /************************************/ QResultClass * QR_Constructor(void) { QResultClass *rv; mylog("in QR_Constructor\n"); rv = (QResultClass *) malloc(sizeof(QResultClass)); if (rv != NULL) { rv->status = PGRES_EMPTY_QUERY; /* construct the column info */ if ( ! (rv->fields = CI_Constructor())) { free(rv); return NULL; } rv->manual_tuples = NULL; rv->backend_tuples = NULL; rv->message = NULL; rv->command = NULL; rv->notice = NULL; rv->conn = NULL; rv->inTuples = FALSE; rv->fcount = 0; rv->fetch_count = 0; rv->base = 0; rv->currTuple = -1; rv->num_fields = 0; rv->tupleField = NULL; rv->cursor = NULL; rv->cache_size = globals.fetch_max; rv->rowset_size = 1; } mylog("exit QR_Constructor\n"); return rv; } void QR_Destructor(QResultClass *self) { mylog("QResult: in DESTRUCTOR\n"); /* manual result set tuples */ if (self->manual_tuples) TL_Destructor(self->manual_tuples); /*// If conn is defined, then we may have used "backend_tuples", */ /*// so in case we need to, free it up. Also, close the cursor. */ if (self->conn && self->conn->sock && CC_is_in_trans(self->conn)) QR_close(self); /*// close the cursor if there is one */ QR_free_memory(self); /*// safe to call anyway */ /*// Should have been freed in the close() but just in case... */ if (self->cursor) free(self->cursor); /* Free up column info */ if (self->fields) CI_Destructor(self->fields); /* Free command info (this is from strdup()) */ if (self->command) free(self->command); /* Free notice info (this is from strdup()) */ if (self->notice) free(self->notice); free(self); mylog("QResult: exit DESTRUCTOR\n"); } void QR_set_command(QResultClass *self, char *msg) { if (self->command) free(self->command); self->command = msg ? strdup(msg) : NULL; } void QR_set_notice(QResultClass *self, char *msg) { if (self->notice) free(self->notice); self->notice = msg ? strdup(msg) : NULL; } void QR_free_memory(QResultClass *self) { register int lf, row; register TupleField *tuple = self->backend_tuples; int fcount = self->fcount; int num_fields = self->num_fields; mylog("QResult: free memory in, fcount=%d\n", fcount); if ( self->backend_tuples) { for (row = 0; row < fcount; row++) { mylog("row = %d, num_fields = %d\n", row, num_fields); for (lf=0; lf < num_fields; lf++) { if (tuple[lf].value != NULL) { mylog("free [lf=%d] %u\n", lf, tuple[lf].value); free(tuple[lf].value); } } tuple += num_fields; /*// next row */ } free(self->backend_tuples); self->backend_tuples = NULL; } self->fcount = 0; mylog("QResult: free memory out\n"); } /*// This function is called by send_query() */ char QR_fetch_tuples(QResultClass *self, ConnectionClass *conn, char *cursor) { int tuple_size; /*// If called from send_query the first time (conn != NULL), */ /*// then set the inTuples state, */ /*// and read the tuples. If conn is NULL, */ /*// it implies that we are being called from next_tuple(), */ /*// like to get more rows so don't call next_tuple again! */ if (conn != NULL) { self->conn = conn; mylog("QR_fetch_tuples: cursor = '%s', self->cursor=%u\n", (cursor==NULL)?"":cursor, self->cursor); if (self->cursor) free(self->cursor); if ( globals.use_declarefetch) { if (! cursor || cursor[0] == '\0') { self->status = PGRES_INTERNAL_ERROR; QR_set_message(self, "Internal Error -- no cursor for fetch"); return FALSE; } self->cursor = strdup(cursor); } /*// Read the field attributes. */ /*// $$$$ Should do some error control HERE! $$$$ */ if ( CI_read_fields(self->fields, self->conn)) { self->status = PGRES_FIELDS_OK; self->num_fields = CI_get_num_fields(self->fields); } else { self->status = PGRES_BAD_RESPONSE; QR_set_message(self, "Error reading field information"); return FALSE; } mylog("QR_fetch_tuples: past CI_read_fields: num_fields = %d\n", self->num_fields); if (globals.use_declarefetch) tuple_size = self->cache_size; else tuple_size = TUPLE_MALLOC_INC; /* allocate memory for the tuple cache */ mylog("MALLOC: tuple_size = %d, size = %d\n", tuple_size, self->num_fields * sizeof(TupleField) * tuple_size); self->backend_tuples = (TupleField *) malloc(self->num_fields * sizeof(TupleField) * tuple_size); if ( ! self->backend_tuples) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Could not get memory for tuple cache."); return FALSE; } self->inTuples = TRUE; /* Force a read to occur in next_tuple */ self->fcount = tuple_size+1; self->fetch_count = tuple_size+1; self->base = 0; return QR_next_tuple(self); } else { /*// Always have to read the field attributes. */ /*// But we dont have to reallocate memory for them! */ if ( ! CI_read_fields(NULL, self->conn)) { self->status = PGRES_BAD_RESPONSE; QR_set_message(self, "Error reading field information"); return FALSE; } return TRUE; } } /*// Close the cursor and end the transaction (if no cursors left) */ /*// We only close cursor/end the transaction if a cursor was used. */ int QR_close(QResultClass *self) { QResultClass *res; if (globals.use_declarefetch && self->conn && self->cursor) { char buf[64]; sprintf(buf, "close %s", self->cursor); mylog("QResult: closing cursor: '%s'\n", buf); res = CC_send_query(self->conn, buf, NULL); self->inTuples = FALSE; self->currTuple = -1; free(self->cursor); self->cursor = NULL; if (res == NULL) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Error closing cursor."); return FALSE; } /* End the transaction if there are no cursors left on this conn */ if (CC_cursor_count(self->conn) == 0) { mylog("QResult: END transaction on conn=%u\n", self->conn); res = CC_send_query(self->conn, "END", NULL); CC_set_no_trans(self->conn); if (res == NULL) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Error ending transaction."); return FALSE; } } } return TRUE; } /*// This function is called by fetch_tuples() AND SQLFetch() */ int QR_next_tuple(QResultClass *self) { int id; QResultClass *res; SocketClass *sock; /* Speed up access */ int fetch_count = self->fetch_count; int fcount = self->fcount; int fetch_size, offset= 0; int end_tuple = self->rowset_size + self->base; char corrected = FALSE; TupleField *the_tuples = self->backend_tuples; static char msgbuffer[MAX_MESSAGE_LEN+1]; char cmdbuffer[MAX_MESSAGE_LEN+1]; /*// QR_set_command() dups this string so dont need static */ char fetch[128]; QueryInfo qi; if (fetch_count < fcount) { /* return a row from cache */ mylog("next_tuple: fetch_count < fcount: returning tuple %d, fcount = %d\n", fetch_count, fcount); self->tupleField = the_tuples + (fetch_count * self->num_fields); /* next row */ self->fetch_count++; return TRUE; } else if (self->fcount < self->cache_size) { /* last row from cache */ /*// We are done because we didn't even get CACHE_SIZE tuples */ mylog("next_tuple: fcount < CACHE_SIZE: fcount = %d, fetch_count = %d\n", fcount, fetch_count); self->tupleField = NULL; self->status = PGRES_END_TUPLES; return -1; /* end of tuples */ } else { /* See if we need to fetch another group of rows. We may be being called from send_query(), and if so, don't send another fetch, just fall through and read the tuples. */ self->tupleField = NULL; if ( ! self->inTuples) { if ( ! globals.use_declarefetch) { mylog("next_tuple: ALL_ROWS: done, fcount = %d, fetch_count = %d\n", fcount, fetch_count); self->tupleField = NULL; self->status = PGRES_END_TUPLES; return -1; /* end of tuples */ } if (self->base == fcount) { /* not a correction */ /* Determine the optimum cache size. */ if (globals.fetch_max % self->rowset_size == 0) fetch_size = globals.fetch_max; else if (self->rowset_size < globals.fetch_max) fetch_size = (globals.fetch_max / self->rowset_size) * self->rowset_size; else fetch_size = self->rowset_size; self->cache_size = fetch_size; self->fetch_count = 1; } else { /* need to correct */ corrected = TRUE; fetch_size = end_tuple - fcount; self->cache_size += fetch_size; offset = self->fetch_count; self->fetch_count++; } self->backend_tuples = (TupleField *) realloc(self->backend_tuples, self->num_fields * sizeof(TupleField) * self->cache_size); if ( ! self->backend_tuples) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Out of memory while reading tuples."); return FALSE; } sprintf(fetch, "fetch %d in %s", fetch_size, self->cursor); mylog("next_tuple: sending actual fetch (%d) query '%s'\n", fetch_size, fetch); /*// don't read ahead for the next tuple (self) ! */ qi.row_size = self->cache_size; qi.result_in = self; qi.cursor = NULL; res = CC_send_query(self->conn, fetch, &qi); if (res == NULL) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Error fetching next group."); return FALSE; } self->inTuples = TRUE; } else { mylog("next_tuple: inTuples = true, falling through: fcount = %d, fetch_count = %d\n", self->fcount, self->fetch_count); /* This is a pre-fetch (fetching rows right after query but before any real SQLFetch() calls. This is done so the field attributes are available. */ self->fetch_count = 0; } } if ( ! corrected) { self->base = 0; self->fcount = 0; } sock = CC_get_socket(self->conn); self->tupleField = NULL; for ( ; ;) { id = SOCK_get_char(sock); switch (id) { case 'T': /* Tuples within tuples cannot be handled */ self->status = PGRES_BAD_RESPONSE; QR_set_message(self, "Tuples within tuples cannot be handled"); return FALSE; case 'B': /* Tuples in binary format */ case 'D': /* Tuples in ASCII format */ if ( ! globals.use_declarefetch && self->fcount > 0 && ! (self->fcount % TUPLE_MALLOC_INC)) { size_t old_size = self->fcount * self->num_fields * sizeof(TupleField); mylog("REALLOC: old_size = %d\n", old_size); self->backend_tuples = (TupleField *) realloc(self->backend_tuples, old_size + (self->num_fields * sizeof(TupleField) * TUPLE_MALLOC_INC)); if ( ! self->backend_tuples) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Out of memory while reading tuples."); return FALSE; } } if ( ! QR_read_tuple(self, (char) (id == 0))) { self->status = PGRES_BAD_RESPONSE; QR_set_message(self, "Error reading the tuple"); return FALSE; } self->fcount++; break; /*// continue reading */ case 'C': /* End of tuple list */ SOCK_get_string(sock, cmdbuffer, MAX_MESSAGE_LEN); QR_set_command(self, cmdbuffer); mylog("end of tuple list -- setting inUse to false: this = %u\n", self); self->inTuples = FALSE; if (self->fcount > 0) { qlog(" [ fetched %d rows ]\n", self->fcount); mylog("_next_tuple: 'C' fetch_max && fcount = %d\n", self->fcount); /* set to first row */ self->tupleField = self->backend_tuples + (offset * self->num_fields); return TRUE; } else { /*// We are surely done here (we read 0 tuples) */ qlog(" [ fetched 0 rows ]\n"); mylog("_next_tuple: 'C': DONE (fcount == 0)\n"); return -1; /* end of tuples */ } case 'E': /* Error */ SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); QR_set_message(self, msgbuffer); self->status = PGRES_FATAL_ERROR; if ( ! strncmp(msgbuffer, "FATAL", 5)) CC_set_no_trans(self->conn); qlog("ERROR from backend in next_tuple: '%s'\n", msgbuffer); return FALSE; case 'N': /* Notice */ SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); QR_set_message(self, msgbuffer); self->status = PGRES_NONFATAL_ERROR; qlog("NOTICE from backend in next_tuple: '%s'\n", msgbuffer); continue; default: /* this should only happen if the backend dumped core */ mylog("QR_next_tuple: Unexpected result from backend: id = '%c' (%d)\n", id, id); qlog("QR_next_tuple: Unexpected result from backend: id = '%c' (%d)\n", id, id); QR_set_message(self, "Unexpected result from backend. It probably crashed"); self->status = PGRES_FATAL_ERROR; CC_set_no_trans(self->conn); return FALSE; } } return TRUE; } char QR_read_tuple(QResultClass *self, char binary) { Int2 field_lf; TupleField *this_tuplefield; char bmp, bitmap[MAX_FIELDS]; /* Max. len of the bitmap */ Int2 bitmaplen; /* len of the bitmap in bytes */ Int2 bitmap_pos; Int2 bitcnt; Int4 len; char *buffer; int num_fields = self->num_fields; /*// speed up access */ SocketClass *sock = CC_get_socket(self->conn); ColumnInfoClass *flds; /* set the current row to read the fields into */ this_tuplefield = self->backend_tuples + (self->fcount * num_fields); bitmaplen = (Int2) num_fields / BYTELEN; if ((num_fields % BYTELEN) > 0) bitmaplen++; /* At first the server sends a bitmap that indicates which database fields are null */ SOCK_get_n_char(sock, bitmap, bitmaplen); bitmap_pos = 0; bitcnt = 0; bmp = bitmap[bitmap_pos]; for(field_lf = 0; field_lf < num_fields; field_lf++) { /* Check if the current field is NULL */ if(!(bmp & 0200)) { /* YES, it is NULL ! */ this_tuplefield[field_lf].len = 0; this_tuplefield[field_lf].value = 0; } else { /* NO, the field is not null. so get at first the length of the field (four bytes) */ len = SOCK_get_int(sock, VARHDRSZ); if (!binary) len -= VARHDRSZ; buffer = (char *)malloc(len+1); SOCK_get_n_char(sock, buffer, len); buffer[len] = '\0'; mylog("qresult: len=%d, buffer='%s'\n", len, buffer); this_tuplefield[field_lf].len = len; this_tuplefield[field_lf].value = buffer; /* This can be used to set the longest length of the column for any row in the tuple cache. It would not be accurate for varchar and text fields to use this since a tuple cache is only 100 rows. Bpchar can be handled since the strlen of all rows is fixed, assuming there are not 100 nulls in a row! */ flds = self->fields; if (flds->display_size[field_lf] < len) flds->display_size[field_lf] = len; } /* Now adjust for the next bit to be scanned in the next loop. */ bitcnt++; if (BYTELEN == bitcnt) { bitmap_pos++; bmp = bitmap[bitmap_pos]; bitcnt = 0; } else bmp <<= 1; } self->currTuple++; return TRUE; } unixODBC-2.2.14-p2/Drivers/PostgreSQL/results.c0100644000076400007640000010153211014544724017467 0ustar nicknick /* Module: results.c * * Description: This module contains functions related to * retrieving result information through the ODBC API. * * Classes: n/a * * API functions: SQLRowCount, SQLNumResultCols, SQLDescribeCol, SQLColAttributes, * SQLGetData, SQLFetch, SQLExtendedFetch, * SQLMoreResults(NI), SQLSetPos, SQLSetScrollOptions(NI), * SQLSetCursorName, SQLGetCursorName * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "psqlodbc.h" #include "dlg_specific.h" #include "environ.h" #include "connection.h" #include "statement.h" #include "bind.h" #include "qresult.h" #include "convert.h" #include "pgtypes.h" #include #ifndef WIN32 #ifdef UNIXODBC #include #else #include "iodbc.h" #include "isqlext.h" #endif #else #include #include #endif extern GLOBAL_VALUES globals; SQLRETURN SQLRowCount(SQLHSTMT hstmt, SQLLEN *pcrow) { static char *func="SQLRowCount"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; char *msg, *ptr; if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if ( !pcrow ) { return SQL_ERROR; } /* BEGIN - Why not return rowcount? Anyway; its need by StarOffice so... if (stmt->manual_result) { if (pcrow) *pcrow = -1; return SQL_SUCCESS; } */ if ( stmt->manual_result ) { *pcrow = stmt->result->manual_tuples->num_tuples; return SQL_SUCCESS; } /* END - Peter Harvey */ if(stmt->statement_type == STMT_TYPE_SELECT) { if (stmt->status == STMT_FINISHED) { res = SC_get_Result(stmt); if(res && pcrow) { *pcrow = globals.use_declarefetch ? -1 : QR_get_num_tuples(res); return SQL_SUCCESS; } } } else { res = SC_get_Result(stmt); if (res && pcrow) { msg = QR_get_command(res); mylog("*** msg = '%s'\n", msg); trim(msg); /*// get rid of trailing spaces */ ptr = strrchr(msg, ' '); if (ptr) { *pcrow = atoi(ptr+1); mylog("**** SQLRowCount(): THE ROWS: *pcrow = %d\n", *pcrow); } else { *pcrow = -1; mylog("**** SQLRowCount(): NO ROWS: *pcrow = %d\n", *pcrow); } return SQL_SUCCESS; } } SC_log_error(func, "Bad return value", stmt); return SQL_ERROR; } /*// This returns the number of columns associated with the database */ /*// attached to "hstmt". */ RETCODE SQL_API SQLNumResultCols( HSTMT hstmt, SWORD FAR *pccol) { static char *func="SQLNumResultCols"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *result; char parse_ok; if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } SC_clear_error(stmt); parse_ok = FALSE; if (globals.parse && stmt->statement_type == STMT_TYPE_SELECT) { if (stmt->parse_status == STMT_PARSE_NONE) { mylog("SQLNumResultCols: calling parse_statement on stmt=%u\n", stmt); parse_statement(stmt); } if (stmt->parse_status != STMT_PARSE_FATAL) { parse_ok = TRUE; *pccol = stmt->nfld; mylog("PARSE: SQLNumResultCols: *pccol = %d\n", *pccol); } } if ( ! parse_ok) { SC_pre_execute(stmt); result = SC_get_Result(stmt); mylog("SQLNumResultCols: result = %u, status = %d, numcols = %d\n", result, stmt->status, result != NULL ? QR_NumResultCols(result) : -1); if (( ! result) || ((stmt->status != STMT_FINISHED) && (stmt->status != STMT_PREMATURE)) ) { /* no query has been executed on this statement */ stmt->errornumber = STMT_SEQUENCE_ERROR; stmt->errormsg = "No query has been executed with that handle"; SC_log_error(func, "", stmt); return SQL_ERROR; } *pccol = QR_NumResultCols(result); } return SQL_SUCCESS; } /*// - - - - - - - - - */ /*// Return information about the database column the user wants */ /*// information about. */ RETCODE SQL_API SQLDescribeCol( HSTMT hstmt, UWORD icol, UCHAR FAR *szColName, SWORD cbColNameMax, SWORD FAR *pcbColName, SWORD FAR *pfSqlType, SQLULEN *pcbColDef, SWORD FAR *pibScale, SWORD FAR *pfNullable) { static char *func="SQLDescribeCol"; /* gets all the information about a specific column */ StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; char *col_name = NULL; Int4 fieldtype = 0; int precision = 0; ConnInfo *ci; char parse_ok; char buf[255]; int len = 0; RETCODE result; mylog("%s: entering...\n", func); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } ci = &(stmt->hdbc->connInfo); SC_clear_error(stmt); /* Dont check for bookmark column. This is the responsibility of the driver manager. */ icol--; /* use zero based column numbers */ parse_ok = FALSE; if (globals.parse && stmt->statement_type == STMT_TYPE_SELECT) { if (stmt->parse_status == STMT_PARSE_NONE) { mylog("SQLDescribeCol: calling parse_statement on stmt=%u\n", stmt); parse_statement(stmt); } mylog("PARSE: DescribeCol: icol=%d, stmt=%u, stmt->nfld=%d, stmt->fi=%u\n", icol, stmt, stmt->nfld, stmt->fi); if (stmt->parse_status != STMT_PARSE_FATAL && stmt->fi && stmt->fi[icol]) { if (icol >= stmt->nfld) { stmt->errornumber = STMT_INVALID_COLUMN_NUMBER_ERROR; stmt->errormsg = "Invalid column number in DescribeCol."; SC_log_error(func, "", stmt); return SQL_ERROR; } mylog("DescribeCol: getting info for icol=%d\n", icol); fieldtype = stmt->fi[icol]->type; col_name = stmt->fi[icol]->name; precision = stmt->fi[icol]->precision; mylog("PARSE: fieldtype=%d, col_name='%s', precision=%d\n", fieldtype, col_name, precision); if (fieldtype > 0) parse_ok = TRUE; } } /* If couldn't parse it OR the field being described was not parsed (i.e., because it was a function or expression, etc, then do it the old fashioned way. */ if ( ! parse_ok) { SC_pre_execute(stmt); res = SC_get_Result(stmt); mylog("**** SQLDescribeCol: res = %u, stmt->status = %d, !finished=%d, !premature=%d\n", res, stmt->status, stmt->status != STMT_FINISHED, stmt->status != STMT_PREMATURE); if ( (NULL == res) || ((stmt->status != STMT_FINISHED) && (stmt->status != STMT_PREMATURE))) { /* no query has been executed on this statement */ stmt->errornumber = STMT_SEQUENCE_ERROR; stmt->errormsg = "No query has been assigned to this statement."; SC_log_error(func, "", stmt); return SQL_ERROR; } if (icol >= QR_NumResultCols(res)) { stmt->errornumber = STMT_INVALID_COLUMN_NUMBER_ERROR; stmt->errormsg = "Invalid column number in DescribeCol."; sprintf(buf, "Col#=%d, #Cols=%d", icol, QR_NumResultCols(res)); SC_log_error(func, buf, stmt); return SQL_ERROR; } col_name = QR_get_fieldname(res, icol); fieldtype = QR_get_field_type(res, icol); precision = pgtype_precision(stmt, fieldtype, icol, globals.unknown_sizes); /*// atoi(ci->unknown_sizes) */ } mylog("describeCol: col %d fieldname = '%s'\n", icol, col_name); mylog("describeCol: col %d fieldtype = %d\n", icol, fieldtype); mylog("describeCol: col %d precision = %d\n", icol, precision); result = SQL_SUCCESS; /************************/ /* COLUMN NAME */ /************************/ len = strlen(col_name); if (pcbColName) *pcbColName = len; if (szColName) { strncpy_null((char*)szColName, col_name, cbColNameMax); if (len >= cbColNameMax) { result = SQL_SUCCESS_WITH_INFO; stmt->errornumber = STMT_TRUNCATED; stmt->errormsg = "The buffer was too small for the result."; } } /************************/ /* SQL TYPE */ /************************/ if (pfSqlType) { *pfSqlType = pgtype_to_sqltype(stmt, fieldtype); mylog("describeCol: col %d *pfSqlType = %d\n", icol, *pfSqlType); } /************************/ /* PRECISION */ /************************/ if (pcbColDef) { if ( precision < 0) precision = 0; /*// "I dont know" */ *pcbColDef = precision; mylog("describeCol: col %d *pcbColDef = %d\n", icol, *pcbColDef); } /************************/ /* SCALE */ /************************/ if (pibScale) { Int2 scale; scale = pgtype_scale(stmt, fieldtype); if(scale == -1) { scale = 0; } *pibScale = scale; mylog("describeCol: col %d *pibScale = %d\n", icol, *pibScale); } /************************/ /* NULLABILITY */ /************************/ if (pfNullable) { *pfNullable = (parse_ok) ? stmt->fi[icol]->nullable : pgtype_nullable(stmt, fieldtype); mylog("describeCol: col %d *pfNullable = %d\n", icol, *pfNullable); } return result; } /*// Returns result column descriptor information for a result set. */ SQLRETURN SQLColAttributes( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT *pcbDesc, SQLLEN *pfDesc) { static char *func = "SQLColAttributes"; StatementClass *stmt = (StatementClass *) hstmt; Int4 field_type = 0; ConnInfo *ci; int unknown_sizes; int cols = 0; char parse_ok; RETCODE result; char *p = NULL; int len = 0, value = 0; mylog("%s: entering...\n", func); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } ci = &(stmt->hdbc->connInfo); /* Dont check for bookmark column. This is the responsibility of the driver manager. For certain types of arguments, the column number is ignored anyway, so it may be 0. */ icol--; unknown_sizes = globals.unknown_sizes; /*// atoi(ci->unknown_sizes); */ if (unknown_sizes == UNKNOWNS_AS_DONTKNOW) /*// not appropriate for SQLColAttributes() */ unknown_sizes = UNKNOWNS_AS_MAX; parse_ok = FALSE; if (globals.parse && stmt->statement_type == STMT_TYPE_SELECT) { if (stmt->parse_status == STMT_PARSE_NONE) { mylog("SQLColAttributes: calling parse_statement\n"); parse_statement(stmt); } cols = stmt->nfld; /* Column Count is a special case. The Column number is ignored in this case. */ if (fDescType == SQL_COLUMN_COUNT) { if (pfDesc) *pfDesc = cols; return SQL_SUCCESS; } if (stmt->parse_status != STMT_PARSE_FATAL && stmt->fi && stmt->fi[icol]) { if (icol >= cols) { stmt->errornumber = STMT_INVALID_COLUMN_NUMBER_ERROR; stmt->errormsg = "Invalid column number in DescribeCol."; SC_log_error(func, "", stmt); return SQL_ERROR; } field_type = stmt->fi[icol]->type; if (field_type > 0) parse_ok = TRUE; } } if ( ! parse_ok) { SC_pre_execute(stmt); mylog("**** SQLColAtt: result = %u, status = %d, numcols = %d\n", stmt->result, stmt->status, stmt->result != NULL ? QR_NumResultCols(stmt->result) : -1); if ( (NULL == stmt->result) || ((stmt->status != STMT_FINISHED) && (stmt->status != STMT_PREMATURE)) ) { stmt->errormsg = "Can't get column attributes: no result found."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } cols = QR_NumResultCols(stmt->result); /* Column Count is a special case. The Column number is ignored in this case. */ if (fDescType == SQL_COLUMN_COUNT) { if (pfDesc) *pfDesc = cols; return SQL_SUCCESS; } if (icol >= cols) { stmt->errornumber = STMT_INVALID_COLUMN_NUMBER_ERROR; stmt->errormsg = "Invalid column number in DescribeCol."; SC_log_error(func, "", stmt); return SQL_ERROR; } field_type = QR_get_field_type(stmt->result, icol); } mylog("colAttr: col %d field_type = %d\n", icol, field_type); switch(fDescType) { case SQL_COLUMN_AUTO_INCREMENT: value = pgtype_auto_increment(stmt, field_type); if (value == -1) /* non-numeric becomes FALSE (ODBC Doc) */ value = FALSE; break; case SQL_COLUMN_CASE_SENSITIVE: value = pgtype_case_sensitive(stmt, field_type); break; /* This special case is handled above. case SQL_COLUMN_COUNT: */ case SQL_COLUMN_DISPLAY_SIZE: value = (parse_ok) ? stmt->fi[icol]->display_size : pgtype_display_size(stmt, field_type, icol, unknown_sizes); mylog("SQLColAttributes: col %d, display_size= %d\n", icol, value); break; case SQL_COLUMN_LABEL: if (parse_ok && stmt->fi[icol]->alias[0] != '\0') { p = stmt->fi[icol]->alias; mylog("SQLColAttr: COLUMN_LABEL = '%s'\n", p); break; } /*// otherwise same as column name -- FALL THROUGH!!! */ case SQL_COLUMN_NAME: p = (parse_ok) ? stmt->fi[icol]->name : QR_get_fieldname(stmt->result, icol); mylog("SQLColAttr: COLUMN_NAME = '%s'\n", p); break; case SQL_COLUMN_LENGTH: value = (parse_ok) ? stmt->fi[icol]->length : pgtype_length(stmt, field_type, icol, unknown_sizes); mylog("SQLColAttributes: col %d, length = %d\n", icol, value); break; case SQL_COLUMN_MONEY: value = pgtype_money(stmt, field_type); break; case SQL_COLUMN_NULLABLE: value = (parse_ok) ? stmt->fi[icol]->nullable : pgtype_nullable(stmt, field_type); break; case SQL_COLUMN_OWNER_NAME: p = ""; break; case SQL_COLUMN_PRECISION: value = (parse_ok) ? stmt->fi[icol]->precision : pgtype_precision(stmt, field_type, icol, unknown_sizes); mylog("SQLColAttributes: col %d, precision = %d\n", icol, value); break; case SQL_COLUMN_QUALIFIER_NAME: p = ""; break; case SQL_COLUMN_SCALE: value = pgtype_scale(stmt, field_type); break; case SQL_COLUMN_SEARCHABLE: value = pgtype_searchable(stmt, field_type); break; case SQL_COLUMN_TABLE_NAME: p = (parse_ok && stmt->fi[icol]->ti) ? stmt->fi[icol]->ti->name : ""; mylog("SQLColAttr: TABLE_NAME = '%s'\n", p); break; case SQL_COLUMN_TYPE: value = pgtype_to_sqltype(stmt, field_type); break; case SQL_COLUMN_TYPE_NAME: p = pgtype_to_name(stmt, field_type); break; case SQL_COLUMN_UNSIGNED: value = pgtype_unsigned(stmt, field_type); if(value == -1) /* non-numeric becomes TRUE (ODBC Doc) */ value = TRUE; break; case SQL_COLUMN_UPDATABLE: /* Neither Access or Borland care about this. if (field_type == PG_TYPE_OID) *pfDesc = SQL_ATTR_READONLY; else */ value = SQL_ATTR_WRITE; mylog("SQLColAttr: UPDATEABLE = %d\n", value); break; } result = SQL_SUCCESS; if (p) { /* char/binary data */ len = strlen(p); if (rgbDesc) { strncpy_null((char *)rgbDesc, p, (size_t)cbDescMax); if (len >= cbDescMax) { result = SQL_SUCCESS_WITH_INFO; stmt->errornumber = STMT_TRUNCATED; stmt->errormsg = "The buffer was too small for the result."; } } if (pcbDesc) *pcbDesc = len; } else { /* numeric data */ if (pfDesc) *pfDesc = value; } return result; } /*// Returns result data for a single column in the current row. */ RETCODE SQL_API PG__SQLGetData( HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue) { static char *func="SQLGetData"; QResultClass *res; StatementClass *stmt = (StatementClass *) hstmt; int num_cols, num_rows; Int4 field_type; void *value; int result; char get_bookmark = FALSE; mylog("SQLGetData: enter, stmt=%u\n", stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } res = stmt->result; if (STMT_EXECUTING == stmt->status) { stmt->errormsg = "Can't get data while statement is still executing."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->status != STMT_FINISHED) { stmt->errornumber = STMT_STATUS_ERROR; stmt->errormsg = "GetData can only be called after the successful execution on a SQL statement"; SC_log_error(func, "", stmt); return SQL_ERROR; } if (icol == 0) { if (stmt->options.use_bookmarks == SQL_UB_OFF) { stmt->errornumber = STMT_COLNUM_ERROR; stmt->errormsg = "Attempt to retrieve bookmark with bookmark usage disabled"; SC_log_error(func, "", stmt); return SQL_ERROR; } /* Make sure it is the bookmark data type */ if (fCType != SQL_C_BOOKMARK && fCType != SQL_C_BINARY) { stmt->errormsg = "Column 0 is not of type SQL_C_BOOKMARK"; stmt->errornumber = STMT_PROGRAM_TYPE_OUT_OF_RANGE; SC_log_error(func, "", stmt); return SQL_ERROR; } get_bookmark = TRUE; } else { /*// use zero-based column numbers */ icol--; /*// make sure the column number is valid */ num_cols = QR_NumResultCols(res); if (icol >= num_cols) { stmt->errormsg = "Invalid column number."; stmt->errornumber = STMT_INVALID_COLUMN_NUMBER_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } } field_type = QR_get_field_type(res, icol); if ( stmt->manual_result || ! globals.use_declarefetch) { /*// make sure we're positioned on a valid row */ num_rows = QR_get_num_tuples(res); if((stmt->currTuple < 0) || (stmt->currTuple >= num_rows)) { stmt->errormsg = "Not positioned on a valid row for GetData."; stmt->errornumber = STMT_INVALID_CURSOR_STATE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } mylog(" num_rows = %d\n", num_rows); if ( ! get_bookmark) { if ( stmt->manual_result) { value = QR_get_value_manual(res, stmt->currTuple, icol); } else { value = QR_get_value_backend_row(res, stmt->currTuple, icol); } mylog(" value = '%s'\n", value); } /* BEGIN - This gets rid of dot prefix on, table names, in StarOffice (see also OWNER_USAGE) */ if ( field_type == PG_TYPE_TEXT && value != NULL ) { if ( *(char*)value == '\0' ) { value = NULL; } } /* END - Peter Harvey, Christian Kirsch */ } else { /* its a SOCKET result (backend data) */ if (stmt->currTuple == -1 || ! res || ! res->tupleField) { stmt->errormsg = "Not positioned on a valid row for GetData."; stmt->errornumber = STMT_INVALID_CURSOR_STATE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } if ( ! get_bookmark) value = QR_get_value_backend(res, icol); mylog(" socket: value = '%s'\n", value); } if ( get_bookmark) { *((UDWORD *) rgbValue) = SC_get_bookmark(stmt); if (pcbValue) *pcbValue = 4; return SQL_SUCCESS; } field_type = QR_get_field_type(res, icol); mylog("**** SQLGetData: icol = %d, fCType = %d, field_type = %d, value = '%s'\n", icol, fCType, field_type, value); stmt->current_col = icol; result = copy_and_convert_field(stmt, field_type, value, fCType, rgbValue, cbValueMax, pcbValue); stmt->current_col = -1; switch(result) { case COPY_OK: return SQL_SUCCESS; case COPY_UNSUPPORTED_TYPE: stmt->errormsg = "Received an unsupported type from Postgres."; stmt->errornumber = STMT_RESTRICTED_DATA_TYPE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; case COPY_UNSUPPORTED_CONVERSION: stmt->errormsg = "Couldn't handle the necessary data type conversion."; stmt->errornumber = STMT_RESTRICTED_DATA_TYPE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; case COPY_RESULT_TRUNCATED: stmt->errornumber = STMT_TRUNCATED; stmt->errormsg = "The buffer was too small for the result."; return SQL_SUCCESS_WITH_INFO; case COPY_GENERAL_ERROR: /* error msg already filled in */ SC_log_error(func, "", stmt); return SQL_ERROR; case COPY_NO_DATA_FOUND: /* SC_log_error(func, "no data found", stmt); */ return SQL_NO_DATA_FOUND; default: stmt->errormsg = "Unrecognized return value from copy_and_convert_field."; stmt->errornumber = STMT_INTERNAL_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } } SQLRETURN SQLGetData(SQLHSTMT hstmt, SQLUSMALLINT icol, SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue) { return PG__SQLGetData( hstmt, icol, fCType, rgbValue, cbValueMax, pcbValue ); } /*// Returns data for bound columns in the current row ("hstmt->iCursor"), */ /*// advances the cursor. */ RETCODE SQL_API PG__SQLFetch( HSTMT hstmt) { static char *func = "SQLFetch"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; mylog("SQLFetch: stmt = %u, stmt->result= %u\n", stmt, stmt->result); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } SC_clear_error(stmt); if ( ! (res = stmt->result)) { stmt->errormsg = "Null statement result in SQLFetch."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } /* Not allowed to bind a bookmark column when using SQLFetch. */ if ( stmt->bookmark.buffer) { stmt->errornumber = STMT_COLNUM_ERROR; stmt->errormsg = "Not allowed to bind a bookmark column when using SQLFetch"; SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->status == STMT_EXECUTING) { stmt->errormsg = "Can't fetch while statement is still executing."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->status != STMT_FINISHED) { stmt->errornumber = STMT_STATUS_ERROR; stmt->errormsg = "Fetch can only be called after the successful execution on a SQL statement"; SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->bindings == NULL) { /*// just to avoid a crash if the user insists on calling this */ /*// function even if SQL_ExecDirect has reported an Error */ stmt->errormsg = "Bindings were not allocated properly."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } QR_set_rowset_size(res, 1); QR_inc_base(res, stmt->last_fetch_count); return SC_fetch(stmt); } RETCODE SQL_API SQLFetch(HSTMT hstmt ) { return PG__SQLFetch( hstmt ); } /*// This fetchs a block of data (rowset). */ RETCODE SQL_API PG__SQLExtendedFetch( HSTMT hstmt, UWORD fFetchType, SDWORD irow, UDWORD FAR *pcrow, UWORD FAR *rgfRowStatus) { static char *func = "SQLExtendedFetch"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; int num_tuples, i, save_rowset_size; RETCODE result; char truncated, error; mylog("SQLExtendedFetch: stmt=%u\n", stmt); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if ( globals.use_declarefetch && ! stmt->manual_result) { if ( fFetchType != SQL_FETCH_NEXT) { stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR; stmt->errormsg = "Unsupported fetch type for SQLExtendedFetch with UseDeclareFetch option."; return SQL_ERROR; } } SC_clear_error(stmt); if ( ! (res = stmt->result)) { stmt->errormsg = "Null statement result in SQLExtendedFetch."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } /* If a bookmark colunmn is bound but bookmark usage is off, then error */ if (stmt->bookmark.buffer && stmt->options.use_bookmarks == SQL_UB_OFF) { stmt->errornumber = STMT_COLNUM_ERROR; stmt->errormsg = "Attempt to retrieve bookmark with bookmark usage disabled"; SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->status == STMT_EXECUTING) { stmt->errormsg = "Can't fetch while statement is still executing."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->status != STMT_FINISHED) { stmt->errornumber = STMT_STATUS_ERROR; stmt->errormsg = "ExtendedFetch can only be called after the successful execution on a SQL statement"; SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->bindings == NULL) { /*// just to avoid a crash if the user insists on calling this */ /*// function even if SQL_ExecDirect has reported an Error */ stmt->errormsg = "Bindings were not allocated properly."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } /* Initialize to no rows fetched */ if (rgfRowStatus) for (i = 0; i < stmt->options.rowset_size; i++) *(rgfRowStatus + i) = SQL_ROW_NOROW; if (pcrow) *pcrow = 0; num_tuples = QR_get_num_tuples(res); /* Save and discard the saved rowset size */ save_rowset_size = stmt->save_rowset_size; stmt->save_rowset_size = -1; switch (fFetchType) { case SQL_FETCH_NEXT: /* From the odbc spec... If positioned before the start of the RESULT SET, then this should be equivalent to SQL_FETCH_FIRST. */ if (stmt->rowset_start < 0) stmt->rowset_start = 0; else { stmt->rowset_start += (save_rowset_size > 0 ? save_rowset_size : stmt->options.rowset_size); } mylog("SQL_FETCH_NEXT: num_tuples=%d, currtuple=%d\n", num_tuples, stmt->currTuple); break; case SQL_FETCH_PRIOR: mylog("SQL_FETCH_PRIOR: num_tuples=%d, currtuple=%d\n", num_tuples, stmt->currTuple); /* From the odbc spec... If positioned after the end of the RESULT SET, then this should be equivalent to SQL_FETCH_LAST. */ if (stmt->rowset_start >= num_tuples) { stmt->rowset_start = num_tuples <= 0 ? 0 : (num_tuples - stmt->options.rowset_size); } else { stmt->rowset_start -= stmt->options.rowset_size; } break; case SQL_FETCH_FIRST: mylog("SQL_FETCH_FIRST: num_tuples=%d, currtuple=%d\n", num_tuples, stmt->currTuple); stmt->rowset_start = 0; break; case SQL_FETCH_LAST: mylog("SQL_FETCH_LAST: num_tuples=%d, currtuple=%d\n", num_tuples, stmt->currTuple); stmt->rowset_start = num_tuples <= 0 ? 0 : (num_tuples - stmt->options.rowset_size) ; break; case SQL_FETCH_ABSOLUTE: mylog("SQL_FETCH_ABSOLUTE: num_tuples=%d, currtuple=%d, irow=%d\n", num_tuples, stmt->currTuple, irow); /* Position before result set, but dont fetch anything */ if (irow == 0) { stmt->rowset_start = -1; stmt->currTuple = -1; return SQL_NO_DATA_FOUND; } /* Position before the desired row */ else if (irow > 0) { stmt->rowset_start = irow - 1; } /* Position with respect to the end of the result set */ else { stmt->rowset_start = num_tuples + irow; } break; case SQL_FETCH_RELATIVE: /* Refresh the current rowset -- not currently implemented, but lie anyway */ if (irow == 0) { break; } stmt->rowset_start += irow; break; case SQL_FETCH_BOOKMARK: stmt->rowset_start = irow - 1; break; default: SC_log_error(func, "Unsupported SQLExtendedFetch Direction", stmt); return SQL_ERROR; } /***********************************/ /* CHECK FOR PROPER CURSOR STATE */ /***********************************/ /* Handle Declare Fetch style specially because the end is not really the end... */ if ( globals.use_declarefetch && ! stmt->manual_result) { if (QR_end_tuples(res)) { return SQL_NO_DATA_FOUND; } } else { /* If *new* rowset is after the result_set, return no data found */ if (stmt->rowset_start >= num_tuples) { stmt->rowset_start = num_tuples; return SQL_NO_DATA_FOUND; } } /* If *new* rowset is prior to result_set, return no data found */ if (stmt->rowset_start < 0) { if (stmt->rowset_start + stmt->options.rowset_size <= 0) { stmt->rowset_start = -1; return SQL_NO_DATA_FOUND; } else { /* overlap with beginning of result set, so get first rowset */ stmt->rowset_start = 0; } } /* currTuple is always 1 row prior to the rowset */ stmt->currTuple = stmt->rowset_start - 1; /* increment the base row in the tuple cache */ QR_set_rowset_size(res, stmt->options.rowset_size); QR_inc_base(res, stmt->last_fetch_count); /* Physical Row advancement occurs for each row fetched below */ mylog("SQLExtendedFetch: new currTuple = %d\n", stmt->currTuple); truncated = error = FALSE; for (i = 0; i < stmt->options.rowset_size; i++) { stmt->bind_row = i; /*// set the binding location */ result = SC_fetch(stmt); /* Determine Function status */ if (result == SQL_NO_DATA_FOUND) break; else if (result == SQL_SUCCESS_WITH_INFO) truncated = TRUE; else if (result == SQL_ERROR) error = TRUE; /* Determine Row Status */ if (rgfRowStatus) { if (result == SQL_ERROR) *(rgfRowStatus + i) = SQL_ROW_ERROR; else *(rgfRowStatus + i)= SQL_ROW_SUCCESS; } } /* Save the fetch count for SQLSetPos */ stmt->last_fetch_count= i; /* Reset next binding row */ stmt->bind_row = 0; /* Move the cursor position to the first row in the result set. */ stmt->currTuple = stmt->rowset_start; /* For declare/fetch, need to reset cursor to beginning of rowset */ if (globals.use_declarefetch && ! stmt->manual_result) { QR_set_position(res, 0); } /* Set the number of rows retrieved */ if (pcrow) *pcrow = i; if (i == 0) return SQL_NO_DATA_FOUND; /* Only DeclareFetch should wind up here */ else if (error) return SQL_ERROR; else if (truncated) return SQL_SUCCESS_WITH_INFO; else return SQL_SUCCESS; } SQLRETURN SQLExtendedFetch( SQLHSTMT hstmt, SQLUSMALLINT fFetchType, SQLLEN irow, SQLULEN *pcrow, SQLUSMALLINT *rgfRowStatus) { return PG__SQLExtendedFetch( hstmt, fFetchType, irow, (UDWORD FAR*)pcrow, rgfRowStatus ); } /*// This determines whether there are more results sets available for */ /*// the "hstmt". */ /* CC: return SQL_NO_DATA_FOUND since we do not support multiple result sets */ RETCODE SQL_API SQLMoreResults( HSTMT hstmt) { return SQL_NO_DATA_FOUND; } /*// This positions the cursor within a rowset, that was positioned using SQLExtendedFetch. */ /*// This will be useful (so far) only when using SQLGetData after SQLExtendedFetch. */ RETCODE SQL_API SQLSetPos( HSTMT hstmt, SQLSETPOSIROW irow, UWORD fOption, UWORD fLock) { static char *func = "SQLSetPos"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; int num_cols, i; BindInfoClass *bindings = stmt->bindings; if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if (fOption != SQL_POSITION && fOption != SQL_REFRESH) { stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR; stmt->errormsg = "Only SQL_POSITION/REFRESH is supported for SQLSetPos"; SC_log_error(func, "", stmt); return SQL_ERROR; } if ( ! (res = stmt->result)) { stmt->errormsg = "Null statement result in SQLSetPos."; stmt->errornumber = STMT_SEQUENCE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } num_cols = QR_NumResultCols(res); if (irow == 0) { stmt->errornumber = STMT_ROW_OUT_OF_RANGE; stmt->errormsg = "Driver does not support Bulk operations."; SC_log_error(func, "", stmt); return SQL_ERROR; } if (irow > stmt->last_fetch_count) { stmt->errornumber = STMT_ROW_OUT_OF_RANGE; stmt->errormsg = "Row value out of range"; SC_log_error(func, "", stmt); return SQL_ERROR; } irow--; /* Reset for SQLGetData */ for (i = 0; i < num_cols; i++) bindings[i].data_left = -1; QR_set_position(res, irow); stmt->currTuple = stmt->rowset_start + irow; return SQL_SUCCESS; } /*// Sets options that control the behavior of cursors. */ SQLRETURN SQLSetScrollOptions( /* Use SQLSetStmtOptions */ SQLHSTMT hstmt, SQLUSMALLINT fConcurrency, SQLLEN crowKeyset, SQLUSMALLINT crowRowset) { static char *func = "SQLSetScrollOptions"; SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } /*// Set the cursor name on a statement handle */ RETCODE SQL_API SQLSetCursorName( HSTMT hstmt, UCHAR FAR *szCursor, SWORD cbCursor) { static char *func="SQLSetCursorName"; StatementClass *stmt = (StatementClass *) hstmt; int len; mylog("SQLSetCursorName: hstmt=%u, szCursor=%u, cbCursorMax=%d\n", hstmt, szCursor, cbCursor); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } len = (cbCursor == SQL_NTS) ? strlen((char*)szCursor) : cbCursor; if (len <= 0 || len > sizeof(stmt->cursor_name) - 1) { stmt->errornumber = STMT_INVALID_CURSOR_NAME; stmt->errormsg = "Invalid Cursor Name"; SC_log_error(func, "", stmt); return SQL_ERROR; } strncpy_null(stmt->cursor_name, (char*)szCursor, len+1); return SQL_SUCCESS; } /*// Return the cursor name for a statement handle */ RETCODE SQL_API SQLGetCursorName( HSTMT hstmt, UCHAR FAR *szCursor, SWORD cbCursorMax, SWORD FAR *pcbCursor) { static char *func="SQLGetCursorName"; StatementClass *stmt = (StatementClass *) hstmt; int len = 0; RETCODE result; mylog("SQLGetCursorName: hstmt=%u, szCursor=%u, cbCursorMax=%d, pcbCursor=%u\n", hstmt, szCursor, cbCursorMax, pcbCursor); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if ( stmt->cursor_name[0] == '\0') { stmt->errornumber = STMT_NO_CURSOR_NAME; stmt->errormsg = "No Cursor name available"; SC_log_error(func, "", stmt); return SQL_ERROR; } result = SQL_SUCCESS; len = strlen(stmt->cursor_name); if (szCursor) { strncpy_null((char*)szCursor, stmt->cursor_name, cbCursorMax); if (len >= cbCursorMax) { result = SQL_SUCCESS_WITH_INFO; stmt->errornumber = STMT_TRUNCATED; stmt->errormsg = "The buffer was too small for the result."; } } if (pcbCursor) *pcbCursor = len; return result; } unixODBC-2.2.14-p2/Drivers/PostgreSQL/socket.c0100644000076400007640000002073407624477631017300 0ustar nicknick /* Module: socket.c * * Description: This module contains functions for low level socket * operations (connecting/reading/writing to the backend) * * Classes: SocketClass (Functions prefix: "SOCK_") * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "socket.h" #ifndef WIN32 #ifndef VMS #include "sys/un.h" #endif #include #include /* for memset */ #endif extern GLOBAL_VALUES globals; #ifndef BOOL #define BOOL int #endif #ifndef TRUE #define TRUE (BOOL)1 #endif #ifndef FALSE #define FALSE (BOOL)0 #endif void SOCK_clear_error(SocketClass *self) { self->errornumber = 0; self->errormsg = NULL; } SocketClass * SOCK_Constructor() { SocketClass *rv; rv = (SocketClass *) malloc(sizeof(SocketClass)); if (rv != NULL) { rv->socket = (SOCKETFD) -1; rv->buffer_filled_in = 0; rv->buffer_filled_out = 0; rv->buffer_read_in = 0; rv->buffer_in = (unsigned char *) malloc(globals.socket_buffersize); if ( ! rv->buffer_in) return NULL; rv->buffer_out = (unsigned char *) malloc(globals.socket_buffersize); if ( ! rv->buffer_out) return NULL; rv->errormsg = NULL; rv->errornumber = 0; rv->reverse = FALSE; } return rv; } void SOCK_Destructor(SocketClass *self) { if (self->socket != -1) { SOCK_put_char(self, 'X'); SOCK_flush_output(self); if ( ! shutdown(self->socket, 2)) /* no sends or receives */ closesocket(self->socket); } if (self->buffer_in) free(self->buffer_in); if (self->buffer_out) free(self->buffer_out); free(self); } static char SOCK_connect_to_ip(SocketClass *self, unsigned short port, char *hostname) { struct hostent *host; struct sockaddr_in sadr; unsigned long iaddr; if (self->socket != -1) { self->errornumber = SOCKET_ALREADY_CONNECTED; self->errormsg = "Socket is already connected"; return 0; } memset((char *)&sadr, 0, sizeof(sadr)); /* If it is a valid IP address, use it. Otherwise use hostname lookup. */ iaddr = inet_addr(hostname); if (iaddr == INADDR_NONE) { host = gethostbyname(hostname); if (host == NULL) { self->errornumber = SOCKET_HOST_NOT_FOUND; self->errormsg = "Could not resolve hostname."; return 0; } memcpy(&(sadr.sin_addr), host->h_addr, host->h_length); } else memcpy(&(sadr.sin_addr), (struct in_addr *) &iaddr, sizeof(iaddr)); sadr.sin_family = AF_INET; sadr.sin_port = htons(port); self->socket = socket(AF_INET, SOCK_STREAM, 0); if (self->socket == -1) { self->errornumber = SOCKET_COULD_NOT_CREATE_SOCKET; self->errormsg = "Could not create Socket."; return 0; } if ( connect(self->socket, (struct sockaddr *)&(sadr), sizeof(sadr)) < 0) { self->errornumber = SOCKET_COULD_NOT_CONNECT; self->errormsg = "Could not connect to remote socket."; closesocket(self->socket); self->socket = (SOCKETFD) -1; return 0; } return 1; } #ifndef VMS char SOCK_connect_to_unix_port(SocketClass *self, unsigned short port, char *path ) { struct sockaddr_un sadr; if (self->socket != -1) { self->errornumber = SOCKET_ALREADY_CONNECTED; self->errormsg = "Socket is already connected"; return 0; } memset((char *)&sadr, 0, sizeof(sadr)); sadr.sun_family = AF_UNIX; sprintf( sadr.sun_path, "%s.%d", path, port ); self->socket = socket(AF_UNIX, SOCK_STREAM, 0); if (self->socket == -1) { self->errornumber = SOCKET_COULD_NOT_CREATE_SOCKET; self->errormsg = "Could not create Socket."; return 0; } if ( connect(self->socket, (struct sockaddr *)&(sadr), sizeof(sadr)) < 0) { self->errornumber = SOCKET_COULD_NOT_CONNECT; self->errormsg = "Could not connect to remote socket."; closesocket(self->socket); self->socket = (SOCKETFD) -1; return 0; } return 1; } /* * cope with different path for debian distrib */ SOCK_connect_to_unix(SocketClass *self, unsigned short port, char *path ) { if ( strlen( path ) > 0 ) { return !SOCK_connect_to_unix_port( self, port, path ); } if ( !SOCK_connect_to_unix_port( self, port, "/tmp/.s.PGSQL" )) { if ( SOCK_connect_to_unix_port( self, port, "/var/run/postgresql/.s.PGSQL" )) { SOCK_clear_error(self); return 1; } else { return 0; } } else { return 1; } } #endif char SOCK_connect_to(SocketClass *self, unsigned short port, char *hostname, char *uds) { #ifndef VMS if ( strcmp( hostname, "localhost" ) == 0 ) return SOCK_connect_to_unix( self, port, uds ); else #endif return SOCK_connect_to_ip( self, port, hostname ); } void SOCK_get_n_char(SocketClass *self, char *buffer, int len) { int lf; if ( ! buffer) { self->errornumber = SOCKET_NULLPOINTER_PARAMETER; self->errormsg = "get_n_char was called with NULL-Pointer"; return; } for(lf=0; lf < len; lf++) buffer[lf] = SOCK_get_next_byte(self); } void SOCK_put_n_char(SocketClass *self, char *buffer, int len) { int lf; if ( ! buffer) { self->errornumber = SOCKET_NULLPOINTER_PARAMETER; self->errormsg = "put_n_char was called with NULL-Pointer"; return; } for(lf=0; lf < len; lf++) SOCK_put_next_byte(self, (unsigned char)buffer[lf]); } /* bufsize must include room for the null terminator will read at most bufsize-1 characters + null. */ void SOCK_get_string(SocketClass *self, char *buffer, int bufsize) { register int lf = 0; for (lf = 0; lf < bufsize; lf++) if ( ! (buffer[lf] = SOCK_get_next_byte(self))) return; buffer[bufsize-1] = '\0'; } void SOCK_put_string(SocketClass *self, char *string) { register int lf; int len; len = strlen(string)+1; for(lf = 0; lf < len; lf++) SOCK_put_next_byte(self, (unsigned char)string[lf]); } int SOCK_get_int(SocketClass *self, short len) { char buf[4]; switch (len) { case 2: SOCK_get_n_char(self, buf, len); if (self->reverse) return *((unsigned short *) buf); else return ntohs( *((unsigned short *) buf) ); case 4: SOCK_get_n_char(self, buf, len); if (self->reverse) return *((unsigned int *) buf); else return ntohl( *((unsigned int *) buf) ); default: self->errornumber = SOCKET_GET_INT_WRONG_LENGTH; self->errormsg = "Cannot read ints of that length"; return 0; } } void SOCK_put_int(SocketClass *self, int value, short len) { unsigned int rv; switch (len) { case 2: rv = self->reverse ? value : htons( (unsigned short) value); SOCK_put_n_char(self, (char *) &rv, 2); return; case 4: rv = self->reverse ? value : htonl( (unsigned int) value); SOCK_put_n_char(self, (char *) &rv, 4); return; default: self->errornumber = SOCKET_PUT_INT_WRONG_LENGTH; self->errormsg = "Cannot write ints of that length"; return; } } void SOCK_flush_output(SocketClass *self) { int written; #ifdef MSG_NOSIGNAL written = send(self->socket, (char *)self->buffer_out, self->buffer_filled_out, MSG_NOSIGNAL); #else written = send(self->socket, (char *)self->buffer_out, self->buffer_filled_out, 0); #endif if (written != self->buffer_filled_out) { self->errornumber = SOCKET_WRITE_ERROR; self->errormsg = "Could not flush socket buffer."; } self->buffer_filled_out = 0; } int SOCK_get_next_byte(SocketClass *self) { if (self->buffer_read_in >= self->buffer_filled_in) { /*// there are no more bytes left in the buffer -> */ /*// reload the buffer */ self->buffer_read_in = 0; self->buffer_filled_in = recv(self->socket, (char *)self->buffer_in, globals.socket_buffersize, 0); mylog("read %d, global_socket_buffersize=%d\n", self->buffer_filled_in, globals.socket_buffersize); if (self->buffer_filled_in == -1) { self->errornumber = SOCKET_READ_ERROR; self->errormsg = "Error while reading from the socket."; self->buffer_filled_in = 0; } if (self->buffer_filled_in == 0) { self->errornumber = SOCKET_CLOSED; self->errormsg = "Socket has been closed."; self->buffer_filled_in = 0; } } return self->buffer_in[self->buffer_read_in++]; } void SOCK_put_next_byte(SocketClass *self, unsigned char next_byte) { int bytes_sent; self->buffer_out[self->buffer_filled_out++] = next_byte; if (self->buffer_filled_out == globals.socket_buffersize) { /*// buffer is full, so write it out */ bytes_sent = send(self->socket, (char *)self->buffer_out, globals.socket_buffersize, 0); if (bytes_sent != globals.socket_buffersize) { self->errornumber = SOCKET_WRITE_ERROR; self->errormsg = "Error while writing to the socket."; } self->buffer_filled_out = 0; } } unixODBC-2.2.14-p2/Drivers/PostgreSQL/statement.c0100644000076400007640000006003207410367416017777 0ustar nicknick /* Module: statement.c * * Description: This module contains functions related to creating * and manipulating a statement. * * Classes: StatementClass (Functions prefix: "SC_") * * API functions: SQLAllocStmt, SQLFreeStmt * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "statement.h" #include "bind.h" #include "connection.h" #include "qresult.h" #include "convert.h" #include "environ.h" #include #include #ifndef WIN32 #ifdef UNIXODBC #include #else #include "iodbc.h" #include "isql.h" #endif #else #include #include #endif extern GLOBAL_VALUES globals; #ifndef WIN32 #ifndef HAVE_STRICMP #define stricmp(s1,s2) strcasecmp(s1,s2) #define strnicmp(s1,s2,n) strncasecmp(s1,s2,n) #endif #endif /* Map sql commands to statement types */ static struct { int type; char *s; } Statement_Type[] = { { STMT_TYPE_SELECT, "SELECT" }, { STMT_TYPE_INSERT, "INSERT" }, { STMT_TYPE_UPDATE, "UPDATE" }, { STMT_TYPE_DELETE, "DELETE" }, { STMT_TYPE_CREATE, "CREATE" }, { STMT_TYPE_ALTER, "ALTER" }, { STMT_TYPE_DROP, "DROP" }, { STMT_TYPE_GRANT, "GRANT" }, { STMT_TYPE_REVOKE, "REVOKE" }, { 0, NULL } }; RETCODE SQL_API PG__SQLAllocStmt(HDBC hdbc, HSTMT FAR *phstmt) { static char *func="SQLAllocStmt"; ConnectionClass *conn = (ConnectionClass *) hdbc; StatementClass *stmt; mylog("%s: entering...\n", func); if( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt = SC_Constructor(); mylog("**** SQLAllocStmt: hdbc = %u, stmt = %u\n", hdbc, stmt); if ( ! stmt) { conn->errornumber = CONN_STMT_ALLOC_ERROR; conn->errormsg = "No more memory to allocate a further SQL-statement"; *phstmt = SQL_NULL_HSTMT; CC_log_error(func, "", conn); return SQL_ERROR; } if ( ! CC_add_statement(conn, stmt)) { conn->errormsg = "Maximum number of connections exceeded."; conn->errornumber = CONN_STMT_ALLOC_ERROR; CC_log_error(func, "", conn); SC_Destructor(stmt); *phstmt = SQL_NULL_HSTMT; return SQL_ERROR; } *phstmt = (HSTMT) stmt; /* Copy default statement options based from Connection options */ stmt->options = conn->stmtOptions; /* Save the handle for later */ stmt->phstmt = phstmt; return SQL_SUCCESS; } RETCODE SQL_API SQLAllocStmt(HDBC hdbc, HSTMT FAR *phstmt) { return PG__SQLAllocStmt( hdbc, phstmt ); } RETCODE SQL_API PG__SQLFreeStmt(HSTMT hstmt, UWORD fOption) { static char *func="SQLFreeStmt"; StatementClass *stmt = (StatementClass *) hstmt; mylog("%s: entering...hstmt=%u, fOption=%d\n", func, hstmt, fOption); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if (fOption == SQL_DROP) { ConnectionClass *conn = stmt->hdbc; /* Remove the statement from the connection's statement list */ if ( conn) { if ( ! CC_remove_statement(conn, stmt)) { stmt->errornumber = STMT_SEQUENCE_ERROR; stmt->errormsg = "Statement is currently executing a transaction."; SC_log_error(func, "", stmt); return SQL_ERROR; /* stmt may be executing a transaction */ } /* Free any cursors and discard any result info */ if (stmt->result) { QR_Destructor(stmt->result); stmt->result = NULL; } } /* Destroy the statement and free any results, cursors, etc. */ SC_Destructor(stmt); } else if (fOption == SQL_UNBIND) { SC_unbind_cols(stmt); } else if (fOption == SQL_CLOSE) { /* this should discard all the results, but leave the statement */ /* itself in place (it can be executed again) */ if (!SC_recycle_statement(stmt)) { /*// errormsg passed in above */ SC_log_error(func, "", stmt); return SQL_ERROR; } } else if(fOption == SQL_RESET_PARAMS) { SC_free_params(stmt, STMT_FREE_PARAMS_ALL); } else { stmt->errormsg = "Invalid option passed to SQLFreeStmt."; stmt->errornumber = STMT_OPTION_OUT_OF_RANGE_ERROR; SC_log_error(func, "", stmt); return SQL_ERROR; } return SQL_SUCCESS; } RETCODE SQL_API SQLFreeStmt(HSTMT hstmt, UWORD fOption) { return PG__SQLFreeStmt( hstmt, fOption ); } /********************************************************************** * StatementClass implementation */ void InitializeStatementOptions(StatementOptions *opt) { opt->maxRows = 0; /*// driver returns all rows */ opt->maxLength = 0; /*// driver returns all data for char/binary */ opt->rowset_size = 1; opt->keyset_size = 0; /*// fully keyset driven is the default */ opt->scroll_concurrency = SQL_CONCUR_READ_ONLY; opt->cursor_type = SQL_CURSOR_FORWARD_ONLY; opt->bind_size = 0; /* default is to bind by column */ opt->retrieve_data = SQL_RD_ON; opt->use_bookmarks = SQL_UB_OFF; } StatementClass * SC_Constructor(void) { StatementClass *rv; rv = (StatementClass *) malloc(sizeof(StatementClass)); if (rv) { rv->hdbc = NULL; /* no connection associated yet */ rv->phstmt = NULL; rv->result = NULL; rv->manual_result = FALSE; rv->prepare = FALSE; rv->status = STMT_ALLOCATED; rv->internal = FALSE; rv->errormsg = NULL; rv->errornumber = 0; rv->errormsg_created = FALSE; rv->statement = NULL; rv->stmt_with_params[0] = '\0'; rv->statement_type = STMT_TYPE_UNKNOWN; rv->bindings = NULL; rv->bindings_allocated = 0; rv->bookmark.buffer = NULL; rv->bookmark.used = NULL; rv->parameters_allocated = 0; rv->parameters = 0; rv->currTuple = -1; rv->rowset_start = -1; rv->current_col = -1; rv->bind_row = 0; rv->last_fetch_count = 0; rv->save_rowset_size = -1; rv->data_at_exec = -1; rv->current_exec_param = -1; rv->put_data = FALSE; rv->lobj_fd = -1; rv->cursor_name[0] = '\0'; /* Parse Stuff */ rv->ti = NULL; rv->fi = NULL; rv->ntab = 0; rv->nfld = 0; rv->parse_status = STMT_PARSE_NONE; /* Clear Statement Options -- defaults will be set in AllocStmt */ memset(&rv->options, 0, sizeof(StatementOptions)); } return rv; } char SC_Destructor(StatementClass *self) { mylog("SC_Destructor: self=%u, self->result=%u, self->hdbc=%u\n", self, self->result, self->hdbc); if (STMT_EXECUTING == self->status) { self->errornumber = STMT_SEQUENCE_ERROR; self->errormsg = "Statement is currently executing a transaction."; return FALSE; } if (self->result) { if ( ! self->hdbc) self->result->conn = NULL; /* prevent any dbase activity */ QR_Destructor(self->result); } if (self->statement) free(self->statement); SC_free_params(self, STMT_FREE_PARAMS_ALL); /* the memory pointed to by the bindings is not deallocated by the driver */ /* by by the application that uses that driver, so we don't have to care */ /* about that here. */ if (self->bindings) free(self->bindings); /* Free the parsed table information */ if (self->ti) { int i; for (i = 0; i < self->ntab; i++) { free(self->ti[i]); } free(self->ti); } /* Free the parsed field information */ if (self->fi) { int i; for (i = 0; i < self->nfld; i++) { free(self->fi[i]); } free(self->fi); } free(self); mylog("SC_Destructor: EXIT\n"); return TRUE; } /* Free parameters and free the memory from the data-at-execution parameters that was allocated in SQLPutData. */ void SC_free_params(StatementClass *self, char option) { int i; mylog("SC_free_params: ENTER, self=%d\n", self); if( ! self->parameters) return; for (i = 0; i < self->parameters_allocated; i++) { if (self->parameters[i].data_at_exec == TRUE) { if (self->parameters[i].EXEC_used) { free(self->parameters[i].EXEC_used); self->parameters[i].EXEC_used = NULL; } if (self->parameters[i].EXEC_buffer) { if (self->parameters[i].SQLType != SQL_LONGVARBINARY) free(self->parameters[i].EXEC_buffer); self->parameters[i].EXEC_buffer = NULL; } } } self->data_at_exec = -1; self->current_exec_param = -1; self->put_data = FALSE; if (option == STMT_FREE_PARAMS_ALL) { free(self->parameters); self->parameters = NULL; self->parameters_allocated = 0; } mylog("SC_free_params: EXIT\n"); } int statement_type(char *statement) { int i; for (i = 0; Statement_Type[i].s; i++) if ( ! strnicmp(statement, Statement_Type[i].s, strlen(Statement_Type[i].s))) return Statement_Type[i].type; return STMT_TYPE_OTHER; } /* Called from SQLPrepare if STMT_PREMATURE, or from SQLExecute if STMT_FINISHED, or from SQLFreeStmt(SQL_CLOSE) */ char SC_recycle_statement(StatementClass *self) { ConnectionClass *conn; mylog("recycle statement: self= %u\n", self); /* This would not happen */ if (self->status == STMT_EXECUTING) { self->errornumber = STMT_SEQUENCE_ERROR; self->errormsg = "Statement is currently executing a transaction."; return FALSE; } self->errormsg = NULL; self->errornumber = 0; self->errormsg_created = FALSE; switch (self->status) { case STMT_ALLOCATED: /* this statement does not need to be recycled */ return TRUE; case STMT_READY: break; case STMT_PREMATURE: /* Premature execution of the statement might have caused the start of a transaction. If so, we have to rollback that transaction. */ conn = SC_get_conn(self); if ( ! CC_is_in_autocommit(conn) && CC_is_in_trans(conn)) { CC_send_query(conn, "ABORT", NULL); CC_set_no_trans(conn); } break; case STMT_FINISHED: break; default: self->errormsg = "An internal error occured while recycling statements"; self->errornumber = STMT_INTERNAL_ERROR; return FALSE; } /* Free the parsed table information */ if (self->ti) { int i; for (i = 0; i < self->ntab; i++) { free(self->ti[i]); } free(self->ti); self->ti = NULL; self->ntab = 0; } /* Free the parsed field information */ if (self->fi) { int i; for (i = 0; i < self->nfld; i++) { free(self->fi[i]); } free(self->fi); self->fi = NULL; self->nfld = 0; } self->parse_status = STMT_PARSE_NONE; /* Free any cursors */ if (self->result) { QR_Destructor(self->result); self->result = NULL; } /****************************************************************/ /* Reset only parameters that have anything to do with results */ /****************************************************************/ self->status = STMT_READY; self->manual_result = FALSE; /*// very important */ self->currTuple = -1; self->rowset_start = -1; self->current_col = -1; self->bind_row = 0; self->last_fetch_count = 0; self->errormsg = NULL; self->errornumber = 0; self->errormsg_created = FALSE; self->lobj_fd = -1; /*// Free any data at exec params before the statement is executed */ /*// again. If not, then there will be a memory leak when */ /*// the next SQLParamData/SQLPutData is called. */ SC_free_params(self, STMT_FREE_PARAMS_DATA_AT_EXEC_ONLY); return TRUE; } /* Pre-execute a statement (SQLPrepare/SQLDescribeCol) */ void SC_pre_execute(StatementClass *self) { mylog("SC_pre_execute: status = %d\n", self->status); if (self->status == STMT_READY) { mylog(" preprocess: status = READY\n"); PG__SQLExecute( (HSTMT)self); if (self->status == STMT_FINISHED) { mylog(" preprocess: after status = FINISHED, so set PREMATURE\n"); self->status = STMT_PREMATURE; } } } /* This is only called from SQLFreeStmt(SQL_UNBIND) */ char SC_unbind_cols(StatementClass *self) { Int2 lf; for(lf = 0; lf < self->bindings_allocated; lf++) { self->bindings[lf].data_left = -1; self->bindings[lf].buflen = 0; self->bindings[lf].buffer = NULL; self->bindings[lf].used = NULL; self->bindings[lf].returntype = SQL_C_CHAR; } self->bookmark.buffer = NULL; self->bookmark.used = NULL; return 1; } void SC_clear_error(StatementClass *self) { self->errornumber = 0; self->errormsg = NULL; self->errormsg_created = FALSE; } /*// This function creates an error msg which is the concatenation */ /*// of the result, statement, connection, and socket messages. */ char * SC_create_errormsg(StatementClass *self) { QResultClass *res = self->result; ConnectionClass *conn = self->hdbc; int pos; static char msg[4096]; msg[0] = '\0'; if (res && res->message) strcpy(msg, res->message); else if (self->errormsg) strcpy(msg, self->errormsg); if (conn) { SocketClass *sock = conn->sock; if (conn->errormsg && conn->errormsg[0] != '\0') { pos = strlen(msg); sprintf(&msg[pos], ";\n%s", conn->errormsg); } if (sock && sock->errormsg && sock->errormsg[0] != '\0') { pos = strlen(msg); sprintf(&msg[pos], ";\n%s", sock->errormsg); } } return msg; } char SC_get_error(StatementClass *self, int *number, char **message) { char rv; /*// Create a very informative errormsg if it hasn't been done yet. */ if ( ! self->errormsg_created) { self->errormsg = SC_create_errormsg(self); self->errormsg_created = TRUE; } if ( self->errornumber) { *number = self->errornumber; *message = self->errormsg; self->errormsg = NULL; } rv = (self->errornumber != 0); self->errornumber = 0; return rv; } /* Currently, the driver offers very simple bookmark support -- it is just the current row number. But it could be more sophisticated someday, such as mapping a key to a 32 bit value */ unsigned long SC_get_bookmark(StatementClass *self) { return (self->currTuple + 1); } RETCODE SC_fetch(StatementClass *self) { static char *func = "SC_fetch"; QResultClass *res = self->result; int retval, result; Int2 num_cols, lf; Oid type; char *value; ColumnInfoClass *ci; /*// TupleField *tupleField; */ self->last_fetch_count = 0; ci = QR_get_fields(res); /* the column info */ mylog("manual_result = %d, use_declarefetch = %d\n", self->manual_result, globals.use_declarefetch); if ( self->manual_result || ! globals.use_declarefetch) { if (self->currTuple >= QR_get_num_tuples(res) -1 || (self->options.maxRows > 0 && self->currTuple == self->options.maxRows - 1)) { /* if at the end of the tuples, return "no data found" and set the cursor past the end of the result set */ self->currTuple = QR_get_num_tuples(res); return SQL_NO_DATA_FOUND; } mylog("**** SQLFetch: manual_result\n"); (self->currTuple)++; } else { /*// read from the cache or the physical next tuple */ retval = QR_next_tuple(res); if (retval < 0) { mylog("**** SQLFetch: end_tuples\n"); return SQL_NO_DATA_FOUND; } else if (retval > 0) (self->currTuple)++; /*// all is well */ else { mylog("SQLFetch: error\n"); self->errornumber = STMT_EXEC_ERROR; self->errormsg = "Error fetching next row"; SC_log_error(func, "", self); return SQL_ERROR; } } num_cols = QR_NumResultCols(res); result = SQL_SUCCESS; self->last_fetch_count = 1; /* If the bookmark column was bound then return a bookmark. Since this is used with SQLExtendedFetch, and the rowset size may be greater than 1, and an application can use row or column wise binding, use the code in copy_and_convert_field() to handle that. */ if (self->bookmark.buffer) { char buf[32]; sprintf(buf, "%ld", SC_get_bookmark(self)); result = copy_and_convert_field(self, 0, buf, SQL_C_ULONG, self->bookmark.buffer, 0, self->bookmark.used); } for (lf=0; lf < num_cols; lf++) { mylog("fetch: cols=%d, lf=%d, self = %u, self->bindings = %u, buffer[] = %u\n", num_cols, lf, self, self->bindings, self->bindings[lf].buffer); /* reset for SQLGetData */ self->bindings[lf].data_left = -1; if (self->bindings[lf].buffer != NULL) { /*// this column has a binding */ /*// type = QR_get_field_type(res, lf); */ type = CI_get_oid(ci, lf); /* speed things up */ mylog("type = %d\n", type); if (self->manual_result) { value = QR_get_value_manual(res, self->currTuple, lf); mylog("manual_result\n"); } else if (globals.use_declarefetch) value = QR_get_value_backend(res, lf); else { value = QR_get_value_backend_row(res, self->currTuple, lf); } mylog("value = '%s'\n", (value==NULL)?"":value); retval = copy_and_convert_field_bindinfo(self, type, value, lf); mylog("copy_and_convert: retval = %d\n", retval); switch(retval) { case COPY_OK: break; /* OK, do next bound column */ case COPY_UNSUPPORTED_TYPE: self->errormsg = "Received an unsupported type from Postgres."; self->errornumber = STMT_RESTRICTED_DATA_TYPE_ERROR; SC_log_error(func, "", self); result = SQL_ERROR; break; case COPY_UNSUPPORTED_CONVERSION: self->errormsg = "Couldn't handle the necessary data type conversion."; self->errornumber = STMT_RESTRICTED_DATA_TYPE_ERROR; SC_log_error(func, "", self); result = SQL_ERROR; break; case COPY_RESULT_TRUNCATED: self->errornumber = STMT_TRUNCATED; self->errormsg = "The buffer was too small for the result."; result = SQL_SUCCESS_WITH_INFO; break; case COPY_GENERAL_ERROR: /* error msg already filled in */ SC_log_error(func, "", self); result = SQL_ERROR; break; /* This would not be meaningful in SQLFetch. */ case COPY_NO_DATA_FOUND: break; default: self->errormsg = "Unrecognized return value from copy_and_convert_field."; self->errornumber = STMT_INTERNAL_ERROR; SC_log_error(func, "", self); result = SQL_ERROR; break; } } } return result; } RETCODE SC_execute(StatementClass *self) { static char *func="SC_execute"; ConnectionClass *conn; QResultClass *res; char ok, was_ok, was_nonfatal; Int2 oldstatus, numcols; QueryInfo qi; conn = SC_get_conn(self); /* Begin a transaction if one is not already in progress */ /* The reason is because we can't use declare/fetch cursors without starting a transaction first. */ if ( ! self->internal && ! CC_is_in_trans(conn) && (globals.use_declarefetch || STMT_UPDATE(self))) { mylog(" about to begin a transaction on statement = %u\n", self); res = CC_send_query(conn, "BEGIN", NULL); if ( ! res) { self->errormsg = "Could not begin a transaction"; self->errornumber = STMT_EXEC_ERROR; SC_log_error(func, "", self); return SQL_ERROR; } ok = QR_command_successful(res); mylog("SQLExecute: ok = %d, status = %d\n", ok, QR_get_status(res)); QR_Destructor(res); if (!ok) { self->errormsg = "Could not begin a transaction"; self->errornumber = STMT_EXEC_ERROR; SC_log_error(func, "", self); return SQL_ERROR; } else CC_set_in_trans(conn); } oldstatus = conn->status; conn->status = CONN_EXECUTING; self->status = STMT_EXECUTING; /*// If its a SELECT statement, use a cursor. */ /*// Note that the declare cursor has already been prepended to the statement */ /*// in copy_statement... */ if (self->statement_type == STMT_TYPE_SELECT) { char fetch[128]; mylog(" Sending SELECT statement on stmt=%u, cursor_name='%s'\n", self, self->cursor_name); /* send the declare/select */ self->result = CC_send_query(conn, self->stmt_with_params, NULL); if (globals.use_declarefetch && self->result != NULL) { QR_Destructor(self->result); /* That worked, so now send the fetch to start getting data back */ qi.result_in = NULL; qi.cursor = self->cursor_name; qi.row_size = globals.fetch_max; /* Most likely the rowset size will not be set by the application until after the statement is executed, so might as well use the cache size. The qr_next_tuple() function will correct for any discrepancies in sizes and adjust the cache accordingly. */ sprintf(fetch, "fetch %d in %s", qi.row_size, self->cursor_name); self->result = CC_send_query( conn, fetch, &qi); } mylog(" done sending the query:\n"); } else { /*// not a SELECT statement so don't use a cursor */ mylog(" its NOT a select statement: stmt=%u\n", self); self->result = CC_send_query(conn, self->stmt_with_params, NULL); /*// If we are in autocommit, we must send the commit. */ if ( ! self->internal && CC_is_in_autocommit(conn) && STMT_UPDATE(self)) { res = CC_send_query(conn, "COMMIT", NULL); QR_Destructor(res); CC_set_no_trans(conn); } } conn->status = oldstatus; self->status = STMT_FINISHED; /* Check the status of the result */ if (self->result) { was_ok = QR_command_successful(self->result); was_nonfatal = QR_command_nonfatal(self->result); if ( was_ok) self->errornumber = STMT_OK; else self->errornumber = was_nonfatal ? STMT_INFO_ONLY : STMT_ERROR_TAKEN_FROM_BACKEND; self->currTuple = -1; /* set cursor before the first tuple in the list */ self->current_col = -1; self->rowset_start = -1; /* see if the query did return any result columns */ numcols = QR_NumResultCols(self->result); /* now allocate the array to hold the binding info */ if (numcols > 0) { extend_bindings(self, numcols); if (self->bindings == NULL) { self->errornumber = STMT_NO_MEMORY_ERROR; self->errormsg = "Could not get enough free memory to store the binding information"; SC_log_error(func, "", self); return SQL_ERROR; } } } else { /* Bad Error -- The error message will be in the Connection */ if (self->statement_type == STMT_TYPE_CREATE) { self->errornumber = STMT_CREATE_TABLE_ERROR; self->errormsg = "Error creating the table"; /* This would allow the table to already exists, thus appending rows to it. BUT, if the table didn't have the same attributes, it would fail. return SQL_SUCCESS_WITH_INFO; */ } else { self->errornumber = STMT_EXEC_ERROR; self->errormsg = "Error while executing the query"; } if ( ! self->internal) CC_abort(conn); } if (self->errornumber == STMT_OK) return SQL_SUCCESS; else if (self->errornumber == STMT_INFO_ONLY) return SQL_SUCCESS_WITH_INFO; else { SC_log_error(func, "", self); return SQL_ERROR; } } void SC_log_error(char *func, char *desc, StatementClass *self) { if (self) { qlog("STATEMENT ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->errornumber, self->errormsg); mylog("STATEMENT ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->errornumber, self->errormsg); qlog(" ------------------------------------------------------------\n"); qlog(" hdbc=%u, stmt=%u, result=%u\n", self->hdbc, self, self->result); qlog(" manual_result=%d, prepare=%d, internal=%d\n", self->manual_result, self->prepare, self->internal); qlog(" bindings=%u, bindings_allocated=%d\n", self->bindings, self->bindings_allocated); qlog(" parameters=%u, parameters_allocated=%d\n", self->parameters, self->parameters_allocated); qlog(" statement_type=%d, statement='%s'\n", self->statement_type, self->statement); qlog(" stmt_with_params='%s'\n", self->stmt_with_params); qlog(" data_at_exec=%d, current_exec_param=%d, put_data=%d\n", self->data_at_exec, self->current_exec_param, self->put_data); qlog(" currTuple=%d, current_col=%d, lobj_fd=%d\n", self->currTuple, self->current_col, self->lobj_fd); qlog(" maxRows=%d, rowset_size=%d, keyset_size=%d, cursor_type=%d, scroll_concurrency=%d\n", self->options.maxRows, self->options.rowset_size, self->options.keyset_size, self->options.cursor_type, self->options.scroll_concurrency); qlog(" cursor_name='%s'\n", self->cursor_name); qlog(" ----------------QResult Info -------------------------------\n"); if (self->result) { QResultClass *res = self->result; qlog(" fields=%u, manual_tuples=%u, backend_tuples=%u, tupleField=%d, conn=%u\n", res->fields, res->manual_tuples, res->backend_tuples, res->tupleField, res->conn); qlog(" fetch_count=%d, fcount=%d, num_fields=%d, cursor='%s'\n", res->fetch_count, res->fcount, res->num_fields, res->cursor); qlog(" message='%s', command='%s', notice='%s'\n", res->message, res->command, res->notice); qlog(" status=%d, inTuples=%d\n", res->status, res->inTuples); } /*// Log the connection error if there is one */ CC_log_error(func, desc, self->hdbc); } else qlog("INVALID STATEMENT HANDLE ERROR: func=%s, desc='%s'\n", func, desc); } unixODBC-2.2.14-p2/Drivers/PostgreSQL/tuple.c0100644000076400007640000000254407363332153017125 0ustar nicknick /* Module: tuple.c * * Description: This module contains functions for setting the data for individual * fields (TupleField structure) of a manual result set. * * Important Note: These functions are ONLY used in building manual result sets for * info functions (SQLTables, SQLColumns, etc.) * * Classes: n/a * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include "tuple.h" #include #include void set_tuplefield_null(TupleField *tuple_field) { tuple_field->len = 0; tuple_field->value = NULL; /*// strdup(""); */ } void set_tuplefield_string(TupleField *tuple_field, char *string) { tuple_field->len = strlen(string); tuple_field->value = malloc(strlen(string)+1); strcpy(tuple_field->value, string); } void set_tuplefield_int2(TupleField *tuple_field, Int2 value) { char buffer[10]; sprintf(buffer,"%d", value); tuple_field->len = strlen(buffer)+1; /* +1 ... is this correct (better be on the save side-...) */ tuple_field->value = strdup(buffer); } void set_tuplefield_int4(TupleField *tuple_field, Int4 value) { char buffer[15]; sprintf(buffer,"%ld", value); tuple_field->len = strlen(buffer)+1; /* +1 ... is this correct (better be on the save side-...) */ tuple_field->value = strdup(buffer); } unixODBC-2.2.14-p2/Drivers/PostgreSQL/tuplelist.c0100644000076400007640000001111107363332153020007 0ustar nicknick /* Module: tuplelist.c * * Description: This module contains functions for creating a manual result set * (the TupleList) and retrieving data from it for a specific row/column. * * Classes: TupleListClass (Functions prefix: "TL_") * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_MALLOC_H #include #elif HAVE_SYS_MALLOC_H #include #endif #include "tuplelist.h" #include "tuple.h" TupleListClass * TL_Constructor(UInt4 fieldcnt) { TupleListClass *rv; mylog("in TL_Constructor\n"); rv = (TupleListClass *) malloc(sizeof(TupleListClass)); if (rv) { rv->num_fields = fieldcnt; rv->num_tuples = 0; rv->list_start = NULL; rv->list_end = NULL; rv->lastref = NULL; rv->last_indexed = -1; } mylog("exit TL_Constructor\n"); return rv; } void TL_Destructor(TupleListClass *self) { int lf; TupleNode *node, *tp; mylog("TupleList: in DESTRUCTOR\n"); node = self->list_start; while(node != NULL) { for (lf=0; lf < self->num_fields; lf++) if (node->tuple[lf].value != NULL) { free(node->tuple[lf].value); } tp = node->next; free(node); node = tp; } free(self); mylog("TupleList: exit DESTRUCTOR\n"); } void * TL_get_fieldval(TupleListClass *self, Int4 tupleno, Int2 fieldno) { Int4 lf; Int4 delta, from_end; char end_is_closer, start_is_closer; TupleNode *rv; if (self->last_indexed == -1) /* we have an empty tuple list */ return NULL; /* some more sanity checks */ if ((tupleno >= self->num_tuples) || (tupleno < 0)) /* illegal tuple number range */ return NULL; if ((fieldno >= self->num_fields) || (fieldno < 0)) /* illegel field number range */ return NULL; /* check if we are accessing the same tuple that was used in the last fetch (e.g: for fetching all the fields one after another. Do this to speed things up */ if (tupleno == self->last_indexed) return self->lastref->tuple[fieldno].value; /* now for the tricky part... */ /* Since random access is quite inefficient for linked lists we use the lastref pointer that points to the last element referenced by a get_fieldval() call in conjunction with the its index number that is stored in last_indexed. (So we use some locality of reference principle to speed things up) */ delta = tupleno - self->last_indexed; /* if delta is positive, we have to go forward */ /* now check if we are closer to the start or the end of the list than to our last_indexed pointer */ from_end = (self->num_tuples - 1) - tupleno; start_is_closer = labs(delta) > tupleno; /* true if we are closer to the start of the list than to the last_indexed pointer */ end_is_closer = labs(delta) > from_end; /* true if we are closer at the end of the list */ if (end_is_closer) { /* scanning from the end is the shortest way. so we do that... */ rv = self->list_end; for (lf=0; lf < from_end; lf++) rv = rv->prev; } else if (start_is_closer) { /* the shortest way is to start the search from the head of the list */ rv = self->list_start; for (lf=0; lf < tupleno; lf++) rv = rv->next; } else { /* the closest way is starting from our lastref - pointer */ rv = self->lastref; /* at first determine whether we have to search forward or backwards */ if (delta < 0) { /* we have to search backwards */ for(lf=0; lf < (-1)*delta; lf++) rv = rv->prev; } else { /* ok, we have to search forward... */ for (lf=0; lf < delta; lf++) rv = rv->next; } } /* now we have got our return pointer, so update the lastref and the last_indexed values */ self->lastref = rv; self->last_indexed = tupleno; return rv->tuple[fieldno].value; } char TL_add_tuple(TupleListClass *self, TupleNode *new_field) { /* we append the tuple at the end of the doubly linked list of the tuples we have already read in */ new_field->prev = NULL; new_field->next = NULL; if (self->list_start == NULL) { /* the list is empty, we have to add the first tuple */ self->list_start = new_field; self->list_end = new_field; self->lastref = new_field; self->last_indexed = 0; } else { /* there is already an element in the list, so add the new one at the end of the list */ self->list_end->next = new_field; new_field->prev = self->list_end; self->list_end = new_field; } self->num_tuples++; /* this method of building a list cannot fail, so we return 1 */ return 1; } unixODBC-2.2.14-p2/Drivers/PostgreSQL/bind.h0100644000076400007640000000221407410367416016712 0ustar nicknick /* File: bind.h * * Description: See "bind.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __BIND_H__ #define __BIND_H__ #include "psqlodbc.h" /* * BindInfoClass -- stores information about a bound column */ struct BindInfoClass_ { Int4 buflen; /* size of buffer */ Int4 data_left; /* amount of data left to read (SQLGetData) */ char *buffer; /* pointer to the buffer */ SQLLEN *used; /* used space in the buffer (for strings not counting the '\0') */ Int2 returntype; /* kind of conversion to be applied when returning (SQL_C_DEFAULT, SQL_C_CHAR...) */ }; /* * ParameterInfoClass -- stores information about a bound parameter */ struct ParameterInfoClass_ { Int4 buflen; char *buffer; SQLLEN *used; Int2 paramType; Int2 CType; Int2 SQLType; UInt4 precision; Int2 scale; Oid lobj_oid; Int4 *EXEC_used; /* amount of data OR the oid of the large object */ char *EXEC_buffer; /* the data or the FD of the large object */ char data_at_exec; }; BindInfoClass *create_empty_bindings(int num_columns); void extend_bindings(StatementClass *stmt, int num_columns); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/columninfo.h0100644000076400007640000000257607530133126020152 0ustar nicknick /* File: columninfo.h * * Description: See "columninfo.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __COLUMNINFO_H__ #define __COLUMNINFO_H__ #include "psqlodbc.h" struct ColumnInfoClass_ { Int2 num_fields; char **name; /* list of type names */ Oid *adtid; /* list of type ids */ Int2 *adtsize; /* list type sizes */ Int2 *display_size; /* the display size (longest row) */ Int4 *atttypmod; /* the length of bpchar/varchar */ }; #define CI_get_num_fields(self) ((self) ? (self->num_fields) : (-1)) #define CI_get_oid(self, col) (self->adtid[col]) #define CI_get_fieldname(self, col) (self->name[col]) #define CI_get_fieldsize(self, col) (self->adtsize[col]) #define CI_get_display_size(self, col) (self->display_size[col]) #define CI_get_atttypmod(self, col) (self->atttypmod[col]) ColumnInfoClass *CI_Constructor(void); void CI_Destructor(ColumnInfoClass *self); void CI_free_memory(ColumnInfoClass *self); char CI_read_fields(ColumnInfoClass *self, ConnectionClass *conn); /* functions for setting up the fields from within the program, */ /* without reading from a socket */ void CI_set_num_fields(ColumnInfoClass *self, int new_num_fields); void CI_set_field_info(ColumnInfoClass *self, int field_num, char *new_name, Oid new_adtid, Int2 new_adtsize, Int4 atttypmod); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/connection.h0100644000076400007640000001707507403176733020152 0ustar nicknick /* File: connection.h * * Description: See "connection.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __CONNECTION_H__ #define __CONNECTION_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #ifndef WIN32 #ifdef UNIXODBC #include #include #else #include "iodbc.h" #include "isql.h" #include "isqlext.h" #endif #else #include #include #include #endif typedef enum { CONN_NOT_CONNECTED, /* Connection has not been established */ CONN_CONNECTED, /* Connection is up and has been established */ CONN_DOWN, /* Connection is broken */ CONN_EXECUTING /* the connection is currently executing a statement */ } CONN_Status; /* These errors have general sql error state */ #define CONNECTION_SERVER_NOT_REACHED 101 #define CONNECTION_MSG_TOO_LONG 103 #define CONNECTION_COULD_NOT_SEND 104 #define CONNECTION_NO_SUCH_DATABASE 105 #define CONNECTION_BACKEND_CRAZY 106 #define CONNECTION_NO_RESPONSE 107 #define CONNECTION_SERVER_REPORTED_ERROR 108 #define CONNECTION_COULD_NOT_RECEIVE 109 #define CONNECTION_SERVER_REPORTED_WARNING 110 #define CONNECTION_NEED_PASSWORD 112 /* These errors correspond to specific SQL states */ #define CONN_INIREAD_ERROR 201 #define CONN_OPENDB_ERROR 202 #define CONN_STMT_ALLOC_ERROR 203 #define CONN_IN_USE 204 #define CONN_UNSUPPORTED_OPTION 205 /* Used by SetConnectoption to indicate unsupported options */ #define CONN_INVALID_ARGUMENT_NO 206 /* SetConnectOption: corresponds to ODBC--"S1009" */ #define CONN_TRANSACT_IN_PROGRES 207 #define CONN_NO_MEMORY_ERROR 208 #define CONN_NOT_IMPLEMENTED_ERROR 209 #define CONN_INVALID_AUTHENTICATION 210 #define CONN_AUTH_TYPE_UNSUPPORTED 211 #define CONN_UNABLE_TO_LOAD_DLL 212 #define CONN_OPTION_VALUE_CHANGED 213 #define CONN_VALUE_OUT_OF_RANGE 214 #define CONN_TRUNCATED 215 /* Conn_status defines */ #define CONN_IN_AUTOCOMMIT 0x01 #define CONN_IN_TRANSACTION 0x02 /* AutoCommit functions */ #define CC_set_autocommit_off(x) (x->transact_status &= ~CONN_IN_AUTOCOMMIT) #define CC_set_autocommit_on(x) (x->transact_status |= CONN_IN_AUTOCOMMIT) #define CC_is_in_autocommit(x) (x->transact_status & CONN_IN_AUTOCOMMIT) /* Transaction in/not functions */ #define CC_set_in_trans(x) (x->transact_status |= CONN_IN_TRANSACTION) #define CC_set_no_trans(x) (x->transact_status &= ~CONN_IN_TRANSACTION) #define CC_is_in_trans(x) (x->transact_status & CONN_IN_TRANSACTION) /* Authentication types */ #define AUTH_REQ_OK 0 #define AUTH_REQ_KRB4 1 #define AUTH_REQ_KRB5 2 #define AUTH_REQ_PASSWORD 3 #define AUTH_REQ_CRYPT 4 /* Startup Packet sizes */ #define SM_DATABASE 64 #define SM_USER 32 #define SM_OPTIONS 64 #define SM_UNUSED 64 #define SM_TTY 64 /* Old 6.2 protocol defines */ #define NO_AUTHENTICATION 7 #define PATH_SIZE 64 #define ARGV_SIZE 64 #define NAMEDATALEN 16 typedef unsigned int ProtocolVersion; #define PG_PROTOCOL(major, minor) (((major) << 16) | (minor)) #define PG_PROTOCOL_LATEST PG_PROTOCOL(2, 0) #define PG_PROTOCOL_63 PG_PROTOCOL(1, 0) #define PG_PROTOCOL_62 PG_PROTOCOL(0, 0) /* This startup packet is to support latest Postgres protocol (6.4, 6.3) */ typedef struct _StartupPacket { ProtocolVersion protoVersion; char database[SM_DATABASE]; char user[SM_USER]; char options[SM_OPTIONS]; char unused[SM_UNUSED]; char tty[SM_TTY]; } StartupPacket; /* This startup packet is to support pre-Postgres 6.3 protocol */ typedef struct _StartupPacket6_2 { unsigned int authtype; char database[PATH_SIZE]; char user[NAMEDATALEN]; char options[ARGV_SIZE]; char execfile[ARGV_SIZE]; char tty[PATH_SIZE]; } StartupPacket6_2; /* Structure to hold all the connection attributes for a specific connection (used for both registry and file, DSN and DRIVER) */ typedef struct { char dsn[MEDIUM_REGISTRY_LEN]; char desc[MEDIUM_REGISTRY_LEN]; char driver[MEDIUM_REGISTRY_LEN]; char server[MEDIUM_REGISTRY_LEN]; char database[MEDIUM_REGISTRY_LEN]; char username[MEDIUM_REGISTRY_LEN]; char password[MEDIUM_REGISTRY_LEN]; char conn_settings[LARGE_REGISTRY_LEN]; char protocol[SMALL_REGISTRY_LEN]; char port[SMALL_REGISTRY_LEN]; char uds[LARGE_REGISTRY_LEN]; char readonly[SMALL_REGISTRY_LEN]; char fake_oid_index[SMALL_REGISTRY_LEN]; char show_oid_column[SMALL_REGISTRY_LEN]; char row_versioning[SMALL_REGISTRY_LEN]; char show_system_tables[SMALL_REGISTRY_LEN]; char translation_dll[MEDIUM_REGISTRY_LEN]; char translation_option[SMALL_REGISTRY_LEN]; char focus_password; } ConnInfo; /* Macro to determine is the connection using 6.2 protocol? */ #define PROTOCOL_62(conninfo_) (strncmp((conninfo_)->protocol, PG62, strlen(PG62)) == 0) /* Macro to determine is the connection using 6.3 protocol? */ #define PROTOCOL_63(conninfo_) (strncmp((conninfo_)->protocol, PG63, strlen(PG63)) == 0) /* This is used to store cached table information in the connection */ struct col_info { QResultClass *result; char name[MAX_TABLE_LEN+1]; }; /* Translation DLL entry points */ #ifdef WIN32 #define DLLHANDLE HINSTANCE #else #define WINAPI CALLBACK #define DLLHANDLE void * #define HINSTANCE void * #endif typedef BOOL (FAR WINAPI *DataSourceToDriverProc) (UDWORD, SWORD, PTR, SDWORD, PTR, SDWORD, SDWORD FAR *, UCHAR FAR *, SWORD, SWORD FAR *); typedef BOOL (FAR WINAPI *DriverToDataSourceProc) (UDWORD, SWORD, PTR, SDWORD, PTR, SDWORD, SDWORD FAR *, UCHAR FAR *, SWORD, SWORD FAR *); /******* The Connection handle ************/ struct ConnectionClass_ { HENV henv; /* environment this connection was created on */ StatementOptions stmtOptions; char *errormsg; int errornumber; CONN_Status status; ConnInfo connInfo; StatementClass **stmts; int num_stmts; SocketClass *sock; int lobj_type; int ntables; COL_INFO **col_info; long translation_option; HINSTANCE translation_handle; DataSourceToDriverProc DataSourceToDriver; DriverToDataSourceProc DriverToDataSource; char transact_status; /* Is a transaction is currently in progress */ char errormsg_created; /* has an informative error msg been created? */ }; /* Accessor functions */ #define CC_get_socket(x) (x->sock) #define CC_get_database(x) (x->connInfo.database) #define CC_get_server(x) (x->connInfo.server) #define CC_get_DSN(x) (x->connInfo.dsn) #define CC_get_username(x) (x->connInfo.username) #define CC_is_readonly(x) (x->connInfo.readonly[0] == '1') /* for CC_DSN_info */ #define CONN_DONT_OVERWRITE 0 #define CONN_OVERWRITE 1 /* prototypes */ ConnectionClass *CC_Constructor(void); char CC_Destructor(ConnectionClass *self); int CC_cursor_count(ConnectionClass *self); char CC_cleanup(ConnectionClass *self); char CC_abort(ConnectionClass *self); int CC_set_translation (ConnectionClass *self); char CC_connect(ConnectionClass *self, char do_password); char CC_add_statement(ConnectionClass *self, StatementClass *stmt); char CC_remove_statement(ConnectionClass *self, StatementClass *stmt); char CC_get_error(ConnectionClass *self, int *number, char **message); QResultClass *CC_send_query(ConnectionClass *self, char *query, QueryInfo *qi); void CC_clear_error(ConnectionClass *self); char *CC_create_errormsg(ConnectionClass *self); int CC_send_function(ConnectionClass *conn, int fnid, void *result_buf, int *actual_result_len, int result_is_int, LO_ARG *argv, int nargs); char CC_send_settings(ConnectionClass *self); void CC_lookup_lo(ConnectionClass *conn); void CC_log_error(char *func, char *desc, ConnectionClass *self); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/convert.h0100644000076400007640000000300607475155225017462 0ustar nicknick /* File: convert.h * * Description: See "convert.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __CONVERT_H__ #define __CONVERT_H__ #include "psqlodbc.h" /* copy_and_convert results */ #define COPY_OK 0 #define COPY_UNSUPPORTED_TYPE 1 #define COPY_UNSUPPORTED_CONVERSION 2 #define COPY_RESULT_TRUNCATED 3 #define COPY_GENERAL_ERROR 4 #define COPY_NO_DATA_FOUND 5 typedef struct { int m; int d; int y; int hh; int mm; int ss; } SIMPLE_TIME; int copy_and_convert_field_bindinfo(StatementClass *stmt, Int4 field_type, void *value, int col); int copy_and_convert_field(StatementClass *stmt, Int4 field_type, void *value, Int2 fCType, PTR rgbValue, SDWORD cbValueMax, SQLLEN *pcbValue); int copy_statement_with_parameters(StatementClass *stmt); char *convert_escape(char *value); char *convert_money(char *s); char parse_datetime(char *buf, SIMPLE_TIME *st); int convert_linefeeds(char *s, char *dst, size_t max); char *convert_special_chars(char *si, char *dst, int used); int convert_pgbinary_to_char(char *value, char *rgbValue, int cbValueMax); int convert_from_pgbinary(unsigned char *value, unsigned char *rgbValue, int cbValueMax); int convert_to_pgbinary(unsigned char *in, char *out, int len); void encode(char *in, char *out); void decode(char *in, char *out); int convert_lo(StatementClass *stmt, void *value, Int2 fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD *pcbValue); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/dlg_specific.h0100644000076400007640000001207207403176733020416 0ustar nicknick /* File: dlg_specific.h * * Description: See "dlg_specific.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __DLG_SPECIFIC_H__ #define __DLG_SPECIFIC_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #include "connection.h" #ifdef WIN32 #include #include #include #include "resource.h" #endif /* Unknown data type sizes */ #define UNKNOWNS_AS_MAX 0 #define UNKNOWNS_AS_DONTKNOW 1 #define UNKNOWNS_AS_LONGEST 2 /* INI File Stuff */ #ifndef WIN32 #ifdef UNIXODBC #define ODBC_INI "ODBC.INI" /* ODBC initialization file */ #define ODBCINST_INI "ODBCINST.INI" /* ODBC Installation file */ #else #define ODBC_INI ".odbc.ini" #ifdef ODBCINST #define xstr(s) str(s) #define str(s) #s #define ODBCINST_INI xstr(ODBCINST) "/odbcinst.ini" #else #define ODBCINST_INI "/etc/odbcinst.ini" #endif #endif #else #define ODBC_INI "ODBC.INI" /* ODBC initialization file */ #define ODBCINST_INI "ODBCINST.INI" /* ODBC Installation file */ #endif #define INI_DSN DBMS_NAME /* Name of default Datasource in ini file (not used?) */ #define INI_KDESC "Description" /* Data source description */ #define INI_SERVER "Servername" /* Name of Server running the Postgres service */ #define INI_PORT "Port" /* Port on which the Postmaster is listening */ #define INI_UDS "Uds" /* Unix Domain socket path */ #define INI_DATABASE "Database" /* Database Name */ #define INI_USER "Username" /* Default User Name */ #define INI_PASSWORD "Password" /* Default Password */ #define INI_DEBUG "Debug" /* Debug flag */ #define INI_FETCH "Fetch" /* Fetch Max Count */ #define INI_SOCKET "Socket" /* Socket buffer size */ #define INI_READONLY "ReadOnly" /* Database is read only */ #define INI_COMMLOG "CommLog" /* Communication to backend logging */ #define INI_PROTOCOL "Protocol" /* What protocol (6.2) */ #define INI_OPTIMIZER "Optimizer" /* Use backend genetic optimizer */ #define INI_KSQO "Ksqo" /* Keyset query optimization */ #define INI_CONNSETTINGS "ConnSettings" /* Anything to send to backend on successful connection */ #define INI_UNIQUEINDEX "UniqueIndex" /* Recognize unique indexes */ #define INI_UNKNOWNSIZES "UnknownSizes" /* How to handle unknown result set sizes */ #define INI_CANCELASFREESTMT "CancelAsFreeStmt" #define INI_USEDECLAREFETCH "UseDeclareFetch" /* Use Declare/Fetch cursors */ /* More ini stuff */ #define INI_TEXTASLONGVARCHAR "TextAsLongVarchar" #define INI_UNKNOWNSASLONGVARCHAR "UnknownsAsLongVarchar" #define INI_BOOLSASCHAR "BoolsAsChar" #define INI_MAXVARCHARSIZE "MaxVarcharSize" #define INI_MAXLONGVARCHARSIZE "MaxLongVarcharSize" #define INI_FAKEOIDINDEX "FakeOidIndex" #define INI_SHOWOIDCOLUMN "ShowOidColumn" #define INI_ROWVERSIONING "RowVersioning" #define INI_SHOWSYSTEMTABLES "ShowSystemTables" #define INI_LIE "Lie" #define INI_PARSE "Parse" #define INI_EXTRASYSTABLEPREFIXES "ExtraSysTablePrefixes" #define INI_TRANSLATIONNAME "TranslationName" #define INI_TRANSLATIONDLL "TranslationDLL" #define INI_TRANSLATIONOPTION "TranslationOption" /* Connection Defaults */ #define DEFAULT_PORT "5432" #define DEFAULT_UDS "" #define DEFAULT_READONLY 1 #define DEFAULT_PROTOCOL "6.4" /*// the latest protocol is the default */ #define DEFAULT_USEDECLAREFETCH 0 #define DEFAULT_TEXTASLONGVARCHAR 1 #define DEFAULT_UNKNOWNSASLONGVARCHAR 0 #define DEFAULT_BOOLSASCHAR 1 #define DEFAULT_OPTIMIZER 1 /*// disable */ #define DEFAULT_KSQO 1 /*// on */ #define DEFAULT_UNIQUEINDEX 0 /*// dont recognize */ #define DEFAULT_COMMLOG 0 /*// dont log */ #define DEFAULT_DEBUG 0 #define DEFAULT_UNKNOWNSIZES UNKNOWNS_AS_MAX #define DEFAULT_FAKEOIDINDEX 0 #define DEFAULT_SHOWOIDCOLUMN 0 #define DEFAULT_ROWVERSIONING 0 #define DEFAULT_SHOWSYSTEMTABLES 0 /*// dont show system tables */ #define DEFAULT_LIE 0 #define DEFAULT_PARSE 0 #define DEFAULT_CANCELASFREESTMT 0 #define DEFAULT_EXTRASYSTABLEPREFIXES "dd_;" /* prototypes */ void getGlobalDefaults(char *section, char *filename, char override); #ifdef WIN32 void SetDlgStuff(HWND hdlg, ConnInfo *ci); void GetDlgStuff(HWND hdlg, ConnInfo *ci); int CALLBACK driver_optionsProc(HWND hdlg, WORD wMsg, WPARAM wParam, LPARAM lParam); int CALLBACK ds_optionsProc(HWND hdlg, WORD wMsg, WPARAM wParam, LPARAM lParam); #endif /* WIN32 */ void updateGlobals(void); void writeDSNinfo(ConnInfo *ci); void getDSNdefaults(ConnInfo *ci); void getDSNinfo(ConnInfo *ci, char overwrite); void makeConnectString(char *connect_string, ConnInfo *ci); void copyAttributes(ConnInfo *ci, char *attribute, char *value); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/environ.h0100644000076400007640000000177107363332153017462 0ustar nicknick /* File: environ.h * * Description: See "environ.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __ENVIRON_H__ #define __ENVIRON_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #ifndef WIN32 #ifdef UNIXODBC #include #else #include "iodbc.h" #include "isql.h" #include "isqlext.h" #endif #else #include #include #include #endif #define ENV_ALLOC_ERROR 1 /********** Environment Handle *************/ struct EnvironmentClass_ { char *errormsg; int errornumber; }; /* Environment prototypes */ EnvironmentClass *EN_Constructor(void); char EN_Destructor(EnvironmentClass *self); char EN_get_error(EnvironmentClass *self, int *number, char **message); char EN_add_connection(EnvironmentClass *self, ConnectionClass *conn); char EN_remove_connection(EnvironmentClass *self, ConnectionClass *conn); void EN_log_error(char *func, char *desc, EnvironmentClass *self); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/lobj.h0100644000076400007640000000200510021405715016705 0ustar nicknick /* File: lobj.h * * Description: See "lobj.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __LOBJ_H__ #define __LOBJ_H__ #include "psqlodbc.h" struct lo_arg { int isint; int len; union { int integer; char *ptr; } u; }; #define LO_CREAT 957 #define LO_OPEN 952 #define LO_CLOSE 953 #define LO_READ 954 #define LO_WRITE 955 #define LO_LSEEK 956 #define LO_TELL 958 #define LO_UNLINK 964 #define INV_WRITE 0x00020000 #define INV_READ 0x00040000 Oid odbc_lo_creat(ConnectionClass *conn, int mode); int odbc_lo_open(ConnectionClass *conn, int lobjId, int mode); int odbc_lo_close(ConnectionClass *conn, int fd); int odbc_lo_read(ConnectionClass *conn, int fd, char *buf, int len); int odbc_lo_write(ConnectionClass *conn, int fd, char *buf, int len); int odbc_lo_lseek(ConnectionClass *conn, int fd, int offset, int len); int odbc_lo_tell(ConnectionClass *conn, int fd); int odbc_lo_unlink(ConnectionClass *conn, Oid lobjId); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/misc.h0100644000076400007640000000451207406123160016723 0ustar nicknick /* File: misc.h * * Description: See "misc.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __MISC_H__ #define __MISC_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef WIN32 #ifdef UNIXODBC #include #else #include "gpps.h" #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f) #endif #endif #include /* Uncomment MY_LOG define to compile in the mylog() statements. Then, debug logging will occur if 'Debug' is set to 1 in the ODBCINST.INI portion of the registry. You may have to manually add this key. This logfile is intended for development use, not for an end user! */ #define MY_LOG /* Uncomment Q_LOG to compile in the qlog() statements (Communications log, i.e. CommLog). This logfile contains serious log statements that are intended for an end user to be able to read and understand. It is controlled by the 'CommLog' flag in the ODBCINST.INI portion of the registry (see above), which is manipulated on the setup/connection dialog boxes. */ #define Q_LOG #ifdef MY_LOG # define MYLOGFILE "mylog_" # ifndef WIN32 # define MYLOGDIR "/tmp" # else # define MYLOGDIR "c:" # endif void mylog( char *fmt, ... ); /* prototype */ #else # ifndef WIN32 # ifdef _GNU # define mylog(char*fmt,...) /* GNU convention for variable arguments */ # else # define mylog # endif # else # define mylog # endif #endif #ifdef Q_LOG # define QLOGFILE "psqlodbc_" # ifndef WIN32 # define QLOGDIR "/tmp" # else # define QLOGDIR "c:" # endif void qlog(char*fmt,...); /* prototype */ #else # ifndef WIN32 # define qlog(char*fmt,...) /* GNU convention for variable arguments */ # else # define qlog # endif #endif #ifndef WIN32 # define DIRSEPARATOR "/" #else # define DIRSEPARATOR "\\" #endif void remove_newlines(char *string); char *strncpy_null(char *dst, const char *src, int len); char *trim(char *string); char *make_string(char *s, int len, char *buf); char *my_strcat(char *buf, char *fmt, char *s, int len); int my_strlen(char *s, int len); /* defines for return value of my_strcpy */ #define STRCPY_SUCCESS 1 #define STRCPY_FAIL 0 #define STRCPY_TRUNCATED -1 #define STRCPY_NULL -2 int my_strcpy(char *dst, int dst_len, char *src, int src_len); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/pgtypes.h0100644000076400007640000000637607526660772017517 0ustar nicknick /* File: pgtypes.h * * Description: See "pgtypes.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __PGTYPES_H__ #define __PGTYPES_H__ #include "psqlodbc.h" /* the type numbers are defined by the OID's of the types' rows */ /* in table pg_type */ /* #define PG_TYPE_LO ???? waiting for permanent type */ #define PG_TYPE_BOOL 16 #define PG_TYPE_BYTEA 17 #define PG_TYPE_CHAR 18 #define PG_TYPE_NAME 19 #define PG_TYPE_CHAR16 20 #define PG_TYPE_INT2 21 #define PG_TYPE_INT28 22 #define PG_TYPE_INT4 23 #define PG_TYPE_REGPROC 24 #define PG_TYPE_TEXT 25 #define PG_TYPE_OID 26 #define PG_TYPE_TID 27 #define PG_TYPE_XID 28 #define PG_TYPE_CID 29 #define PG_TYPE_OID8 30 #define PG_TYPE_SET 32 #define PG_TYPE_CHAR2 409 #define PG_TYPE_CHAR4 410 #define PG_TYPE_CHAR8 411 #define PG_TYPE_POINT 600 #define PG_TYPE_LSEG 601 #define PG_TYPE_PATH 602 #define PG_TYPE_BOX 603 #define PG_TYPE_POLYGON 604 #define PG_TYPE_FILENAME 605 #define PG_TYPE_LINE 628 #define PG_TYPE_CIDR 650 #define PG_TYPE_FLOAT4 700 #define PG_TYPE_FLOAT8 701 #define PG_TYPE_ABSTIME 702 #define PG_TYPE_RELTIME 703 #define PG_TYPE_TINTERVAL 704 #define PG_TYPE_UNKNOWN 705 #define PG_TYPE_CIRCLE 718 #define PG_TYPE_MONEY 790 #define PG_TYPE_OIDINT2 810 #define PG_TYPE_MAC 829 #define PG_TYPE_INET 869 #define PG_TYPE_OIDINT4 910 #define PG_TYPE_OIDNAME 911 #define PG_TYPE_BPCHAR 1042 #define PG_TYPE_VARCHAR 1043 #define PG_TYPE_DATE 1082 #define PG_TYPE_TIME 1083 #define PG_TYPE_TIMESTAMP 1184 #define PG_TYPE_INTERVAL 1186 #define PG_TYPE_NUMERIC 1700 #define PG_TYPE_DATETIME 1296 #define PG_TYPE_TIMESTAMP_NO_TMZONE 1114 /* extern Int4 pgtypes_defined[]; */ extern Int2 sqlTypes[]; /* Defines for pgtype_precision */ #define PG_STATIC -1 Int4 sqltype_to_pgtype(Int2 fSqlType); Int2 pgtype_to_sqltype(StatementClass *stmt, Int4 type); Int2 pgtype_to_ctype(StatementClass *stmt, Int4 type); char *pgtype_to_name(StatementClass *stmt, Int4 type); /* These functions can use static numbers or result sets(col parameter) */ Int4 pgtype_precision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as); Int4 pgtype_display_size(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as); Int4 pgtype_length(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as); Int2 pgtype_scale(StatementClass *stmt, Int4 type); Int2 pgtype_radix(StatementClass *stmt, Int4 type); Int2 pgtype_nullable(StatementClass *stmt, Int4 type); Int2 pgtype_auto_increment(StatementClass *stmt, Int4 type); Int2 pgtype_case_sensitive(StatementClass *stmt, Int4 type); Int2 pgtype_money(StatementClass *stmt, Int4 type); Int2 pgtype_searchable(StatementClass *stmt, Int4 type); Int2 pgtype_unsigned(StatementClass *stmt, Int4 type); char *pgtype_literal_prefix(StatementClass *stmt, Int4 type); char *pgtype_literal_suffix(StatementClass *stmt, Int4 type); char *pgtype_create_params(StatementClass *stmt, Int4 type); Int2 sqltype_to_default_ctype(Int2 sqltype); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/psqlodbc.h0100644000076400007640000001374507637566345017635 0ustar nicknick /* File: psqlodbc.h * * Description: This file contains defines and declarations that are related to * the entire driver. * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __PSQLODBC_H__ #define __PSQLODBC_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /* for FILE* pointers: see GLOBAL_VALUES */ #include /* for prototype of strlen() etc */ #ifndef WIN32 #include /* for prototype of atof() etc */ #define Int4 int #define UInt4 unsigned int #define Int2 short #define UInt2 unsigned short #ifndef UNIXODBC typedef float SFLOAT; typedef double SDOUBLE; #endif #else #define Int4 int #define UInt4 unsigned int #define Int2 short #define UInt2 unsigned short #endif typedef UInt4 Oid; /* Driver stuff */ /*#define ODBCVER 0x0200*/ #define DRIVER_ODBC_VER "02.00" #define DRIVERNAME "PostgreSQL ODBC" #define DBMS_NAME "PostgreSQL" #define DBMS_VERSION "06.40.0007 PostgreSQL 6.4" #define POSTGRESDRIVERVERSION "06.40.0007" #ifdef WIN32 #define DRIVER_FILE_NAME "PSQLODBC.DLL" #else #ifdef UNIXODBC #define DRIVER_FILE_NAME "libodbcpsql.so" #else #define DRIVER_FILE_NAME "libpsqlodbc.so" #endif #endif /* Limits */ #define MAX_MESSAGE_LEN 65536 #define MAX_CONNECT_STRING 4096 #define ERROR_MSG_LENGTH 4096 #define FETCH_MAX 100 /* default number of rows to cache for declare/fetch */ #define TUPLE_MALLOC_INC 100 #define SOCK_BUFFER_SIZE 4096 /* default socket buffer size */ #define MAX_CONNECTIONS 128 /* conns per environment (arbitrary) */ #define MAX_FIELDS 512 #define BYTELEN 8 #define VARHDRSZ sizeof(Int4) #define MAX_TABLE_LEN 32 #define MAX_COLUMN_LEN 32 #define MAX_CURSOR_LEN 32 /* Registry length limits */ #define LARGE_REGISTRY_LEN 4096 /* used for special cases */ #define MEDIUM_REGISTRY_LEN 256 /* normal size for user,database,etc. */ #define SMALL_REGISTRY_LEN 10 /* for 1/0 settings */ /* These prefixes denote system tables */ #define POSTGRES_SYS_PREFIX "pg_" #define KEYS_TABLE "dd_fkey" /* Info limits */ #define MAX_INFO_STRING 128 #define MAX_KEYPARTS 20 #define MAX_KEYLEN 512 /*// max key of the form "date+outlet+invoice" */ #define MAX_STATEMENT_LEN MAX_MESSAGE_LEN #define PG62 "6.2" /* "Protocol" key setting to force Postgres 6.2 */ #define PG63 "6.3" /* "Protocol" key setting to force postgres 6.3 */ #define PG64 "6.4" typedef struct ConnectionClass_ ConnectionClass; typedef struct StatementClass_ StatementClass; typedef struct QResultClass_ QResultClass; typedef struct SocketClass_ SocketClass; typedef struct BindInfoClass_ BindInfoClass; typedef struct ParameterInfoClass_ ParameterInfoClass; typedef struct ColumnInfoClass_ ColumnInfoClass; typedef struct TupleListClass_ TupleListClass; typedef struct EnvironmentClass_ EnvironmentClass; typedef struct TupleNode_ TupleNode; typedef struct TupleField_ TupleField; typedef struct col_info COL_INFO; typedef struct lo_arg LO_ARG; typedef struct GlobalValues_ { int fetch_max; int socket_buffersize; int unknown_sizes; int max_varchar_size; int max_longvarchar_size; char debug; char commlog; char disable_optimizer; char ksqo; char unique_index; char readonly; char use_declarefetch; char text_as_longvarchar; char unknowns_as_longvarchar; char bools_as_char; char lie; char parse; char cancel_as_freestmt; char extra_systable_prefixes[MEDIUM_REGISTRY_LEN]; char conn_settings[LARGE_REGISTRY_LEN]; char protocol[SMALL_REGISTRY_LEN]; FILE* mylogFP; FILE* qlogFP; } GLOBAL_VALUES; /* * rename to avoid colision */ #define global pg_global typedef struct StatementOptions_ { int maxRows; int maxLength; int rowset_size; int keyset_size; int cursor_type; int scroll_concurrency; int retrieve_data; int bind_size; /* size of each structure if using Row Binding */ int use_bookmarks; } StatementOptions; /* Used to pass extra query info to send_query */ typedef struct QueryInfo_ { int row_size; QResultClass *result_in; char *cursor; } QueryInfo; #define PG_TYPE_LO -999 /* hack until permanent type available */ #define PG_TYPE_LO_NAME "lo" #define OID_ATTNUM -2 /* the attnum in pg_index of the oid */ /* sizes */ #define TEXT_FIELD_SIZE 65536 /* size of text fields (not including null term) */ #define NAME_FIELD_SIZE 32 /* size of name fields */ #define MAX_VARCHAR_SIZE 254 /* maximum size of a varchar (not including null term) */ #include "misc.h" RETCODE SQL_API PG__SQLAllocStmt(HDBC hdbc, HSTMT FAR *phstmt); RETCODE SQL_API PG__SQLBindCol( HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue); RETCODE SQL_API PG__SQLColumns( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UCHAR FAR * szColumnName, SWORD cbColumnName); RETCODE SQL_API PG__SQLExecDirect( HSTMT hstmt, UCHAR FAR *szSqlStr, SDWORD cbSqlStr); RETCODE SQL_API PG__SQLExecute(HSTMT hstmt); RETCODE SQL_API PG__SQLExtendedFetch( HSTMT hstmt, UWORD fFetchType, SDWORD irow, UDWORD FAR *pcrow, UWORD FAR *rgfRowStatus); RETCODE SQL_API PG__SQLFetch(HSTMT hstmt); RETCODE SQL_API PG__SQLFreeStmt(HSTMT hstmt, UWORD fOption); RETCODE SQL_API PG__SQLGetData( HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/qresult.h0100644000076400007640000001115607363332153017477 0ustar nicknick /* File: qresult.h * * Description: See "qresult.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __QRESULT_H__ #define __QRESULT_H__ #include "connection.h" #include "socket.h" #include "columninfo.h" #include "tuplelist.h" #include "psqlodbc.h" #include "tuple.h" enum QueryResultCode_ { PGRES_EMPTY_QUERY = 0, PGRES_COMMAND_OK, /* a query command that doesn't return */ /* anything was executed properly by the backend */ PGRES_TUPLES_OK, /* a query command that returns tuples */ /* was executed properly by the backend, PGresult */ /* contains the resulttuples */ PGRES_COPY_OUT, PGRES_COPY_IN, PGRES_BAD_RESPONSE, /* an unexpected response was recv'd from the backend */ PGRES_NONFATAL_ERROR, PGRES_FATAL_ERROR, PGRES_FIELDS_OK, /* field information from a query was successful */ PGRES_END_TUPLES, PGRES_INTERNAL_ERROR }; typedef enum QueryResultCode_ QueryResultCode; struct QResultClass_ { ColumnInfoClass *fields; /* the Column information */ TupleListClass *manual_tuples; /* manual result tuple list */ ConnectionClass *conn; /* the connection this result is using (backend) */ /* Stuff for declare/fetch tuples */ int fetch_count; /* logical rows read so far */ int fcount; /* actual rows read in the fetch */ int currTuple; int base; int num_fields; /* number of fields in the result */ int cache_size; int rowset_size; QueryResultCode status; char *message; char *cursor; /* The name of the cursor for select statements */ char *command; char *notice; TupleField *backend_tuples; /* data from the backend (the tuple cache) */ TupleField *tupleField; /* current backend tuple being retrieved */ char inTuples; /* is a fetch of rows from the backend in progress? */ }; #define QR_get_fields(self) (self->fields) /* These functions are for retrieving data from the qresult */ #define QR_get_value_manual(self, tupleno, fieldno) (TL_get_fieldval(self->manual_tuples, tupleno, fieldno)) #define QR_get_value_backend(self, fieldno) (self->tupleField[fieldno].value) #define QR_get_value_backend_row(self, tupleno, fieldno) ((self->backend_tuples + (tupleno * self->num_fields))[fieldno].value) /* These functions are used by both manual and backend results */ #define QR_NumResultCols(self) (CI_get_num_fields(self->fields)) #define QR_get_fieldname(self, fieldno_) (CI_get_fieldname(self->fields, fieldno_)) #define QR_get_fieldsize(self, fieldno_) (CI_get_fieldsize(self->fields, fieldno_)) #define QR_get_display_size(self, fieldno_) (CI_get_display_size(self->fields, fieldno_)) #define QR_get_atttypmod(self, fieldno_) (CI_get_atttypmod(self->fields, fieldno_)) #define QR_get_field_type(self, fieldno_) (CI_get_oid(self->fields, fieldno_)) /* These functions are used only for manual result sets */ #define QR_get_num_tuples(self) (self->manual_tuples ? TL_get_num_tuples(self->manual_tuples) : self->fcount) #define QR_add_tuple(self, new_tuple) (TL_add_tuple(self->manual_tuples, new_tuple)) #define QR_set_field_info(self, field_num, name, adtid, adtsize) (CI_set_field_info(self->fields, field_num, name, adtid, adtsize, -1)) /* status macros */ #define QR_command_successful(self) ( !(self->status == PGRES_BAD_RESPONSE || self->status == PGRES_NONFATAL_ERROR || self->status == PGRES_FATAL_ERROR)) #define QR_command_nonfatal(self) ( self->status == PGRES_NONFATAL_ERROR) #define QR_end_tuples(self) ( self->status == PGRES_END_TUPLES) #define QR_set_status(self, condition) ( self->status = condition ) #define QR_set_message(self, message_) ( self->message = message_) #define QR_get_message(self) (self->message) #define QR_get_command(self) (self->command) #define QR_get_notice(self) (self->notice) #define QR_get_status(self) (self->status) /*// Core Functions */ QResultClass *QR_Constructor(void); void QR_Destructor(QResultClass *self); char QR_read_tuple(QResultClass *self, char binary); int QR_next_tuple(QResultClass *self); int QR_close(QResultClass *self); char QR_fetch_tuples(QResultClass *self, ConnectionClass *conn, char *cursor); void QR_free_memory(QResultClass *self); void QR_set_command(QResultClass *self, char *msg); void QR_set_notice(QResultClass *self, char *msg); void QR_set_num_fields(QResultClass *self, int new_num_fields); /* manual result only */ void QR_inc_base(QResultClass *self, int base_inc); void QR_set_cache_size(QResultClass *self, int cache_size); void QR_set_rowset_size(QResultClass *self, int rowset_size); void QR_set_position(QResultClass *self, int pos); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/resource.h0100644000076400007640000000474107363332153017631 0ustar nicknick/*//{{NO_DEPENDENCIES}} */ /*// Microsoft Developer Studio generated include file. */ /*// Used by psqlodbc.rc */ /*// */ #define IDS_BADDSN 1 #define IDS_MSGTITLE 2 #define DLG_OPTIONS_DRV 102 #define DLG_OPTIONS_DS 103 #define IDC_DSNAME 400 #define IDC_DSNAMETEXT 401 #define IDC_DESC 404 #define IDC_SERVER 407 #define IDC_DATABASE 408 #define DLG_CONFIG 1001 #define IDC_PORT 1002 #define IDC_USER 1006 #define IDC_PASSWORD 1009 #define DS_READONLY 1011 #define DS_SHOWOIDCOLUMN 1012 #define DS_FAKEOIDINDEX 1013 #define DRV_COMMLOG 1014 #define DS_PG62 1016 #define IDC_DATASOURCE 1018 #define DRV_OPTIMIZER 1019 #define DS_CONNSETTINGS 1020 #define IDC_DRIVER 1021 #define DRV_CONNSETTINGS 1031 #define DRV_UNIQUEINDEX 1032 #define DRV_UNKNOWN_MAX 1035 #define DRV_UNKNOWN_DONTKNOW 1036 #define DRV_READONLY 1037 #define IDC_DESCTEXT 1039 #define DRV_MSG_LABEL 1040 #define DRV_UNKNOWN_LONGEST 1041 #define DRV_TEXT_LONGVARCHAR 1043 #define DRV_UNKNOWNS_LONGVARCHAR 1044 #define DRV_CACHE_SIZE 1045 #define DRV_VARCHAR_SIZE 1046 #define DRV_LONGVARCHAR_SIZE 1047 #define IDDEFAULTS 1048 #define DRV_USEDECLAREFETCH 1049 #define DRV_BOOLS_CHAR 1050 #define DS_SHOWSYSTEMTABLES 1051 #define DRV_EXTRASYSTABLEPREFIXES 1051 #define DS_ROWVERSIONING 1052 #define DRV_PARSE 1052 #define DRV_CANCELASFREESTMT 1053 #define IDC_OPTIONS 1054 #define DRV_KSQO 1055 #define DS_PG64 1057 #define DS_PG63 1058 /*// Next default values for new objects */ /*// */ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 104 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1060 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/socket.h0100644000076400007640000000440707624477631017304 0ustar nicknick /* File: socket.h * * Description: See "socket.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __SOCKET_H__ #define __SOCKET_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef WIN32 #include #include #include #include #include #include #define closesocket(xxx) close(xxx) #define SOCKETFD int #ifndef INADDR_NONE #ifndef _IN_ADDR_T #define _IN_ADDR_T typedef unsigned int in_addr_t; #endif #define INADDR_NONE ((in_addr_t)-1) #endif #else #include #define SOCKETFD SOCKET #endif #include "psqlodbc.h" #define SOCKET_ALREADY_CONNECTED 1 #define SOCKET_HOST_NOT_FOUND 2 #define SOCKET_COULD_NOT_CREATE_SOCKET 3 #define SOCKET_COULD_NOT_CONNECT 4 #define SOCKET_READ_ERROR 5 #define SOCKET_WRITE_ERROR 6 #define SOCKET_NULLPOINTER_PARAMETER 7 #define SOCKET_PUT_INT_WRONG_LENGTH 8 #define SOCKET_GET_INT_WRONG_LENGTH 9 #define SOCKET_CLOSED 10 struct SocketClass_ { int buffer_filled_in; int buffer_filled_out; int buffer_read_in; unsigned char *buffer_in; unsigned char *buffer_out; SOCKETFD socket; char *errormsg; int errornumber; char reverse; /* used to handle Postgres 6.2 protocol (reverse byte order) */ }; #define SOCK_get_char(self) (SOCK_get_next_byte(self)) #define SOCK_put_char(self, c) (SOCK_put_next_byte(self, c)) /* error functions */ #define SOCK_get_errcode(self) (self->errornumber) #define SOCK_get_errmsg(self) (self->errormsg) /* Socket prototypes */ SocketClass *SOCK_Constructor(void); void SOCK_Destructor(SocketClass *self); char SOCK_connect_to(SocketClass *self, unsigned short port, char *hostname, char *uds); void SOCK_get_n_char(SocketClass *self, char *buffer, int len); void SOCK_put_n_char(SocketClass *self, char *buffer, int len); void SOCK_get_string(SocketClass *self, char *buffer, int bufsize); void SOCK_put_string(SocketClass *self, char *string); int SOCK_get_int(SocketClass *self, short len); void SOCK_put_int(SocketClass *self, int value, short len); void SOCK_flush_output(SocketClass *self); int SOCK_get_next_byte(SocketClass *self); void SOCK_put_next_byte(SocketClass *self, unsigned char next_byte); void SOCK_clear_error(SocketClass *self); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/statement.h0100644000076400007640000001451507406123160020000 0ustar nicknick /* File: statement.h * * Description: See "statement.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __STATEMENT_H__ #define __STATEMENT_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #include "bind.h" #ifndef WIN32 #ifdef UNIXODBC #include #else #include "iodbc.h" #include "isql.h" #include "isqlext.h" #endif #else #include #include #endif #ifndef FALSE #define FALSE (BOOL)0 #endif #ifndef TRUE #define TRUE (BOOL)1 #endif typedef enum { STMT_ALLOCATED, /* The statement handle is allocated, but not used so far */ STMT_READY, /* the statement is waiting to be executed */ STMT_PREMATURE, /* ODBC states that it is legal to call e.g. SQLDescribeCol before a call to SQLExecute, but after SQLPrepare. To get all the necessary information in such a case, we simply execute the query _before_ the actual call to SQLExecute, so that statement is considered to be "premature". */ STMT_FINISHED, /* statement execution has finished */ STMT_EXECUTING /* statement execution is still going on */ } STMT_Status; #define STMT_TRUNCATED -2 #define STMT_INFO_ONLY -1 /* not an error message, just a notification to be returned by SQLError */ #define STMT_OK 0 /* will be interpreted as "no error pending" */ #define STMT_EXEC_ERROR 1 #define STMT_STATUS_ERROR 2 #define STMT_SEQUENCE_ERROR 3 #define STMT_NO_MEMORY_ERROR 4 #define STMT_COLNUM_ERROR 5 #define STMT_NO_STMTSTRING 6 #define STMT_ERROR_TAKEN_FROM_BACKEND 7 #define STMT_INTERNAL_ERROR 8 #define STMT_STILL_EXECUTING 9 #define STMT_NOT_IMPLEMENTED_ERROR 10 #define STMT_BAD_PARAMETER_NUMBER_ERROR 11 #define STMT_OPTION_OUT_OF_RANGE_ERROR 12 #define STMT_INVALID_COLUMN_NUMBER_ERROR 13 #define STMT_RESTRICTED_DATA_TYPE_ERROR 14 #define STMT_INVALID_CURSOR_STATE_ERROR 15 #define STMT_OPTION_VALUE_CHANGED 16 #define STMT_CREATE_TABLE_ERROR 17 #define STMT_NO_CURSOR_NAME 18 #define STMT_INVALID_CURSOR_NAME 19 #define STMT_INVALID_ARGUMENT_NO 20 #define STMT_ROW_OUT_OF_RANGE 21 #define STMT_OPERATION_CANCELLED 22 #define STMT_INVALID_CURSOR_POSITION 23 #define STMT_VALUE_OUT_OF_RANGE 24 #define STMT_OPERATION_INVALID 25 #define STMT_PROGRAM_TYPE_OUT_OF_RANGE 26 #define STMT_BAD_ERROR 27 /* statement types */ enum { STMT_TYPE_UNKNOWN = -2, STMT_TYPE_OTHER = -1, STMT_TYPE_SELECT = 0, STMT_TYPE_INSERT, STMT_TYPE_UPDATE, STMT_TYPE_DELETE, STMT_TYPE_CREATE, STMT_TYPE_ALTER, STMT_TYPE_DROP, STMT_TYPE_GRANT, STMT_TYPE_REVOKE }; #define STMT_UPDATE(stmt) (stmt->statement_type > STMT_TYPE_SELECT) /* Parsing status */ enum { STMT_PARSE_NONE = 0, STMT_PARSE_COMPLETE, STMT_PARSE_INCOMPLETE, STMT_PARSE_FATAL }; /* Result style */ enum { STMT_FETCH_NONE = 0, STMT_FETCH_NORMAL, STMT_FETCH_EXTENDED }; typedef struct { COL_INFO *col_info; /* cached SQLColumns info for this table */ char name[MAX_TABLE_LEN+1]; char alias[MAX_TABLE_LEN+1]; } TABLE_INFO; typedef struct { TABLE_INFO *ti; /* resolve to explicit table names */ int precision; int display_size; int length; int type; char nullable; char func; char expr; char quote; char dquote; char numeric; char dot[MAX_TABLE_LEN+1]; char name[MAX_COLUMN_LEN+1]; char alias[MAX_COLUMN_LEN+1]; } FIELD_INFO; /******** Statement Handle ***********/ struct StatementClass_ { ConnectionClass *hdbc; /* pointer to ConnectionClass this statement belongs to */ QResultClass *result; /* result of the current statement */ HSTMT FAR *phstmt; StatementOptions options; STMT_Status status; char *errormsg; int errornumber; /* information on bindings */ BindInfoClass *bindings; /* array to store the binding information */ BindInfoClass bookmark; int bindings_allocated; /* information on statement parameters */ int parameters_allocated; ParameterInfoClass *parameters; Int4 currTuple; /* current absolute row number (GetData, SetPos, SQLFetch) */ int save_rowset_size; /* saved rowset size in case of change/FETCH_NEXT */ int rowset_start; /* start of rowset (an absolute row number) */ int bind_row; /* current offset for Multiple row/column binding */ int last_fetch_count; /* number of rows retrieved in last fetch/extended fetch */ int current_col; /* current column for GetData -- used to handle multiple calls */ int lobj_fd; /* fd of the current large object */ char *statement; /* if non--null pointer to the SQL statement that has been executed */ TABLE_INFO **ti; FIELD_INFO **fi; int nfld; int ntab; int parse_status; int statement_type; /* According to the defines above */ int data_at_exec; /* Number of params needing SQLPutData */ int current_exec_param; /* The current parameter for SQLPutData */ char put_data; /* Has SQLPutData been called yet? */ char errormsg_created; /* has an informative error msg been created? */ char manual_result; /* Is the statement result manually built? */ char prepare; /* is this statement a prepared statement or direct */ char internal; /* Is this statement being called internally? */ char cursor_name[MAX_CURSOR_LEN+1]; char stmt_with_params[65536 /* MAX_STATEMENT_LEN */]; /* statement after parameter substitution */ }; #define SC_get_conn(a) (a->hdbc) #define SC_get_Result(a) (a->result); /* options for SC_free_params() */ #define STMT_FREE_PARAMS_ALL 0 #define STMT_FREE_PARAMS_DATA_AT_EXEC_ONLY 1 /* Statement prototypes */ StatementClass *SC_Constructor(void); void InitializeStatementOptions(StatementOptions *opt); char SC_Destructor(StatementClass *self); int statement_type(char *statement); char parse_statement(StatementClass *stmt); void SC_pre_execute(StatementClass *self); char SC_unbind_cols(StatementClass *self); char SC_recycle_statement(StatementClass *self); void SC_clear_error(StatementClass *self); char SC_get_error(StatementClass *self, int *number, char **message); char *SC_create_errormsg(StatementClass *self); RETCODE SC_execute(StatementClass *self); RETCODE SC_fetch(StatementClass *self); void SC_free_params(StatementClass *self, char option); void SC_log_error(char *func, char *desc, StatementClass *self); unsigned long SC_get_bookmark(StatementClass *self); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/tuple.h0100644000076400007640000000306307363332153017127 0ustar nicknick /* File: tuple.h * * Description: See "tuple.c" * * Important NOTE: The TupleField structure is used both to hold backend data and * manual result set data. The "set_" functions and the TupleNode * structure are only used for manual result sets by info routines. * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __TUPLE_H__ #define __TUPLE_H__ #include "psqlodbc.h" /* Used by backend data AND manual result sets */ struct TupleField_ { Int4 len; /* length of the current Tuple */ void *value; /* an array representing the value */ }; /* Used ONLY for manual result sets */ struct TupleNode_ { struct TupleNode_ *prev, *next; TupleField tuple[1]; }; /* These macros are wrappers for the corresponding set_tuplefield functions but these handle automatic NULL determination and call set_tuplefield_null() if appropriate for the datatype (used by SQLGetTypeInfo). */ #define set_nullfield_string(FLD, VAL) ((VAL) ? set_tuplefield_string(FLD, (VAL)) : set_tuplefield_null(FLD)) #define set_nullfield_int2(FLD, VAL) ((VAL) != -1 ? set_tuplefield_int2(FLD, (VAL)) : set_tuplefield_null(FLD)) #define set_nullfield_int4(FLD, VAL) ((VAL) != -1 ? set_tuplefield_int4(FLD, (VAL)) : set_tuplefield_null(FLD)) void set_tuplefield_null(TupleField *tuple_field); void set_tuplefield_string(TupleField *tuple_field, char *string); void set_tuplefield_int2(TupleField *tuple_field, Int2 value); void set_tuplefield_int4(TupleField *tuple_field, Int4 value); #endif unixODBC-2.2.14-p2/Drivers/PostgreSQL/tuplelist.h0100644000076400007640000000156207363332153020025 0ustar nicknick /* File: tuplelist.h * * Description: See "tuplelist.c" * * Important Note: This structure and its functions are ONLY used in building manual result * sets for info functions (SQLTables, SQLColumns, etc.) * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __TUPLELIST_H__ #define __TUPLELIST_H__ #include "psqlodbc.h" struct TupleListClass_ { Int4 num_fields; Int4 num_tuples; TupleNode *list_start, *list_end, *lastref; Int4 last_indexed; }; #define TL_get_num_tuples(x) (x->num_tuples) /* Create a TupleList. Each tuple consits of fieldcnt columns */ TupleListClass *TL_Constructor(UInt4 fieldcnt); void TL_Destructor(TupleListClass *self); void *TL_get_fieldval(TupleListClass *self, Int4 tupleno, Int2 fieldno); char TL_add_tuple(TupleListClass *self, TupleNode *new_field); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/0040755000076400007640000000000011150523342015463 5ustar nicknickunixODBC-2.2.14-p2/Drivers/Postgre7.1/Makefile.am0100644000076400007640000000231011025760637017523 0ustar nicknicklib_LTLIBRARIES = libodbcpsql.la INCLUDES = -I@top_srcdir@/include libodbcpsql_la_LDFLAGS = \ -version-info 2:0:0 \ -no-undefined \ $(LIBSOCKET) $(LIBNSL) \ -export-dynamic \ -export-symbols @srcdir@/driver.exp -module DEFS = -DUNIXODBC @DEFS@ EXTRA_DIST = \ bind.h \ columninfo.h \ connection.h \ convert.h \ dlg_specific.h \ environ.h \ isql.h \ isqlext.h \ lobj.h \ md5.h \ misc.h \ pgtypes.h \ psqlodbc.h \ qresult.h \ resource.h \ socket.h \ statement.h \ tuple.h \ tuplelist.h \ notice.txt \ driver.exp libodbcpsql_la_LIBADD = \ ../../lst/liblstlc.la \ ../../log/libloglc.la \ ../../ini/libinilc.la \ ../../odbcinst/libodbcinstlc.la \ $(LIBLTDL) $(LIBADD_DL) \ $(LIBADD_CRYPT) $(LIBADD_POW) libodbcpsql_la_DEPENDENCIES = \ ../../lst/liblstlc.la \ ../../log/libloglc.la \ ../../ini/libinilc.la \ ../../odbcinst/libodbcinstlc.la \ ../../extras/libodbcextraslc.la libodbcpsql_la_SOURCES = \ bind.c \ columninfo.c \ connection.c \ convert.c \ dlg_specific.c \ drvconn.c \ environ.c \ execute.c \ info.c \ lobj.c \ md5.c \ misc.c \ options.c \ parse.c \ pgtypes.c \ psqlodbc.c \ qresult.c \ results.c \ socket.c \ statement.c \ tuple.c \ tuplelist.c unixODBC-2.2.14-p2/Drivers/Postgre7.1/Makefile.in0100644000076400007640000004456711111035232017536 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = Drivers/Postgre7.1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = am_libodbcpsql_la_OBJECTS = bind.lo columninfo.lo connection.lo \ convert.lo dlg_specific.lo drvconn.lo environ.lo execute.lo \ info.lo lobj.lo md5.lo misc.lo options.lo parse.lo pgtypes.lo \ psqlodbc.lo qresult.lo results.lo socket.lo statement.lo \ tuple.lo tuplelist.lo libodbcpsql_la_OBJECTS = $(am_libodbcpsql_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcpsql_la_SOURCES) DIST_SOURCES = $(libodbcpsql_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libodbcpsql.la INCLUDES = -I@top_srcdir@/include libodbcpsql_la_LDFLAGS = \ -version-info 2:0:0 \ -no-undefined \ $(LIBSOCKET) $(LIBNSL) \ -export-dynamic \ -export-symbols @srcdir@/driver.exp EXTRA_DIST = \ bind.h \ columninfo.h \ connection.h \ convert.h \ dlg_specific.h \ environ.h \ isql.h \ isqlext.h \ lobj.h \ md5.h \ misc.h \ pgtypes.h \ psqlodbc.h \ qresult.h \ resource.h \ socket.h \ statement.h \ tuple.h \ tuplelist.h \ notice.txt \ driver.exp libodbcpsql_la_LIBADD = \ ../../lst/liblstlc.la \ ../../log/libloglc.la \ ../../ini/libinilc.la \ ../../odbcinst/libodbcinstlc.la \ $(LIBLTDL) $(LIBADD_DL) \ $(LIBADD_CRYPT) $(LIBADD_POW) libodbcpsql_la_DEPENDENCIES = \ ../../lst/liblstlc.la \ ../../log/libloglc.la \ ../../ini/libinilc.la \ ../../odbcinst/libodbcinstlc.la \ ../../extras/libodbcextraslc.la libodbcpsql_la_SOURCES = \ bind.c \ columninfo.c \ connection.c \ convert.c \ dlg_specific.c \ drvconn.c \ environ.c \ execute.c \ info.c \ lobj.c \ md5.c \ misc.c \ options.c \ parse.c \ pgtypes.c \ psqlodbc.c \ qresult.c \ results.c \ socket.c \ statement.c \ tuple.c \ tuplelist.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Drivers/Postgre7.1/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Drivers/Postgre7.1/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcpsql.la: $(libodbcpsql_la_OBJECTS) $(libodbcpsql_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libodbcpsql_la_LDFLAGS) $(libodbcpsql_la_OBJECTS) $(libodbcpsql_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/columninfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlg_specific.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drvconn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/environ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lobj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgtypes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psqlodbc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qresult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/results.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tuple.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tuplelist.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES -module # 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: unixODBC-2.2.14-p2/Drivers/Postgre7.1/bind.c0100644000076400007640000003043210564052116016546 0ustar nicknick /* Module: bind.c * * Description: This module contains routines related to binding * columns and parameters. * * Classes: BindInfoClass, ParameterInfoClass * * API functions: SQLBindParameter, SQLBindCol, SQLDescribeParam, SQLNumParams, * SQLParamOptions(NI) * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "bind.h" #include "environ.h" #include "statement.h" #include "qresult.h" #include "pgtypes.h" #include #include #include "sql.h" #include "sqlext.h" /* Bind parameters on a statement handle */ SQLRETURN SQLBindParameter( SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT fParamType, SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLULEN cbColDef, SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue) { StatementClass *stmt = (StatementClass *) hstmt; static char* const func="SQLBindParameter"; mylog( "%s: entering...\n", func); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if(stmt->parameters_allocated < ipar) { ParameterInfoClass *old_parameters; int i, old_parameters_allocated; old_parameters = stmt->parameters; old_parameters_allocated = stmt->parameters_allocated; stmt->parameters = (ParameterInfoClass *) malloc(sizeof(ParameterInfoClass)*(ipar)); if ( ! stmt->parameters) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Could not allocate memory for statement parameters"); SC_log_error(func, "", stmt); return SQL_ERROR; } stmt->parameters_allocated = ipar; /* copy the old parameters over */ for(i = 0; i < old_parameters_allocated; i++) { /* a structure copy should work */ stmt->parameters[i] = old_parameters[i]; } /* get rid of the old parameters, if there were any */ if(old_parameters) free(old_parameters); /* zero out the newly allocated parameters (in case they skipped some, */ /* so we don't accidentally try to use them later) */ for(; i < stmt->parameters_allocated; i++) { stmt->parameters[i].buflen = 0; stmt->parameters[i].buffer = 0; stmt->parameters[i].used = 0; stmt->parameters[i].paramType = 0; stmt->parameters[i].CType = 0; stmt->parameters[i].SQLType = 0; stmt->parameters[i].precision = 0; stmt->parameters[i].scale = 0; stmt->parameters[i].data_at_exec = FALSE; stmt->parameters[i].lobj_oid = 0; stmt->parameters[i].EXEC_used = NULL; stmt->parameters[i].EXEC_buffer = NULL; } } ipar--; /* use zero based column numbers for the below part */ /* store the given info */ stmt->parameters[ipar].buflen = cbValueMax; stmt->parameters[ipar].buffer = rgbValue; stmt->parameters[ipar].used = pcbValue; stmt->parameters[ipar].paramType = fParamType; stmt->parameters[ipar].CType = fCType; stmt->parameters[ipar].SQLType = fSqlType; stmt->parameters[ipar].precision = cbColDef; stmt->parameters[ipar].scale = ibScale; /* If rebinding a parameter that had data-at-exec stuff in it, then free that stuff */ if (stmt->parameters[ipar].EXEC_used) { free(stmt->parameters[ipar].EXEC_used); stmt->parameters[ipar].EXEC_used = NULL; } if (stmt->parameters[ipar].EXEC_buffer) { if (stmt->parameters[ipar].SQLType != SQL_LONGVARBINARY) free(stmt->parameters[ipar].EXEC_buffer); stmt->parameters[ipar].EXEC_buffer = NULL; } /* Data at exec macro only valid for C char/binary data */ if ((fSqlType == SQL_LONGVARBINARY || fSqlType == SQL_LONGVARCHAR) && pcbValue && (*pcbValue <= SQL_LEN_DATA_AT_EXEC_OFFSET || *pcbValue == SQL_DATA_AT_EXEC )) stmt->parameters[ipar].data_at_exec = TRUE; else stmt->parameters[ipar].data_at_exec = FALSE; mylog("SQLBindParamater: ipar=%d, paramType=%d, fCType=%d, fSqlType=%d, cbColDef=%d, ibScale=%d, rgbValue=%d, *pcbValue = %d, data_at_exec = %d\n", ipar, fParamType, fCType, fSqlType, cbColDef, ibScale, rgbValue, pcbValue ? *pcbValue: -777, stmt->parameters[ipar].data_at_exec); return SQL_SUCCESS; } /* - - - - - - - - - */ /* Associate a user-supplied buffer with a database column. */ RETCODE SQL_API PG_SQLBindCol( HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue) { StatementClass *stmt = (StatementClass *) hstmt; static char* const func="SQLBindCol"; mylog( "%s: entering...\n", func); mylog("**** SQLBindCol: stmt = %u, icol = %d\n", stmt, icol); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } SC_clear_error(stmt); if( stmt->status == STMT_EXECUTING) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Can't bind columns while statement is still executing."); SC_log_error(func, "", stmt); return SQL_ERROR; } /* If the bookmark column is being bound, then just save it */ if (icol == 0) { if (rgbValue == NULL) { stmt->bookmark.buffer = NULL; stmt->bookmark.used = NULL; } else { /* Make sure it is the bookmark data type */ if ( fCType != SQL_C_BOOKMARK && fCType != SQL_C_BINARY ) { SC_set_error(stmt, STMT_PROGRAM_TYPE_OUT_OF_RANGE, "Column 0 is not of type SQL_C_BOOKMARK"); SC_log_error(func, "", stmt); return SQL_ERROR; } stmt->bookmark.buffer = rgbValue; stmt->bookmark.used = pcbValue; } return SQL_SUCCESS; } /* allocate enough bindings if not already done */ /* Most likely, execution of a statement would have setup the */ /* necessary bindings. But some apps call BindCol before any */ /* statement is executed. */ if ( icol > stmt->bindings_allocated) extend_bindings(stmt, icol); /* check to see if the bindings were allocated */ if ( ! stmt->bindings) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Could not allocate memory for bindings."); SC_log_error(func, "", stmt); return SQL_ERROR; } icol--; /* use zero based col numbers from here out */ /* Reset for SQLGetData */ stmt->bindings[icol].data_left = -1; if (rgbValue == NULL) { /* we have to unbind the column */ stmt->bindings[icol].buflen = 0; stmt->bindings[icol].buffer = NULL; stmt->bindings[icol].used = NULL; stmt->bindings[icol].returntype = SQL_C_CHAR; } else { /* ok, bind that column */ stmt->bindings[icol].buflen = cbValueMax; stmt->bindings[icol].buffer = rgbValue; stmt->bindings[icol].used = pcbValue; stmt->bindings[icol].returntype = fCType; mylog(" bound buffer[%d] = %u\n", icol, stmt->bindings[icol].buffer); } return SQL_SUCCESS; } SQLRETURN SQLBindCol(SQLHSTMT hstmt, SQLUSMALLINT icol, SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue) { return PG_SQLBindCol( hstmt, icol, fCType, rgbValue, cbValueMax, pcbValue ); } /* - - - - - - - - - */ /* Returns the description of a parameter marker. */ /* This function is listed as not being supported by SQLGetFunctions() because it is */ /* used to describe "parameter markers" (not bound parameters), in which case, */ /* the dbms should return info on the markers. Since Postgres doesn't support that, */ /* it is best to say this function is not supported and let the application assume a */ /* data type (most likely varchar). */ RETCODE SQL_API SQLDescribeParam( HSTMT hstmt, UWORD ipar, SWORD FAR *pfSqlType, SQLULEN *pcbColDef, SWORD FAR *pibScale, SWORD FAR *pfNullable) { StatementClass *stmt = (StatementClass *) hstmt; static char* const func = "SQLDescribeParam"; mylog( "%s: entering...\n", func); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if( (ipar < 1) || (ipar > stmt->parameters_allocated) ) { SC_set_error(stmt, STMT_BAD_PARAMETER_NUMBER_ERROR, "Invalid parameter number for SQLDescribeParam."); SC_log_error(func, "", stmt); return SQL_ERROR; } ipar--; /* This implementation is not very good, since it is supposed to describe */ /* parameter markers, not bound parameters. */ if(pfSqlType) *pfSqlType = stmt->parameters[ipar].SQLType; if(pcbColDef) *pcbColDef = stmt->parameters[ipar].precision; if(pibScale) *pibScale = stmt->parameters[ipar].scale; if(pfNullable) *pfNullable = pgtype_nullable(stmt, stmt->parameters[ipar].paramType); return SQL_SUCCESS; } /* - - - - - - - - - */ /* Sets multiple values (arrays) for the set of parameter markers. */ RETCODE SQL_API SQLParamOptions( HSTMT hstmt, SQLULEN crow, SQLULEN FAR *pirow) { static char* const func = "SQLParamOptions"; mylog( "%s: entering...\n", func); SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } /* - - - - - - - - - */ /* This function should really talk to the dbms to determine the number of */ /* "parameter markers" (not bound parameters) in the statement. But, since */ /* Postgres doesn't support that, the driver should just count the number of markers */ /* and return that. The reason the driver just can't say this function is unsupported */ /* like it does for SQLDescribeParam is that some applications don't care and try */ /* to call it anyway. */ /* If the statement does not have parameters, it should just return 0. */ RETCODE SQL_API SQLNumParams( HSTMT hstmt, SWORD FAR *pcpar) { StatementClass *stmt = (StatementClass *) hstmt; char in_quote = FALSE; unsigned int i; static char* const func = "SQLNumParams"; mylog( "%s: entering...\n", func); if(!stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if (pcpar) *pcpar = 0; else { SC_log_error(func, "pcpar was null", stmt); return SQL_ERROR; } if(!stmt->statement) { /* no statement has been allocated */ SC_set_error(stmt, STMT_SEQUENCE_ERROR, "SQLNumParams called with no statement ready."); SC_log_error(func, "", stmt); return SQL_ERROR; } else { size_t stlen=strlen(stmt->statement); for(i=0; i < stlen; i++) { if(stmt->statement[i] == '?' && !in_quote) (*pcpar)++; else { if (stmt->statement[i] == '\'') in_quote = (in_quote ? FALSE : TRUE); } } return SQL_SUCCESS; } } /******************************************************************** * Bindings Implementation */ BindInfoClass * create_empty_bindings(int num_columns) { BindInfoClass *new_bindings; int i; new_bindings = (BindInfoClass *)malloc(num_columns * sizeof(BindInfoClass)); if(!new_bindings) { return 0; } for(i=0; i < num_columns; i++) { new_bindings[i].buflen = 0; new_bindings[i].buffer = NULL; new_bindings[i].used = NULL; new_bindings[i].data_left = -1; } return new_bindings; } void extend_bindings(StatementClass *stmt, int num_columns) { static char* const func="extend_bindings"; BindInfoClass *new_bindings; int i; mylog("%s: entering ... stmt=%u, bindings_allocated=%d, num_columns=%d\n", func, stmt, stmt->bindings_allocated, num_columns); /* if we have too few, allocate room for more, and copy the old */ /* entries into the new structure */ if(stmt->bindings_allocated < num_columns) { new_bindings = create_empty_bindings(num_columns); if ( ! new_bindings) { mylog("%s: unable to create %d new bindings from %d old bindings\n", func, num_columns, stmt->bindings_allocated); if (stmt->bindings) { free(stmt->bindings); stmt->bindings = NULL; } stmt->bindings_allocated = 0; return; } if(stmt->bindings) { for(i=0; ibindings_allocated; i++) new_bindings[i] = stmt->bindings[i]; free(stmt->bindings); } stmt->bindings = new_bindings; stmt->bindings_allocated = num_columns; } /* There is no reason to zero out extra bindings if there are */ /* more than needed. If an app has allocated extra bindings, */ /* let it worry about it by unbinding those columns. */ /* SQLBindCol(1..) ... SQLBindCol(10...) # got 10 bindings */ /* SQLExecDirect(...) # returns 5 cols */ /* SQLExecDirect(...) # returns 10 cols (now OK) */ mylog("exit extend_bindings\n"); } unixODBC-2.2.14-p2/Drivers/Postgre7.1/columninfo.c0100644000076400007640000000762407530133125020011 0ustar nicknick /* Module: columninfo.c * * Description: This module contains routines related to * reading and storing the field information from a query. * * Classes: ColumnInfoClass (Functions prefix: "CI_") * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include "columninfo.h" #include "connection.h" #include "socket.h" #include #include ColumnInfoClass * CI_Constructor() { ColumnInfoClass *rv; rv = (ColumnInfoClass *) malloc(sizeof(ColumnInfoClass)); if (rv) { rv->num_fields = 0; rv->name = NULL; rv->adtid = NULL; rv->adtsize = NULL; rv->display_size = NULL; rv->atttypmod = NULL; } return rv; } void CI_Destructor(ColumnInfoClass *self) { if ( self ) { CI_free_memory(self); free(self); } } /* Read in field descriptions. If self is not null, then also store the information. If self is null, then just read, don't store. */ char CI_read_fields(ColumnInfoClass *self, ConnectionClass *conn) { Int2 lf; int new_num_fields; Oid new_adtid; Int2 new_adtsize; Int4 new_atttypmod = -1; char new_field_name[MAX_MESSAGE_LEN+1]; SocketClass *sock; ConnInfo *ci; sock = CC_get_socket(conn); ci = &conn->connInfo; /* at first read in the number of fields that are in the query */ new_num_fields = (Int2) SOCK_get_int(sock, sizeof(Int2)); mylog("num_fields = %d\n", new_num_fields); if (self) { /* according to that allocate memory */ CI_set_num_fields(self, new_num_fields); } /* now read in the descriptions */ for(lf = 0; lf < new_num_fields; lf++) { SOCK_get_string(sock, new_field_name, MAX_MESSAGE_LEN); new_adtid = (Oid) SOCK_get_int(sock, 4); new_adtsize = (Int2) SOCK_get_int(sock, 2); /* If 6.4 protocol, then read the atttypmod field */ if (PG_VERSION_GE(conn, 6.4)) { mylog("READING ATTTYPMOD\n"); new_atttypmod = (Int4) SOCK_get_int(sock, 4); /* Subtract the header length */ new_atttypmod -= 4; if (new_atttypmod < 0) new_atttypmod = -1; } mylog("CI_read_fields: fieldname='%s', adtid=%d, adtsize=%d, atttypmod=%d\n", new_field_name, new_adtid, new_adtsize, new_atttypmod); if (self) CI_set_field_info(self, lf, new_field_name, new_adtid, new_adtsize, new_atttypmod); } return (SOCK_get_errcode(sock) == 0); } void CI_free_memory(ColumnInfoClass *self) { register Int2 lf; int num_fields = self->num_fields; for (lf = 0; lf < num_fields; lf++) { if (self->name[lf]) { free(self->name[lf]); self->name[lf] = NULL; } } /* Safe to call even if null */ self->num_fields = 0; if (self->name) free(self->name); self->name = NULL; if (self->adtid) free(self->adtid); self->adtid = NULL; if (self->adtsize) free(self->adtsize); self->adtsize = NULL; if (self->display_size) free(self->display_size); self->display_size = NULL; if (self->atttypmod) free(self->atttypmod); self->atttypmod = NULL; } void CI_set_num_fields(ColumnInfoClass *self, int new_num_fields) { CI_free_memory(self); /* always safe to call */ self->num_fields = new_num_fields; self->name = (char **) malloc (sizeof(char *) * self->num_fields); self->adtid = (Oid *) malloc (sizeof(Oid) * self->num_fields); self->adtsize = (Int2 *) malloc (sizeof(Int2) * self->num_fields); self->display_size = (Int2 *) malloc(sizeof(Int2) * self->num_fields); self->atttypmod = (Int4 *) malloc(sizeof(Int4) * self->num_fields); } void CI_set_field_info(ColumnInfoClass *self, int field_num, char *new_name, Oid new_adtid, Int2 new_adtsize, Int4 new_atttypmod) { /* check bounds */ if((field_num < 0) || (field_num >= self->num_fields)) { return; } /* store the info */ self->name[field_num] = strdup(new_name); self->adtid[field_num] = new_adtid; self->adtsize[field_num] = new_adtsize; self->atttypmod[field_num] = new_atttypmod; self->display_size[field_num] = 0; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/connection.c0100644000076400007640000012773211025760643020007 0ustar nicknick /* Module: connection.c * * Description: This module contains routines related to * connecting to and disconnecting from the Postgres DBMS. * * Classes: ConnectionClass (Functions prefix: "CC_") * * API functions: SQLAllocConnect, SQLConnect, SQLDisconnect, SQLFreeConnect, * SQLBrowseConnect(NI) * * Comments: See "notice.txt" for copyright and license information. * */ #include "environ.h" #include "connection.h" #include "socket.h" #include "statement.h" #include "qresult.h" #include "lobj.h" #include "dlg_specific.h" #include #include #include #ifdef WIN32 #include #endif #ifdef UNIXODBC #include #ifdef HAVE_CRYPT_H #include #endif #include "md5.h" #endif #define STMT_INCREMENT 16 /* how many statement holders to allocate at a time */ #define PRN_NULLCHECK extern GLOBAL_VALUES globals; RETCODE SQL_API SQLAllocConnect(HENV henv, HDBC FAR *phdbc) { EnvironmentClass *env = (EnvironmentClass *)henv; ConnectionClass *conn; static char* const func="SQLAllocConnect"; mylog( "%s: entering...\n", func); conn = CC_Constructor(); mylog("**** %s: henv = %u, conn = %u\n", func, henv, conn); if( ! conn) { env->errornumber = ENV_ALLOC_ERROR; env->errormsg = "Couldn't allocate memory for Connection object."; *phdbc = SQL_NULL_HDBC; EN_log_error(func, "", env); return SQL_ERROR; } if ( ! EN_add_connection(env, conn)) { env->errornumber = ENV_ALLOC_ERROR; env->errormsg = "Maximum number of connections exceeded."; CC_Destructor(conn); *phdbc = SQL_NULL_HDBC; EN_log_error(func, "", env); return SQL_ERROR; } *phdbc = (HDBC) conn; return SQL_SUCCESS; } /* - - - - - - - - - */ RETCODE SQL_API SQLConnect( HDBC hdbc, UCHAR FAR *szDSN, SWORD cbDSN, UCHAR FAR *szUID, SWORD cbUID, UCHAR FAR *szAuthStr, SWORD cbAuthStr) { ConnectionClass *conn = (ConnectionClass *) hdbc; ConnInfo *ci; static char* const func = "SQLConnect"; mylog( "%s: entering...\n", func); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } ci = &conn->connInfo; make_string((char*)szDSN, cbDSN, ci->dsn); /* get the values for the DSN from the registry */ getDSNinfo(ci, CONN_OVERWRITE); /* initialize pg_version from connInfo.protocol */ CC_initialize_pg_version(conn); /* override values from DSN info with UID and authStr(pwd) This only occurs if the values are actually there. */ make_string((char*)szUID, cbUID, ci->username); make_string((char*)szAuthStr, cbAuthStr, ci->password); /* fill in any defaults */ getDSNdefaults(ci); qlog("conn = %u, %s(DSN='%s', UID='%s', PWD='%s')\n", conn, func, ci->dsn, ci->username, ci->password); if ( CC_connect(conn, AUTH_REQ_OK, NULL) <= 0) { /* Error messages are filled in */ CC_log_error(func, "Error on CC_connect", conn); return SQL_ERROR; } mylog( "%s: returning...\n", func); return SQL_SUCCESS; } /* - - - - - - - - - */ RETCODE SQL_API SQLBrowseConnect( HDBC hdbc, UCHAR FAR *szConnStrIn, SWORD cbConnStrIn, UCHAR FAR *szConnStrOut, SWORD cbConnStrOutMax, SWORD FAR *pcbConnStrOut) { static char* const func="SQLBrowseConnect"; mylog( "%s: entering...\n", func); return SQL_SUCCESS; } /* - - - - - - - - - */ /* Drop any hstmts open on hdbc and disconnect from database */ RETCODE SQL_API SQLDisconnect( HDBC hdbc) { ConnectionClass *conn = (ConnectionClass *) hdbc; static char* const func = "SQLDisconnect"; mylog( "%s: entering...\n", func); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } qlog("conn=%u, %s\n", conn, func); if (conn->status == CONN_EXECUTING) { CC_set_error(conn, CONN_IN_USE, "A transaction is currently being executed"); CC_log_error(func, "", conn); return SQL_ERROR; } mylog("%s: about to CC_cleanup\n", func); /* Close the connection and free statements */ CC_cleanup(conn); mylog("%s: done CC_cleanup\n", func); mylog("%s: returning...\n", func); return SQL_SUCCESS; } /* - - - - - - - - - */ RETCODE SQL_API SQLFreeConnect( HDBC hdbc) { ConnectionClass *conn = (ConnectionClass *) hdbc; static char* const func = "SQLFreeConnect"; mylog( "%s: entering...\n", func); mylog("**** in %s: hdbc=%u\n", func, hdbc); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } /* Remove the connection from the environment */ if ( ! EN_remove_connection((EnvironmentClass*)conn->henv, conn)) { CC_set_error(conn, CONN_IN_USE, "A transaction is currently being executed"); CC_log_error(func, "", conn); return SQL_ERROR; } CC_Destructor(conn); mylog("%s: returning...\n", func); return SQL_SUCCESS; } /* * * IMPLEMENTATION CONNECTION CLASS * */ ConnectionClass *CC_Constructor() { ConnectionClass *rv; rv = (ConnectionClass *)malloc(sizeof(ConnectionClass)); if (rv != NULL) { rv->henv = (HENV)NULL; /* not yet associated with an environment */ CC_clear_error(rv); rv->status = CONN_NOT_CONNECTED; rv->transact_status = CONN_IN_AUTOCOMMIT; /* autocommit by default */ memset(&rv->connInfo, 0, sizeof(ConnInfo)); rv->sock = SOCK_Constructor(); if ( ! rv->sock) return NULL; rv->stmts = (StatementClass **) malloc( sizeof(StatementClass *) * STMT_INCREMENT); if ( ! rv->stmts) return NULL; memset(rv->stmts, 0, sizeof(StatementClass *) * STMT_INCREMENT); rv->num_stmts = STMT_INCREMENT; rv->lobj_type = PG_TYPE_LO; rv->ntables = 0; rv->col_info = NULL; rv->translation_option = 0; rv->translation_handle = NULL; rv->DataSourceToDriver = NULL; rv->DriverToDataSource = NULL; memset(rv->pg_version, 0, sizeof(rv->pg_version)); rv->pg_version_number = .0; rv->pg_version_major = 0; rv->pg_version_minor = 0; /* Initialize statement options to defaults */ /* Statements under this conn will inherit these options */ InitializeStatementOptions(&rv->stmtOptions); } return rv; } char CC_Destructor(ConnectionClass *self) { mylog("enter CC_Destructor, self=%u\n", self); if (self->status == CONN_EXECUTING) return 0; CC_cleanup(self); /* cleanup socket and statements */ mylog("after CC_Cleanup\n"); /* Free up statement holders */ if (self->stmts) { free(self->stmts); self->stmts = NULL; } mylog("after free statement holders\n"); /* Free cached table info */ if (self->col_info) { int i; for (i = 0; i < self->ntables; i++) { if (self->col_info[i]->result) /* Free the SQLColumns result structure */ QR_Destructor(self->col_info[i]->result); free(self->col_info[i]); } CC_set_errormsg(self, NULL); free(self->col_info); } CC_set_errormsg(self, NULL); free(self); mylog("exit CC_Destructor\n"); return 1; } /* Return how many cursors are opened on this connection */ int CC_cursor_count(ConnectionClass *self) { StatementClass *stmt; int i, count = 0; mylog("CC_cursor_count: self=%u, num_stmts=%d\n", self, self->num_stmts); for (i = 0; i < self->num_stmts; i++) { stmt = self->stmts[i]; if (stmt && stmt->result && stmt->result->cursor) count++; } mylog("CC_cursor_count: returning %d\n", count); return count; } void CC_clear_error(ConnectionClass *self) { self->__error_number = 0; self->__error_message = NULL; self->errormsg_created = FALSE; } /* Used to cancel a transaction */ /* We are almost always in the middle of a transaction. */ char CC_abort(ConnectionClass *self) { QResultClass *res; if ( CC_is_in_trans(self)) { res = NULL; mylog("CC_abort: sending ABORT!\n"); res = CC_send_query(self, "ABORT", NULL); CC_set_no_trans(self); if (res != NULL) QR_Destructor(res); else return FALSE; } return TRUE; } /* This is called by SQLDisconnect also */ char CC_cleanup(ConnectionClass *self) { int i; StatementClass *stmt; if (self->status == CONN_EXECUTING) return FALSE; mylog("in CC_Cleanup, self=%u\n", self); /* Cancel an ongoing transaction */ /* We are always in the middle of a transaction, */ /* even if we are in auto commit. */ if (self->sock) CC_abort(self); /* * mimic closePGconn */ if ( self->sock) { SOCK_put_string( self->sock, "X" ); SOCK_flush_output( self->sock ); } mylog("after CC_abort\n"); /* This actually closes the connection to the dbase */ if (self->sock) { SOCK_Destructor(self->sock); self->sock = NULL; } mylog("after SOCK destructor\n"); /* Free all the stmts on this connection */ for (i = 0; i < self->num_stmts; i++) { if ( self->stmts ) { stmt = self->stmts[i]; if (stmt) { stmt->hdbc = NULL; /* prevent any more dbase interactions */ SC_Destructor(stmt); self->stmts[i] = NULL; } } } /* Check for translation dll */ #ifdef WIN32 if ( self->translation_handle) { FreeLibrary (self->translation_handle); self->translation_handle = NULL; } #endif mylog("exit CC_Cleanup\n"); return TRUE; } int CC_set_translation (ConnectionClass *self) { #ifdef WIN32 if (self->translation_handle != NULL) { FreeLibrary (self->translation_handle); self->translation_handle = NULL; } if (self->connInfo.translation_dll[0] == 0) return TRUE; self->translation_option = atoi (self->connInfo.translation_option); self->translation_handle = LoadLibrary (self->connInfo.translation_dll); if (self->translation_handle == NULL) { CC_set_error(self, CONN_UNABLE_TO_LOAD_DLL, "Could not load the translation DLL."); return FALSE; } self->DataSourceToDriver = (DataSourceToDriverProc) GetProcAddress (self->translation_handle, "SQLDataSourceToDriver"); self->DriverToDataSource = (DriverToDataSourceProc) GetProcAddress (self->translation_handle, "SQLDriverToDataSource"); if (self->DataSourceToDriver == NULL || self->DriverToDataSource == NULL) { CC_set_error(self, CONN_UNABLE_TO_LOAD_DLL, "Could not find translation DLL functions."); return FALSE; } #endif return TRUE; } static int md5_auth_send(ConnectionClass *self, const char *salt) { char *pwd1 = NULL, *pwd2 = NULL; ConnInfo *ci = &(self->connInfo); SocketClass *sock = self->sock; if (!(pwd1 = malloc(MD5_PASSWD_LEN + 1))) return 1; if (!EncryptMD5(ci->password, ci->username, strlen(ci->username), pwd1)) { free(pwd1); return 1; } if (!(pwd2 = malloc(MD5_PASSWD_LEN + 1))) { free(pwd1); return 1; } if (!EncryptMD5(pwd1 + strlen("md5"), salt, 4, pwd2)) { free(pwd2); free(pwd1); return 1; } free(pwd1); SOCK_put_int(sock, 4 + strlen(pwd2) + 1, 4); SOCK_put_n_char(sock, pwd2, strlen(pwd2) + 1); SOCK_flush_output(sock); free(pwd2); return 0; } char CC_connect(ConnectionClass *self, char password_req, char *salt_para) { StartupPacket sp; StartupPacket6_2 sp62; QResultClass *res; SocketClass *sock; ConnInfo *ci = &(self->connInfo); int areq = -1; int beresp; char msgbuffer[ERROR_MSG_LENGTH]; char salt[5], notice[512]; static char* const func="CC_connect"; char *encoding; mylog("%s: entering...\n", func); if (password_req != AUTH_REQ_OK) sock = self->sock; /* already connected, just authenticate */ else { qlog("Global Options: Version='%s', fetch=%d, socket=%d, unknown_sizes=%d, max_varchar_size=%d, max_longvarchar_size=%d\n", POSTGRESDRIVERVERSION, globals.fetch_max, globals.socket_buffersize, globals.unknown_sizes, globals.max_varchar_size, globals.max_longvarchar_size); qlog(" disable_optimizer=%d, ksqo=%d, unique_index=%d, use_declarefetch=%d\n", globals.disable_optimizer, globals.ksqo, globals.unique_index, globals.use_declarefetch); qlog(" text_as_longvarchar=%d, unknowns_as_longvarchar=%d, bools_as_char=%d\n", globals.text_as_longvarchar, globals.unknowns_as_longvarchar, globals.bools_as_char); qlog(" extra_systable_prefixes='%s', conn_settings='%s'\n", globals.extra_systable_prefixes, globals.conn_settings); if (self->status != CONN_NOT_CONNECTED) { CC_set_error(self, CONN_OPENDB_ERROR, "Already connected."); return 0; } if ( ci->server[0] == '\0' || ci->port[0] == '\0' || ci->database[0] == '\0') { CC_set_error(self, CONN_INIREAD_ERROR,"Missing server name, port, or database name in call to CC_connect."); return 0; } mylog("CC_connect(): DSN = '%s', server = '%s', port = '%s', database = '%s', username = '%s', password='%s'\n", ci->dsn, ci->server, ci->port, ci->database, ci->username, ci->password); another_version_retry: /* If the socket was closed for some reason (like a SQLDisconnect, but no SQLFreeConnect * then create a socket now. */ if ( ! self->sock) { self->sock = SOCK_Constructor(); if ( ! self->sock) { CC_set_error(self, CONNECTION_SERVER_NOT_REACHED, "Could not open a socket to the server"); return 0; } } sock = self->sock; mylog("connecting to the server socket...\n"); SOCK_connect_to(sock, (short) atoi(ci->port), ci->server, ci->uds); if (SOCK_get_errcode(sock) != 0) { mylog("connection to the server socket failed.\n"); CC_set_error(self, CONNECTION_SERVER_NOT_REACHED, "Could not connect to the server"); return 0; } mylog("connection to the server socket succeeded.\n"); if ( PROTOCOL_62(ci)) { sock->reverse = TRUE; /* make put_int and get_int work for 6.2 */ memset(&sp62, 0, sizeof(StartupPacket6_2)); SOCK_put_int(sock, htonl(4+sizeof(StartupPacket6_2)), 4); sp62.authtype = htonl(NO_AUTHENTICATION); strncpy(sp62.database, ci->database, PATH_SIZE); strncpy(sp62.user, ci->username, NAMEDATALEN); SOCK_put_n_char(sock, (char *) &sp62, sizeof(StartupPacket6_2)); SOCK_flush_output(sock); } else { memset(&sp, 0, sizeof(StartupPacket)); mylog("sizeof startup packet = %d\n", sizeof(StartupPacket)); /* Send length of Authentication Block */ SOCK_put_int(sock, 4+sizeof(StartupPacket), 4); if ( PROTOCOL_63(ci)) sp.protoVersion = (ProtocolVersion) htonl(PG_PROTOCOL_63); else sp.protoVersion = (ProtocolVersion) htonl(PG_PROTOCOL_LATEST); strncpy(sp.database, ci->database, SM_DATABASE); strncpy(sp.user, ci->username, SM_USER); SOCK_put_n_char(sock, (char *) &sp, sizeof(StartupPacket)); SOCK_flush_output(sock); } mylog("sent the authentication block.\n"); if (sock->errornumber != 0) { mylog("couldn't send the authentication block properly.\n"); CC_set_error(self, CONN_INVALID_AUTHENTICATION, "Sending the authentication packet failed"); return 0; } mylog("sent the authentication block successfully.\n"); } mylog("gonna do authentication\n"); /* *************************************************** */ /* Now get the authentication request from backend */ /* *************************************************** */ if (!PROTOCOL_62(ci)) { BOOL before_64 = PG_VERSION_LT(self, 6.4), ReadyForQuery = FALSE; do { if (password_req != AUTH_REQ_OK) beresp = 'R'; else { beresp = SOCK_get_char(sock); mylog("auth got '%c'\n", beresp); } switch (beresp) { case 'E': SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); CC_set_error(self, CONN_INVALID_AUTHENTICATION, msgbuffer); qlog("ERROR from backend during authentication: '%s'\n", msgbuffer); if (strncmp(msgbuffer, "Unsupported frontend protocol", 29) == 0) { /* retry older version */ if (PROTOCOL_63(ci)) strcpy(ci->protocol, PG62); else strcpy(ci->protocol, PG63); SOCK_Destructor(sock); self->sock = (SocketClass *) 0; CC_initialize_pg_version(self); goto another_version_retry; } return 0; case 'R': if (password_req != AUTH_REQ_OK) { mylog("in 'R' password_req=%s\n", ci->password); areq = password_req; if (salt_para) memcpy(salt, salt_para, sizeof(salt)); password_req = AUTH_REQ_OK; } else { areq = SOCK_get_int(sock, 4); if (areq == AUTH_REQ_MD5) SOCK_get_n_char(sock, salt, 4); else if (areq == AUTH_REQ_CRYPT) SOCK_get_n_char(sock, salt, 2); mylog("areq = %d\n", areq); } switch (areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: CC_set_error(self, CONN_AUTH_TYPE_UNSUPPORTED, "Kerberos 4 authentication not supported"); return 0; case AUTH_REQ_KRB5: CC_set_error(self, CONN_AUTH_TYPE_UNSUPPORTED, "Kerberos 5 authentication not supported"); return 0; case AUTH_REQ_PASSWORD: mylog("in AUTH_REQ_PASSWORD\n"); if (ci->password[0] == '\0') { CC_set_error(self, CONNECTION_NEED_PASSWORD, "A password is required for this connection."); return -areq; /* need password */ } mylog("past need password\n"); SOCK_put_int(sock, 4 + strlen(ci->password) + 1, 4); SOCK_put_n_char(sock, ci->password, strlen(ci->password) + 1); SOCK_flush_output(sock); mylog("past flush\n"); break; case AUTH_REQ_CRYPT: #ifdef HAVE_LIBCRYPT { char *password; mylog("in AUTH_REQ_CRYPT\n"); if (ci->password[0] == '\0') { CC_set_error(self, CONNECTION_NEED_PASSWORD, "A password is required for this connection."); return -1; /* need password */ } mylog("past need password\n"); password = crypt( ci -> password, salt ); SOCK_put_int(sock, 4+strlen(password)+1, 4); SOCK_put_n_char(sock, password, strlen(password) + 1); SOCK_flush_output(sock); mylog("past flush\n"); break; } #else CC_set_error(self, CONN_AUTH_TYPE_UNSUPPORTED, "Password crypt authentication not supported."); #endif return 0; case AUTH_REQ_MD5: mylog("in AUTH_REQ_MD5\n"); if (ci->password[0] == '\0') { CC_set_error(self, CONNECTION_NEED_PASSWORD, "A password is required for this connection."); if (salt_para) memcpy(salt_para, salt, sizeof(salt)); return -areq; /* need password */ } if (md5_auth_send(self, salt)) { CC_set_error(self, CONN_INVALID_AUTHENTICATION, "md5 hashing failed"); return 0; } break; case AUTH_REQ_SCM_CREDS: CC_set_error(self, CONN_AUTH_TYPE_UNSUPPORTED, "Unix socket credential authentication not supported"); return 0; default: CC_set_error(self, CONN_AUTH_TYPE_UNSUPPORTED, "Unknown authentication type"); return 0; } break; case 'K': /* Secret key (6.4 protocol) */ self->be_pid = SOCK_get_int(sock, 4); /* pid */ self->be_key = SOCK_get_int(sock, 4); /* key */ break; case 'Z': /* Backend is ready for new query (6.4) */ ReadyForQuery = TRUE; break; case 'N': /* Notices may come */ while (SOCK_get_string(sock, notice, sizeof(notice) - 1)) ; break; default: CC_set_error(self, CONN_INVALID_AUTHENTICATION, "Unexpected protocol character during authentication"); return 0; } /* * There were no ReadyForQuery responce before 6.4. */ if (before_64 && areq == AUTH_REQ_OK) ReadyForQuery = TRUE; } while (!ReadyForQuery); } CC_set_errormsg(self, NULL); CC_clear_error(self); /* clear any password error */ /* send an empty query in order to find out whether the specified */ /* database really exists on the server machine */ mylog("sending an empty query...\n"); res = CC_send_query(self, " ", NULL); if ( res == NULL || QR_get_status(res) != PGRES_EMPTY_QUERY) { mylog("got no result from the empty query. (probably database does not exist)\n"); CC_set_error(self, CONNECTION_NO_SUCH_DATABASE, "The database does not exist on the server\nor user authentication failed."); if (res != NULL) QR_Destructor(res); if( self->sock ) { SOCK_Destructor(self->sock); self->sock = NULL; } return 0; } if (res) QR_Destructor(res); mylog("empty query seems to be OK.\n"); CC_set_translation (self); /**********************************************/ /******* Send any initial settings *********/ /**********************************************/ /* Since these functions allocate statements, and since the connection is not established yet, it would violate odbc state transition rules. Therefore, these functions call the corresponding local function instead. */ CC_send_settings(self); CC_lookup_lo(self); /* a hack to get the oid of our large object oid type */ CC_lookup_pg_version(self); /* Get PostgreSQL version for SQLGetInfo use */ CC_set_errormsg(self, NULL); CC_clear_error(self); /* clear any initial command errors */ self->status = CONN_CONNECTED; mylog("%s: returning...\n", func); return 1; } char CC_add_statement(ConnectionClass *self, StatementClass *stmt) { int i; mylog("CC_add_statement: self=%u, stmt=%u\n", self, stmt); for (i = 0; i < self->num_stmts; i++) { if ( !self->stmts[i]) { stmt->hdbc = self; self->stmts[i] = stmt; return TRUE; } } /* no more room -- allocate more memory */ self->stmts = (StatementClass **) realloc( self->stmts, sizeof(StatementClass *) * (STMT_INCREMENT + self->num_stmts)); if ( ! self->stmts) return FALSE; memset(&self->stmts[self->num_stmts], 0, sizeof(StatementClass *) * STMT_INCREMENT); stmt->hdbc = self; self->stmts[self->num_stmts] = stmt; self->num_stmts += STMT_INCREMENT; return TRUE; } char CC_remove_statement(ConnectionClass *self, StatementClass *stmt) { int i; for (i = 0; i < self->num_stmts; i++) { if (self->stmts[i] == stmt && stmt->status != STMT_EXECUTING) { self->stmts[i] = NULL; return TRUE; } } return FALSE; } /* Create a more informative error message by concatenating the connection error message with its socket error message. */ char * CC_create_errormsg(ConnectionClass *self) { SocketClass *sock = self->sock; int pos; static char msg[4096]; mylog("enter CC_create_errormsg\n"); msg[0] = '\0'; if (CC_get_errormsg(self)) strncpy(msg, CC_get_errormsg(self), sizeof(msg)); mylog("msg = '%s'\n", msg); if (sock && sock->errormsg && sock->errormsg[0] != '\0') { pos = strlen(msg); sprintf(&msg[pos], ";\n%s", sock->errormsg); } mylog("exit CC_create_errormsg\n"); return msg ? strdup(msg) : NULL; } void CC_set_error(ConnectionClass *self, int number, const char *message) { if (self->__error_message) free(self->__error_message); self->__error_number = number; self->__error_message = message ? strdup(message) : NULL; } void CC_set_errormsg(ConnectionClass *self, const char *message) { if (self->__error_message) free(self->__error_message); self->__error_message = message ? strdup(message) : NULL; } char CC_get_error(ConnectionClass *self, int *number, char **message) { int rv; char *msgcrt; mylog("enter CC_get_error\n"); /* Create a very informative errormsg if it hasn't been done yet. */ if ( ! self->errormsg_created) { msgcrt = CC_create_errormsg(self); if (self->__error_message) free(self->__error_message); self->__error_message = msgcrt; self->errormsg_created = TRUE; } if (CC_get_errornumber(self)) { *number = CC_get_errornumber(self); *message = CC_get_errormsg(self); } rv = (CC_get_errornumber(self) != 0); self->__error_number = 0; /* clear the error */ mylog("exit CC_get_error\n"); return rv; } /* The "result_in" is only used by QR_next_tuple() to fetch another group of rows into the same existing QResultClass (this occurs when the tuple cache is depleted and needs to be re-filled). The "cursor" is used by SQLExecute to associate a statement handle as the cursor name (i.e., C3326857) for SQL select statements. This cursor is then used in future 'declare cursor C3326857 for ...' and 'fetch 100 in C3326857' statements. */ QResultClass * CC_send_query(ConnectionClass *self, char *query, QueryInfo *qi) { QResultClass *result_in, *res = NULL; char swallow; int id; SocketClass *sock = self->sock; static char msgbuffer[MAX_MESSAGE_LEN+1]; char cmdbuffer[MAX_MESSAGE_LEN+1]; /* QR_set_command() dups this string so dont need static */ mylog("send_query(): conn=%u, query='%s'\n", self, query); qlog("conn=%u, query='%s'\n", self, query); /* Indicate that we are sending a query to the backend */ if(strlen(query) > MAX_MESSAGE_LEN-2) { CC_set_error(self, CONNECTION_MSG_TOO_LONG, "Query string is too long"); return NULL; } if ((NULL == query) || (query[0] == '\0')) return NULL; if (SOCK_get_errcode(sock) != 0) { CC_set_error(self, CONNECTION_COULD_NOT_SEND, "Could not send Query to backend"); CC_set_no_trans(self); return NULL; } SOCK_put_char(sock, 'Q'); if (SOCK_get_errcode(sock) != 0) { CC_set_error(self, CONNECTION_COULD_NOT_SEND, "Could not send Query to backend"); CC_set_no_trans(self); return NULL; } SOCK_put_string(sock, query); SOCK_flush_output(sock); if (SOCK_get_errcode(sock) != 0) { CC_set_error(self, CONNECTION_COULD_NOT_SEND, "Could not send Query to backend"); CC_set_no_trans(self); return NULL; } mylog("send_query: done sending query\n"); while(1) { /* what type of message is coming now ? */ id = SOCK_get_char(sock); if ((SOCK_get_errcode(sock) != 0) || (id == EOF)) { CC_set_error(self, CONNECTION_NO_RESPONSE, "No response from the backend"); if (res) QR_Destructor(res); mylog("send_query: 'id' - %s\n", CC_get_errormsg(self)); CC_set_no_trans(self); return NULL; } mylog("send_query: got id = '%c'\n", id); switch (id) { case 'A' : /* Asynchronous Messages are ignored */ (void)SOCK_get_int(sock, 4); /* id of notification */ SOCK_get_string(sock, msgbuffer, MAX_MESSAGE_LEN); /* name of the relation the message comes from */ break; case 'C' : /* portal query command, no tuples returned */ /* read in the return message from the backend */ SOCK_get_string(sock, cmdbuffer, MAX_MESSAGE_LEN); if (SOCK_get_errcode(sock) != 0) { CC_set_error(self, CONNECTION_NO_RESPONSE, "No response from backend while receiving a portal query command"); mylog("send_query: 'C' - %s\n", CC_get_errormsg(self)); CC_set_no_trans(self); if (res) QR_Destructor(res); return NULL; } else { char clear = 0; mylog("send_query: ok - 'C' - %s\n", cmdbuffer); if (res) { QR_Destructor(res); res = NULL; } if (res == NULL) /* allow for "show" style notices */ res = QR_Constructor(); mylog("send_query: setting cmdbuffer = '%s'\n", cmdbuffer); /* Only save the first command */ QR_set_status(res, PGRES_COMMAND_OK); QR_set_command(res, cmdbuffer); /* (Quotation from the original comments) since backend may produce more than one result for some commands we need to poll until clear so we send an empty query, and keep reading out of the pipe until an 'I' is received */ SOCK_put_string(sock, "Q "); SOCK_flush_output(sock); while( ! clear) { id = SOCK_get_char(sock); if ((SOCK_get_errcode(sock) != 0) || (id == EOF)) { CC_set_error(self, CONNECTION_NO_RESPONSE, "No response from the backend"); if (res) { QR_Destructor(res); } mylog("send_query: id=%d error=%s \n", id, "No response from the backend"); CC_set_no_trans(self); return NULL; } switch(id) { case 'I': (void) SOCK_get_char(sock); clear = TRUE; break; case 'Z': break; case 'C': SOCK_get_string(sock, cmdbuffer, ERROR_MSG_LENGTH); qlog("Command response: '%s'\n", cmdbuffer); break; case 'N': SOCK_get_string(sock, cmdbuffer, ERROR_MSG_LENGTH); qlog("NOTICE from backend during clear: '%s'\n", cmdbuffer); break; case 'E': SOCK_get_string(sock, cmdbuffer, ERROR_MSG_LENGTH); qlog("ERROR from backend during clear: '%s'\n", cmdbuffer); /* We must report this type of error as well (practically for reference integrity violation error reporting, from PostgreSQL 7.0). (Zoltan Kovacs, 04/26/2000) */ CC_set_errormsg(self, cmdbuffer); if ( ! strncmp(cmdbuffer, "FATAL", 5)) { CC_set_errornumber(self, CONNECTION_SERVER_REPORTED_ERROR); CC_set_no_trans(self); } else CC_set_errornumber(self, CONNECTION_SERVER_REPORTED_WARNING); QR_set_status(res, PGRES_NONFATAL_ERROR); QR_set_aborted(res, TRUE); break; } } mylog("send_query: returning res = %u\n", res); return res; } case 'K': /* Secret key (6.4 protocol) */ (void)SOCK_get_int(sock, 4); /* pid */ (void)SOCK_get_int(sock, 4); /* key */ break; case 'Z': /* Backend is ready for new query (6.4) */ break; case 'N' : /* NOTICE: */ SOCK_get_string(sock, cmdbuffer, ERROR_MSG_LENGTH); if (res) QR_Destructor(res); res = QR_Constructor(); QR_set_status(res, PGRES_NONFATAL_ERROR); QR_set_notice(res, cmdbuffer); /* will dup this string */ mylog("~~~ NOTICE: '%s'\n", cmdbuffer); qlog("NOTICE from backend during send_query: '%s'\n", cmdbuffer); continue; /* dont return a result -- continue reading */ case 'I' : /* The server sends an empty query */ /* There is a closing '\0' following the 'I', so we eat it */ swallow = SOCK_get_char(sock); if ((swallow != '\0') || SOCK_get_errcode(sock) != 0) { CC_set_error(self, CONNECTION_BACKEND_CRAZY, "Unexpected protocol character from backend (send_query - I)"); if (res) QR_Destructor(res); res = QR_Constructor(); QR_set_status(res, PGRES_FATAL_ERROR); return res; } else { /* We return the empty query */ if (res) QR_Destructor(res); res = QR_Constructor(); QR_set_status(res, PGRES_EMPTY_QUERY); return res; } break; case 'E' : SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); /* Remove a newline */ if (msgbuffer[0] != '\0' && msgbuffer[strlen(msgbuffer)-1] == '\n') msgbuffer[strlen(msgbuffer)-1] = '\0'; CC_set_errormsg(self, msgbuffer); mylog("send_query: 'E' - %s\n", msgbuffer); qlog("ERROR from backend during send_query: '%s'\n", msgbuffer); /* We should report that an error occured. Zoltan */ if (res) QR_Destructor(res); res = QR_Constructor(); if ( ! strncmp(msgbuffer, "FATAL", 5)) { CC_set_errornumber(self, CONNECTION_SERVER_REPORTED_ERROR); CC_set_no_trans(self); QR_set_status(res, PGRES_FATAL_ERROR); } else { CC_set_errornumber(self, CONNECTION_SERVER_REPORTED_WARNING); QR_set_status(res, PGRES_NONFATAL_ERROR); } QR_set_aborted(res, TRUE); return res; /* instead of NULL. Zoltan */ case 'P' : /* get the Portal name */ SOCK_get_string(sock, msgbuffer, MAX_MESSAGE_LEN); break; case 'T': /* Tuple results start here */ result_in = qi ? qi->result_in : NULL; if ( result_in == NULL) { result_in = QR_Constructor(); mylog("send_query: 'T' no result_in: res = %u\n", result_in); if ( ! result_in) { CC_set_error(self, CONNECTION_COULD_NOT_RECEIVE, "Could not create result info in send_query."); if (res) QR_Destructor(res); return NULL; } if (qi) QR_set_cache_size(result_in, qi->row_size); if ( ! QR_fetch_tuples(result_in, self, qi ? qi->cursor : NULL)) { CC_set_errornumber(self, CONNECTION_COULD_NOT_RECEIVE); if (res) QR_Destructor(res); CC_set_errormsg(self, QR_get_message(result_in)); return NULL; } } else { /* next fetch, so reuse an existing result */ if ( ! QR_fetch_tuples(result_in, NULL, NULL)) { CC_set_error(self, CONNECTION_COULD_NOT_RECEIVE, QR_get_message(result_in)); if (res) QR_Destructor(res); return NULL; } } return result_in; case 'D': /* Copy in command began successfully */ if (res) QR_Destructor(res); res = QR_Constructor(); QR_set_status(res, PGRES_COPY_IN); return res; case 'B': /* Copy out command began successfully */ if (res) QR_Destructor(res); res = QR_Constructor(); QR_set_status(res, PGRES_COPY_OUT); return res; default: CC_set_error(self, CONNECTION_BACKEND_CRAZY, "Unexpected protocol character from backend (send_query)"); CC_set_no_trans(self); mylog("send_query: error - %s\n", CC_get_errormsg(self)); if (res) QR_Destructor(res); return NULL; } } } int CC_send_function(ConnectionClass *self, int fnid, void *result_buf, int *actual_result_len, int result_is_int, LO_ARG *args, int nargs) { char id, c, done; SocketClass *sock = self->sock; static char msgbuffer[MAX_MESSAGE_LEN+1]; int i; mylog("send_function(): conn=%u, fnid=%d, result_is_int=%d, nargs=%d\n", self, fnid, result_is_int, nargs); if (SOCK_get_errcode(sock) != 0) { CC_set_error(self, CONNECTION_COULD_NOT_SEND, "Could not send function to backend"); CC_set_no_trans(self); return FALSE; } SOCK_put_string(sock, "F "); if (SOCK_get_errcode(sock) != 0) { CC_set_error(self, CONNECTION_COULD_NOT_SEND, "Could not send function to backend"); CC_set_no_trans(self); return FALSE; } SOCK_put_int(sock, fnid, 4); SOCK_put_int(sock, nargs, 4); mylog("send_function: done sending function\n"); for (i = 0; i < nargs; ++i) { mylog(" arg[%d]: len = %d, isint = %d, integer = %d, ptr = %u\n", i, args[i].len, args[i].isint, args[i].u.integer, args[i].u.ptr); SOCK_put_int(sock, args[i].len, 4); if (args[i].isint) SOCK_put_int(sock, args[i].u.integer, 4); else SOCK_put_n_char(sock, (char *) args[i].u.ptr, args[i].len); } mylog(" done sending args\n"); SOCK_flush_output(sock); mylog(" after flush output\n"); done = FALSE; while ( ! done) { id = SOCK_get_char(sock); mylog(" got id = %c\n", id); switch(id) { case 'V': done = TRUE; break; /* ok */ case 'N': SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); mylog("send_function(V): 'N' - %s\n", msgbuffer); /* continue reading */ break; case 'E': SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); CC_set_errormsg(self, msgbuffer); mylog("send_function(V): 'E' - %s\n", msgbuffer); qlog("ERROR from backend during send_function: '%s'\n", msgbuffer); return FALSE; case 'Z': break; default: CC_set_error(self, CONNECTION_BACKEND_CRAZY, "Unexpected protocol character from backend (send_function, args)"); CC_set_no_trans(self); mylog("send_function: error - %s\n", CC_get_errormsg(self)); return FALSE; } } id = SOCK_get_char(sock); for (;;) { switch (id) { case 'G': /* function returned properly */ mylog(" got G!\n"); *actual_result_len = SOCK_get_int(sock, 4); mylog(" actual_result_len = %d\n", *actual_result_len); if (result_is_int) *((int *) result_buf) = SOCK_get_int(sock, 4); else SOCK_get_n_char(sock, (char *) result_buf, *actual_result_len); mylog(" after get result\n"); c = SOCK_get_char(sock); /* get the last '0' */ mylog(" after get 0\n"); return TRUE; case 'E': SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); CC_set_errormsg(self, msgbuffer); mylog("send_function(G): 'E' - %s\n", msgbuffer); qlog("ERROR from backend during send_function: '%s'\n", msgbuffer); return FALSE; case 'N': SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); mylog("send_function(G): 'N' - %s\n", msgbuffer); qlog("NOTICE from backend during send_function: '%s'\n", msgbuffer); continue; /* dont return a result -- continue reading */ case '0': /* empty result */ return TRUE; default: CC_set_error(self, CONNECTION_BACKEND_CRAZY, "Unexpected protocol character from backend (send_function, result)"); CC_set_no_trans(self); mylog("send_function: error - %s\n", CC_get_errormsg(self)); return FALSE; } } } char CC_send_settings(ConnectionClass *self) { /* char ini_query[MAX_MESSAGE_LEN]; */ ConnInfo *ci = &(self->connInfo); /* QResultClass *res; */ HSTMT hstmt; StatementClass *stmt; RETCODE result; char status = TRUE; char *cs, *ptr; static char* const func="CC_send_settings"; mylog("%s: entering...\n", func); /* This function must use the local odbc API functions since the odbc state has not transitioned to "connected" yet. */ result = PG_SQLAllocStmt( self, &hstmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { return FALSE; } stmt = (StatementClass *) hstmt; stmt->internal = TRUE; /* ensure no BEGIN/COMMIT/ABORT stuff */ /* Set the Datestyle to the format the driver expects it to be in */ result = PG_SQLExecDirect(hstmt, "set DateStyle to 'ISO'", SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) status = FALSE; mylog("%s: result %d, status %d from set DateStyle\n", func, result, status); /* Disable genetic optimizer based on global flag */ if (globals.disable_optimizer) { result = PG_SQLExecDirect(hstmt, "set geqo to 'OFF'", SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) status = FALSE; mylog("%s: result %d, status %d from set geqo\n", func, result, status); } /* KSQO */ if (globals.ksqo) { result = PG_SQLExecDirect(hstmt, "set ksqo to 'ON'", SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) status = FALSE; mylog("%s: result %d, status %d from set ksqo\n", func, result, status); } /* Global settings */ if (globals.conn_settings[0] != '\0') { cs = strdup(globals.conn_settings); ptr = strtok(cs, ";"); while (ptr) { result = PG_SQLExecDirect(hstmt, ptr, SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) status = FALSE; mylog("%s: result %d, status %d from '%s'\n", func, result, status, ptr); ptr = strtok(NULL, ";"); } free(cs); } /* Per Datasource settings */ if (ci->conn_settings[0] != '\0') { cs = strdup(ci->conn_settings); ptr = strtok(cs, ";"); while (ptr) { result = PG_SQLExecDirect(hstmt, ptr, SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) status = FALSE; mylog("%s: result %d, status %d from '%s'\n", func, result, status, ptr); ptr = strtok(NULL, ";"); } free(cs); } PG_SQLFreeStmt(hstmt, SQL_DROP); return status; } /* This function is just a hack to get the oid of our Large Object oid type. If a real Large Object oid type is made part of Postgres, this function will go away and the define 'PG_TYPE_LO' will be updated. */ void CC_lookup_lo(ConnectionClass *self) { HSTMT hstmt; StatementClass *stmt; RETCODE result; static char* const func = "CC_lookup_lo"; mylog( "%s: entering...\n", func); /* This function must use the local odbc API functions since the odbc state has not transitioned to "connected" yet. */ result = PG_SQLAllocStmt( self, &hstmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { return; } stmt = (StatementClass *) hstmt; result = PG_SQLExecDirect(hstmt, "select oid from pg_type where typname='" PG_TYPE_LO_NAME "'", SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { PG_SQLFreeStmt(hstmt, SQL_DROP); return; } result = PG_SQLFetch(hstmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { PG_SQLFreeStmt(hstmt, SQL_DROP); return; } result = PG_SQLGetData(hstmt, 1, SQL_C_SLONG, &self->lobj_type, sizeof(self->lobj_type), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { PG_SQLFreeStmt(hstmt, SQL_DROP); return; } mylog("Got the large object oid: %d\n", self->lobj_type); qlog(" [ Large Object oid = %d ]\n", self->lobj_type); result = PG_SQLFreeStmt(hstmt, SQL_DROP); } /* This function initializes the version of PostgreSQL from connInfo.protocol that we're connected to. h-inoue 01-2-2001 */ void CC_initialize_pg_version(ConnectionClass *self) { strcpy(self->pg_version, self->connInfo.protocol); if (PROTOCOL_62(&self->connInfo)) { self->pg_version_number = (float) 6.2; self->pg_version_major = 6; self->pg_version_minor = 2; } else if (PROTOCOL_63(&self->connInfo)) { self->pg_version_number = (float) 6.3; self->pg_version_major = 6; self->pg_version_minor = 3; } else { self->pg_version_number = (float) 6.4; self->pg_version_major = 6; self->pg_version_minor = 4; } } /* This function gets the version of PostgreSQL that we're connected to. This is used to return the correct info in SQLGetInfo DJP - 25-1-2001 */ void CC_lookup_pg_version(ConnectionClass *self) { HSTMT hstmt; StatementClass *stmt; RETCODE result; char szVersion[32]; int major, minor; static char* const func = "CC_lookup_pg_version"; mylog( "%s: entering...\n", func); /* This function must use the local odbc API functions since the odbc state has not transitioned to "connected" yet. */ result = PG_SQLAllocStmt( self, &hstmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { return; } stmt = (StatementClass *) hstmt; /* get the server's version if possible */ result = PG_SQLExecDirect(hstmt, "select version()", SQL_NTS); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { PG_SQLFreeStmt(hstmt, SQL_DROP); return; } result = PG_SQLFetch(hstmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { PG_SQLFreeStmt(hstmt, SQL_DROP); return; } result = PG_SQLGetData(hstmt, 1, SQL_C_CHAR, self->pg_version, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { PG_SQLFreeStmt(hstmt, SQL_DROP); return; } /* Extract the Major and Minor numbers from the string. */ /* This assumes the string starts 'Postgresql X.X' */ strcpy(szVersion, "0.0"); if (sscanf(self->pg_version, "%*s %d.%d", &major, &minor) >= 2) { sprintf(szVersion, "%d.%d", major, minor); self->pg_version_major = major; self->pg_version_minor = minor; } self->pg_version_number = (float) atof(szVersion); mylog("Got the PostgreSQL version string: '%s'\n", self->pg_version); mylog("Extracted PostgreSQL version number: '%1.1f'\n", self->pg_version_number); qlog(" [ PostgreSQL version string = '%s' ]\n", self->pg_version); qlog(" [ PostgreSQL version number = '%1.1f' ]\n", self->pg_version_number); result = PG_SQLFreeStmt(hstmt, SQL_DROP); } void CC_log_error(char *func, char *desc, ConnectionClass *self) { #ifdef PRN_NULLCHECK #define nullcheck(a) (a ? a : "(NULL)") #endif if (self) { qlog("CONN ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->__error_number, nullcheck (self->__error_message)); mylog("CONN ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->__error_number, nullcheck (self->__error_message)); qlog(" ------------------------------------------------------------\n"); qlog(" henv=%u, conn=%u, status=%u, num_stmts=%d\n", self->henv, self, self->status, self->num_stmts); qlog(" sock=%u, stmts=%u, lobj_type=%d\n", self->sock, self->stmts, self->lobj_type); qlog(" ---------------- Socket Info -------------------------------\n"); if (self->sock) { SocketClass *sock = self->sock; qlog(" socket=%d, reverse=%d, errornumber=%d, errormsg='%s'\n", sock->socket, sock->reverse, sock->errornumber, nullcheck(sock->errormsg)); qlog(" buffer_in=%u, buffer_out=%u\n", sock->buffer_in, sock->buffer_out); qlog(" buffer_filled_in=%d, buffer_filled_out=%d, buffer_read_in=%d\n", sock->buffer_filled_in, sock->buffer_filled_out, sock->buffer_read_in); } } else qlog("INVALID CONNECTION HANDLE ERROR: func=%s, desc='%s'\n", func, desc); #undef PRN_NULLCHECK } unixODBC-2.2.14-p2/Drivers/Postgre7.1/convert.c0100644000076400007640000012771710564052116017327 0ustar nicknick /* Module: convert.c * * Description: This module contains routines related to * converting parameters and columns into requested data types. * Parameters are converted from their SQL_C data types into * the appropriate postgres type. Columns are converted from * their postgres type (SQL type) into the appropriate SQL_C * data type. * * Classes: n/a * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "psqlodbc.h" #ifndef WIN32 #include "isql.h" #include "isqlext.h" #else #include #include #include #endif #include #ifdef HAVE_LOCALE_H #include #endif #include #include "convert.h" #include "statement.h" #include "qresult.h" #include "bind.h" #include "pgtypes.h" #include "lobj.h" #include "connection.h" #ifndef WIN32 #ifndef HAVE_STRICMP #define stricmp(s1,s2) strcasecmp(s1,s2) #define strnicmp(s1,s2,n) strncasecmp(s1,s2,n) #endif #endif extern GLOBAL_VALUES globals; /* How to map ODBC scalar functions {fn func(args)} to Postgres * This is just a simple substitution * List augmented from * http://www.merant.com/datadirect/download/docs/odbc16/Odbcref/rappc.htm * - thomas 2000-04-03 */ char* const mapFuncs[][2] = { /* { "ASCII", "ascii" }, */ { "CHAR", "chr" }, { "CONCAT", "textcat" }, /* { "DIFFERENCE", "difference" }, */ /* { "INSERT", "insert" }, */ { "LCASE", "lower" }, { "LEFT", "ltrunc" }, { "LOCATE", "strpos" }, { "LENGTH", "char_length"}, /* { "LTRIM", "ltrim" }, */ { "RIGHT", "rtrunc" }, /* { "REPEAT", "repeat" }, */ /* { "REPLACE", "replace" }, */ /* { "RTRIM", "rtrim" }, */ /* { "SOUNDEX", "soundex" }, */ { "SUBSTRING", "substr" }, { "UCASE", "upper" }, /* { "ABS", "abs" }, */ /* { "ACOS", "acos" }, */ /* { "ASIN", "asin" }, */ /* { "ATAN", "atan" }, */ /* { "ATAN2", "atan2" }, */ { "CEILING", "ceil" }, /* { "COS", "cos" }, */ /* { "COT", "cot" }, */ /* { "DEGREES", "degrees" }, */ /* { "EXP", "exp" }, */ /* { "FLOOR", "floor" }, */ { "LOG", "ln" }, { "LOG10", "log" }, /* { "MOD", "mod" }, */ /* { "PI", "pi" }, */ { "POWER", "pow" }, /* { "RADIANS", "radians" }, */ { "RAND", "random" }, /* { "ROUND", "round" }, */ /* { "SIGN", "sign" }, */ /* { "SIN", "sin" }, */ /* { "SQRT", "sqrt" }, */ /* { "TAN", "tan" }, */ { "TRUNCATE", "trunc" }, /* { "CURDATE", "curdate" }, */ /* { "CURTIME", "curtime" }, */ /* { "DAYNAME", "dayname" }, */ /* { "DAYOFMONTH", "dayofmonth" }, */ /* { "DAYOFWEEK", "dayofweek" }, */ /* { "DAYOFYEAR", "dayofyear" }, */ /* { "HOUR", "hour" }, */ /* { "MINUTE", "minute" }, */ /* { "MONTH", "month" }, */ /* { "MONTHNAME", "monthname" }, */ /* { "NOW", "now" }, */ /* { "QUARTER", "quarter" }, */ /* { "SECOND", "second" }, */ /* { "WEEK", "week" }, */ /* { "YEAR", "year" }, */ /* { "DATABASE", "database" }, */ { "IFNULL", "coalesce" }, { "USER", "odbc_user" }, { 0, 0 } }; char *mapFunction(char *func); unsigned int conv_from_octal(unsigned char *s); unsigned int conv_from_hex(unsigned char *s); char *conv_to_octal(unsigned char val); /******** A Guide for date/time/timestamp conversions ************** field_type fCType Output ---------- ------ ---------- PG_TYPE_DATE SQL_C_DEFAULT SQL_C_DATE PG_TYPE_DATE SQL_C_DATE SQL_C_DATE PG_TYPE_DATE SQL_C_TIMESTAMP SQL_C_TIMESTAMP (time = 0 (midnight)) PG_TYPE_TIME SQL_C_DEFAULT SQL_C_TIME PG_TYPE_TIME SQL_C_TIME SQL_C_TIME PG_TYPE_TIME SQL_C_TIMESTAMP SQL_C_TIMESTAMP (date = current date) PG_TYPE_ABSTIME SQL_C_DEFAULT SQL_C_TIMESTAMP PG_TYPE_ABSTIME SQL_C_DATE SQL_C_DATE (time is truncated) PG_TYPE_ABSTIME SQL_C_TIME SQL_C_TIME (date is truncated) PG_TYPE_ABSTIME SQL_C_TIMESTAMP SQL_C_TIMESTAMP ******************************************************************************/ /* This is called by SQLFetch() */ int copy_and_convert_field_bindinfo(StatementClass *stmt, Int4 field_type, void *value, int col) { BindInfoClass *bic = &(stmt->bindings[col]); return copy_and_convert_field(stmt, field_type, value, (Int2)bic->returntype, (PTR)bic->buffer, (SDWORD)bic->buflen, (SQLLEN *)bic->used); } static void setup_ts( SIMPLE_TIME st ) { time_t t = time( NULL ); struct tm *tim; #ifdef HAVE_LOCALTIME_R struct tm tp; #endif #ifdef HAVE_LOCALTIME_R tim = localtime_r(&t, &tp); #else tim = localtime(&t); #endif st.m = tim->tm_mon + 1; st.d = tim->tm_mday; st.y = tim->tm_year + 1900; st.hh = tim->tm_hour; st.mm = tim->tm_min; st.ss = tim->tm_sec; } /* This is called by SQLGetData() */ int copy_and_convert_field(StatementClass *stmt, Int4 field_type, void *value, Int2 fCType, PTR rgbValue, SDWORD cbValueMax, SQLLEN *pcbValue) { Int4 len = 0, copy_len = 0; SIMPLE_TIME st; time_t t; struct tm *tim; int pcbValueOffset, rgbValueOffset; char *rgbValueBindRow, *ptr; int bind_row = stmt->bind_row; int bind_size = stmt->options.bind_size; int result = COPY_OK; /* char tempBuf[TEXT_FIELD_SIZE+5]; */ char *tempBuf; #ifdef HAVE_LOCALE_H char saved_locale[256]; #endif #ifdef HAVE_LOCALTIME_R struct tm tp; #endif /* rgbValueOffset is *ONLY* for character and binary data */ /* pcbValueOffset is for computing any pcbValue location */ tempBuf = (char *) malloc(TEXT_FIELD_SIZE+5); if (bind_size > 0) { pcbValueOffset = rgbValueOffset = (bind_size * bind_row); } else { pcbValueOffset = bind_row * sizeof(SDWORD); rgbValueOffset = bind_row * cbValueMax; } memset(&st, 0, sizeof(SIMPLE_TIME)); mylog("copy_and_convert: field_type = %d, fctype = %d, value = '%s', cbValueMax=%d\n", field_type, fCType, (value==NULL)?"":value, cbValueMax); if ( ! value) { /* handle a null just by returning SQL_NULL_DATA in pcbValue, */ /* and doing nothing to the buffer. */ if(pcbValue) { *(SDWORD *) ((char *) pcbValue + pcbValueOffset) = SQL_NULL_DATA; } free(tempBuf); return COPY_OK; } if (stmt->hdbc->DataSourceToDriver != NULL) { int length = strlen (value); stmt->hdbc->DataSourceToDriver (stmt->hdbc->translation_option, SQL_CHAR, value, length, value, length, NULL, NULL, 0, NULL); } /******************************************************************** First convert any specific postgres types into more useable data. NOTE: Conversions from PG char/varchar of a date/time/timestamp value to SQL_C_DATE,SQL_C_TIME, SQL_C_TIMESTAMP not supported *********************************************************************/ switch(field_type) { /* $$$ need to add parsing for date/time/timestamp strings in PG_TYPE_CHAR,VARCHAR $$$ */ case PG_TYPE_DATE: setup_ts( st ); sscanf(value, "%4d-%2d-%2d", &st.y, &st.m, &st.d); break; case PG_TYPE_TIME: setup_ts( st ); sscanf(value, "%2d:%2d:%2d", &st.hh, &st.mm, &st.ss); break; case PG_TYPE_ABSTIME: case PG_TYPE_DATETIME: case PG_TYPE_TIMESTAMP: case PG_TYPE_TIMESTAMP_NO_TMZONE: setup_ts( st ); if (strnicmp(value, "invalid", 7) != 0) { sscanf(value, "%4d-%2d-%2d %2d:%2d:%2d", &st.y, &st.m, &st.d, &st.hh, &st.mm, &st.ss); } else { /* The timestamp is invalid so set something conspicuous, like the epoch */ t = 0; #ifdef HAVE_LOCALTIME_R tim = localtime_r(&t, &tp); #else tim = localtime(&t); #endif st.m = tim->tm_mon + 1; st.d = tim->tm_mday; st.y = tim->tm_year + 1900; st.hh = tim->tm_hour; st.mm = tim->tm_min; st.ss = tim->tm_sec; } break; case PG_TYPE_BOOL: { /* change T/F to 1/0 */ char *s = (char *) value; if (s[0] == 'T' || s[0] == 't') s[0] = '1'; else s[0] = '0'; } break; /* This is for internal use by SQLStatistics() */ case PG_TYPE_INT2VECTOR: { int nval, i; char *vp; /* this is an array of eight integers */ short *short_array = (short *) ( (char *) rgbValue + rgbValueOffset); len = 16; vp = value; nval = 0; for (i = 0; i < 8; i++) { if (sscanf(vp, "%hd", &short_array[i]) != 1) break; nval++; /* skip the current token */ while ((*vp != '\0') && (! isspace((unsigned char) *vp))) vp++; /* and skip the space to the next token */ while ((*vp != '\0') && (isspace((unsigned char) *vp))) vp++; if (*vp == '\0') break; } for (i = nval; i < 8; i++) { short_array[i] = 0; } #if 0 sscanf(value, "%hd %hd %hd %hd %hd %hd %hd %hd", &short_array[0], &short_array[1], &short_array[2], &short_array[3], &short_array[4], &short_array[5], &short_array[6], &short_array[7]); #endif /* There is no corresponding fCType for this. */ if(pcbValue) *(SDWORD *) ((char *) pcbValue + pcbValueOffset) = len; free(tempBuf); return COPY_OK; /* dont go any further or the data will be trashed */ } /* This is a large object OID, which is used to store LONGVARBINARY objects. */ case PG_TYPE_LO: free(tempBuf); return convert_lo( stmt, value, fCType, ((char *) rgbValue + rgbValueOffset), cbValueMax, (SDWORD *) ((char *) pcbValue + pcbValueOffset)); default: if (field_type == stmt->hdbc->lobj_type) /* hack until permanent type available */ { free(tempBuf); return convert_lo( stmt, value, fCType, ((char *) rgbValue + rgbValueOffset), cbValueMax, (SDWORD *) ((char *) pcbValue + pcbValueOffset)); } } /* Change default into something useable */ if (fCType == SQL_C_DEFAULT) { fCType = pgtype_to_ctype(stmt, field_type); mylog("copy_and_convert, SQL_C_DEFAULT: fCType = %d\n", fCType); } rgbValueBindRow = (char *) rgbValue + rgbValueOffset; if(fCType == SQL_C_CHAR) { /* Special character formatting as required */ /* These really should return error if cbValueMax is not big enough. */ switch(field_type) { case PG_TYPE_DATE: len = 10; if (cbValueMax > len) sprintf(rgbValueBindRow, "%.4d-%.2d-%.2d", st.y, st.m, st.d); break; case PG_TYPE_TIME: len = 8; if (cbValueMax > len) sprintf(rgbValueBindRow, "%.2d:%.2d:%.2d", st.hh, st.mm, st.ss); break; case PG_TYPE_ABSTIME: case PG_TYPE_DATETIME: case PG_TYPE_TIMESTAMP: case PG_TYPE_TIMESTAMP_NO_TMZONE: len = 19; if (cbValueMax > len) sprintf(rgbValueBindRow, "%.4d-%.2d-%.2d %.2d:%.2d:%.2d", st.y, st.m, st.d, st.hh, st.mm, st.ss); break; case PG_TYPE_BOOL: len = 1; if (cbValueMax > len) { strcpy(rgbValueBindRow, value); mylog("PG_TYPE_BOOL: rgbValueBindRow = '%s'\n", rgbValueBindRow); } break; /* Currently, data is SILENTLY TRUNCATED for BYTEA and character data types if there is not enough room in cbValueMax because the driver can't handle multiple calls to SQLGetData for these, yet. Most likely, the buffer passed in will be big enough to handle the maximum limit of postgres, anyway. LongVarBinary types are handled correctly above, observing truncation and all that stuff since there is essentially no limit on the large object used to store those. */ case PG_TYPE_BYTEA: /* convert binary data to hex strings (i.e, 255 = "FF") */ len = convert_pgbinary_to_char(value, rgbValueBindRow, cbValueMax); /***** THIS IS NOT PROPERLY IMPLEMENTED *****/ break; default: /* convert linefeeds to carriage-return/linefeed */ len = convert_linefeeds(value, tempBuf, TEXT_FIELD_SIZE+5); ptr = tempBuf; mylog("DEFAULT: len = %d, ptr = '%s'\n", len, ptr); if (stmt->current_col >= 0) { if (stmt->bindings[stmt->current_col].data_left == 0) { free( tempBuf ); return COPY_NO_DATA_FOUND; } else if (stmt->bindings[stmt->current_col].data_left > 0) { ptr += len - stmt->bindings[stmt->current_col].data_left; len = stmt->bindings[stmt->current_col].data_left; } else stmt->bindings[stmt->current_col].data_left = strlen(ptr); } if (cbValueMax > 0) { copy_len = (len >= cbValueMax) ? cbValueMax -1 : len; #ifdef HAVE_LOCALE_H switch (field_type) { case PG_TYPE_FLOAT4: case PG_TYPE_FLOAT8: case PG_TYPE_NUMERIC: { struct lconv *lc; char *new_string; int i, j, dplen; new_string = malloc( cbValueMax ); lc = localeconv(); dplen = strlen(lc->decimal_point); for (i = 0, j = 0; (j < cbValueMax - 1) && ptr[i]; i++) if (ptr[i] == '.') { if ((j + dplen) <= (cbValueMax - 1)) { strncpy(&new_string[j], lc->decimal_point, dplen); j += dplen; } else break; } else new_string[j++] = ptr[i]; new_string[j] = '\0'; strncpy_null(rgbValueBindRow, new_string, copy_len + 1); free(new_string); break; } default: /* Copy the data */ strncpy_null(rgbValueBindRow, ptr, copy_len + 1); } #else /* Copy the data */ strncpy_null(rgbValueBindRow, ptr, copy_len + 1); #endif /* Adjust data_left for next time */ if (stmt->current_col >= 0) { stmt->bindings[stmt->current_col].data_left -= copy_len; } } /* Finally, check for truncation so that proper status can be returned */ if ( len >= cbValueMax) result = COPY_RESULT_TRUNCATED; mylog(" SQL_C_CHAR, default: len = %d, cbValueMax = %d, rgbValueBindRow = '%s'\n", len, cbValueMax, rgbValueBindRow); break; } } else { /* for SQL_C_CHAR, it's probably ok to leave currency symbols in. But to convert to numeric types, it is necessary to get rid of those. */ if (field_type == PG_TYPE_MONEY) convert_money(value); switch(fCType) { case SQL_C_DATE: len = 6; { DATE_STRUCT *ds; if (bind_size > 0) { ds = (DATE_STRUCT *) ((char *) rgbValue + (bind_row * bind_size)); } else { ds = (DATE_STRUCT *) rgbValue + bind_row; } ds->year = st.y; ds->month = st.m; ds->day = st.d; } break; case SQL_C_TIME: len = 6; { TIME_STRUCT *ts; if (bind_size > 0) { ts = (TIME_STRUCT *) ((char *) rgbValue + (bind_row * bind_size)); } else { ts = (TIME_STRUCT *) rgbValue + bind_row; } ts->hour = st.hh; ts->minute = st.mm; ts->second = st.ss; } break; case SQL_C_TIMESTAMP: len = 16; { TIMESTAMP_STRUCT *ts; if (bind_size > 0) { ts = (TIMESTAMP_STRUCT *) ((char *) rgbValue + (bind_row * bind_size)); } else { ts = (TIMESTAMP_STRUCT *) rgbValue + bind_row; } ts->year = st.y; ts->month = st.m; ts->day = st.d; ts->hour = st.hh; ts->minute = st.mm; ts->second = st.ss; ts->fraction = 0; } break; case SQL_C_BIT: len = 1; if (bind_size > 0) { *(UCHAR *) ((char *) rgbValue + (bind_row * bind_size)) = atoi(value); } else { *((UCHAR *)rgbValue + bind_row) = atoi(value); } /* mylog("SQL_C_BIT: val = %d, cb = %d, rgb=%d\n", atoi(value), cbValueMax, *((UCHAR *)rgbValue)); */ break; case SQL_C_STINYINT: case SQL_C_TINYINT: len = 1; if (bind_size > 0) { *(SCHAR *) ((char *) rgbValue + (bind_row * bind_size)) = atoi(value); } else { *((SCHAR *) rgbValue + bind_row) = atoi(value); } break; case SQL_C_UTINYINT: len = 1; if (bind_size > 0) { *(UCHAR *) ((char *) rgbValue + (bind_row * bind_size)) = atoi(value); } else { *((UCHAR *) rgbValue + bind_row) = atoi(value); } break; case SQL_C_FLOAT: #ifdef HAVE_LOCALE_H strcpy(saved_locale,setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); #endif len = 4; if (bind_size > 0) { *(SFLOAT *) ((char *) rgbValue + (bind_row * bind_size)) = (float) atof(value); } else { *((SFLOAT *)rgbValue + bind_row) = (float) atof(value); } #ifdef HAVE_LOCALE_H setlocale(LC_ALL, saved_locale); #endif break; case SQL_C_DOUBLE: #ifdef HAVE_LOCALE_H strcpy(saved_locale, setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); #endif len = 8; if (bind_size > 0) { *(SDOUBLE *) ((char *) rgbValue + (bind_row * bind_size)) = atof(value); } else { *((SDOUBLE *)rgbValue + bind_row) = atof(value); } #ifdef HAVE_LOCALE_H setlocale(LC_ALL, saved_locale); #endif break; case SQL_C_SSHORT: case SQL_C_SHORT: len = 2; if (bind_size > 0) { *(SWORD *) ((char *) rgbValue + (bind_row * bind_size)) = atoi(value); } else { *((SWORD *)rgbValue + bind_row) = atoi(value); } break; case SQL_C_USHORT: len = 2; if (bind_size > 0) { *(UWORD *) ((char *) rgbValue + (bind_row * bind_size)) = atoi(value); } else { *((UWORD *)rgbValue + bind_row) = atoi(value); } break; case SQL_C_SLONG: case SQL_C_LONG: len = 4; if (bind_size > 0) { *(SDWORD *) ((char *) rgbValue + (bind_row * bind_size)) = atol(value); } else { *((SDWORD *)rgbValue + bind_row) = atol(value); } break; case SQL_C_ULONG: len = 4; if (bind_size > 0) { *(UDWORD *) ((char *) rgbValue + (bind_row * bind_size)) = atol(value); } else { *((UDWORD *)rgbValue + bind_row) = atol(value); } break; #ifdef HAVE_LONG_LONG case SQL_BIGINT: { long long lv; len = 8; #ifdef HAVE_ATOLL lv = atoll( value ); #elif HAVE_STROLL lv = strtoll( value, NULL, 10 ); #else lv = atol( value ); #endif if (bind_size > 0) { *(long long *) ((char *) rgbValue + (bind_row * bind_size)) = lv; } else { *((long long *)rgbValue + bind_row) = lv; } } break; #endif case SQL_C_BINARY: /* truncate if necessary */ /* convert octal escapes to bytes */ len = convert_from_pgbinary(value, (SQLCHAR*)tempBuf, TEXT_FIELD_SIZE+5); ptr = tempBuf; if (stmt->current_col >= 0) { /* No more data left for this column */ if (stmt->bindings[stmt->current_col].data_left == 0) { free(tempBuf); return COPY_NO_DATA_FOUND; } /* Second (or more) call to SQLGetData so move the pointer */ else if (stmt->bindings[stmt->current_col].data_left > 0) { ptr += len - stmt->bindings[stmt->current_col].data_left; len = stmt->bindings[stmt->current_col].data_left; } /* First call to SQLGetData so initialize data_left */ else stmt->bindings[stmt->current_col].data_left = len; } if (cbValueMax > 0) { copy_len = (len > cbValueMax) ? cbValueMax : len; /* Copy the data */ memcpy(rgbValueBindRow, ptr, copy_len); /* Adjust data_left for next time */ if (stmt->current_col >= 0) { stmt->bindings[stmt->current_col].data_left -= copy_len; } } /* Finally, check for truncation so that proper status can be returned */ if ( len > cbValueMax) result = COPY_RESULT_TRUNCATED; mylog("SQL_C_BINARY: len = %d, copy_len = %d\n", len, copy_len); break; default: free(tempBuf); return COPY_UNSUPPORTED_TYPE; } } /* store the length of what was copied, if there's a place for it */ if(pcbValue) { *(SDWORD *) ((char *)pcbValue + pcbValueOffset) = len; } free(tempBuf); return result; } /* This function inserts parameters into an SQL statements. It will also modify a SELECT statement for use with declare/fetch cursors. This function no longer does any dynamic memory allocation! */ int copy_statement_with_parameters(StatementClass *stmt) { static char* const func="copy_statement_with_parameters"; unsigned int opos, npos, oldstmtlen; char param_string[1024], tmp[256]; char * cbuf; /* [TEXT_FIELD_SIZE+5]; */ int param_number; Int2 param_ctype, param_sqltype; char *old_statement = stmt->statement; char *new_statement = stmt->stmt_with_params; SIMPLE_TIME st; time_t t = time(NULL); struct tm *tim; SDWORD used; char *buffer, *buf; char in_quote = FALSE; Oid lobj_oid; int lobj_fd, retval; stmt -> reexecute = 0; cbuf=(char *)malloc(TEXT_FIELD_SIZE+5); if ( ! old_statement) { SC_log_error(func, "No statement string", stmt); free(cbuf); return SQL_ERROR; } memset(&st, 0, sizeof(SIMPLE_TIME)); /* If the application hasn't set a cursor name, then generate one */ if ( stmt->cursor_name[0] == '\0') sprintf(stmt->cursor_name, "SQL_CUR%p", stmt); /* For selects, prepend a declare cursor to the statement */ if (stmt->statement_type == STMT_TYPE_SELECT && globals.use_declarefetch) { sprintf(new_statement, "declare %s cursor for ", stmt->cursor_name); npos = strlen(new_statement); } else { new_statement[0] = '0'; npos = 0; } param_number = -1; oldstmtlen = strlen(old_statement); for (opos = 0; opos < oldstmtlen; opos++) { /* Squeeze carriage-return/linefeed pairs to linefeed only */ if (old_statement[opos] == '\r' && opos+1 < oldstmtlen && old_statement[opos+1] == '\n') { continue; } /* Handle literals (date, time, timestamp) and ODBC scalar functions */ else if (old_statement[opos] == '{') { char *esc; char *begin = &old_statement[opos + 1]; char *end = strchr(begin, '}'); if ( ! end) continue; *end = '\0'; esc = convert_escape(begin); if (esc) { memcpy(&new_statement[npos], esc, strlen(esc)); npos += strlen(esc); } else { /* it's not a valid literal so just copy */ *end = '}'; new_statement[npos++] = old_statement[opos]; continue; } opos += end - begin + 1; *end = '}'; continue; } /* Can you have parameter markers inside of quotes? I dont think so. All the queries I've seen expect the driver to put quotes if needed. */ else if (old_statement[opos] == '?' && !in_quote) ; /* ok */ else { if (old_statement[opos] == '\'') in_quote = (in_quote ? FALSE : TRUE); new_statement[npos++] = old_statement[opos]; continue; } /****************************************************/ /* Its a '?' parameter alright */ /****************************************************/ param_number++; if (param_number >= stmt->parameters_allocated) { strcpy(&new_statement[npos], "NULL"); npos += strlen("NULL"); stmt -> reexecute = 1; continue; } /* Assign correct buffers based on data at exec param or not */ if ( stmt->parameters[param_number].data_at_exec) { used = stmt->parameters[param_number].EXEC_used ? *stmt->parameters[param_number].EXEC_used : SQL_NTS; buffer = stmt->parameters[param_number].EXEC_buffer; } else { used = stmt->parameters[param_number].used ? *stmt->parameters[param_number].used : SQL_NTS; buffer = stmt->parameters[param_number].buffer; } /* Handle NULL parameter data */ if (used == SQL_NULL_DATA) { strcpy(&new_statement[npos], "NULL"); npos += 4; continue; } /* If no buffer, and it's not null, then what the hell is it? Just leave it alone then. */ if ( ! buffer) { new_statement[npos++] = '?'; continue; } param_ctype = stmt->parameters[param_number].CType; param_sqltype = stmt->parameters[param_number].SQLType; mylog("copy_statement_with_params: from(fcType)=%d, to(fSqlType)=%d\n", param_ctype, param_sqltype); /* replace DEFAULT with something we can use */ if(param_ctype == SQL_C_DEFAULT) param_ctype = sqltype_to_default_ctype(param_sqltype); buf = NULL; param_string[0] = '\0'; cbuf[0] = '\0'; /* Convert input C type to a neutral format */ switch(param_ctype) { case SQL_C_BINARY: buf = buffer; break; #ifdef HAVE_LOCALE_H case SQL_C_CHAR: if (param_sqltype == SQL_NUMERIC || param_sqltype == SQL_DECIMAL || param_sqltype == SQL_FLOAT || param_sqltype == SQL_REAL || param_sqltype == SQL_DOUBLE) { struct lconv *lc; int i, j, dplen; lc = localeconv(); dplen = strlen(lc->decimal_point); for (i = 0, j = 0; j < sizeof(param_string)-1 && buffer[i]; ) if (!strncmp(&buffer[i], lc->decimal_point, dplen)) { param_string[j++] = '.'; i += dplen; } else param_string[j++] = buffer[i++]; param_string[j] = '\0'; break; } else buf = buffer; break; #else case SQL_C_CHAR: buf = buffer; break; #endif case SQL_C_DOUBLE: #ifdef HAVE_LOCALE_H strcpy(tmp, setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); #endif sprintf(param_string, "%f", *((SDOUBLE *) buffer)); #ifdef HAVE_LOCALE_H setlocale(LC_ALL, tmp); #endif break; case SQL_C_FLOAT: #ifdef HAVE_LOCALE_H strcpy(tmp, setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); #endif sprintf(param_string, "%f", *((SFLOAT *) buffer)); #ifdef HAVE_LOCALE_H setlocale(LC_ALL, tmp); #endif break; case SQL_C_SLONG: case SQL_C_LONG: #if (SIZEOF_LONG_INT == 4) sprintf(param_string, "%ld", #else sprintf(param_string, "%d", #endif *((SDWORD *) buffer)); break; case SQL_C_SSHORT: case SQL_C_SHORT: sprintf(param_string, "%d", *((SWORD *) buffer)); break; case SQL_C_STINYINT: case SQL_C_TINYINT: sprintf(param_string, "%d", *((SCHAR *) buffer)); break; case SQL_C_ULONG: #if (SIZEOF_LONG_INT == 4) sprintf(param_string, "%lu", #else sprintf(param_string, "%u", #endif *((UDWORD *) buffer)); break; case SQL_C_USHORT: sprintf(param_string, "%u", *((UWORD *) buffer)); break; case SQL_C_UTINYINT: sprintf(param_string, "%u", *((UCHAR *) buffer)); break; case SQL_C_BIT: { int i = *((UCHAR *) buffer); sprintf(param_string, "%d", i ? 1 : 0); break; } case SQL_C_DATE: { DATE_STRUCT *ds = (DATE_STRUCT *) buffer; setup_ts( st ); st.m = ds->month; st.d = ds->day; st.y = ds->year; break; } case SQL_C_TIME: { TIME_STRUCT *ts = (TIME_STRUCT *) buffer; setup_ts( st ); st.hh = ts->hour; st.mm = ts->minute; st.ss = ts->second; break; } case SQL_C_TIMESTAMP: { TIMESTAMP_STRUCT *tss = (TIMESTAMP_STRUCT *) buffer; setup_ts( st ); st.m = tss->month; st.d = tss->day; st.y = tss->year; st.hh = tss->hour; st.mm = tss->minute; st.ss = tss->second; mylog("m=%d,d=%d,y=%d,hh=%d,mm=%d,ss=%d\n", st.m, st.d, st.y, st.hh, st.mm, st.ss); break; } default: /* error */ SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Unrecognized C_parameter type in copy_statement_with_parameters"); new_statement[npos] = '\0'; /* just in case */ SC_log_error(func, "", stmt); free(cbuf); return SQL_ERROR; } /* Now that the input data is in a neutral format, convert it to the desired output format (sqltype) */ switch(param_sqltype) { case SQL_CHAR: case SQL_VARCHAR: case SQL_LONGVARCHAR: new_statement[npos++] = '\''; /* Open Quote */ /* it was a SQL_C_CHAR */ if (buf) { convert_special_chars(buf, &new_statement[npos], used); npos += strlen(&new_statement[npos]); } /* it was a numeric type */ else if (param_string[0] != '\0') { strcpy(&new_statement[npos], param_string); npos += strlen(param_string); } /* it was date,time,timestamp -- use m,d,y,hh,mm,ss */ else { setup_ts( st ); sprintf(tmp, "%.4d-%.2d-%.2d %.2d:%.2d:%.2d", st.y, st.m, st.d, st.hh, st.mm, st.ss); strcpy(&new_statement[npos], tmp); npos += strlen(tmp); } new_statement[npos++] = '\''; /* Close Quote */ break; case SQL_DATE: if (buf) { /* copy char data to time */ my_strcpy(cbuf, TEXT_FIELD_SIZE+5, buf, used); parse_datetime(cbuf, &st); } sprintf(tmp, "'%.4d-%.2d-%.2d'", st.y, st.m, st.d); strcpy(&new_statement[npos], tmp); npos += strlen(tmp); break; case SQL_TIME: if (buf) { /* copy char data to time */ my_strcpy(cbuf, TEXT_FIELD_SIZE+5, buf, used); parse_datetime(cbuf, &st); } sprintf(tmp, "'%.2d:%.2d:%.2d'", st.hh, st.mm, st.ss); strcpy(&new_statement[npos], tmp); npos += strlen(tmp); break; case SQL_TIMESTAMP: if (buf) { my_strcpy(cbuf, TEXT_FIELD_SIZE+5, buf, used); parse_datetime(cbuf, &st); } sprintf(tmp, "'%.4d-%.2d-%.2d %.2d:%.2d:%.2d'", st.y, st.m, st.d, st.hh, st.mm, st.ss); strcpy(&new_statement[npos], tmp); npos += strlen(tmp); break; case SQL_BINARY: case SQL_VARBINARY: /* non-ascii characters should be converted to octal */ new_statement[npos++] = '\''; /* Open Quote */ mylog("SQL_VARBINARY: about to call convert_to_pgbinary, used = %d\n", used); npos += convert_to_pgbinary((SQLCHAR*)buf, &new_statement[npos], used); new_statement[npos++] = '\''; /* Close Quote */ break; case SQL_LONGVARBINARY: if ( stmt->parameters[param_number].data_at_exec) { lobj_oid = stmt->parameters[param_number].lobj_oid; } else { /* begin transaction if needed */ if(!CC_is_in_trans(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "BEGIN", NULL); if (!res) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not begin (in-line) a transaction"); SC_log_error(func, "", stmt); free(cbuf); return SQL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not begin (in-line) a transaction"); SC_log_error(func, "", stmt); free(cbuf); return SQL_ERROR; } CC_set_in_trans(stmt->hdbc); } /* store the oid */ lobj_oid = odbc_lo_creat(stmt->hdbc, INV_READ | INV_WRITE); if (lobj_oid == 0) { SC_set_error(stmt, STMT_EXEC_ERROR, "Couldnt create (in-line) large object."); SC_log_error(func, "", stmt); free(cbuf); return SQL_ERROR; } /* store the fd */ lobj_fd = odbc_lo_open(stmt->hdbc, lobj_oid, INV_WRITE); if ( lobj_fd < 0) { SC_set_error(stmt, STMT_EXEC_ERROR, "Couldnt open (in-line) large object for writing."); SC_log_error(func, "", stmt); free(cbuf); return SQL_ERROR; } retval = odbc_lo_write(stmt->hdbc, lobj_fd, buffer, used); odbc_lo_close(stmt->hdbc, lobj_fd); /* commit transaction if needed */ if (!globals.use_declarefetch && CC_is_in_autocommit(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "COMMIT", NULL); if (!res) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not commit (in-line) a transaction"); SC_log_error(func, "", stmt); free(cbuf); return SQL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not commit (in-line) a transaction"); SC_log_error(func, "", stmt); free(cbuf); return SQL_ERROR; } CC_set_no_trans(stmt->hdbc); } } /* the oid of the large object -- just put that in for the parameter marker -- the data has already been sent to the large object */ sprintf(param_string, "'%d'", lobj_oid); strcpy(&new_statement[npos], param_string); npos += strlen(param_string); break; /* because of no conversion operator for bool and int4, SQL_BIT */ /* must be quoted (0 or 1 is ok to use inside the quotes) */ case SQL_REAL: if (buf) my_strcpy(param_string, sizeof(param_string), buf, used); sprintf(tmp, "'%s'::float4", param_string); strcpy(&new_statement[npos], tmp); npos += strlen(tmp); break; case SQL_FLOAT: case SQL_DOUBLE: if (buf) my_strcpy(param_string, sizeof(param_string), buf, used); sprintf(tmp, "'%s'::float8", param_string); strcpy(&new_statement[npos], tmp); npos += strlen(tmp); break; case SQL_NUMERIC: if (buf) { cbuf[0] = '\''; my_strcpy(cbuf + 1, TEXT_FIELD_SIZE+5 - 12, buf, used); /* 12 = 1('\'') + strlen("'::numeric") + 1('\0') */ strcat(cbuf, "'::numeric"); } else sprintf(cbuf, "'%s'::numeric", param_string); my_strcpy(&new_statement[npos], sizeof(stmt->stmt_with_params) - npos - 1, cbuf, strlen(cbuf)); npos += strlen(&new_statement[npos]); break; default: /* a numeric type or SQL_BIT */ if (param_sqltype == SQL_BIT) new_statement[npos++] = '\''; /* Open Quote */ if (buf) { my_strcpy(&new_statement[npos], sizeof(stmt->stmt_with_params) - npos, buf, used); npos += strlen(&new_statement[npos]); } else { strcpy(&new_statement[npos], param_string); npos += strlen(param_string); } if (param_sqltype == SQL_BIT) new_statement[npos++] = '\''; /* Close Quote */ break; } } /* end, for */ /* make sure new_statement is always null-terminated */ new_statement[npos] = '\0'; if(stmt->hdbc->DriverToDataSource != NULL) { int length = strlen (new_statement); stmt->hdbc->DriverToDataSource (stmt->hdbc->translation_option, SQL_CHAR, new_statement, length, new_statement, length, NULL, NULL, 0, NULL); } free(cbuf); return SQL_SUCCESS; } char * mapFunction(char *func) { int i; for (i = 0; mapFuncs[i][0]; i++) if ( ! stricmp(mapFuncs[i][0], func)) return mapFuncs[i][1]; return NULL; } /* convert_escape() * This function returns a pointer to static memory! */ char * convert_escape(char *value) { static char escape[1024]; char key[33]; /* Separate off the key, skipping leading and trailing whitespace */ while ((*value != '\0') && isspace((unsigned char) *value)) value++; sscanf(value, "%32s", key); while ((*value != '\0') && (! isspace((unsigned char) *value))) value++; while ((*value != '\0') && isspace((unsigned char) *value)) value++; mylog("convert_escape: key='%s', val='%s'\n", key, value); if ( (strcmp(key, "d") == 0) || (strcmp(key, "t") == 0) || (strcmp(key, "ts") == 0) || (stricmp(key, "oj") == 0)) { /* Literal; return the escape part as-is */ strncpy(escape, value, sizeof(escape)-1); } else if (strcmp(key, "fn") == 0) { /* Function invocation * Separate off the func name, * skipping trailing whitespace. */ char *funcEnd = value; char svchar; char *mapFunc; while ((*funcEnd != '\0') && (*funcEnd != '(') && (! isspace((unsigned char) *funcEnd))) funcEnd++; svchar = *funcEnd; *funcEnd = '\0'; sscanf(value, "%32s", key); *funcEnd = svchar; while ((*funcEnd != '\0') && isspace((unsigned char) *funcEnd)) funcEnd++; /* We expect left parenthesis here, * else return fn body as-is since it is * one of those "function constants". */ if (*funcEnd != '(') { strncpy(escape, value, sizeof(escape)-1); return escape; } mapFunc = mapFunction(key); /* We could have mapFunction() return key if not in table... * - thomas 2000-04-03 */ if (mapFunc == NULL) { /* If unrecognized function name, return fn body as-is */ strncpy(escape, value, sizeof(escape)-1); return escape; } /* copy mapped name and remaining input string */ strcpy(escape, mapFunc); strncat(escape, funcEnd, sizeof(escape)-1-strlen(mapFunc)); } else { /* Bogus key, leave untranslated */ return NULL; } return escape; } char * convert_money(char *s) { size_t i = 0, out = 0, slen=strlen(s); for (i = 0; i < slen; i++) { if (s[i] == '$' || s[i] == ',' || s[i] == ')') ; /* skip these characters */ else if (s[i] == '(') s[out++] = '-'; else s[out++] = s[i]; } s[out] = '\0'; return s; } /* This function parses a character string for date/time info and fills in SIMPLE_TIME */ /* It does not zero out SIMPLE_TIME in case it is desired to initialize it with a value */ char parse_datetime(char *buf, SIMPLE_TIME *st) { int y,m,d,hh,mm,ss; int nf; y = m = d = hh = mm = ss = 0; if (buf[4] == '-') /* year first */ nf = sscanf(buf, "%4d-%2d-%2d %2d:%2d:%2d", &y,&m,&d,&hh,&mm,&ss); else nf = sscanf(buf, "%2d-%2d-%4d %2d:%2d:%2d", &m,&d,&y,&hh,&mm,&ss); if (nf == 5 || nf == 6) { st->y = y; st->m = m; st->d = d; st->hh = hh; st->mm = mm; st->ss = ss; return TRUE; } if (buf[4] == '-') /* year first */ nf = sscanf(buf, "%4d-%2d-%2d", &y, &m, &d); else nf = sscanf(buf, "%2d-%2d-%4d", &m, &d, &y); if (nf == 3) { st->y = y; st->m = m; st->d = d; return TRUE; } nf = sscanf(buf, "%2d:%2d:%2d", &hh, &mm, &ss); if (nf == 2 || nf == 3) { st->hh = hh; st->mm = mm; st->ss = ss; return TRUE; } return FALSE; } /* Change linefeed to carriage-return/linefeed */ int convert_linefeeds(char *si, char *dst, size_t max) { size_t i = 0, out = 0; for (i = 0; si[ i ] && out < max - 1; i++) { if (si[i] == '\n') { /* Only add the carriage-return if needed */ if (i > 0 && si[i-1] == '\r') { dst[out++] = si[i]; continue; } dst[out++] = '\r'; dst[out++] = '\n'; } else dst[out++] = si[i]; } dst[out] = '\0'; return out; } /* Change carriage-return/linefeed to just linefeed Plus, escape any special characters. */ char * convert_special_chars(char *si, char *dst, int used) { size_t i = 0, out = 0, max; /*static char sout[TEXT_FIELD_SIZE+5];*/ char *p; int in_len = strlen( si ); if (dst) p = dst; else /* p = sout; */ { printf("BUG !!! convert_special_chars\n"); exit(0); } p[0] = '\0'; if (used == SQL_NTS) max = strlen(si); else max = used; for (i = 0; i < max; i++) { if (si[i] == '\r' && i+1 < in_len && si[i+1] == '\n') continue; else if (si[i] == '\'' || si[i] == '\\') p[out++] = '\\'; p[out++] = si[i]; } p[out] = '\0'; return p; } /* !!! Need to implement this function !!! */ int convert_pgbinary_to_char(char *value, char *rgbValue, int cbValueMax) { mylog("convert_pgbinary_to_char: value = '%s'\n", value); strncpy_null(rgbValue, value, cbValueMax); return 0; } unsigned int conv_from_octal(unsigned char *s) { int i, y=0; for (i = 1; i <= 3; i++) { y += (s[i] - 48) * (int) pow(8, 3-i); } return y; } unsigned int conv_from_hex(unsigned char *s) { int i, y=0, val; for (i = 1; i <= 2; i++) { if (s[i] >= 'a' && s[i] <= 'f') val = s[i] - 'a' + 10; else if (s[i] >= 'A' && s[i] <= 'F') val = s[i] - 'A' + 10; else val = s[i] - '0'; y += val * (int) pow(16, 2-i); } return y; } /* convert octal escapes to bytes */ int convert_from_pgbinary(unsigned char *value, unsigned char *rgbValue, int cbValueMax) { int o=0; size_t i, valen=strlen((char*)value);; for (i = 0; i < valen && o < cbValueMax; ) { if (value[i] == '\\') { rgbValue[o] = conv_from_octal(&value[i]); i += 4; } else { rgbValue[o] = value[i++]; } mylog("convert_from_pgbinary: i=%d, rgbValue[%d] = %d, %c\n", i, o, rgbValue[o], rgbValue[o]); o++; } rgbValue[o] = '\0'; /* extra protection */ return o; } char * conv_to_octal(unsigned char val) { int i; static char x[6]; x[0] = '\\'; x[1] = '\\'; x[5] = '\0'; for (i = 4; i > 1; i--) { x[i] = (val & 7) + 48; val >>= 3; } return x; } /* convert non-ascii bytes to octal escape sequences */ int convert_to_pgbinary(unsigned char *in, char *out, int len) { int i, o=0; for (i = 0; i < len; i++) { mylog("convert_to_pgbinary: in[%d] = %d, %c\n", i, in[i], in[i]); if ( isalnum(in[i]) || in[i] == ' ') { out[o++] = in[i]; } else { strcpy(&out[o], conv_to_octal(in[i])); o += 5; } } mylog("convert_to_pgbinary: returning %d, out='%.*s'\n", o, o, out); return o; } void encode(char *in, char *out) { unsigned int i, o = 0; size_t inlen=strlen(in); for (i = 0; i < inlen; i++) { if ( in[i] == '+') { sprintf(&out[o], "%%2B"); o += 3; } else if ( isspace((unsigned char) in[i])) { out[o++] = '+'; } else if ( ! isalnum((unsigned char) in[i])) { sprintf(&out[o], "%%%02x", (unsigned char) in[i]); o += 3; } else out[o++] = in[i]; } out[o++] = '\0'; } void decode(char *in, char *out) { unsigned int i, o = 0; size_t stlen=strlen(in); for(i=0; i < stlen; i++) { if (in[i] == '+') out[o++] = ' '; else if (in[i] == '%') { sprintf(&out[o++], "%c", conv_from_hex((SQLCHAR*)&in[i])); i+=2; } else out[o++] = in[i]; } out[o++] = '\0'; } /* 1. get oid (from 'value') 2. open the large object 3. read from the large object (handle multiple GetData) 4. close when read less than requested? -OR- lseek/read each time handle case where application receives truncated and decides not to continue reading. CURRENTLY, ONLY LONGVARBINARY is handled, since that is the only data type currently mapped to a PG_TYPE_LO. But, if any other types are desired to map to a large object (PG_TYPE_LO), then that would need to be handled here. For example, LONGVARCHAR could possibly be mapped to PG_TYPE_LO someday, instead of PG_TYPE_TEXT as it is now. */ int convert_lo(StatementClass *stmt, void *value, Int2 fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD *pcbValue) { Oid oid; int retval, result, left = -1; BindInfoClass *bindInfo = NULL; /* If using SQLGetData, then current_col will be set */ if (stmt->current_col >= 0) { bindInfo = &stmt->bindings[stmt->current_col]; left = bindInfo->data_left; } /* if this is the first call for this column, open the large object for reading */ if ( ! bindInfo || bindInfo->data_left == -1) { /* begin transaction if needed */ if(!CC_is_in_trans(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "BEGIN", NULL); if (!res) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not begin (in-line) a transaction"); return COPY_GENERAL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not begin (in-line) a transaction"); return COPY_GENERAL_ERROR; } CC_set_in_trans(stmt->hdbc); } oid = atoi(value); stmt->lobj_fd = odbc_lo_open(stmt->hdbc, oid, INV_READ); if (stmt->lobj_fd < 0) { SC_set_error(stmt, STMT_EXEC_ERROR, "Couldnt open large object for reading."); return COPY_GENERAL_ERROR; } /* Get the size */ retval = odbc_lo_lseek(stmt->hdbc, stmt->lobj_fd, 0L, SEEK_END); if (retval >= 0) { left = odbc_lo_tell(stmt->hdbc, stmt->lobj_fd); if (bindInfo) bindInfo->data_left = left; /* return to beginning */ odbc_lo_lseek(stmt->hdbc, stmt->lobj_fd, 0L, SEEK_SET); } } if (left == 0) { return COPY_NO_DATA_FOUND; } if (stmt->lobj_fd < 0) { SC_set_error(stmt, STMT_EXEC_ERROR, "Large object FD undefined for multiple read."); return COPY_GENERAL_ERROR; } retval = odbc_lo_read(stmt->hdbc, stmt->lobj_fd, (char *) rgbValue, cbValueMax); if (retval < 0) { odbc_lo_close(stmt->hdbc, stmt->lobj_fd); /* commit transaction if needed */ if (!globals.use_declarefetch && CC_is_in_autocommit(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "COMMIT", NULL); if (!res) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not commit (in-line) a transaction"); return COPY_GENERAL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not commit (in-line) a transaction"); return COPY_GENERAL_ERROR; } CC_set_no_trans(stmt->hdbc); } stmt->lobj_fd = -1; SC_set_error(stmt, STMT_EXEC_ERROR, "Error reading from large object."); return COPY_GENERAL_ERROR; } if (retval < left) result = COPY_RESULT_TRUNCATED; else result = COPY_OK; if (pcbValue) *pcbValue = left < 0 ? SQL_NO_TOTAL : left; if (bindInfo && bindInfo->data_left > 0) bindInfo->data_left -= retval; if (! bindInfo || bindInfo->data_left == 0) { odbc_lo_close(stmt->hdbc, stmt->lobj_fd); /* commit transaction if needed */ if (!globals.use_declarefetch && CC_is_in_autocommit(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "COMMIT", NULL); if (!res) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not commit (in-line) a transaction"); return COPY_GENERAL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not commit (in-line) a transaction"); return COPY_GENERAL_ERROR; } CC_set_no_trans(stmt->hdbc); } stmt->lobj_fd = -1; /* prevent further reading */ } return result; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/dlg_specific.c0100644000076400007640000006532307403176733020266 0ustar nicknick /* Module: dlg_specific.c * * Description: This module contains any specific code for handling * dialog boxes such as driver/datasource options. Both the * ConfigDSN() and the SQLDriverConnect() functions use * functions in this module. If you were to add a new option * to any dialog box, you would most likely only have to change * things in here rather than in 2 separate places as before. * * Classes: none * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef WIN32 # ifdef UNIXODBC # include # else # include # include "gpps.h" # define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f) # define SQLWritePrivateProfileString(a,b,c,d) WritePrivateProfileString(a,b,c,d) # endif # ifndef HAVE_STRICMP # define stricmp(s1,s2) strcasecmp(s1,s2) # define strnicmp(s1,s2,n) strncasecmp(s1,s2,n) # endif #endif #include "dlg_specific.h" #include "convert.h" #ifndef BOOL #define BOOL int #endif #ifndef FALSE #define FALSE (BOOL)0 #endif #ifndef TRUE #define TRUE (BOOL)1 #endif extern GLOBAL_VALUES globals; #ifdef WIN32 void SetDlgStuff(HWND hdlg, ConnInfo *ci) { /* If driver attribute NOT present, then set the datasource name and description */ if (ci->driver[0] == '\0') { SetDlgItemText(hdlg, IDC_DSNAME, ci->dsn); SetDlgItemText(hdlg, IDC_DESC, ci->desc); } SetDlgItemText(hdlg, IDC_DATABASE, ci->database); SetDlgItemText(hdlg, IDC_SERVER, ci->server); SetDlgItemText(hdlg, IDC_USER, ci->username); SetDlgItemText(hdlg, IDC_PASSWORD, ci->password); SetDlgItemText(hdlg, IDC_PORT, ci->port); } void GetDlgStuff(HWND hdlg, ConnInfo *ci) { GetDlgItemText(hdlg, IDC_DESC, ci->desc, sizeof(ci->desc)); GetDlgItemText(hdlg, IDC_DATABASE, ci->database, sizeof(ci->database)); GetDlgItemText(hdlg, IDC_SERVER, ci->server, sizeof(ci->server)); GetDlgItemText(hdlg, IDC_USER, ci->username, sizeof(ci->username)); GetDlgItemText(hdlg, IDC_PASSWORD, ci->password, sizeof(ci->password)); GetDlgItemText(hdlg, IDC_PORT, ci->port, sizeof(ci->port)); } int CALLBACK driver_optionsProc(HWND hdlg, WORD wMsg, WPARAM wParam, LPARAM lParam) { switch (wMsg) { case WM_INITDIALOG: CheckDlgButton(hdlg, DRV_COMMLOG, globals.commlog); CheckDlgButton(hdlg, DRV_OPTIMIZER, globals.disable_optimizer); CheckDlgButton(hdlg, DRV_KSQO, globals.ksqo); CheckDlgButton(hdlg, DRV_UNIQUEINDEX, globals.unique_index); CheckDlgButton(hdlg, DRV_READONLY, globals.onlyread); CheckDlgButton(hdlg, DRV_USEDECLAREFETCH, globals.use_declarefetch); /* Unknown (Default) Data Type sizes */ switch(globals.unknown_sizes) { case UNKNOWNS_AS_DONTKNOW: CheckDlgButton(hdlg, DRV_UNKNOWN_DONTKNOW, 1); break; case UNKNOWNS_AS_LONGEST: CheckDlgButton(hdlg, DRV_UNKNOWN_LONGEST, 1); break; case UNKNOWNS_AS_MAX: default: CheckDlgButton(hdlg, DRV_UNKNOWN_MAX, 1); break; } CheckDlgButton(hdlg, DRV_TEXT_LONGVARCHAR, globals.text_as_longvarchar); CheckDlgButton(hdlg, DRV_UNKNOWNS_LONGVARCHAR, globals.unknowns_as_longvarchar); CheckDlgButton(hdlg, DRV_BOOLS_CHAR, globals.bools_as_char); CheckDlgButton(hdlg, DRV_PARSE, globals.parse); CheckDlgButton(hdlg, DRV_CANCELASFREESTMT, globals.cancel_as_freestmt); SetDlgItemInt(hdlg, DRV_CACHE_SIZE, globals.fetch_max, FALSE); SetDlgItemInt(hdlg, DRV_VARCHAR_SIZE, globals.max_varchar_size, FALSE); SetDlgItemInt(hdlg, DRV_LONGVARCHAR_SIZE, globals.max_longvarchar_size, TRUE); SetDlgItemText(hdlg, DRV_EXTRASYSTABLEPREFIXES, globals.extra_systable_prefixes); /* Driver Connection Settings */ SetDlgItemText(hdlg, DRV_CONNSETTINGS, globals.conn_settings); break; case WM_COMMAND: switch (GET_WM_COMMAND_ID(wParam, lParam)) { case IDOK: globals.commlog = IsDlgButtonChecked(hdlg, DRV_COMMLOG); globals.disable_optimizer = IsDlgButtonChecked(hdlg, DRV_OPTIMIZER); globals.ksqo = IsDlgButtonChecked(hdlg, DRV_KSQO); globals.unique_index = IsDlgButtonChecked(hdlg, DRV_UNIQUEINDEX); globals.onlyread = IsDlgButtonChecked(hdlg, DRV_READONLY); globals.use_declarefetch = IsDlgButtonChecked(hdlg, DRV_USEDECLAREFETCH); /* Unknown (Default) Data Type sizes */ if (IsDlgButtonChecked(hdlg, DRV_UNKNOWN_MAX)) globals.unknown_sizes = UNKNOWNS_AS_MAX; else if (IsDlgButtonChecked(hdlg, DRV_UNKNOWN_DONTKNOW)) globals.unknown_sizes = UNKNOWNS_AS_DONTKNOW; else if (IsDlgButtonChecked(hdlg, DRV_UNKNOWN_LONGEST)) globals.unknown_sizes = UNKNOWNS_AS_LONGEST; else globals.unknown_sizes = UNKNOWNS_AS_MAX; globals.text_as_longvarchar = IsDlgButtonChecked(hdlg, DRV_TEXT_LONGVARCHAR); globals.unknowns_as_longvarchar = IsDlgButtonChecked(hdlg, DRV_UNKNOWNS_LONGVARCHAR); globals.bools_as_char = IsDlgButtonChecked(hdlg, DRV_BOOLS_CHAR); globals.parse = IsDlgButtonChecked(hdlg, DRV_PARSE); globals.cancel_as_freestmt = IsDlgButtonChecked(hdlg, DRV_CANCELASFREESTMT); globals.fetch_max = GetDlgItemInt(hdlg, DRV_CACHE_SIZE, NULL, FALSE); globals.max_varchar_size = GetDlgItemInt(hdlg, DRV_VARCHAR_SIZE, NULL, FALSE); globals.max_longvarchar_size= GetDlgItemInt(hdlg, DRV_LONGVARCHAR_SIZE, NULL, TRUE); /* allows for SQL_NO_TOTAL */ GetDlgItemText(hdlg, DRV_EXTRASYSTABLEPREFIXES, globals.extra_systable_prefixes, sizeof(globals.extra_systable_prefixes)); /* Driver Connection Settings */ GetDlgItemText(hdlg, DRV_CONNSETTINGS, globals.conn_settings, sizeof(globals.conn_settings)); updateGlobals(); /* fall through */ case IDCANCEL: EndDialog(hdlg, GET_WM_COMMAND_ID(wParam, lParam) == IDOK); return TRUE; case IDDEFAULTS: CheckDlgButton(hdlg, DRV_COMMLOG, DEFAULT_COMMLOG); CheckDlgButton(hdlg, DRV_OPTIMIZER, DEFAULT_OPTIMIZER); CheckDlgButton(hdlg, DRV_KSQO, DEFAULT_KSQO); CheckDlgButton(hdlg, DRV_UNIQUEINDEX, DEFAULT_UNIQUEINDEX); CheckDlgButton(hdlg, DRV_READONLY, DEFAULT_READONLY); CheckDlgButton(hdlg, DRV_USEDECLAREFETCH, DEFAULT_USEDECLAREFETCH); CheckDlgButton(hdlg, DRV_PARSE, DEFAULT_PARSE); CheckDlgButton(hdlg, DRV_CANCELASFREESTMT, DEFAULT_CANCELASFREESTMT); /* Unknown Sizes */ CheckDlgButton(hdlg, DRV_UNKNOWN_DONTKNOW, 0); CheckDlgButton(hdlg, DRV_UNKNOWN_LONGEST, 0); CheckDlgButton(hdlg, DRV_UNKNOWN_MAX, 0); switch(DEFAULT_UNKNOWNSIZES) { case UNKNOWNS_AS_DONTKNOW: CheckDlgButton(hdlg, DRV_UNKNOWN_DONTKNOW, 1); break; case UNKNOWNS_AS_LONGEST: CheckDlgButton(hdlg, DRV_UNKNOWN_LONGEST, 1); break; case UNKNOWNS_AS_MAX: CheckDlgButton(hdlg, DRV_UNKNOWN_MAX, 1); break; } CheckDlgButton(hdlg, DRV_TEXT_LONGVARCHAR, DEFAULT_TEXTASLONGVARCHAR); CheckDlgButton(hdlg, DRV_UNKNOWNS_LONGVARCHAR, DEFAULT_UNKNOWNSASLONGVARCHAR); CheckDlgButton(hdlg, DRV_BOOLS_CHAR, DEFAULT_BOOLSASCHAR); SetDlgItemInt(hdlg, DRV_CACHE_SIZE, FETCH_MAX, FALSE); SetDlgItemInt(hdlg, DRV_VARCHAR_SIZE, MAX_VARCHAR_SIZE, FALSE); SetDlgItemInt(hdlg, DRV_LONGVARCHAR_SIZE, TEXT_FIELD_SIZE, TRUE); SetDlgItemText(hdlg, DRV_EXTRASYSTABLEPREFIXES, DEFAULT_EXTRASYSTABLEPREFIXES); /* Driver Connection Settings */ SetDlgItemText(hdlg, DRV_CONNSETTINGS, ""); break; } } return FALSE; } int CALLBACK ds_optionsProc(HWND hdlg, WORD wMsg, WPARAM wParam, LPARAM lParam) { ConnInfo *ci; char buf[128]; switch (wMsg) { case WM_INITDIALOG: ci = (ConnInfo *) lParam; SetWindowLong(hdlg, DWL_USER, lParam); /* save for OK */ /* Change window caption */ if (ci->driver[0]) SetWindowText(hdlg, "Advanced Options (Connection)"); else { sprintf(buf, "Advanced Options (%s)", ci->dsn); SetWindowText(hdlg, buf); } /* Readonly */ CheckDlgButton(hdlg, DS_READONLY, atoi(ci->onlyread)); /* Protocol */ if (strncmp(ci->protocol, PG62, strlen(PG62)) == 0) CheckDlgButton(hdlg, DS_PG62, 1); else if (strncmp(ci->protocol, PG63, strlen(PG63)) == 0) CheckDlgButton(hdlg, DS_PG63, 1); else /* latest */ CheckDlgButton(hdlg, DS_PG64, 1); CheckDlgButton(hdlg, DS_SHOWOIDCOLUMN, atoi(ci->show_oid_column)); CheckDlgButton(hdlg, DS_FAKEOIDINDEX, atoi(ci->fake_oid_index)); CheckDlgButton(hdlg, DS_ROWVERSIONING, atoi(ci->row_versioning)); CheckDlgButton(hdlg, DS_SHOWSYSTEMTABLES, atoi(ci->show_system_tables)); EnableWindow(GetDlgItem(hdlg, DS_FAKEOIDINDEX), atoi(ci->show_oid_column)); /* Datasource Connection Settings */ SetDlgItemText(hdlg, DS_CONNSETTINGS, ci->conn_settings); break; case WM_COMMAND: switch (GET_WM_COMMAND_ID(wParam, lParam)) { case DS_SHOWOIDCOLUMN: mylog("WM_COMMAND: DS_SHOWOIDCOLUMN\n"); EnableWindow(GetDlgItem(hdlg, DS_FAKEOIDINDEX), IsDlgButtonChecked(hdlg, DS_SHOWOIDCOLUMN)); return TRUE; case IDOK: ci = (ConnInfo *)GetWindowLong(hdlg, DWL_USER); mylog("IDOK: got ci = %u\n", ci); /* Readonly */ sprintf(ci->onlyread, "%d", IsDlgButtonChecked(hdlg, DS_READONLY)); /* Protocol */ if ( IsDlgButtonChecked(hdlg, DS_PG62)) strcpy(ci->protocol, PG62); else if ( IsDlgButtonChecked(hdlg, DS_PG63)) strcpy(ci->protocol, PG63); else /* latest */ strcpy(ci->protocol, PG64); sprintf(ci->show_system_tables, "%d", IsDlgButtonChecked(hdlg, DS_SHOWSYSTEMTABLES)); sprintf(ci->row_versioning, "%d", IsDlgButtonChecked(hdlg, DS_ROWVERSIONING)); /* OID Options*/ sprintf(ci->fake_oid_index, "%d", IsDlgButtonChecked(hdlg, DS_FAKEOIDINDEX)); sprintf(ci->show_oid_column, "%d", IsDlgButtonChecked(hdlg, DS_SHOWOIDCOLUMN)); /* Datasource Connection Settings */ GetDlgItemText(hdlg, DS_CONNSETTINGS, ci->conn_settings, sizeof(ci->conn_settings)); /* fall through */ case IDCANCEL: EndDialog(hdlg, GET_WM_COMMAND_ID(wParam, lParam) == IDOK); return TRUE; } } return FALSE; } #endif /* WIN32 */ void makeConnectString(char *connect_string, ConnInfo *ci) { char got_dsn = (ci->dsn[0] != '\0'); char encoded_conn_settings[LARGE_REGISTRY_LEN]; /* fundamental info */ sprintf(connect_string, "%s=%s;DATABASE=%s;SERVER=%s;PORT=%s;UID=%s;PWD=%s", got_dsn ? "DSN" : "DRIVER", got_dsn ? ci->dsn : ci->driver, ci->database, ci->server, ci->port, ci->username, ci->password); encode(ci->conn_settings, encoded_conn_settings); /* extra info */ sprintf(&connect_string[strlen(connect_string)], ";READONLY=%s;PROTOCOL=%s;FAKEOIDINDEX=%s;SHOWOIDCOLUMN=%s;ROWVERSIONING=%s;SHOWSYSTEMTABLES=%s;CONNSETTINGS=%s", ci->onlyread, ci->protocol, ci->fake_oid_index, ci->show_oid_column, ci->row_versioning, ci->show_system_tables, encoded_conn_settings); } void copyAttributes(ConnInfo *ci, char *attribute, char *value) { if(stricmp(attribute, "DSN") == 0) strcpy(ci->dsn, value); else if(stricmp(attribute, "driver") == 0) strcpy(ci->driver, value); else if(stricmp(attribute, INI_DATABASE) == 0) strcpy(ci->database, value); else if(stricmp(attribute, INI_SERVER) == 0 || stricmp(attribute, "server") == 0) strcpy(ci->server, value); else if(stricmp(attribute, INI_USER) == 0 || stricmp(attribute, "uid") == 0) strcpy(ci->username, value); else if(stricmp(attribute, INI_PASSWORD) == 0 || stricmp(attribute, "pwd") == 0) strcpy(ci->password, value); else if(stricmp(attribute, INI_PORT) == 0) strcpy(ci->port, value); else if(stricmp(attribute, INI_UDS) == 0) strcpy(ci->uds, value); else if (stricmp(attribute, INI_READONLY) == 0) strcpy(ci->onlyread, value); else if (stricmp(attribute, INI_PROTOCOL) == 0) strcpy(ci->protocol, value); else if (stricmp(attribute, INI_SHOWOIDCOLUMN) == 0) strcpy(ci->show_oid_column, value); else if (stricmp(attribute, INI_FAKEOIDINDEX) == 0) strcpy(ci->fake_oid_index, value); else if (stricmp(attribute, INI_ROWVERSIONING) == 0) strcpy(ci->row_versioning, value); else if (stricmp(attribute, INI_SHOWSYSTEMTABLES) == 0) strcpy(ci->show_system_tables, value); else if (stricmp(attribute, INI_CONNSETTINGS) == 0) { decode(value, ci->conn_settings); /* strcpy(ci->conn_settings, value); */ } mylog("copyAttributes: DSN='%s',server='%s',dbase='%s',user='%s',passwd='%s',port='%s',onlyread='%s',protocol='%s', conn_settings='%s')\n", ci->dsn, ci->server,ci->database,ci->username,ci->password,ci->port,ci->onlyread,ci->protocol,ci->conn_settings); } void getDSNdefaults(ConnInfo *ci) { if (ci->port[0] == '\0') strcpy(ci->port, DEFAULT_PORT); if (ci->onlyread[0] == '\0') sprintf(ci->onlyread, "%d", globals.onlyread); if (ci->protocol[0] == '\0') strcpy(ci->protocol, globals.protocol); if (ci->fake_oid_index[0] == '\0') sprintf(ci->fake_oid_index, "%d", DEFAULT_FAKEOIDINDEX); if (ci->show_oid_column[0] == '\0') sprintf(ci->show_oid_column, "%d", DEFAULT_SHOWOIDCOLUMN); if (ci->show_system_tables[0] == '\0') sprintf(ci->show_system_tables, "%d", DEFAULT_SHOWSYSTEMTABLES); if (ci->row_versioning[0] == '\0') sprintf(ci->row_versioning, "%d", DEFAULT_ROWVERSIONING); } void getDSNinfo(ConnInfo *ci, char overwrite) { char *DSN = ci->dsn; char encoded_conn_settings[LARGE_REGISTRY_LEN]; /* If a driver keyword was present, then dont use a DSN and return. */ /* If DSN is null and no driver, then use the default datasource. */ if ( DSN[0] == '\0') { if ( ci->driver[0] != '\0') return; else strcpy(DSN, INI_DSN); } /* brute-force chop off trailing blanks... */ while (*(DSN+strlen(DSN)-1) == ' ') *(DSN+strlen(DSN)-1) = '\0'; /* Proceed with getting info for the given DSN. */ if ( ci->desc[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_KDESC, "", ci->desc, sizeof(ci->desc), ODBC_INI); if ( ci->server[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_SERVER, "", ci->server, sizeof(ci->server), ODBC_INI); if ( ci->database[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_DATABASE, "", ci->database, sizeof(ci->database), ODBC_INI); if ( ci->username[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_USER, "", ci->username, sizeof(ci->username), ODBC_INI); if ( ci->password[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_PASSWORD, "", ci->password, sizeof(ci->password), ODBC_INI); if ( ci->port[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_PORT, "", ci->port, sizeof(ci->port), ODBC_INI); if ( ci->uds[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_UDS, "", ci->uds, sizeof(ci->uds), ODBC_INI); if ( ci->onlyread[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_READONLY, "", ci->onlyread, sizeof(ci->onlyread), ODBC_INI); if ( toupper(ci->onlyread[0]) == 'Y' ) strcpy( ci->onlyread, "1" ); if ( ci->show_oid_column[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_SHOWOIDCOLUMN, "", ci->show_oid_column, sizeof(ci->show_oid_column), ODBC_INI); if ( toupper(ci->show_oid_column[0]) == 'Y' ) strcpy( ci->show_oid_column, "1" ); if ( ci->fake_oid_index[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_FAKEOIDINDEX, "", ci->fake_oid_index, sizeof(ci->fake_oid_index), ODBC_INI); if ( toupper(ci->fake_oid_index[0]) == 'Y' ) strcpy( ci->fake_oid_index, "1" ); if ( ci->row_versioning[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_ROWVERSIONING, "", ci->row_versioning, sizeof(ci->row_versioning), ODBC_INI); if ( toupper(ci->row_versioning[0]) == 'Y' ) strcpy( ci->row_versioning, "1" ); if ( ci->show_system_tables[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_SHOWSYSTEMTABLES, "", ci->show_system_tables, sizeof(ci->show_system_tables), ODBC_INI); if ( toupper(ci->show_system_tables[0]) == 'Y' ) strcpy( ci->show_system_tables, "1" ); if ( ci->protocol[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_PROTOCOL, "", ci->protocol, sizeof(ci->protocol), ODBC_INI); if ( ci->conn_settings[0] == '\0' || overwrite) { SQLGetPrivateProfileString(DSN, INI_CONNSETTINGS, "", encoded_conn_settings, sizeof(encoded_conn_settings), ODBC_INI); decode(encoded_conn_settings, ci->conn_settings); } if ( ci->translation_dll[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_TRANSLATIONDLL, "", ci->translation_dll, sizeof(ci->translation_dll), ODBC_INI); if ( ci->translation_option[0] == '\0' || overwrite) SQLGetPrivateProfileString(DSN, INI_TRANSLATIONOPTION, "", ci->translation_option, sizeof(ci->translation_option), ODBC_INI); /* Allow override of odbcinst.ini parameters here */ getGlobalDefaults(DSN, ODBC_INI, TRUE); qlog("DSN info: DSN='%s',server='%s',port='%s',dbase='%s',user='%s',passwd='%s'\n", DSN, ci->server, ci->port, ci->database, ci->username, ci->password); qlog(" onlyread='%s',protocol='%s',showoid='%s',fakeoidindex='%s',showsystable='%s'\n", ci->onlyread, ci->protocol, ci->show_oid_column, ci->fake_oid_index, ci->show_system_tables); qlog(" conn_settings='%s'\n", ci->conn_settings); qlog(" translation_dll='%s',translation_option='%s'\n", ci->translation_dll, ci->translation_option); } /* This is for datasource based options only */ void writeDSNinfo(ConnInfo *ci) { char *DSN = ci->dsn; char encoded_conn_settings[LARGE_REGISTRY_LEN]; encode(ci->conn_settings, encoded_conn_settings); SQLWritePrivateProfileString(DSN, INI_KDESC, ci->desc, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_DATABASE, ci->database, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_SERVER, ci->server, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_PORT, ci->port, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_UDS, ci->uds, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_USER, ci->username, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_PASSWORD, ci->password, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_READONLY, ci->onlyread, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_SHOWOIDCOLUMN, ci->show_oid_column, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_FAKEOIDINDEX, ci->fake_oid_index, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_ROWVERSIONING, ci->row_versioning, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_SHOWSYSTEMTABLES, ci->show_system_tables, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_PROTOCOL, ci->protocol, ODBC_INI); SQLWritePrivateProfileString(DSN, INI_CONNSETTINGS, encoded_conn_settings, ODBC_INI); } /* This function reads the ODBCINST.INI portion of the registry and gets any driver defaults. */ void getGlobalDefaults(char *section, char *filename, char override) { char temp[256]; /* Fetch Count is stored in driver section */ SQLGetPrivateProfileString(section, INI_FETCH, "", temp, sizeof(temp), filename); if ( temp[0] ) { globals.fetch_max = atoi(temp); /* sanity check if using cursors */ if (globals.fetch_max <= 0) globals.fetch_max = FETCH_MAX; } else if ( ! override) globals.fetch_max = FETCH_MAX; /* Socket Buffersize is stored in driver section */ SQLGetPrivateProfileString(section, INI_SOCKET, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.socket_buffersize = atoi(temp); else if ( ! override) globals.socket_buffersize = SOCK_BUFFER_SIZE; /* Debug is stored in the driver section */ SQLGetPrivateProfileString(section, INI_DEBUG, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.debug = atoi(temp); else if ( ! override) globals.debug = DEFAULT_DEBUG; /* CommLog is stored in the driver section */ SQLGetPrivateProfileString(section, INI_COMMLOG, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.commlog = atoi(temp); else if ( ! override) globals.commlog = DEFAULT_COMMLOG; /* Optimizer is stored in the driver section only */ SQLGetPrivateProfileString(section, INI_OPTIMIZER, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.disable_optimizer = atoi(temp); else if ( ! override) globals.disable_optimizer = DEFAULT_OPTIMIZER; /* KSQO is stored in the driver section only */ SQLGetPrivateProfileString(section, INI_KSQO, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.ksqo = atoi(temp); else if ( ! override) globals.ksqo = DEFAULT_KSQO; /* Recognize Unique Index is stored in the driver section only */ SQLGetPrivateProfileString(section, INI_UNIQUEINDEX, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.unique_index = atoi(temp); else if ( ! override) globals.unique_index = DEFAULT_UNIQUEINDEX; /* Unknown Sizes is stored in the driver section only */ SQLGetPrivateProfileString(section, INI_UNKNOWNSIZES, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.unknown_sizes = atoi(temp); else if ( ! override) globals.unknown_sizes = DEFAULT_UNKNOWNSIZES; /* Lie about supported functions? */ SQLGetPrivateProfileString(section, INI_LIE, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.lie = atoi(temp); else if ( ! override) globals.lie = DEFAULT_LIE; /* Parse statements */ SQLGetPrivateProfileString(section, INI_PARSE, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.parse = atoi(temp); else if ( ! override) globals.parse = DEFAULT_PARSE; /* SQLCancel calls SQLFreeStmt in Driver Manager */ SQLGetPrivateProfileString(section, INI_CANCELASFREESTMT, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.cancel_as_freestmt = atoi(temp); else if ( ! override) globals.cancel_as_freestmt = DEFAULT_CANCELASFREESTMT; /* UseDeclareFetch is stored in the driver section only */ SQLGetPrivateProfileString(section, INI_USEDECLAREFETCH, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.use_declarefetch = atoi(temp); else if ( ! override) globals.use_declarefetch = DEFAULT_USEDECLAREFETCH; /* Max Varchar Size */ SQLGetPrivateProfileString(section, INI_MAXVARCHARSIZE, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.max_varchar_size = atoi(temp); else if ( ! override) globals.max_varchar_size = MAX_VARCHAR_SIZE; /* Max TextField Size */ SQLGetPrivateProfileString(section, INI_MAXLONGVARCHARSIZE, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.max_longvarchar_size = atoi(temp); else if ( ! override) globals.max_longvarchar_size = TEXT_FIELD_SIZE; /* Text As LongVarchar */ SQLGetPrivateProfileString(section, INI_TEXTASLONGVARCHAR, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.text_as_longvarchar = atoi(temp); else if ( ! override) globals.text_as_longvarchar = DEFAULT_TEXTASLONGVARCHAR; /* Unknowns As LongVarchar */ SQLGetPrivateProfileString(section, INI_UNKNOWNSASLONGVARCHAR, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.unknowns_as_longvarchar = atoi(temp); else if ( ! override) globals.unknowns_as_longvarchar = DEFAULT_UNKNOWNSASLONGVARCHAR; /* Bools As Char */ SQLGetPrivateProfileString(section, INI_BOOLSASCHAR, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.bools_as_char = atoi(temp); else if ( ! override) globals.bools_as_char = DEFAULT_BOOLSASCHAR; /* Extra Systable prefixes */ /* Use @@@ to distinguish between blank extra prefixes and no key entry */ SQLGetPrivateProfileString(section, INI_EXTRASYSTABLEPREFIXES, "@@@", temp, sizeof(temp), filename); if ( strcmp(temp, "@@@" )) strcpy(globals.extra_systable_prefixes, temp); else if ( ! override) strcpy(globals.extra_systable_prefixes, DEFAULT_EXTRASYSTABLEPREFIXES); mylog("globals.extra_systable_prefixes = '%s'\n", globals.extra_systable_prefixes); /* Dont allow override of an override! */ if ( ! override) { /* ConnSettings is stored in the driver section and per datasource for override */ SQLGetPrivateProfileString(section, INI_CONNSETTINGS, "", globals.conn_settings, sizeof(globals.conn_settings), filename); /* Default state for future DSN's Readonly attribute */ SQLGetPrivateProfileString(section, INI_READONLY, "", temp, sizeof(temp), filename); if ( temp[0] ) globals.onlyread = atoi(temp); else globals.onlyread = DEFAULT_READONLY; /* Default state for future DSN's protocol attribute This isn't a real driver option YET. This is more intended for customization from the install. */ SQLGetPrivateProfileString(section, INI_PROTOCOL, "@@@", temp, sizeof(temp), filename); if ( strcmp(temp, "@@@" )) strcpy(globals.protocol, temp); else strcpy(globals.protocol, DEFAULT_PROTOCOL); } } /* This function writes any global parameters (that can be manipulated) to the ODBCINST.INI portion of the registry */ void updateGlobals(void) { char tmp[128]; sprintf(tmp, "%d", globals.fetch_max); SQLWritePrivateProfileString(DBMS_NAME, INI_FETCH, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.commlog); SQLWritePrivateProfileString(DBMS_NAME, INI_COMMLOG, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.disable_optimizer); SQLWritePrivateProfileString(DBMS_NAME, INI_OPTIMIZER, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.ksqo); SQLWritePrivateProfileString(DBMS_NAME, INI_KSQO, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.unique_index); SQLWritePrivateProfileString(DBMS_NAME, INI_UNIQUEINDEX, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.onlyread); SQLWritePrivateProfileString(DBMS_NAME, INI_READONLY, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.use_declarefetch); SQLWritePrivateProfileString(DBMS_NAME, INI_USEDECLAREFETCH, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.unknown_sizes); SQLWritePrivateProfileString(DBMS_NAME, INI_UNKNOWNSIZES, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.text_as_longvarchar); SQLWritePrivateProfileString(DBMS_NAME, INI_TEXTASLONGVARCHAR, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.unknowns_as_longvarchar); SQLWritePrivateProfileString(DBMS_NAME, INI_UNKNOWNSASLONGVARCHAR, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.bools_as_char); SQLWritePrivateProfileString(DBMS_NAME, INI_BOOLSASCHAR, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.parse); SQLWritePrivateProfileString(DBMS_NAME, INI_PARSE, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.cancel_as_freestmt); SQLWritePrivateProfileString(DBMS_NAME, INI_CANCELASFREESTMT, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.max_varchar_size); SQLWritePrivateProfileString(DBMS_NAME, INI_MAXVARCHARSIZE, tmp, ODBCINST_INI); sprintf(tmp, "%d", globals.max_longvarchar_size); SQLWritePrivateProfileString(DBMS_NAME, INI_MAXLONGVARCHARSIZE, tmp, ODBCINST_INI); SQLWritePrivateProfileString(DBMS_NAME, INI_EXTRASYSTABLEPREFIXES, globals.extra_systable_prefixes, ODBCINST_INI); SQLWritePrivateProfileString(DBMS_NAME, INI_CONNSETTINGS, globals.conn_settings, ODBCINST_INI); } unixODBC-2.2.14-p2/Drivers/Postgre7.1/drvconn.c0100644000076400007640000002171110124241103017267 0ustar nicknick /* Module: drvconn.c * * Description: This module contains only routines related to * implementing SQLDriverConnect. * * Classes: n/a * * API functions: SQLDriverConnect * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "psqlodbc.h" #include "connection.h" #ifndef WIN32 #include #include #define NEAR #else #include #include #endif #include #ifndef WIN32 #define stricmp(s1,s2) strcasecmp(s1,s2) #define strnicmp(s1,s2,n) strncasecmp(s1,s2,n) #else #include #include #include #include "resource.h" #endif #ifndef TRUE #define TRUE (BOOL)1 #endif #ifndef FALSE #define FALSE (BOOL)0 #endif #include "dlg_specific.h" /* prototypes */ void dconn_get_connect_attributes(UCHAR FAR *connect_string, ConnInfo *ci); #ifdef WIN32 BOOL FAR PASCAL dconn_FDriverConnectProc(HWND hdlg, UINT wMsg, WPARAM wParam, LPARAM lParam); RETCODE dconn_DoDialog(HWND hwnd, ConnInfo *ci); extern HINSTANCE NEAR s_hModule; /* Saved module handle. */ #endif extern GLOBAL_VALUES globals; RETCODE SQL_API SQLDriverConnect( HDBC hdbc, HWND hwnd, UCHAR FAR *szConnStrIn, SWORD cbConnStrIn, UCHAR FAR *szConnStrOut, SWORD cbConnStrOutMax, SWORD FAR *pcbConnStrOut, UWORD fDriverCompletion) { static char* const func = "SQLDriverConnect"; ConnectionClass *conn = (ConnectionClass *) hdbc; ConnInfo *ci; #ifdef WIN32 RETCODE dialog_result; #endif RETCODE result; char connStrIn[MAX_CONNECT_STRING]; char connStrOut[MAX_CONNECT_STRING]; int retval; char salt[5]; char password_required = AUTH_REQ_OK; int len = 0; mylog("%s: entering...\n", func); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } make_string((char*)szConnStrIn, cbConnStrIn, connStrIn); mylog("**** SQLDriverConnect: fDriverCompletion=%d, connStrIn='%s'\n", fDriverCompletion, connStrIn); qlog("conn=%u, SQLDriverConnect( in)='%s', fDriverCompletion=%d\n", conn, connStrIn, fDriverCompletion); ci = &(conn->connInfo); /* Parse the connect string and fill in conninfo for this hdbc. */ dconn_get_connect_attributes((SQLCHAR*)connStrIn, ci); /* If the ConnInfo in the hdbc is missing anything, */ /* this function will fill them in from the registry (assuming */ /* of course there is a DSN given -- if not, it does nothing!) */ getDSNinfo(ci, CONN_DONT_OVERWRITE); /* Fill in any default parameters if they are not there. */ getDSNdefaults(ci); /* initialize pg_version */ CC_initialize_pg_version(conn); salt[0] = '\0'; #ifdef WIN32 dialog: #endif ci->focus_password = password_required; switch(fDriverCompletion) { #ifdef WIN32 case SQL_DRIVER_PROMPT: dialog_result = dconn_DoDialog(hwnd, ci); if(dialog_result != SQL_SUCCESS) { return dialog_result; } break; case SQL_DRIVER_COMPLETE_REQUIRED: /* Fall through */ case SQL_DRIVER_COMPLETE: /* Password is not a required parameter. */ if( ci->username[0] == '\0' || ci->server[0] == '\0' || ci->database[0] == '\0' || ci->port[0] == '\0' || password_required) { dialog_result = dconn_DoDialog(hwnd, ci); if(dialog_result != SQL_SUCCESS) { return dialog_result; } } break; #else case SQL_DRIVER_PROMPT: case SQL_DRIVER_COMPLETE: case SQL_DRIVER_COMPLETE_REQUIRED: #endif case SQL_DRIVER_NOPROMPT: break; } /* Password is not a required parameter unless authentication asks for it. For now, I think it's better to just let the application ask over and over until a password is entered (the user can always hit Cancel to get out) */ if( ci->username[0] == '\0' || ci->server[0] == '\0' || ci->database[0] == '\0' || ci->port[0] == '\0') { /* (password_required && ci->password[0] == '\0')) */ return SQL_NO_DATA_FOUND; } /* do the actual connect */ retval = CC_connect(conn, password_required, salt); if (retval < 0) { /* need a password */ if (fDriverCompletion == SQL_DRIVER_NOPROMPT) { CC_log_error(func, "Need password but Driver_NoPrompt", conn); return SQL_ERROR; /* need a password but not allowed to prompt so error */ } else { #ifdef WIN32 password_required = TRUE; goto dialog; #else return SQL_ERROR; /* until a better solution is found. */ #endif } } else if (retval == 0) { /* error msg filled in above */ CC_log_error(func, "Error from CC_Connect", conn); return SQL_ERROR; } /*********************************************/ /* Create the Output Connection String */ /*********************************************/ result = SQL_SUCCESS; makeConnectString(connStrOut, ci); len = strlen(connStrOut); if(szConnStrOut) { /* Return the completed string to the caller. The correct method is to only construct the connect string if a dialog was put up, otherwise, it should just copy the connection input string to the output. However, it seems ok to just always construct an output string. There are possible bad side effects on working applications (Access) by implementing the correct behavior, anyway. */ strncpy_null((char*)szConnStrOut, connStrOut, cbConnStrOutMax); if (len >= cbConnStrOutMax) { result = SQL_SUCCESS_WITH_INFO; CC_set_error(conn, CONN_TRUNCATED, "The buffer was too small for the result."); } } if(pcbConnStrOut) *pcbConnStrOut = len; mylog("szConnStrOut = '%s'\n", szConnStrOut); qlog("conn=%u, SQLDriverConnect(out)='%s'\n", conn, szConnStrOut); mylog("SQLDRiverConnect: returning %d\n", result); return result; } #ifdef WIN32 RETCODE dconn_DoDialog(HWND hwnd, ConnInfo *ci) { int dialog_result; mylog("dconn_DoDialog: ci = %u\n", ci); if(hwnd) { dialog_result = DialogBoxParam(s_hModule, MAKEINTRESOURCE(DLG_CONFIG), hwnd, dconn_FDriverConnectProc, (LPARAM) ci); if(!dialog_result || (dialog_result == -1)) { return SQL_NO_DATA_FOUND; } else { return SQL_SUCCESS; } } return SQL_ERROR; } BOOL FAR PASCAL dconn_FDriverConnectProc( HWND hdlg, UINT wMsg, WPARAM wParam, LPARAM lParam) { ConnInfo *ci; switch (wMsg) { case WM_INITDIALOG: ci = (ConnInfo *) lParam; /* Change the caption for the setup dialog */ SetWindowText(hdlg, "PostgreSQL Connection"); SetWindowText(GetDlgItem(hdlg, IDC_DATASOURCE), "Connection"); /* Hide the DSN and description fields */ ShowWindow(GetDlgItem(hdlg, IDC_DSNAMETEXT), SW_HIDE); ShowWindow(GetDlgItem(hdlg, IDC_DSNAME), SW_HIDE); ShowWindow(GetDlgItem(hdlg, IDC_DESCTEXT), SW_HIDE); ShowWindow(GetDlgItem(hdlg, IDC_DESC), SW_HIDE); SetWindowLong(hdlg, DWL_USER, lParam);/* Save the ConnInfo for the "OK" */ SetDlgStuff(hdlg, ci); if (ci->database[0] == '\0') ; /* default focus */ else if (ci->server[0] == '\0') SetFocus(GetDlgItem(hdlg, IDC_SERVER)); else if (ci->port[0] == '\0') SetFocus(GetDlgItem(hdlg, IDC_PORT)); else if (ci->username[0] == '\0') SetFocus(GetDlgItem(hdlg, IDC_USER)); else if (ci->focus_password) SetFocus(GetDlgItem(hdlg, IDC_PASSWORD)); break; case WM_COMMAND: switch (GET_WM_COMMAND_ID(wParam, lParam)) { case IDOK: ci = (ConnInfo *) GetWindowLong(hdlg, DWL_USER); GetDlgStuff(hdlg, ci); case IDCANCEL: EndDialog(hdlg, GET_WM_COMMAND_ID(wParam, lParam) == IDOK); return TRUE; case IDC_DRIVER: DialogBoxParam(s_hModule, MAKEINTRESOURCE(DLG_OPTIONS_DRV), hdlg, driver_optionsProc, (LPARAM) NULL); break; case IDC_DATASOURCE: ci = (ConnInfo *) GetWindowLong(hdlg, DWL_USER); DialogBoxParam(s_hModule, MAKEINTRESOURCE(DLG_OPTIONS_DS), hdlg, ds_optionsProc, (LPARAM) ci); break; } } return FALSE; } #endif /* WIN32 */ void dconn_get_connect_attributes(UCHAR FAR *connect_string, ConnInfo *ci) { char *our_connect_string; char *pair, *attribute, *value, *equals; char *strtok_arg; memset(ci, 0, sizeof(ConnInfo)); our_connect_string = strdup((char*)connect_string); strtok_arg = our_connect_string; mylog("our_connect_string = '%s'\n", our_connect_string); while(1) { pair = strtok(strtok_arg, ";"); if(strtok_arg) { strtok_arg = 0; } if(!pair) { break; } equals = strchr(pair, '='); if ( ! equals) continue; *equals = '\0'; attribute = pair; /* ex. DSN */ value = equals + 1; /* ex. 'CEO co1' */ mylog("attribute = '%s', value = '%s'\n", attribute, value); if( !attribute || !value) continue; /* Copy the appropriate value to the conninfo */ copyAttributes(ci, attribute, value); } free(our_connect_string); } unixODBC-2.2.14-p2/Drivers/Postgre7.1/environ.c0100644000076400007640000003574707513046525017337 0ustar nicknick /* Module: environ.c * * Description: This module contains routines related to * the environment, such as storing connection handles, * and returning errors. * * Classes: EnvironmentClass (Functions prefix: "EN_") * * API functions: SQLAllocEnv, SQLFreeEnv, SQLError * * Comments: See "notice.txt" for copyright and license information. * */ #include "environ.h" #include "connection.h" #include "statement.h" #include #include #ifdef UNIXODBC #include #include #include "dlg_specific.h" #else #include "isql.h" #include "isqlext.h" #endif /* The one instance of the handles */ ConnectionClass *conns[MAX_CONNECTIONS]; RETCODE SQL_API SQLAllocEnv(HENV FAR *phenv) { static char* const func = "SQLAllocEnv"; mylog("**** in SQLAllocEnv ** \n"); /* * add this here from _init (NG) */ getGlobalDefaults(DBMS_NAME, ODBCINST_INI, FALSE); *phenv = (HENV) EN_Constructor(); if ( ! *phenv) { *phenv = SQL_NULL_HENV; EN_log_error(func, "Error allocating environment", NULL); return SQL_ERROR; } mylog("** exit SQLAllocEnv: phenv = %u **\n", *phenv); return SQL_SUCCESS; } RETCODE SQL_API SQLFreeEnv(HENV henv) { static char* const func = "SQLFreeEnv"; EnvironmentClass *env = (EnvironmentClass *) henv; mylog("**** in SQLFreeEnv: env = %u ** \n", env); if (env && EN_Destructor(env)) { mylog(" ok\n"); return SQL_SUCCESS; } mylog(" error\n"); EN_log_error(func, "Error freeing environment", env); return SQL_ERROR; } /* Returns the next SQL error information. */ SQLRETURN SQLError(SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLCHAR *szSqlState, SQLINTEGER *pfNativeError, SQLCHAR *szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT *pcbErrorMsg) { char *msg; int status; mylog("**** SQLError: henv=%u, hdbc=%u, hstmt=%u\n", henv, hdbc, hstmt); if (SQL_NULL_HSTMT != hstmt) { /* CC: return an error of a hstmt */ StatementClass *stmt = (StatementClass *) hstmt; if (SC_get_error(stmt, &status, &msg)) { mylog("SC_get_error: status = %d, msg = #%s#\n", status, msg); if (NULL == msg) { if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } if (NULL != pcbErrorMsg) *pcbErrorMsg = (SWORD)strlen(msg); if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) strncpy_null((char*)szErrorMsg, msg, cbErrorMsgMax); if (NULL != pfNativeError) *pfNativeError = status; if (NULL != szSqlState) switch (status) { /* now determine the SQLSTATE to be returned */ case STMT_TRUNCATED: strcpy((char*)szSqlState, "01004"); /* data truncated */ break; case STMT_INFO_ONLY: strcpy((char*)szSqlState, "01000"); /* just information that is returned, no error */ break; case STMT_BAD_ERROR: strcpy((char*)szSqlState, "08S01"); /* communication link failure */ break; case STMT_CREATE_TABLE_ERROR: strcpy((char*)szSqlState, "S0001"); /* table already exists */ break; case STMT_STATUS_ERROR: case STMT_SEQUENCE_ERROR: strcpy((char*)szSqlState, "S1010"); /* Function sequence error */ break; case STMT_NO_MEMORY_ERROR: strcpy((char*)szSqlState, "S1001"); /* memory allocation failure */ break; case STMT_COLNUM_ERROR: strcpy((char*)szSqlState, "S1002"); /* invalid column number */ break; case STMT_NO_STMTSTRING: strcpy((char*)szSqlState, "S1001"); /* having no stmtstring is also a malloc problem */ break; case STMT_ERROR_TAKEN_FROM_BACKEND: strcpy((char*)szSqlState, "S1000"); /* general error */ break; case STMT_INTERNAL_ERROR: strcpy((char*)szSqlState, "S1000"); /* general error */ break; case STMT_ROW_OUT_OF_RANGE: strcpy((char*)szSqlState, "S1107"); break; case STMT_OPERATION_CANCELLED: strcpy((char*)szSqlState, "S1008"); break; case STMT_NOT_IMPLEMENTED_ERROR: strcpy((char*)szSqlState, "S1C00"); /* == 'driver not capable' */ break; case STMT_OPTION_OUT_OF_RANGE_ERROR: strcpy((char*)szSqlState, "S1092"); break; case STMT_BAD_PARAMETER_NUMBER_ERROR: strcpy((char*)szSqlState, "S1093"); break; case STMT_INVALID_COLUMN_NUMBER_ERROR: strcpy((char*)szSqlState, "S1002"); break; case STMT_RESTRICTED_DATA_TYPE_ERROR: strcpy((char*)szSqlState, "07006"); break; case STMT_INVALID_CURSOR_STATE_ERROR: strcpy((char*)szSqlState, "24000"); break; case STMT_OPTION_VALUE_CHANGED: strcpy((char*)szSqlState, "01S02"); break; case STMT_INVALID_CURSOR_NAME: strcpy((char*)szSqlState, "34000"); break; case STMT_NO_CURSOR_NAME: strcpy((char*)szSqlState, "S1015"); break; case STMT_INVALID_ARGUMENT_NO: strcpy((char*)szSqlState, "S1009"); /* invalid argument value */ break; case STMT_INVALID_CURSOR_POSITION: strcpy((char*)szSqlState, "S1109"); break; case STMT_VALUE_OUT_OF_RANGE: strcpy((char*)szSqlState, "22003"); break; case STMT_OPERATION_INVALID: strcpy((char*)szSqlState, "S1011"); break; case STMT_EXEC_ERROR: default: strcpy((char*)szSqlState, "S1000"); /* also a general error */ break; } mylog(" szSqlState = '%s', szError='%s'\n", szSqlState, szErrorMsg); } else { if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; mylog(" returning NO_DATA_FOUND\n"); return SQL_NO_DATA_FOUND; } return SQL_SUCCESS; } else if (SQL_NULL_HDBC != hdbc) { ConnectionClass *conn = (ConnectionClass *) hdbc; mylog("calling CC_get_error\n"); if (CC_get_error(conn, &status, &msg)) { mylog("CC_get_error: status = %d, msg = #%s#\n", status, msg); if (NULL == msg) { if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } if (NULL != pcbErrorMsg) *pcbErrorMsg = (SWORD)strlen(msg); if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) strncpy_null((char*)szErrorMsg, msg, cbErrorMsgMax); if (NULL != pfNativeError) *pfNativeError = status; if (NULL != szSqlState) switch(status) { case STMT_OPTION_VALUE_CHANGED: case CONN_OPTION_VALUE_CHANGED: strcpy((char*)szSqlState, "01S02"); break; case STMT_TRUNCATED: case CONN_TRUNCATED: strcpy((char*)szSqlState, "01004"); /* data truncated */ break; case CONN_INIREAD_ERROR: strcpy((char*)szSqlState, "IM002"); /* data source not found */ break; case CONN_OPENDB_ERROR: strcpy((char*)szSqlState, "08001"); /* unable to connect to data source */ break; case CONN_INVALID_AUTHENTICATION: case CONN_AUTH_TYPE_UNSUPPORTED: strcpy((char*)szSqlState, "28000"); break; case CONN_STMT_ALLOC_ERROR: strcpy((char*)szSqlState, "S1001"); /* memory allocation failure */ break; case CONN_IN_USE: strcpy((char*)szSqlState, "S1000"); /* general error */ break; case CONN_UNSUPPORTED_OPTION: strcpy((char*)szSqlState, "IM001"); /* driver does not support this function */ case CONN_INVALID_ARGUMENT_NO: strcpy((char*)szSqlState, "S1009"); /* invalid argument value */ break; case CONN_TRANSACT_IN_PROGRES: strcpy((char*)szSqlState, "S1010"); /* when the user tries to switch commit mode in a transaction */ /* -> function sequence error */ break; case CONN_NO_MEMORY_ERROR: strcpy((char*)szSqlState, "S1001"); break; case CONN_NOT_IMPLEMENTED_ERROR: case STMT_NOT_IMPLEMENTED_ERROR: strcpy((char*)szSqlState, "S1C00"); break; case CONN_VALUE_OUT_OF_RANGE: case STMT_VALUE_OUT_OF_RANGE: strcpy((char*)szSqlState, "22003"); break; default: strcpy((char*)szSqlState, "S1000"); /* general error */ break; } } else { mylog("CC_Get_error returned nothing.\n"); if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } return SQL_SUCCESS; } else if (SQL_NULL_HENV != henv) { EnvironmentClass *env = (EnvironmentClass *)henv; if(EN_get_error(env, &status, &msg)) { mylog("EN_get_error: status = %d, msg = #%s#\n", status, msg); if (NULL == msg) { if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } if (NULL != pcbErrorMsg) *pcbErrorMsg = (SWORD)strlen(msg); if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) strncpy_null((char*)szErrorMsg, msg, cbErrorMsgMax); if (NULL != pfNativeError) *pfNativeError = status; if(szSqlState) { switch(status) { case ENV_ALLOC_ERROR: /* memory allocation failure */ strcpy((char*)szSqlState, "S1001"); break; default: strcpy((char*)szSqlState, "S1000"); /* general error */ break; } } } else { if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } return SQL_SUCCESS; } if (NULL != szSqlState) strcpy((char*)szSqlState, "00000"); if (NULL != pcbErrorMsg) *pcbErrorMsg = 0; if ((NULL != szErrorMsg) && (cbErrorMsgMax > 0)) szErrorMsg[0] = '\0'; return SQL_NO_DATA_FOUND; } /*********************************************************************/ /* * EnvironmentClass implementation */ EnvironmentClass *EN_Constructor(void) { EnvironmentClass *rv; rv = (EnvironmentClass *) malloc(sizeof(EnvironmentClass)); if( rv) { rv->errormsg = 0; rv->errornumber = 0; } return rv; } char EN_Destructor(EnvironmentClass *self) { int lf; char rv = 1; mylog("in EN_Destructor, self=%u\n", self); /* the error messages are static strings distributed throughout */ /* the source--they should not be freed */ /* Free any connections belonging to this environment */ for (lf = 0; lf < MAX_CONNECTIONS; lf++) { if (conns[lf] && conns[lf]->henv == (HENV) self) rv = rv && CC_Destructor(conns[lf]); } free( self ); mylog("exit EN_Destructor: rv = %d\n", rv); return rv; } char EN_get_error(EnvironmentClass *self, int *number, char **message) { if(self && self->errormsg && self->errornumber) { *message = self->errormsg; *number = self->errornumber; self->errormsg = 0; self->errornumber = 0; return 1; } else { return 0; } } char EN_add_connection(EnvironmentClass *self, ConnectionClass *conn) { int i; mylog("EN_add_connection: self = %u, conn = %u\n", self, conn); for (i = 0; i < MAX_CONNECTIONS; i++) { if ( ! conns[i]) { conn->henv = (HENV)self; conns[i] = conn; mylog(" added at i =%d, conn->henv = %u, conns[i]->henv = %u\n", i, conn->henv, conns[i]->henv); return TRUE; } } return FALSE; } char EN_remove_connection(EnvironmentClass *self, ConnectionClass *conn) { int i; for (i = 0; i < MAX_CONNECTIONS; i++) if (conns[i] == conn && conns[i]->status != CONN_EXECUTING) { conns[i] = NULL; return TRUE; } return FALSE; } void EN_log_error(char *func, char *desc, EnvironmentClass *self) { if (self) { qlog("ENVIRON ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->errornumber, self->errormsg); } else qlog("INVALID ENVIRON HANDLE ERROR: func=%s, desc='%s'\n", func, desc); } unixODBC-2.2.14-p2/Drivers/Postgre7.1/execute.c0100644000076400007640000005266510124241103017274 0ustar nicknick /* Module: execute.c * * Description: This module contains routines related to * preparing and executing an SQL statement. * * Classes: n/a * * API functions: SQLPrepare, SQLExecute, SQLExecDirect, SQLTransact, * SQLCancel, SQLNativeSql, SQLParamData, SQLPutData * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #include #include #ifndef WIN32 #include "isqlext.h" #else #include #include #endif #include "connection.h" #include "statement.h" #include "qresult.h" #include "convert.h" #include "bind.h" #include "lobj.h" extern GLOBAL_VALUES globals; RETCODE SQL_API PG_SQLExecute( HSTMT hstmt); SQLRETURN PG_SQLPrepare(SQLHSTMT hstmt, SQLCHAR *szSqlStr , SQLINTEGER cbSqlStr); SQLRETURN SQLPrepare(SQLHSTMT hstmt, SQLCHAR *szSqlStr , SQLINTEGER cbSqlStr) { return PG_SQLPrepare( hstmt, szSqlStr, cbSqlStr ); } /* Perform a Prepare on the SQL statement */ SQLRETURN PG_SQLPrepare(SQLHSTMT hstmt, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStr) { static char* const func = "SQLPrepare"; StatementClass *self = (StatementClass *) hstmt; int sqllen = 0; /* used for MAX_ROWS if specified */ int limlen = 0; char buffer[32]; mylog( "%s: entering...\n", func); if ( ! self) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } /* According to the ODBC specs it is valid to call SQLPrepare mulitple times. In that case, the bound SQL statement is replaced by the new one */ switch(self->status) { case STMT_PREMATURE: mylog("**** SQLPrepare: STMT_PREMATURE, recycle\n"); SC_recycle_statement(self); /* recycle the statement, but do not remove parameter bindings */ break; case STMT_FINISHED: mylog("**** SQLPrepare: STMT_FINISHED, recycle\n"); SC_recycle_statement(self); /* recycle the statement, but do not remove parameter bindings */ break; case STMT_ALLOCATED: mylog("**** SQLPrepare: STMT_ALLOCATED, copy\n"); self->status = STMT_READY; break; case STMT_READY: mylog("**** SQLPrepare: STMT_READY, change SQL\n"); break; case STMT_EXECUTING: mylog("**** SQLPrepare: STMT_EXECUTING, error!\n"); SC_set_error(self, STMT_SEQUENCE_ERROR, "SQLPrepare(): The handle does not point to a statement that is ready to be executed"); SC_log_error(func, "", self); return SQL_ERROR; default: SC_set_error(self, STMT_INTERNAL_ERROR, "An Internal Error has occured -- Unknown statement status."); SC_log_error(func, "", self); return SQL_ERROR; } if (self->statement) free(self->statement); self->statement_type = statement_type((char*)szSqlStr); if (self->statement_type == STMT_TYPE_SELECT && 0 != self->options.maxRows) { limlen = sprintf(buffer," LIMIT %d", self->options.maxRows); } sqllen = my_strlen((char*)szSqlStr, cbSqlStr) + limlen; self->statement = make_string((char*)szSqlStr, sqllen, NULL); if ( ! self->statement) { SC_set_error(self, STMT_NO_MEMORY_ERROR, "No memory available to store statement"); SC_log_error(func, "", self); return SQL_ERROR; } if (self->statement_type == STMT_TYPE_SELECT && 0 != self->options.maxRows) { strcat(self->statement, buffer); } self->prepare = TRUE; /* Check if connection is onlyread (only selects are allowed) */ if ( CC_is_onlyread(self->hdbc) && STMT_UPDATE(self)) { SC_set_error(self, STMT_EXEC_ERROR, "Connection is readonly, only select statements are allowed."); SC_log_error(func, "", self); return SQL_ERROR; } return SQL_SUCCESS; } /* - - - - - - - - - */ /* Performs the equivalent of SQLPrepare, followed by SQLExecute. */ RETCODE SQL_API PG_SQLExecDirect( HSTMT hstmt, UCHAR FAR *szSqlStr, SDWORD cbSqlStr) { StatementClass *stmt = (StatementClass *) hstmt; RETCODE result; static char* const func = "SQLExecDirect"; mylog( "%s: entering...\n", func); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if (stmt->statement) free(stmt->statement); /* keep a copy of the un-parametrized statement, in case */ /* they try to execute this statement again */ stmt->statement = make_string((char*)szSqlStr, cbSqlStr, NULL); if ( ! stmt->statement) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "No memory available to store statement"); SC_log_error(func, "", stmt); return SQL_ERROR; } mylog("**** %s: hstmt=%u, statement='%s'\n", func, hstmt, stmt->statement); stmt->prepare = FALSE; /* If an SQLPrepare was performed prior to this, but was left in */ /* the premature state because an error occurred prior to SQLExecute */ /* then set the statement to finished so it can be recycled. */ if ( stmt->status == STMT_PREMATURE ) stmt->status = STMT_FINISHED; stmt->statement_type = statement_type(stmt->statement); /* Check if connection is onlyread (only selects are allowed) */ if ( CC_is_onlyread(stmt->hdbc) && STMT_UPDATE(stmt)) { SC_set_error(stmt, STMT_EXEC_ERROR, "Connection is readonly, only select statements are allowed."); SC_log_error(func, "", stmt); return SQL_ERROR; } mylog("%s: calling SQLExecute...\n", func); result = PG_SQLExecute(hstmt); mylog("%s: returned %hd from SQLExecute\n", func, result); return result; } SQLRETURN SQLExecDirect(SQLHSTMT hstmt, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStr) { return PG_SQLExecDirect( hstmt, szSqlStr, cbSqlStr ); } /* Execute a prepared SQL statement */ RETCODE SQL_API PG_SQLExecute( HSTMT hstmt) { static char* const func="SQLExecute"; StatementClass *stmt = (StatementClass *) hstmt; ConnectionClass *conn; int i, retval; mylog("%s: entering...\n", func); if ( ! stmt) { SC_log_error(func, "", NULL); mylog("%s: NULL statement so return SQL_INVALID_HANDLE\n", func); return SQL_INVALID_HANDLE; } /* If the statement is premature, it means we already executed it from an SQLPrepare/SQLDescribeCol type of scenario. So just return success. */ if ( stmt->prepare && stmt->status == STMT_PREMATURE && !stmt->reexecute ) { stmt->status = STMT_FINISHED; if (NULL == SC_get_errormsg(stmt)) { mylog("%s: premature statement but return SQL_SUCCESS\n", func); return SQL_SUCCESS; } else { SC_log_error(func, "", stmt); mylog("%s: premature statement so return SQL_ERROR\n", func); return SQL_ERROR; } } else if ( stmt->prepare && stmt->status == STMT_PREMATURE && stmt->reexecute ) { /* * cause it to be reexecuted */ char *str; str = strdup( stmt->statement ); stmt->status = STMT_FINISHED; PG_SQLPrepare( hstmt, (SQLCHAR*) str, SQL_NTS ); free( str ); } mylog("%s: clear errors...\n", func); SC_clear_error(stmt); conn = SC_get_conn(stmt); if (conn->status == CONN_EXECUTING) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Connection is already in use."); SC_log_error(func, "", stmt); mylog("%s: problem with connection\n", func); return SQL_ERROR; } if ( ! stmt->statement) { SC_set_error(stmt, STMT_NO_STMTSTRING, "This handle does not have a SQL statement stored in it"); SC_log_error(func, "", stmt); mylog("%s: problem with handle\n", func); return SQL_ERROR; } /* If SQLExecute is being called again, recycle the statement. Note this should have been done by the application in a call to SQLFreeStmt(SQL_CLOSE) or SQLCancel. */ if (stmt->status == STMT_FINISHED) { mylog("%s: recycling statement (should have been done by app)...\n", func); SC_recycle_statement(stmt); } /* Check if the statement is in the correct state */ if ((stmt->prepare && stmt->status != STMT_READY) || (stmt->status != STMT_ALLOCATED && stmt->status != STMT_READY)) { SC_set_error(stmt, STMT_STATUS_ERROR, "The handle does not point to a statement that is ready to be executed"); SC_log_error(func, "", stmt); mylog("%s: problem with statement\n", func); return SQL_ERROR; } /* The bound parameters could have possibly changed since the last execute of this statement? Therefore check for params and re-copy. */ stmt->data_at_exec = -1; for (i = 0; i < stmt->parameters_allocated; i++) { /* Check for data at execution parameters */ if ( stmt->parameters[i].data_at_exec == TRUE) { if (stmt->data_at_exec < 0) stmt->data_at_exec = 1; else stmt->data_at_exec++; } } /* If there are some data at execution parameters, return need data */ /* SQLParamData and SQLPutData will be used to send params and execute the statement. */ if (stmt->data_at_exec > 0) return SQL_NEED_DATA; mylog("%s: copying statement params: trans_status=%d, len=%d, stmt='%s'\n", func, conn->transact_status, strlen(stmt->statement), stmt->statement); /* Create the statement with parameters substituted. */ retval = copy_statement_with_parameters(stmt); if( retval != SQL_SUCCESS) /* error msg passed from above */ return retval; mylog(" stmt_with_params = '%s'\n", stmt->stmt_with_params); return SC_execute(stmt); } RETCODE SQL_API SQLExecute( HSTMT hstmt) { return PG_SQLExecute( hstmt ); } /* - - - - - - - - - */ RETCODE SQL_API SQLTransact( HENV henv, HDBC hdbc, UWORD fType) { static char* const func = "SQLTransact"; extern ConnectionClass *conns[]; ConnectionClass *conn; QResultClass *res; char ok, *stmt_string; int lf; mylog("entering %s: hdbc=%u, henv=%u\n", func, hdbc, henv); if (hdbc == SQL_NULL_HDBC && henv == SQL_NULL_HENV) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } /* If hdbc is null and henv is valid, it means transact all connections on that henv. */ if (hdbc == SQL_NULL_HDBC && henv != SQL_NULL_HENV) { for (lf=0; lf henv == henv) if ( SQLTransact(henv, (HDBC) conn, fType) != SQL_SUCCESS) return SQL_ERROR; } return SQL_SUCCESS; } conn = (ConnectionClass *) hdbc; if (fType == SQL_COMMIT) { stmt_string = "COMMIT"; } else if (fType == SQL_ROLLBACK) { stmt_string = "ROLLBACK"; } else { CC_set_error(conn, CONN_INVALID_ARGUMENT_NO, "SQLTransact can only be called with SQL_COMMIT or SQL_ROLLBACK as parameter"); CC_log_error(func, "", conn); return SQL_ERROR; } /* If manual commit and in transaction, then proceed. */ if ( ! CC_is_in_autocommit(conn) && CC_is_in_trans(conn)) { mylog("SQLTransact: sending on conn %d '%s'\n", conn, stmt_string); res = CC_send_query(conn, stmt_string, NULL); CC_set_no_trans(conn); if ( ! res) { /* error msg will be in the connection */ CC_log_error(func, "", conn); return SQL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { CC_log_error(func, "", conn); return SQL_ERROR; } } return SQL_SUCCESS; } /* - - - - - - - - - */ RETCODE SQL_API SQLCancel( HSTMT hstmt) /* Statement to cancel. */ { static char* const func="SQLCancel"; StatementClass *stmt = (StatementClass *) hstmt; RETCODE result; #ifdef WIN32 HMODULE hmodule; FARPROC addr; #endif mylog( "%s: entering...\n", func); /* Check if this can handle canceling in the middle of a SQLPutData? */ if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } /* Not in the middle of SQLParamData/SQLPutData so cancel like a close. */ if (stmt->data_at_exec < 0) { /* MAJOR HACK for Windows to reset the driver manager's cursor state: Because of what seems like a bug in the Odbc driver manager, SQLCancel does not act like a SQLFreeStmt(CLOSE), as many applications depend on this behavior. So, this brute force method calls the driver manager's function on behalf of the application. */ #ifdef WIN32 if (globals.cancel_as_freestmt) { hmodule = GetModuleHandle("ODBC32"); addr = GetProcAddress(hmodule, "SQLFreeStmt"); result = addr( (char *) (stmt->phstmt) - 96, SQL_CLOSE); } else { result = PG_SQLFreeStmt( hstmt, SQL_CLOSE); } #else result = PG_SQLFreeStmt( hstmt, SQL_CLOSE); #endif mylog("SQLCancel: SQLFreeStmt returned %d\n", result); SC_clear_error(hstmt); return SQL_SUCCESS; } /* In the middle of SQLParamData/SQLPutData, so cancel that. */ /* Note, any previous data-at-exec buffers will be freed in the recycle */ /* if they call SQLExecDirect or SQLExecute again. */ stmt->data_at_exec = -1; stmt->current_exec_param = -1; stmt->put_data = FALSE; return SQL_SUCCESS; } /* - - - - - - - - - */ /* Returns the SQL string as modified by the driver. */ /* Currently, just copy the input string without modification */ /* observing buffer limits and truncation. */ SQLRETURN SQLNativeSql( SQLHDBC hdbc, SQLCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr) { static char* const func="SQLNativeSql"; int len = 0; char *ptr; ConnectionClass *conn = (ConnectionClass *) hdbc; RETCODE result; mylog( "%s: entering...cbSqlStrIn=%d\n", func, cbSqlStrIn); ptr = (cbSqlStrIn == 0) ? "" : make_string((char*)szSqlStrIn, cbSqlStrIn, NULL); if ( ! ptr) { CC_set_error(conn, CONN_NO_MEMORY_ERROR, "No memory available to store native sql string"); CC_log_error(func, "", conn); return SQL_ERROR; } result = SQL_SUCCESS; len = strlen(ptr); if (szSqlStr) { strncpy_null((char*)szSqlStr, ptr, cbSqlStrMax); if (len >= cbSqlStrMax) { result = SQL_SUCCESS_WITH_INFO; CC_set_error(conn, STMT_TRUNCATED, "The buffer was too small for the result."); } } if (pcbSqlStr) *pcbSqlStr = len; free(ptr); return result; } /* - - - - - - - - - */ /* Supplies parameter data at execution time. Used in conjuction with */ /* SQLPutData. */ RETCODE SQL_API SQLParamData( HSTMT hstmt, PTR FAR *prgbValue) { static char* const func = "SQLParamData"; StatementClass *stmt = (StatementClass *) hstmt; int i, retval; mylog( "%s: entering...\n", func); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } mylog("%s: data_at_exec=%d, params_alloc=%d\n", func, stmt->data_at_exec, stmt->parameters_allocated); if (stmt->data_at_exec < 0) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "No execution-time parameters for this statement"); SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->data_at_exec > stmt->parameters_allocated) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Too many execution-time parameters were present"); SC_log_error(func, "", stmt); return SQL_ERROR; } /* close the large object */ if ( stmt->lobj_fd >= 0) { odbc_lo_close(stmt->hdbc, stmt->lobj_fd); /* commit transaction if needed */ if (!globals.use_declarefetch && CC_is_in_autocommit(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "COMMIT", NULL); if (!res) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not commit (in-line) a transaction"); SC_log_error(func, "", stmt); return SQL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not commit (in-line) a transaction"); SC_log_error(func, "", stmt); return SQL_ERROR; } CC_set_no_trans(stmt->hdbc); } stmt->lobj_fd = -1; } /* Done, now copy the params and then execute the statement */ if (stmt->data_at_exec == 0) { retval = copy_statement_with_parameters(stmt); if (retval != SQL_SUCCESS) return retval; stmt->current_exec_param = -1; return SC_execute(stmt); } /* Set beginning param; if first time SQLParamData is called , start at 0. Otherwise, start at the last parameter + 1. */ i = stmt->current_exec_param >= 0 ? stmt->current_exec_param+1 : 0; /* At least 1 data at execution parameter, so Fill in the token value */ for ( ; i < stmt->parameters_allocated; i++) { if (stmt->parameters[i].data_at_exec == TRUE) { stmt->data_at_exec--; stmt->current_exec_param = i; stmt->put_data = FALSE; *prgbValue = stmt->parameters[i].buffer; /* token */ break; } } return SQL_NEED_DATA; } /* - - - - - - - - - */ /* Supplies parameter data at execution time. Used in conjunction with */ /* SQLParamData. */ SQLRETURN SQLPutData(SQLHSTMT hstmt, SQLPOINTER rgbValue, SQLLEN cbValue) { static char* const func = "SQLPutData"; StatementClass *stmt = (StatementClass *) hstmt; int old_pos, retval; ParameterInfoClass *current_param; char *buffer; mylog( "%s: entering...\n", func); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if (stmt->current_exec_param < 0) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Previous call was not SQLPutData or SQLParamData"); SC_log_error(func, "", stmt); return SQL_ERROR; } current_param = &(stmt->parameters[stmt->current_exec_param]); if ( ! stmt->put_data) { /* first call */ mylog("SQLPutData: (1) cbValue = %d\n", cbValue); stmt->put_data = TRUE; current_param->EXEC_used = malloc(sizeof(SDWORD)); if ( ! current_param->EXEC_used) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Out of memory in SQLPutData (1)"); SC_log_error(func, "", stmt); return SQL_ERROR; } *current_param->EXEC_used = cbValue; if (cbValue == SQL_NULL_DATA) return SQL_SUCCESS; /* Handle Long Var Binary with Large Objects */ if ( current_param->SQLType == SQL_LONGVARBINARY) { /* begin transaction if needed */ if(!CC_is_in_trans(stmt->hdbc)) { QResultClass *res; char ok; res = CC_send_query(stmt->hdbc, "BEGIN", NULL); if (!res) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not begin (in-line) a transaction"); SC_log_error(func, "", stmt); return SQL_ERROR; } ok = QR_command_successful(res); QR_Destructor(res); if (!ok) { SC_set_error(stmt, STMT_EXEC_ERROR, "Could not begin (in-line) a transaction"); SC_log_error(func, "", stmt); return SQL_ERROR; } CC_set_in_trans(stmt->hdbc); } /* store the oid */ current_param->lobj_oid = odbc_lo_creat(stmt->hdbc, INV_READ | INV_WRITE); if (current_param->lobj_oid == 0) { SC_set_error(stmt, STMT_EXEC_ERROR, "Couldnt create large object."); SC_log_error(func, "", stmt); return SQL_ERROR; } /* major hack -- to allow convert to see somethings there */ /* have to modify convert to handle this better */ current_param->EXEC_buffer = (char *) ¤t_param->lobj_oid; /* store the fd */ stmt->lobj_fd = odbc_lo_open(stmt->hdbc, current_param->lobj_oid, INV_WRITE); if ( stmt->lobj_fd < 0) { SC_set_error(stmt, STMT_EXEC_ERROR, "Couldnt open large object for writing."); SC_log_error(func, "", stmt); return SQL_ERROR; } retval = odbc_lo_write(stmt->hdbc, stmt->lobj_fd, rgbValue, cbValue); mylog("odbc_lo_write: cbValue=%d, wrote %d bytes\n", cbValue, retval); } else { /* for handling text fields and small binaries */ if (cbValue == SQL_NTS) { current_param->EXEC_buffer = strdup(rgbValue); if ( ! current_param->EXEC_buffer) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Out of memory in SQLPutData (2)"); SC_log_error(func, "", stmt); return SQL_ERROR; } } else { current_param->EXEC_buffer = malloc(cbValue + 1); if ( ! current_param->EXEC_buffer) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Out of memory in SQLPutData (2)"); SC_log_error(func, "", stmt); return SQL_ERROR; } memcpy(current_param->EXEC_buffer, rgbValue, cbValue); current_param->EXEC_buffer[cbValue] = '\0'; } } } else { /* calling SQLPutData more than once */ mylog("SQLPutData: (>1) cbValue = %d\n", cbValue); if (current_param->SQLType == SQL_LONGVARBINARY) { /* the large object fd is in EXEC_buffer */ retval = odbc_lo_write(stmt->hdbc, stmt->lobj_fd, rgbValue, cbValue); mylog("odbc_lo_write(2): cbValue = %d, wrote %d bytes\n", cbValue, retval); *current_param->EXEC_used += cbValue; } else { buffer = current_param->EXEC_buffer; if (cbValue == SQL_NTS) { buffer = realloc(buffer, strlen(buffer) + strlen(rgbValue) + 1); if ( ! buffer) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Out of memory in SQLPutData (3)"); SC_log_error(func, "", stmt); return SQL_ERROR; } strcat(buffer, rgbValue); mylog(" cbValue = SQL_NTS: strlen(buffer) = %d\n", strlen(buffer)); *current_param->EXEC_used = cbValue; /* reassign buffer incase realloc moved it */ current_param->EXEC_buffer = buffer; } else if (cbValue > 0) { old_pos = *current_param->EXEC_used; *current_param->EXEC_used += cbValue; mylog(" cbValue = %d, old_pos = %d, *used = %d\n", cbValue, old_pos, *current_param->EXEC_used); /* dont lose the old pointer in case out of memory */ buffer = realloc(current_param->EXEC_buffer, *current_param->EXEC_used + 1); if ( ! buffer) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Out of memory in SQLPutData (3)"); SC_log_error(func, "", stmt); return SQL_ERROR; } memcpy(&buffer[old_pos], rgbValue, cbValue); buffer[*current_param->EXEC_used] = '\0'; /* reassign buffer incase realloc moved it */ current_param->EXEC_buffer = buffer; } else { SC_log_error(func, "bad cbValue", stmt); return SQL_ERROR; } } } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/info.c0100644000076400007640000030726611103631455016600 0ustar nicknick /* Module: info.c * * Description: This module contains routines related to * ODBC informational functions. * * Classes: n/a * * API functions: SQLGetInfo, SQLGetTypeInfo, SQLGetFunctions, * SQLTables, SQLColumns, SQLStatistics, SQLSpecialColumns, * SQLPrimaryKeys, SQLForeignKeys, * SQLProcedureColumns(NI), SQLProcedures(NI), * SQLTablePrivileges(NI), SQLColumnPrivileges(NI) * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "psqlodbc.h" #ifndef WIN32 #include "isql.h" #include "isqlext.h" #include #else #include #include #include #endif #include "tuple.h" #include "pgtypes.h" #include "environ.h" #include "connection.h" #include "statement.h" #include "qresult.h" #include "bind.h" #include "misc.h" #include "pgtypes.h" /* Trigger related stuff for SQLForeign Keys */ #define TRIGGER_SHIFT 3 #define TRIGGER_MASK 0x03 #define TRIGGER_DELETE 0x01 #define TRIGGER_UPDATE 0x02 extern GLOBAL_VALUES globals; /* - - - - - - - - - */ RETCODE SQL_API SQLGetInfo( HDBC hdbc, UWORD fInfoType, PTR rgbInfoValue, SWORD cbInfoValueMax, SWORD FAR *pcbInfoValue) { static char* const func = "SQLGetInfo"; ConnectionClass *conn = (ConnectionClass *) hdbc; ConnInfo *ci; char *p = NULL, tmp[MAX_INFO_STRING]; int len = 0, value = 0; RETCODE result; mylog( "%s: entering...fInfoType=%d\n", func, fInfoType); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } ci = &conn->connInfo; switch (fInfoType) { case SQL_ACCESSIBLE_PROCEDURES: /* ODBC 1.0 */ p = "N"; break; case SQL_ACCESSIBLE_TABLES: /* ODBC 1.0 */ p = "N"; break; case SQL_ACTIVE_CONNECTIONS: /* ODBC 1.0 */ len = 2; value = MAX_CONNECTIONS; break; case SQL_ACTIVE_STATEMENTS: /* ODBC 1.0 */ len = 2; value = 0; break; case SQL_ALTER_TABLE: /* ODBC 2.0 */ len = 4; value = SQL_AT_ADD_COLUMN; break; case SQL_BOOKMARK_PERSISTENCE: /* ODBC 2.0 */ /* very simple bookmark support */ len = 4; value = globals.use_declarefetch ? 0 : (SQL_BP_SCROLL); break; case SQL_COLUMN_ALIAS: /* ODBC 2.0 */ p = "N"; break; case SQL_CONCAT_NULL_BEHAVIOR: /* ODBC 1.0 */ len = 2; value = SQL_CB_NON_NULL; break; case SQL_CONVERT_BIGINT: case SQL_CONVERT_BINARY: case SQL_CONVERT_BIT: case SQL_CONVERT_CHAR: case SQL_CONVERT_DATE: case SQL_CONVERT_DECIMAL: case SQL_CONVERT_DOUBLE: case SQL_CONVERT_FLOAT: case SQL_CONVERT_INTEGER: case SQL_CONVERT_LONGVARBINARY: case SQL_CONVERT_LONGVARCHAR: case SQL_CONVERT_NUMERIC: case SQL_CONVERT_REAL: case SQL_CONVERT_SMALLINT: case SQL_CONVERT_TIME: case SQL_CONVERT_TIMESTAMP: case SQL_CONVERT_TINYINT: case SQL_CONVERT_VARBINARY: case SQL_CONVERT_VARCHAR: /* ODBC 1.0 */ len = 4; value = fInfoType; break; case SQL_CONVERT_FUNCTIONS: /* ODBC 1.0 */ len = 4; value = 0; break; case SQL_CORRELATION_NAME: /* ODBC 1.0 */ /* Saying no correlation name makes Query not work right. value = SQL_CN_NONE; */ len = 2; value = SQL_CN_ANY; break; case SQL_CURSOR_COMMIT_BEHAVIOR: /* ODBC 1.0 */ len = 2; value = SQL_CB_CLOSE; break; case SQL_CURSOR_ROLLBACK_BEHAVIOR: /* ODBC 1.0 */ len = 2; value = SQL_CB_CLOSE; break; case SQL_DATA_SOURCE_NAME: /* ODBC 1.0 */ p = CC_get_DSN(conn); break; case SQL_DATA_SOURCE_READ_ONLY: /* ODBC 1.0 */ p = CC_is_onlyread(conn) ? "Y" : "N"; break; case SQL_DATABASE_NAME: /* Support for old ODBC 1.0 Apps */ /* Returning the database name causes problems in MS Query. It generates query like: "SELECT DISTINCT a FROM byronncrap3 crap3" p = CC_get_database(conn); */ p = ""; break; case SQL_DBMS_NAME: /* ODBC 1.0 */ p = DBMS_NAME; break; case SQL_DBMS_VER: /* ODBC 1.0 */ /* The ODBC spec wants ##.##.#### ...whatever... so prepend the driver */ /* version number to the dbms version string */ #ifdef HAVE_SNPRINTF snprintf(tmp, sizeof( tmp ), "%s %s", POSTGRESDRIVERVERSION, conn->pg_version); #else sprintf(tmp, "%s %s", POSTGRESDRIVERVERSION, conn->pg_version); #endif p = tmp; break; case SQL_DEFAULT_TXN_ISOLATION: /* ODBC 1.0 */ len = 4; value = SQL_TXN_READ_COMMITTED; /*SQL_TXN_SERIALIZABLE; */ break; case SQL_DRIVER_NAME: /* ODBC 1.0 */ p = DRIVER_FILE_NAME; break; case SQL_DRIVER_ODBC_VER: p = DRIVER_ODBC_VER; break; case SQL_DRIVER_VER: /* ODBC 1.0 */ p = POSTGRESDRIVERVERSION; break; case SQL_EXPRESSIONS_IN_ORDERBY: /* ODBC 1.0 */ p = "N"; break; case SQL_FETCH_DIRECTION: /* ODBC 1.0 */ len = 4; value = globals.use_declarefetch ? (SQL_FD_FETCH_NEXT) : (SQL_FD_FETCH_NEXT | SQL_FD_FETCH_FIRST | SQL_FD_FETCH_LAST | SQL_FD_FETCH_PRIOR | SQL_FD_FETCH_ABSOLUTE | SQL_FD_FETCH_RELATIVE | SQL_FD_FETCH_BOOKMARK); break; case SQL_FILE_USAGE: /* ODBC 2.0 */ len = 2; value = SQL_FILE_NOT_SUPPORTED; break; case SQL_GETDATA_EXTENSIONS: /* ODBC 2.0 */ len = 4; value = (SQL_GD_ANY_COLUMN | SQL_GD_ANY_ORDER | SQL_GD_BOUND | SQL_GD_BLOCK); break; case SQL_GROUP_BY: /* ODBC 2.0 */ len = 2; value = SQL_GB_GROUP_BY_EQUALS_SELECT; break; case SQL_IDENTIFIER_CASE: /* ODBC 1.0 */ /* are identifiers case-sensitive (yes, but only when quoted. If not quoted, they default to lowercase) */ len = 2; value = SQL_IC_LOWER; break; case SQL_IDENTIFIER_QUOTE_CHAR: /* ODBC 1.0 */ /* the character used to quote "identifiers" */ p = PG_VERSION_LE(conn, 6.2) ? " " : "\""; break; case SQL_KEYWORDS: /* ODBC 2.0 */ p = ""; break; case SQL_LIKE_ESCAPE_CLAUSE: /* ODBC 2.0 */ /* is there a character that escapes '%' and '_' in a LIKE clause? not as far as I can tell */ p = "N"; break; case SQL_LOCK_TYPES: /* ODBC 2.0 */ len = 4; value = globals.lie ? (SQL_LCK_NO_CHANGE | SQL_LCK_EXCLUSIVE | SQL_LCK_UNLOCK) : SQL_LCK_NO_CHANGE; break; case SQL_MAX_BINARY_LITERAL_LEN: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_MAX_CHAR_LITERAL_LEN: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_MAX_COLUMN_NAME_LEN: /* ODBC 1.0 */ len = 2; value = MAX_COLUMN_LEN; break; case SQL_MAX_COLUMNS_IN_GROUP_BY: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_COLUMNS_IN_INDEX: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_COLUMNS_IN_ORDER_BY: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_COLUMNS_IN_SELECT: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_COLUMNS_IN_TABLE: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_CURSOR_NAME_LEN: /* ODBC 1.0 */ len = 2; value = MAX_CURSOR_LEN; break; case SQL_MAX_INDEX_SIZE: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_MAX_OWNER_NAME_LEN: /* ODBC 1.0 */ len = 2; value = 0; break; case SQL_MAX_PROCEDURE_NAME_LEN: /* ODBC 1.0 */ len = 2; value = 0; break; case SQL_MAX_QUALIFIER_NAME_LEN: /* ODBC 1.0 */ len = 2; value = 0; break; case SQL_MAX_ROW_SIZE: /* ODBC 2.0 */ len = 4; if (PG_VERSION_GE(conn, 7.1)) { /* Large Rowa in 7.1+ */ value = MAX_ROW_SIZE; } else { /* Without the Toaster we're limited to the blocksize */ value = BLCKSZ; } break; case SQL_MAX_ROW_SIZE_INCLUDES_LONG: /* ODBC 2.0 */ /* does the preceding value include LONGVARCHAR and LONGVARBINARY fields? Well, it does include longvarchar, but not longvarbinary. */ p = "Y"; break; case SQL_MAX_STATEMENT_LEN: /* ODBC 2.0 */ /* maybe this should be 0? */ len = 4; if (PG_VERSION_GE(conn, 7.0)) { /* Long Queries in 7.0+ */ value = MAX_STATEMENT_LEN; } else if (PG_VERSION_GE(conn, 6.5)) /* Prior to 7.0 we used 2*BLCKSZ */ value = (2*BLCKSZ); else /* Prior to 6.5 we used BLCKSZ */ value = BLCKSZ; break; case SQL_MAX_TABLE_NAME_LEN: /* ODBC 1.0 */ len = 2; value = MAX_TABLE_LEN; break; case SQL_MAX_TABLES_IN_SELECT: /* ODBC 2.0 */ len = 2; value = 0; break; case SQL_MAX_USER_NAME_LEN: len = 2; value = 0; break; case SQL_MULT_RESULT_SETS: /* ODBC 1.0 */ /* Don't support multiple result sets but say yes anyway? */ p = "Y"; break; case SQL_MULTIPLE_ACTIVE_TXN: /* ODBC 1.0 */ p = "Y"; break; case SQL_NEED_LONG_DATA_LEN: /* ODBC 2.0 */ /* Dont need the length, SQLPutData can handle any size and multiple calls */ p = "N"; break; case SQL_NON_NULLABLE_COLUMNS: /* ODBC 1.0 */ len = 2; value = SQL_NNC_NON_NULL; break; case SQL_NULL_COLLATION: /* ODBC 2.0 */ /* where are nulls sorted? */ len = 2; value = SQL_NC_END; break; case SQL_NUMERIC_FUNCTIONS: /* ODBC 1.0 */ len = 4; value = 0; break; case SQL_ODBC_API_CONFORMANCE: /* ODBC 1.0 */ len = 2; value = SQL_OAC_LEVEL1; break; case SQL_ODBC_SAG_CLI_CONFORMANCE: /* ODBC 1.0 */ len = 2; value = SQL_OSCC_NOT_COMPLIANT; break; case SQL_ODBC_SQL_CONFORMANCE: /* ODBC 1.0 */ len = 2; value = SQL_OSC_CORE; break; case SQL_ODBC_SQL_OPT_IEF: /* ODBC 1.0 */ p = "N"; break; case SQL_OJ_CAPABILITIES: /* ODBC 2.01 */ case 115: len = 4; if (PG_VERSION_GE(conn, 7.1)) { /* OJs in 7.1+ */ value = (SQL_OJ_LEFT | SQL_OJ_RIGHT | SQL_OJ_FULL | SQL_OJ_NESTED | SQL_OJ_NOT_ORDERED | SQL_OJ_INNER | SQL_OJ_ALL_COMPARISON_OPS); } else { /* OJs not in <7.1 */ value = 0; } break; case SQL_ORDER_BY_COLUMNS_IN_SELECT: /* ODBC 2.0 */ p = (PG_VERSION_LE(conn, 6.3)) ? "Y" : "N"; break; case SQL_OUTER_JOINS: /* ODBC 1.0 */ if (PG_VERSION_GE(conn, 7.1)) { /* OJs in 7.1+ */ p = "Y"; } else { /* OJs not in <7.1 */ p = "N"; } break; case SQL_OWNER_TERM: /* ODBC 1.0 */ p = "owner"; break; case SQL_OWNER_USAGE: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_POS_OPERATIONS: /* ODBC 2.0 */ len = 4; value = globals.lie ? (SQL_POS_POSITION | SQL_POS_REFRESH | SQL_POS_UPDATE | SQL_POS_DELETE | SQL_POS_ADD) : (SQL_POS_POSITION | SQL_POS_REFRESH); break; case SQL_POSITIONED_STATEMENTS: /* ODBC 2.0 */ len = 4; value = globals.lie ? (SQL_PS_POSITIONED_DELETE | SQL_PS_POSITIONED_UPDATE | SQL_PS_SELECT_FOR_UPDATE) : 0; break; case SQL_PROCEDURE_TERM: /* ODBC 1.0 */ p = "procedure"; break; case SQL_PROCEDURES: /* ODBC 1.0 */ p = "Y"; break; case SQL_QUALIFIER_LOCATION: /* ODBC 2.0 */ len = 2; value = SQL_QL_START; break; case SQL_QUALIFIER_NAME_SEPARATOR: /* ODBC 1.0 */ p = ""; break; case SQL_QUALIFIER_TERM: /* ODBC 1.0 */ p = ""; break; case SQL_QUALIFIER_USAGE: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_QUOTED_IDENTIFIER_CASE: /* ODBC 2.0 */ /* are "quoted" identifiers case-sensitive? YES! */ len = 2; value = SQL_IC_SENSITIVE; break; case SQL_ROW_UPDATES: /* ODBC 1.0 */ /* Driver doesn't support keyset-driven or mixed cursors, so not much point in saying row updates are supported */ p = globals.lie ? "Y" : "N"; break; case SQL_SCROLL_CONCURRENCY: /* ODBC 1.0 */ len = 4; value = globals.lie ? (SQL_SCCO_READ_ONLY | SQL_SCCO_LOCK | SQL_SCCO_OPT_ROWVER | SQL_SCCO_OPT_VALUES) : (SQL_SCCO_READ_ONLY); break; case SQL_SCROLL_OPTIONS: /* ODBC 1.0 */ len = 4; value = globals.lie ? (SQL_SO_FORWARD_ONLY | SQL_SO_STATIC | SQL_SO_KEYSET_DRIVEN | SQL_SO_DYNAMIC | SQL_SO_MIXED) : (globals.use_declarefetch ? SQL_SO_FORWARD_ONLY : (SQL_SO_FORWARD_ONLY | SQL_SO_STATIC)); break; case SQL_SEARCH_PATTERN_ESCAPE: /* ODBC 1.0 */ p = ""; break; case SQL_SERVER_NAME: /* ODBC 1.0 */ p = CC_get_server(conn); break; case SQL_SPECIAL_CHARACTERS: /* ODBC 2.0 */ p = "_"; break; case SQL_STATIC_SENSITIVITY: /* ODBC 2.0 */ len = 4; value = globals.lie ? (SQL_SS_ADDITIONS | SQL_SS_DELETIONS | SQL_SS_UPDATES) : 0; break; case SQL_STRING_FUNCTIONS: /* ODBC 1.0 */ len = 4; value = (SQL_FN_STR_CONCAT | SQL_FN_STR_LCASE | SQL_FN_STR_LENGTH | SQL_FN_STR_LOCATE | SQL_FN_STR_LTRIM | SQL_FN_STR_RTRIM | SQL_FN_STR_SUBSTRING | SQL_FN_STR_UCASE); break; case SQL_SUBQUERIES: /* ODBC 2.0 */ /* postgres 6.3 supports subqueries */ len = 4; value = (SQL_SQ_QUANTIFIED | SQL_SQ_IN | SQL_SQ_EXISTS | SQL_SQ_COMPARISON); break; case SQL_SYSTEM_FUNCTIONS: /* ODBC 1.0 */ len = 4; value = 0; break; case SQL_TABLE_TERM: /* ODBC 1.0 */ p = "table"; break; case SQL_TIMEDATE_ADD_INTERVALS: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_TIMEDATE_DIFF_INTERVALS: /* ODBC 2.0 */ len = 4; value = 0; break; case SQL_TIMEDATE_FUNCTIONS: /* ODBC 1.0 */ len = 4; value = (SQL_FN_TD_NOW); break; case SQL_TXN_CAPABLE: /* ODBC 1.0 */ /* Postgres can deal with create or drop table statements in a transaction */ len = 2; value = SQL_TC_ALL; break; case SQL_TXN_ISOLATION_OPTION: /* ODBC 1.0 */ len = 4; value = SQL_TXN_READ_COMMITTED; /* SQL_TXN_SERIALIZABLE; */ break; case SQL_UNION: /* ODBC 2.0 */ /* unions with all supported in postgres 6.3 */ len = 4; value = (SQL_U_UNION | SQL_U_UNION_ALL); break; case SQL_USER_NAME: /* ODBC 1.0 */ p = CC_get_username(conn); break; /* * These have been added even though they are ODBC 3 attributes to enable * StarOffice 6.0 and OpenOffice to work, its a problem in the app, but * we do what we can... */ case /*SQL_CREATE_VIEW*/ 134: len = 4; value = SQL_CV_CREATE_VIEW; break; case /*SQL_STATIC_CURSOR_ATTRIBUTES1*/ 167: len = 4; /*value = SQL_CA1_NEXT | SQL_CA1_ABSOLUTE | SQL_CA1_RELATIVE | SQL_CA1_BOOKMARK;*/ value = 0x00000001L | 0x00000002L | 0x00000004L | 0x00000008L; break; default: /* unrecognized key */ CC_set_error(conn, CONN_NOT_IMPLEMENTED_ERROR, "Unrecognized key passed to SQLGetInfo."); CC_log_error(func, "", conn); return SQL_ERROR; } result = SQL_SUCCESS; mylog("SQLGetInfo: p='%s', len=%d, value=%d, cbMax=%d\n", p?p:"", len, value, cbInfoValueMax); /* NOTE, that if rgbInfoValue is NULL, then no warnings or errors should result and just pcbInfoValue is returned, which indicates what length would be required if a real buffer had been passed in. */ if (p) { /* char/binary data */ len = strlen(p); if (rgbInfoValue) { strncpy_null((char *)rgbInfoValue, p, (size_t)cbInfoValueMax); if (len >= cbInfoValueMax) { result = SQL_SUCCESS_WITH_INFO; CC_set_error(conn, STMT_TRUNCATED, "The buffer was too small for the result."); } } } else { /* numeric data */ if (rgbInfoValue) { if (len == 2 ) *((WORD *)rgbInfoValue) = (WORD) value; else if (len == 4) *((DWORD *)rgbInfoValue) = (DWORD) value; } } if (pcbInfoValue) *pcbInfoValue = len; return result; } /* - - - - - - - - - */ RETCODE SQL_API SQLGetTypeInfo( HSTMT hstmt, SWORD fSqlType) { static char* const func = "SQLGetTypeInfo"; StatementClass *stmt = (StatementClass *) hstmt; TupleNode *row; int i; /* Int4 type; */ Int4 pgType; Int2 sqlType; mylog("%s: entering...fSqlType = %d\n", func, fSqlType); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->result = QR_Constructor(); if( ! stmt->result) { SC_log_error(func, "Error creating result.", stmt); return SQL_ERROR; } extend_bindings(stmt, 15); QR_set_num_fields(stmt->result, 15); QR_set_field_info(stmt->result, 0, "TYPE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "DATA_TYPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 2, "PRECISION", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 3, "LITERAL_PREFIX", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "LITERAL_SUFFIX", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 5, "CREATE_PARAMS", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 6, "NULLABLE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 7, "CASE_SENSITIVE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 8, "SEARCHABLE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 9, "UNSIGNED_ATTRIBUTE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 10, "MONEY", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 11, "AUTO_INCREMENT", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 12, "LOCAL_TYPE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 13, "MINIMUM_SCALE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 14, "MAXIMUM_SCALE", PG_TYPE_INT2, 2); for(i=0, sqlType = sqlTypes[0]; sqlType; sqlType = sqlTypes[++i]) { pgType = sqltype_to_pgtype(sqlType); if (fSqlType == SQL_ALL_TYPES || fSqlType == sqlType) { row = (TupleNode *)malloc(sizeof(TupleNode) + (15 - 1)*sizeof(TupleField)); /* These values can't be NULL */ set_tuplefield_string(&row->tuple[0], pgtype_to_name(stmt, pgType)); set_tuplefield_int2(&row->tuple[1], (Int2) sqlType); set_tuplefield_int2(&row->tuple[6], pgtype_nullable(stmt, pgType)); set_tuplefield_int2(&row->tuple[7], pgtype_case_sensitive(stmt, pgType)); set_tuplefield_int2(&row->tuple[8], pgtype_searchable(stmt, pgType)); set_tuplefield_int2(&row->tuple[10], pgtype_money(stmt, pgType)); /* Localized data-source dependent data type name (always NULL) */ set_tuplefield_null(&row->tuple[12]); /* These values can be NULL */ set_nullfield_int4(&row->tuple[2], pgtype_precision(stmt, pgType, PG_STATIC, PG_STATIC)); set_nullfield_string(&row->tuple[3], pgtype_literal_prefix(stmt, pgType)); set_nullfield_string(&row->tuple[4], pgtype_literal_suffix(stmt, pgType)); set_nullfield_string(&row->tuple[5], pgtype_create_params(stmt, pgType)); set_nullfield_int2(&row->tuple[9], pgtype_unsigned(stmt, pgType)); set_nullfield_int2(&row->tuple[11], pgtype_auto_increment(stmt, pgType)); set_nullfield_int2(&row->tuple[13], pgtype_scale(stmt, pgType, PG_STATIC)); set_nullfield_int2(&row->tuple[14], pgtype_scale(stmt, pgType, PG_STATIC)); QR_add_tuple(stmt->result, row); } } stmt->status = STMT_FINISHED; stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; return SQL_SUCCESS; } /* - - - - - - - - - */ RETCODE SQL_API SQLGetFunctions( HDBC hdbc, UWORD fFunction, UWORD FAR *pfExists) { static char* const func="SQLGetFunctions"; mylog( "%s: entering...\n", func); if (fFunction == SQL_API_ALL_FUNCTIONS) { if (globals.lie) { int i; memset(pfExists, 0, sizeof(UWORD)*100); pfExists[SQL_API_SQLALLOCENV] = TRUE; pfExists[SQL_API_SQLFREEENV] = TRUE; for (i = SQL_API_SQLALLOCCONNECT; i <= SQL_NUM_FUNCTIONS; i++) pfExists[i] = TRUE; for (i = SQL_EXT_API_START; i <= SQL_EXT_API_LAST; i++) pfExists[i] = TRUE; } else { memset(pfExists, 0, sizeof(UWORD)*100); /* ODBC core functions */ pfExists[SQL_API_SQLALLOCCONNECT] = TRUE; pfExists[SQL_API_SQLALLOCENV] = TRUE; pfExists[SQL_API_SQLALLOCSTMT] = TRUE; pfExists[SQL_API_SQLBINDCOL] = TRUE; pfExists[SQL_API_SQLCANCEL] = TRUE; pfExists[SQL_API_SQLCOLATTRIBUTES] = TRUE; pfExists[SQL_API_SQLCONNECT] = TRUE; pfExists[SQL_API_SQLDESCRIBECOL] = TRUE; /* partial */ pfExists[SQL_API_SQLDISCONNECT] = TRUE; pfExists[SQL_API_SQLERROR] = TRUE; pfExists[SQL_API_SQLEXECDIRECT] = TRUE; pfExists[SQL_API_SQLEXECUTE] = TRUE; pfExists[SQL_API_SQLFETCH] = TRUE; pfExists[SQL_API_SQLFREECONNECT] = TRUE; pfExists[SQL_API_SQLFREEENV] = TRUE; pfExists[SQL_API_SQLFREESTMT] = TRUE; pfExists[SQL_API_SQLGETCURSORNAME] = TRUE; pfExists[SQL_API_SQLNUMRESULTCOLS] = TRUE; pfExists[SQL_API_SQLPREPARE] = TRUE; /* complete? */ pfExists[SQL_API_SQLROWCOUNT] = TRUE; pfExists[SQL_API_SQLSETCURSORNAME] = TRUE; pfExists[SQL_API_SQLSETPARAM] = FALSE; /* odbc 1.0 */ pfExists[SQL_API_SQLTRANSACT] = TRUE; /* ODBC level 1 functions */ pfExists[SQL_API_SQLBINDPARAMETER] = TRUE; pfExists[SQL_API_SQLCOLUMNS] = TRUE; pfExists[SQL_API_SQLDRIVERCONNECT] = TRUE; pfExists[SQL_API_SQLGETCONNECTOPTION] = TRUE; /* partial */ pfExists[SQL_API_SQLGETDATA] = TRUE; pfExists[SQL_API_SQLGETFUNCTIONS] = TRUE; pfExists[SQL_API_SQLGETINFO] = TRUE; pfExists[SQL_API_SQLGETSTMTOPTION] = TRUE; /* partial */ pfExists[SQL_API_SQLGETTYPEINFO] = TRUE; pfExists[SQL_API_SQLPARAMDATA] = TRUE; pfExists[SQL_API_SQLPUTDATA] = TRUE; pfExists[SQL_API_SQLSETCONNECTOPTION] = TRUE; /* partial */ pfExists[SQL_API_SQLSETSTMTOPTION] = TRUE; pfExists[SQL_API_SQLSPECIALCOLUMNS] = TRUE; pfExists[SQL_API_SQLSTATISTICS] = TRUE; pfExists[SQL_API_SQLTABLES] = TRUE; /* ODBC level 2 functions */ pfExists[SQL_API_SQLBROWSECONNECT] = FALSE; pfExists[SQL_API_SQLCOLUMNPRIVILEGES] = FALSE; pfExists[SQL_API_SQLDATASOURCES] = FALSE; /* only implemented by DM */ pfExists[SQL_API_SQLDESCRIBEPARAM] = FALSE; /* not properly implemented */ pfExists[SQL_API_SQLDRIVERS] = FALSE; /* only implemented by DM */ pfExists[SQL_API_SQLEXTENDEDFETCH] = TRUE; pfExists[SQL_API_SQLFOREIGNKEYS] = TRUE; pfExists[SQL_API_SQLMORERESULTS] = TRUE; pfExists[SQL_API_SQLNATIVESQL] = TRUE; pfExists[SQL_API_SQLNUMPARAMS] = TRUE; pfExists[SQL_API_SQLPARAMOPTIONS] = FALSE; pfExists[SQL_API_SQLPRIMARYKEYS] = TRUE; pfExists[SQL_API_SQLPROCEDURECOLUMNS] = FALSE; pfExists[SQL_API_SQLPROCEDURES] = FALSE; pfExists[SQL_API_SQLSETPOS] = TRUE; pfExists[SQL_API_SQLSETSCROLLOPTIONS] = TRUE; /* odbc 1.0 */ pfExists[SQL_API_SQLTABLEPRIVILEGES] = FALSE; } } else { if (globals.lie) *pfExists = TRUE; else { switch(fFunction) { case SQL_API_SQLALLOCCONNECT: *pfExists = TRUE; break; case SQL_API_SQLALLOCENV: *pfExists = TRUE; break; case SQL_API_SQLALLOCSTMT: *pfExists = TRUE; break; case SQL_API_SQLBINDCOL: *pfExists = TRUE; break; case SQL_API_SQLCANCEL: *pfExists = TRUE; break; case SQL_API_SQLCOLATTRIBUTES: *pfExists = TRUE; break; case SQL_API_SQLCONNECT: *pfExists = TRUE; break; case SQL_API_SQLDESCRIBECOL: *pfExists = TRUE; break; /* partial */ case SQL_API_SQLDISCONNECT: *pfExists = TRUE; break; case SQL_API_SQLERROR: *pfExists = TRUE; break; case SQL_API_SQLEXECDIRECT: *pfExists = TRUE; break; case SQL_API_SQLEXECUTE: *pfExists = TRUE; break; case SQL_API_SQLFETCH: *pfExists = TRUE; break; case SQL_API_SQLFREECONNECT: *pfExists = TRUE; break; case SQL_API_SQLFREEENV: *pfExists = TRUE; break; case SQL_API_SQLFREESTMT: *pfExists = TRUE; break; case SQL_API_SQLGETCURSORNAME: *pfExists = TRUE; break; case SQL_API_SQLNUMRESULTCOLS: *pfExists = TRUE; break; case SQL_API_SQLPREPARE: *pfExists = TRUE; break; case SQL_API_SQLROWCOUNT: *pfExists = TRUE; break; case SQL_API_SQLSETCURSORNAME: *pfExists = TRUE; break; case SQL_API_SQLSETPARAM: *pfExists = FALSE; break; /* odbc 1.0 */ case SQL_API_SQLTRANSACT: *pfExists = TRUE; break; /* ODBC level 1 functions */ case SQL_API_SQLBINDPARAMETER: *pfExists = TRUE; break; case SQL_API_SQLCOLUMNS: *pfExists = TRUE; break; case SQL_API_SQLDRIVERCONNECT: *pfExists = TRUE; break; case SQL_API_SQLGETCONNECTOPTION: *pfExists = TRUE; break; /* partial */ case SQL_API_SQLGETDATA: *pfExists = TRUE; break; case SQL_API_SQLGETFUNCTIONS: *pfExists = TRUE; break; case SQL_API_SQLGETINFO: *pfExists = TRUE; break; case SQL_API_SQLGETSTMTOPTION: *pfExists = TRUE; break; /* partial */ case SQL_API_SQLGETTYPEINFO: *pfExists = TRUE; break; case SQL_API_SQLPARAMDATA: *pfExists = TRUE; break; case SQL_API_SQLPUTDATA: *pfExists = TRUE; break; case SQL_API_SQLSETCONNECTOPTION: *pfExists = TRUE; break; /* partial */ case SQL_API_SQLSETSTMTOPTION: *pfExists = TRUE; break; case SQL_API_SQLSPECIALCOLUMNS: *pfExists = TRUE; break; case SQL_API_SQLSTATISTICS: *pfExists = TRUE; break; case SQL_API_SQLTABLES: *pfExists = TRUE; break; /* ODBC level 2 functions */ case SQL_API_SQLBROWSECONNECT: *pfExists = FALSE; break; case SQL_API_SQLCOLUMNPRIVILEGES: *pfExists = FALSE; break; case SQL_API_SQLDATASOURCES: *pfExists = FALSE; break; /* only implemented by DM */ case SQL_API_SQLDESCRIBEPARAM: *pfExists = FALSE; break; /* not properly implemented */ case SQL_API_SQLDRIVERS: *pfExists = FALSE; break; /* only implemented by DM */ case SQL_API_SQLEXTENDEDFETCH: *pfExists = TRUE; break; case SQL_API_SQLFOREIGNKEYS: *pfExists = TRUE; break; case SQL_API_SQLMORERESULTS: *pfExists = TRUE; break; case SQL_API_SQLNATIVESQL: *pfExists = TRUE; break; case SQL_API_SQLNUMPARAMS: *pfExists = TRUE; break; case SQL_API_SQLPARAMOPTIONS: *pfExists = FALSE; break; case SQL_API_SQLPRIMARYKEYS: *pfExists = TRUE; break; case SQL_API_SQLPROCEDURECOLUMNS: *pfExists = FALSE; break; case SQL_API_SQLPROCEDURES: *pfExists = FALSE; break; case SQL_API_SQLSETPOS: *pfExists = TRUE; break; case SQL_API_SQLSETSCROLLOPTIONS: *pfExists = TRUE; break; /* odbc 1.0 */ case SQL_API_SQLTABLEPRIVILEGES: *pfExists = FALSE; break; } } } return SQL_SUCCESS; } RETCODE SQL_API SQLTables( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UCHAR FAR * szTableType, SWORD cbTableType) { static char* const func = "SQLTables"; StatementClass *stmt = (StatementClass *) hstmt; StatementClass *tbl_stmt; TupleNode *row; HSTMT htbl_stmt; RETCODE result; char *tableType; char tables_query[STD_STATEMENT_LEN]; char table_name[MAX_INFO_STRING], table_owner[MAX_INFO_STRING], relkind_or_hasrules[MAX_INFO_STRING]; ConnectionClass *conn; ConnInfo *ci; char *prefix[32], prefixes[MEDIUM_REGISTRY_LEN]; char *table_type[32], table_types[MAX_INFO_STRING]; char show_system_tables, show_regular_tables, show_views; char regular_table, view, systable; int i; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->errormsg_created = TRUE; conn = (ConnectionClass *) (stmt->hdbc); ci = &stmt->hdbc->connInfo; result = PG_SQLAllocStmt( stmt->hdbc, &htbl_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate statement for SQLTables result."); SC_log_error(func, "", stmt); return SQL_ERROR; } tbl_stmt = (StatementClass *) htbl_stmt; /* ********************************************************************** */ /* Create the query to find out the tables */ /* ********************************************************************** */ if (PG_VERSION_GE(conn, 7.1)) { /* view is represented by its relkind since 7.1 */ strcpy(tables_query, "select relname, usename, relkind from pg_class, pg_user"); strcat(tables_query, " where relkind in ('r', 'v')"); } else { strcpy(tables_query, "select relname, usename, relhasrules from pg_class, pg_user"); strcat(tables_query, " where relkind = 'r'"); } my_strcat(tables_query, " and usename like '%.*s'", (char*)szTableOwner, cbTableOwner); my_strcat(tables_query, " and relname like '%.*s'", (char*)szTableName, cbTableName); /* Parse the extra systable prefix */ strcpy(prefixes, globals.extra_systable_prefixes); i = 0; prefix[i] = strtok(prefixes, ";"); while (prefix[i] && i<32) { prefix[++i] = strtok(NULL, ";"); } /* Parse the desired table types to return */ show_system_tables = FALSE; show_regular_tables = FALSE; show_views = FALSE; /* make_string mallocs memory */ tableType = make_string((char*)szTableType, cbTableType, NULL); if (tableType) { strcpy(table_types, tableType); free(tableType); i = 0; table_type[i] = strtok(table_types, ","); while (table_type[i] && i<32) { table_type[++i] = strtok(NULL, ","); } /* Check for desired table types to return */ i = 0; while (table_type[i]) { if ( strstr(table_type[i], "SYSTEM TABLE")) show_system_tables = TRUE; else if ( strstr(table_type[i], "TABLE")) show_regular_tables = TRUE; else if ( strstr(table_type[i], "VIEW")) show_views = TRUE; i++; } } else { show_regular_tables = TRUE; show_views = TRUE; } /* If not interested in SYSTEM TABLES then filter them out to save some time on the query. If treating system tables as regular tables, then dont filter either. */ if ( ! atoi(ci->show_system_tables) && ! show_system_tables) { strcat(tables_query, " and relname !~ '^" POSTGRES_SYS_PREFIX); /* Also filter out user-defined system table types */ i = 0; while(prefix[i]) { strcat(tables_query, "|^"); strcat(tables_query, prefix[i]); i++; } strcat(tables_query, "'"); } /* match users */ if (PG_VERSION_LT(conn, 7.1)) /* filter out large objects in older versions */ strcat(tables_query, " and relname !~ '^xinv[0-9]+'"); strcat(tables_query, " and usesysid = relowner"); strcat(tables_query, " order by relname"); /* ********************************************************************** */ result = PG_SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_create_errormsg((StatementClass *)htbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 1, SQL_C_CHAR, table_name, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 2, SQL_C_CHAR, table_owner, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 3, SQL_C_CHAR, relkind_or_hasrules, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } stmt->result = QR_Constructor(); if(!stmt->result) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate memory for SQLTables result."); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } /* the binding structure for a statement is not set up until */ /* a statement is actually executed, so we'll have to do this ourselves. */ extend_bindings(stmt, 5); /* set the field names */ QR_set_num_fields(stmt->result, 5); QR_set_field_info(stmt->result, 0, "TABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "TABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "TABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "TABLE_TYPE", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "REMARKS", PG_TYPE_TEXT, 254); /* add the tuples */ result = PG_SQLFetch(htbl_stmt); while((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO)) { /* Determine if this table name is a system table. If treating system tables as regular tables, then no need to do this test. */ systable = FALSE; if( ! atoi(ci->show_system_tables)) { if ( strncmp(table_name, POSTGRES_SYS_PREFIX, strlen(POSTGRES_SYS_PREFIX)) == 0) systable = TRUE; else { /* Check extra system table prefixes */ i = 0; while (prefix[i]) { mylog("table_name='%s', prefix[%d]='%s'\n", table_name, i, prefix[i]); if (strncmp(table_name, prefix[i], strlen(prefix[i])) == 0) { systable = TRUE; break; } i++; } } } /* Determine if the table name is a view */ if (PG_VERSION_GE(conn, 7.1)) /* view is represented by its relkind since 7.1 */ view = (relkind_or_hasrules[0] == 'v'); else view = (relkind_or_hasrules[0] == '1'); /* It must be a regular table */ regular_table = ( ! systable && ! view); /* Include the row in the result set if meets all criteria */ /* NOTE: Unsupported table types (i.e., LOCAL TEMPORARY, ALIAS, etc) will return nothing */ if ( (systable && show_system_tables) || (view && show_views) || (regular_table && show_regular_tables)) { row = (TupleNode *)malloc(sizeof(TupleNode) + (5 - 1) * sizeof(TupleField)); set_tuplefield_string(&row->tuple[0], ""); /* I have to hide the table owner from Access, otherwise it */ /* insists on referring to the table as 'owner.table'. */ /* (this is valid according to the ODBC SQL grammar, but */ /* Postgres won't support it.) */ /* set_tuplefield_string(&row->tuple[1], table_owner); */ mylog("SQLTables: table_name = '%s'\n", table_name); set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); set_tuplefield_string(&row->tuple[3], systable ? "SYSTEM TABLE" : (view ? "VIEW" : "TABLE")); set_tuplefield_string(&row->tuple[4], ""); QR_add_tuple(stmt->result, row); } result = PG_SQLFetch(htbl_stmt); } if(result != SQL_NO_DATA_FOUND) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_create_errormsg((StatementClass *)htbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } /* also, things need to think that this statement is finished so */ /* the results can be retrieved. */ stmt->status = STMT_FINISHED; /* set up the current tuple pointer for SQLFetch */ stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; PG_SQLFreeStmt(htbl_stmt, SQL_DROP); mylog("SQLTables(): EXIT, stmt=%u\n", stmt); return SQL_SUCCESS; } RETCODE SQL_API PG_SQLColumns( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UCHAR FAR * szColumnName, SWORD cbColumnName) { static char* const func = "SQLColumns"; StatementClass *stmt = (StatementClass *) hstmt; TupleNode *row; HSTMT hcol_stmt; StatementClass *col_stmt; char columns_query[STD_STATEMENT_LEN]; RETCODE result; char table_owner[MAX_INFO_STRING], table_name[MAX_INFO_STRING], field_name[MAX_INFO_STRING], field_type_name[MAX_INFO_STRING]; Int2 field_number, result_cols, scale; Int4 field_type, the_type, field_length, mod_length, precision; char useStaticPrecision; char not_null[MAX_INFO_STRING], relhasrules[MAX_INFO_STRING]; ConnInfo *ci; ConnectionClass *conn; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->errormsg_created = TRUE; conn = (ConnectionClass *) (stmt->hdbc); ci = &stmt->hdbc->connInfo; /* ********************************************************************** */ /* Create the query to find out the columns (Note: pre 6.3 did not have the atttypmod field) */ /* ********************************************************************** */ sprintf(columns_query, "select u.usename, c.relname, a.attname, a.atttypid" ", t.typname, a.attnum, a.attlen, %s, a.attnotnull, c.relhasrules" " from pg_user u, pg_class c, pg_attribute a, pg_type t" " where u.usesysid = c.relowner" " and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0)", PG_VERSION_LE(conn, 6.2) ? "a.attlen" : "a.atttypmod"); my_strcat(columns_query, " and c.relname like '%.*s'", (char*)szTableName, cbTableName); my_strcat(columns_query, " and u.usename like '%.*s'", (char*)szTableOwner, cbTableOwner); my_strcat(columns_query, " and a.attname like '%.*s'", (char*)szColumnName, cbColumnName); /* give the output in the order the columns were defined */ /* when the table was created */ strcat(columns_query, " order by attnum"); /* ********************************************************************** */ result = PG_SQLAllocStmt( stmt->hdbc, &hcol_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate statement for SQLColumns result."); SC_log_error(func, "", stmt); return SQL_ERROR; } col_stmt = (StatementClass *) hcol_stmt; mylog("SQLColumns: hcol_stmt = %u, col_stmt = %u\n", hcol_stmt, col_stmt); result = PG_SQLExecDirect(hcol_stmt, columns_query, strlen(columns_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_create_errormsg((StatementClass *)hcol_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(hcol_stmt, 1, SQL_C_CHAR, table_owner, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(hcol_stmt, 2, SQL_C_CHAR, table_name, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(hcol_stmt, 3, SQL_C_CHAR, field_name, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(hcol_stmt, 4, SQL_C_LONG, &field_type, 4, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(hcol_stmt, 5, SQL_C_CHAR, field_type_name, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(hcol_stmt, 6, SQL_C_SHORT, &field_number, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(hcol_stmt, 7, SQL_C_LONG, &field_length, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(hcol_stmt, 8, SQL_C_LONG, &mod_length, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(hcol_stmt, 9, SQL_C_CHAR, not_null, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(hcol_stmt, 10, SQL_C_CHAR, relhasrules, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } stmt->result = QR_Constructor(); if(!stmt->result) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate memory for SQLColumns result."); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } /* the binding structure for a statement is not set up until */ /* a statement is actually executed, so we'll have to do this ourselves. */ result_cols = 14; extend_bindings(stmt, result_cols); /* set the field names */ QR_set_num_fields(stmt->result, result_cols); QR_set_field_info(stmt->result, 0, "TABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "TABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "TABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "COLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "DATA_TYPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 5, "TYPE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 6, "PRECISION", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 7, "LENGTH", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 8, "SCALE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 9, "RADIX", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 10, "NULLABLE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 11, "REMARKS", PG_TYPE_TEXT, 254); /* User defined fields */ QR_set_field_info(stmt->result, 12, "DISPLAY_SIZE", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 13, "FIELD_TYPE", PG_TYPE_INT4, 4); result = PG_SQLFetch(hcol_stmt); /* Only show oid if option AND there are other columns AND it's not being called by SQLStatistics . Always show OID if it's a system table */ if (result != SQL_ERROR && ! stmt->internal) { if (relhasrules[0] != '1' && (atoi(ci->show_oid_column) || strncmp(table_name, POSTGRES_SYS_PREFIX, strlen(POSTGRES_SYS_PREFIX)) == 0)) { /* For OID fields */ the_type = PG_TYPE_OID; row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); set_tuplefield_string(&row->tuple[0], ""); /* see note in SQLTables() */ /* set_tuplefield_string(&row->tuple[1], table_owner); */ set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); set_tuplefield_string(&row->tuple[3], "oid"); set_tuplefield_int2(&row->tuple[4], pgtype_to_sqltype(stmt, the_type)); set_tuplefield_string(&row->tuple[5], "OID"); set_tuplefield_int4(&row->tuple[7], pgtype_length(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[6], pgtype_precision(stmt, the_type, PG_STATIC, PG_STATIC)); set_nullfield_int2(&row->tuple[8], pgtype_scale(stmt, the_type, PG_STATIC)); set_nullfield_int2(&row->tuple[9], pgtype_radix(stmt, the_type)); set_tuplefield_int2(&row->tuple[10], SQL_NO_NULLS); set_tuplefield_string(&row->tuple[11], ""); set_tuplefield_int4(&row->tuple[12], pgtype_display_size(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[13], the_type); QR_add_tuple(stmt->result, row); } } while((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO)) { row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); set_tuplefield_string(&row->tuple[0], ""); /* see note in SQLTables() */ /* set_tuplefield_string(&row->tuple[1], table_owner); */ set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); set_tuplefield_string(&row->tuple[3], field_name); set_tuplefield_int2(&row->tuple[4], pgtype_to_sqltype(stmt, field_type)); set_tuplefield_string(&row->tuple[5], field_type_name); /* Some Notes about Postgres Data Types: VARCHAR - the length is stored in the pg_attribute.atttypmod field BPCHAR - the length is also stored as varchar is NUMERIC - the scale is stored in atttypmod as follows: precision = ((atttypmod - VARHDRSZ) >> 16) & 0xffff scale = (atttypmod - VARHDRSZ) & 0xffff */ qlog("SQLColumns: table='%s',field_name='%s',type=%d,sqltype=%d,name='%s'\n", table_name,field_name,field_type,pgtype_to_sqltype,field_type_name); useStaticPrecision = TRUE; if (field_type == PG_TYPE_NUMERIC) { if (mod_length >= 4) mod_length -= 4; /* the length is in atttypmod - 4 */ if (mod_length >= 0) { useStaticPrecision = FALSE; precision = (mod_length >> 16) & 0xffff; scale = mod_length & 0xffff; mylog("SQLColumns: field type is NUMERIC: field_type = %d, mod_length=%d, precision=%d, scale=%d\n", field_type, mod_length, precision, scale ); set_tuplefield_int4(&row->tuple[7], precision + 2); /* sign+dec.point */ set_tuplefield_int4(&row->tuple[6], precision); set_tuplefield_int4(&row->tuple[12], precision + 2); /* sign+dec.point */ set_nullfield_int2(&row->tuple[8], scale); } } if((field_type == PG_TYPE_VARCHAR) || (field_type == PG_TYPE_BPCHAR)) { useStaticPrecision = FALSE; if (mod_length >= 4) mod_length -= 4; /* the length is in atttypmod - 4 */ if (mod_length > globals.max_varchar_size || mod_length <= 0) mod_length = globals.max_varchar_size; mylog("SQLColumns: field type is VARCHAR,BPCHAR: field_type = %d, mod_length = %d\n", field_type, mod_length); set_tuplefield_int4(&row->tuple[7], mod_length); set_tuplefield_int4(&row->tuple[6], mod_length); set_tuplefield_int4(&row->tuple[12], mod_length); set_nullfield_int2(&row->tuple[8], pgtype_scale(stmt, field_type, PG_STATIC)); } if (useStaticPrecision) { mylog("SQLColumns: field type is OTHER: field_type = %d, pgtype_length = %d\n", field_type, pgtype_length(stmt, field_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[7], pgtype_length(stmt, field_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[6], pgtype_precision(stmt, field_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[12], pgtype_display_size(stmt, field_type, PG_STATIC, PG_STATIC)); set_nullfield_int2(&row->tuple[8], pgtype_scale(stmt, field_type, PG_STATIC)); } set_nullfield_int2(&row->tuple[9], pgtype_radix(stmt, field_type)); set_tuplefield_int2(&row->tuple[10], (Int2) (not_null[0] == '1' ? SQL_NO_NULLS : pgtype_nullable(stmt, field_type))); set_tuplefield_string(&row->tuple[11], ""); set_tuplefield_int4(&row->tuple[13], field_type); QR_add_tuple(stmt->result, row); result = PG_SQLFetch(hcol_stmt); } if(result != SQL_NO_DATA_FOUND) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_create_errormsg((StatementClass *)hcol_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } /* Put the row version column at the end so it might not be */ /* mistaken for a key field. */ if ( relhasrules[0] != '1' && ! stmt->internal && atoi(ci->row_versioning)) { /* For Row Versioning fields */ the_type = PG_TYPE_INT4; row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); set_tuplefield_string(&row->tuple[0], ""); set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); set_tuplefield_string(&row->tuple[3], "xmin"); set_tuplefield_int2(&row->tuple[4], pgtype_to_sqltype(stmt, the_type)); set_tuplefield_string(&row->tuple[5], pgtype_to_name(stmt, the_type)); set_tuplefield_int4(&row->tuple[6], pgtype_precision(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[7], pgtype_length(stmt, the_type, PG_STATIC, PG_STATIC)); set_nullfield_int2(&row->tuple[8], pgtype_scale(stmt, the_type, PG_STATIC)); set_nullfield_int2(&row->tuple[9], pgtype_radix(stmt, the_type)); set_tuplefield_int2(&row->tuple[10], SQL_NO_NULLS); set_tuplefield_string(&row->tuple[11], ""); set_tuplefield_int4(&row->tuple[12], pgtype_display_size(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[13], the_type); QR_add_tuple(stmt->result, row); } /* also, things need to think that this statement is finished so */ /* the results can be retrieved. */ stmt->status = STMT_FINISHED; /* set up the current tuple pointer for SQLFetch */ stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; PG_SQLFreeStmt(hcol_stmt, SQL_DROP); mylog("SQLColumns(): EXIT, stmt=%u\n", stmt); return SQL_SUCCESS; } RETCODE SQL_API SQLColumns( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UCHAR FAR * szColumnName, SWORD cbColumnName) { return PG_SQLColumns( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName ); } RETCODE SQL_API SQLSpecialColumns( HSTMT hstmt, UWORD fColType, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UWORD fScope, UWORD fNullable) { static char* const func = "SQLSpecialColumns"; TupleNode *row; StatementClass *stmt = (StatementClass *) hstmt; ConnInfo *ci; HSTMT hcol_stmt; StatementClass *col_stmt; char columns_query[STD_STATEMENT_LEN]; RETCODE result; char relhasrules[MAX_INFO_STRING]; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } ci = &stmt->hdbc->connInfo; stmt->manual_result = TRUE; /* ********************************************************************** */ /* Create the query to find out if this is a view or not... */ /* ********************************************************************** */ sprintf(columns_query, "select c.relhasrules " "from pg_user u, pg_class c where " "u.usesysid = c.relowner"); my_strcat(columns_query, " and c.relname like '%.*s'", (char*)szTableName, cbTableName); my_strcat(columns_query, " and u.usename like '%.*s'", (char*)szTableOwner, cbTableOwner); result = PG_SQLAllocStmt( stmt->hdbc, &hcol_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate statement for SQLSpecialColumns result."); SC_log_error(func, "", stmt); return SQL_ERROR; } col_stmt = (StatementClass *) hcol_stmt; mylog("SQLSpecialColumns: hcol_stmt = %u, col_stmt = %u\n", hcol_stmt, col_stmt); result = PG_SQLExecDirect(hcol_stmt, columns_query, strlen(columns_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_create_errormsg((StatementClass *)hcol_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(hcol_stmt, 1, SQL_C_CHAR, relhasrules, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLFetch(hcol_stmt); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); stmt->result = QR_Constructor(); extend_bindings(stmt, 8); QR_set_num_fields(stmt->result, 8); QR_set_field_info(stmt->result, 0, "SCOPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 1, "COLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "DATA_TYPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 3, "TYPE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "PRECISION", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 5, "LENGTH", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 6, "SCALE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 7, "PSEUDO_COLUMN", PG_TYPE_INT2, 2); if ( relhasrules[0] != '1' ) { /* use the oid value for the rowid */ if(fColType == SQL_BEST_ROWID) { row = (TupleNode *)malloc(sizeof(TupleNode) + (8 - 1) * sizeof(TupleField)); set_tuplefield_int2(&row->tuple[0], SQL_SCOPE_SESSION); set_tuplefield_string(&row->tuple[1], "oid"); set_tuplefield_int2(&row->tuple[2], pgtype_to_sqltype(stmt, PG_TYPE_OID)); set_tuplefield_string(&row->tuple[3], "OID"); set_tuplefield_int4(&row->tuple[4], pgtype_precision(stmt, PG_TYPE_OID, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[5], pgtype_length(stmt, PG_TYPE_OID, PG_STATIC, PG_STATIC)); set_tuplefield_int2(&row->tuple[6], pgtype_scale(stmt, PG_TYPE_OID, PG_STATIC)); set_tuplefield_int2(&row->tuple[7], SQL_PC_PSEUDO); QR_add_tuple(stmt->result, row); } else if(fColType == SQL_ROWVER) { Int2 the_type = PG_TYPE_INT4; if (atoi(ci->row_versioning)) { row = (TupleNode *)malloc(sizeof(TupleNode) + (8 - 1) * sizeof(TupleField)); set_tuplefield_null(&row->tuple[0]); set_tuplefield_string(&row->tuple[1], "xmin"); set_tuplefield_int2(&row->tuple[2], pgtype_to_sqltype(stmt, the_type)); set_tuplefield_string(&row->tuple[3], pgtype_to_name(stmt, the_type)); set_tuplefield_int4(&row->tuple[4], pgtype_precision(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int4(&row->tuple[5], pgtype_length(stmt, the_type, PG_STATIC, PG_STATIC)); set_tuplefield_int2(&row->tuple[6], pgtype_scale(stmt, the_type, PG_STATIC)); set_tuplefield_int2(&row->tuple[7], SQL_PC_PSEUDO); QR_add_tuple(stmt->result, row); } } } stmt->status = STMT_FINISHED; stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; mylog("SQLSpecialColumns(): EXIT, stmt=%u\n", stmt); return SQL_SUCCESS; } RETCODE SQL_API SQLStatistics( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UWORD fUnique, UWORD fAccuracy) { static char* const func="SQLStatistics"; StatementClass *stmt = (StatementClass *) hstmt; char index_query[STD_STATEMENT_LEN]; HSTMT hindx_stmt; RETCODE result; char *table_name; char index_name[MAX_INFO_STRING]; short fields_vector[8]; char isunique[10], isclustered[10]; SDWORD index_name_len, fields_vector_len; TupleNode *row; int i; HSTMT hcol_stmt; StatementClass *col_stmt, *indx_stmt; char column_name[MAX_INFO_STRING], relhasrules[MAX_INFO_STRING]; char **column_names = 0; Int4 column_name_len; int total_columns = 0; char error = TRUE; ConnInfo *ci; char buf[256]; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->errormsg_created = TRUE; ci = &stmt->hdbc->connInfo; stmt->result = QR_Constructor(); if(!stmt->result) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate memory for SQLStatistics result."); SC_log_error(func, "", stmt); return SQL_ERROR; } /* the binding structure for a statement is not set up until */ /* a statement is actually executed, so we'll have to do this ourselves. */ extend_bindings(stmt, 13); /* set the field names */ QR_set_num_fields(stmt->result, 13); QR_set_field_info(stmt->result, 0, "TABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "TABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "TABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "NON_UNIQUE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 4, "INDEX_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 5, "INDEX_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 6, "TYPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 7, "SEQ_IN_INDEX", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 8, "COLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 9, "COLLATION", PG_TYPE_CHAR, 1); QR_set_field_info(stmt->result, 10, "CARDINALITY", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 11, "PAGES", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 12, "FILTER_CONDITION", PG_TYPE_TEXT, MAX_INFO_STRING); /* only use the table name... the owner should be redundant, and */ /* we never use qualifiers. */ table_name = make_string((char*)szTableName, cbTableName, NULL); if ( ! table_name) { SC_set_error(stmt, STMT_INTERNAL_ERROR, "No table name passed to SQLStatistics."); SC_log_error(func, "", stmt); return SQL_ERROR; } /* we need to get a list of the field names first, */ /* so we can return them later. */ result = PG_SQLAllocStmt( stmt->hdbc, &hcol_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "SQLAllocStmt failed in SQLStatistics for columns."); goto SEEYA; } col_stmt = (StatementClass *) hcol_stmt; /* "internal" prevents SQLColumns from returning the oid if it is being shown. This would throw everything off. */ col_stmt->internal = TRUE; result = PG_SQLColumns(hcol_stmt, (SQLCHAR*)"", 0, (SQLCHAR*)"", 0, (SQLCHAR*)table_name, (SWORD) strlen(table_name), (SQLCHAR*)"", 0); col_stmt->internal = FALSE; if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); goto SEEYA; } result = PG_SQLBindCol(hcol_stmt, 4, SQL_C_CHAR, column_name, MAX_INFO_STRING, &column_name_len); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_get_errormsg(col_stmt)); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); goto SEEYA; } result = PG_SQLFetch(hcol_stmt); while((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO)) { total_columns++; column_names = (char **)realloc(column_names, total_columns * sizeof(char *)); column_names[total_columns-1] = (char *)malloc(strlen(column_name)+1); strcpy(column_names[total_columns-1], column_name); mylog("SQLStatistics: column_name = '%s'\n", column_name); result = PG_SQLFetch(hcol_stmt); } if(result != SQL_NO_DATA_FOUND || total_columns == 0) { SC_set_error(stmt, SC_get_errornumber(col_stmt), SC_create_errormsg((StatementClass *)hcol_stmt)); PG_SQLFreeStmt(hcol_stmt, SQL_DROP); goto SEEYA; } PG_SQLFreeStmt(hcol_stmt, SQL_DROP); /* get a list of indexes on this table */ result = PG_SQLAllocStmt( stmt->hdbc, &hindx_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "SQLAllocStmt failed in SQLStatistics for indices."); goto SEEYA; } indx_stmt = (StatementClass *) hindx_stmt; sprintf(index_query, "select c.relname, i.indkey, i.indisunique" ", i.indisclustered, c.relhasrules" " from pg_index i, pg_class c, pg_class d" " where c.oid = i.indexrelid and d.relname = '%s'" " and d.oid = i.indrelid", table_name); result = PG_SQLExecDirect(hindx_stmt, index_query, strlen(index_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(indx_stmt), SC_create_errormsg((StatementClass *)hindx_stmt)); PG_SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } /* bind the index name column */ result = PG_SQLBindCol(hindx_stmt, 1, SQL_C_CHAR, index_name, MAX_INFO_STRING, &index_name_len); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(indx_stmt), SC_get_errormsg(indx_stmt)); PG_SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } /* bind the vector column */ result = PG_SQLBindCol(hindx_stmt, 2, SQL_C_DEFAULT, fields_vector, 16, &fields_vector_len); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(indx_stmt), SC_get_errormsg(indx_stmt)); PG_SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } /* bind the "is unique" column */ result = PG_SQLBindCol(hindx_stmt, 3, SQL_C_CHAR, isunique, sizeof(isunique), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(indx_stmt), SC_get_errormsg(indx_stmt)); PG_SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } /* bind the "is clustered" column */ result = PG_SQLBindCol(hindx_stmt, 4, SQL_C_CHAR, isclustered, sizeof(isclustered), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(indx_stmt), SC_get_errormsg(indx_stmt)); PG_SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } result = PG_SQLBindCol(hindx_stmt, 5, SQL_C_CHAR, relhasrules, MAX_INFO_STRING, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(indx_stmt), SC_get_errormsg(indx_stmt)); PG_SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } /* fake index of OID */ if ( relhasrules[0] != '1' && atoi(ci->show_oid_column) && atoi(ci->fake_oid_index)) { row = (TupleNode *)malloc(sizeof(TupleNode) + (13 - 1) * sizeof(TupleField)); /* no table qualifier */ set_tuplefield_string(&row->tuple[0], ""); /* don't set the table owner, else Access tries to use it */ set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); /* non-unique index? */ set_tuplefield_int2(&row->tuple[3], (Int2) (globals.unique_index ? FALSE : TRUE)); /* no index qualifier */ set_tuplefield_string(&row->tuple[4], ""); sprintf(buf, "%s_idx_fake_oid", table_name); set_tuplefield_string(&row->tuple[5], buf); /* Clustered index? I think non-clustered should be type OTHER not HASHED */ set_tuplefield_int2(&row->tuple[6], (Int2) SQL_INDEX_OTHER); set_tuplefield_int2(&row->tuple[7], (Int2) 1); set_tuplefield_string(&row->tuple[8], "oid"); set_tuplefield_string(&row->tuple[9], "A"); set_tuplefield_null(&row->tuple[10]); set_tuplefield_null(&row->tuple[11]); set_tuplefield_null(&row->tuple[12]); QR_add_tuple(stmt->result, row); } result = PG_SQLFetch(hindx_stmt); while((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO)) { /* If only requesting unique indexs, then just return those. */ if (fUnique == SQL_INDEX_ALL || (fUnique == SQL_INDEX_UNIQUE && atoi(isunique))) { i = 0; /* add a row in this table for each field in the index */ while(i < 8 && fields_vector[i] != 0) { row = (TupleNode *)malloc(sizeof(TupleNode) + (13 - 1) * sizeof(TupleField)); /* no table qualifier */ set_tuplefield_string(&row->tuple[0], ""); /* don't set the table owner, else Access tries to use it */ set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], table_name); /* non-unique index? */ if (globals.unique_index) set_tuplefield_int2(&row->tuple[3], (Int2) (atoi(isunique) ? FALSE : TRUE)); else set_tuplefield_int2(&row->tuple[3], TRUE); /* no index qualifier */ set_tuplefield_string(&row->tuple[4], ""); set_tuplefield_string(&row->tuple[5], index_name); /* Clustered index? I think non-clustered should be type OTHER not HASHED */ set_tuplefield_int2(&row->tuple[6], (Int2) (atoi(isclustered) ? SQL_INDEX_CLUSTERED : SQL_INDEX_OTHER)); set_tuplefield_int2(&row->tuple[7], (Int2) (i+1)); if(fields_vector[i] == OID_ATTNUM) { set_tuplefield_string(&row->tuple[8], "oid"); mylog("SQLStatistics: column name = oid\n"); } else if(fields_vector[i] < 0 || fields_vector[i] > total_columns) { set_tuplefield_string(&row->tuple[8], "UNKNOWN"); mylog("SQLStatistics: column name = UNKNOWN\n"); } else { set_tuplefield_string(&row->tuple[8], column_names[fields_vector[i]-1]); mylog("SQLStatistics: column name = '%s'\n", column_names[fields_vector[i]-1]); } set_tuplefield_string(&row->tuple[9], "A"); set_tuplefield_null(&row->tuple[10]); set_tuplefield_null(&row->tuple[11]); set_tuplefield_null(&row->tuple[12]); QR_add_tuple(stmt->result, row); i++; } } result = PG_SQLFetch(hindx_stmt); } if(result != SQL_NO_DATA_FOUND) { SC_set_error(stmt, SC_get_errornumber(indx_stmt), SC_create_errormsg((StatementClass *)hindx_stmt)); PG_SQLFreeStmt(hindx_stmt, SQL_DROP); goto SEEYA; } PG_SQLFreeStmt(hindx_stmt, SQL_DROP); /* also, things need to think that this statement is finished so */ /* the results can be retrieved. */ stmt->status = STMT_FINISHED; /* set up the current tuple pointer for SQLFetch */ stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; error = FALSE; SEEYA: /* These things should be freed on any error ALSO! */ free(table_name); for(i = 0; i < total_columns; i++) { free(column_names[i]); } free(column_names); mylog("SQLStatistics(): EXIT, %s, stmt=%u\n", error ? "error" : "success", stmt); if (error) { SC_log_error(func, "", stmt); return SQL_ERROR; } else return SQL_SUCCESS; } RETCODE SQL_API SQLColumnPrivileges( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName, UCHAR FAR * szColumnName, SWORD cbColumnName) { static char* const func="SQLColumnPrivileges"; mylog("%s: entering...\n", func); /* Neither Access or Borland care about this. */ SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } /* SQLPrimaryKeys() * Retrieve the primary key columns for the specified table. */ RETCODE SQL_API PG_SQLPrimaryKeys( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName) { static char* const func = "SQLPrimaryKeys"; StatementClass *stmt = (StatementClass *) hstmt; TupleNode *row; RETCODE result; int seq = 0; HSTMT htbl_stmt; StatementClass *tbl_stmt; char tables_query[STD_STATEMENT_LEN]; char attname[MAX_INFO_STRING]; SDWORD attname_len; char pktab[MAX_TABLE_LEN + 1]; Int2 result_cols; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->errormsg_created = TRUE; stmt->result = QR_Constructor(); if(!stmt->result) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate memory for SQLPrimaryKeys result."); SC_log_error(func, "", stmt); return SQL_ERROR; } /* the binding structure for a statement is not set up until */ /* a statement is actually executed, so we'll have to do this ourselves. */ result_cols = 6; extend_bindings(stmt, result_cols); /* set the field names */ QR_set_num_fields(stmt->result, result_cols); QR_set_field_info(stmt->result, 0, "TABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "TABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "TABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "COLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "KEY_SEQ", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 5, "PK_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); result = PG_SQLAllocStmt( stmt->hdbc, &htbl_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate statement for Primary Key result."); SC_log_error(func, "", stmt); return SQL_ERROR; } tbl_stmt = (StatementClass *) htbl_stmt; pktab[0] = '\0'; make_string((char*)szTableName, cbTableName, pktab); if ( pktab[0] == '\0') { SC_set_error(stmt, STMT_INTERNAL_ERROR, "No Table specified to SQLPrimaryKeys."); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } #if 0 sprintf(tables_query, "select distinct on (attnum) a2.attname, a2.attnum from pg_attribute a1, pg_attribute a2, pg_class c, pg_index i where c.relname = '%s_pkey' AND c.oid = i.indexrelid AND a1.attrelid = c.oid AND a2.attrelid = c.oid AND (i.indkey[0] = a1.attnum OR i.indkey[1] = a1.attnum OR i.indkey[2] = a1.attnum OR i.indkey[3] = a1.attnum OR i.indkey[4] = a1.attnum OR i.indkey[5] = a1.attnum OR i.indkey[6] = a1.attnum OR i.indkey[7] = a1.attnum) order by a2.attnum", pktab); #else /* Simplified query to remove assumptions about * number of possible index columns. * Courtesy of Tom Lane - thomas 2000-03-21 */ sprintf(tables_query, "select ta.attname, ia.attnum" " from pg_attribute ta, pg_attribute ia, pg_class c, pg_index i" " where c.relname = '%s_pkey'" " AND c.oid = i.indexrelid" " AND ia.attrelid = i.indexrelid" " AND ta.attrelid = i.indrelid" " AND ta.attnum = i.indkey[ia.attnum-1]" " order by ia.attnum", pktab); #endif mylog("SQLPrimaryKeys: tables_query='%s'\n", tables_query); result = PG_SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_create_errormsg((StatementClass *)htbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 1, SQL_C_CHAR, attname, MAX_INFO_STRING, &attname_len); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLFetch(htbl_stmt); while((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO)) { row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); set_tuplefield_null(&row->tuple[0]); /* I have to hide the table owner from Access, otherwise it * insists on referring to the table as 'owner.table'. * (this is valid according to the ODBC SQL grammar, but * Postgres won't support it.) */ set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], pktab); set_tuplefield_string(&row->tuple[3], attname); set_tuplefield_int2(&row->tuple[4], (Int2) (++seq)); set_tuplefield_null(&row->tuple[5]); QR_add_tuple(stmt->result, row); mylog(">> primaryKeys: pktab = '%s', attname = '%s', seq = %d\n", pktab, attname, seq); result = PG_SQLFetch(htbl_stmt); } if(result != SQL_NO_DATA_FOUND) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_create_errormsg((StatementClass *)htbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } PG_SQLFreeStmt(htbl_stmt, SQL_DROP); /* also, things need to think that this statement is finished so */ /* the results can be retrieved. */ stmt->status = STMT_FINISHED; /* set up the current tuple pointer for SQLFetch */ stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; mylog("SQLPrimaryKeys(): EXIT, stmt=%u\n", stmt); return SQL_SUCCESS; } RETCODE SQL_API SQLPrimaryKeys( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName) { return PG_SQLPrimaryKeys( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName ); } RETCODE SQL_API SQLForeignKeys( HSTMT hstmt, UCHAR FAR * szPkTableQualifier, SWORD cbPkTableQualifier, UCHAR FAR * szPkTableOwner, SWORD cbPkTableOwner, UCHAR FAR * szPkTableName, SWORD cbPkTableName, UCHAR FAR * szFkTableQualifier, SWORD cbFkTableQualifier, UCHAR FAR * szFkTableOwner, SWORD cbFkTableOwner, UCHAR FAR * szFkTableName, SWORD cbFkTableName) { static char* const func = "SQLForeignKeys"; StatementClass *stmt = (StatementClass *) hstmt; TupleNode *row; HSTMT htbl_stmt, hpkey_stmt; StatementClass *tbl_stmt; RETCODE result, keyresult; char tables_query[STD_STATEMENT_LEN]; char trig_deferrable[2]; char trig_initdeferred[2]; char trig_args[1024]; char upd_rule[MAX_TABLE_LEN], del_rule[MAX_TABLE_LEN]; char pk_table_needed[MAX_TABLE_LEN + 1]; char fk_table_needed[MAX_TABLE_LEN + 1]; char *pkey_ptr, *fkey_ptr, *pk_table, *fk_table; int i, j, k, num_keys; SWORD trig_nargs, upd_rule_type=0, del_rule_type=0; #if (ODBCVER >= 0x0300) SWORD defer_type; #endif char pkey[MAX_INFO_STRING]; Int2 result_cols; mylog("%s: entering...stmt=%u\n", func, stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt->manual_result = TRUE; stmt->errormsg_created = TRUE; stmt->result = QR_Constructor(); if(!stmt->result) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate memory for SQLForeignKeys result."); SC_log_error(func, "", stmt); return SQL_ERROR; } /* the binding structure for a statement is not set up until */ /* a statement is actually executed, so we'll have to do this ourselves. */ result_cols = 14; extend_bindings(stmt, result_cols); /* set the field names */ QR_set_num_fields(stmt->result, result_cols); QR_set_field_info(stmt->result, 0, "PKTABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "PKTABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "PKTABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "PKCOLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "FKTABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 5, "FKTABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 6, "FKTABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 7, "FKCOLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 8, "KEY_SEQ", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 9, "UPDATE_RULE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 10, "DELETE_RULE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 11, "FK_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 12, "PK_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 13, "TRIGGER_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); #if (ODBCVER >= 0x0300) QR_set_field_info(stmt->result, 14, "DEFERRABILITY", PG_TYPE_INT2, 2); #endif /* ODBCVER >= 0x0300 */ /* also, things need to think that this statement is finished so */ /* the results can be retrieved. */ stmt->status = STMT_FINISHED; /* set up the current tuple pointer for SQLFetch */ stmt->currTuple = -1; stmt->rowset_start = -1; stmt->current_col = -1; result = PG_SQLAllocStmt( stmt->hdbc, &htbl_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate statement for SQLForeignKeys result."); SC_log_error(func, "", stmt); return SQL_ERROR; } tbl_stmt = (StatementClass *) htbl_stmt; pk_table_needed[0] = '\0'; fk_table_needed[0] = '\0'; make_string((char*)szPkTableName, cbPkTableName, pk_table_needed); make_string((char*)szFkTableName, cbFkTableName, fk_table_needed); /* Case #2 -- Get the foreign keys in the specified table (fktab) that refer to the primary keys of other table(s). */ if (fk_table_needed[0] != '\0') { mylog("%s: entering Foreign Key Case #2", func); sprintf(tables_query, "SELECT pt.tgargs, " " pt.tgnargs, " " pt.tgdeferrable, " " pt.tginitdeferred, " " pg_proc.proname, " " pg_proc_1.proname " "FROM pg_class pc, " " pg_proc pg_proc, " " pg_proc pg_proc_1, " " pg_trigger pg_trigger, " " pg_trigger pg_trigger_1, " " pg_proc pp, " " pg_trigger pt " "WHERE pt.tgrelid = pc.oid " "AND pp.oid = pt.tgfoid " "AND pg_trigger.tgconstrrelid = pc.oid " "AND pg_proc.oid = pg_trigger.tgfoid " "AND pg_trigger_1.tgfoid = pg_proc_1.oid " "AND pg_trigger_1.tgconstrrelid = pc.oid " "AND ((pc.relname='%s') " "AND (pp.proname LIKE '%%ins') " "AND (pg_proc.proname LIKE '%%upd') " "AND (pg_proc_1.proname LIKE '%%del') " "AND (pg_trigger.tgrelid=pt.tgconstrrelid) " "AND (pg_trigger.tgconstrname=pt.tgconstrname) " "AND (pg_trigger_1.tgrelid=pt.tgconstrrelid) " "AND (pg_trigger_1.tgconstrname=pt.tgconstrname))", fk_table_needed); result = PG_SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_create_errormsg((StatementClass *)htbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 1, SQL_C_BINARY, trig_args, sizeof(trig_args), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 2, SQL_C_SHORT, &trig_nargs, 0, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 3, SQL_C_CHAR, trig_deferrable, sizeof(trig_deferrable), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 4, SQL_C_CHAR, trig_initdeferred, sizeof(trig_initdeferred), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 5, SQL_C_CHAR, upd_rule, sizeof(upd_rule), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 6, SQL_C_CHAR, del_rule, sizeof(del_rule), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLFetch(htbl_stmt); if (result == SQL_NO_DATA_FOUND) return SQL_SUCCESS; if(result != SQL_SUCCESS) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_create_errormsg((StatementClass *)htbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } keyresult = PG_SQLAllocStmt( stmt->hdbc, &hpkey_stmt); if((keyresult != SQL_SUCCESS) && (keyresult != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate statement for SQLForeignKeys (pkeys) result."); SC_log_error(func, "", stmt); return SQL_ERROR; } keyresult = PG_SQLBindCol(hpkey_stmt, 4, SQL_C_CHAR, pkey, sizeof(pkey), NULL); if (keyresult != SQL_SUCCESS) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't bindcol for primary keys for SQLForeignKeys result."); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hpkey_stmt, SQL_DROP); return SQL_ERROR; } while (result == SQL_SUCCESS) { /* Compute the number of keyparts. */ num_keys = (trig_nargs - 4) / 2; mylog("Foreign Key Case#2: trig_nargs = %d, num_keys = %d\n", trig_nargs, num_keys); pk_table = trig_args; /* Get to the PK Table Name */ for (k = 0; k < 2; k++) pk_table += strlen(pk_table) + 1; /* If there is a pk table specified, then check it. */ if (pk_table_needed[0] != '\0') { /* If it doesn't match, then continue */ if ( strcmp(pk_table, pk_table_needed)) { result = PG_SQLFetch(htbl_stmt); continue; } } keyresult = PG_SQLPrimaryKeys(hpkey_stmt, NULL, 0, NULL, 0, (SQLCHAR*)pk_table, SQL_NTS); if (keyresult != SQL_SUCCESS) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't get primary keys for SQLForeignKeys result."); SC_log_error(func, "", stmt); PG_SQLFreeStmt(hpkey_stmt, SQL_DROP); return SQL_ERROR; } /* Check that the key listed is the primary key */ keyresult = PG_SQLFetch(hpkey_stmt); /* Get to first primary key */ pkey_ptr = trig_args; for (i = 0; i < 5; i++) pkey_ptr += strlen(pkey_ptr) + 1; for (k = 0; k < num_keys; k++) { mylog("%s: pkey_ptr='%s', pkey='%s'\n", func, pkey_ptr, pkey); if ( keyresult != SQL_SUCCESS || strcmp(pkey_ptr, pkey)) { num_keys = 0; break; } /* Get to next primary key */ for (k = 0; k < 2; k++) pkey_ptr += strlen(pkey_ptr) + 1; keyresult = PG_SQLFetch(hpkey_stmt); } /* Set to first fk column */ fkey_ptr = trig_args; for (k = 0; k < 4; k++) fkey_ptr += strlen(fkey_ptr) + 1; /* Set update and delete actions for foreign keys */ if (!strcmp(upd_rule, "RI_FKey_cascade_upd")) { upd_rule_type = SQL_CASCADE; } else if (!strcmp(upd_rule, "RI_FKey_noaction_upd")) { upd_rule_type = SQL_NO_ACTION; } else if (!strcmp(upd_rule, "RI_FKey_restrict_upd")) { upd_rule_type = SQL_NO_ACTION; } else if (!strcmp(upd_rule, "RI_FKey_setdefault_upd")) { upd_rule_type = SQL_SET_DEFAULT; } else if (!strcmp(upd_rule, "RI_FKey_setnull_upd")) { upd_rule_type = SQL_SET_NULL; } if (!strcmp(upd_rule, "RI_FKey_cascade_del")) { del_rule_type = SQL_CASCADE; } else if (!strcmp(upd_rule, "RI_FKey_noaction_del")) { del_rule_type = SQL_NO_ACTION; } else if (!strcmp(upd_rule, "RI_FKey_restrict_del")) { del_rule_type = SQL_NO_ACTION; } else if (!strcmp(upd_rule, "RI_FKey_setdefault_del")) { del_rule_type = SQL_SET_DEFAULT; } else if (!strcmp(upd_rule, "RI_FKey_setnull_del")) { del_rule_type = SQL_SET_NULL; } #if (ODBCVER >= 0x0300) /* Set deferrability type */ if (!strcmp(trig_initdeferred, "y")) { defer_type = SQL_INITIALLY_DEFERRED; } else if (!strcmp(trig_deferrable, "y")) { defer_type = SQL_INITIALLY_IMMEDIATE; } else { defer_type = SQL_NOT_DEFERRABLE; } #endif /* ODBCVER >= 0x0300 */ /* Get to first primary key */ pkey_ptr = trig_args; for (i = 0; i < 5; i++) pkey_ptr += strlen(pkey_ptr) + 1; for (k = 0; k < num_keys; k++) { row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); mylog("%s: pk_table = '%s', pkey_ptr = '%s'\n", func, pk_table, pkey_ptr); set_tuplefield_null(&row->tuple[0]); set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], pk_table); set_tuplefield_string(&row->tuple[3], pkey_ptr); mylog("%s: fk_table_needed = '%s', fkey_ptr = '%s'\n", func, fk_table_needed, fkey_ptr); set_tuplefield_null(&row->tuple[4]); set_tuplefield_string(&row->tuple[5], ""); set_tuplefield_string(&row->tuple[6], fk_table_needed); set_tuplefield_string(&row->tuple[7], fkey_ptr); mylog("%s: upd_rule_type = '%i', del_rule_type = '%i'\n, trig_name = '%s'", func, upd_rule_type, del_rule_type, trig_args); set_tuplefield_int2(&row->tuple[8], (Int2) (k + 1)); set_tuplefield_int2(&row->tuple[9], (Int2) upd_rule_type); set_tuplefield_int2(&row->tuple[10], (Int2) del_rule_type); set_tuplefield_null(&row->tuple[11]); set_tuplefield_null(&row->tuple[12]); set_tuplefield_string(&row->tuple[13], trig_args); #if (ODBCVER >= 0x0300) set_tuplefield_int2(&row->tuple[14], defer_type); #endif /* ODBCVER >= 0x0300 */ QR_add_tuple(stmt->result, row); /* next primary/foreign key */ for (i = 0; i < 2; i++) { fkey_ptr += strlen(fkey_ptr) + 1; pkey_ptr += strlen(pkey_ptr) + 1; } } result = PG_SQLFetch(htbl_stmt); } PG_SQLFreeStmt(hpkey_stmt, SQL_DROP); } /* Case #1 -- Get the foreign keys in other tables that refer to the primary key in the specified table (pktab). i.e., Who points to me? */ else if (pk_table_needed[0] != '\0') { sprintf(tables_query, "SELECT pg_trigger.tgargs, " " pg_trigger.tgnargs, " " pg_trigger.tgdeferrable, " " pg_trigger.tginitdeferred, " " pg_proc.proname, " " pg_proc_1.proname " "FROM pg_class pg_class, " " pg_class pg_class_1, " " pg_class pg_class_2, " " pg_proc pg_proc, " " pg_proc pg_proc_1, " " pg_trigger pg_trigger, " " pg_trigger pg_trigger_1, " " pg_trigger pg_trigger_2 " "WHERE pg_trigger.tgconstrrelid = pg_class.oid " " AND pg_trigger.tgrelid = pg_class_1.oid " " AND pg_trigger_1.tgfoid = pg_proc_1.oid " " AND pg_trigger_1.tgconstrrelid = pg_class_1.oid " " AND pg_trigger_2.tgconstrrelid = pg_class_2.oid " " AND pg_trigger_2.tgfoid = pg_proc.oid " " AND pg_class_2.oid = pg_trigger.tgrelid " " AND (" " (pg_class.relname='%s') " " AND (pg_proc.proname Like '%%upd') " " AND (pg_proc_1.proname Like '%%del')" " AND (pg_trigger_1.tgrelid = pg_trigger.tgconstrrelid) " " AND (pg_trigger_2.tgrelid = pg_trigger.tgconstrrelid) " " )", pk_table_needed); result = PG_SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query)); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_create_errormsg((StatementClass *)htbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 1, SQL_C_BINARY, trig_args, sizeof(trig_args), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 2, SQL_C_SHORT, &trig_nargs, 0, NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 3, SQL_C_CHAR, trig_deferrable, sizeof(trig_deferrable), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 4, SQL_C_CHAR, trig_initdeferred, sizeof(trig_initdeferred), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 5, SQL_C_CHAR, upd_rule, sizeof(upd_rule), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLBindCol(htbl_stmt, 6, SQL_C_CHAR, del_rule, sizeof(del_rule), NULL); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_get_errormsg(tbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } result = PG_SQLFetch(htbl_stmt); if (result == SQL_NO_DATA_FOUND) return SQL_SUCCESS; if(result != SQL_SUCCESS) { SC_set_error(stmt, SC_get_errornumber(tbl_stmt), SC_create_errormsg((StatementClass *)htbl_stmt)); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } while (result == SQL_SUCCESS) { /* Calculate the number of key parts */ num_keys = (trig_nargs - 4) / 2;; /* Handle action (i.e., 'cascade', 'restrict', 'setnull') */ if (!strcmp(upd_rule, "RI_FKey_cascade_upd")) { upd_rule_type = SQL_CASCADE; } else if (!strcmp(upd_rule, "RI_FKey_noaction_upd")) { upd_rule_type = SQL_NO_ACTION; } else if (!strcmp(upd_rule, "RI_FKey_restrict_upd")) { upd_rule_type = SQL_NO_ACTION; } else if (!strcmp(upd_rule, "RI_FKey_setdefault_upd")) { upd_rule_type = SQL_SET_DEFAULT; } else if (!strcmp(upd_rule, "RI_FKey_setnull_upd")) { upd_rule_type = SQL_SET_NULL; } if (!strcmp(upd_rule, "RI_FKey_cascade_del")) { del_rule_type = SQL_CASCADE; } else if (!strcmp(upd_rule, "RI_FKey_noaction_del")) { del_rule_type = SQL_NO_ACTION; } else if (!strcmp(upd_rule, "RI_FKey_restrict_del")) { del_rule_type = SQL_NO_ACTION; } else if (!strcmp(upd_rule, "RI_FKey_setdefault_del")) { del_rule_type = SQL_SET_DEFAULT; } else if (!strcmp(upd_rule, "RI_FKey_setnull_del")) { del_rule_type = SQL_SET_NULL; } #if (ODBCVER >= 0x0300) /* Set deferrability type */ if (!strcmp(trig_initdeferred, "y")) { defer_type = SQL_INITIALLY_DEFERRED; } else if (!strcmp(trig_deferrable, "y")) { defer_type = SQL_INITIALLY_IMMEDIATE; } else { defer_type = SQL_NOT_DEFERRABLE; } #endif /* ODBCVER >= 0x0300 */ mylog("Foreign Key Case#1: trig_nargs = %d, num_keys = %d\n", trig_nargs, num_keys); /* Get to first primary key */ pkey_ptr = trig_args; for (i = 0; i < 5; i++) pkey_ptr += strlen(pkey_ptr) + 1; /* Get to first foreign table */ fk_table = trig_args; fk_table += strlen(fk_table) + 1; /* Get to first foreign key */ fkey_ptr = trig_args; for (k = 0; k < 4; k++) fkey_ptr += strlen(fkey_ptr) + 1; for (k = 0; k < num_keys; k++) { mylog("pkey_ptr = '%s', fk_table = '%s', fkey_ptr = '%s'\n", pkey_ptr, fk_table, fkey_ptr); row = (TupleNode *)malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField)); mylog("pk_table_needed = '%s', pkey_ptr = '%s'\n", pk_table_needed, pkey_ptr); set_tuplefield_null(&row->tuple[0]); set_tuplefield_string(&row->tuple[1], ""); set_tuplefield_string(&row->tuple[2], pk_table_needed); set_tuplefield_string(&row->tuple[3], pkey_ptr); mylog("fk_table = '%s', fkey_ptr = '%s'\n", fk_table, fkey_ptr); set_tuplefield_null(&row->tuple[4]); set_tuplefield_string(&row->tuple[5], ""); set_tuplefield_string(&row->tuple[6], fk_table); set_tuplefield_string(&row->tuple[7], fkey_ptr); set_tuplefield_int2(&row->tuple[8], (Int2) (k + 1)); mylog("upd_rule = %d, del_rule= %d", upd_rule_type, del_rule_type); set_nullfield_int2(&row->tuple[9], (Int2) upd_rule_type); set_nullfield_int2(&row->tuple[10], (Int2) del_rule_type); set_tuplefield_null(&row->tuple[11]); set_tuplefield_null(&row->tuple[12]); set_tuplefield_string(&row->tuple[13], trig_args); #if (ODBCVER >= 0x0300) mylog("defer_type = '%s'", defer_type); set_tuplefield_int2(&row->tuple[14], defer_type); #endif /* ODBCVER >= 0x0300 */ QR_add_tuple(stmt->result, row); /* next primary/foreign key */ for (j = 0; j < 2; j++) { pkey_ptr += strlen(pkey_ptr) + 1; fkey_ptr += strlen(fkey_ptr) + 1; } } result = PG_SQLFetch(htbl_stmt); } } else { SC_set_error(stmt, STMT_INTERNAL_ERROR, "No tables specified to SQLForeignKeys."); SC_log_error(func, "", stmt); PG_SQLFreeStmt(htbl_stmt, SQL_DROP); return SQL_ERROR; } PG_SQLFreeStmt(htbl_stmt, SQL_DROP); mylog("SQLForeignKeys(): EXIT, stmt=%u\n", stmt); return SQL_SUCCESS; } RETCODE SQL_API SQLProcedureColumns( HSTMT hstmt, UCHAR FAR * szProcQualifier, SWORD cbProcQualifier, UCHAR FAR * szProcOwner, SWORD cbProcOwner, UCHAR FAR * szProcName, SWORD cbProcName, UCHAR FAR * szColumnName, SWORD cbColumnName) { static char* const func="SQLProcedureColumns"; mylog("%s: entering...\n", func); SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } RETCODE SQL_API SQLProcedures( HSTMT hstmt, UCHAR FAR * szProcQualifier, SWORD cbProcQualifier, UCHAR FAR * szProcOwner, SWORD cbProcOwner, UCHAR FAR * szProcName, SWORD cbProcName) { static char* const func="SQLProcedures"; mylog("%s: entering...\n", func); SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } RETCODE SQL_API SQLTablePrivileges( HSTMT hstmt, UCHAR FAR * szTableQualifier, SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName, SWORD cbTableName) { static char* const func="SQLTablePrivileges"; mylog("%s: entering...\n", func); SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/lobj.c0100644000076400007640000000600310021405715016550 0ustar nicknick /* Module: lobj.c * * Description: This module contains routines related to manipulating * large objects. * * Classes: none * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include "lobj.h" #include "psqlodbc.h" #include "connection.h" Oid odbc_lo_creat(ConnectionClass *conn, int mode) { LO_ARG argv[1]; int retval, result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = mode; if ( ! CC_send_function(conn, LO_CREAT, &retval, &result_len, 1, argv, 1)) return 0; /* invalid oid */ else return retval; } int odbc_lo_open(ConnectionClass *conn, int lobjId, int mode) { int fd; int result_len; LO_ARG argv[2]; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = lobjId; argv[1].isint = 1; argv[1].len = 4; argv[1].u.integer = mode; if ( ! CC_send_function(conn, LO_OPEN, &fd, &result_len, 1, argv, 2)) return -1; if (fd >= 0 && odbc_lo_lseek(conn, fd, 0L, SEEK_SET) < 0) return -1; return fd; } int odbc_lo_close(ConnectionClass *conn, int fd) { LO_ARG argv[1]; int retval, result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = fd; if ( ! CC_send_function(conn, LO_CLOSE, &retval, &result_len, 1, argv, 1)) return -1; else return retval; } int odbc_lo_read(ConnectionClass *conn, int fd, char *buf, int len) { LO_ARG argv[2]; int result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = fd; argv[1].isint = 1; argv[1].len = 4; argv[1].u.integer = len; if ( ! CC_send_function(conn, LO_READ, (int *) buf, &result_len, 0, argv, 2)) return -1; else return result_len; } int odbc_lo_write(ConnectionClass *conn, int fd, char *buf, int len) { LO_ARG argv[2]; int retval, result_len; if (len <= 0) return 0; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = fd; argv[1].isint = 0; argv[1].len = len; argv[1].u.ptr = (char *) buf; if ( ! CC_send_function(conn, LO_WRITE, &retval, &result_len, 1, argv, 2)) return -1; else return retval; } int odbc_lo_lseek(ConnectionClass *conn, int fd, int offset, int whence) { LO_ARG argv[3]; int retval, result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = fd; argv[1].isint = 1; argv[1].len = 4; argv[1].u.integer = offset; argv[2].isint = 1; argv[2].len = 4; argv[2].u.integer = whence; if ( ! CC_send_function(conn, LO_LSEEK, &retval, &result_len, 1, argv, 3)) return -1; else return retval; } int odbc_lo_tell(ConnectionClass *conn, int fd) { LO_ARG argv[1]; int retval, result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = fd; if ( ! CC_send_function(conn, LO_TELL, &retval, &result_len, 1, argv, 1)) return -1; else return retval; } int odbc_lo_unlink(ConnectionClass *conn, Oid lobjId) { LO_ARG argv[1]; int retval, result_len; argv[0].isint = 1; argv[0].len = 4; argv[0].u.integer = lobjId; if ( ! CC_send_function(conn, LO_UNLINK, &retval, &result_len, 1, argv, 1)) return -1; else return retval; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/md5.c0100644000076400007640000002403710150375475016332 0ustar nicknick/* * md5.c * * Implements the MD5 Message-Digest Algorithm as specified in * RFC 1321. This implementation is a simple one, in that it * needs every input byte to be buffered before doing any * calculations. I do not expect this file to be used for * general purpose MD5'ing of large amounts of data, only for * generating hashed passwords from limited input. * * Sverre H. Huseby * * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION * $Header: /cvsroot/unixodbc/unixODBC/Drivers/Postgre7.1/md5.c,v 1.1 2004/11/22 14:44:13 lurcher Exp $ */ /* * NOTE: * * There are two copies of this file, one in backend/libpq and another * in interfaces/odbc. They should be identical. This is done so ODBC * can be compiled stand-alone. */ #include "md5.h" #undef palloc #define palloc malloc #undef pfree #define pfree free /* * PRIVATE FUNCTIONS */ /* * The returned array is allocated using malloc. the caller should free it * when it is no longer needed. */ static uint8 * createPaddedCopyWithLength(uint8 *b, uint32 *l) { uint8 *ret; uint32 q; uint32 len, newLen448; uint32 len_high, len_low; /* 64-bit value split into 32-bit sections */ len = ((b == NULL) ? 0 : *l); newLen448 = len + 64 - (len % 64) - 8; if (newLen448 <= len) newLen448 += 64; *l = newLen448 + 8; if ((ret = (uint8 *) malloc(sizeof(uint8) * *l)) == NULL) return NULL; if (b != NULL) memcpy(ret, b, sizeof(uint8) * len); /* pad */ ret[len] = 0x80; for (q = len + 1; q < newLen448; q++) ret[q] = 0x00; /* append length as a 64 bit bitcount */ len_low = len; /* split into two 32-bit values */ /* we only look at the bottom 32-bits */ len_high = len >> 29; len_low <<= 3; q = newLen448; ret[q++] = (len_low & 0xff); len_low >>= 8; ret[q++] = (len_low & 0xff); len_low >>= 8; ret[q++] = (len_low & 0xff); len_low >>= 8; ret[q++] = (len_low & 0xff); ret[q++] = (len_high & 0xff); len_high >>= 8; ret[q++] = (len_high & 0xff); len_high >>= 8; ret[q++] = (len_high & 0xff); len_high >>= 8; ret[q] = (len_high & 0xff); return ret; } #define F(x, y, z) (((x) & (y)) | (~(x) & (z))) #define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) #define H(x, y, z) ((x) ^ (y) ^ (z)) #define I(x, y, z) ((y) ^ ((x) | ~(z))) #define ROT_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) static void doTheRounds(uint32 X[16], uint32 state[4]) { uint32 a, b, c, d; a = state[0]; b = state[1]; c = state[2]; d = state[3]; /* round 1 */ a = b + ROT_LEFT((a + F(b, c, d) + X[0] + 0xd76aa478), 7); /* 1 */ d = a + ROT_LEFT((d + F(a, b, c) + X[1] + 0xe8c7b756), 12); /* 2 */ c = d + ROT_LEFT((c + F(d, a, b) + X[2] + 0x242070db), 17); /* 3 */ b = c + ROT_LEFT((b + F(c, d, a) + X[3] + 0xc1bdceee), 22); /* 4 */ a = b + ROT_LEFT((a + F(b, c, d) + X[4] + 0xf57c0faf), 7); /* 5 */ d = a + ROT_LEFT((d + F(a, b, c) + X[5] + 0x4787c62a), 12); /* 6 */ c = d + ROT_LEFT((c + F(d, a, b) + X[6] + 0xa8304613), 17); /* 7 */ b = c + ROT_LEFT((b + F(c, d, a) + X[7] + 0xfd469501), 22); /* 8 */ a = b + ROT_LEFT((a + F(b, c, d) + X[8] + 0x698098d8), 7); /* 9 */ d = a + ROT_LEFT((d + F(a, b, c) + X[9] + 0x8b44f7af), 12); /* 10 */ c = d + ROT_LEFT((c + F(d, a, b) + X[10] + 0xffff5bb1), 17); /* 11 */ b = c + ROT_LEFT((b + F(c, d, a) + X[11] + 0x895cd7be), 22); /* 12 */ a = b + ROT_LEFT((a + F(b, c, d) + X[12] + 0x6b901122), 7); /* 13 */ d = a + ROT_LEFT((d + F(a, b, c) + X[13] + 0xfd987193), 12); /* 14 */ c = d + ROT_LEFT((c + F(d, a, b) + X[14] + 0xa679438e), 17); /* 15 */ b = c + ROT_LEFT((b + F(c, d, a) + X[15] + 0x49b40821), 22); /* 16 */ /* round 2 */ a = b + ROT_LEFT((a + G(b, c, d) + X[1] + 0xf61e2562), 5); /* 17 */ d = a + ROT_LEFT((d + G(a, b, c) + X[6] + 0xc040b340), 9); /* 18 */ c = d + ROT_LEFT((c + G(d, a, b) + X[11] + 0x265e5a51), 14); /* 19 */ b = c + ROT_LEFT((b + G(c, d, a) + X[0] + 0xe9b6c7aa), 20); /* 20 */ a = b + ROT_LEFT((a + G(b, c, d) + X[5] + 0xd62f105d), 5); /* 21 */ d = a + ROT_LEFT((d + G(a, b, c) + X[10] + 0x02441453), 9); /* 22 */ c = d + ROT_LEFT((c + G(d, a, b) + X[15] + 0xd8a1e681), 14); /* 23 */ b = c + ROT_LEFT((b + G(c, d, a) + X[4] + 0xe7d3fbc8), 20); /* 24 */ a = b + ROT_LEFT((a + G(b, c, d) + X[9] + 0x21e1cde6), 5); /* 25 */ d = a + ROT_LEFT((d + G(a, b, c) + X[14] + 0xc33707d6), 9); /* 26 */ c = d + ROT_LEFT((c + G(d, a, b) + X[3] + 0xf4d50d87), 14); /* 27 */ b = c + ROT_LEFT((b + G(c, d, a) + X[8] + 0x455a14ed), 20); /* 28 */ a = b + ROT_LEFT((a + G(b, c, d) + X[13] + 0xa9e3e905), 5); /* 29 */ d = a + ROT_LEFT((d + G(a, b, c) + X[2] + 0xfcefa3f8), 9); /* 30 */ c = d + ROT_LEFT((c + G(d, a, b) + X[7] + 0x676f02d9), 14); /* 31 */ b = c + ROT_LEFT((b + G(c, d, a) + X[12] + 0x8d2a4c8a), 20); /* 32 */ /* round 3 */ a = b + ROT_LEFT((a + H(b, c, d) + X[5] + 0xfffa3942), 4); /* 33 */ d = a + ROT_LEFT((d + H(a, b, c) + X[8] + 0x8771f681), 11); /* 34 */ c = d + ROT_LEFT((c + H(d, a, b) + X[11] + 0x6d9d6122), 16); /* 35 */ b = c + ROT_LEFT((b + H(c, d, a) + X[14] + 0xfde5380c), 23); /* 36 */ a = b + ROT_LEFT((a + H(b, c, d) + X[1] + 0xa4beea44), 4); /* 37 */ d = a + ROT_LEFT((d + H(a, b, c) + X[4] + 0x4bdecfa9), 11); /* 38 */ c = d + ROT_LEFT((c + H(d, a, b) + X[7] + 0xf6bb4b60), 16); /* 39 */ b = c + ROT_LEFT((b + H(c, d, a) + X[10] + 0xbebfbc70), 23); /* 40 */ a = b + ROT_LEFT((a + H(b, c, d) + X[13] + 0x289b7ec6), 4); /* 41 */ d = a + ROT_LEFT((d + H(a, b, c) + X[0] + 0xeaa127fa), 11); /* 42 */ c = d + ROT_LEFT((c + H(d, a, b) + X[3] + 0xd4ef3085), 16); /* 43 */ b = c + ROT_LEFT((b + H(c, d, a) + X[6] + 0x04881d05), 23); /* 44 */ a = b + ROT_LEFT((a + H(b, c, d) + X[9] + 0xd9d4d039), 4); /* 45 */ d = a + ROT_LEFT((d + H(a, b, c) + X[12] + 0xe6db99e5), 11); /* 46 */ c = d + ROT_LEFT((c + H(d, a, b) + X[15] + 0x1fa27cf8), 16); /* 47 */ b = c + ROT_LEFT((b + H(c, d, a) + X[2] + 0xc4ac5665), 23); /* 48 */ /* round 4 */ a = b + ROT_LEFT((a + I(b, c, d) + X[0] + 0xf4292244), 6); /* 49 */ d = a + ROT_LEFT((d + I(a, b, c) + X[7] + 0x432aff97), 10); /* 50 */ c = d + ROT_LEFT((c + I(d, a, b) + X[14] + 0xab9423a7), 15); /* 51 */ b = c + ROT_LEFT((b + I(c, d, a) + X[5] + 0xfc93a039), 21); /* 52 */ a = b + ROT_LEFT((a + I(b, c, d) + X[12] + 0x655b59c3), 6); /* 53 */ d = a + ROT_LEFT((d + I(a, b, c) + X[3] + 0x8f0ccc92), 10); /* 54 */ c = d + ROT_LEFT((c + I(d, a, b) + X[10] + 0xffeff47d), 15); /* 55 */ b = c + ROT_LEFT((b + I(c, d, a) + X[1] + 0x85845dd1), 21); /* 56 */ a = b + ROT_LEFT((a + I(b, c, d) + X[8] + 0x6fa87e4f), 6); /* 57 */ d = a + ROT_LEFT((d + I(a, b, c) + X[15] + 0xfe2ce6e0), 10); /* 58 */ c = d + ROT_LEFT((c + I(d, a, b) + X[6] + 0xa3014314), 15); /* 59 */ b = c + ROT_LEFT((b + I(c, d, a) + X[13] + 0x4e0811a1), 21); /* 60 */ a = b + ROT_LEFT((a + I(b, c, d) + X[4] + 0xf7537e82), 6); /* 61 */ d = a + ROT_LEFT((d + I(a, b, c) + X[11] + 0xbd3af235), 10); /* 62 */ c = d + ROT_LEFT((c + I(d, a, b) + X[2] + 0x2ad7d2bb), 15); /* 63 */ b = c + ROT_LEFT((b + I(c, d, a) + X[9] + 0xeb86d391), 21); /* 64 */ state[0] += a; state[1] += b; state[2] += c; state[3] += d; } static int calculateDigestFromBuffer(uint8 *b, uint32 len, uint8 sum[16]) { register uint32 i, j, k, newI; uint32 l; uint8 *input; register uint32 *wbp; uint32 workBuff[16], state[4]; l = len; state[0] = 0x67452301; state[1] = 0xEFCDAB89; state[2] = 0x98BADCFE; state[3] = 0x10325476; if ((input = createPaddedCopyWithLength(b, &l)) == NULL) return 0; for (i = 0;;) { if ((newI = i + 16 * 4) > l) break; k = i + 3; for (j = 0; j < 16; j++) { wbp = (workBuff + j); *wbp = input[k--]; *wbp <<= 8; *wbp |= input[k--]; *wbp <<= 8; *wbp |= input[k--]; *wbp <<= 8; *wbp |= input[k]; k += 7; } doTheRounds(workBuff, state); i = newI; } free(input); j = 0; for (i = 0; i < 4; i++) { k = state[i]; sum[j++] = (k & 0xff); k >>= 8; sum[j++] = (k & 0xff); k >>= 8; sum[j++] = (k & 0xff); k >>= 8; sum[j++] = (k & 0xff); } return 1; } static void bytesToHex(uint8 b[16], char *s) { static char *hex = "0123456789abcdef"; int q, w; for (q = 0, w = 0; q < 16; q++) { s[w++] = hex[(b[q] >> 4) & 0x0F]; s[w++] = hex[b[q] & 0x0F]; } s[w] = '\0'; } /* * PUBLIC FUNCTIONS */ /* * md5_hash * * Calculates the MD5 sum of the bytes in a buffer. * * SYNOPSIS #include "crypt.h" * int md5_hash(const void *buff, size_t len, char *hexsum) * * INPUT buff the buffer containing the bytes that you want * the MD5 sum of. * len number of bytes in the buffer. * * OUTPUT hexsum the MD5 sum as a '\0'-terminated string of * hexadecimal digits. an MD5 sum is 16 bytes long. * each byte is represented by two heaxadecimal * characters. you thus need to provide an array * of 33 characters, including the trailing '\0'. * * RETURNS 0 on failure (out of memory for internal buffers) or * non-zero on success. * * STANDARDS MD5 is described in RFC 1321. * * AUTHOR Sverre H. Huseby * */ bool md5_hash(const void *buff, size_t len, char *hexsum) { uint8 sum[16]; if (!calculateDigestFromBuffer((uint8 *) buff, len, sum)) return false; bytesToHex(sum, hexsum); return true; } /* * Computes MD5 checksum of "passwd" (a null-terminated string) followed * by "salt" (which need not be null-terminated). * * Output format is "md5" followed by a 32-hex-digit MD5 checksum. * Hence, the output buffer "buf" must be at least 36 bytes long. * * Returns TRUE if okay, FALSE on error (out of memory). */ bool EncryptMD5(const char *passwd, const char *salt, size_t salt_len, char *buf) { size_t passwd_len = strlen(passwd); char *crypt_buf = palloc(passwd_len + salt_len); bool ret; /* * Place salt at the end because it may be known by users trying to * crack the MD5 output. */ strcpy(crypt_buf, passwd); memcpy(crypt_buf + passwd_len, salt, salt_len); strcpy(buf, "md5"); ret = md5_hash(crypt_buf, passwd_len + salt_len, buf + 3); pfree(crypt_buf); return ret; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/misc.c0100644000076400007640000001203110311277025016556 0ustar nicknick /* Module: misc.c * * Description: This module contains miscellaneous routines * such as for debugging/logging and string functions. * * Classes: n/a * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include #include #include #include "psqlodbc.h" #ifndef WIN32 #if HAVE_PWD_H #include #endif #include #include #else #include /* Byron: is this where Windows keeps def. of getpid ? */ #endif extern GLOBAL_VALUES globals; void generate_filename(char*,char*,char*); void generate_filename(char* dirname,char* prefix,char* filename) { int pid = 0; #ifndef WIN32 struct passwd *ptr = 0; ptr = getpwuid(getuid()); #endif pid = getpid(); if(dirname == 0 || filename == 0) return; strcpy(filename,dirname); strcat(filename,DIRSEPARATOR); if(prefix != 0) strcat(filename,prefix); #ifndef WIN32 strcat(filename,ptr->pw_name); #endif sprintf(filename,"%s%u%s",filename,pid,".log"); return; } #ifdef MY_LOG void mylog(char * fmt, ...) { va_list args; char filebuf[80]; FILE* LOGFP = globals.mylogFP; if ( globals.debug) { va_start(args, fmt); if (! LOGFP) { generate_filename(MYLOGDIR,MYLOGFILE,filebuf); LOGFP = fopen(filebuf, PG_BINARY_W); globals.mylogFP = LOGFP; setbuf(LOGFP, NULL); } if (LOGFP) vfprintf(LOGFP, fmt, args); va_end(args); } } #endif #ifdef Q_LOG void qlog(char * fmt, ...) { va_list args; char filebuf[80]; FILE* LOGFP = globals.qlogFP; if ( globals.commlog) { va_start(args, fmt); if (! LOGFP) { generate_filename(QLOGDIR,QLOGFILE,filebuf); LOGFP = fopen(filebuf, PG_BINARY_W); globals.qlogFP = LOGFP; setbuf(LOGFP, NULL); } if (LOGFP) vfprintf(LOGFP, fmt, args); va_end(args); } } #endif /* Undefine these because windows.h will redefine and cause a warning */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef WIN32 #undef va_start #undef va_end #endif #ifndef WIN32 #include "isql.h" #else #include #include #endif /* returns STRCPY_FAIL, STRCPY_TRUNCATED, or #bytes copied (not including null term) */ int my_strcpy(char *dst, int dst_len, char *src, int src_len) { if (dst_len <= 0) return STRCPY_FAIL; if (src_len == SQL_NULL_DATA) { dst[0] = '\0'; return STRCPY_NULL; } else if (src_len == SQL_NTS) src_len = strlen(src); if (src_len <= 0) return STRCPY_FAIL; else { if (src_len < dst_len) { memcpy(dst, src, src_len); dst[src_len] = '\0'; } else { memcpy(dst, src, dst_len-1); dst[dst_len-1] = '\0'; /* truncated */ return STRCPY_TRUNCATED; } } return strlen(dst); } /* strncpy copies up to len characters, and doesn't terminate */ /* the destination string if src has len characters or more. */ /* instead, I want it to copy up to len-1 characters and always */ /* terminate the destination string. */ char *strncpy_null(char *dst, const char *src, int len) { int i; if (NULL != dst) { /* Just in case, check for special lengths */ if (len == SQL_NULL_DATA) { dst[0] = '\0'; return NULL; } else if (len == SQL_NTS) len = strlen(src) + 1; for(i = 0; src[i] && i < len - 1; i++) { dst[i] = src[i]; } if(len > 0) { dst[i] = '\0'; } } return dst; } /* Create a null terminated string (handling the SQL_NTS thing): */ /* 1. If buf is supplied, place the string in there (assumes enough space) and return buf. */ /* 2. If buf is not supplied, malloc space and return this string */ char * make_string(char *s, int len, char *buf) { int length; char *str; if(s && (len > 0 || (len == SQL_NTS && strlen(s) > 0))) { length = (len > 0) ? len : strlen(s); if (buf) { strncpy_null(buf, s, length+1); return buf; } str = malloc(length + 1); if ( ! str) return NULL; strncpy_null(str, s, length+1); return str; } return NULL; } /* Return the length of a string (handling the SQL_NTS thing): */ int my_strlen(char *s, int len) { int length = 0; if(s && (len > 0 || (len == SQL_NTS && strlen(s) > 0))) { length = (len > 0) ? len : strlen(s); } return length; } /* Concatenate a single formatted argument to a given buffer handling the SQL_NTS thing. */ /* "fmt" must contain somewhere in it the single form '%.*s' */ /* This is heavily used in creating queries for info routines (SQLTables, SQLColumns). */ /* This routine could be modified to use vsprintf() to handle multiple arguments. */ char * my_strcat(char *buf, char *fmt, char *s, int len) { if (s && (len > 0 || (len == SQL_NTS && strlen(s) > 0))) { int length = (len > 0) ? len : strlen(s); int pos = strlen(buf); sprintf(&buf[pos], fmt, length, s); return buf; } return NULL; } void remove_newlines(char *string) { unsigned int i; size_t stlen=strlen(string); for(i=0; i < stlen; i++) { if((string[i] == '\n') || (string[i] == '\r')) { string[i] = ' '; } } } char * trim(char *s) { int i; for (i = strlen(s) - 1; i >= 0; i--) { if (s[i] == ' ') s[i] = '\0'; else break; } return s; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/options.c0100644000076400007640000003606110311277025017327 0ustar nicknick /* Module: options.c * * Description: This module contains routines for getting/setting * connection and statement options. * * Classes: n/a * * API functions: SQLSetConnectOption, SQLSetStmtOption, SQLGetConnectOption, * SQLGetStmtOption * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #include #ifndef WIN32 #include "isql.h" #include "isqlext.h" #else #include #include #include #endif #include "environ.h" #include "connection.h" #include "statement.h" #include "qresult.h" extern GLOBAL_VALUES globals; RETCODE set_statement_option(ConnectionClass *conn, StatementClass *stmt, UWORD fOption, UDWORD vParam); RETCODE set_statement_option(ConnectionClass *conn, StatementClass *stmt, UWORD fOption, UDWORD vParam) { static char* const func="set_statement_option"; char changed = FALSE; switch(fOption) { case SQL_ASYNC_ENABLE:/* ignored */ break; case SQL_BIND_TYPE: /* now support multi-column and multi-row binding */ if (conn) conn->stmtOptions.bind_size = vParam; if (stmt) stmt->options.bind_size = vParam; break; case SQL_CONCURRENCY: /* positioned update isn't supported so cursor concurrency is read-only */ if (conn) conn->stmtOptions.scroll_concurrency = vParam; if (stmt) stmt->options.scroll_concurrency = vParam; break; /* if (globals.lie) { if (conn) conn->stmtOptions.scroll_concurrency = vParam; if (stmt) stmt->options.scroll_concurrency = vParam; } else { if (conn) conn->stmtOptions.scroll_concurrency = SQL_CONCUR_READ_ONLY; if (stmt) stmt->options.scroll_concurrency = SQL_CONCUR_READ_ONLY; if (vParam != SQL_CONCUR_READ_ONLY) changed = TRUE; } break; */ case SQL_CURSOR_TYPE: /* if declare/fetch, then type can only be forward. otherwise, it can only be forward or static. */ mylog("SetStmtOption(): SQL_CURSOR_TYPE = %d\n", vParam); if (globals.lie) { if (conn) conn->stmtOptions.cursor_type = vParam; if (stmt) stmt->options.cursor_type = vParam; } else { if (globals.use_declarefetch) { if (conn) conn->stmtOptions.cursor_type = SQL_CURSOR_FORWARD_ONLY; if (stmt) stmt->options.cursor_type = SQL_CURSOR_FORWARD_ONLY; if (vParam != SQL_CURSOR_FORWARD_ONLY) changed = TRUE; } else { if (vParam == SQL_CURSOR_FORWARD_ONLY || vParam == SQL_CURSOR_STATIC) { if (conn) conn->stmtOptions.cursor_type = vParam; /* valid type */ if (stmt) stmt->options.cursor_type = vParam; /* valid type */ } else { if (conn) conn->stmtOptions.cursor_type = SQL_CURSOR_STATIC; if (stmt) stmt->options.cursor_type = SQL_CURSOR_STATIC; changed = TRUE; } } } break; case SQL_KEYSET_SIZE: /* ignored, but saved and returned */ mylog("SetStmtOption(): SQL_KEYSET_SIZE, vParam = %d\n", vParam); if (conn) conn->stmtOptions.keyset_size = vParam; if (stmt) stmt->options.keyset_size = vParam; break; /* if (globals.lie) stmt->keyset_size = vParam; else { SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Driver does not support keyset size option"); SC_log_error(func, "", stmt); return SQL_ERROR; } */ case SQL_MAX_LENGTH:/* ignored, but saved */ mylog("SetStmtOption(): SQL_MAX_LENGTH, vParam = %d\n", vParam); if (conn) conn->stmtOptions.maxLength = vParam; if (stmt) stmt->options.maxLength = vParam; break; case SQL_MAX_ROWS: /* ignored, but saved */ mylog("SetStmtOption(): SQL_MAX_ROWS, vParam = %d\n", vParam); if (conn) conn->stmtOptions.maxRows = vParam; if (stmt) stmt->options.maxRows = vParam; break; case SQL_NOSCAN: /* ignored */ mylog("SetStmtOption: SQL_NOSCAN, vParam = %d\n", vParam); break; case SQL_QUERY_TIMEOUT: /* ignored */ mylog("SetStmtOption: SQL_QUERY_TIMEOUT, vParam = %d\n", vParam); /* "0" returned in SQLGetStmtOption */ break; case SQL_RETRIEVE_DATA: /* ignored, but saved */ mylog("SetStmtOption(): SQL_RETRIEVE_DATA, vParam = %d\n", vParam); if (conn) conn->stmtOptions.retrieve_data = vParam; if (stmt) stmt->options.retrieve_data = vParam; break; case SQL_ROWSET_SIZE: mylog("SetStmtOption(): SQL_ROWSET_SIZE, vParam = %d\n", vParam); /* Save old rowset size for SQLExtendedFetch purposes If the rowset_size is being changed since the last call to fetch rows. */ if (stmt && stmt->save_rowset_size <= 0 && stmt->last_fetch_count > 0 ) stmt->save_rowset_size = stmt->options.rowset_size; if (vParam < 1) { vParam = 1; changed = TRUE; } if (conn) conn->stmtOptions.rowset_size = vParam; if (stmt) stmt->options.rowset_size = vParam; break; case SQL_SIMULATE_CURSOR: /* NOT SUPPORTED */ if (stmt) { SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Simulated positioned update/delete not supported. Use the cursor library."); SC_log_error(func, "", stmt); } if (conn) { CC_set_error(conn, STMT_NOT_IMPLEMENTED_ERROR, "Simulated positioned update/delete not supported. Use the cursor library."); CC_log_error(func, "", conn); } return SQL_ERROR; case SQL_USE_BOOKMARKS: if (stmt) stmt->options.use_bookmarks = vParam; if (conn) conn->stmtOptions.use_bookmarks = vParam; break; /* * added to be nice to OpenOffice */ case /*SQL_ATTR_CURSOR_SENSITIVITY*/ 65534: break; default: { char option[64]; if (stmt) { SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Unknown statement option (Set)"); sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam); SC_log_error(func, option, stmt); } if (conn) { CC_set_error(conn, STMT_NOT_IMPLEMENTED_ERROR, "Unknown statement option (Set)"); sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam); CC_log_error(func, option, conn); } return SQL_ERROR; } } if (changed) { if (stmt) { SC_set_error(stmt, STMT_OPTION_VALUE_CHANGED, "Requested value changed."); } if (conn) { CC_set_error(conn, STMT_OPTION_VALUE_CHANGED, "Requested value changed."); } return SQL_SUCCESS_WITH_INFO; } else return SQL_SUCCESS; } /* Implements only SQL_AUTOCOMMIT */ RETCODE SQL_API SQLSetConnectOption( HDBC hdbc, UWORD fOption, SQLULEN vParam) { static char* const func="SQLSetConnectOption"; ConnectionClass *conn = (ConnectionClass *) hdbc; char changed = FALSE; RETCODE retval; int i; mylog("%s: entering...\n", func); if ( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } switch (fOption) { /* Statement Options (apply to all stmts on the connection and become defaults for new stmts) */ case SQL_ASYNC_ENABLE: case SQL_BIND_TYPE: case SQL_CONCURRENCY: case SQL_CURSOR_TYPE: case SQL_KEYSET_SIZE: case SQL_MAX_LENGTH: case SQL_MAX_ROWS: case SQL_NOSCAN: case SQL_QUERY_TIMEOUT: case SQL_RETRIEVE_DATA: case SQL_ROWSET_SIZE: case SQL_SIMULATE_CURSOR: case SQL_USE_BOOKMARKS: /* Affect all current Statements */ for (i = 0; i < conn->num_stmts; i++) { if ( conn->stmts[i]) { set_statement_option(NULL, conn->stmts[i], fOption, vParam); } } /* Become the default for all future statements on this connection */ retval = set_statement_option(conn, NULL, fOption, vParam); if (retval == SQL_SUCCESS_WITH_INFO) changed = TRUE; else if (retval == SQL_ERROR) return SQL_ERROR; break; /**********************************/ /***** Connection Options *******/ /**********************************/ case SQL_ACCESS_MODE: /* ignored */ break; case SQL_AUTOCOMMIT: if (CC_is_in_trans(conn)) { CC_set_error(conn, CONN_TRANSACT_IN_PROGRES, "Cannot switch commit mode while a transaction is in progress"); CC_log_error(func, "", conn); return SQL_ERROR; } mylog("SQLSetConnectOption: AUTOCOMMIT: transact_status=%d, vparam=%d\n", conn->transact_status, vParam); switch(vParam) { case SQL_AUTOCOMMIT_OFF: CC_set_autocommit_off(conn); break; case SQL_AUTOCOMMIT_ON: CC_set_autocommit_on(conn); break; default: CC_set_error(conn, CONN_INVALID_ARGUMENT_NO, "Illegal parameter value for SQL_AUTOCOMMIT"); CC_log_error(func, "", conn); return SQL_ERROR; } break; case SQL_CURRENT_QUALIFIER: /* ignored */ break; case SQL_LOGIN_TIMEOUT: /* ignored */ break; case SQL_PACKET_SIZE: /* ignored */ break; case SQL_QUIET_MODE: /* ignored */ break; case SQL_TXN_ISOLATION: /* ignored */ break; /* These options should be handled by driver manager */ case SQL_ODBC_CURSORS: case SQL_OPT_TRACE: case SQL_OPT_TRACEFILE: case SQL_TRANSLATE_DLL: case SQL_TRANSLATE_OPTION: CC_log_error(func, "This connect option (Set) is only used by the Driver Manager", conn); break; default: { char option[64]; CC_set_error(conn, CONN_UNSUPPORTED_OPTION, "Unknown connect option (Set)"); sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam); CC_log_error(func, option, conn); return SQL_ERROR; } } if (changed) { CC_set_error(conn, CONN_OPTION_VALUE_CHANGED, "Requested value changed."); return SQL_SUCCESS_WITH_INFO; } else return SQL_SUCCESS; } /* - - - - - - - - - */ /* This function just can tell you whether you are in Autcommit mode or not */ RETCODE SQL_API SQLGetConnectOption( HDBC hdbc, UWORD fOption, PTR pvParam) { static char* const func="SQLGetConnectOption"; ConnectionClass *conn = (ConnectionClass *) hdbc; mylog("%s: entering...\n", func); if (! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } switch (fOption) { case SQL_ACCESS_MODE:/* NOT SUPPORTED */ *((UDWORD *) pvParam) = SQL_MODE_READ_WRITE; break; case SQL_AUTOCOMMIT: *((UDWORD *)pvParam) = (UDWORD)( CC_is_in_autocommit(conn) ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF); break; case SQL_CURRENT_QUALIFIER: /* don't use qualifiers */ if(pvParam) { ((char*)pvParam)[0]='\0'; } break; case SQL_LOGIN_TIMEOUT: /* NOT SUPPORTED */ *((UDWORD *) pvParam) = 0; break; case SQL_PACKET_SIZE: /* NOT SUPPORTED */ *((UDWORD *) pvParam) = globals.socket_buffersize; break; case SQL_QUIET_MODE:/* NOT SUPPORTED */ *((UDWORD *) pvParam) = (UDWORD) NULL; break; case SQL_TXN_ISOLATION:/* NOT SUPPORTED */ *((UDWORD *) pvParam) = SQL_TXN_SERIALIZABLE; break; /* These options should be handled by driver manager */ case SQL_ODBC_CURSORS: case SQL_OPT_TRACE: case SQL_OPT_TRACEFILE: case SQL_TRANSLATE_DLL: case SQL_TRANSLATE_OPTION: CC_log_error(func, "This connect option (Get) is only used by the Driver Manager", conn); break; default: { char option[64]; CC_set_error(conn, CONN_UNSUPPORTED_OPTION, "Unknown connect option (Get)"); sprintf(option, "fOption=%d", fOption); CC_log_error(func, option, conn); return SQL_ERROR; break; } } return SQL_SUCCESS; } /* - - - - - - - - - */ RETCODE SQL_API SQLSetStmtOption( HSTMT hstmt, UWORD fOption, SQLULEN vParam) { static char* const func="SQLSetStmtOption"; StatementClass *stmt = (StatementClass *) hstmt; mylog("%s: entering...\n", func); /* thought we could fake Access out by just returning SQL_SUCCESS */ /* all the time, but it tries to set a huge value for SQL_MAX_LENGTH */ /* and expects the driver to reduce it to the real value */ if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } return set_statement_option(NULL, stmt, fOption, vParam); } /* - - - - - - - - - */ RETCODE SQL_API SQLGetStmtOption( HSTMT hstmt, UWORD fOption, PTR pvParam) { static char* const func="SQLGetStmtOption"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; mylog("%s: entering...\n", func); /* thought we could fake Access out by just returning SQL_SUCCESS */ /* all the time, but it tries to set a huge value for SQL_MAX_LENGTH */ /* and expects the driver to reduce it to the real value */ if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } switch(fOption) { case SQL_GET_BOOKMARK: case SQL_ROW_NUMBER: res = stmt->result; if ( stmt->manual_result || ! globals.use_declarefetch) { /* make sure we're positioned on a valid row */ if((stmt->currTuple < 0) || (stmt->currTuple >= QR_get_num_tuples(res))) { SC_set_error(stmt, STMT_INVALID_CURSOR_STATE_ERROR, "Not positioned on a valid row."); SC_log_error(func, "", stmt); return SQL_ERROR; } } else { if (stmt->currTuple == -1 || ! res || ! res->tupleField) { SC_set_error(stmt, STMT_INVALID_CURSOR_STATE_ERROR, "Not positioned on a valid row."); SC_log_error(func, "", stmt); return SQL_ERROR; } } if (fOption == SQL_GET_BOOKMARK && stmt->options.use_bookmarks == SQL_UB_OFF) { SC_set_error(stmt, STMT_OPERATION_INVALID, "Operation invalid because use bookmarks not enabled."); SC_log_error(func, "", stmt); return SQL_ERROR; } *((UDWORD *) pvParam) = SC_get_bookmark(stmt); break; case SQL_ASYNC_ENABLE: /* NOT SUPPORTED */ *((SDWORD *) pvParam) = SQL_ASYNC_ENABLE_OFF; break; case SQL_BIND_TYPE: *((SDWORD *) pvParam) = stmt->options.bind_size; break; case SQL_CONCURRENCY: /* NOT REALLY SUPPORTED */ mylog("GetStmtOption(): SQL_CONCURRENCY\n"); *((SDWORD *)pvParam) = stmt->options.scroll_concurrency; break; case SQL_CURSOR_TYPE: /* PARTIAL SUPPORT */ mylog("GetStmtOption(): SQL_CURSOR_TYPE\n"); *((SDWORD *)pvParam) = stmt->options.cursor_type; break; case SQL_KEYSET_SIZE: /* NOT SUPPORTED, but saved */ mylog("GetStmtOption(): SQL_KEYSET_SIZE\n"); *((SDWORD *)pvParam) = stmt->options.keyset_size; break; case SQL_MAX_LENGTH: /* NOT SUPPORTED, but saved */ *((SDWORD *)pvParam) = stmt->options.maxLength; break; case SQL_MAX_ROWS: /* NOT SUPPORTED, but saved */ *((SDWORD *)pvParam) = stmt->options.maxRows; mylog("GetSmtOption: MAX_ROWS, returning %d\n", stmt->options.maxRows); break; case SQL_NOSCAN:/* NOT SUPPORTED */ *((SDWORD *) pvParam) = SQL_NOSCAN_ON; break; case SQL_QUERY_TIMEOUT: /* NOT SUPPORTED */ *((SDWORD *) pvParam) = 0; break; case SQL_RETRIEVE_DATA: /* NOT SUPPORTED, but saved */ *((SDWORD *) pvParam) = stmt->options.retrieve_data; break; case SQL_ROWSET_SIZE: *((SDWORD *) pvParam) = stmt->options.rowset_size; break; case SQL_SIMULATE_CURSOR:/* NOT SUPPORTED */ *((SDWORD *) pvParam) = SQL_SC_NON_UNIQUE; break; case SQL_USE_BOOKMARKS: *((SDWORD *) pvParam) = stmt->options.use_bookmarks; break; /* * added to be nice to StarOffice and OpenOffice */ case /*SQL_ATTR_CURSOR_SENSITIVITY*/ 65534: *((SDWORD *) pvParam) = /*SQL_UNSPECIFIED*/ 0; break; default: { char option[64]; SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Unknown statement option (Get)"); sprintf(option, "fOption=%d", fOption); SC_log_error(func, option, stmt); return SQL_ERROR; } } return SQL_SUCCESS; } /* - - - - - - - - - */ unixODBC-2.2.14-p2/Drivers/Postgre7.1/parse.c0100644000076400007640000004637510124241103016745 0ustar nicknick /* Module: parse.c * * Description: This module contains routines related to parsing SQL statements. * This can be useful for two reasons: * * 1. So the query does not actually have to be executed to return data about it * * 2. To be able to return information about precision, nullability, aliases, etc. * in the functions SQLDescribeCol and SQLColAttributes. Currently, Postgres * doesn't return any information about these things in a query. * * Classes: none * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include #include #include #include "statement.h" #include "connection.h" #include "qresult.h" #include "pgtypes.h" #ifndef WIN32 #ifndef HAVE_STRICMP #define stricmp(s1,s2) strcasecmp(s1,s2) #define strnicmp(s1,s2,n) strncasecmp(s1,s2,n) #endif #endif #define FLD_INCR 32 #define TAB_INCR 8 #define COL_INCR 16 char *getNextToken(char *s, char *token, int smax, char *delim, char *quote, char *dquote, char *numeric); void getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k); char searchColInfo(COL_INFO *col_info, FIELD_INFO *fi); char * getNextToken(char *s, char *token, int smax, char *delim, char *quote, char *dquote, char *numeric) { int i = 0; int out = 0; char qc, in_escape = FALSE; if (smax <= 1) return NULL; smax--; /* skip leading delimiters */ while (isspace((unsigned char) s[i]) || s[i] == ',') { /* mylog("skipping '%c'\n", s[i]); */ i++; } if (s[0] == '\0') { token[0] = '\0'; return NULL; } if (quote) *quote = FALSE; if (dquote) *dquote = FALSE; if (numeric) *numeric = FALSE; /* get the next token */ while ( ! isspace((unsigned char) s[i]) && s[i] != ',' && s[i] != '\0' && out != smax) { /* Handle quoted stuff */ if ( out == 0 && (s[i] == '\"' || s[i] == '\'')) { qc = s[i]; if (qc == '\"') { if (dquote) *dquote = TRUE; } if (qc == '\'') { if (quote) *quote = TRUE; } i++; /* dont return the quote */ while (s[i] != '\0' && out != smax) { if (s[i] == qc && ! in_escape) { break; } if (s[i] == '\\' && ! in_escape) { in_escape = TRUE; } else { in_escape = FALSE; token[out++] = s[i]; } i++; } if (s[i] == qc) i++; break; } /* Check for numeric literals */ if ( out == 0 && isdigit((unsigned char) s[i])) { if (numeric) *numeric = TRUE; token[out++] = s[i++]; while ( isalnum((unsigned char) s[i]) || s[i] == '.') token[out++] = s[i++]; break; } if ( ispunct((unsigned char) s[i]) && s[i] != '_') { mylog("got ispunct: s[%d] = '%c'\n", i, s[i]); if (out == 0) { token[out++] = s[i++]; break; } else break; } if (out != smax) token[out++] = s[i]; i++; } /* mylog("done -- s[%d] = '%c'\n", i, s[i]); */ token[out] = '\0'; /* find the delimiter */ while ( isspace((unsigned char) s[i])) i++; /* return the most priority delimiter */ if (s[i] == ',') { if (delim) *delim = s[i]; } else if (s[i] == '\0') { if (delim) *delim = '\0'; } else { if (delim) *delim = ' '; } /* skip trailing blanks */ while ( isspace((unsigned char) s[i])) { i++; } return &s[i]; } #if 0 QR_set_num_fields(stmt->result, 14); QR_set_field_info(stmt->result, 0, "TABLE_QUALIFIER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 1, "TABLE_OWNER", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 2, "TABLE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 3, "COLUMN_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 4, "DATA_TYPE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 5, "TYPE_NAME", PG_TYPE_TEXT, MAX_INFO_STRING); QR_set_field_info(stmt->result, 6, "PRECISION", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 7, "LENGTH", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 8, "SCALE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 9, "RADIX", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 10, "NULLABLE", PG_TYPE_INT2, 2); QR_set_field_info(stmt->result, 11, "REMARKS", PG_TYPE_TEXT, 254); /* User defined fields */ QR_set_field_info(stmt->result, 12, "DISPLAY_SIZE", PG_TYPE_INT4, 4); QR_set_field_info(stmt->result, 13, "FIELD_TYPE", PG_TYPE_INT4, 4); #endif void getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k) { if (fi->name[0] == '\0') strcpy(fi->name, QR_get_value_manual(col_info->result, k, 3)); fi->type = atoi( QR_get_value_manual(col_info->result, k, 13)); fi->precision = atoi( QR_get_value_manual(col_info->result, k, 6)); fi->length = atoi( QR_get_value_manual(col_info->result, k, 7)); fi->nullable = atoi( QR_get_value_manual(col_info->result, k, 10)); fi->display_size = atoi( QR_get_value_manual(col_info->result, k, 12)); } char searchColInfo(COL_INFO *col_info, FIELD_INFO *fi) { int k; char *col; for (k = 0; k < QR_get_num_tuples(col_info->result); k++) { col = QR_get_value_manual(col_info->result, k, 3); if ( ! strcmp(col, fi->name)) { getColInfo(col_info, fi, k); mylog("PARSE: searchColInfo: \n"); return TRUE; } } return FALSE; } char parse_statement(StatementClass *stmt) { static char* const func="parse_statement"; char token[256]; char delim, quote, dquote, numeric, unquoted; char *ptr; char in_select = FALSE, in_distinct = FALSE, in_on = FALSE, in_from = FALSE, in_where = FALSE, in_table = FALSE; char in_field = FALSE, in_expr = FALSE, in_func = FALSE, in_dot = FALSE, in_as = FALSE; int j, i, k = 0, n, blevel = 0; FIELD_INFO **fi; TABLE_INFO **ti; char parse; ConnectionClass *conn = stmt->hdbc; HSTMT hcol_stmt; StatementClass *col_stmt; RETCODE result; mylog("%s: entering...\n", func); ptr = stmt->statement; fi = stmt->fi; ti = stmt->ti; stmt->nfld = 0; stmt->ntab = 0; while ((ptr = getNextToken(ptr, token, sizeof(token), &delim, "e, &dquote, &numeric)) != NULL) { unquoted = ! ( quote || dquote ); mylog("unquoted=%d, quote=%d, dquote=%d, numeric=%d, delim='%c', token='%s', ptr='%s'\n", unquoted, quote, dquote, numeric, delim, token, ptr); if ( unquoted && ! stricmp(token, "select")) { in_select = TRUE; mylog("SELECT\n"); continue; } if ( unquoted && in_select && ! stricmp(token, "distinct")) { in_distinct = TRUE; mylog("DISTINCT\n"); continue; } if ( unquoted && ! stricmp(token, "into")) { in_select = FALSE; mylog("INTO\n"); continue; } if ( unquoted && ! stricmp(token, "from")) { in_select = FALSE; in_from = TRUE; mylog("FROM\n"); continue; } if ( unquoted && (! stricmp(token, "where") || ! stricmp(token, "union") || ! stricmp(token, "order") || ! stricmp(token, "group") || ! stricmp(token, "having"))) { in_select = FALSE; in_from = FALSE; in_where = TRUE; mylog("WHERE...\n"); break; } if (in_select) { if ( in_distinct) { mylog("in distinct\n"); if (unquoted && ! stricmp(token, "on")) { in_on = TRUE; mylog("got on\n"); continue; } if (in_on) { in_distinct = FALSE; in_on = FALSE; continue; /* just skip the unique on field */ } mylog("done distinct\n"); in_distinct = FALSE; } if ( in_expr || in_func) { /* just eat the expression */ mylog("in_expr=%d or func=%d\n", in_expr, in_func); if (quote || dquote) continue; if (in_expr && blevel == 0 && delim == ',') { mylog("**** in_expr and Got comma\n"); in_expr = FALSE; in_field = FALSE; } else if (token[0] == '(') { blevel++; mylog("blevel++ = %d\n", blevel); } else if (token[0] == ')') { blevel--; mylog("blevel-- = %d\n", blevel); if (delim==',') { in_func = FALSE; in_expr = FALSE; in_field = FALSE; } } continue; } if ( ! in_field) { if ( ! token[0]) continue; if ( ! (stmt->nfld % FLD_INCR)) { mylog("reallocing at nfld=%d\n", stmt->nfld); fi = (FIELD_INFO **) realloc(fi, (stmt->nfld + FLD_INCR) * sizeof(FIELD_INFO *)); if ( ! fi) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } stmt->fi = fi; } fi[stmt->nfld] = (FIELD_INFO *) malloc( sizeof(FIELD_INFO)); if (fi[stmt->nfld] == NULL) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } /* Initialize the field info */ memset(fi[stmt->nfld], 0, sizeof(FIELD_INFO)); /* double quotes are for qualifiers */ if (dquote) fi[stmt->nfld]->dquote = TRUE; if (quote) { fi[stmt->nfld++]->quote = TRUE; continue; } else if (numeric) { mylog("**** got numeric: nfld = %d\n", stmt->nfld); fi[stmt->nfld]->numeric = TRUE; } else if (token[0] == '(') { /* expression */ mylog("got EXPRESSION\n"); fi[stmt->nfld++]->expr = TRUE; in_expr = TRUE; blevel = 1; continue; } else { strcpy(fi[stmt->nfld]->name, token); fi[stmt->nfld]->dot[0] = '\0'; } mylog("got field='%s', dot='%s'\n", fi[stmt->nfld]->name, fi[stmt->nfld]->dot); if (delim == ',') { mylog("comma (1)\n"); } else { in_field = TRUE; } stmt->nfld++; continue; } /**************************/ /* We are in a field now */ /**************************/ if (in_dot) { stmt->nfld--; strcpy(fi[stmt->nfld]->dot, fi[stmt->nfld]->name); strcpy(fi[stmt->nfld]->name, token); stmt->nfld++; in_dot = FALSE; if (delim == ',') { mylog("in_dot: got comma\n"); in_field = FALSE; } continue; } if (in_as) { stmt->nfld--; strcpy(fi[stmt->nfld]->alias, token); mylog("alias for field '%s' is '%s'\n", fi[stmt->nfld]->name, fi[stmt->nfld]->alias); in_as = FALSE; in_field = FALSE; stmt->nfld++; if (delim == ',') { mylog("comma(2)\n"); } continue; } /* Function */ if (token[0] == '(') { in_func = TRUE; blevel = 1; fi[stmt->nfld-1]->func = TRUE; /* name will have the function name -- maybe useful some day */ mylog("**** got function = '%s'\n", fi[stmt->nfld-1]->name); continue; } if (token[0] == '.') { in_dot = TRUE; mylog("got dot\n"); continue; } if ( ! stricmp(token, "as")) { in_as = TRUE; mylog("got AS\n"); continue; } /* otherwise, it's probably an expression */ in_expr = TRUE; fi[stmt->nfld-1]->expr = TRUE; fi[stmt->nfld-1]->name[0] = '\0'; mylog("*** setting expression\n"); } if (in_from) { if ( ! in_table) { if ( ! token[0]) continue; if ( ! (stmt->ntab % TAB_INCR)) { ti = (TABLE_INFO **) realloc(ti, (stmt->ntab + TAB_INCR) * sizeof(TABLE_INFO *)); if ( ! ti) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } stmt->ti = ti; } ti[stmt->ntab] = (TABLE_INFO *) malloc(sizeof(TABLE_INFO)); if (ti[stmt->ntab] == NULL) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } ti[stmt->ntab]->alias[0] = '\0'; strcpy(ti[stmt->ntab]->name, token); mylog("got table = '%s'\n", ti[stmt->ntab]->name); if (delim == ',') { mylog("more than 1 tables\n"); } else { in_table = TRUE; } stmt->ntab++; continue; } strcpy(ti[stmt->ntab-1]->alias, token); mylog("alias for table '%s' is '%s'\n", ti[stmt->ntab-1]->name, ti[stmt->ntab-1]->alias); in_table = FALSE; if (delim == ',') { mylog("more than 1 tables\n"); } } } /*************************************************/ /* Resolve any possible field names with tables */ /*************************************************/ parse = TRUE; /* Resolve field names with tables */ for (i = 0; i < stmt->nfld; i++) { if (fi[i]->func || fi[i]->expr || fi[i]->numeric) { fi[i]->ti = NULL; fi[i]->type = -1; parse = FALSE; continue; } else if (fi[i]->quote) { /* handle as text */ fi[i]->ti = NULL; fi[i]->type = PG_TYPE_TEXT; fi[i]->precision = 0; continue; } /* it's a dot, resolve to table or alias */ else if (fi[i]->dot[0]) { for (k = 0; k < stmt->ntab; k++) { if ( ! stricmp(ti[k]->name, fi[i]->dot)) { fi[i]->ti = ti[k]; break; } else if ( ! stricmp(ti[k]->alias, fi[i]->dot)) { fi[i]->ti = ti[k]; break; } } } else if (stmt->ntab == 1) fi[i]->ti = ti[0]; } mylog("--------------------------------------------\n"); mylog("nfld=%d, ntab=%d\n", stmt->nfld, stmt->ntab); for (i=0; i < stmt->nfld; i++) { mylog("Field %d: expr=%d, func=%d, quote=%d, dquote=%d, numeric=%d, name='%s', alias='%s', dot='%s'\n", i, fi[i]->expr, fi[i]->func, fi[i]->quote, fi[i]->dquote, fi[i]->numeric, fi[i]->name, fi[i]->alias, fi[i]->dot); if (fi[i]->ti) mylog(" ----> table_name='%s', table_alias='%s'\n", fi[i]->ti->name, fi[i]->ti->alias); } for (i=0; i < stmt->ntab; i++) { mylog("Table %d: name='%s', alias='%s'\n", i, ti[i]->name, ti[i]->alias); } /******************************************************/ /* Now save the SQLColumns Info for the parse tables */ /******************************************************/ /* Call SQLColumns for each table and store the result */ for (i = 0; i < stmt->ntab; i++) { /* See if already got it */ char found = FALSE; for (k = 0; k < conn->ntables; k++) { if ( ! stricmp(conn->col_info[k]->name, ti[i]->name)) { mylog("FOUND col_info table='%s'\n", ti[i]->name); found = TRUE; break; } } if ( ! found) { mylog("PARSE: Getting SQLColumns for table[%d]='%s'\n", i, ti[i]->name); result = PG_SQLAllocStmt( stmt->hdbc, &hcol_stmt); if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) { SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "SQLAllocStmt failed in parse_statement for columns."); stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } col_stmt = (StatementClass *) hcol_stmt; col_stmt->internal = TRUE; result = PG_SQLColumns(hcol_stmt, "", 0, "", 0, ti[i]->name, (SWORD) strlen(ti[i]->name), "", 0); mylog(" Past SQLColumns\n"); if (result == SQL_SUCCESS) { mylog(" Success\n"); if ( ! (conn->ntables % COL_INCR)) { mylog("PARSE: Allocing col_info at ntables=%d\n", conn->ntables); conn->col_info = (COL_INFO **) realloc(conn->col_info, (conn->ntables + COL_INCR) * sizeof(COL_INFO *)); if ( ! conn->col_info) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } } mylog("PARSE: malloc at conn->col_info[%d]\n", conn->ntables); conn->col_info[conn->ntables] = (COL_INFO *) malloc(sizeof(COL_INFO)); if ( ! conn->col_info[conn->ntables]) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } /* Store the table name and the SQLColumns result structure */ strcpy(conn->col_info[conn->ntables]->name, ti[i]->name); conn->col_info[conn->ntables]->result = col_stmt->result; /* The connection will now free the result structures, so make sure that the statement doesn't free it */ col_stmt->result = NULL; conn->ntables++; PG_SQLFreeStmt(hcol_stmt, SQL_DROP); mylog("Created col_info table='%s', ntables=%d\n", ti[i]->name, conn->ntables); } else { PG_SQLFreeStmt(hcol_stmt, SQL_DROP); break; } } /* Associate a table from the statement with a SQLColumn info */ ti[i]->col_info = conn->col_info[k]; mylog("associate col_info: i=%d, k=%d\n", i, k); } mylog("Done SQLColumns\n"); /******************************************************/ /* Now resolve the fields to point to column info */ /******************************************************/ for (i = 0; i < stmt->nfld;) { /* Dont worry about functions or quotes */ if (fi[i]->func || fi[i]->quote || fi[i]->numeric) { i++; continue; } /* Stars get expanded to all fields in the table */ else if (fi[i]->name[0] == '*') { char do_all_tables; int total_cols, old_alloc, new_size, cols; int increased_cols; mylog("expanding field %d\n", i); total_cols = 0; if (fi[i]->ti) /* The star represents only the qualified table */ total_cols = QR_get_num_tuples(fi[i]->ti->col_info->result); else { /* The star represents all tables */ /* Calculate the total number of columns after expansion */ for (k = 0; k < stmt->ntab; k++) { total_cols += QR_get_num_tuples(ti[k]->col_info->result); } } increased_cols = total_cols - 1; /* Allocate some more field pointers if necessary */ /*------------------------------------------------------------- */ old_alloc = ((stmt->nfld - 1) / FLD_INCR + 1) * FLD_INCR; new_size = stmt->nfld + increased_cols; mylog("k=%d, increased_cols=%d, old_alloc=%d, new_size=%d\n", k,increased_cols,old_alloc,new_size); if (new_size > old_alloc) { int new_alloc = ((new_size / FLD_INCR) + 1) * FLD_INCR; mylog("need more cols: new_alloc = %d\n", new_alloc); fi = (FIELD_INFO **) realloc(fi, new_alloc * sizeof(FIELD_INFO *)); if ( ! fi) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } stmt->fi = fi; } /*------------------------------------------------------------- */ /* copy any other fields (if there are any) up past the expansion */ for (j = stmt->nfld - 1; j > i; j--) { mylog("copying field %d to %d\n", j, increased_cols + j); fi[increased_cols + j] = fi[j]; } mylog("done copying fields\n"); /*------------------------------------------------------------- */ /* Set the new number of fields */ stmt->nfld += increased_cols; mylog("stmt->nfld now at %d\n", stmt->nfld); /*------------------------------------------------------------- */ /* copy the new field info */ do_all_tables = (fi[i]->ti ? FALSE : TRUE); for (k = 0; k < (do_all_tables ? stmt->ntab : 1); k++) { TABLE_INFO *the_ti = do_all_tables ? ti[k] : fi[i]->ti; cols = QR_get_num_tuples(the_ti->col_info->result); for (n = 0; n < cols; n++) { mylog("creating field info: n=%d\n", n); /* skip malloc (already did it for the Star) */ if (k > 0 || n > 0) { mylog("allocating field info at %d\n", n + i); fi[n + i] = (FIELD_INFO *) malloc( sizeof(FIELD_INFO)); if (fi[n + i] == NULL) { stmt->parse_status = STMT_PARSE_FATAL; return FALSE; } } /* Initialize the new space (or the * field) */ memset(fi[n + i], 0, sizeof(FIELD_INFO)); fi[n + i]->ti = the_ti; mylog("about to copy at %d\n", n + i); getColInfo(the_ti->col_info, fi[n + i], n); mylog("done copying\n"); } i += cols; mylog("i now at %d\n", i); } /*------------------------------------------------------------- */ } /* We either know which table the field was in because it was qualified with a table name or alias -OR- there was only 1 table. */ else if (fi[i]->ti) { if ( ! searchColInfo(fi[i]->ti->col_info, fi[i])) parse = FALSE; i++; } /* Don't know the table -- search all tables in "from" list */ else { parse = FALSE; for (k = 0; k < stmt->ntab; k++) { if ( searchColInfo(ti[k]->col_info, fi[i])) { fi[i]->ti = ti[k]; /* now know the table */ parse = TRUE; break; } } i++; } } if ( ! parse) stmt->parse_status = STMT_PARSE_INCOMPLETE; else stmt->parse_status = STMT_PARSE_COMPLETE; mylog("done parse_statement: parse=%d, parse_status=%d\n", parse, stmt->parse_status); return parse; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/pgtypes.c0100644000076400007640000004404610532570543017337 0ustar nicknick /* Module: pgtypes.c * * Description: This module contains routines for getting information * about the supported Postgres data types. Only the function * pgtype_to_sqltype() returns an unknown condition. All other * functions return a suitable default so that even data types that * are not directly supported can be used (it is handled as char data). * * Classes: n/a * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #include "dlg_specific.h" #include "pgtypes.h" #include "statement.h" #include "connection.h" #include "qresult.h" #ifndef WIN32 #include "isql.h" #include "isqlext.h" #else #include #include #include #endif extern GLOBAL_VALUES globals; Int4 getCharPrecision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as); /* these are the types we support. all of the pgtype_ functions should */ /* return values for each one of these. */ /* Even types not directly supported are handled as character types so all types should work (points, etc.) */ /* ALL THESE TYPES ARE NO LONGER REPORTED in SQLGetTypeInfo. Instead, all the SQL TYPES are reported and mapped to a corresponding Postgres Type */ /* Int4 pgtypes_defined[] = { PG_TYPE_CHAR, PG_TYPE_CHAR2, PG_TYPE_CHAR4, PG_TYPE_CHAR8, PG_TYPE_CHAR16, PG_TYPE_NAME, PG_TYPE_VARCHAR, PG_TYPE_BPCHAR, PG_TYPE_DATE, PG_TYPE_TIME, PG_TYPE_DATETIME, PG_TYPE_ABSTIME, PG_TYPE_TIMESTAMP, PG_TYPE_TEXT, PG_TYPE_INT2, PG_TYPE_INT4, PG_TYPE_FLOAT4, PG_TYPE_FLOAT8, PG_TYPE_OID, PG_TYPE_MONEY, PG_TYPE_BOOL, PG_TYPE_BYTEA, PG_TYPE_LO, 0 }; */ /* These are NOW the SQL Types reported in SQLGetTypeInfo. */ Int2 sqlTypes [] = { SQL_BIGINT, /* SQL_BINARY, -- Commented out because VarBinary is more correct. */ SQL_BIT, SQL_CHAR, SQL_DATE, SQL_DECIMAL, SQL_DOUBLE, SQL_FLOAT, SQL_INTEGER, SQL_LONGVARBINARY, SQL_LONGVARCHAR, SQL_NUMERIC, SQL_REAL, SQL_SMALLINT, SQL_TIME, SQL_TIMESTAMP, SQL_TINYINT, SQL_VARBINARY, SQL_VARCHAR, 0 }; Int4 sqltype_to_pgtype(SWORD fSqlType) { Int4 pgType; switch(fSqlType) { case SQL_BINARY: pgType = PG_TYPE_BYTEA; break; case SQL_CHAR: pgType = PG_TYPE_BPCHAR; break; case SQL_BIT: pgType = globals.bools_as_char ? PG_TYPE_CHAR : PG_TYPE_BOOL; break; case SQL_DATE: pgType = PG_TYPE_DATE; break; case SQL_DOUBLE: case SQL_FLOAT: pgType = PG_TYPE_FLOAT8; break; case SQL_DECIMAL: case SQL_NUMERIC: pgType = PG_TYPE_NUMERIC; break; case SQL_BIGINT: pgType = PG_TYPE_INT8; break; case SQL_INTEGER: pgType = PG_TYPE_INT4; break; case SQL_LONGVARBINARY: pgType = PG_TYPE_LO; break; case SQL_LONGVARCHAR: pgType = globals.text_as_longvarchar ? PG_TYPE_TEXT : PG_TYPE_VARCHAR; break; case SQL_REAL: pgType = PG_TYPE_FLOAT4; break; case SQL_SMALLINT: case SQL_TINYINT: pgType = PG_TYPE_INT2; break; case SQL_TIME: pgType = PG_TYPE_TIME; break; case SQL_TIMESTAMP: pgType = PG_TYPE_DATETIME; break; case SQL_VARBINARY: pgType = PG_TYPE_BYTEA; break; case SQL_VARCHAR: pgType = PG_TYPE_VARCHAR; break; default: pgType = 0; /* ??? */ break; } return pgType; } /* There are two ways of calling this function: 1. When going through the supported PG types (SQLGetTypeInfo) 2. When taking any type id (SQLColumns, SQLGetData) The first type will always work because all the types defined are returned here. The second type will return a default based on global parameter when it does not know. This allows for supporting types that are unknown. All other pg routines in here return a suitable default. */ Int2 pgtype_to_sqltype(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_CHAR: case PG_TYPE_CHAR2: case PG_TYPE_CHAR4: case PG_TYPE_CHAR8: case PG_TYPE_NAME: return SQL_CHAR; case PG_TYPE_BPCHAR: return SQL_CHAR; case PG_TYPE_VARCHAR: return SQL_VARCHAR; case PG_TYPE_TEXT: return globals.text_as_longvarchar ? SQL_LONGVARCHAR : SQL_VARCHAR; case PG_TYPE_BYTEA: return SQL_VARBINARY; case PG_TYPE_LO: return SQL_LONGVARBINARY; case PG_TYPE_INT2: return SQL_SMALLINT; case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: return SQL_INTEGER; /* Change this to SQL_BIGINT for ODBC v3 bjm 2001-01-23 */ #ifdef HAVE_LONG_LONG case PG_TYPE_INT8: return SQL_BIGINT; #else case PG_TYPE_INT8: return SQL_INTEGER; #endif case PG_TYPE_NUMERIC: return SQL_NUMERIC; case PG_TYPE_FLOAT4: return SQL_REAL; case PG_TYPE_FLOAT8: return SQL_FLOAT; case PG_TYPE_DATE: return SQL_DATE; case PG_TYPE_TIME: return SQL_TIME; case PG_TYPE_ABSTIME: case PG_TYPE_DATETIME: case PG_TYPE_TIMESTAMP_NO_TMZONE: case PG_TYPE_TIMESTAMP: return SQL_TIMESTAMP; case PG_TYPE_MONEY: return SQL_FLOAT; case PG_TYPE_BOOL: return globals.bools_as_char ? SQL_CHAR : SQL_BIT; default: /* first, check to see if 'type' is in list. If not, look up with query. Add oid, name to list. If it's already in list, just return. */ if (type == stmt->hdbc->lobj_type) /* hack until permanent type is available */ return SQL_LONGVARBINARY; return globals.unknowns_as_longvarchar ? SQL_LONGVARCHAR : SQL_VARCHAR; } } Int2 pgtype_to_ctype(StatementClass *stmt, Int4 type) { switch(type) { #ifdef HAVE_LONG_LONG case PG_TYPE_INT8: return SQL_BIGINT; #else case PG_TYPE_INT8: return SQL_INTEGER; #endif case PG_TYPE_NUMERIC: return SQL_C_CHAR; case PG_TYPE_INT2: return SQL_C_SSHORT; case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: return SQL_C_SLONG; case PG_TYPE_FLOAT4: return SQL_C_FLOAT; case PG_TYPE_FLOAT8: return SQL_C_DOUBLE; case PG_TYPE_DATE: return SQL_C_DATE; case PG_TYPE_TIME: return SQL_C_TIME; case PG_TYPE_ABSTIME: case PG_TYPE_DATETIME: case PG_TYPE_TIMESTAMP_NO_TMZONE: case PG_TYPE_TIMESTAMP: return SQL_C_TIMESTAMP; case PG_TYPE_MONEY: return SQL_C_FLOAT; case PG_TYPE_BOOL: return globals.bools_as_char ? SQL_C_CHAR : SQL_C_BIT; case PG_TYPE_BYTEA: return SQL_C_BINARY; case PG_TYPE_LO: return SQL_C_BINARY; default: if (type == stmt->hdbc->lobj_type) /* hack until permanent type is available */ return SQL_C_BINARY; return SQL_C_CHAR; } } char *pgtype_to_name(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_CHAR: return "char"; case PG_TYPE_CHAR2: return "char2"; case PG_TYPE_CHAR4: return "char4"; case PG_TYPE_CHAR8: return "char8"; case PG_TYPE_INT8: return "int8"; case PG_TYPE_NUMERIC: return "numeric"; case PG_TYPE_VARCHAR: return "varchar"; case PG_TYPE_BPCHAR: return "char"; case PG_TYPE_TEXT: return "text"; case PG_TYPE_NAME: return "name"; case PG_TYPE_INT2: return "int2"; case PG_TYPE_OID: return "oid"; case PG_TYPE_INT4: return "int4"; case PG_TYPE_FLOAT4: return "float4"; case PG_TYPE_FLOAT8: return "float8"; case PG_TYPE_DATE: return "date"; case PG_TYPE_TIME: return "time"; case PG_TYPE_ABSTIME: return "abstime"; case PG_TYPE_DATETIME: return "datetime"; case PG_TYPE_TIMESTAMP: return "timestamp"; case PG_TYPE_MONEY: return "money"; case PG_TYPE_BOOL: return "bool"; case PG_TYPE_BYTEA: return "bytea"; case PG_TYPE_LO: return PG_TYPE_LO_NAME; default: if (type == stmt->hdbc->lobj_type) /* hack until permanent type is available */ return PG_TYPE_LO_NAME; /* "unknown" can actually be used in alter table because it is a real PG type! */ return "unknown"; } } static Int2 getNumericScale(StatementClass *stmt, Int4 type, int col) { Int4 atttypmod; QResultClass *result; ColumnInfoClass *flds; mylog("getNumericScale: type=%d, col=%d, unknown = %d\n", type,col); if (col < 0) return PG_NUMERIC_MAX_SCALE; result = SC_get_Result(stmt); /* Manual Result Sets -- use assigned column width (i.e., from set_tuplefield_string) */ if (stmt->manual_result) { flds = result->fields; if (flds) return flds->adtsize[col]; else return PG_NUMERIC_MAX_SCALE; } atttypmod = QR_get_atttypmod(result, col); if ( atttypmod > -1 ) return (atttypmod & 0xffff); else return ( QR_get_display_size(result, col) ? QR_get_display_size(result, col) : PG_NUMERIC_MAX_SCALE); } static Int4 getNumericPrecision(StatementClass *stmt, Int4 type, int col) { Int4 atttypmod; QResultClass *result; ColumnInfoClass *flds; mylog("getNumericPrecision: type=%d, col=%d, unknown = %d\n", type,col); if (col < 0) return PG_NUMERIC_MAX_PRECISION; result = SC_get_Result(stmt); /* Manual Result Sets -- use assigned column width (i.e., from set_tuplefield_string) */ if (stmt->manual_result) { flds = result->fields; if (flds) return flds->adtsize[col]; else return PG_NUMERIC_MAX_PRECISION; } atttypmod = QR_get_atttypmod(result, col); if ( atttypmod > -1 ) return (atttypmod >> 16) & 0xffff; else return ( QR_get_display_size(result, col) >= 0 ? QR_get_display_size(result, col) : PG_NUMERIC_MAX_PRECISION ); } Int4 getCharPrecision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as) { int p = -1, maxsize; QResultClass *result; ColumnInfoClass *flds; mylog("getCharPrecision: type=%d, col=%d, unknown = %d\n", type,col,handle_unknown_size_as); /* Assign Maximum size based on parameters */ switch(type) { case PG_TYPE_TEXT: if (globals.text_as_longvarchar) maxsize = globals.max_longvarchar_size; else maxsize = globals.max_varchar_size; break; case PG_TYPE_VARCHAR: case PG_TYPE_BPCHAR: maxsize = globals.max_varchar_size; break; default: if (globals.unknowns_as_longvarchar) maxsize = globals.max_longvarchar_size; else maxsize = globals.max_varchar_size; break; } /* Static Precision (i.e., the Maximum Precision of the datatype) This has nothing to do with a result set. */ if (col < 0) return maxsize; result = SC_get_Result(stmt); /* Manual Result Sets -- use assigned column width (i.e., from set_tuplefield_string) */ if (stmt->manual_result) { flds = result->fields; if (flds) return flds->adtsize[col]; else return maxsize; } /* Size is unknown -- handle according to parameter */ if (QR_get_atttypmod(result, col) > -1) return QR_get_atttypmod(result, col); if (type == PG_TYPE_BPCHAR || handle_unknown_size_as == UNKNOWNS_AS_LONGEST) { p = QR_get_display_size(result, col); mylog("getCharPrecision: LONGEST: p = %d\n", p); } if (p < 0 && handle_unknown_size_as == UNKNOWNS_AS_MAX) return maxsize; else return p; } /* For PG_TYPE_VARCHAR, PG_TYPE_BPCHAR, PG_TYPE_NUMERIC, SQLColumns will override this length with the atttypmod length from pg_attribute . If col >= 0, then will attempt to get the info from the result set. This is used for functions SQLDescribeCol and SQLColAttributes. */ Int4 pgtype_precision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as) { switch(type) { case PG_TYPE_CHAR: return 1; case PG_TYPE_CHAR2: return 2; case PG_TYPE_CHAR4: return 4; case PG_TYPE_CHAR8: return 8; case PG_TYPE_NAME: return NAME_FIELD_SIZE; case PG_TYPE_INT2: return 5; case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: return 10; case PG_TYPE_INT8: return 19; /* signed */ case PG_TYPE_NUMERIC: return getNumericPrecision(stmt,type,col); case PG_TYPE_FLOAT4: case PG_TYPE_MONEY: return 7; case PG_TYPE_FLOAT8: return 15; case PG_TYPE_DATE: return 10; case PG_TYPE_TIME: return 8; case PG_TYPE_ABSTIME: case PG_TYPE_DATETIME: case PG_TYPE_TIMESTAMP: return 19; case PG_TYPE_BOOL: return 1; case PG_TYPE_LO: return SQL_NO_TOTAL; default: if (type == stmt->hdbc->lobj_type) /* hack until permanent type is available */ return SQL_NO_TOTAL; /* Handle Character types and unknown types */ return getCharPrecision(stmt, type, col, handle_unknown_size_as); } } Int4 pgtype_display_size(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as) { switch(type) { case PG_TYPE_INT2: return 6; case PG_TYPE_OID: case PG_TYPE_XID: return 10; case PG_TYPE_INT4: return 11; case PG_TYPE_INT8: return 20; /* signed: 19 digits + sign */ case PG_TYPE_NUMERIC: return getNumericPrecision(stmt,type,col) + 2; case PG_TYPE_MONEY: return 15; /* ($9,999,999.99) */ case PG_TYPE_FLOAT4: return 13; case PG_TYPE_FLOAT8: return 22; /* Character types use regular precision */ default: return pgtype_precision(stmt, type, col, handle_unknown_size_as); } } /* For PG_TYPE_VARCHAR, PG_TYPE_BPCHAR, SQLColumns will override this length with the atttypmod length from pg_attribute */ Int4 pgtype_length(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as) { switch(type) { case PG_TYPE_INT2: return 2; case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: return 4; case PG_TYPE_INT8: return 20; /* signed: 19 digits + sign */ case PG_TYPE_NUMERIC: return getNumericPrecision(stmt,type,col) + 2; case PG_TYPE_FLOAT4: case PG_TYPE_MONEY: return 4; case PG_TYPE_FLOAT8: return 8; case PG_TYPE_DATE: case PG_TYPE_TIME: return 6; case PG_TYPE_ABSTIME: case PG_TYPE_DATETIME: case PG_TYPE_TIMESTAMP: return 16; /* Character types (and NUMERIC) use the default precision */ default: return pgtype_precision(stmt, type, col, handle_unknown_size_as); } } Int2 pgtype_scale(StatementClass *stmt, Int4 type, int col) { switch(type) { case PG_TYPE_INT2: case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: case PG_TYPE_INT8: case PG_TYPE_FLOAT4: case PG_TYPE_FLOAT8: case PG_TYPE_MONEY: case PG_TYPE_BOOL: /* Number of digits to the right of the decimal point in "yyyy-mm=dd hh:mm:ss[.f...]" */ case PG_TYPE_ABSTIME: case PG_TYPE_DATETIME: case PG_TYPE_TIMESTAMP: return 0; case PG_TYPE_NUMERIC: return getNumericScale(stmt,type,col); default: return -1; } } Int2 pgtype_radix(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_INT2: case PG_TYPE_OID: case PG_TYPE_INT4: case PG_TYPE_INT8: case PG_TYPE_NUMERIC: case PG_TYPE_FLOAT4: case PG_TYPE_MONEY: case PG_TYPE_FLOAT8: return 10; default: return -1; } } Int2 pgtype_nullable(StatementClass *stmt, Int4 type) { return SQL_NULLABLE; /* everything should be nullable */ } Int2 pgtype_auto_increment(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_INT2: case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: case PG_TYPE_FLOAT4: case PG_TYPE_MONEY: case PG_TYPE_BOOL: case PG_TYPE_FLOAT8: case PG_TYPE_INT8: case PG_TYPE_NUMERIC: case PG_TYPE_DATE: case PG_TYPE_TIME: case PG_TYPE_ABSTIME: case PG_TYPE_DATETIME: case PG_TYPE_TIMESTAMP: return FALSE; default: return -1; } } Int2 pgtype_case_sensitive(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_CHAR: case PG_TYPE_CHAR2: case PG_TYPE_CHAR4: case PG_TYPE_CHAR8: case PG_TYPE_VARCHAR: case PG_TYPE_BPCHAR: case PG_TYPE_TEXT: case PG_TYPE_NAME: return TRUE; default: return FALSE; } } Int2 pgtype_money(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_MONEY: return TRUE; default: return FALSE; } } Int2 pgtype_searchable(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_CHAR: case PG_TYPE_CHAR2: case PG_TYPE_CHAR4: case PG_TYPE_CHAR8: case PG_TYPE_VARCHAR: case PG_TYPE_BPCHAR: case PG_TYPE_TEXT: case PG_TYPE_NAME: return SQL_SEARCHABLE; default: return SQL_ALL_EXCEPT_LIKE; } } Int2 pgtype_unsigned(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_OID: case PG_TYPE_XID: return TRUE; case PG_TYPE_INT2: case PG_TYPE_INT4: case PG_TYPE_INT8: case PG_TYPE_NUMERIC: case PG_TYPE_FLOAT4: case PG_TYPE_FLOAT8: case PG_TYPE_MONEY: return FALSE; default: return -1; } } char *pgtype_literal_prefix(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_INT2: case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: case PG_TYPE_INT8: case PG_TYPE_NUMERIC: case PG_TYPE_FLOAT4: case PG_TYPE_FLOAT8: case PG_TYPE_MONEY: return NULL; default: return "'"; } } char *pgtype_literal_suffix(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_INT2: case PG_TYPE_OID: case PG_TYPE_XID: case PG_TYPE_INT4: case PG_TYPE_INT8: case PG_TYPE_NUMERIC: case PG_TYPE_FLOAT4: case PG_TYPE_FLOAT8: case PG_TYPE_MONEY: return NULL; default: return "'"; } } char *pgtype_create_params(StatementClass *stmt, Int4 type) { switch(type) { case PG_TYPE_BPCHAR: case PG_TYPE_CHAR: case PG_TYPE_VARCHAR: return "max. length"; case PG_TYPE_NUMERIC: return "precision, scale"; default: return NULL; } } Int2 sqltype_to_default_ctype(Int2 sqltype) { /* from the table on page 623 of ODBC 2.0 Programmer's Reference */ /* (Appendix D) */ switch(sqltype) { case SQL_CHAR: case SQL_VARCHAR: case SQL_LONGVARCHAR: case SQL_DECIMAL: case SQL_NUMERIC: #ifndef HAVE_LONG_LONG case SQL_BIGINT: #endif return SQL_C_CHAR; #ifdef HAVE_LONG_LONG case SQL_BIGINT: return SQL_BIGINT; #endif case SQL_BIT: return SQL_C_BIT; case SQL_TINYINT: return SQL_C_STINYINT; case SQL_SMALLINT: return SQL_C_SSHORT; case SQL_INTEGER: return SQL_C_SLONG; case SQL_REAL: return SQL_C_FLOAT; case SQL_FLOAT: case SQL_DOUBLE: return SQL_C_DOUBLE; case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY: return SQL_C_BINARY; case SQL_DATE: return SQL_C_DATE; case SQL_TIME: return SQL_C_TIME; case SQL_TIMESTAMP: return SQL_C_TIMESTAMP; default: /* should never happen */ return SQL_C_CHAR; } } unixODBC-2.2.14-p2/Drivers/Postgre7.1/psqlodbc.c0100644000076400007640000000552707512275063017457 0ustar nicknick /* Module: psqlodbc.c * * Description: This module contains the main entry point (DllMain) for the library. * It also contains functions to get and set global variables for the * driver in the registry. * * Classes: n/a * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #include "dlg_specific.h" #ifndef WIN32 #include "isql.h" #include "isqlext.h" #else #include #include #include #include #endif GLOBAL_VALUES globals; RETCODE SQL_API SQLDummyOrdinal(void); #ifdef WIN32 HINSTANCE NEAR s_hModule; /* Saved module handle. */ /* This is where the Driver Manager attaches to this Driver */ BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) { WORD wVersionRequested; WSADATA wsaData; switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: s_hModule = hInst; /* Save for dialog boxes */ /* Load the WinSock Library */ wVersionRequested = MAKEWORD(1, 1); if ( WSAStartup(wVersionRequested, &wsaData)) return FALSE; /* Verify that this is the minimum version of WinSock */ if ( LOBYTE( wsaData.wVersion ) != 1 || HIBYTE( wsaData.wVersion ) != 1 ) { WSACleanup(); return FALSE; } getGlobalDefaults(DBMS_NAME, ODBCINST_INI, FALSE); break; case DLL_THREAD_ATTACH: break; case DLL_PROCESS_DETACH: WSACleanup(); return TRUE; case DLL_THREAD_DETACH: break; default: break; } return TRUE; UNREFERENCED_PARAMETER(lpReserved); } #else /* not WIN32 */ #ifndef TRUE #define TRUE (BOOL)1 #endif #ifndef FALSE #define FALSE (BOOL)0 #endif #ifdef __GNUC__ /* This function is called at library initialization time. */ static BOOL __attribute__((constructor)) init(void) { getGlobalDefaults(DBMS_NAME, ODBCINST_INI, FALSE); return TRUE; } #else /* not __GNUC__ */ #ifdef DONT_DO_IT /* These two functions do shared library initialziation on UNIX, well at least * on Linux. I don't know about other systems. */ BOOL _init(void) { getGlobalDefaults(DBMS_NAME, ODBCINST_INI, FALSE); return TRUE; } BOOL _fini(void) { return TRUE; } #endif /* not __GNUC__ */ #endif #endif /* not WIN32 */ /* This function is used to cause the Driver Manager to call functions by number rather than name, which is faster. The ordinal value of this function must be 199 to have the Driver Manager do this. Also, the ordinal values of the functions must match the value of fFunction in SQLGetFunctions() */ RETCODE SQL_API SQLDummyOrdinal(void) { return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/qresult.c0100644000076400007640000004022007363332152017331 0ustar nicknick /* Module: qresult.c * * Description: This module contains functions related to * managing result information (i.e, fetching rows from the backend, * managing the tuple cache, etc.) and retrieving it. * Depending on the situation, a QResultClass will hold either data * from the backend or a manually built result (see "qresult.h" to * see which functions/macros are for manual or backend results. * For manually built results, the QResultClass simply points to * TupleList and ColumnInfo structures, which actually hold the data. * * Classes: QResultClass (Functions prefix: "QR_") * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include "qresult.h" #include "misc.h" #include #include #ifndef TRUE #define TRUE (BOOL)1 #endif #ifndef FALSE #define FALSE (BOOL)0 #endif extern GLOBAL_VALUES globals; /* Used for building a Manual Result only */ /* All info functions call this function to create the manual result set. */ void QR_set_num_fields(QResultClass *self, int new_num_fields) { mylog("in QR_set_num_fields\n"); CI_set_num_fields(self->fields, new_num_fields); if(self->manual_tuples) TL_Destructor(self->manual_tuples); self->manual_tuples = TL_Constructor(new_num_fields); mylog("exit QR_set_num_fields\n"); } void QR_set_position(QResultClass *self, int pos) { self->tupleField = self->backend_tuples + ((self->base + pos) * self->num_fields); } void QR_set_cache_size(QResultClass *self, int cache_size) { self->cache_size = cache_size; } void QR_set_rowset_size(QResultClass *self, int rowset_size) { self->rowset_size = rowset_size; } void QR_inc_base(QResultClass *self, int base_inc) { self->base += base_inc; } /************************************/ /* CLASS QResult */ /************************************/ QResultClass * QR_Constructor(void) { QResultClass *rv; mylog("in QR_Constructor\n"); rv = (QResultClass *) malloc(sizeof(QResultClass)); if (rv != NULL) { rv->status = PGRES_EMPTY_QUERY; /* construct the column info */ if ( ! (rv->fields = CI_Constructor())) { free(rv); return NULL; } rv->manual_tuples = NULL; rv->backend_tuples = NULL; rv->message = NULL; rv->command = NULL; rv->notice = NULL; rv->conn = NULL; rv->inTuples = FALSE; rv->fcount = 0; rv->fetch_count = 0; rv->base = 0; rv->currTuple = -1; rv->num_fields = 0; rv->tupleField = NULL; rv->cursor = NULL; rv->aborted = FALSE; rv->cache_size = globals.fetch_max; rv->rowset_size = 1; } mylog("exit QR_Constructor\n"); return rv; } void QR_Destructor(QResultClass *self) { mylog("QResult: in DESTRUCTOR\n"); /* manual result set tuples */ if (self->manual_tuples) TL_Destructor(self->manual_tuples); /* If conn is defined, then we may have used "backend_tuples", */ /* so in case we need to, free it up. Also, close the cursor. */ if (self->conn && self->conn->sock && CC_is_in_trans(self->conn)) QR_close(self); /* close the cursor if there is one */ QR_free_memory(self); /* safe to call anyway */ /* Should have been freed in the close() but just in case... */ if (self->cursor) free(self->cursor); /* Free up column info */ if (self->fields) CI_Destructor(self->fields); /* Free command info (this is from strdup()) */ if (self->command) free(self->command); /* Free notice info (this is from strdup()) */ if (self->notice) free(self->notice); free(self); mylog("QResult: exit DESTRUCTOR\n"); } void QR_set_command(QResultClass *self, char *msg) { if (self->command) free(self->command); self->command = msg ? strdup(msg) : NULL; } void QR_set_notice(QResultClass *self, char *msg) { if (self->notice) free(self->notice); self->notice = msg ? strdup(msg) : NULL; } void QR_free_memory(QResultClass *self) { register int lf, row; register TupleField *tuple = self->backend_tuples; int fcount = self->fcount; int num_fields = self->num_fields; mylog("QResult: free memory in, fcount=%d\n", fcount); if ( self->backend_tuples) { for (row = 0; row < fcount; row++) { mylog("row = %d, num_fields = %d\n", row, num_fields); for (lf=0; lf < num_fields; lf++) { if (tuple[lf].value != NULL) { mylog("free [lf=%d] %u\n", lf, tuple[lf].value); free(tuple[lf].value); } } tuple += num_fields; /* next row */ } free(self->backend_tuples); self->backend_tuples = NULL; } self->fcount = 0; mylog("QResult: free memory out\n"); } /* This function is called by send_query() */ char QR_fetch_tuples(QResultClass *self, ConnectionClass *conn, char *cursor) { int tuple_size; /* If called from send_query the first time (conn != NULL), */ /* then set the inTuples state, */ /* and read the tuples. If conn is NULL, */ /* it implies that we are being called from next_tuple(), */ /* like to get more rows so don't call next_tuple again! */ if (conn != NULL) { self->conn = conn; mylog("QR_fetch_tuples: cursor = '%s', self->cursor=%u\n", (cursor==NULL)?"":cursor, self->cursor); if (self->cursor) free(self->cursor); if ( globals.use_declarefetch) { if (! cursor || cursor[0] == '\0') { self->status = PGRES_INTERNAL_ERROR; QR_set_message(self, "Internal Error -- no cursor for fetch"); return FALSE; } self->cursor = strdup(cursor); } /* Read the field attributes. */ /* $$$$ Should do some error control HERE! $$$$ */ if ( CI_read_fields(self->fields, self->conn)) { self->status = PGRES_FIELDS_OK; self->num_fields = CI_get_num_fields(self->fields); } else { self->status = PGRES_BAD_RESPONSE; QR_set_message(self, "Error reading field information"); return FALSE; } mylog("QR_fetch_tuples: past CI_read_fields: num_fields = %d\n", self->num_fields); if (globals.use_declarefetch) tuple_size = self->cache_size; else tuple_size = TUPLE_MALLOC_INC; /* allocate memory for the tuple cache */ mylog("MALLOC: tuple_size = %d, size = %d\n", tuple_size, self->num_fields * sizeof(TupleField) * tuple_size); self->backend_tuples = (TupleField *) malloc(self->num_fields * sizeof(TupleField) * tuple_size); if ( ! self->backend_tuples) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Could not get memory for tuple cache."); return FALSE; } self->inTuples = TRUE; /* Force a read to occur in next_tuple */ self->fcount = tuple_size+1; self->fetch_count = tuple_size+1; self->base = 0; return QR_next_tuple(self); } else { /* Always have to read the field attributes. */ /* But we dont have to reallocate memory for them! */ if ( ! CI_read_fields(NULL, self->conn)) { self->status = PGRES_BAD_RESPONSE; QR_set_message(self, "Error reading field information"); return FALSE; } return TRUE; } } /* Close the cursor and end the transaction (if no cursors left) */ /* We only close cursor/end the transaction if a cursor was used. */ int QR_close(QResultClass *self) { QResultClass *res; if (globals.use_declarefetch && self->conn && self->cursor) { char buf[64]; sprintf(buf, "close %s", self->cursor); mylog("QResult: closing cursor: '%s'\n", buf); res = CC_send_query(self->conn, buf, NULL); self->inTuples = FALSE; self->currTuple = -1; free(self->cursor); self->cursor = NULL; if (res == NULL) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Error closing cursor."); return FALSE; } /* End the transaction if there are no cursors left on this conn */ if (CC_cursor_count(self->conn) == 0) { mylog("QResult: END transaction on conn=%u\n", self->conn); res = CC_send_query(self->conn, "END", NULL); CC_set_no_trans(self->conn); if (res == NULL) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Error ending transaction."); return FALSE; } } } return TRUE; } /* This function is called by fetch_tuples() AND SQLFetch() */ int QR_next_tuple(QResultClass *self) { int id; QResultClass *res; SocketClass *sock; /* Speed up access */ int fetch_count = self->fetch_count; int fcount = self->fcount; int fetch_size, offset= 0; int end_tuple = self->rowset_size + self->base; char corrected = FALSE; TupleField *the_tuples = self->backend_tuples; static char msgbuffer[MAX_MESSAGE_LEN+1]; char cmdbuffer[MAX_MESSAGE_LEN+1]; /* QR_set_command() dups this string so dont need static */ char fetch[128]; QueryInfo qi; if (fetch_count < fcount) { /* return a row from cache */ mylog("next_tuple: fetch_count < fcount: returning tuple %d, fcount = %d\n", fetch_count, fcount); self->tupleField = the_tuples + (fetch_count * self->num_fields); /* next row */ self->fetch_count++; return TRUE; } else if (self->fcount < self->cache_size) { /* last row from cache */ /* We are done because we didn't even get CACHE_SIZE tuples */ mylog("next_tuple: fcount < CACHE_SIZE: fcount = %d, fetch_count = %d\n", fcount, fetch_count); self->tupleField = NULL; self->status = PGRES_END_TUPLES; return -1; /* end of tuples */ } else { /* See if we need to fetch another group of rows. We may be being called from send_query(), and if so, don't send another fetch, just fall through and read the tuples. */ self->tupleField = NULL; if ( ! self->inTuples) { if ( ! globals.use_declarefetch) { mylog("next_tuple: ALL_ROWS: done, fcount = %d, fetch_count = %d\n", fcount, fetch_count); self->tupleField = NULL; self->status = PGRES_END_TUPLES; return -1; /* end of tuples */ } if (self->base == fcount) { /* not a correction */ /* Determine the optimum cache size. */ if (globals.fetch_max % self->rowset_size == 0) fetch_size = globals.fetch_max; else if (self->rowset_size < globals.fetch_max) fetch_size = (globals.fetch_max / self->rowset_size) * self->rowset_size; else fetch_size = self->rowset_size; self->cache_size = fetch_size; self->fetch_count = 1; } else { /* need to correct */ corrected = TRUE; fetch_size = end_tuple - fcount; self->cache_size += fetch_size; offset = self->fetch_count; self->fetch_count++; } self->backend_tuples = (TupleField *) realloc(self->backend_tuples, self->num_fields * sizeof(TupleField) * self->cache_size); if ( ! self->backend_tuples) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Out of memory while reading tuples."); return FALSE; } sprintf(fetch, "fetch %d in %s", fetch_size, self->cursor); mylog("next_tuple: sending actual fetch (%d) query '%s'\n", fetch_size, fetch); /* don't read ahead for the next tuple (self) ! */ qi.row_size = self->cache_size; qi.result_in = self; qi.cursor = NULL; res = CC_send_query(self->conn, fetch, &qi); if (res == NULL) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Error fetching next group."); return FALSE; } self->inTuples = TRUE; } else { mylog("next_tuple: inTuples = true, falling through: fcount = %d, fetch_count = %d\n", self->fcount, self->fetch_count); /* This is a pre-fetch (fetching rows right after query but before any real SQLFetch() calls. This is done so the field attributes are available. */ self->fetch_count = 0; } } if ( ! corrected) { self->base = 0; self->fcount = 0; } sock = CC_get_socket(self->conn); self->tupleField = NULL; for ( ; ;) { id = SOCK_get_char(sock); switch (id) { case 'T': /* Tuples within tuples cannot be handled */ self->status = PGRES_BAD_RESPONSE; QR_set_message(self, "Tuples within tuples cannot be handled"); return FALSE; case 'B': /* Tuples in binary format */ case 'D': /* Tuples in ASCII format */ if ( ! globals.use_declarefetch && self->fcount > 0 && ! (self->fcount % TUPLE_MALLOC_INC)) { size_t old_size = self->fcount * self->num_fields * sizeof(TupleField); mylog("REALLOC: old_size = %d\n", old_size); self->backend_tuples = (TupleField *) realloc(self->backend_tuples, old_size + (self->num_fields * sizeof(TupleField) * TUPLE_MALLOC_INC)); if ( ! self->backend_tuples) { self->status = PGRES_FATAL_ERROR; QR_set_message(self, "Out of memory while reading tuples."); return FALSE; } } if ( ! QR_read_tuple(self, (char) (id == 0))) { self->status = PGRES_BAD_RESPONSE; QR_set_message(self, "Error reading the tuple"); return FALSE; } self->fcount++; break; /* continue reading */ case 'C': /* End of tuple list */ SOCK_get_string(sock, cmdbuffer, MAX_MESSAGE_LEN); QR_set_command(self, cmdbuffer); mylog("end of tuple list -- setting inUse to false: this = %u\n", self); self->inTuples = FALSE; if (self->fcount > 0) { qlog(" [ fetched %d rows ]\n", self->fcount); mylog("_next_tuple: 'C' fetch_max && fcount = %d\n", self->fcount); /* set to first row */ self->tupleField = self->backend_tuples + (offset * self->num_fields); return TRUE; } else { /* We are surely done here (we read 0 tuples) */ qlog(" [ fetched 0 rows ]\n"); mylog("_next_tuple: 'C': DONE (fcount == 0)\n"); return -1; /* end of tuples */ } case 'E': /* Error */ SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); QR_set_message(self, msgbuffer); self->status = PGRES_FATAL_ERROR; if ( ! strncmp(msgbuffer, "FATAL", 5)) CC_set_no_trans(self->conn); qlog("ERROR from backend in next_tuple: '%s'\n", msgbuffer); return FALSE; case 'N': /* Notice */ SOCK_get_string(sock, msgbuffer, ERROR_MSG_LENGTH); QR_set_message(self, msgbuffer); self->status = PGRES_NONFATAL_ERROR; qlog("NOTICE from backend in next_tuple: '%s'\n", msgbuffer); continue; default: /* this should only happen if the backend dumped core */ mylog("QR_next_tuple: Unexpected result from backend: id = '%c' (%d)\n", id, id); qlog("QR_next_tuple: Unexpected result from backend: id = '%c' (%d)\n", id, id); QR_set_message(self, "Unexpected result from backend. It probably crashed"); self->status = PGRES_FATAL_ERROR; CC_set_no_trans(self->conn); return FALSE; } } return TRUE; } char QR_read_tuple(QResultClass *self, char binary) { Int2 field_lf; TupleField *this_tuplefield; char bmp, bitmap[MAX_FIELDS]; /* Max. len of the bitmap */ Int2 bitmaplen; /* len of the bitmap in bytes */ Int2 bitmap_pos; Int2 bitcnt; Int4 len; char *buffer; int num_fields = self->num_fields; /* speed up access */ SocketClass *sock = CC_get_socket(self->conn); ColumnInfoClass *flds; /* set the current row to read the fields into */ this_tuplefield = self->backend_tuples + (self->fcount * num_fields); bitmaplen = (Int2) num_fields / BYTELEN; if ((num_fields % BYTELEN) > 0) bitmaplen++; /* At first the server sends a bitmap that indicates which database fields are null */ SOCK_get_n_char(sock, bitmap, bitmaplen); bitmap_pos = 0; bitcnt = 0; bmp = bitmap[bitmap_pos]; for(field_lf = 0; field_lf < num_fields; field_lf++) { /* Check if the current field is NULL */ if(!(bmp & 0200)) { /* YES, it is NULL ! */ this_tuplefield[field_lf].len = 0; this_tuplefield[field_lf].value = 0; } else { /* NO, the field is not null. so get at first the length of the field (four bytes) */ len = SOCK_get_int(sock, VARHDRSZ); if (!binary) len -= VARHDRSZ; buffer = (char *)malloc(len+1); SOCK_get_n_char(sock, buffer, len); buffer[len] = '\0'; mylog("qresult: len=%d, buffer='%s'\n", len, buffer); this_tuplefield[field_lf].len = len; this_tuplefield[field_lf].value = buffer; /* This can be used to set the longest length of the column for any row in the tuple cache. It would not be accurate for varchar and text fields to use this since a tuple cache is only 100 rows. Bpchar can be handled since the strlen of all rows is fixed, assuming there are not 100 nulls in a row! */ flds = self->fields; if (flds->display_size[field_lf] < len) flds->display_size[field_lf] = len; } /* Now adjust for the next bit to be scanned in the next loop. */ bitcnt++; if (BYTELEN == bitcnt) { bitmap_pos++; bmp = bitmap[bitmap_pos]; bitcnt = 0; } else bmp <<= 1; } self->currTuple++; return TRUE; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/results.c0100644000076400007640000007647110723524737017362 0ustar nicknick /* Module: results.c * * Description: This module contains functions related to * retrieving result information through the ODBC API. * * Classes: n/a * * API functions: SQLRowCount, SQLNumResultCols, SQLDescribeCol, SQLColAttributes, * SQLGetData, SQLFetch, SQLExtendedFetch, * SQLMoreResults(NI), SQLSetPos, SQLSetScrollOptions(NI), * SQLSetCursorName, SQLGetCursorName * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "psqlodbc.h" #include "dlg_specific.h" #include "environ.h" #include "connection.h" #include "statement.h" #include "bind.h" #include "qresult.h" #include "convert.h" #include "pgtypes.h" #include #ifndef WIN32 #include "isqlext.h" #else #include #include #endif extern GLOBAL_VALUES globals; SQLRETURN SQLRowCount(SQLHSTMT hstmt, SQLLEN *pcrow) { static char* const func="SQLRowCount"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; char *msg, *ptr; if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if (stmt->manual_result) { if (pcrow) *pcrow = -1; return SQL_SUCCESS; } if(stmt->statement_type == STMT_TYPE_SELECT) { if (stmt->status == STMT_FINISHED) { res = SC_get_Result(stmt); if(res && pcrow) { *pcrow = globals.use_declarefetch ? -1 : QR_get_num_tuples(res); return SQL_SUCCESS; } } } else { res = SC_get_Result(stmt); if (res && pcrow) { msg = QR_get_command(res); mylog("*** msg = '%s'\n", msg); trim(msg); /* get rid of trailing spaces */ ptr = strrchr(msg, ' '); if (ptr) { *pcrow = atoi(ptr+1); mylog("**** SQLRowCount(): THE ROWS: *pcrow = %d\n", *pcrow); } else { *pcrow = -1; mylog("**** SQLRowCount(): NO ROWS: *pcrow = %d\n", *pcrow); } return SQL_SUCCESS; } } SC_log_error(func, "Bad return value", stmt); return SQL_ERROR; } /* This returns the number of columns associated with the database */ /* attached to "hstmt". */ RETCODE SQL_API SQLNumResultCols( HSTMT hstmt, SWORD FAR *pccol) { static char* const func="SQLNumResultCols"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *result; char parse_ok; if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } SC_clear_error(stmt); parse_ok = FALSE; if (globals.parse && stmt->statement_type == STMT_TYPE_SELECT) { if (stmt->parse_status == STMT_PARSE_NONE) { mylog("SQLNumResultCols: calling parse_statement on stmt=%u\n", stmt); parse_statement(stmt); } if (stmt->parse_status != STMT_PARSE_FATAL) { parse_ok = TRUE; *pccol = stmt->nfld; mylog("PARSE: SQLNumResultCols: *pccol = %d\n", *pccol); } } if ( ! parse_ok) { SC_pre_execute(stmt); result = SC_get_Result(stmt); mylog("SQLNumResultCols: result = %u, status = %d, numcols = %d\n", result, stmt->status, result != NULL ? QR_NumResultCols(result) : -1); if (( ! result) || ((stmt->status != STMT_FINISHED) && (stmt->status != STMT_PREMATURE)) ) { /* no query has been executed on this statement */ SC_set_error(stmt, STMT_SEQUENCE_ERROR, "No query has been executed with that handle"); SC_log_error(func, "", stmt); return SQL_ERROR; } *pccol = QR_NumResultCols(result); } return SQL_SUCCESS; } /* - - - - - - - - - */ /* Return information about the database column the user wants */ /* information about. */ RETCODE SQL_API SQLDescribeCol( HSTMT hstmt, UWORD icol, UCHAR FAR *szColName, SWORD cbColNameMax, SWORD FAR *pcbColName, SWORD FAR *pfSqlType, SQLULEN FAR *pcbColDef, SWORD FAR *pibScale, SWORD FAR *pfNullable) { static char* const func="SQLDescribeCol"; /* gets all the information about a specific column */ StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; char *col_name = NULL; Int4 fieldtype = 0; int precision = 0; ConnInfo *ci; char parse_ok; char buf[255]; int len = 0; RETCODE result; mylog("%s: entering...\n", func); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } ci = &(stmt->hdbc->connInfo); SC_clear_error(stmt); /* Dont check for bookmark column. This is the responsibility of the driver manager. */ icol--; /* use zero based column numbers */ parse_ok = FALSE; if (globals.parse && stmt->statement_type == STMT_TYPE_SELECT) { if (stmt->parse_status == STMT_PARSE_NONE) { mylog("SQLDescribeCol: calling parse_statement on stmt=%u\n", stmt); parse_statement(stmt); } mylog("PARSE: DescribeCol: icol=%d, stmt=%u, stmt->nfld=%d, stmt->fi=%u\n", icol, stmt, stmt->nfld, stmt->fi); if (stmt->parse_status != STMT_PARSE_FATAL && stmt->fi && stmt->fi[icol]) { if (icol >= stmt->nfld) { SC_set_error(stmt, STMT_INVALID_COLUMN_NUMBER_ERROR, "Invalid column number in DescribeCol."); SC_log_error(func, "", stmt); return SQL_ERROR; } mylog("DescribeCol: getting info for icol=%d\n", icol); fieldtype = stmt->fi[icol]->type; col_name = stmt->fi[icol]->name; precision = stmt->fi[icol]->precision; mylog("PARSE: fieldtype=%d, col_name='%s', precision=%d\n", fieldtype, col_name, precision); if (fieldtype > 0) parse_ok = TRUE; } } /* If couldn't parse it OR the field being described was not parsed (i.e., because it was a function or expression, etc, then do it the old fashioned way. */ if ( ! parse_ok) { SC_pre_execute(stmt); res = SC_get_Result(stmt); mylog("**** SQLDescribeCol: res = %u, stmt->status = %d, !finished=%d, !premature=%d\n", res, stmt->status, stmt->status != STMT_FINISHED, stmt->status != STMT_PREMATURE); if ( (NULL == res) || ((stmt->status != STMT_FINISHED) && (stmt->status != STMT_PREMATURE))) { /* no query has been executed on this statement */ SC_set_error(stmt, STMT_SEQUENCE_ERROR, "No query has been assigned to this statement."); SC_log_error(func, "", stmt); return SQL_ERROR; } if (icol >= QR_NumResultCols(res)) { SC_set_error(stmt, STMT_INVALID_COLUMN_NUMBER_ERROR, "Invalid column number in DescribeCol."); sprintf(buf, "Col#=%d, #Cols=%d", icol, QR_NumResultCols(res)); SC_log_error(func, buf, stmt); return SQL_ERROR; } col_name = QR_get_fieldname(res, icol); fieldtype = QR_get_field_type(res, icol); precision = pgtype_precision(stmt, fieldtype, icol, globals.unknown_sizes); /* atoi(ci->unknown_sizes) */ } mylog("describeCol: col %d fieldname = '%s'\n", icol, col_name); mylog("describeCol: col %d fieldtype = %d\n", icol, fieldtype); mylog("describeCol: col %d precision = %d\n", icol, precision); result = SQL_SUCCESS; /************************/ /* COLUMN NAME */ /************************/ len = strlen(col_name); if (pcbColName) *pcbColName = len; if (szColName) { strncpy_null((char*)szColName, col_name, cbColNameMax); if (len >= cbColNameMax) { result = SQL_SUCCESS_WITH_INFO; SC_set_error(stmt, STMT_TRUNCATED, "The buffer was too small for the result."); } } /************************/ /* SQL TYPE */ /************************/ if (pfSqlType) { *pfSqlType = pgtype_to_sqltype(stmt, fieldtype); mylog("describeCol: col %d *pfSqlType = %d\n", icol, *pfSqlType); } /************************/ /* PRECISION */ /************************/ if (pcbColDef) { if ( precision < 0) precision = 0; /* "I dont know" */ *pcbColDef = precision; mylog("describeCol: col %d *pcbColDef = %d\n", icol, *pcbColDef); } /************************/ /* SCALE */ /************************/ if (pibScale) { Int2 scale; scale = pgtype_scale(stmt, fieldtype, icol); if(scale == -1) { scale = 0; } *pibScale = scale; mylog("describeCol: col %d *pibScale = %d\n", icol, *pibScale); } /************************/ /* NULLABILITY */ /************************/ if (pfNullable) { *pfNullable = (parse_ok) ? stmt->fi[icol]->nullable : pgtype_nullable(stmt, fieldtype); mylog("describeCol: col %d *pfNullable = %d\n", icol, *pfNullable); } return result; } /* Returns result column descriptor information for a result set. */ SQLRETURN SQLColAttributes( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT *pcbDesc, SQLLEN *pfDesc) { static char* const func = "SQLColAttributes"; StatementClass *stmt = (StatementClass *) hstmt; Int4 field_type = 0; ConnInfo *ci; int unknown_sizes; int cols = 0; char parse_ok; RETCODE result; char *p = NULL; int len = 0, value = 0; mylog("%s: entering...\n", func); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } ci = &(stmt->hdbc->connInfo); /* Dont check for bookmark column. This is the responsibility of the driver manager. For certain types of arguments, the column number is ignored anyway, so it may be 0. */ icol--; unknown_sizes = globals.unknown_sizes; /* atoi(ci->unknown_sizes); */ if (unknown_sizes == UNKNOWNS_AS_DONTKNOW) /* not appropriate for SQLColAttributes() */ unknown_sizes = UNKNOWNS_AS_MAX; parse_ok = FALSE; if (globals.parse && stmt->statement_type == STMT_TYPE_SELECT) { if (stmt->parse_status == STMT_PARSE_NONE) { mylog("SQLColAttributes: calling parse_statement\n"); parse_statement(stmt); } cols = stmt->nfld; /* Column Count is a special case. The Column number is ignored in this case. */ if (fDescType == SQL_COLUMN_COUNT) { if (pfDesc) *pfDesc = cols; return SQL_SUCCESS; } if (stmt->parse_status != STMT_PARSE_FATAL && stmt->fi && stmt->fi[icol]) { if (icol >= cols) { SC_set_error(stmt, STMT_INVALID_COLUMN_NUMBER_ERROR, "Invalid column number in DescribeCol."); SC_log_error(func, "", stmt); return SQL_ERROR; } field_type = stmt->fi[icol]->type; if (field_type > 0) parse_ok = TRUE; } } if ( ! parse_ok) { SC_pre_execute(stmt); mylog("**** SQLColAtt: result = %u, status = %d, numcols = %d\n", stmt->result, stmt->status, stmt->result != NULL ? QR_NumResultCols(stmt->result) : -1); if ( (NULL == stmt->result) || ((stmt->status != STMT_FINISHED) && (stmt->status != STMT_PREMATURE)) ) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Can't get column attributes: no result found."); SC_log_error(func, "", stmt); return SQL_ERROR; } cols = QR_NumResultCols(stmt->result); /* Column Count is a special case. The Column number is ignored in this case. */ if (fDescType == SQL_COLUMN_COUNT) { if (pfDesc) *pfDesc = cols; return SQL_SUCCESS; } if (icol >= cols) { SC_set_error(stmt, STMT_INVALID_COLUMN_NUMBER_ERROR, "Invalid column number in DescribeCol."); SC_log_error(func, "", stmt); return SQL_ERROR; } field_type = QR_get_field_type(stmt->result, icol); } mylog("colAttr: col %d field_type = %d\n", icol, field_type); switch(fDescType) { case SQL_COLUMN_AUTO_INCREMENT: value = pgtype_auto_increment(stmt, field_type); if (value == -1) /* non-numeric becomes FALSE (ODBC Doc) */ value = FALSE; break; case SQL_COLUMN_CASE_SENSITIVE: value = pgtype_case_sensitive(stmt, field_type); break; /* This special case is handled above. case SQL_COLUMN_COUNT: */ case SQL_COLUMN_DISPLAY_SIZE: value = (parse_ok) ? stmt->fi[icol]->display_size : pgtype_display_size(stmt, field_type, icol, unknown_sizes); mylog("SQLColAttributes: col %d, display_size= %d\n", icol, value); break; case SQL_COLUMN_LABEL: if (parse_ok && stmt->fi[icol]->alias[0] != '\0') { p = stmt->fi[icol]->alias; mylog("SQLColAttr: COLUMN_LABEL = '%s'\n", p); break; } /* otherwise same as column name -- FALL THROUGH!!! */ case SQL_COLUMN_NAME: p = (parse_ok) ? stmt->fi[icol]->name : QR_get_fieldname(stmt->result, icol); mylog("SQLColAttr: COLUMN_NAME = '%s'\n", p); break; case SQL_COLUMN_LENGTH: value = (parse_ok) ? stmt->fi[icol]->length : pgtype_length(stmt, field_type, icol, unknown_sizes); mylog("SQLColAttributes: col %d, length = %d\n", icol, value); break; case SQL_COLUMN_MONEY: value = pgtype_money(stmt, field_type); break; case SQL_COLUMN_NULLABLE: value = (parse_ok) ? stmt->fi[icol]->nullable : pgtype_nullable(stmt, field_type); break; case SQL_COLUMN_OWNER_NAME: p = ""; break; case SQL_COLUMN_PRECISION: value = (parse_ok) ? stmt->fi[icol]->precision : pgtype_precision(stmt, field_type, icol, unknown_sizes); mylog("SQLColAttributes: col %d, precision = %d\n", icol, value); break; case SQL_COLUMN_QUALIFIER_NAME: p = ""; break; case SQL_COLUMN_SCALE: value = pgtype_scale(stmt, field_type, icol); break; case SQL_COLUMN_SEARCHABLE: value = pgtype_searchable(stmt, field_type); break; case SQL_COLUMN_TABLE_NAME: p = (parse_ok && stmt->fi[icol]->ti) ? stmt->fi[icol]->ti->name : ""; mylog("SQLColAttr: TABLE_NAME = '%s'\n", p); break; case SQL_COLUMN_TYPE: value = pgtype_to_sqltype(stmt, field_type); break; case SQL_COLUMN_TYPE_NAME: p = pgtype_to_name(stmt, field_type); break; case SQL_COLUMN_UNSIGNED: value = pgtype_unsigned(stmt, field_type); if(value == -1) /* non-numeric becomes TRUE (ODBC Doc) */ value = TRUE; break; case SQL_COLUMN_UPDATABLE: /* Neither Access or Borland care about this. if (field_type == PG_TYPE_OID) *pfDesc = SQL_ATTR_READONLY; else */ value = SQL_ATTR_WRITE; mylog("SQLColAttr: UPDATEABLE = %d\n", value); break; } result = SQL_SUCCESS; if (p) { /* char/binary data */ len = strlen(p); if (rgbDesc) { strncpy_null((char *)rgbDesc, p, (size_t)cbDescMax); if (len >= cbDescMax) { result = SQL_SUCCESS_WITH_INFO; SC_set_error(stmt, STMT_TRUNCATED, "The buffer was too small for the result."); } } if (pcbDesc) *pcbDesc = len; } else { /* numeric data */ if (pfDesc) *pfDesc = value; } return result; } /* Returns result data for a single column in the current row. */ RETCODE SQL_API PG_SQLGetData( HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD FAR *pcbValue) { static char* const func="SQLGetData"; QResultClass *res; StatementClass *stmt = (StatementClass *) hstmt; int num_cols, num_rows; Int4 field_type; void *value = NULL; int result; char get_bookmark = FALSE; mylog("SQLGetData: enter, stmt=%u\n", stmt); if( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } res = stmt->result; if (STMT_EXECUTING == stmt->status) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Can't get data while statement is still executing."); SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->status != STMT_FINISHED) { SC_set_error(stmt, STMT_STATUS_ERROR, "GetData can only be called after the successful execution on a SQL statement"); SC_log_error(func, "", stmt); return SQL_ERROR; } if (icol == 0) { if (stmt->options.use_bookmarks == SQL_UB_OFF) { SC_set_error(stmt, STMT_COLNUM_ERROR, "Attempt to retrieve bookmark with bookmark usage disabled"); SC_log_error(func, "", stmt); return SQL_ERROR; } /* Make sure it is the bookmark data type */ if (fCType != SQL_C_BOOKMARK && fCType != SQL_C_BINARY ) { SC_set_error(stmt, STMT_PROGRAM_TYPE_OUT_OF_RANGE, "Column 0 is not of type SQL_C_BOOKMARK"); SC_log_error(func, "", stmt); return SQL_ERROR; } get_bookmark = TRUE; } else { /* use zero-based column numbers */ icol--; /* make sure the column number is valid */ num_cols = QR_NumResultCols(res); if (icol >= num_cols) { SC_set_error(stmt, STMT_INVALID_COLUMN_NUMBER_ERROR, "Invalid column number."); SC_log_error(func, "", stmt); return SQL_ERROR; } } if ( stmt->manual_result || ! globals.use_declarefetch) { /* make sure we're positioned on a valid row */ num_rows = QR_get_num_tuples(res); if((stmt->currTuple < 0) || (stmt->currTuple >= num_rows)) { SC_set_error(stmt, STMT_INVALID_CURSOR_STATE_ERROR, "Not positioned on a valid row for GetData."); SC_log_error(func, "", stmt); return SQL_ERROR; } mylog(" num_rows = %d\n", num_rows); if ( ! get_bookmark) { if ( stmt->manual_result) { value = QR_get_value_manual(res, stmt->currTuple, icol); } else { value = QR_get_value_backend_row(res, stmt->currTuple, icol); } mylog(" value = '%s'\n", value); } } else { /* it's a SOCKET result (backend data) */ if (stmt->currTuple == -1 || ! res || ! res->tupleField) { SC_set_error(stmt, STMT_INVALID_CURSOR_STATE_ERROR, "Not positioned on a valid row for GetData."); SC_log_error(func, "", stmt); return SQL_ERROR; } if ( ! get_bookmark) value = QR_get_value_backend(res, icol); mylog(" socket: value = '%s'\n", value); } if ( get_bookmark) { *((UDWORD *) rgbValue) = SC_get_bookmark(stmt); if (pcbValue) *pcbValue = 4; return SQL_SUCCESS; } field_type = QR_get_field_type(res, icol); mylog("**** SQLGetData: icol = %d, fCType = %d, field_type = %d, value = '%s'\n", icol, fCType, field_type, value); stmt->current_col = icol; result = copy_and_convert_field(stmt, field_type, value, fCType, rgbValue, cbValueMax, (SQLLEN*)pcbValue); stmt->current_col = -1; switch(result) { case COPY_OK: return SQL_SUCCESS; case COPY_UNSUPPORTED_TYPE: SC_set_error(stmt, STMT_RESTRICTED_DATA_TYPE_ERROR, "Received an unsupported type from Postgres."); SC_log_error(func, "", stmt); return SQL_ERROR; case COPY_UNSUPPORTED_CONVERSION: SC_set_error(stmt, STMT_RESTRICTED_DATA_TYPE_ERROR, "Couldn't handle the necessary data type conversion."); SC_log_error(func, "", stmt); return SQL_ERROR; case COPY_RESULT_TRUNCATED: SC_set_error(stmt, STMT_TRUNCATED, "The buffer was too small for the result."); return SQL_SUCCESS_WITH_INFO; case COPY_GENERAL_ERROR: /* error msg already filled in */ SC_log_error(func, "", stmt); return SQL_ERROR; case COPY_NO_DATA_FOUND: /* SC_log_error(func, "no data found", stmt); */ return SQL_NO_DATA_FOUND; default: SC_set_error(stmt, STMT_INTERNAL_ERROR, "Unrecognized return value from copy_and_convert_field."); SC_log_error(func, "", stmt); return SQL_ERROR; } } SQLRETURN SQLGetData(SQLHSTMT hstmt, SQLUSMALLINT icol, SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue) { return PG_SQLGetData( hstmt, icol, fCType, rgbValue, cbValueMax, (SDWORD FAR *)pcbValue ); } /* Returns data for bound columns in the current row ("hstmt->iCursor"), */ /* advances the cursor. */ RETCODE SQL_API PG_SQLFetch( HSTMT hstmt) { static char* const func = "SQLFetch"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; mylog("SQLFetch: stmt = %u, stmt->result= %u\n", stmt, stmt->result); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } SC_clear_error(stmt); if ( ! (res = stmt->result)) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Null statement result in SQLFetch."); SC_log_error(func, "", stmt); return SQL_ERROR; } /* Not allowed to bind a bookmark column when using SQLFetch. */ if ( stmt->bookmark.buffer) { SC_set_error(stmt, STMT_COLNUM_ERROR, "Not allowed to bind a bookmark column when using SQLFetch"); SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->status == STMT_EXECUTING) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Can't fetch while statement is still executing."); SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->status != STMT_FINISHED) { SC_set_error(stmt, STMT_STATUS_ERROR, "Fetch can only be called after the successful execution on a SQL statement"); SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->bindings == NULL) { /* just to avoid a crash if the user insists on calling this */ /* function even if SQL_ExecDirect has reported an Error */ SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Bindings were not allocated properly."); SC_log_error(func, "", stmt); return SQL_ERROR; } QR_set_rowset_size(res, 1); QR_inc_base(res, stmt->last_fetch_count); return SC_fetch(stmt); } RETCODE SQL_API SQLFetch( HSTMT hstmt) { return PG_SQLFetch( hstmt ); } /* This fetchs a block of data (rowset). */ SQLRETURN SQLExtendedFetch( SQLHSTMT hstmt, SQLUSMALLINT fFetchType, SQLLEN irow, SQLULEN *pcrow, SQLUSMALLINT *rgfRowStatus) { static char* const func = "SQLExtendedFetch"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; int num_tuples, i, save_rowset_size; RETCODE result; char truncated, error; mylog("SQLExtendedFetch: stmt=%u\n", stmt); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if ( globals.use_declarefetch && ! stmt->manual_result) { if ( fFetchType != SQL_FETCH_NEXT) { SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Unsupported fetch type for SQLExtendedFetch with UseDeclareFetch option."); return SQL_ERROR; } } SC_clear_error(stmt); if ( ! (res = stmt->result)) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Null statement result in SQLExtendedFetch."); SC_log_error(func, "", stmt); return SQL_ERROR; } /* If a bookmark colunmn is bound but bookmark usage is off, then error */ if (stmt->bookmark.buffer && stmt->options.use_bookmarks == SQL_UB_OFF) { SC_set_error(stmt, STMT_COLNUM_ERROR, "Attempt to retrieve bookmark with bookmark usage disabled"); SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->status == STMT_EXECUTING) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Can't fetch while statement is still executing."); SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->status != STMT_FINISHED) { SC_set_error(stmt, STMT_STATUS_ERROR, "ExtendedFetch can only be called after the successful execution on a SQL statement"); SC_log_error(func, "", stmt); return SQL_ERROR; } if (stmt->bindings == NULL) { /* just to avoid a crash if the user insists on calling this */ /* function even if SQL_ExecDirect has reported an Error */ SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Bindings were not allocated properly."); SC_log_error(func, "", stmt); return SQL_ERROR; } /* Initialize to no rows fetched */ if (rgfRowStatus) for (i = 0; i < stmt->options.rowset_size; i++) *(rgfRowStatus + i) = SQL_ROW_NOROW; if (pcrow) *pcrow = 0; num_tuples = QR_get_num_tuples(res); /* Save and discard the saved rowset size */ save_rowset_size = stmt->save_rowset_size; stmt->save_rowset_size = -1; switch (fFetchType) { case SQL_FETCH_NEXT: /* From the odbc spec... If positioned before the start of the RESULT SET, then this should be equivalent to SQL_FETCH_FIRST. */ if (stmt->rowset_start < 0) stmt->rowset_start = 0; else { stmt->rowset_start += (save_rowset_size > 0 ? save_rowset_size : stmt->options.rowset_size); } mylog("SQL_FETCH_NEXT: num_tuples=%d, currtuple=%d\n", num_tuples, stmt->currTuple); break; case SQL_FETCH_PRIOR: mylog("SQL_FETCH_PRIOR: num_tuples=%d, currtuple=%d\n", num_tuples, stmt->currTuple); /* From the odbc spec... If positioned after the end of the RESULT SET, then this should be equivalent to SQL_FETCH_LAST. */ if (stmt->rowset_start >= num_tuples) { stmt->rowset_start = num_tuples <= 0 ? 0 : (num_tuples - stmt->options.rowset_size); } else { stmt->rowset_start -= stmt->options.rowset_size; } break; case SQL_FETCH_FIRST: mylog("SQL_FETCH_FIRST: num_tuples=%d, currtuple=%d\n", num_tuples, stmt->currTuple); stmt->rowset_start = 0; break; case SQL_FETCH_LAST: mylog("SQL_FETCH_LAST: num_tuples=%d, currtuple=%d\n", num_tuples, stmt->currTuple); stmt->rowset_start = num_tuples <= 0 ? 0 : (num_tuples - stmt->options.rowset_size) ; break; case SQL_FETCH_ABSOLUTE: mylog("SQL_FETCH_ABSOLUTE: num_tuples=%d, currtuple=%d, irow=%d\n", num_tuples, stmt->currTuple, irow); /* Position before result set, but dont fetch anything */ if (irow == 0) { stmt->rowset_start = -1; stmt->currTuple = -1; return SQL_NO_DATA_FOUND; } /* Position before the desired row */ else if (irow > 0) { stmt->rowset_start = irow - 1; } /* Position with respect to the end of the result set */ else { stmt->rowset_start = num_tuples + irow; } break; case SQL_FETCH_RELATIVE: /* Refresh the current rowset -- not currently implemented, but lie anyway */ if (irow == 0) { break; } stmt->rowset_start += irow; break; case SQL_FETCH_BOOKMARK: stmt->rowset_start = irow - 1; break; default: SC_log_error(func, "Unsupported SQLExtendedFetch Direction", stmt); return SQL_ERROR; } /***********************************/ /* CHECK FOR PROPER CURSOR STATE */ /***********************************/ /* Handle Declare Fetch style specially because the end is not really the end... */ if ( globals.use_declarefetch && ! stmt->manual_result) { if (QR_end_tuples(res)) { return SQL_NO_DATA_FOUND; } } else { /* If *new* rowset is after the result_set, return no data found */ if (stmt->rowset_start >= num_tuples) { stmt->rowset_start = num_tuples; return SQL_NO_DATA_FOUND; } } /* If *new* rowset is prior to result_set, return no data found */ if (stmt->rowset_start < 0) { if (stmt->rowset_start + stmt->options.rowset_size <= 0) { stmt->rowset_start = -1; return SQL_NO_DATA_FOUND; } else { /* overlap with beginning of result set, so get first rowset */ stmt->rowset_start = 0; } } /* currTuple is always 1 row prior to the rowset */ stmt->currTuple = stmt->rowset_start - 1; /* increment the base row in the tuple cache */ QR_set_rowset_size(res, stmt->options.rowset_size); QR_inc_base(res, stmt->last_fetch_count); /* Physical Row advancement occurs for each row fetched below */ mylog("SQLExtendedFetch: new currTuple = %d\n", stmt->currTuple); truncated = error = FALSE; for (i = 0; i < stmt->options.rowset_size; i++) { stmt->bind_row = i; /* set the binding location */ result = SC_fetch(stmt); /* Determine Function status */ if (result == SQL_NO_DATA_FOUND) break; else if (result == SQL_SUCCESS_WITH_INFO) truncated = TRUE; else if (result == SQL_ERROR) error = TRUE; /* Determine Row Status */ if (rgfRowStatus) { if (result == SQL_ERROR) *(rgfRowStatus + i) = SQL_ROW_ERROR; else *(rgfRowStatus + i)= SQL_ROW_SUCCESS; } } /* Save the fetch count for SQLSetPos */ stmt->last_fetch_count= i; /* Reset next binding row */ stmt->bind_row = 0; /* Move the cursor position to the first row in the result set. */ stmt->currTuple = stmt->rowset_start; /* For declare/fetch, need to reset cursor to beginning of rowset */ if (globals.use_declarefetch && ! stmt->manual_result) { QR_set_position(res, 0); } /* Set the number of rows retrieved */ if (pcrow) *pcrow = i; if (i == 0) return SQL_NO_DATA_FOUND; /* Only DeclareFetch should wind up here */ else if (error) return SQL_ERROR; else if (truncated) return SQL_SUCCESS_WITH_INFO; else return SQL_SUCCESS; } /* This determines whether there are more results sets available for */ /* the "hstmt". */ /* CC: return SQL_NO_DATA_FOUND since we do not support multiple result sets */ RETCODE SQL_API SQLMoreResults( HSTMT hstmt) { return SQL_NO_DATA_FOUND; } /* This positions the cursor within a rowset, that was positioned using SQLExtendedFetch. */ /* This will be useful (so far) only when using SQLGetData after SQLExtendedFetch. */ RETCODE SQL_API SQLSetPos( HSTMT hstmt, SQLSETPOSIROW irow, UWORD fOption, UWORD fLock) { static char* const func = "SQLSetPos"; StatementClass *stmt = (StatementClass *) hstmt; QResultClass *res; int num_cols, i; BindInfoClass *bindings = stmt->bindings; if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if (fOption != SQL_POSITION && fOption != SQL_REFRESH) { SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Only SQL_POSITION/REFRESH is supported for SQLSetPos"); SC_log_error(func, "", stmt); return SQL_ERROR; } if ( ! (res = stmt->result)) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Null statement result in SQLSetPos."); SC_log_error(func, "", stmt); return SQL_ERROR; } num_cols = QR_NumResultCols(res); if (irow == 0) { SC_set_error(stmt, STMT_ROW_OUT_OF_RANGE, "Driver does not support Bulk operations."); SC_log_error(func, "", stmt); return SQL_ERROR; } if (irow > stmt->last_fetch_count) { SC_set_error(stmt, STMT_ROW_OUT_OF_RANGE, "Row value out of range"); SC_log_error(func, "", stmt); return SQL_ERROR; } irow--; /* Reset for SQLGetData */ for (i = 0; i < num_cols; i++) bindings[i].data_left = -1; QR_set_position(res, irow); stmt->currTuple = stmt->rowset_start + irow; return SQL_SUCCESS; } /* Sets options that control the behavior of cursors. */ SQLRETURN SQLSetScrollOptions( /* Use SQLSetStmtOptions */ SQLHSTMT hstmt, SQLUSMALLINT fConcurrency, SQLLEN crowKeyset, SQLUSMALLINT crowRowset) { static char* const func = "SQLSetScrollOptions"; SC_log_error(func, "Function not implemented", (StatementClass *) hstmt); return SQL_ERROR; } /* Set the cursor name on a statement handle */ RETCODE SQL_API SQLSetCursorName( HSTMT hstmt, UCHAR FAR *szCursor, SWORD cbCursor) { static char* const func="SQLSetCursorName"; StatementClass *stmt = (StatementClass *) hstmt; int len; mylog("SQLSetCursorName: hstmt=%u, szCursor=%u, cbCursorMax=%d\n", hstmt, szCursor, cbCursor); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } len = (cbCursor == SQL_NTS) ? strlen((char*)szCursor) : cbCursor; if (len <= 0 || len > sizeof(stmt->cursor_name) - 1) { SC_set_error(stmt, STMT_INVALID_CURSOR_NAME, "Invalid Cursor Name"); SC_log_error(func, "", stmt); return SQL_ERROR; } strncpy_null((char*)stmt->cursor_name, (char*)szCursor, len+1); return SQL_SUCCESS; } /* Return the cursor name for a statement handle */ RETCODE SQL_API SQLGetCursorName( HSTMT hstmt, UCHAR FAR *szCursor, SWORD cbCursorMax, SWORD FAR *pcbCursor) { static char* const func="SQLGetCursorName"; StatementClass *stmt = (StatementClass *) hstmt; int len = 0; RETCODE result; mylog("SQLGetCursorName: hstmt=%u, szCursor=%u, cbCursorMax=%d, pcbCursor=%u\n", hstmt, szCursor, cbCursorMax, pcbCursor); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if ( stmt->cursor_name[0] == '\0') { SC_set_error(stmt, STMT_NO_CURSOR_NAME, "No Cursor name available"); SC_log_error(func, "", stmt); return SQL_ERROR; } result = SQL_SUCCESS; len = strlen(stmt->cursor_name); if (szCursor) { strncpy_null((char*)szCursor, (char*)stmt->cursor_name, cbCursorMax); if (len >= cbCursorMax) { result = SQL_SUCCESS_WITH_INFO; SC_set_error(stmt, STMT_TRUNCATED, "The buffer was too small for the result."); } } if (pcbCursor) *pcbCursor = len; return result; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/socket.c0100644000076400007640000002071010124241103017104 0ustar nicknick /* Module: socket.c * * Description: This module contains functions for low level socket * operations (connecting/reading/writing to the backend) * * Classes: SocketClass (Functions prefix: "SOCK_") * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "socket.h" #ifndef WIN32 #ifndef VMS #include "sys/un.h" #endif #include #include /* for memset */ #endif extern GLOBAL_VALUES globals; #ifndef BOOL #define BOOL int #endif #ifndef TRUE #define TRUE (BOOL)1 #endif #ifndef FALSE #define FALSE (BOOL)0 #endif void SOCK_clear_error(SocketClass *self) { self->errornumber = 0; self->errormsg = NULL; } SocketClass * SOCK_Constructor() { SocketClass *rv; rv = (SocketClass *) malloc(sizeof(SocketClass)); if (rv != NULL) { rv->socket = (SOCKETFD) -1; rv->buffer_filled_in = 0; rv->buffer_filled_out = 0; rv->buffer_read_in = 0; rv->buffer_in = (unsigned char *) malloc(globals.socket_buffersize); if ( ! rv->buffer_in) return NULL; rv->buffer_out = (unsigned char *) malloc(globals.socket_buffersize); if ( ! rv->buffer_out) return NULL; rv->errormsg = NULL; rv->errornumber = 0; rv->reverse = FALSE; } return rv; } void SOCK_Destructor(SocketClass *self) { if (self->socket != -1) { SOCK_put_char(self, 'X'); SOCK_flush_output(self); closesocket(self->socket); } if (self->buffer_in) free(self->buffer_in); if (self->buffer_out) free(self->buffer_out); free(self); } static char SOCK_connect_to_ip(SocketClass *self, unsigned short port, char *hostname) { struct hostent *host; struct sockaddr_in sadr; unsigned long iaddr; if (self->socket != -1) { self->errornumber = SOCKET_ALREADY_CONNECTED; self->errormsg = "Socket is already connected"; return 0; } memset((char *)&sadr, 0, sizeof(sadr)); /* If it is a valid IP address, use it. Otherwise use hostname lookup. */ iaddr = inet_addr(hostname); if (iaddr == INADDR_NONE) { host = gethostbyname(hostname); if (host == NULL) { self->errornumber = SOCKET_HOST_NOT_FOUND; self->errormsg = "Could not resolve hostname."; return 0; } memcpy(&(sadr.sin_addr), host->h_addr, host->h_length); } else memcpy(&(sadr.sin_addr), (struct in_addr *) &iaddr, sizeof(iaddr)); sadr.sin_family = AF_INET; sadr.sin_port = htons(port); self->socket = socket(AF_INET, SOCK_STREAM, 0); if (self->socket == -1) { self->errornumber = SOCKET_COULD_NOT_CREATE_SOCKET; self->errormsg = "Could not create Socket."; return 0; } if ( connect(self->socket, (struct sockaddr *)&(sadr), sizeof(sadr)) < 0) { self->errornumber = SOCKET_COULD_NOT_CONNECT; self->errormsg = "Could not connect to remote socket."; closesocket(self->socket); self->socket = (SOCKETFD) -1; return 0; } return 1; } #ifndef VMS char SOCK_connect_to_unix_port(SocketClass *self, unsigned short port, char *path ) { struct sockaddr_un sadr; if (self->socket != -1) { self->errornumber = SOCKET_ALREADY_CONNECTED; self->errormsg = "Socket is already connected"; return 0; } memset((char *)&sadr, 0, sizeof(sadr)); sadr.sun_family = AF_UNIX; sprintf( sadr.sun_path, "%s.%d", path, port ); self->socket = socket(AF_UNIX, SOCK_STREAM, 0); if (self->socket == -1) { self->errornumber = SOCKET_COULD_NOT_CREATE_SOCKET; self->errormsg = "Could not create Socket."; return 0; } if ( connect(self->socket, (struct sockaddr *)&(sadr), sizeof(sadr)) < 0) { self->errornumber = SOCKET_COULD_NOT_CONNECT; self->errormsg = "Could not connect to remote socket."; closesocket(self->socket); self->socket = (SOCKETFD) -1; return 0; } return 1; } /* * cope with different path for debian distrib */ SOCK_connect_to_unix(SocketClass *self, unsigned short port, char *path ) { if ( strlen( path ) > 0 ) { return !SOCK_connect_to_unix_port( self, port, path ); } if ( !SOCK_connect_to_unix_port( self, port, "/tmp/.s.PGSQL" )) { if ( SOCK_connect_to_unix_port( self, port, "/var/run/postgresql/.s.PGSQL" )) { SOCK_clear_error(self); return 1; } else { return 0; } } else { return 1; } } #endif char SOCK_connect_to(SocketClass *self, unsigned short port, char *hostname, char *uds) { #ifndef VMS if ( strcmp( hostname, "localhost" ) == 0 ) return SOCK_connect_to_unix( self, port, uds ); else #endif return SOCK_connect_to_ip( self, port, hostname ); } void SOCK_get_n_char(SocketClass *self, char *buffer, int len) { int lf; if ( ! buffer) { self->errornumber = SOCKET_NULLPOINTER_PARAMETER; self->errormsg = "get_n_char was called with NULL-Pointer"; return; } for(lf=0; lf < len; lf++) buffer[lf] = SOCK_get_next_byte(self); } void SOCK_put_n_char(SocketClass *self, char *buffer, int len) { int lf; if ( ! buffer) { self->errornumber = SOCKET_NULLPOINTER_PARAMETER; self->errormsg = "put_n_char was called with NULL-Pointer"; return; } for(lf=0; lf < len; lf++) SOCK_put_next_byte(self, (unsigned char)buffer[lf]); } /* bufsize must include room for the null terminator will read at most bufsize-1 characters + null. */ BOOL SOCK_get_string(SocketClass *self, char *buffer, int bufsize) { register int lf = 0; for (lf = 0; lf < bufsize - 1; lf++) if (!(buffer[lf] = SOCK_get_next_byte(self))) return FALSE; buffer[bufsize - 1] = '\0'; return TRUE; } void SOCK_put_string(SocketClass *self, char *string) { register int lf; int len; len = strlen(string)+1; for(lf = 0; lf < len; lf++) SOCK_put_next_byte(self, (unsigned char)string[lf]); } int SOCK_get_int(SocketClass *self, short len) { char buf[4]; switch (len) { case 2: SOCK_get_n_char(self, buf, len); if (self->reverse) return *((unsigned short *) buf); else return ntohs( *((unsigned short *) buf) ); case 4: SOCK_get_n_char(self, buf, len); if (self->reverse) return *((unsigned int *) buf); else return ntohl( *((unsigned int *) buf) ); default: self->errornumber = SOCKET_GET_INT_WRONG_LENGTH; self->errormsg = "Cannot read ints of that length"; return 0; } } void SOCK_put_int(SocketClass *self, int value, short len) { unsigned int rv; switch (len) { case 2: rv = self->reverse ? value : htons( (unsigned short) value); SOCK_put_n_char(self, (char *) &rv, 2); return; case 4: rv = self->reverse ? value : htonl( (unsigned int) value); SOCK_put_n_char(self, (char *) &rv, 4); return; default: self->errornumber = SOCKET_PUT_INT_WRONG_LENGTH; self->errormsg = "Cannot write ints of that length"; return; } } void SOCK_flush_output(SocketClass *self) { int written; #ifdef MSG_NOSIGNAL written = send(self->socket, (char *)self->buffer_out, self->buffer_filled_out, MSG_NOSIGNAL); #else written = send(self->socket, (char *)self->buffer_out, self->buffer_filled_out, 0); #endif if (written != self->buffer_filled_out) { self->errornumber = SOCKET_WRITE_ERROR; self->errormsg = "Could not flush socket buffer."; } self->buffer_filled_out = 0; } UCHAR SOCK_get_next_byte(SocketClass *self) { if (self->buffer_read_in >= self->buffer_filled_in) { /* there are no more bytes left in the buffer so */ /* reload the buffer */ self->buffer_read_in = 0; self->buffer_filled_in = recv(self->socket, (char *)self->buffer_in, globals.socket_buffersize, 0); mylog("read %d, global_socket_buffersize=%d\n", self->buffer_filled_in, globals.socket_buffersize); if (self->buffer_filled_in < 0) { self->errornumber = SOCKET_READ_ERROR; self->errormsg = "Error while reading from the socket."; self->buffer_filled_in = 0; return 0; } if (self->buffer_filled_in == 0) { self->errornumber = SOCKET_CLOSED; self->errormsg = "Socket has been closed."; self->buffer_filled_in = 0; return 0; } } return self->buffer_in[self->buffer_read_in++]; } void SOCK_put_next_byte(SocketClass *self, unsigned char next_byte) { int bytes_sent; self->buffer_out[self->buffer_filled_out++] = next_byte; if (self->buffer_filled_out == globals.socket_buffersize) { /* buffer is full, so write it out */ bytes_sent = send(self->socket, (char *)self->buffer_out, globals.socket_buffersize, 0); if (bytes_sent != globals.socket_buffersize) { self->errornumber = SOCKET_WRITE_ERROR; self->errormsg = "Error while writing to the socket."; } self->buffer_filled_out = 0; } } unixODBC-2.2.14-p2/Drivers/Postgre7.1/statement.c0100644000076400007640000006261210276424567017660 0ustar nicknick /* Module: statement.c * * Description: This module contains functions related to creating * and manipulating a statement. * * Classes: StatementClass (Functions prefix: "SC_") * * API functions: SQLAllocStmt, SQLFreeStmt * * Comments: See "notice.txt" for copyright and license information. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "statement.h" #include "bind.h" #include "connection.h" #include "qresult.h" #include "convert.h" #include "environ.h" #include #include #include #ifndef WIN32 #include "isql.h" #else #include #include #endif extern GLOBAL_VALUES globals; #ifndef WIN32 #ifndef HAVE_STRICMP #define stricmp(s1,s2) strcasecmp(s1,s2) #define strnicmp(s1,s2,n) strncasecmp(s1,s2,n) #endif #endif #define PRN_NULLCHECK /* Map sql commands to statement types */ static struct { int type; char *s; } Statement_Type[] = { { STMT_TYPE_SELECT, "SELECT" }, { STMT_TYPE_INSERT, "INSERT" }, { STMT_TYPE_UPDATE, "UPDATE" }, { STMT_TYPE_DELETE, "DELETE" }, { STMT_TYPE_CREATE, "CREATE" }, { STMT_TYPE_ALTER, "ALTER" }, { STMT_TYPE_DROP, "DROP" }, { STMT_TYPE_GRANT, "GRANT" }, { STMT_TYPE_REVOKE, "REVOKE" }, { 0, NULL } }; RETCODE SQL_API PG_SQLAllocStmt(HDBC hdbc, HSTMT FAR *phstmt) { static char* const func="SQLAllocStmt"; ConnectionClass *conn = (ConnectionClass *) hdbc; StatementClass *stmt; mylog("%s: entering...\n", func); if( ! conn) { CC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } stmt = SC_Constructor(); mylog("**** SQLAllocStmt: hdbc = %u, stmt = %u\n", hdbc, stmt); if ( ! stmt) { CC_set_error(conn, CONN_STMT_ALLOC_ERROR, "No more memory to allocate a further SQL-statement"); *phstmt = SQL_NULL_HSTMT; CC_log_error(func, "", conn); return SQL_ERROR; } if ( ! CC_add_statement(conn, stmt)) { CC_set_error(conn, CONN_STMT_ALLOC_ERROR, "Maximum number of connections exceeded."); CC_log_error(func, "", conn); SC_Destructor(stmt); *phstmt = SQL_NULL_HSTMT; return SQL_ERROR; } *phstmt = (HSTMT) stmt; /* Copy default statement options based from Connection options */ stmt->options = conn->stmtOptions; /* Save the handle for later */ stmt->phstmt = phstmt; return SQL_SUCCESS; } RETCODE SQL_API SQLAllocStmt(HDBC hdbc, HSTMT FAR *phstmt) { return PG_SQLAllocStmt( hdbc, phstmt ); } RETCODE SQL_API PG_SQLFreeStmt(HSTMT hstmt, UWORD fOption) { static char* const func="SQLFreeStmt"; StatementClass *stmt = (StatementClass *) hstmt; mylog("%s: entering...hstmt=%u, fOption=%d\n", func, hstmt, fOption); if ( ! stmt) { SC_log_error(func, "", NULL); return SQL_INVALID_HANDLE; } if (fOption == SQL_DROP) { ConnectionClass *conn = stmt->hdbc; /* Remove the statement from the connection's statement list */ if ( conn) { if ( ! CC_remove_statement(conn, stmt)) { SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Statement is currently executing a transaction."); SC_log_error(func, "", stmt); return SQL_ERROR; /* stmt may be executing a transaction */ } /* Free any cursors and discard any result info */ if (stmt->result) { QR_Destructor(stmt->result); stmt->result = NULL; } } /* Destroy the statement and free any results, cursors, etc. */ SC_Destructor(stmt); } else if (fOption == SQL_UNBIND) { SC_unbind_cols(stmt); } else if (fOption == SQL_CLOSE) { /* this should discard all the results, but leave the statement */ /* itself in place (it can be executed again) */ if (!SC_recycle_statement(stmt)) { /* errormsg passed in above */ SC_log_error(func, "", stmt); return SQL_ERROR; } } else if(fOption == SQL_RESET_PARAMS) { SC_free_params(stmt, STMT_FREE_PARAMS_ALL); } else { SC_set_error(stmt, STMT_OPTION_OUT_OF_RANGE_ERROR, "Invalid option passed to SQLFreeStmt."); SC_log_error(func, "", stmt); return SQL_ERROR; } return SQL_SUCCESS; } RETCODE SQL_API SQLFreeStmt(HSTMT hstmt, UWORD fOption) { return PG_SQLFreeStmt( hstmt, fOption ); } /********************************************************************** * StatementClass implementation */ void InitializeStatementOptions(StatementOptions *opt) { opt->maxRows = 0; /* driver returns all rows */ opt->maxLength = 0; /* driver returns all data for char/binary */ opt->rowset_size = 1; opt->keyset_size = 0; /* fully keyset driven is the default */ opt->scroll_concurrency = SQL_CONCUR_READ_ONLY; opt->cursor_type = SQL_CURSOR_FORWARD_ONLY; opt->bind_size = 0; /* default is to bind by column */ opt->retrieve_data = SQL_RD_ON; opt->use_bookmarks = SQL_UB_OFF; } StatementClass * SC_Constructor(void) { StatementClass *rv; rv = (StatementClass *) malloc(sizeof(StatementClass)); if (rv) { rv->hdbc = NULL; /* no connection associated yet */ rv->phstmt = NULL; rv->result = NULL; rv->manual_result = FALSE; rv->prepare = FALSE; rv->status = STMT_ALLOCATED; rv->internal = FALSE; SC_clear_error(rv); rv->statement = NULL; rv->stmt_with_params[0] = '\0'; rv->statement_type = STMT_TYPE_UNKNOWN; rv->bindings = NULL; rv->bindings_allocated = 0; rv->bookmark.buffer = NULL; rv->bookmark.used = NULL; rv->parameters_allocated = 0; rv->parameters = 0; rv->currTuple = -1; rv->rowset_start = -1; rv->current_col = -1; rv->bind_row = 0; rv->last_fetch_count = 0; rv->save_rowset_size = -1; rv->data_at_exec = -1; rv->current_exec_param = -1; rv->put_data = FALSE; rv->lobj_fd = -1; rv->cursor_name[0] = '\0'; /* Parse Stuff */ rv->ti = NULL; rv->fi = NULL; rv->ntab = 0; rv->nfld = 0; rv->parse_status = STMT_PARSE_NONE; /* Clear Statement Options -- defaults will be set in AllocStmt */ memset(&rv->options, 0, sizeof(StatementOptions)); } return rv; } char SC_Destructor(StatementClass *self) { mylog("SC_Destructor: self=%u, self->result=%u, self->hdbc=%u\n", self, self->result, self->hdbc); if (STMT_EXECUTING == self->status) { SC_set_error(self, STMT_SEQUENCE_ERROR, "Statement is currently executing a transaction."); return FALSE; } if (self->result) { if ( ! self->hdbc) self->result->conn = NULL; /* prevent any dbase activity */ QR_Destructor(self->result); } if (self->statement) free(self->statement); SC_free_params(self, STMT_FREE_PARAMS_ALL); /* the memory pointed to by the bindings is not deallocated by the driver */ /* by by the application that uses that driver, so we don't have to care */ /* about that here. */ if (self->bindings) free(self->bindings); /* Free the parsed table information */ if (self->ti) { int i; for (i = 0; i < self->ntab; i++) { free(self->ti[i]); } free(self->ti); } /* Free the parsed field information */ if (self->fi) { int i; for (i = 0; i < self->nfld; i++) { free(self->fi[i]); } free(self->fi); } SC_set_errormsg(self, NULL); free(self); mylog("SC_Destructor: EXIT\n"); return TRUE; } /* Free parameters and free the memory from the data-at-execution parameters that was allocated in SQLPutData. */ void SC_free_params(StatementClass *self, char option) { int i; mylog("SC_free_params: ENTER, self=%d\n", self); if( ! self->parameters) return; for (i = 0; i < self->parameters_allocated; i++) { if (self->parameters[i].data_at_exec == TRUE) { if (self->parameters[i].EXEC_used) { free(self->parameters[i].EXEC_used); self->parameters[i].EXEC_used = NULL; } if (self->parameters[i].EXEC_buffer) { if (self->parameters[i].SQLType != SQL_LONGVARBINARY) free(self->parameters[i].EXEC_buffer); self->parameters[i].EXEC_buffer = NULL; } } } self->data_at_exec = -1; self->current_exec_param = -1; self->put_data = FALSE; if (option == STMT_FREE_PARAMS_ALL) { free(self->parameters); self->parameters = NULL; self->parameters_allocated = 0; } mylog("SC_free_params: EXIT\n"); } int statement_type(char *statement) { int i; /* ignore leading whitespace in query string */ while (*statement && isspace((unsigned char) *statement)) statement++; for (i = 0; Statement_Type[i].s; i++) if ( ! strnicmp(statement, Statement_Type[i].s, strlen(Statement_Type[i].s))) return Statement_Type[i].type; return STMT_TYPE_OTHER; } /* Called from SQLPrepare if STMT_PREMATURE, or from SQLExecute if STMT_FINISHED, or from SQLFreeStmt(SQL_CLOSE) */ char SC_recycle_statement(StatementClass *self) { ConnectionClass *conn; mylog("recycle statement: self= %u\n", self); /* This would not happen */ if (self->status == STMT_EXECUTING) { SC_set_error(self, STMT_SEQUENCE_ERROR, "Statement is currently executing a transaction."); return FALSE; } SC_set_errormsg(self, NULL); SC_clear_error(self); switch (self->status) { case STMT_ALLOCATED: /* this statement does not need to be recycled */ return TRUE; case STMT_READY: break; case STMT_PREMATURE: /* Premature execution of the statement might have caused the start of a transaction. If so, we have to rollback that transaction. */ conn = SC_get_conn(self); if ( ! CC_is_in_autocommit(conn) && CC_is_in_trans(conn)) { CC_send_query(conn, "ABORT", NULL); CC_set_no_trans(conn); } break; case STMT_FINISHED: break; default: SC_set_error(self, STMT_INTERNAL_ERROR, "An internal error occured while recycling statements"); return FALSE; } /* Free the parsed table information */ if (self->ti) { int i; for (i = 0; i < self->ntab; i++) { free(self->ti[i]); } free(self->ti); self->ti = NULL; self->ntab = 0; } /* Free the parsed field information */ if (self->fi) { int i; for (i = 0; i < self->nfld; i++) { free(self->fi[i]); } free(self->fi); self->fi = NULL; self->nfld = 0; } self->parse_status = STMT_PARSE_NONE; /* Free any cursors */ if (self->result) { QR_Destructor(self->result); self->result = NULL; } /****************************************************************/ /* Reset only parameters that have anything to do with results */ /****************************************************************/ self->status = STMT_READY; self->manual_result = FALSE; /* very important */ self->currTuple = -1; self->rowset_start = -1; self->current_col = -1; self->bind_row = 0; self->last_fetch_count = 0; SC_set_errormsg(self, NULL); SC_clear_error(self); self->lobj_fd = -1; /* Free any data at exec params before the statement is executed */ /* again. If not, then there will be a memory leak when */ /* the next SQLParamData/SQLPutData is called. */ SC_free_params(self, STMT_FREE_PARAMS_DATA_AT_EXEC_ONLY); return TRUE; } /* Pre-execute a statement (SQLPrepare/SQLDescribeCol) */ void SC_pre_execute(StatementClass *self) { mylog("SC_pre_execute: status = %d\n", self->status); if (self->status == STMT_READY) { mylog(" preprocess: status = READY\n"); PG_SQLExecute(self); if (self->status == STMT_FINISHED) { mylog(" preprocess: after status = FINISHED, so set PREMATURE\n"); self->status = STMT_PREMATURE; } } } /* This is only called from SQLFreeStmt(SQL_UNBIND) */ char SC_unbind_cols(StatementClass *self) { Int2 lf; for(lf = 0; lf < self->bindings_allocated; lf++) { self->bindings[lf].data_left = -1; self->bindings[lf].buflen = 0; self->bindings[lf].buffer = NULL; self->bindings[lf].used = NULL; self->bindings[lf].returntype = SQL_C_CHAR; } self->bookmark.buffer = NULL; self->bookmark.used = NULL; return 1; } void SC_clear_error(StatementClass *self) { self->__error_number = 0; self->__error_message = NULL; self->errormsg_created = FALSE; } /* This function creates an error msg which is the concatenation */ /* of the result, statement, connection, and socket messages. */ char * SC_create_errormsg(StatementClass *self) { QResultClass *res = self->result; ConnectionClass *conn = self->hdbc; int pos; BOOL detailmsg = FALSE; char msg[4096]; msg[0] = '\0'; if (res && res->message) { strncpy(msg, res->message, sizeof(msg)); detailmsg = TRUE; } else if (SC_get_errormsg(self)) strncpy(msg, SC_get_errormsg(self), sizeof(msg)); if (!msg[0] && res && QR_get_notice(res)) { char *notice = QR_get_notice(res); int len = strlen(notice); if (len < sizeof(msg)) { memcpy(msg, notice, len); msg[len] = '\0'; } else return strdup(notice); } if (conn) { SocketClass *sock = conn->sock; if (!detailmsg && CC_get_errormsg(conn) && (CC_get_errormsg(conn))[0] != '\0') { pos = strlen(msg); sprintf(&msg[pos], ";\n%s", CC_get_errormsg(conn)); } if (sock && sock->errormsg && sock->errormsg[0] != '\0') { pos = strlen(msg); sprintf(&msg[pos], ";\n%s", sock->errormsg); } } return msg[0] ? strdup(msg) : NULL; } void SC_set_error(StatementClass *self, int number, const char *message) { if (self->__error_message) free(self->__error_message); self->__error_number = number; self->__error_message = message ? strdup(message) : NULL; } void SC_set_errormsg(StatementClass *self, const char *message) { if (self->__error_message) free(self->__error_message); self->__error_message = message ? strdup(message) : NULL; } char SC_get_error(StatementClass *self, int *number, char **message) { char rv; /* Create a very informative errormsg if it hasn't been done yet. */ if ( ! self->errormsg_created) { self->__error_message = SC_create_errormsg(self); self->errormsg_created = TRUE; } if (self->__error_number) { *number = self->__error_number; *message = self->__error_message; self->__error_message = NULL; } rv = (self->__error_number != 0); self->__error_number = 0; return rv; } /* Currently, the driver offers very simple bookmark support -- it is just the current row number. But it could be more sophisticated someday, such as mapping a key to a 32 bit value */ unsigned long SC_get_bookmark(StatementClass *self) { return (self->currTuple + 1); } RETCODE SC_fetch(StatementClass *self) { static char* const func = "SC_fetch"; QResultClass *res = self->result; int retval, result; Int2 num_cols, lf; Oid type; char *value; ColumnInfoClass *ci; /* TupleField *tupleField; */ self->last_fetch_count = 0; ci = QR_get_fields(res); /* the column info */ mylog("manual_result = %d, use_declarefetch = %d\n", self->manual_result, globals.use_declarefetch); if ( self->manual_result || ! globals.use_declarefetch) { if (self->currTuple >= QR_get_num_tuples(res) -1 || (self->options.maxRows > 0 && self->currTuple == self->options.maxRows - 1)) { /* if at the end of the tuples, return "no data found" and set the cursor past the end of the result set */ self->currTuple = QR_get_num_tuples(res); return SQL_NO_DATA_FOUND; } mylog("**** SQLFetch: manual_result\n"); (self->currTuple)++; } else { /* read from the cache or the physical next tuple */ retval = QR_next_tuple(res); if (retval < 0) { mylog("**** SQLFetch: end_tuples\n"); return SQL_NO_DATA_FOUND; } else if (retval > 0) (self->currTuple)++; /* all is well */ else { mylog("SQLFetch: error\n"); SC_set_error(self, STMT_EXEC_ERROR, "Error fetching next row"); SC_log_error(func, "", self); return SQL_ERROR; } } num_cols = QR_NumResultCols(res); result = SQL_SUCCESS; self->last_fetch_count = 1; /* If the bookmark column was bound then return a bookmark. Since this is used with SQLExtendedFetch, and the rowset size may be greater than 1, and an application can use row or column wise binding, use the code in copy_and_convert_field() to handle that. */ if (self->bookmark.buffer) { char buf[32]; sprintf(buf, "%ld", SC_get_bookmark(self)); result = copy_and_convert_field(self, 0, buf, SQL_C_ULONG, self->bookmark.buffer, 0, self->bookmark.used); } for (lf=0; lf < num_cols; lf++) { mylog("fetch: cols=%d, lf=%d, self = %u, self->bindings = %u, buffer[] = %u\n", num_cols, lf, self, self->bindings, self->bindings[lf].buffer); /* reset for SQLGetData */ self->bindings[lf].data_left = -1; if (self->bindings[lf].buffer != NULL) { /* this column has a binding */ /* type = QR_get_field_type(res, lf); */ type = CI_get_oid(ci, lf); /* speed things up */ mylog("type = %d\n", type); if (self->manual_result) { value = QR_get_value_manual(res, self->currTuple, lf); mylog("manual_result\n"); } else if (globals.use_declarefetch) value = QR_get_value_backend(res, lf); else { value = QR_get_value_backend_row(res, self->currTuple, lf); } mylog("value = '%s'\n", (value==NULL)?"":value); retval = copy_and_convert_field_bindinfo(self, type, value, lf); mylog("copy_and_convert: retval = %d\n", retval); switch(retval) { case COPY_OK: break; /* OK, do next bound column */ case COPY_UNSUPPORTED_TYPE: SC_set_error(self, STMT_RESTRICTED_DATA_TYPE_ERROR, "Received an unsupported type from Postgres."); SC_log_error(func, "", self); result = SQL_ERROR; break; case COPY_UNSUPPORTED_CONVERSION: SC_set_error(self, STMT_RESTRICTED_DATA_TYPE_ERROR, "Couldn't handle the necessary data type conversion."); SC_log_error(func, "", self); result = SQL_ERROR; break; case COPY_RESULT_TRUNCATED: SC_set_error(self, STMT_TRUNCATED, "The buffer was too small for the result."); result = SQL_SUCCESS_WITH_INFO; break; case COPY_GENERAL_ERROR: /* error msg already filled in */ SC_log_error(func, "", self); result = SQL_ERROR; break; /* This would not be meaningful in SQLFetch. */ case COPY_NO_DATA_FOUND: break; default: SC_set_error(self, STMT_INTERNAL_ERROR, "Unrecognized return value from copy_and_convert_field."); SC_log_error(func, "", self); result = SQL_ERROR; break; } } } return result; } RETCODE SC_execute(StatementClass *self) { static char* const func="SC_execute"; ConnectionClass *conn; QResultClass *res; char ok, was_ok, was_nonfatal; Int2 oldstatus, numcols; QueryInfo qi; conn = SC_get_conn(self); /* Begin a transaction if one is not already in progress */ /* * Basically we don't have to begin a transaction in autocommit mode * because Postgres backend runs in autocomit mode. We issue "BEGIN" * in the following cases. 1) we use declare/fetch and the statement * is SELECT (because declare/fetch must be called in a transaction). * 2) we are in autocommit off state and the statement isn't of type * OTHER. */ if (!self->internal && !CC_is_in_trans(conn) && ((globals.use_declarefetch && self->statement_type == STMT_TYPE_SELECT) || (!CC_is_in_autocommit(conn) && self->statement_type != STMT_TYPE_OTHER))) { mylog(" about to begin a transaction on statement = %u\n", self); res = CC_send_query(conn, "BEGIN", NULL); if (QR_aborted(res)) { SC_set_error(self, STMT_EXEC_ERROR, "Could not begin a transaction"); SC_log_error(func, "", self); return SQL_ERROR; } ok = QR_command_successful(res); mylog("SQLExecute: ok = %d, status = %d\n", ok, QR_get_status(res)); QR_Destructor(res); if (!ok) { SC_set_error(self, STMT_EXEC_ERROR, "Could not begin a transaction"); SC_log_error(func, "", self); return SQL_ERROR; } else CC_set_in_trans(conn); } oldstatus = conn->status; conn->status = CONN_EXECUTING; self->status = STMT_EXECUTING; /* If it's a SELECT statement, use a cursor. */ /* Note that the declare cursor has already been prepended to the statement */ /* in copy_statement... */ if (self->statement_type == STMT_TYPE_SELECT) { char fetch[128]; mylog(" Sending SELECT statement on stmt=%u, cursor_name='%s'\n", self, self->cursor_name); /* send the declare/select */ self->result = CC_send_query(conn, self->stmt_with_params, NULL); if (globals.use_declarefetch && self->result != NULL && QR_command_successful(self->result)) { QR_Destructor(self->result); /* That worked, so now send the fetch to start getting data back */ qi.result_in = NULL; qi.cursor = self->cursor_name; qi.row_size = globals.fetch_max; /* Most likely the rowset size will not be set by the application until after the statement is executed, so might as well use the cache size. The qr_next_tuple() function will correct for any discrepancies in sizes and adjust the cache accordingly. */ sprintf(fetch, "fetch %d in %s", qi.row_size, self->cursor_name); self->result = CC_send_query( conn, fetch, &qi); } mylog(" done sending the query:\n"); } else { /* not a SELECT statement so don't use a cursor */ mylog(" it's NOT a select statement: stmt=%u\n", self); self->result = CC_send_query(conn, self->stmt_with_params, NULL); /* We shouldn't send COMMIT. Postgres backend does the autocommit if neccessary. (Zoltan, 04/26/2000) */ /* Above seems wrong. Even in case of autocommit, started transactions must be committed. (Hiroshi, 02/11/2001) */ if ( ! self->internal && CC_is_in_autocommit(conn) && CC_is_in_trans(conn)) { res = CC_send_query(conn, "COMMIT", NULL); QR_Destructor(res); CC_set_no_trans(conn); } } conn->status = oldstatus; self->status = STMT_FINISHED; /* Check the status of the result */ if (self->result) { was_ok = QR_command_successful(self->result); was_nonfatal = QR_command_nonfatal(self->result); if ( was_ok) SC_set_errornumber(self, STMT_OK); else SC_set_errornumber(self, was_nonfatal ? STMT_INFO_ONLY : STMT_ERROR_TAKEN_FROM_BACKEND); self->currTuple = -1; /* set cursor before the first tuple in the list */ self->current_col = -1; self->rowset_start = -1; /* see if the query did return any result columns */ numcols = QR_NumResultCols(self->result); /* now allocate the array to hold the binding info */ if (numcols > 0) { extend_bindings(self, numcols); if (self->bindings == NULL) { SC_set_error(self, STMT_NO_MEMORY_ERROR, "Could not get enough free memory to store the binding information"); SC_log_error(func, "", self); return SQL_ERROR; } } /* issue "ABORT" when query aborted */ if (QR_get_aborted(self->result) && ! self->internal ) CC_abort(conn); } else { /* Bad Error -- The error message will be in the Connection */ if (self->statement_type == STMT_TYPE_CREATE) { SC_set_error(self, STMT_CREATE_TABLE_ERROR, "Error creating the table"); /* This would allow the table to already exists, thus appending rows to it. BUT, if the table didn't have the same attributes, it would fail. return SQL_SUCCESS_WITH_INFO; */ } else { SC_set_error(self, STMT_EXEC_ERROR, "Error while executing the query"); } if ( ! self->internal) CC_abort(conn); } if (SC_get_errornumber(self) == STMT_OK) return SQL_SUCCESS; else { /* Modified, 2000-04-29, Zoltan */ if (SC_get_errornumber(self) == STMT_INFO_ONLY) SC_set_errormsg(self, "Error while executing the query (non-fatal)"); else SC_set_errormsg(self, "Unknown error"); SC_log_error(func, "", self); return SQL_ERROR; } } void SC_log_error(char *func, char *desc, StatementClass *self) { #ifdef PRN_NULLCHECK #define nullcheck(a) (a ? a : "(NULL)") #endif if (self) { qlog("STATEMENT ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->__error_number, nullcheck(self->__error_message)); mylog("STATEMENT ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->__error_number, nullcheck(self->__error_message)); qlog(" ------------------------------------------------------------\n"); qlog(" hdbc=%u, stmt=%u, result=%u\n", self->hdbc, self, self->result); qlog(" manual_result=%d, prepare=%d, internal=%d\n", self->manual_result, self->prepare, self->internal); qlog(" bindings=%u, bindings_allocated=%d\n", self->bindings, self->bindings_allocated); qlog(" parameters=%u, parameters_allocated=%d\n", self->parameters, self->parameters_allocated); qlog(" statement_type=%d, statement='%s'\n", self->statement_type, nullcheck(self->statement)); qlog(" stmt_with_params='%s'\n", nullcheck(self->stmt_with_params)); qlog(" data_at_exec=%d, current_exec_param=%d, put_data=%d\n", self->data_at_exec, self->current_exec_param, self->put_data); qlog(" currTuple=%d, current_col=%d, lobj_fd=%d\n", self->currTuple, self->current_col, self->lobj_fd); qlog(" maxRows=%d, rowset_size=%d, keyset_size=%d, cursor_type=%d, scroll_concurrency=%d\n", self->options.maxRows, self->options.rowset_size, self->options.keyset_size, self->options.cursor_type, self->options.scroll_concurrency); qlog(" cursor_name='%s'\n", nullcheck(self->cursor_name)); qlog(" ----------------QResult Info -------------------------------\n"); if (self->result) { QResultClass *res = self->result; qlog(" fields=%u, manual_tuples=%u, backend_tuples=%u, tupleField=%d, conn=%u\n", res->fields, res->manual_tuples, res->backend_tuples, res->tupleField, res->conn); qlog(" fetch_count=%d, fcount=%d, num_fields=%d, cursor='%s'\n", res->fetch_count, res->fcount, res->num_fields, nullcheck(res->cursor)); qlog(" message='%s', command='%s', notice='%s'\n", nullcheck(res->message), nullcheck(res->command), nullcheck(res->notice)); qlog(" status=%d, inTuples=%d\n", res->status, res->inTuples); } /* Log the connection error if there is one */ CC_log_error(func, desc, self->hdbc); } else qlog("INVALID STATEMENT HANDLE ERROR: func=%s, desc='%s'\n", func, desc); #undef PRN_NULLCHECK } unixODBC-2.2.14-p2/Drivers/Postgre7.1/tuple.c0100644000076400007640000000254207363332152016770 0ustar nicknick /* Module: tuple.c * * Description: This module contains functions for setting the data for individual * fields (TupleField structure) of a manual result set. * * Important Note: These functions are ONLY used in building manual result sets for * info functions (SQLTables, SQLColumns, etc.) * * Classes: n/a * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include "tuple.h" #include #include void set_tuplefield_null(TupleField *tuple_field) { tuple_field->len = 0; tuple_field->value = NULL; /* strdup(""); */ } void set_tuplefield_string(TupleField *tuple_field, char *string) { tuple_field->len = strlen(string); tuple_field->value = malloc(strlen(string)+1); strcpy(tuple_field->value, string); } void set_tuplefield_int2(TupleField *tuple_field, Int2 value) { char buffer[10]; sprintf(buffer,"%d", value); tuple_field->len = strlen(buffer)+1; /* +1 ... is this correct (better be on the save side-...) */ tuple_field->value = strdup(buffer); } void set_tuplefield_int4(TupleField *tuple_field, Int4 value) { char buffer[15]; sprintf(buffer,"%ld", value); tuple_field->len = strlen(buffer)+1; /* +1 ... is this correct (better be on the save side-...) */ tuple_field->value = strdup(buffer); } unixODBC-2.2.14-p2/Drivers/Postgre7.1/tuplelist.c0100644000076400007640000001066307363332152017667 0ustar nicknick /* Module: tuplelist.c * * Description: This module contains functions for creating a manual result set * (the TupleList) and retrieving data from it for a specific row/column. * * Classes: TupleListClass (Functions prefix: "TL_") * * API functions: none * * Comments: See "notice.txt" for copyright and license information. * */ #include #include "tuplelist.h" #include "tuple.h" TupleListClass * TL_Constructor(UInt4 fieldcnt) { TupleListClass *rv; mylog("in TL_Constructor\n"); rv = (TupleListClass *) malloc(sizeof(TupleListClass)); if (rv) { rv->num_fields = fieldcnt; rv->num_tuples = 0; rv->list_start = NULL; rv->list_end = NULL; rv->lastref = NULL; rv->last_indexed = -1; } mylog("exit TL_Constructor\n"); return rv; } void TL_Destructor(TupleListClass *self) { int lf; TupleNode *node, *tp; mylog("TupleList: in DESTRUCTOR\n"); node = self->list_start; while(node != NULL) { for (lf=0; lf < self->num_fields; lf++) if (node->tuple[lf].value != NULL) { free(node->tuple[lf].value); } tp = node->next; free(node); node = tp; } free(self); mylog("TupleList: exit DESTRUCTOR\n"); } void * TL_get_fieldval(TupleListClass *self, Int4 tupleno, Int2 fieldno) { Int4 lf; Int4 delta, from_end; char end_is_closer, start_is_closer; TupleNode *rv; if (self->last_indexed == -1) /* we have an empty tuple list */ return NULL; /* some more sanity checks */ if ((tupleno >= self->num_tuples) || (tupleno < 0)) /* illegal tuple number range */ return NULL; if ((fieldno >= self->num_fields) || (fieldno < 0)) /* illegel field number range */ return NULL; /* check if we are accessing the same tuple that was used in the last fetch (e.g: for fetching all the fields one after another. Do this to speed things up */ if (tupleno == self->last_indexed) return self->lastref->tuple[fieldno].value; /* now for the tricky part... */ /* Since random access is quite inefficient for linked lists we use the lastref pointer that points to the last element referenced by a get_fieldval() call in conjunction with the its index number that is stored in last_indexed. (So we use some locality of reference principle to speed things up) */ delta = tupleno - self->last_indexed; /* if delta is positive, we have to go forward */ /* now check if we are closer to the start or the end of the list than to our last_indexed pointer */ from_end = (self->num_tuples - 1) - tupleno; start_is_closer = labs(delta) > tupleno; /* true if we are closer to the start of the list than to the last_indexed pointer */ end_is_closer = labs(delta) > from_end; /* true if we are closer at the end of the list */ if (end_is_closer) { /* scanning from the end is the shortest way. so we do that... */ rv = self->list_end; for (lf=0; lf < from_end; lf++) rv = rv->prev; } else if (start_is_closer) { /* the shortest way is to start the search from the head of the list */ rv = self->list_start; for (lf=0; lf < tupleno; lf++) rv = rv->next; } else { /* the closest way is starting from our lastref - pointer */ rv = self->lastref; /* at first determine whether we have to search forward or backwards */ if (delta < 0) { /* we have to search backwards */ for(lf=0; lf < (-1)*delta; lf++) rv = rv->prev; } else { /* ok, we have to search forward... */ for (lf=0; lf < delta; lf++) rv = rv->next; } } /* now we have got our return pointer, so update the lastref and the last_indexed values */ self->lastref = rv; self->last_indexed = tupleno; return rv->tuple[fieldno].value; } char TL_add_tuple(TupleListClass *self, TupleNode *new_field) { /* we append the tuple at the end of the doubly linked list of the tuples we have already read in */ new_field->prev = NULL; new_field->next = NULL; if (self->list_start == NULL) { /* the list is empty, we have to add the first tuple */ self->list_start = new_field; self->list_end = new_field; self->lastref = new_field; self->last_indexed = 0; } else { /* there is already an element in the list, so add the new one at the end of the list */ self->list_end->next = new_field; new_field->prev = self->list_end; self->list_end = new_field; } self->num_tuples++; /* this method of building a list cannot fail, so we return 1 */ return 1; } unixODBC-2.2.14-p2/Drivers/Postgre7.1/bind.h0100644000076400007640000000221407410367416016560 0ustar nicknick /* File: bind.h * * Description: See "bind.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __BIND_H__ #define __BIND_H__ #include "psqlodbc.h" /* * BindInfoClass -- stores information about a bound column */ struct BindInfoClass_ { Int4 buflen; /* size of buffer */ Int4 data_left; /* amount of data left to read (SQLGetData) */ char *buffer; /* pointer to the buffer */ SQLLEN *used; /* used space in the buffer (for strings not counting the '\0') */ Int2 returntype; /* kind of conversion to be applied when returning (SQL_C_DEFAULT, SQL_C_CHAR...) */ }; /* * ParameterInfoClass -- stores information about a bound parameter */ struct ParameterInfoClass_ { Int4 buflen; char *buffer; SQLLEN *used; Int2 paramType; Int2 CType; Int2 SQLType; UInt4 precision; Int2 scale; Oid lobj_oid; Int4 *EXEC_used; /* amount of data OR the oid of the large object */ char *EXEC_buffer; /* the data or the FD of the large object */ char data_at_exec; }; BindInfoClass *create_empty_bindings(int num_columns); void extend_bindings(StatementClass *stmt, int num_columns); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/columninfo.h0100644000076400007640000000257607530133125020017 0ustar nicknick /* File: columninfo.h * * Description: See "columninfo.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __COLUMNINFO_H__ #define __COLUMNINFO_H__ #include "psqlodbc.h" struct ColumnInfoClass_ { Int2 num_fields; char **name; /* list of type names */ Oid *adtid; /* list of type ids */ Int2 *adtsize; /* list type sizes */ Int2 *display_size; /* the display size (longest row) */ Int4 *atttypmod; /* the length of bpchar/varchar */ }; #define CI_get_num_fields(self) ((self) ? (self->num_fields) : (-1)) #define CI_get_oid(self, col) (self->adtid[col]) #define CI_get_fieldname(self, col) (self->name[col]) #define CI_get_fieldsize(self, col) (self->adtsize[col]) #define CI_get_display_size(self, col) (self->display_size[col]) #define CI_get_atttypmod(self, col) (self->atttypmod[col]) ColumnInfoClass *CI_Constructor(void); void CI_Destructor(ColumnInfoClass *self); void CI_free_memory(ColumnInfoClass *self); char CI_read_fields(ColumnInfoClass *self, ConnectionClass *conn); /* functions for setting up the fields from within the program, */ /* without reading from a socket */ void CI_set_num_fields(ColumnInfoClass *self, int new_num_fields); void CI_set_field_info(ColumnInfoClass *self, int field_num, char *new_name, Oid new_adtid, Int2 new_adtsize, Int4 atttypmod); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/connection.h0100644000076400007640000002456110124241103017770 0ustar nicknick /* File: connection.h * * Description: See "connection.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __CONNECTION_H__ #define __CONNECTION_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #ifndef WIN32 #include "isql.h" #include "isqlext.h" #else #include #include #include #endif typedef enum { CONN_NOT_CONNECTED, /* Connection has not been established */ CONN_CONNECTED, /* Connection is up and has been established */ CONN_DOWN, /* Connection is broken */ CONN_EXECUTING /* the connection is currently executing a statement */ } CONN_Status; /* These errors have general sql error state */ #define CONNECTION_SERVER_NOT_REACHED 101 #define CONNECTION_MSG_TOO_LONG 103 #define CONNECTION_COULD_NOT_SEND 104 #define CONNECTION_NO_SUCH_DATABASE 105 #define CONNECTION_BACKEND_CRAZY 106 #define CONNECTION_NO_RESPONSE 107 #define CONNECTION_SERVER_REPORTED_ERROR 108 #define CONNECTION_COULD_NOT_RECEIVE 109 #define CONNECTION_SERVER_REPORTED_WARNING 110 #define CONNECTION_NEED_PASSWORD 112 /* These errors correspond to specific SQL states */ #define CONN_INIREAD_ERROR 201 #define CONN_OPENDB_ERROR 202 #define CONN_STMT_ALLOC_ERROR 203 #define CONN_IN_USE 204 #define CONN_UNSUPPORTED_OPTION 205 /* Used by SetConnectoption to indicate unsupported options */ #define CONN_INVALID_ARGUMENT_NO 206 /* SetConnectOption: corresponds to ODBC--"S1009" */ #define CONN_TRANSACT_IN_PROGRES 207 #define CONN_NO_MEMORY_ERROR 208 #define CONN_NOT_IMPLEMENTED_ERROR 209 #define CONN_INVALID_AUTHENTICATION 210 #define CONN_AUTH_TYPE_UNSUPPORTED 211 #define CONN_UNABLE_TO_LOAD_DLL 212 #define CONN_OPTION_VALUE_CHANGED 213 #define CONN_VALUE_OUT_OF_RANGE 214 #define CONN_TRUNCATED 215 /* Conn_status defines */ #define CONN_IN_AUTOCOMMIT 0x01 #define CONN_IN_TRANSACTION 0x02 /* AutoCommit functions */ #define CC_set_autocommit_off(x) (x->transact_status &= ~CONN_IN_AUTOCOMMIT) #define CC_set_autocommit_on(x) (x->transact_status |= CONN_IN_AUTOCOMMIT) #define CC_is_in_autocommit(x) (x->transact_status & CONN_IN_AUTOCOMMIT) /* Transaction in/not functions */ #define CC_set_in_trans(x) (x->transact_status |= CONN_IN_TRANSACTION) #define CC_set_no_trans(x) (x->transact_status &= ~CONN_IN_TRANSACTION) #define CC_is_in_trans(x) (x->transact_status & CONN_IN_TRANSACTION) #define CC_get_errornumber(x) (x->__error_number) #define CC_get_errormsg(x) (x->__error_message) #define CC_set_errornumber(x, n) (x->__error_number = n) /* Authentication types */ #define AUTH_REQ_OK 0 #define AUTH_REQ_KRB4 1 #define AUTH_REQ_KRB5 2 #define AUTH_REQ_PASSWORD 3 #define AUTH_REQ_CRYPT 4 #define AUTH_REQ_MD5 5 #define AUTH_REQ_SCM_CREDS 6 /* Startup Packet sizes */ #define SM_DATABASE 64 #define SM_USER 32 #define SM_OPTIONS 64 #define SM_UNUSED 64 #define SM_TTY 64 /* Old 6.2 protocol defines */ #define NO_AUTHENTICATION 7 #define PATH_SIZE 64 #define ARGV_SIZE 64 #define NAMEDATALEN 16 typedef unsigned int ProtocolVersion; #define PG_PROTOCOL(major, minor) (((major) << 16) | (minor)) #define PG_PROTOCOL_LATEST PG_PROTOCOL(2, 0) #define PG_PROTOCOL_63 PG_PROTOCOL(1, 0) #define PG_PROTOCOL_62 PG_PROTOCOL(0, 0) /* This startup packet is to support latest Postgres protocol (6.4, 6.3) */ typedef struct _StartupPacket { ProtocolVersion protoVersion; char database[SM_DATABASE]; char user[SM_USER]; char options[SM_OPTIONS]; char unused[SM_UNUSED]; char tty[SM_TTY]; } StartupPacket; /* This startup packet is to support pre-Postgres 6.3 protocol */ typedef struct _StartupPacket6_2 { unsigned int authtype; char database[PATH_SIZE]; char user[NAMEDATALEN]; char options[ARGV_SIZE]; char execfile[ARGV_SIZE]; char tty[PATH_SIZE]; } StartupPacket6_2; /* Structure to hold all the connection attributes for a specific connection (used for both registry and file, DSN and DRIVER) */ typedef struct { char dsn[MEDIUM_REGISTRY_LEN]; char desc[MEDIUM_REGISTRY_LEN]; char driver[MEDIUM_REGISTRY_LEN]; char server[MEDIUM_REGISTRY_LEN]; char database[MEDIUM_REGISTRY_LEN]; char username[MEDIUM_REGISTRY_LEN]; char password[MEDIUM_REGISTRY_LEN]; char conn_settings[LARGE_REGISTRY_LEN]; char protocol[SMALL_REGISTRY_LEN]; char port[SMALL_REGISTRY_LEN]; char uds[LARGE_REGISTRY_LEN]; char onlyread[SMALL_REGISTRY_LEN]; char fake_oid_index[SMALL_REGISTRY_LEN]; char show_oid_column[SMALL_REGISTRY_LEN]; char row_versioning[SMALL_REGISTRY_LEN]; char show_system_tables[SMALL_REGISTRY_LEN]; char translation_dll[MEDIUM_REGISTRY_LEN]; char translation_option[SMALL_REGISTRY_LEN]; char focus_password; } ConnInfo; /* Macro to determine is the connection using 6.2 protocol? */ #define PROTOCOL_62(conninfo_) (strncmp((conninfo_)->protocol, PG62, strlen(PG62)) == 0) /* Macro to determine is the connection using 6.3 protocol? */ #define PROTOCOL_63(conninfo_) (strncmp((conninfo_)->protocol, PG63, strlen(PG63)) == 0) /* * Macros to compare the server's version with a specified version * 1st parameter: pointer to a ConnectionClass object * 2nd parameter: major version number * 3rd parameter: minor version number */ #define SERVER_VERSION_GT(conn, major, minor) \ ((conn)->pg_version_major > major || \ ((conn)->pg_version_major == major && (conn)->pg_version_minor > minor)) #define SERVER_VERSION_GE(conn, major, minor) \ ((conn)->pg_version_major > major || \ ((conn)->pg_version_major == major && (conn)->pg_version_minor >= minor)) #define SERVER_VERSION_EQ(conn, major, minor) \ ((conn)->pg_version_major == major && (conn)->pg_version_minor == minor) #define SERVER_VERSION_LE(conn, major, minor) (! SERVER_VERSION_GT(conn, major, minor)) #define SERVER_VERSION_LT(conn, major, minor) (! SERVER_VERSION_GE(conn, major, minor)) /*#if ! defined(HAVE_CONFIG_H) || defined(HAVE_STRINGIZE)*/ #define STRING_AFTER_DOT(string) (strchr(#string, '.') + 1) /*#else #define STRING_AFTER_DOT(str) (strchr("str", '.') + 1) #endif*/ /* * Simplified macros to compare the server's version with a * specified version * Note: Never pass a variable as the second parameter. * It must be a decimal constant of the form %d.%d . */ #define PG_VERSION_GT(conn, ver) \ (SERVER_VERSION_GT(conn, (int) ver, atoi(STRING_AFTER_DOT(ver)))) #define PG_VERSION_GE(conn, ver) \ (SERVER_VERSION_GE(conn, (int) ver, atoi(STRING_AFTER_DOT(ver)))) #define PG_VERSION_EQ(conn, ver) \ (SERVER_VERSION_EQ(conn, (int) ver, atoi(STRING_AFTER_DOT(ver)))) #define PG_VERSION_LE(conn, ver) (! PG_VERSION_GT(conn, ver)) #define PG_VERSION_LT(conn, ver) (! PG_VERSION_GE(conn, ver)) /* This is used to store cached table information in the connection */ struct col_info { QResultClass *result; char name[MAX_TABLE_LEN+1]; }; /* Translation DLL entry points */ #ifdef WIN32 #define DLLHANDLE HINSTANCE #else #define WINAPI CALLBACK #define DLLHANDLE void * #define HINSTANCE void * #endif typedef BOOL (FAR WINAPI *DataSourceToDriverProc) (UDWORD, SWORD, PTR, SDWORD, PTR, SDWORD, SDWORD FAR *, UCHAR FAR *, SWORD, SWORD FAR *); typedef BOOL (FAR WINAPI *DriverToDataSourceProc) (UDWORD, SWORD, PTR, SDWORD, PTR, SDWORD, SDWORD FAR *, UCHAR FAR *, SWORD, SWORD FAR *); /******* The Connection handle ************/ struct ConnectionClass_ { HENV henv; /* environment this connection was created on */ StatementOptions stmtOptions; char *__error_message; int __error_number; CONN_Status status; ConnInfo connInfo; StatementClass **stmts; int num_stmts; SocketClass *sock; int lobj_type; int ntables; COL_INFO **col_info; long translation_option; HINSTANCE translation_handle; DataSourceToDriverProc DataSourceToDriver; DriverToDataSourceProc DriverToDataSource; Int2 driver_version; /* prepared for ODBC3.0 */ char transact_status; /* Is a transaction is currently in progress */ char errormsg_created; /* has an informative error msg been created? */ char pg_version[MAX_INFO_STRING]; /* Version of PostgreSQL we're connected to - DJP 25-1-2001 */ float pg_version_number; Int2 pg_version_major; Int2 pg_version_minor; char ms_jet; char unicode; char result_uncommitted; char schema_support; char *client_encoding; char *server_encoding; int ccsc; int be_pid; /* pid returned by backend */ int be_key; /* auth code needed to send cancel */ UInt4 isolation; char *current_schema; int num_discardp; char **discardp; #if (ODBCVER >= 0x0300) int num_descs; DescriptorClass **descs; #endif /* ODBCVER */ #if defined(WIN_MULTITHREAD_SUPPORT) CRITICAL_SECTION cs; #elif defined(POSIX_THREADMUTEX_SUPPORT) pthread_mutex_t cs; #endif /* WIN_MULTITHREAD_SUPPORT */ }; /* Accessor functions */ #define CC_get_socket(x) (x->sock) #define CC_get_database(x) (x->connInfo.database) #define CC_get_server(x) (x->connInfo.server) #define CC_get_DSN(x) (x->connInfo.dsn) #define CC_get_username(x) (x->connInfo.username) #define CC_is_onlyread(x) (x->connInfo.onlyread[0] == '1') /* for CC_DSN_info */ #define CONN_DONT_OVERWRITE 0 #define CONN_OVERWRITE 1 /* prototypes */ ConnectionClass *CC_Constructor(void); char CC_Destructor(ConnectionClass *self); int CC_cursor_count(ConnectionClass *self); char CC_cleanup(ConnectionClass *self); char CC_abort(ConnectionClass *self); int CC_set_translation (ConnectionClass *self); char CC_connect(ConnectionClass *self, char password_req, char *salt_para); char CC_add_statement(ConnectionClass *self, StatementClass *stmt); char CC_remove_statement(ConnectionClass *self, StatementClass *stmt); void CC_set_error(ConnectionClass *self, int number, const char *message); void CC_set_errormsg(ConnectionClass *self, const char *message); char CC_get_error(ConnectionClass *self, int *number, char **message); QResultClass *CC_send_query(ConnectionClass *self, char *query, QueryInfo *qi); void CC_clear_error(ConnectionClass *self); char *CC_create_errormsg(ConnectionClass *self); int CC_send_function(ConnectionClass *conn, int fnid, void *result_buf, int *actual_result_len, int result_is_int, LO_ARG *argv, int nargs); char CC_send_settings(ConnectionClass *self); void CC_lookup_lo(ConnectionClass *conn); void CC_lookup_pg_version(ConnectionClass *conn); void CC_initialize_pg_version(ConnectionClass *conn); void CC_log_error(char *func, char *desc, ConnectionClass *self); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/convert.h0100644000076400007640000000300607475155224017327 0ustar nicknick /* File: convert.h * * Description: See "convert.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __CONVERT_H__ #define __CONVERT_H__ #include "psqlodbc.h" /* copy_and_convert results */ #define COPY_OK 0 #define COPY_UNSUPPORTED_TYPE 1 #define COPY_UNSUPPORTED_CONVERSION 2 #define COPY_RESULT_TRUNCATED 3 #define COPY_GENERAL_ERROR 4 #define COPY_NO_DATA_FOUND 5 typedef struct { int m; int d; int y; int hh; int mm; int ss; } SIMPLE_TIME; int copy_and_convert_field_bindinfo(StatementClass *stmt, Int4 field_type, void *value, int col); int copy_and_convert_field(StatementClass *stmt, Int4 field_type, void *value, Int2 fCType, PTR rgbValue, SDWORD cbValueMax, SQLLEN *pcbValue); int copy_statement_with_parameters(StatementClass *stmt); char *convert_escape(char *value); char *convert_money(char *s); char parse_datetime(char *buf, SIMPLE_TIME *st); int convert_linefeeds(char *s, char *dst, size_t max); char *convert_special_chars(char *si, char *dst, int used); int convert_pgbinary_to_char(char *value, char *rgbValue, int cbValueMax); int convert_from_pgbinary(unsigned char *value, unsigned char *rgbValue, int cbValueMax); int convert_to_pgbinary(unsigned char *in, char *out, int len); void encode(char *in, char *out); void decode(char *in, char *out); int convert_lo(StatementClass *stmt, void *value, Int2 fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD *pcbValue); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/dlg_specific.h0100644000076400007640000001203007423053523020247 0ustar nicknick /* File: dlg_specific.h * * Description: See "dlg_specific.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __DLG_SPECIFIC_H__ #define __DLG_SPECIFIC_H__ #ifdef HAVE_CONFIG_H einclude "config.h" #endif #include "psqlodbc.h" #include "connection.h" #ifdef WIN32 #include #include #include #include "resource.h" #endif /* Unknown data type sizes */ #define UNKNOWNS_AS_MAX 0 #define UNKNOWNS_AS_DONTKNOW 1 #define UNKNOWNS_AS_LONGEST 2 /* INI File Stuff */ #ifndef WIN32 #ifdef UNIXODBC #define ODBC_INI "ODBC.INI" /* ODBC initialization file */ #define ODBCINST_INI "ODBCINST.INI" /* ODBC Installation file */ #else # define ODBC_INI ".odbc.ini" # ifdef ODBCINSTDIR # define ODBCINST_INI ODBCINSTDIR "/odbcinst.ini" # else # define ODBCINST_INI "/etc/odbcinst.ini" # endif #endif #else /* WIN32 */ # define ODBC_INI "ODBC.INI" /* ODBC initialization file */ # define ODBCINST_INI "ODBCINST.INI" /* ODBC Installation file */ #endif /* WIN32 */ #define INI_DSN DBMS_NAME /* Name of default Datasource in ini file (not used?) */ #define INI_KDESC "Description" /* Data source description */ #define INI_SERVER "Servername" /* Name of Server running the Postgres service */ #define INI_PORT "Port" /* Port on which the Postmaster is listening */ #define INI_UDS "Uds" /* Unix Domain socket path */ #define INI_DATABASE "Database" /* Database Name */ #define INI_USER "Username" /* Default User Name */ #define INI_PASSWORD "Password" /* Default Password */ #define INI_DEBUG "Debug" /* Debug flag */ #define INI_FETCH "Fetch" /* Fetch Max Count */ #define INI_SOCKET "Socket" /* Socket buffer size */ #define INI_READONLY "ReadOnly" /* Database is read only */ #define INI_COMMLOG "CommLog" /* Communication to backend logging */ #define INI_PROTOCOL "Protocol" /* What protocol (6.2) */ #define INI_OPTIMIZER "Optimizer" /* Use backend genetic optimizer */ #define INI_KSQO "Ksqo" /* Keyset query optimization */ #define INI_CONNSETTINGS "ConnSettings" /* Anything to send to backend on successful connection */ #define INI_UNIQUEINDEX "UniqueIndex" /* Recognize unique indexes */ #define INI_UNKNOWNSIZES "UnknownSizes" /* How to handle unknown result set sizes */ #define INI_CANCELASFREESTMT "CancelAsFreeStmt" #define INI_USEDECLAREFETCH "UseDeclareFetch" /* Use Declare/Fetch cursors */ /* More ini stuff */ #define INI_TEXTASLONGVARCHAR "TextAsLongVarchar" #define INI_UNKNOWNSASLONGVARCHAR "UnknownsAsLongVarchar" #define INI_BOOLSASCHAR "BoolsAsChar" #define INI_MAXVARCHARSIZE "MaxVarcharSize" #define INI_MAXLONGVARCHARSIZE "MaxLongVarcharSize" #define INI_FAKEOIDINDEX "FakeOidIndex" #define INI_SHOWOIDCOLUMN "ShowOidColumn" #define INI_ROWVERSIONING "RowVersioning" #define INI_SHOWSYSTEMTABLES "ShowSystemTables" #define INI_LIE "Lie" #define INI_PARSE "Parse" #define INI_EXTRASYSTABLEPREFIXES "ExtraSysTablePrefixes" #define INI_TRANSLATIONNAME "TranslationName" #define INI_TRANSLATIONDLL "TranslationDLL" #define INI_TRANSLATIONOPTION "TranslationOption" /* Connection Defaults */ #define DEFAULT_PORT "5432" #define DEFAULT_UDS "" #define DEFAULT_READONLY 1 #define DEFAULT_PROTOCOL "6.4" /* the latest protocol is the default */ #define DEFAULT_USEDECLAREFETCH 0 #define DEFAULT_TEXTASLONGVARCHAR 1 #define DEFAULT_UNKNOWNSASLONGVARCHAR 0 #define DEFAULT_BOOLSASCHAR 1 #define DEFAULT_OPTIMIZER 1 /* disable */ #define DEFAULT_KSQO 1 /* on */ #define DEFAULT_UNIQUEINDEX 0 /* dont recognize */ #define DEFAULT_COMMLOG 0 /* dont log */ #define DEFAULT_DEBUG 0 #define DEFAULT_UNKNOWNSIZES UNKNOWNS_AS_MAX #define DEFAULT_FAKEOIDINDEX 0 #define DEFAULT_SHOWOIDCOLUMN 0 #define DEFAULT_ROWVERSIONING 0 #define DEFAULT_SHOWSYSTEMTABLES 0 /* dont show system tables */ #define DEFAULT_LIE 0 #define DEFAULT_PARSE 0 #define DEFAULT_CANCELASFREESTMT 0 #define DEFAULT_EXTRASYSTABLEPREFIXES "dd_;" /* prototypes */ void getGlobalDefaults(char *section, char *filename, char override); #ifdef WIN32 void SetDlgStuff(HWND hdlg, ConnInfo *ci); void GetDlgStuff(HWND hdlg, ConnInfo *ci); int CALLBACK driver_optionsProc(HWND hdlg, WORD wMsg, WPARAM wParam, LPARAM lParam); int CALLBACK ds_optionsProc(HWND hdlg, WORD wMsg, WPARAM wParam, LPARAM lParam); #endif /* WIN32 */ void updateGlobals(void); void writeDSNinfo(ConnInfo *ci); void getDSNdefaults(ConnInfo *ci); void getDSNinfo(ConnInfo *ci, char overwrite); void makeConnectString(char *connect_string, ConnInfo *ci); void copyAttributes(ConnInfo *ci, char *attribute, char *value); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/environ.h0100644000076400007640000000166007474703172017333 0ustar nicknick /* File: environ.h * * Description: See "environ.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __ENVIRON_H__ #define __ENVIRON_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #ifndef WIN32 #include "isql.h" #include "isqlext.h" #else #include #include #include #endif #define ENV_ALLOC_ERROR 1 /********** Environment Handle *************/ struct EnvironmentClass_ { char *errormsg; int errornumber; }; /* Environment prototypes */ EnvironmentClass *EN_Constructor(void); char EN_Destructor(EnvironmentClass *self); char EN_get_error(EnvironmentClass *self, int *number, char **message); char EN_add_connection(EnvironmentClass *self, ConnectionClass *conn); char EN_remove_connection(EnvironmentClass *self, ConnectionClass *conn); void EN_log_error(char *func, char *desc, EnvironmentClass *self); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/isql.h0100644000076400007640000000002107363332152016602 0ustar nicknick#include unixODBC-2.2.14-p2/Drivers/Postgre7.1/isqlext.h0100644000076400007640000000002407363332152017326 0ustar nicknick#include unixODBC-2.2.14-p2/Drivers/Postgre7.1/lobj.h0100644000076400007640000000200510021405715016553 0ustar nicknick /* File: lobj.h * * Description: See "lobj.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __LOBJ_H__ #define __LOBJ_H__ #include "psqlodbc.h" struct lo_arg { int isint; int len; union { int integer; char *ptr; } u; }; #define LO_CREAT 957 #define LO_OPEN 952 #define LO_CLOSE 953 #define LO_READ 954 #define LO_WRITE 955 #define LO_LSEEK 956 #define LO_TELL 958 #define LO_UNLINK 964 #define INV_WRITE 0x00020000 #define INV_READ 0x00040000 Oid odbc_lo_creat(ConnectionClass *conn, int mode); int odbc_lo_open(ConnectionClass *conn, int lobjId, int mode); int odbc_lo_close(ConnectionClass *conn, int fd); int odbc_lo_read(ConnectionClass *conn, int fd, char *buf, int len); int odbc_lo_write(ConnectionClass *conn, int fd, char *buf, int len); int odbc_lo_lseek(ConnectionClass *conn, int fd, int offset, int len); int odbc_lo_tell(ConnectionClass *conn, int fd); int odbc_lo_unlink(ConnectionClass *conn, Oid lobjId); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/md5.h0100644000076400007640000000156110150375475016334 0ustar nicknick/* File: md5.h * * Description: See "md5.h" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __MD5_H__ #define __MD5_H__ #include "psqlodbc.h" #include #include #define MD5_PASSWD_LEN 35 /* From c.h */ #ifndef __BEOS__ #ifndef __cplusplus #ifndef bool typedef char bool; #endif #ifndef true #define true ((bool) 1) #endif #ifndef false #define false ((bool) 0) #endif #endif /* not C++ */ #endif /* __BEOS__ */ /* Also defined in include/c.h */ #ifndef HAVE_UINT8 typedef unsigned char uint8; /* == 8 bits */ typedef unsigned short uint16; /* == 16 bits */ typedef unsigned int uint32; /* == 32 bits */ #endif /* not HAVE_UINT8 */ extern bool md5_hash(const void *buff, size_t len, char *hexsum); extern bool EncryptMD5(const char *passwd, const char *salt, size_t salt_len, char *buf); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/misc.h0100644000076400007640000000466207406123160016577 0ustar nicknick /* File: misc.h * * Description: See "misc.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __MISC_H__ #define __MISC_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef WIN32 #ifdef UNIXODBC # include #else # include "gpps.h" # define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f) # endif #endif #include /* Uncomment MY_LOG define to compile in the mylog() statements. Then, debug logging will occur if 'Debug' is set to 1 in the ODBCINST.INI portion of the registry. You may have to manually add this key. This logfile is intended for development use, not for an end user! */ #define MY_LOG /* Uncomment Q_LOG to compile in the qlog() statements (Communications log, i.e. CommLog). This logfile contains serious log statements that are intended for an end user to be able to read and understand. It is controlled by the 'CommLog' flag in the ODBCINST.INI portion of the registry (see above), which is manipulated on the setup/connection dialog boxes. */ #define Q_LOG #ifdef MY_LOG #define MYLOGFILE "mylog_" #ifndef WIN32 #define MYLOGDIR "/tmp" #else #define MYLOGDIR "c:" #endif extern void mylog(char * fmt, ...); #else #ifndef WIN32 #define mylog(args...) /* GNU convention for variable arguments */ #else #define mylog /* mylog */ #endif #endif #ifdef Q_LOG #define QLOGFILE "psqlodbc_" #ifndef WIN32 #define QLOGDIR "/tmp" #else #define QLOGDIR "c:" #endif extern void qlog(char * fmt, ...); #else #ifndef WIN32 #define qlog(args...) /* GNU convention for variable arguments */ #else #define qlog /* qlog */ #endif #endif #ifndef WIN32 #define DIRSEPARATOR "/" #else #define DIRSEPARATOR "\\" #endif #ifdef WIN32 #define PG_BINARY O_BINARY #define PG_BINARY_R "rb" #define PG_BINARY_W "wb" #else #define PG_BINARY 0 #define PG_BINARY_R "r" #define PG_BINARY_W "w" #endif void remove_newlines(char *string); char *strncpy_null(char *dst, const char *src, int len); char *trim(char *string); char *make_string(char *s, int len, char *buf); char *my_strcat(char *buf, char *fmt, char *s, int len); int my_strlen(char *s, int len); /* defines for return value of my_strcpy */ #define STRCPY_SUCCESS 1 #define STRCPY_FAIL 0 #define STRCPY_TRUNCATED -1 #define STRCPY_NULL -2 int my_strcpy(char *dst, int dst_len, char *src, int src_len); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/pgtypes.h0100644000076400007640000000612007526660772017350 0ustar nicknick /* File: pgtypes.h * * Description: See "pgtypes.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __PGTYPES_H__ #define __PGTYPES_H__ #include "psqlodbc.h" /* the type numbers are defined by the OID's of the types' rows */ /* in table pg_type */ #if 0 #define PG_TYPE_LO ???? /* waiting for permanent type */ #endif #define PG_TYPE_BOOL 16 #define PG_TYPE_BYTEA 17 #define PG_TYPE_CHAR 18 #define PG_TYPE_NAME 19 #define PG_TYPE_INT8 20 #define PG_TYPE_INT2 21 #define PG_TYPE_INT2VECTOR 22 #define PG_TYPE_INT4 23 #define PG_TYPE_REGPROC 24 #define PG_TYPE_TEXT 25 #define PG_TYPE_OID 26 #define PG_TYPE_TID 27 #define PG_TYPE_XID 28 #define PG_TYPE_CID 29 #define PG_TYPE_OIDVECTOR 30 #define PG_TYPE_SET 32 #define PG_TYPE_CHAR2 409 #define PG_TYPE_CHAR4 410 #define PG_TYPE_CHAR8 411 #define PG_TYPE_POINT 600 #define PG_TYPE_LSEG 601 #define PG_TYPE_PATH 602 #define PG_TYPE_BOX 603 #define PG_TYPE_POLYGON 604 #define PG_TYPE_FILENAME 605 #define PG_TYPE_FLOAT4 700 #define PG_TYPE_FLOAT8 701 #define PG_TYPE_ABSTIME 702 #define PG_TYPE_RELTIME 703 #define PG_TYPE_TINTERVAL 704 #define PG_TYPE_UNKNOWN 705 #define PG_TYPE_MONEY 790 #define PG_TYPE_OIDINT2 810 #define PG_TYPE_OIDINT4 910 #define PG_TYPE_OIDNAME 911 #define PG_TYPE_BPCHAR 1042 #define PG_TYPE_VARCHAR 1043 #define PG_TYPE_DATE 1082 #define PG_TYPE_TIME 1083 #define PG_TYPE_DATETIME 1184 #define PG_TYPE_TIMESTAMP 1296 #define PG_TYPE_NUMERIC 1700 #define PG_TYPE_TIMESTAMP_NO_TMZONE 1114 /* extern Int4 pgtypes_defined[]; */ extern Int2 sqlTypes[]; /* Defines for pgtype_precision */ #define PG_STATIC -1 Int4 sqltype_to_pgtype(Int2 fSqlType); Int2 pgtype_to_sqltype(StatementClass *stmt, Int4 type); Int2 pgtype_to_ctype(StatementClass *stmt, Int4 type); char *pgtype_to_name(StatementClass *stmt, Int4 type); /* These functions can use static numbers or result sets(col parameter) */ Int4 pgtype_precision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as); Int4 pgtype_display_size(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as); Int4 pgtype_length(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as); Int2 pgtype_scale(StatementClass *stmt, Int4 type, int col); Int2 pgtype_radix(StatementClass *stmt, Int4 type); Int2 pgtype_nullable(StatementClass *stmt, Int4 type); Int2 pgtype_auto_increment(StatementClass *stmt, Int4 type); Int2 pgtype_case_sensitive(StatementClass *stmt, Int4 type); Int2 pgtype_money(StatementClass *stmt, Int4 type); Int2 pgtype_searchable(StatementClass *stmt, Int4 type); Int2 pgtype_unsigned(StatementClass *stmt, Int4 type); char *pgtype_literal_prefix(StatementClass *stmt, Int4 type); char *pgtype_literal_suffix(StatementClass *stmt, Int4 type); char *pgtype_create_params(StatementClass *stmt, Int4 type); Int2 sqltype_to_default_ctype(Int2 sqltype); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/psqlodbc.h0100644000076400007640000001165407624477630017472 0ustar nicknick /* File: psqlodbc.h * * Description: This file contains defines and declarations that are related to * the entire driver. * * Comments: See "notice.txt" for copyright and license information. * * $Id: psqlodbc.h,v 1.4 2003/02/18 18:46:48 lurcher Exp $ */ #ifndef __PSQLODBC_H__ #define __PSQLODBC_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /* for FILE* pointers: see GLOBAL_VALUES */ #ifndef WIN32 #include /* for prototype of atof() etc */ #define Int4 int #define UInt4 unsigned int #define Int2 short #define UInt2 unsigned short #else #define Int4 int #define UInt4 unsigned int #define Int2 short #define UInt2 unsigned short #endif typedef UInt4 Oid; #undef ODBCVER /* Driver stuff */ #define ODBCVER 0x0250 #define DRIVER_ODBC_VER "02.50" #define DRIVERNAME "PostgreSQL ODBC" #define DBMS_NAME "PostgreSQL" #define POSTGRESDRIVERVERSION "07.01.0003" #ifdef WIN32 #define DRIVER_FILE_NAME "PSQLODBC.DLL" #else #define DRIVER_FILE_NAME "libpsqlodbc.so" #endif /* Limits */ #define BLCKSZ 4096 #define MAX_MESSAGE_LEN 65536 /* This puts a limit on query size but I don't */ /* see an easy way round this - DJP 24-1-2001 */ #define MAX_CONNECT_STRING 4096 #define ERROR_MSG_LENGTH 4096 #define FETCH_MAX 100 /* default number of rows to cache for declare/fetch */ #define TUPLE_MALLOC_INC 100 #define SOCK_BUFFER_SIZE 4096 /* default socket buffer size */ #define MAX_CONNECTIONS 128 /* conns per environment (arbitrary) */ #define MAX_FIELDS 512 #define BYTELEN 8 #define VARHDRSZ sizeof(Int4) #define MAX_TABLE_LEN 32 #define MAX_COLUMN_LEN 32 #define MAX_CURSOR_LEN 32 /* Registry length limits */ #define LARGE_REGISTRY_LEN 4096 /* used for special cases */ #define MEDIUM_REGISTRY_LEN 256 /* normal size for user,database,etc. */ #define SMALL_REGISTRY_LEN 10 /* for 1/0 settings */ /* These prefixes denote system tables */ #define POSTGRES_SYS_PREFIX "pg_" #define KEYS_TABLE "dd_fkey" /* Info limits */ #define MAX_INFO_STRING 128 #define MAX_KEYPARTS 20 #define MAX_KEYLEN 512 /* max key of the form "date+outlet+invoice" */ #define MAX_ROW_SIZE 0 /* Unlimited rowsize with the Tuple Toaster */ #define MAX_STATEMENT_LEN 0 /* Unlimited statement size with 7.0 */ /* Previously, numerous query strings were defined of length MAX_STATEMENT_LEN */ /* Now that's 0, lets use this instead. DJP 24-1-2001 */ #define STD_STATEMENT_LEN MAX_MESSAGE_LEN #define PG62 "6.2" /* "Protocol" key setting to force Postgres 6.2 */ #define PG63 "6.3" /* "Protocol" key setting to force postgres 6.3 */ #define PG64 "6.4" typedef struct ConnectionClass_ ConnectionClass; typedef struct StatementClass_ StatementClass; typedef struct QResultClass_ QResultClass; typedef struct SocketClass_ SocketClass; typedef struct BindInfoClass_ BindInfoClass; typedef struct ParameterInfoClass_ ParameterInfoClass; typedef struct ColumnInfoClass_ ColumnInfoClass; typedef struct TupleListClass_ TupleListClass; typedef struct EnvironmentClass_ EnvironmentClass; typedef struct TupleNode_ TupleNode; typedef struct TupleField_ TupleField; typedef struct col_info COL_INFO; typedef struct lo_arg LO_ARG; typedef struct GlobalValues_ { int fetch_max; int socket_buffersize; int unknown_sizes; int max_varchar_size; int max_longvarchar_size; char debug; char commlog; char disable_optimizer; char ksqo; char unique_index; char onlyread; /* readonly is reserved on Digital C++ compiler */ char use_declarefetch; char text_as_longvarchar; char unknowns_as_longvarchar; char bools_as_char; char lie; char parse; char cancel_as_freestmt; char extra_systable_prefixes[MEDIUM_REGISTRY_LEN]; char conn_settings[LARGE_REGISTRY_LEN]; char protocol[SMALL_REGISTRY_LEN]; FILE* mylogFP; FILE* qlogFP; } GLOBAL_VALUES; /* * rename to avoid colision */ #define global pg_global typedef struct StatementOptions_ { int maxRows; int maxLength; int rowset_size; int keyset_size; int cursor_type; int scroll_concurrency; int retrieve_data; int bind_size; /* size of each structure if using Row Binding */ int use_bookmarks; } StatementOptions; /* Used to pass extra query info to send_query */ typedef struct QueryInfo_ { int row_size; QResultClass *result_in; char *cursor; } QueryInfo; #define PG_TYPE_LO -999 /* hack until permanent type available */ #define PG_TYPE_LO_NAME "lo" #define OID_ATTNUM -2 /* the attnum in pg_index of the oid */ /* sizes */ #define TEXT_FIELD_SIZE 65536 /* size of text fields (not including null term) */ #define NAME_FIELD_SIZE 32 /* size of name fields */ #define MAX_VARCHAR_SIZE 254 /* maximum size of a varchar (not including null term) */ #define PG_NUMERIC_MAX_PRECISION 1000 #define PG_NUMERIC_MAX_SCALE 1000 #include "misc.h" #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/qresult.h0100644000076400007640000001147007363332152017343 0ustar nicknick /* File: qresult.h * * Description: See "qresult.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __QRESULT_H__ #define __QRESULT_H__ #include "connection.h" #include "socket.h" #include "columninfo.h" #include "tuplelist.h" #include "psqlodbc.h" #include "tuple.h" enum QueryResultCode_ { PGRES_EMPTY_QUERY = 0, PGRES_COMMAND_OK, /* a query command that doesn't return */ /* anything was executed properly by the backend */ PGRES_TUPLES_OK, /* a query command that returns tuples */ /* was executed properly by the backend, PGresult */ /* contains the resulttuples */ PGRES_COPY_OUT, PGRES_COPY_IN, PGRES_BAD_RESPONSE, /* an unexpected response was recv'd from the backend */ PGRES_NONFATAL_ERROR, PGRES_FATAL_ERROR, PGRES_FIELDS_OK, /* field information from a query was successful */ PGRES_END_TUPLES, PGRES_INTERNAL_ERROR }; typedef enum QueryResultCode_ QueryResultCode; struct QResultClass_ { ColumnInfoClass *fields; /* the Column information */ TupleListClass *manual_tuples; /* manual result tuple list */ ConnectionClass *conn; /* the connection this result is using (backend) */ /* Stuff for declare/fetch tuples */ int fetch_count; /* logical rows read so far */ int fcount; /* actual rows read in the fetch */ int currTuple; int base; int num_fields; /* number of fields in the result */ int cache_size; int rowset_size; QueryResultCode status; char *message; char *cursor; /* The name of the cursor for select statements */ char *command; char *notice; TupleField *backend_tuples; /* data from the backend (the tuple cache) */ TupleField *tupleField; /* current backend tuple being retrieved */ char inTuples; /* is a fetch of rows from the backend in progress? */ char aborted; /* was aborted?*/ }; #define QR_get_fields(self) (self->fields) /* These functions are for retrieving data from the qresult */ #define QR_get_value_manual(self, tupleno, fieldno) (TL_get_fieldval(self->manual_tuples, tupleno, fieldno)) #define QR_get_value_backend(self, fieldno) (self->tupleField[fieldno].value) #define QR_get_value_backend_row(self, tupleno, fieldno) ((self->backend_tuples + (tupleno * self->num_fields))[fieldno].value) /* These functions are used by both manual and backend results */ #define QR_NumResultCols(self) (CI_get_num_fields(self->fields)) #define QR_get_fieldname(self, fieldno_) (CI_get_fieldname(self->fields, fieldno_)) #define QR_get_fieldsize(self, fieldno_) (CI_get_fieldsize(self->fields, fieldno_)) #define QR_get_display_size(self, fieldno_) (CI_get_display_size(self->fields, fieldno_)) #define QR_get_atttypmod(self, fieldno_) (CI_get_atttypmod(self->fields, fieldno_)) #define QR_get_field_type(self, fieldno_) (CI_get_oid(self->fields, fieldno_)) /* These functions are used only for manual result sets */ #define QR_get_num_tuples(self) (self->manual_tuples ? TL_get_num_tuples(self->manual_tuples) : self->fcount) #define QR_add_tuple(self, new_tuple) (TL_add_tuple(self->manual_tuples, new_tuple)) #define QR_set_field_info(self, field_num, name, adtid, adtsize) (CI_set_field_info(self->fields, field_num, name, adtid, adtsize, -1)) /* status macros */ #define QR_command_successful(self) ( !(self->status == PGRES_BAD_RESPONSE || self->status == PGRES_NONFATAL_ERROR || self->status == PGRES_FATAL_ERROR)) #define QR_command_nonfatal(self) ( self->status == PGRES_NONFATAL_ERROR) #define QR_end_tuples(self) ( self->status == PGRES_END_TUPLES) #define QR_set_status(self, condition) ( self->status = condition ) #define QR_set_message(self, message_) ( self->message = message_) #define QR_set_aborted(self, aborted_) ( self->aborted = aborted_) #define QR_get_message(self) (self->message) #define QR_get_command(self) (self->command) #define QR_get_notice(self) (self->notice) #define QR_get_status(self) (self->status) #define QR_get_aborted(self) (self->aborted) #define QR_aborted(self) (!self || self->aborted) /* Core Functions */ QResultClass *QR_Constructor(void); void QR_Destructor(QResultClass *self); char QR_read_tuple(QResultClass *self, char binary); int QR_next_tuple(QResultClass *self); int QR_close(QResultClass *self); char QR_fetch_tuples(QResultClass *self, ConnectionClass *conn, char *cursor); void QR_free_memory(QResultClass *self); void QR_set_command(QResultClass *self, char *msg); void QR_set_notice(QResultClass *self, char *msg); void QR_set_num_fields(QResultClass *self, int new_num_fields); /* manual result only */ void QR_inc_base(QResultClass *self, int base_inc); void QR_set_cache_size(QResultClass *self, int cache_size); void QR_set_rowset_size(QResultClass *self, int rowset_size); void QR_set_position(QResultClass *self, int pos); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/resource.h0100644000076400007640000000471307363332152017475 0ustar nicknick/* {{NO_DEPENDENCIES}} */ /* Microsoft Developer Studio generated include file. */ /* Used by psqlodbc.rc */ #define IDS_BADDSN 1 #define IDS_MSGTITLE 2 #define DLG_OPTIONS_DRV 102 #define DLG_OPTIONS_DS 103 #define IDC_DSNAME 400 #define IDC_DSNAMETEXT 401 #define IDC_DESC 404 #define IDC_SERVER 407 #define IDC_DATABASE 408 #define DLG_CONFIG 1001 #define IDC_PORT 1002 #define IDC_USER 1006 #define IDC_PASSWORD 1009 #define DS_READONLY 1011 #define DS_SHOWOIDCOLUMN 1012 #define DS_FAKEOIDINDEX 1013 #define DRV_COMMLOG 1014 #define DS_PG62 1016 #define IDC_DATASOURCE 1018 #define DRV_OPTIMIZER 1019 #define DS_CONNSETTINGS 1020 #define IDC_DRIVER 1021 #define DRV_CONNSETTINGS 1031 #define DRV_UNIQUEINDEX 1032 #define DRV_UNKNOWN_MAX 1035 #define DRV_UNKNOWN_DONTKNOW 1036 #define DRV_READONLY 1037 #define IDC_DESCTEXT 1039 #define DRV_MSG_LABEL 1040 #define DRV_UNKNOWN_LONGEST 1041 #define DRV_TEXT_LONGVARCHAR 1043 #define DRV_UNKNOWNS_LONGVARCHAR 1044 #define DRV_CACHE_SIZE 1045 #define DRV_VARCHAR_SIZE 1046 #define DRV_LONGVARCHAR_SIZE 1047 #define IDDEFAULTS 1048 #define DRV_USEDECLAREFETCH 1049 #define DRV_BOOLS_CHAR 1050 #define DS_SHOWSYSTEMTABLES 1051 #define DRV_EXTRASYSTABLEPREFIXES 1051 #define DS_ROWVERSIONING 1052 #define DRV_PARSE 1052 #define DRV_CANCELASFREESTMT 1053 #define IDC_OPTIONS 1054 #define DRV_KSQO 1055 #define DS_PG64 1057 #define DS_PG63 1058 /* Next default values for new objects */ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 104 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1060 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/socket.h0100644000076400007640000000441010124241103017110 0ustar nicknick /* File: socket.h * * Description: See "socket.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __SOCKET_H__ #define __SOCKET_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef WIN32 #include #include #include #include #include #include #define closesocket(xxx) close(xxx) #define SOCKETFD int #ifndef INADDR_NONE #ifndef _IN_ADDR_T #define _IN_ADDR_T typedef unsigned int in_addr_t; #endif #define INADDR_NONE ((in_addr_t)-1) #endif #else #include #define SOCKETFD SOCKET #endif #include "psqlodbc.h" #define SOCKET_ALREADY_CONNECTED 1 #define SOCKET_HOST_NOT_FOUND 2 #define SOCKET_COULD_NOT_CREATE_SOCKET 3 #define SOCKET_COULD_NOT_CONNECT 4 #define SOCKET_READ_ERROR 5 #define SOCKET_WRITE_ERROR 6 #define SOCKET_NULLPOINTER_PARAMETER 7 #define SOCKET_PUT_INT_WRONG_LENGTH 8 #define SOCKET_GET_INT_WRONG_LENGTH 9 #define SOCKET_CLOSED 10 struct SocketClass_ { int buffer_filled_in; int buffer_filled_out; int buffer_read_in; unsigned char *buffer_in; unsigned char *buffer_out; SOCKETFD socket; char *errormsg; int errornumber; char reverse; /* used to handle Postgres 6.2 protocol (reverse byte order) */ }; #define SOCK_get_char(self) (SOCK_get_next_byte(self)) #define SOCK_put_char(self, c) (SOCK_put_next_byte(self, c)) /* error functions */ #define SOCK_get_errcode(self) (self->errornumber) #define SOCK_get_errmsg(self) (self->errormsg) /* Socket prototypes */ SocketClass *SOCK_Constructor(void); void SOCK_Destructor(SocketClass *self); char SOCK_connect_to(SocketClass *self, unsigned short port, char *hostname, char*uds); void SOCK_get_n_char(SocketClass *self, char *buffer, int len); void SOCK_put_n_char(SocketClass *self, char *buffer, int len); BOOL SOCK_get_string(SocketClass *self, char *buffer, int bufsize); void SOCK_put_string(SocketClass *self, char *string); int SOCK_get_int(SocketClass *self, short len); void SOCK_put_int(SocketClass *self, int value, short len); void SOCK_flush_output(SocketClass *self); UCHAR SOCK_get_next_byte(SocketClass *self); void SOCK_put_next_byte(SocketClass *self, unsigned char next_byte); void SOCK_clear_error(SocketClass *self); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/statement.h0100644000076400007640000001507310124241103017633 0ustar nicknick /* File: statement.h * * Description: See "statement.c" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __STATEMENT_H__ #define __STATEMENT_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "psqlodbc.h" #include "bind.h" #ifndef WIN32 #include "isql.h" #else #include #include #endif #ifndef FALSE #define FALSE (BOOL)0 #endif #ifndef TRUE #define TRUE (BOOL)1 #endif typedef enum { STMT_ALLOCATED, /* The statement handle is allocated, but not used so far */ STMT_READY, /* the statement is waiting to be executed */ STMT_PREMATURE, /* ODBC states that it is legal to call e.g. SQLDescribeCol before a call to SQLExecute, but after SQLPrepare. To get all the necessary information in such a case, we simply execute the query _before_ the actual call to SQLExecute, so that statement is considered to be "premature". */ STMT_FINISHED, /* statement execution has finished */ STMT_EXECUTING /* statement execution is still going on */ } STMT_Status; #define STMT_TRUNCATED -2 #define STMT_INFO_ONLY -1 /* not an error message, just a notification to be returned by SQLError */ #define STMT_OK 0 /* will be interpreted as "no error pending" */ #define STMT_EXEC_ERROR 1 #define STMT_STATUS_ERROR 2 #define STMT_SEQUENCE_ERROR 3 #define STMT_NO_MEMORY_ERROR 4 #define STMT_COLNUM_ERROR 5 #define STMT_NO_STMTSTRING 6 #define STMT_ERROR_TAKEN_FROM_BACKEND 7 #define STMT_INTERNAL_ERROR 8 #define STMT_STILL_EXECUTING 9 #define STMT_NOT_IMPLEMENTED_ERROR 10 #define STMT_BAD_PARAMETER_NUMBER_ERROR 11 #define STMT_OPTION_OUT_OF_RANGE_ERROR 12 #define STMT_INVALID_COLUMN_NUMBER_ERROR 13 #define STMT_RESTRICTED_DATA_TYPE_ERROR 14 #define STMT_INVALID_CURSOR_STATE_ERROR 15 #define STMT_OPTION_VALUE_CHANGED 16 #define STMT_CREATE_TABLE_ERROR 17 #define STMT_NO_CURSOR_NAME 18 #define STMT_INVALID_CURSOR_NAME 19 #define STMT_INVALID_ARGUMENT_NO 20 #define STMT_ROW_OUT_OF_RANGE 21 #define STMT_OPERATION_CANCELLED 22 #define STMT_INVALID_CURSOR_POSITION 23 #define STMT_VALUE_OUT_OF_RANGE 24 #define STMT_OPERATION_INVALID 25 #define STMT_PROGRAM_TYPE_OUT_OF_RANGE 26 #define STMT_BAD_ERROR 27 /* statement types */ enum { STMT_TYPE_UNKNOWN = -2, STMT_TYPE_OTHER = -1, STMT_TYPE_SELECT = 0, STMT_TYPE_INSERT, STMT_TYPE_UPDATE, STMT_TYPE_DELETE, STMT_TYPE_CREATE, STMT_TYPE_ALTER, STMT_TYPE_DROP, STMT_TYPE_GRANT, STMT_TYPE_REVOKE }; #define STMT_UPDATE(stmt) (stmt->statement_type > STMT_TYPE_SELECT) /* Parsing status */ enum { STMT_PARSE_NONE = 0, STMT_PARSE_COMPLETE, STMT_PARSE_INCOMPLETE, STMT_PARSE_FATAL }; /* Result style */ enum { STMT_FETCH_NONE = 0, STMT_FETCH_NORMAL, STMT_FETCH_EXTENDED }; typedef struct { COL_INFO *col_info; /* cached SQLColumns info for this table */ char name[MAX_TABLE_LEN+1]; char alias[MAX_TABLE_LEN+1]; } TABLE_INFO; typedef struct { TABLE_INFO *ti; /* resolve to explicit table names */ int precision; int display_size; int length; int type; char nullable; char func; char expr; char quote; char dquote; char numeric; char dot[MAX_TABLE_LEN+1]; char name[MAX_COLUMN_LEN+1]; char alias[MAX_COLUMN_LEN+1]; } FIELD_INFO; /******** Statement Handle ***********/ struct StatementClass_ { ConnectionClass *hdbc; /* pointer to ConnectionClass this statement belongs to */ QResultClass *result; /* result of the current statement */ HSTMT FAR *phstmt; StatementOptions options; STMT_Status status; char *__error_message; int __error_number; /* information on bindings */ BindInfoClass *bindings; /* array to store the binding information */ BindInfoClass bookmark; int bindings_allocated; /* information on statement parameters */ int parameters_allocated; ParameterInfoClass *parameters; Int4 currTuple; /* current absolute row number (GetData, SetPos, SQLFetch) */ int save_rowset_size; /* saved rowset size in case of change/FETCH_NEXT */ int rowset_start; /* start of rowset (an absolute row number) */ int bind_row; /* current offset for Multiple row/column binding */ int last_fetch_count; /* number of rows retrieved in last fetch/extended fetch */ int current_col; /* current column for GetData -- used to handle multiple calls */ int lobj_fd; /* fd of the current large object */ char *statement; /* if non--null pointer to the SQL statement that has been executed */ TABLE_INFO **ti; FIELD_INFO **fi; int nfld; int ntab; int parse_status; int statement_type; /* According to the defines above */ int data_at_exec; /* Number of params needing SQLPutData */ int current_exec_param; /* The current parameter for SQLPutData */ char put_data; /* Has SQLPutData been called yet? */ char errormsg_created; /* has an informative error msg been created? */ char manual_result; /* Is the statement result manually built? */ char prepare; /* is this statement a prepared statement or direct */ char internal; /* Is this statement being called internally? */ char cursor_name[MAX_CURSOR_LEN+1]; char stmt_with_params[STD_STATEMENT_LEN]; /* statement after parameter substitution */ int reexecute; }; #define SC_get_conn(a) (a->hdbc) #define SC_get_Result(a) (a->result); #define SC_get_errornumber(a) (a->__error_number) #define SC_set_errornumber(a, n) (a->__error_number = n) #define SC_get_errormsg(a) (a->__error_message) /* options for SC_free_params() */ #define STMT_FREE_PARAMS_ALL 0 #define STMT_FREE_PARAMS_DATA_AT_EXEC_ONLY 1 /* Statement prototypes */ StatementClass *SC_Constructor(void); void InitializeStatementOptions(StatementOptions *opt); char SC_Destructor(StatementClass *self); int statement_type(char *statement); char parse_statement(StatementClass *stmt); void SC_pre_execute(StatementClass *self); char SC_unbind_cols(StatementClass *self); char SC_recycle_statement(StatementClass *self); void SC_clear_error(StatementClass *self); void SC_set_error(StatementClass *self, int errnum, const char *msg); void SC_set_errormsg(StatementClass *self, const char *msg); char SC_get_error(StatementClass *self, int *number, char **message); char *SC_create_errormsg(StatementClass *self); RETCODE SC_execute(StatementClass *self); RETCODE SC_fetch(StatementClass *self); void SC_free_params(StatementClass *self, char option); void SC_log_error(char *func, char *desc, StatementClass *self); unsigned long SC_get_bookmark(StatementClass *self); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/tuple.h0100644000076400007640000000306307363332152016774 0ustar nicknick /* File: tuple.h * * Description: See "tuple.c" * * Important NOTE: The TupleField structure is used both to hold backend data and * manual result set data. The "set_" functions and the TupleNode * structure are only used for manual result sets by info routines. * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __TUPLE_H__ #define __TUPLE_H__ #include "psqlodbc.h" /* Used by backend data AND manual result sets */ struct TupleField_ { Int4 len; /* length of the current Tuple */ void *value; /* an array representing the value */ }; /* Used ONLY for manual result sets */ struct TupleNode_ { struct TupleNode_ *prev, *next; TupleField tuple[1]; }; /* These macros are wrappers for the corresponding set_tuplefield functions but these handle automatic NULL determination and call set_tuplefield_null() if appropriate for the datatype (used by SQLGetTypeInfo). */ #define set_nullfield_string(FLD, VAL) ((VAL) ? set_tuplefield_string(FLD, (VAL)) : set_tuplefield_null(FLD)) #define set_nullfield_int2(FLD, VAL) ((VAL) != -1 ? set_tuplefield_int2(FLD, (VAL)) : set_tuplefield_null(FLD)) #define set_nullfield_int4(FLD, VAL) ((VAL) != -1 ? set_tuplefield_int4(FLD, (VAL)) : set_tuplefield_null(FLD)) void set_tuplefield_null(TupleField *tuple_field); void set_tuplefield_string(TupleField *tuple_field, char *string); void set_tuplefield_int2(TupleField *tuple_field, Int2 value); void set_tuplefield_int4(TupleField *tuple_field, Int4 value); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/tuplelist.h0100644000076400007640000000156207363332152017672 0ustar nicknick /* File: tuplelist.h * * Description: See "tuplelist.c" * * Important Note: This structure and its functions are ONLY used in building manual result * sets for info functions (SQLTables, SQLColumns, etc.) * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __TUPLELIST_H__ #define __TUPLELIST_H__ #include "psqlodbc.h" struct TupleListClass_ { Int4 num_fields; Int4 num_tuples; TupleNode *list_start, *list_end, *lastref; Int4 last_indexed; }; #define TL_get_num_tuples(x) (x->num_tuples) /* Create a TupleList. Each tuple consits of fieldcnt columns */ TupleListClass *TL_Constructor(UInt4 fieldcnt); void TL_Destructor(TupleListClass *self); void *TL_get_fieldval(TupleListClass *self, Int4 tupleno, Int2 fieldno); char TL_add_tuple(TupleListClass *self, TupleNode *new_field); #endif unixODBC-2.2.14-p2/Drivers/Postgre7.1/notice.txt0100644000076400007640000000226207363332152017514 0ustar nicknick /******************************************************************** PSQLODBC.DLL - A library to talk to the PostgreSQL DBMS using ODBC. Copyright (C) 1998; Insight Distribution Systems The code contained in this library is based on code written by Christian Czezatke and Dan McGuirk, (C) 1996. This library 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 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 MERCHANTIBILITY 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 library (see "license.txt"); if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. How to contact the author: email: byronn@insightdist.com (Byron Nikolaidis) ***********************************************************************/ unixODBC-2.2.14-p2/Drivers/Postgre7.1/driver.exp0100644000076400007640000000137511025760621017503 0ustar nicknickSQLAllocConnect SQLAllocEnv SQLAllocStmt SQLBindCol SQLBindParameter SQLBrowseConnect SQLCancel SQLColAttributes SQLColumnPrivileges SQLColumns SQLConnect SQLDescribeCol SQLDescribeParam SQLDisconnect SQLDriverConnect SQLError SQLExecDirect SQLExecute SQLExtendedFetch SQLFetch SQLForeignKeys SQLFreeConnect SQLFreeEnv SQLFreeStmt SQLGetConnectOption SQLGetCursorName SQLGetData SQLGetFunctions SQLGetInfo SQLGetStmtOption SQLGetTypeInfo SQLMoreResults SQLNativeSql SQLNumParams SQLNumResultCols SQLParamData SQLParamOptions SQLPrepare SQLPrimaryKeys SQLProcedureColumns SQLProcedures SQLPutData SQLRowCount SQLSetConnectOption SQLSetCursorName SQLSetPos SQLSetScrollOptions SQLSetStmtOption SQLSpecialColumns SQLStatistics SQLTablePrivileges SQLTables SQLTransact unixODBC-2.2.14-p2/Drivers/odbc/0040755000076400007640000000000011150523342014521 5ustar nicknickunixODBC-2.2.14-p2/Drivers/odbc/README0100644000076400007640000000012507363332155015407 0ustar nicknickODBC-to-ODBC bridge is being developed at this time and has not yet been released. unixODBC-2.2.14-p2/Drivers/odbc/Makefile.am0100644000076400007640000000000007363332155016553 0ustar nicknickunixODBC-2.2.14-p2/Drivers/odbc/Makefile.in0100644000076400007640000002363111111035236016565 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = Drivers/odbc DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Drivers/odbc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Drivers/odbc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) 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-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .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-exec install-exec-am \ install-info install-info-am install-man 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-info-am # 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: unixODBC-2.2.14-p2/Drivers/template/0040755000076400007640000000000011150523343015426 5ustar nicknickunixODBC-2.2.14-p2/Drivers/template/README0100644000076400007640000000256507363332155016325 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | Driver Template | +-------------------------------------------------------------+ Use this template as a starting point when creating a new driver. You can also reference existing unixODBC drivers. This template provides the infrastructure for a 3.51 compliant ODBC driver. A driver created from this template, and in the unixODBC framework should be easy to port to other platforms. In fact, the Drivers are the only component which one may want to ensure portability ... the remaining components (including the DriverManager) strive for interoperability but not portability. +-------------------------------------------------------------+ | Please visit; | | www.genix.net/unixODBC | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/Drivers/template/Makefile.am0100644000076400007640000000375511025707437017502 0ustar nicknicklib_LTLIBRARIES = libtemplate.la INCLUDES = -I@top_srcdir@/include -I. $(LTDLINCL) DEFS = -DUNIXODBC @DEFS@ libtemplate_la_LDFLAGS = -no-undefined -version-info 1:0:0 EXTRA_DIST = \ driver.h \ driverextras.h libtemplate_la_LIBADD = \ ../../lst/liblstlc.la \ ../../log/libloglc.la \ ../../ini/libinilc.la \ ../../odbcinst/libodbcinstlc.la \ $(LIBLTDL) $(LIBADD_DL) libtemplate_la_SOURCES = \ SQLAllocConnect.c \ SQLAllocEnv.c \ SQLAllocHandle.c \ SQLAllocStmt.c \ SQLBindCol.c \ SQLBindParameter.c \ SQLBrowseConnect.c \ SQLBulkOperations.c \ SQLCancel.c \ SQLCloseCursor.c \ SQLColAttribute.c \ SQLColAttributes.c \ SQLColumnPrivileges.c \ SQLColumns.c \ SQLConnect.c \ SQLCopyDesc.c \ SQLDescribeCol.c \ SQLDescribeParam.c \ SQLDisconnect.c \ SQLDriverConnect.c \ SQLEndTran.c \ SQLError.c \ SQLExecDirect.c \ SQLExecute.c \ SQLExtendedFetch.c \ SQLFetch.c \ SQLFetchScroll.c \ SQLForeignKeys.c \ SQLFreeConnect.c \ SQLFreeEnv.c \ SQLFreeHandle.c \ SQLFreeStmt.c \ SQLGetConnectAttr.c \ SQLGetConnectOption.c \ SQLGetCursorName.c \ SQLGetData.c \ SQLGetDescField.c \ SQLGetDescRec.c \ SQLGetDiagField.c \ SQLGetDiagRec.c \ SQLGetEnvAttr.c \ SQLGetInfo.c \ SQLGetStmtAttr.c \ SQLGetStmtOption.c \ SQLGetTypeInfo.c \ SQLMoreResults.c \ SQLNativeSql.c \ SQLNumParams.c \ SQLNumResultCols.c \ SQLParamData.c \ SQLParamOptions.c \ SQLPrepare.c \ SQLPrimaryKeys.c \ SQLProcedureColumns.c \ SQLProcedures.c \ SQLPutData.c \ SQLRowCount.c \ SQLSetConnectOption.c \ SQLSetCursorName.c \ SQLSetDescField.c \ SQLSetDescRec.c \ SQLSetEnvAttr.c \ SQLSetParam.c \ SQLSetPos.c \ SQLSetScrollOptions.c \ SQLSetStmtAttr.c \ SQLSetStmtOption.c \ SQLSpecialColumns.c \ SQLStatistics.c \ SQLTablePrivileges.c \ SQLTables.c \ SQLTransact.c \ _FreeDbc.c \ _FreeStmt.c \ _FreeDbcList.c \ _FreeStmtList.c \ _FreeResults.c \ _GetData.c \ _NativeToSQLColumnHeader.c \ _NativeToSQLType.c \ _NativeTypeDesc.c \ _NativeTypeLength.c \ _NativeTypePrecision.c unixODBC-2.2.14-p2/Drivers/template/Makefile.in0100644000076400007640000006264711111035237017504 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = Drivers/template DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libtemplate_la_DEPENDENCIES = ../../lst/liblstlc.la \ ../../log/libloglc.la ../../ini/libinilc.la \ ../../odbcinst/libodbcinstlc.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_libtemplate_la_OBJECTS = SQLAllocConnect.lo SQLAllocEnv.lo \ SQLAllocHandle.lo SQLAllocStmt.lo SQLBindCol.lo \ SQLBindParameter.lo SQLBrowseConnect.lo SQLBulkOperations.lo \ SQLCancel.lo SQLCloseCursor.lo SQLColAttribute.lo \ SQLColAttributes.lo SQLColumnPrivileges.lo SQLColumns.lo \ SQLConnect.lo SQLCopyDesc.lo SQLDescribeCol.lo \ SQLDescribeParam.lo SQLDisconnect.lo SQLDriverConnect.lo \ SQLEndTran.lo SQLError.lo SQLExecDirect.lo SQLExecute.lo \ SQLExtendedFetch.lo SQLFetch.lo SQLFetchScroll.lo \ SQLForeignKeys.lo SQLFreeConnect.lo SQLFreeEnv.lo \ SQLFreeHandle.lo SQLFreeStmt.lo SQLGetConnectAttr.lo \ SQLGetConnectOption.lo SQLGetCursorName.lo SQLGetData.lo \ SQLGetDescField.lo SQLGetDescRec.lo SQLGetDiagField.lo \ SQLGetDiagRec.lo SQLGetEnvAttr.lo SQLGetInfo.lo \ SQLGetStmtAttr.lo SQLGetStmtOption.lo SQLGetTypeInfo.lo \ SQLMoreResults.lo SQLNativeSql.lo SQLNumParams.lo \ SQLNumResultCols.lo SQLParamData.lo SQLParamOptions.lo \ SQLPrepare.lo SQLPrimaryKeys.lo SQLProcedureColumns.lo \ SQLProcedures.lo SQLPutData.lo SQLRowCount.lo \ SQLSetConnectOption.lo SQLSetCursorName.lo SQLSetDescField.lo \ SQLSetDescRec.lo SQLSetEnvAttr.lo SQLSetParam.lo SQLSetPos.lo \ SQLSetScrollOptions.lo SQLSetStmtAttr.lo SQLSetStmtOption.lo \ SQLSpecialColumns.lo SQLStatistics.lo SQLTablePrivileges.lo \ SQLTables.lo SQLTransact.lo _FreeDbc.lo _FreeStmt.lo \ _FreeDbcList.lo _FreeStmtList.lo _FreeResults.lo _GetData.lo \ _NativeToSQLColumnHeader.lo _NativeToSQLType.lo \ _NativeTypeDesc.lo _NativeTypeLength.lo \ _NativeTypePrecision.lo libtemplate_la_OBJECTS = $(am_libtemplate_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libtemplate_la_SOURCES) DIST_SOURCES = $(libtemplate_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libtemplate.la INCLUDES = -I@top_srcdir@/include -I. $(LTDLINCL) libtemplate_la_LDFLAGS = -no-undefined -version-info 1:0:0 EXTRA_DIST = \ driver.h \ driverextras.h libtemplate_la_LIBADD = \ ../../lst/liblstlc.la \ ../../log/libloglc.la \ ../../ini/libinilc.la \ ../../odbcinst/libodbcinstlc.la \ $(LIBLTDL) $(LIBADD_DL) libtemplate_la_SOURCES = \ SQLAllocConnect.c \ SQLAllocEnv.c \ SQLAllocHandle.c \ SQLAllocStmt.c \ SQLBindCol.c \ SQLBindParameter.c \ SQLBrowseConnect.c \ SQLBulkOperations.c \ SQLCancel.c \ SQLCloseCursor.c \ SQLColAttribute.c \ SQLColAttributes.c \ SQLColumnPrivileges.c \ SQLColumns.c \ SQLConnect.c \ SQLCopyDesc.c \ SQLDescribeCol.c \ SQLDescribeParam.c \ SQLDisconnect.c \ SQLDriverConnect.c \ SQLEndTran.c \ SQLError.c \ SQLExecDirect.c \ SQLExecute.c \ SQLExtendedFetch.c \ SQLFetch.c \ SQLFetchScroll.c \ SQLForeignKeys.c \ SQLFreeConnect.c \ SQLFreeEnv.c \ SQLFreeHandle.c \ SQLFreeStmt.c \ SQLGetConnectAttr.c \ SQLGetConnectOption.c \ SQLGetCursorName.c \ SQLGetData.c \ SQLGetDescField.c \ SQLGetDescRec.c \ SQLGetDiagField.c \ SQLGetDiagRec.c \ SQLGetEnvAttr.c \ SQLGetInfo.c \ SQLGetStmtAttr.c \ SQLGetStmtOption.c \ SQLGetTypeInfo.c \ SQLMoreResults.c \ SQLNativeSql.c \ SQLNumParams.c \ SQLNumResultCols.c \ SQLParamData.c \ SQLParamOptions.c \ SQLPrepare.c \ SQLPrimaryKeys.c \ SQLProcedureColumns.c \ SQLProcedures.c \ SQLPutData.c \ SQLRowCount.c \ SQLSetConnectOption.c \ SQLSetCursorName.c \ SQLSetDescField.c \ SQLSetDescRec.c \ SQLSetEnvAttr.c \ SQLSetParam.c \ SQLSetPos.c \ SQLSetScrollOptions.c \ SQLSetStmtAttr.c \ SQLSetStmtOption.c \ SQLSpecialColumns.c \ SQLStatistics.c \ SQLTablePrivileges.c \ SQLTables.c \ SQLTransact.c \ _FreeDbc.c \ _FreeStmt.c \ _FreeDbcList.c \ _FreeStmtList.c \ _FreeResults.c \ _GetData.c \ _NativeToSQLColumnHeader.c \ _NativeToSQLType.c \ _NativeTypeDesc.c \ _NativeTypeLength.c \ _NativeTypePrecision.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Drivers/template/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Drivers/template/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libtemplate.la: $(libtemplate_la_OBJECTS) $(libtemplate_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libtemplate_la_LDFLAGS) $(libtemplate_la_OBJECTS) $(libtemplate_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocEnv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindParameter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBrowseConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBulkOperations.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCancel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCloseCursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColAttribute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColAttributes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColumnPrivileges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCopyDesc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDescribeCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDescribeParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDisconnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDriverConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLEndTran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLError.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExecDirect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExecute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExtendedFetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFetchScroll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLForeignKeys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeEnv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConnectAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetCursorName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDescField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDescRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDiagField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDiagRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetEnvAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetStmtAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetStmtOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetTypeInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLMoreResults.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNativeSql.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNumParams.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNumResultCols.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLParamData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLParamOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPrepare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPrimaryKeys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLProcedureColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLProcedures.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPutData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLRowCount.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetCursorName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetDescField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetDescRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetEnvAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetPos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetScrollOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetStmtAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetStmtOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSpecialColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLStatistics.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTablePrivileges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTables.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTransact.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_FreeDbc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_FreeDbcList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_FreeResults.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_FreeStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_FreeStmtList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_GetData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_NativeToSQLColumnHeader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_NativeToSQLType.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_NativeTypeDesc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_NativeTypeLength.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_NativeTypePrecision.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/Drivers/template/SQLAllocConnect.c0100755000076400007640000000562207406123160020525 0ustar nicknick/********************************************************************** * SQLAllocConnect * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN _AllocConnect( SQLHENV hDrvEnv, SQLHDBC *phDrvDbc ) { HDRVENV hEnv = (HDRVENV)hDrvEnv; HDRVDBC *phDbc = (HDRVDBC*)phDrvDbc; /************************ * SANITY CHECKS ************************/ if( SQL_NULL_HENV == hEnv ) return SQL_INVALID_HANDLE; sprintf((char*) hEnv->szSqlMsg, "hEnv = $%08lX phDbc = $%08lX", hEnv, phDbc ); logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hEnv->szSqlMsg ); if( SQL_NULL_HDBC == phDbc ) { logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR *phDbc is NULL" ); return SQL_ERROR; } /************************ * OK LETS DO IT ************************/ /* allocate database access structure */ *phDbc = (HDRVDBC)malloc( sizeof(DRVDBC) ); if( SQL_NULL_HDBC == *phDbc ) { *phDbc = SQL_NULL_HDBC; logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR malloc error" ); return SQL_ERROR; } /* initialize structure */ memset( *phDbc, 0, sizeof(DRVDBC) ); (*phDbc)->bConnected = 0; (*phDbc)->hDbcExtras = NULL; (*phDbc)->hFirstStmt = NULL; (*phDbc)->hLastStmt = NULL; (*phDbc)->pNext = NULL; (*phDbc)->pPrev = NULL; (*phDbc)->hEnv = (SQLPOINTER)hEnv; /* start logging */ if ( !logOpen( &(*phDbc)->hLog, "[template]", NULL, 50 ) ) (*phDbc)->hLog = NULL; logOn( (*phDbc)->hLog, 1 ); /* ADD TO END OF LIST */ if ( hEnv->hFirstDbc == NULL ) { /* 1st is null so the list is empty right now */ hEnv->hFirstDbc = (*phDbc); hEnv->hLastDbc = (*phDbc); } else { /* at least one node in list */ hEnv->hLastDbc->pNext = (SQLPOINTER)(*phDbc); (*phDbc)->pPrev = (SQLPOINTER)hEnv->hLastDbc; hEnv->hLastDbc = (*phDbc); } /********************************************************/ /* ALLOCATE AND INIT EXTRAS HERE */ (*phDbc)->hDbcExtras = (HDBCEXTRAS)malloc( sizeof(DBCEXTRAS) ); memset( (*phDbc)->hDbcExtras, 0, sizeof(DBCEXTRAS) ); /********************************************************/ logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } SQLRETURN SQLAllocConnect( SQLHENV hDrvEnv, SQLHDBC *phDrvDbc ) { return _AllocConnect( hDrvEnv, phDrvDbc ); } unixODBC-2.2.14-p2/Drivers/template/SQLAllocEnv.c0100755000076400007640000000301107363332155017662 0ustar nicknick/********************************************************************** * SQLAllocEnv * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN _AllocEnv( SQLHENV *phDrvEnv ) { HDRVENV *phEnv = (HDRVENV*)phDrvEnv; /* SANITY CHECKS */ if( NULL == phEnv ) return SQL_INVALID_HANDLE; /* OK */ /* allocate environment */ *phEnv = malloc( sizeof(DRVENV) ); if( SQL_NULL_HENV == *phEnv ) { *phEnv = SQL_NULL_HENV; return SQL_ERROR; } /* initialise environment */ memset( *phEnv, 0, sizeof(DRVENV) ); (*phEnv)->hFirstDbc = NULL; (*phEnv)->hLastDbc = NULL; (*phEnv)->hLog = NULL; /* start logging */ if ( !logOpen( &(*phEnv)->hLog, "[template]", NULL, 50 ) ) (*phEnv)->hLog = NULL; logOn( (*phEnv)->hLog, 1 ); /* ALLOCATE AND INIT DRIVER SPECIFIC STORAGE */ (*phEnv)->hEnvExtras = malloc(sizeof(ENVEXTRAS)); (*phEnv)->hEnvExtras->nDummy = -1; logPushMsg( (*phEnv)->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } SQLRETURN SQLAllocEnv( SQLHENV *phDrvEnv ) { return _AllocEnv( phDrvEnv ); } unixODBC-2.2.14-p2/Drivers/template/SQLAllocHandle.c0100755000076400007640000000202007363332155020324 0ustar nicknick/********************************************************************** * SQLAllocHandle * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLAllocHandle( SQLSMALLINT nHandleType, SQLHANDLE nInputHandle, SQLHANDLE *pnOutputHandle ) { switch ( nHandleType ) { case SQL_HANDLE_ENV: return _AllocEnv( (SQLHENV *)pnOutputHandle ); case SQL_HANDLE_DBC: return _AllocConnect( (SQLHENV)nInputHandle, (SQLHDBC *)pnOutputHandle ); case SQL_HANDLE_STMT: return _AllocStmt( (SQLHDBC)nInputHandle, (SQLHSTMT *)pnOutputHandle ); case SQL_HANDLE_DESC: break; default: return SQL_ERROR; break; } return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLAllocStmt.c0100755000076400007640000000671207406123160020064 0ustar nicknick/********************************************************************** * SQLAllocStmt (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN _AllocStmt( SQLHDBC hDrvDbc, SQLHSTMT *phDrvStmt ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; HDRVSTMT *phStmt = (HDRVSTMT*)phDrvStmt; /* SANITY CHECKS */ if( hDbc == SQL_NULL_HDBC ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg ); if( NULL == phStmt ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR phStmt=NULL" ); return SQL_ERROR; } /* OK */ /* allocate memory */ *phStmt = malloc( sizeof(DRVSTMT) ); if( SQL_NULL_HSTMT == *phStmt ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR memory allocation failure" ); return SQL_ERROR; } /* initialize memory */ sprintf((char*) hDbc->szSqlMsg, "*phstmt = $%08lX", *phStmt ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg ); memset( *phStmt, 0, sizeof(DRVSTMT) ); /* SAFETY */ (*phStmt)->hDbc = (SQLPOINTER)hDbc; (*phStmt)->hLog = NULL; (*phStmt)->hStmtExtras = NULL; (*phStmt)->pNext = NULL; (*phStmt)->pPrev = NULL; (*phStmt)->pszQuery = NULL; sprintf((char*)(*phStmt)->szCursorName, "CUR_%08lX", *phStmt ); /* ADD TO DBCs STATEMENT LIST */ /* start logging */ if ( logOpen( &(*phStmt)->hLog, "[template]", NULL, 50 ) ) { logOn( (*phStmt)->hLog, 1 ); logPushMsg( (*phStmt)->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "Statement logging allocated ok" ); } else (*phStmt)->hLog = NULL; /* ADD TO END OF LIST */ if ( hDbc->hFirstStmt == NULL ) { /* 1st is null so the list is empty right now */ hDbc->hFirstStmt = (*phStmt); hDbc->hLastStmt = (*phStmt); } else { /* at least one node in list */ hDbc->hLastStmt->pNext = (SQLPOINTER)(*phStmt); (*phStmt)->pPrev = (SQLPOINTER)hDbc->hLastStmt; hDbc->hLastStmt = (*phStmt); } /****************************************************************************/ /* ALLOCATE AND INIT DRIVER EXTRAS HERE */ (*phStmt)->hStmtExtras = malloc(sizeof(STMTEXTRAS)); memset( (*phStmt)->hStmtExtras, 0, sizeof(STMTEXTRAS) ); /* SAFETY */ (*phStmt)->hStmtExtras->aResults = NULL; (*phStmt)->hStmtExtras->nCols = 0; (*phStmt)->hStmtExtras->nRow = 0; (*phStmt)->hStmtExtras->nRows = 0; /****************************************************************************/ logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } SQLRETURN SQLAllocStmt( SQLHDBC hDrvDbc, SQLHSTMT *phDrvStmt ) { return _AllocStmt( hDrvDbc, phDrvStmt ); } unixODBC-2.2.14-p2/Drivers/template/SQLBindCol.c0100755000076400007640000000434207406123160017471 0ustar nicknick/********************************************************************** * SQLBindCol * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLBindCol( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLSMALLINT nTargetType, SQLPOINTER pTargetValue, SQLLEN nTargetValueMax, SQLLEN *pnLengthOrIndicator ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; COLUMNHDR *pColumnHeader; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt=$%08lX nCol=%5d", hStmt, nCol ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO,(char*) hStmt->szSqlMsg ); if ( hStmt->hStmtExtras->nRows == 0 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } if ( nCol < 1 || nCol > hStmt->hStmtExtras->nCols ) { sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Column %d is out of range. Range is 1 - %s", nCol, hStmt->hStmtExtras->nCols ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); return SQL_ERROR; } if ( pTargetValue == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Invalid data pointer" ); return SQL_ERROR; } if ( pnLengthOrIndicator != NULL ) *pnLengthOrIndicator = 0; /* SET DEFAULTS */ /* store app col pointer */ pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nCol]; pColumnHeader->nTargetType = nTargetType; pColumnHeader->nTargetValueMax = nTargetValueMax; pColumnHeader->pnLengthOrIndicator = pnLengthOrIndicator; pColumnHeader->pTargetValue = pTargetValue; logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLBindParameter.c0100755000076400007640000000336707406123160020702 0ustar nicknick/********************************************************************** * SQLBindParameter * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLBindParameter( SQLHSTMT hDrvStmt, SQLUSMALLINT nParameterNumber, SQLSMALLINT nIOType, SQLSMALLINT nBufferType, SQLSMALLINT nParamType, SQLULEN nParamLength, SQLSMALLINT nScale, SQLPOINTER pData, SQLLEN nBufferLength, SQLLEN *pnLengthOrIndicator ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt=$%08lX nParameterNumber=%d nIOType=%d nBufferType=%d nParamType=%d nParamLength=%d nScale=%d pData=$%08lX nBufferLength=%d *pnLengthOrIndicator=$%08lX",hStmt,nParameterNumber,nIOType,nBufferType,nParamType,nParamLength,nScale,pData,nBufferLength, *pnLengthOrIndicator ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not currently supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLBrowseConnect.c0100755000076400007640000000251607406123160020733 0ustar nicknick/********************************************************************** * SQLBrowseConnect * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLBrowseConnect( SQLHDBC hDrvDbc, SQLCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT *pcbConnStrOut ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; if ( hDbc == NULL ) return SQL_INVALID_HANDLE; sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not currently supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLBulkOperations.c0100644000076400007640000000316507406123160021117 0ustar nicknick/********************************************************************** * SQLBulkOperations * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLBulkOperations( SQLHSTMT hDrvStmt, SQLSMALLINT nOperation ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /* OK */ switch ( nOperation ) { case SQL_ADD: break; case SQL_UPDATE_BY_BOOKMARK: break; case SQL_DELETE_BY_BOOKMARK: break; case SQL_FETCH_BY_BOOKMARK: break; default: sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Unknown nOperation=%d", nOperation ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); return SQL_ERROR; } /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not currently supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLCancel.c0100755000076400007640000000215707406123160017346 0ustar nicknick/********************************************************************** * SQLCancel * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLCancel( SQLHSTMT hDrvStmt ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLCloseCursor.c0100755000076400007640000000216507406123160020423 0ustar nicknick/********************************************************************** * SQLCloseCursor * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLCloseCursor( SQLHSTMT hDrvStmt ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLColAttribute.c0100644000076400007640000001271610604157753020572 0ustar nicknick/********************************************************************** * SQLColAttribute * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLColAttribute( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLUSMALLINT nFieldIdentifier, SQLPOINTER pszValue, SQLSMALLINT nValueLengthMax, SQLSMALLINT *pnValueLength, SQLLEN *pnValue ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; COLUMNHDR *pColumnHeader; int nValue = 0; /* SANITY CHECKS */ if( !hStmt ) return SQL_INVALID_HANDLE; if ( !hStmt->hStmtExtras ) return SQL_INVALID_HANDLE; if ( hStmt->hStmtExtras->nRows < 1 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } if ( nCol < 1 || nCol > hStmt->hStmtExtras->nCols ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Invalid column" ); return SQL_ERROR; } /* OK */ pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nCol]; switch( nFieldIdentifier ) { case SQL_DESC_AUTO_UNIQUE_VALUE: nValue = pColumnHeader->bSQL_DESC_AUTO_UNIQUE_VALUE; break; case SQL_DESC_BASE_COLUMN_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_BASE_COLUMN_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_BASE_TABLE_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_BASE_TABLE_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_CASE_SENSITIVE: nValue = pColumnHeader->bSQL_DESC_CASE_SENSITIVE; break; case SQL_DESC_CATALOG_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_CATALOG_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_CONCISE_TYPE: nValue = pColumnHeader->nSQL_DESC_CONCISE_TYPE; break; case SQL_DESC_COUNT: nValue = hStmt->hStmtExtras->nCols; break; case SQL_DESC_DISPLAY_SIZE: nValue = pColumnHeader->nSQL_DESC_DISPLAY_SIZE; break; case SQL_DESC_FIXED_PREC_SCALE: nValue = pColumnHeader->bSQL_DESC_FIXED_PREC_SCALE; break; case SQL_DESC_LABEL: strncpy( pszValue, pColumnHeader->pszSQL_DESC_LABEL, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_LENGTH: nValue = pColumnHeader->nSQL_DESC_LENGTH; break; case SQL_DESC_LITERAL_PREFIX: strncpy( pszValue, pColumnHeader->pszSQL_DESC_LITERAL_PREFIX, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_LITERAL_SUFFIX: strncpy( pszValue, pColumnHeader->pszSQL_DESC_LITERAL_SUFFIX, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_LOCAL_TYPE_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_LOCAL_TYPE_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_NULLABLE: nValue = pColumnHeader->nSQL_DESC_NULLABLE; break; case SQL_DESC_NUM_PREC_RADIX: nValue = pColumnHeader->nSQL_DESC_NUM_PREC_RADIX; break; case SQL_DESC_OCTET_LENGTH: nValue = pColumnHeader->nSQL_DESC_OCTET_LENGTH; break; case SQL_DESC_PRECISION: nValue = pColumnHeader->nSQL_DESC_PRECISION; break; case SQL_DESC_SCALE: nValue = pColumnHeader->nSQL_DESC_SCALE; break; case SQL_DESC_SCHEMA_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_SCHEMA_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_SEARCHABLE: nValue = pColumnHeader->nSQL_DESC_SEARCHABLE; break; case SQL_DESC_TABLE_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_TABLE_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_TYPE: nValue = pColumnHeader->nSQL_DESC_TYPE; break; case SQL_DESC_TYPE_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_TYPE_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_UNNAMED: nValue = pColumnHeader->nSQL_DESC_UNNAMED; break; case SQL_DESC_UNSIGNED: nValue = pColumnHeader->bSQL_DESC_UNSIGNED; break; case SQL_DESC_UPDATABLE: nValue = pColumnHeader->nSQL_DESC_UPDATABLE; break; default: sprintf((char*) hStmt->szSqlMsg, "Invalid nFieldIdentifier value of %d", nFieldIdentifier ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); return SQL_ERROR; } if ( pnValue ) *(int*)pnValue = nValue; /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLColAttributes.c0100755000076400007640000000501207406123160020736 0ustar nicknick/********************************************************************** * SQLColAttributes (this function has been deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLColAttributes( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLUSMALLINT nDescType, SQLPOINTER pszDesc, SQLSMALLINT nDescMax, SQLSMALLINT *pcbDesc, SQLLEN *pfDesc) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************** * 1. verify we have result set * 2. verify col is within range **************************/ /************************** * 3. process request **************************/ switch( nDescType ) { /* enum these case SQL_COLUMN_AUTO_INCREMENT: case SQL_COLUMN_CASE_SENSITIVE: case SQL_COLUMN_COUNT: case SQL_COLUMN_DISPLAY_SIZE: case SQL_COLUMN_LENGTH: case SQL_COLUMN_MONEY: case SQL_COLUMN_NULLABLE: case SQL_COLUMN_PRECISION: case SQL_COLUMN_SCALE: case SQL_COLUMN_SEARCHABLE: case SQL_COLUMN_TYPE: case SQL_COLUMN_UNSIGNED: case SQL_COLUMN_UPDATABLE: case SQL_COLUMN_CATALOG_NAME: case SQL_COLUMN_QUALIFIER_NAME: case SQL_COLUMN_DISTINCT_TYPE: case SQL_COLUMN_LABEL: case SQL_COLUMN_NAME: case SQL_COLUMN_SCHEMA_NAME: case SQL_COLUMN_OWNER_NAME: case SQL_COLUMN_TABLE_NAME: case SQL_COLUMN_TYPE_NAME: */ default: sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR nDescType=%d", nDescType ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); return SQL_ERROR; } /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLColumnPrivileges.c0100755000076400007640000000274107406123160021447 0ustar nicknick/******************************************************************** * SQLColumnPrivileges * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLColumnPrivileges( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength, SQLCHAR *szColumnName, SQLSMALLINT nColumnNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLColumns.c0100755000076400007640000000645307406123160017604 0ustar nicknick/******************************************************************** * SQLColumns * * This is something of a mess. Part of the problem here is that msqlListFields * are returned as mSQL 'column headers'... we want them to be returned as a * row for each. So we have to turn the results on their side . * * Another problem is that msqlListFields will also return indexs. So we have * to make sure that these are not included here. * * The end result is more code than what would usually be found here. * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" enum nSQLColumns { TABLE_CAT = 1, TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, DATA_TYPE, TYPE_NAME, COLUMN_SIZE, BUFFER_LENGTH, DECIMAL_DIGITS, NUM_PREC_RADIX, NULLABLE, REMARKS, COLUMN_DEF, SQL_DATA_TYPE, SQL_DATETIME_SUB, CHAR_OCTET_LENGTH, ORDINAL_POSITION, IS_NULLABLE, COL_MAX }; /**************************** * replace this with init of some struct (see same func for MiniSQL driver) */ char *aSQLColumns[] = { "one", "two" }; /***************************/ SQLRETURN SQLColumns( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength, SQLCHAR *szColumnName, SQLSMALLINT nColumnNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; COLUMNHDR *pColumnHeader; int nColumn; long nCols; long nRow; char szBuffer[101]; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); if ( szTableName == NULL || szTableName[0] == '\0' ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Must supply a valid table name" ); return SQL_ERROR; } /************************** * close any existing result **************************/ if ( hStmt->hStmtExtras->aResults ) _FreeResults( hStmt->hStmtExtras ); if ( hStmt->pszQuery != NULL ) free( hStmt->pszQuery ); /************************ * generate a result set listing columns ************************/ /************************** * allocate memory for columns headers and result data (row 0 is column header while col 0 is reserved for bookmarks) **************************/ /************************** * gather column header information (save col 0 for bookmarks) **************************/ /************************ * gather data (save col 0 for bookmarks and factor out index columns) ************************/ /************************** * free the snapshot **************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLConnect.c0100755000076400007640000000670507406123160017555 0ustar nicknick/********************************************************************** * SQLConnect * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLConnect( SQLHDBC hDrvDbc, SQLCHAR *szDataSource, SQLSMALLINT nDataSourceLength, SQLCHAR *szUID, SQLSMALLINT nUIDLength, SQLCHAR *szPWD, SQLSMALLINT nPWDLength ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; char szDATABASE[INI_MAX_PROPERTY_VALUE+1]; char szHOST[INI_MAX_PROPERTY_VALUE+1]; char szPORT[INI_MAX_PROPERTY_VALUE+1]; char szFLAG[INI_MAX_PROPERTY_VALUE+1]; /* SANITY CHECKS */ if( SQL_NULL_HDBC == hDbc ) return SQL_INVALID_HANDLE; sprintf((char*) hDbc->szSqlMsg, "hDbc=$%08lX 3zDataSource=(%s)", hDbc, szDataSource ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg ); if( hDbc->bConnected == 1 ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Already connected" ); return SQL_ERROR; } if ( nDataSourceLength == SQL_NTS ) { if ( strlen((char*) szDataSource ) > ODBC_FILENAME_MAX+INI_MAX_OBJECT_NAME ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Given Data Source is too long. I consider it suspect." ); return SQL_ERROR; } } else { if ( nDataSourceLength > ODBC_FILENAME_MAX+INI_MAX_OBJECT_NAME ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Given Data Source is too long. I consider it suspect." ); return SQL_ERROR; } } /******************** * gather and use any required DSN properties * - DATABASE * - HOST (localhost assumed if not supplied) ********************/ szDATABASE[0] = '\0'; szHOST[0] = '\0'; szPORT[0] = '\0'; szFLAG[0] = '\0'; SQLGetPrivateProfileString((char*) szDataSource, "DATABASE", "", szDATABASE, sizeof(szDATABASE), "odbc.ini" ); if ( szDATABASE[0] == '\0' ) { sprintf((char*) hDbc->szSqlMsg, "SQL_ERROR Could not find Driver entry for %s in system information", szDataSource ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg ); return SQL_ERROR; } SQLGetPrivateProfileString((char*) szDataSource, "HOST", "localhost", szHOST, sizeof(szHOST), "odbc.ini" ); SQLGetPrivateProfileString((char*) szDataSource, "PORT", "0", szPORT, sizeof(szPORT), "odbc.ini" ); SQLGetPrivateProfileString((char*) szDataSource, "FLAG", "0", szFLAG, sizeof(szFLAG), "odbc.ini" ); /******************** * 1. initialise structures * 2. try connection with database using your native calls * 3. store your server handle in the extras somewhere * 4. set connection state * hDbc->bConnected = TRUE; ********************/ logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLCopyDesc.c0100755000076400007640000000134207363332155017675 0ustar nicknick/********************************************************************** * SQLCopyDesc * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLCopyDesc( SQLHDESC hSourceDescHandle, SQLHDESC hTargetDescHandle ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLDescribeCol.c0100755000076400007640000000422207406123160020332 0ustar nicknick/********************************************************************** * SQLDescribeCol * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLDescribeCol( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLCHAR *szColName, SQLSMALLINT nColNameMax, SQLSMALLINT *pnColNameLength, SQLSMALLINT *pnSQLDataType, SQLULEN *pnColSize, SQLSMALLINT *pnDecDigits, SQLSMALLINT *pnNullable ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; COLUMNHDR *pColumnHeader; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; if ( NULL == hStmt->hStmtExtras ) return SQL_INVALID_HANDLE; if ( hStmt->hStmtExtras->nRows < 1 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } if ( nCol < 1 || nCol > hStmt->hStmtExtras->nCols ) { sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Column %d is out of range. Range is 1 - %s", nCol, hStmt->hStmtExtras->nCols ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); return SQL_ERROR; } /* OK */ pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nCol]; if ( szColName ) strncpy((char*) szColName, pColumnHeader->pszSQL_DESC_NAME, nColNameMax ); if ( pnColNameLength ) *pnColNameLength = strlen((char*) szColName ); if ( pnSQLDataType ) *pnSQLDataType = pColumnHeader->nSQL_DESC_TYPE; if ( pnColSize ) *pnColSize = pColumnHeader->nSQL_DESC_LENGTH; if ( pnDecDigits ) *pnDecDigits = pColumnHeader->nSQL_DESC_SCALE; if ( pnNullable ) *pnNullable = pColumnHeader->nSQL_DESC_NULLABLE; logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLDescribeParam.c0100755000076400007640000000351107406123160020655 0ustar nicknick/********************************************************************** * SQLDescribeParam * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" /* HERES THE CORRECT WAY... SQLRETURN SQLDescribeParam( SQLHSTMT hDrvStmt, SQLUSMALLINT nParmNumber, SQLSMALLINT *pnDataType, SQLUINTEGER *pnSize, SQLSMALLINT *pnDecDigits, SQLSMALLINT *pnNullable ) HERES THE WAY THAT WORKS... */ SQLRETURN SQLDescribeParam( SQLHSTMT hDrvStmt, SQLUSMALLINT nParmNumber, SQLSMALLINT *pnDataType, SQLULEN *pnSize, SQLSMALLINT *pnDecDigits, SQLSMALLINT *pnNullable ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLDisconnect.c0100755000076400007640000000301707406123160020246 0ustar nicknick/********************************************************************** * SQLDisconnect * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLDisconnect( SQLHDBC hDrvDbc ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; /* SANITY CHECKS */ if( NULL == hDbc ) return SQL_INVALID_HANDLE; sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, (char*)hDbc->szSqlMsg ); if( hDbc->bConnected == 0 ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_SUCCESS_WITH_INFO Connection not open" ); return SQL_SUCCESS_WITH_INFO; } if ( hDbc->hFirstStmt != SQL_NULL_HSTMT ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Active Statements exist. Can not disconnect." ); return SQL_ERROR; } /**************************** * 1. do driver specific close here ****************************/ hDbc->bConnected = 0; logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLDriverConnect.c0100755000076400007640000001061307406123160020722 0ustar nicknick/********************************************************************** * SQLDriverConnect * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLDriverConnect( SQLHDBC hDrvDbc, SQLHWND hWnd, SQLCHAR *szConnStrIn, SQLSMALLINT nConnStrIn, SQLCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT *pnConnStrOut, SQLUSMALLINT nDriverCompletion ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; char szDSN[INI_MAX_PROPERTY_VALUE+1] = ""; char szDRIVER[INI_MAX_PROPERTY_VALUE+1] = ""; char szUID[INI_MAX_PROPERTY_VALUE+1] = ""; char szPWD[INI_MAX_PROPERTY_VALUE+1] = ""; char szDATABASE[INI_MAX_PROPERTY_VALUE+1] = ""; char szHOST[INI_MAX_PROPERTY_VALUE+1] = ""; char szPORT[INI_MAX_PROPERTY_VALUE+1] = ""; char szSOCKET[INI_MAX_PROPERTY_VALUE+1] = ""; char szFLAG[INI_MAX_PROPERTY_VALUE+1] = ""; char szNameValue[INI_MAX_PROPERTY_VALUE+1] = ""; char szName[INI_MAX_PROPERTY_VALUE+1] = ""; char szValue[INI_MAX_PROPERTY_VALUE+1] = ""; int nOption = 0; /* SANITY CHECKS */ if( NULL == hDbc ) return SQL_INVALID_HANDLE; sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg ); if( hDbc->bConnected == 1 ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Already connected" ); return SQL_ERROR; } if( !szConnStrIn ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Bad argument" ); return SQL_ERROR; } switch( nDriverCompletion ) { case SQL_DRIVER_PROMPT: case SQL_DRIVER_COMPLETE: case SQL_DRIVER_COMPLETE_REQUIRED: case SQL_DRIVER_NOPROMPT: default: sprintf((char*) hDbc->szSqlMsg, "Invalid nDriverCompletion=%d", nDriverCompletion ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg ); break; } /************************* * 1. parse nConnStrIn for connection options. Format is; * Property=Value;... * 2. we may not have all options so handle as per DM request * 3. fill as required szConnStrOut *************************/ for ( nOption = 1; iniElement((char*) szConnStrIn, ';', '\0', nOption, szNameValue, sizeof(szNameValue) ) == INI_SUCCESS ; nOption++ ) { szName[0] = '\0'; szValue[0] = '\0'; iniElement( szNameValue, '=', '\0', 0, szName, sizeof(szName) ); iniElement( szNameValue, '=', '\0', 1, szValue, sizeof(szValue) ); if ( strcasecmp( szName, "DSN" ) == 0 ) strcpy( szDSN, szValue ); else if ( strcasecmp( szName, "DRIVER" ) == 0 ) strcpy( szDRIVER, szValue ); else if ( strcasecmp( szName, "UID" ) == 0 ) strcpy( szUID, szValue ); else if ( strcasecmp( szName, "PWD" ) == 0 ) strcpy( szPWD, szValue ); else if ( strcasecmp( szName, "SERVER" ) == 0 ) strcpy( szHOST, szValue ); else if ( strcasecmp( szName, "DB" ) == 0 ) strcpy( szDATABASE, szValue ); else if ( strcasecmp( szName, "SOCKET" ) == 0 ) strcpy( szSOCKET, szValue ); else if ( strcasecmp( szName, "PORT" ) == 0 ) strcpy( szPORT, szValue ); else if ( strcasecmp( szName, "OPTION" ) == 0 ) strcpy( szFLAG, szValue ); } /**************************** * return the connect string we are using ***************************/ if( !szConnStrOut ) { } /************************* * 4. try to connect * 5. set gathered options (ie USE Database or whatever) * 6. set connection state * hDbc->bConnected = TRUE; *************************/ hDbc->bConnected = 1; logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported." ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLEndTran.c0100755000076400007640000000137207363332155017522 0ustar nicknick/********************************************************************** * SQLEndTran * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLEndTran( SQLSMALLINT nHandleType, SQLHANDLE nHandle, SQLSMALLINT nCompletionType ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLError.c0100755000076400007640000000460410723055010017243 0ustar nicknick/********************************************************************** * SQLError (deprecated see SQLGetDiagRec) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" /*! * \brief Get oldest error for the given handle. * * This is deprecated - use SQLGetDiagRec instead. This is mapped * to SQLGetDiagRec. The main difference between this and * SQLGetDiagRec is that this call will delete the error message to * allow multiple calls here to work their way through all of the * errors even with the lack of an ability to pass a specific message * number to be returned. * * \param hDrvEnv * \param hDrvDbc * \param hDrvStmt * \param szSqlState * \param pfNativeError * \param szErrorMsg * \param nErrorMsgMax * \param pcbErrorMsg * * \return SQLRETURN * * \sa SQLGetDiagRec */ SQLRETURN SQLError( SQLHENV hDrvEnv, SQLHDBC hDrvDbc, SQLHSTMT hDrvStmt, SQLCHAR *szSqlState, SQLINTEGER *pfNativeError, SQLCHAR *szErrorMsg, SQLSMALLINT nErrorMsgMax, SQLSMALLINT *pcbErrorMsg ) { SQLSMALLINT nHandleType; SQLHANDLE hHandle; SQLRETURN nReturn; HLOG hLog; /* map call to SQLGetDiagRec */ if ( hDrvEnv ) { nHandleType = SQL_HANDLE_ENV; hHandle = hDrvEnv; hLog = ((HDRVENV)hDrvEnv)->hLog; } else if ( hDrvDbc ) { nHandleType = SQL_HANDLE_DBC; hHandle = hDrvDbc; hLog = ((HDRVDBC)hDrvDbc)->hLog; } else if ( hDrvStmt ) { nHandleType = SQL_HANDLE_STMT; hHandle = hDrvStmt; hLog = ((HDRVSTMT)hDrvStmt)->hLog; } else return SQL_INVALID_HANDLE; nReturn = SQLGetDiagRec_( nHandleType, hHandle, 1, szSqlState, pfNativeError, szErrorMsg, nErrorMsgMax, pcbErrorMsg ); /* unlike SQLGetDiagRec - we delete the message returned */ if ( SQL_SUCCEEDED( nReturn ) ) logPopMsg( hLog ); return nReturn; } unixODBC-2.2.14-p2/Drivers/template/SQLExecDirect.c0100755000076400007640000000276707406123160020207 0ustar nicknick/********************************************************************** * SQLExecDirect * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLExecDirect( SQLHSTMT hDrvStmt, SQLCHAR *szSqlStr, SQLINTEGER nSqlStr ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; RETCODE rc; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /* prepare command */ rc = SQLPrepare( hDrvStmt, szSqlStr, nSqlStr ); if ( SQL_SUCCESS != rc ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "Could not prepare statement" ); return rc; } /* execute command */ rc = SQLExecute( hDrvStmt ); if ( SQL_SUCCESS != rc ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "Problem calling SQLEXecute" ); return rc; } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLExecute.c0100755000076400007640000000375707406123160017572 0ustar nicknick/********************************************************************** * SQLExecute * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLExecute( SQLHSTMT hDrvStmt ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; int nColumn; int nCols; int nRow; COLUMNHDR *pColumnHeader; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); if( hStmt->pszQuery == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No prepared statement" ); return SQL_ERROR; } /************************** * Free any current results **************************/ if ( hStmt->hStmtExtras->aResults ) _FreeResults( hStmt->hStmtExtras ); /************************** * send prepared query to server **************************/ /************************** * allocate memory for columns headers and result data (row 0 is column header while col 0 is reserved for bookmarks) **************************/ /************************** * gather column header information (save col 0 for bookmarks) **************************/ /************************ * gather data (save col 0 for bookmarks) ************************/ /************************** * free the snapshot **************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLExtendedFetch.c0100755000076400007640000000261210723524740020674 0ustar nicknick/********************************************************************** * SQLExtendedFetch * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLExtendedFetch( SQLHSTMT hDrvStmt, SQLUSMALLINT nOrientation, SQLLEN nOffset, SQLULEN *pnRowCount, SQLUSMALLINT *pRowStatusArray ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLFetch.c0100755000076400007640000000426307406123160017212 0ustar nicknick/********************************************************************** * SQLFetch * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLFetch( SQLHSTMT hDrvStmt) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; int nColumn = -1; COLUMNHDR *pColumnHeader; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); if ( hStmt->hStmtExtras->nRows < 1 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } /************************ * goto next row ************************/ if ( hStmt->hStmtExtras->nRow < 0 ) return SQL_NO_DATA; if ( hStmt->hStmtExtras->nRow >= hStmt->hStmtExtras->nRows ) return SQL_NO_DATA; hStmt->hStmtExtras->nRow++; /************************ * transfer bound column values to bound storage as required ************************/ for ( nColumn=1; nColumn <= hStmt->hStmtExtras->nCols; nColumn++ ) { pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nColumn]; if ( pColumnHeader->pTargetValue != NULL ) { if ( _GetData( hDrvStmt, nColumn, pColumnHeader->nTargetType, pColumnHeader->pTargetValue, pColumnHeader->nTargetValueMax, pColumnHeader->pnLengthOrIndicator ) != SQL_SUCCESS ) { sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Failed to get data for column %d", nColumn ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); return SQL_ERROR; } } } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLFetchScroll.c0100644000076400007640000000236110723524740020370 0ustar nicknick/***************************************************************************** * SQLFetchScroll * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * *****************************************************************************/ #include "driver.h" SQLRETURN SQLFetchScroll( SQLHSTMT hDrvStmt, SQLSMALLINT nOrientation, SQLLEN nOffset ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLForeignKeys.c0100755000076400007640000000363507406123160020410 0ustar nicknick/******************************************************************** * SQLForeignKeys * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLForeignKeys( SQLHSTMT hDrvStmt, SQLCHAR *szPKCatalogName, SQLSMALLINT nPKCatalogNameLength, SQLCHAR *szPKSchemaName, SQLSMALLINT nPKSchemaNameLength, SQLCHAR *szPKTableName, SQLSMALLINT nPKTableNameLength, SQLCHAR *szFKCatalogName, SQLSMALLINT nFKCatalogNameLength, SQLCHAR *szFKSchemaName, SQLSMALLINT nFKSchemaNameLength, SQLCHAR *szFKTableName, SQLSMALLINT nFKTableNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLFreeConnect.c0100755000076400007640000000274607406123160020360 0ustar nicknick/********************************************************************** * SQLFreeConnect * * Do not try to Free Dbc if there are Stmts... return an error. Let the * Driver Manager do a recursive clean up if its wants. * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN _FreeConnect( SQLHDBC hDrvDbc ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; int nReturn; /* SANITY CHECKS */ if( NULL == hDbc ) return SQL_INVALID_HANDLE; sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, (char*)hDbc->szSqlMsg ); if( hDbc->bConnected ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Connection is active" ); return SQL_ERROR; } if ( hDbc->hFirstStmt != NULL ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Connection has allocated statements" ); return SQL_ERROR; } nReturn = _FreeDbc( hDbc ); return nReturn; } SQLRETURN SQLFreeConnect( SQLHDBC hDrvDbc ) { return _FreeConnect( hDrvDbc ); } unixODBC-2.2.14-p2/Drivers/template/SQLFreeEnv.c0100755000076400007640000000301607406123160017506 0ustar nicknick/********************************************************************** * SQLFreeEnv * * Do not try to Free Env if there are Dbcs... return an error. Let the * Driver Manager do a recursive clean up if it wants. * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN _FreeEnv( SQLHENV hDrvEnv ) { HDRVENV hEnv = (HDRVENV)hDrvEnv; /* SANITY CHECKS */ if( hEnv == SQL_NULL_HENV ) return SQL_INVALID_HANDLE; sprintf((char*) hEnv->szSqlMsg, "hEnv = $%08lX", hEnv ); logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hEnv->szSqlMsg ); if ( hEnv->hFirstDbc != NULL ) { logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR There are allocated Connections" ); return SQL_ERROR; } /************ * !!! ADD CODE TO FREE DRIVER SPECIFIC MEMORY (hidden in hEnvExtras) HERE !!! ************/ free( hEnv->hEnvExtras ); logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); logClose( hEnv->hLog ); free( hEnv ); return SQL_SUCCESS; } SQLRETURN SQLFreeEnv( SQLHENV hDrvEnv ) { return _FreeEnv( hDrvEnv ); } unixODBC-2.2.14-p2/Drivers/template/SQLFreeHandle.c0100755000076400007640000000177507363332155020173 0ustar nicknick/********************************************************************** * SQLFreeHandle * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLFreeHandle( SQLSMALLINT nHandleType, SQLHANDLE nHandle ) { switch( nHandleType ) { case SQL_HANDLE_ENV: return _FreeEnv( (SQLHENV)nHandle ); case SQL_HANDLE_DBC: return _FreeConnect( (SQLHDBC)nHandle ); case SQL_HANDLE_STMT: return _FreeStmt( (SQLHSTMT)nHandle ); case SQL_HANDLE_DESC: break; default: return SQL_ERROR; } return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLFreeStmt.c0100755000076400007640000000260007406123160017703 0ustar nicknick/********************************************************************** * SQLFreeStmt * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLFreeStmt( SQLHSTMT hDrvStmt, SQLUSMALLINT nOption ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /********* * RESET PARAMS *********/ switch( nOption ) { case SQL_CLOSE: break; case SQL_DROP: return _FreeStmt( hStmt ); case SQL_UNBIND: break; case SQL_RESET_PARAMS: break; default: sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Invalid nOption=%d", nOption ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); return SQL_ERROR; } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLGetConnectAttr.c0100755000076400007640000000264307406123160021045 0ustar nicknick/********************************************************************** * SQLGetConnectAttr * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetConnectAttr( SQLHDBC hDrvDbc, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; /* SANITY CHECKS */ if( NULL == hDbc ) return SQL_INVALID_HANDLE; sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLGetConnectOption.c0100755000076400007640000000226407406123160021402 0ustar nicknick/********************************************************************** * SQLGetConnectOption (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetConnectOption( SQLHDBC hDrvDbc, UWORD fOption, PTR pvParam ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; /* SANITY CHECKS */ if( NULL == hDbc ) return SQL_INVALID_HANDLE; sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLGetCursorName.c0100755000076400007640000000340307406123160020672 0ustar nicknick/********************************************************************** * SQLGetCursorName * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetCursorName( SQLHSTMT hDrvStmt, SQLCHAR *szCursor, SQLSMALLINT nCursorMaxLength, SQLSMALLINT *pnCursorLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; int ci; /* counter variable */ /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); if ( NULL == szCursor ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No cursor name." ); return SQL_ERROR; } /* ** copy cursor name */ strncpy((char*) szCursor, (char*)hStmt->szCursorName, nCursorMaxLength ); /* ** set length of transfered data */ ci = strlen((char*) hStmt->szCursorName ); /* if ( NULL != pnCursorLength ) *pnCursorLength = MIN( ci, nCursorMaxLength ); */ if ( nCursorMaxLength < ci ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_SUCCESS_WITH_INFO Cursor was truncated" ); return SQL_SUCCESS_WITH_INFO; } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLGetData.c0100755000076400007640000000177707406123160017501 0ustar nicknick/********************************************************************** * SQLGetData * * 1. mSQL server sends all data as ascii strings so things are * simplified. We always convert from string to nTargetType. * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetData( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLSMALLINT nTargetType, /* C DATA TYPE */ SQLPOINTER pTarget, SQLLEN nTargetLength, SQLLEN *pnLengthOrIndicator ) { return _GetData( hDrvStmt, nCol, nTargetType, pTarget, nTargetLength, pnLengthOrIndicator ); } unixODBC-2.2.14-p2/Drivers/template/SQLGetDescField.c0100755000076400007640000000170407363332155020450 0ustar nicknick/********************************************************************** * SQLGetDescField * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetDescField( SQLHDESC DescriptorHandle, SQLSMALLINT RecordNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLGetDescRec.c0100755000076400007640000000232607406123160020127 0ustar nicknick/********************************************************************** * SQLGetDescRec * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetDescRec( SQLHDESC DescriptorHandle, SQLSMALLINT RecordNumber, SQLCHAR *Name, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLSMALLINT *Type, SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision, SQLSMALLINT *Scale, SQLSMALLINT *Nullable ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLGetDiagField.c0100755000076400007640000000177007363332155020441 0ustar nicknick/********************************************************************** * SQLGetDiagField * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetDiagField( SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecordNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLGetDiagRec.c0100755000076400007640000000546310723055010020114 0ustar nicknick/********************************************************************** * SQLGetDiagRec * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetDiagRec_( SQLSMALLINT nHandleType, SQLHANDLE hHandle, SQLSMALLINT nRecordNumber, SQLCHAR * pszState, SQLINTEGER * pnNativeError, SQLCHAR * pszMessageText, SQLSMALLINT nBufferLength, SQLSMALLINT * pnStringLength ) { HLOG hLog = NULL; HLOGMSG hMsg = NULL; /* sanity checks */ if ( !hHandle ) return SQL_INVALID_HANDLE; /* clear return values */ if ( pszState ) strcpy((char*) pszState, "-----" ); if ( pnNativeError ) *pnNativeError = 0; if ( pszMessageText ) memset( pszMessageText, 0, nBufferLength ); if ( pnStringLength ) *pnStringLength = 0; /* get hLog */ switch ( nHandleType ) { case SQL_HANDLE_ENV: hLog = ((HDRVENV)hHandle)->hLog; break; case SQL_HANDLE_DBC: hLog = ((HDRVDBC)hHandle)->hLog; break; case SQL_HANDLE_STMT: hLog = ((HDRVSTMT)hHandle)->hLog; break; case SQL_HANDLE_DESC: default: return SQL_ERROR; } /* get message */ if ( logPeekMsg( hLog, 1, &hMsg ) != LOG_SUCCESS ) return SQL_NO_DATA; if ( pnNativeError ) *pnNativeError = hMsg->nCode; if ( pszMessageText ) strncpy( (char*)pszMessageText, hMsg->pszMessage, nBufferLength-1 ); if ( pnStringLength ) *pnStringLength = strlen( (char*)hMsg->pszMessage ); return SQL_SUCCESS; } SQLRETURN SQLGetDiagRec( SQLSMALLINT nHandleType, SQLHANDLE hHandle, SQLSMALLINT nRecordNumber, SQLCHAR * pszState, SQLINTEGER * pnNativeError, SQLCHAR * pszMessageText, SQLSMALLINT nBufferLength, SQLSMALLINT * pnStringLength ) { return SQLGetDiagRec_( nHandleType, hHandle, nRecordNumber, pszState, pnNativeError, pszMessageText, nBufferLength, pnStringLength ); } unixODBC-2.2.14-p2/Drivers/template/SQLGetEnvAttr.c0100755000076400007640000000157407363332155020216 0ustar nicknick/********************************************************************** * SQLGetEnvAttr * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetEnvAttr( SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLGetInfo.c0100755000076400007640000000135707363332155017525 0ustar nicknick/********************************************************************** * SQLGetInfo * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetInfo( SQLHDBC hDbc, SQLUSMALLINT nInfoType, SQLPOINTER pInfoValue, SQLSMALLINT nInfoValueMax, SQLSMALLINT *pnLength) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLGetStmtAttr.c0100755000076400007640000000260107406123160020375 0ustar nicknick/********************************************************************** * SQLGetStmtAttr * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetStmtAttr( SQLHSTMT hDrvStmt, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLGetStmtOption.c0100755000076400007640000000234607406123160020741 0ustar nicknick/********************************************************************** * SQLGetStmtOption (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetStmtOption( SQLHSTMT hDrvStmt, UWORD fOption, PTR pvParam) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLGetTypeInfo.c0100755000076400007640000000225307406123160020353 0ustar nicknick/********************************************************************** * SQLGetTypeInfo * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetTypeInfo( SQLHSTMT hDrvStmt, SQLSMALLINT nSqlType ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLMoreResults.c0100755000076400007640000000215407406123160020442 0ustar nicknick/********************************************************************** * SQLMoreResults * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLMoreResults( SQLHSTMT hDrvStmt ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLNativeSql.c0100755000076400007640000000260307406123160020063 0ustar nicknick/********************************************************************** * SQLNativeSql * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLNativeSql( SQLHSTMT hDrvStmt, SQLCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLNumParams.c0100755000076400007640000000224707406123160020064 0ustar nicknick/********************************************************************** * SQLNumParams * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLNumParams( SQLHSTMT hDrvStmt, SQLSMALLINT *pnParamCount ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLNumResultCols.c0100755000076400007640000000254507406123160020741 0ustar nicknick/********************************************************************** * SQLNumResultCols * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLNumResultCols( SQLHSTMT hDrvStmt, SQLSMALLINT *pnColumnCount ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); if ( hStmt->hStmtExtras->nRows < 1 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } /******************** * get number of columns in result set ********************/ *pnColumnCount = hStmt->hStmtExtras->nCols; logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLParamData.c0100755000076400007640000000224007406123160020004 0ustar nicknick/********************************************************************** * SQLParamData * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLParamData( SQLHSTMT hDrvStmt, SQLPOINTER *pValue ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLParamOptions.c0100755000076400007640000000225510564052117020576 0ustar nicknick/********************************************************************** * SQLParamOptions (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLParamOptions( SQLHSTMT hDrvStmt, SQLULEN nRow, SQLULEN *pnRow ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLPrepare.c0100755000076400007640000000330407406123160017552 0ustar nicknick/********************************************************************** * SQLPrepare * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLPrepare( SQLHSTMT hDrvStmt, SQLCHAR *szSqlStr, SQLINTEGER nSqlStrLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); if ( szSqlStr == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No SQL to process" ); return SQL_ERROR; } if ( hStmt->pszQuery != NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Statement already in use." ); return SQL_ERROR; } /* allocate and copy statement to buffer (process escape sequences and parameter tokens as required) */ hStmt->pszQuery = (SQLCHAR*)strdup((char*) szSqlStr ); if ( NULL == hStmt->pszQuery ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Memory allocation error" ); return SQL_ERROR; } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLPrimaryKeys.c0100755000076400007640000000256707406123161020446 0ustar nicknick/******************************************************************** * SQLPrimaryKeys * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLPrimaryKeys( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLProcedureColumns.c0100755000076400007640000000276207406123161021455 0ustar nicknick/******************************************************************** * SQLProcedureColumns * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLProcedureColumns( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szProcName, SQLSMALLINT nProcNameLength, SQLCHAR *szColumnName, SQLSMALLINT nColumnNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLProcedures.c0100755000076400007640000000257007406123161020274 0ustar nicknick/******************************************************************** * SQLProcedures * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLProcedures( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szProcName, SQLSMALLINT nProcNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLPutData.c0100755000076400007640000000243407406123161017522 0ustar nicknick/********************************************************************** * SQLPutData * * Supplies parameter data at execution time. Used in conjuction with * SQLParamData. ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLPutData( SQLHSTMT hDrvStmt, SQLPOINTER pData, SQLLEN nLengthOrIndicator ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLRowCount.c0100755000076400007640000000234507406123161017741 0ustar nicknick/********************************************************************** * SQLRowCount * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLRowCount( SQLHSTMT hDrvStmt, SQLLEN *pnRowCount) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); if ( NULL == pnRowCount ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR pnRowCount can not be NULL" ); return SQL_ERROR; } *pnRowCount = hStmt->hStmtExtras->nRows; logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLSetConnectOption.c0100755000076400007640000000241507406123161021415 0ustar nicknick/********************************************************************** * SQLSetConnectOption (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetConnectOption( SQLHDBC hDrvDbc, UWORD nOption, SQLULEN vParam) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; /* SANITY CHECKS */ if ( hDbc == SQL_NULL_HDBC ) return SQL_INVALID_HANDLE; switch ( nOption ) { case SQL_TRANSLATE_DLL: case SQL_TRANSLATE_OPTION: /* case SQL_CONNECT_OPT_DRVR_START: */ case SQL_ODBC_CURSORS: case SQL_OPT_TRACE: switch ( vParam ) { case SQL_OPT_TRACE_ON: case SQL_OPT_TRACE_OFF: default: ; } break; case SQL_OPT_TRACEFILE: case SQL_ACCESS_MODE: case SQL_AUTOCOMMIT: default: ; } logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_SUCCESS_WITH_INFO Function not fully implemented" ); return SQL_SUCCESS_WITH_INFO; } unixODBC-2.2.14-p2/Drivers/template/SQLSetCursorName.c0100755000076400007640000000310207406123161020703 0ustar nicknick/********************************************************************** * SQLSetCursorName * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetCursorName( SQLHSTMT hDrvStmt, SQLCHAR *szCursor, SQLSMALLINT nCursorLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); if ( NULL == szCursor || 0 == isalpha(*szCursor) ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Invalid cursor name" ); return SQL_ERROR; } /* COPY CURSOR */ if ( SQL_NTS == nCursorLength ) { strncpy((char*) hStmt->szCursorName,(char*) szCursor, SQL_MAX_CURSOR_NAME ); } else { /* strncpy( hStmt->szCursorName, szCursor, MIN(SQL_MAX_CURSOR_NAME - 1, nCursorLength) ); hStmt->szCursorName[ MIN( SQL_MAX_CURSOR_NAME - 1, nCursorLength) ] = '\0'; */ } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLSetDescField.c0100755000076400007640000000160507363332155020464 0ustar nicknick/********************************************************************** * SQLSetDescField * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetDescField( SQLHDESC DescriptorHandle, SQLSMALLINT RecordNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLSetDescRec.c0100755000076400007640000000223507406123161020143 0ustar nicknick/********************************************************************** * SQLSetDescRec * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetDescRec( SQLHDESC hDescriptorHandle, SQLSMALLINT nRecordNumber, SQLSMALLINT nType, SQLSMALLINT nSubType, SQLLEN nLength, SQLSMALLINT nPrecision, SQLSMALLINT nScale, SQLPOINTER pData, SQLLEN *pnStringLength, SQLLEN *pnIndicator ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLSetEnvAttr.c0100755000076400007640000000147507363332155020232 0ustar nicknick/********************************************************************** * SQLSetEnvAttr * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetEnvAttr( SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLSetParam.c0100755000076400007640000000320507406123161017671 0ustar nicknick/******************************************************************** * SQLSetParam (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLSetParam(SQLHSTMT hDrvStmt, SQLUSMALLINT nPar, SQLSMALLINT nType, SQLSMALLINT nSqlType, SQLULEN nColDef, SQLSMALLINT nScale, SQLPOINTER pValue, SQLLEN *pnValue) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); if ( NULL == hStmt->pszQuery ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No prepared statement to work with" ); return SQL_ERROR; } /****************** * 1. Your param storage is in hStmt->hStmtExtras * so you will have to code for it. Do it here. ******************/ /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLSetPos.c0100755000076400007640000000364207406123161017377 0ustar nicknick/******************************************************************** * SQLSetPos * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLSetPos( SQLHSTMT hDrvStmt, SQLSETPOSIROW nRow, SQLUSMALLINT nOperation, SQLUSMALLINT nLockType ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /* OK */ switch ( nOperation ) { case SQL_POSITION: break; case SQL_REFRESH: break; case SQL_UPDATE: break; case SQL_DELETE: break; default: sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Invalid nOperation=%d", nOperation ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); return SQL_ERROR; } switch ( nLockType ) { case SQL_LOCK_NO_CHANGE: break; case SQL_LOCK_EXCLUSIVE: break; case SQL_LOCK_UNLOCK: break; default: sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Invalid nLockType=%d", nLockType ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); return SQL_ERROR; } /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLSetScrollOptions.c0100755000076400007640000000245607406123161021452 0ustar nicknick/******************************************************************** * SQLSetScrollOptions (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLSetScrollOptions( /* Use SQLSetStmtOptions */ SQLHSTMT hDrvStmt, SQLUSMALLINT fConcurrency, SQLLEN crowKeyset, SQLUSMALLINT crowRowset) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLSetStmtAttr.c0100755000076400007640000000252707406123161020421 0ustar nicknick/********************************************************************** * SQLSetStmtAttr * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetStmtAttr( SQLHSTMT hDrvStmt, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLSetStmtOption.c0100755000076400007640000000230210723524744020756 0ustar nicknick/********************************************************************** * SQLSetStmtOption (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetStmtOption( SQLHSTMT hDrvStmt, UWORD fOption, SQLULEN vParam) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLSpecialColumns.c0100755000076400007640000000361407406123161021102 0ustar nicknick/******************************************************************** * SQLSpecialColumns * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" /* THIS IS CORRECT... SQLRETURN SQLSpecialColumns( SQLHSTMT hDrvStmt, SQLSMALLINT nColumnType, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength, SQLSMALLINT nScope, SQLSMALLINT nNullable ) THIS WORKS... */ SQLRETURN SQLSpecialColumns( SQLHSTMT hDrvStmt, UWORD nColumnType, UCHAR *szCatalogName, SWORD nCatalogNameLength, UCHAR *szSchemaName, SWORD nSchemaNameLength, UCHAR *szTableName, SWORD nTableNameLength, UWORD nScope, UWORD nNullable ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLStatistics.c0100755000076400007640000000577507406123161020325 0ustar nicknick/******************************************************************** * SQLStatistics * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" enum nSQLStatistics { TABLE_CAT = 1, TABLE_SCHEM, TABLE_NAME, NON_UNIQUE, INDEX_QUALIFIER, INDEX_NAME, TYPE, ORDINAL_POSITION, COLUMN_NAME, ASC_OR_DESC, CARDINALITY, PAGES, FILTER_CONDITION, COL_MAX }; /**************************** * replace this with init of some struct (see same func for MiniSQL driver) */ char *aSQLStatistics[] = { "one", "two" }; /****************************/ SQLRETURN SQLStatistics( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, /* MUST BE SUPPLIED */ SQLSMALLINT nTableNameLength, SQLUSMALLINT nTypeOfIndex, SQLUSMALLINT nReserved ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; int nColumn; int nCols; int nRow; COLUMNHDR *pColumnHeader; char szSQL[200]; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); if ( szTableName == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No table name" ); return SQL_ERROR; } if ( szTableName[0] == '\0' ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No table name" ); return SQL_ERROR; } /************************** * close any existing result **************************/ if ( hStmt->hStmtExtras->aResults ) _FreeResults( hStmt->hStmtExtras ); if ( hStmt->pszQuery != NULL ) free( hStmt->pszQuery ); hStmt->pszQuery = NULL; /************************** * EXEC QUERY TO GET KEYS **************************/ /************************** * allocate memory for columns headers and result data (row 0 is column header while col 0 is reserved for bookmarks) **************************/ /************************** * gather column header information (save col 0 for bookmarks) **************************/ /************************ * gather data (save col 0 for bookmarks and factor out index columns) ************************/ /************************** * free the snapshot **************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLTablePrivileges.c0100755000076400007640000000260307406123161021237 0ustar nicknick/******************************************************************** * SQLTablePrivileges * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLTablePrivileges( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/SQLTables.c0100755000076400007640000000521407406123161017371 0ustar nicknick/********************************************************************** * SQLTables * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" /**************************** * STANDARD COLUMNS RETURNED BY SQLTables ***************************/ enum nSQLTables { TABLE_CAT = 1, TABLE_SCHEM, TABLE_NAME, TABLE_TYPE, REMARKS, COL_MAX }; /**************************** * COLUMN HEADERS (1st row of result set) ***************************/ /**************************** * replace this with init of some struct (see same func for MiniSQL driver) */ char *aSQLTables[] = { "one", "two" }; /****************************/ SQLRETURN SQLTables( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength, SQLCHAR *szTableType, SQLSMALLINT nTableTypeLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; COLUMNHDR *pColumnHeader; int nColumn; long nResultMemory; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); /************************** * close any existing result **************************/ if ( hStmt->hStmtExtras->aResults ) _FreeResults( hStmt->hStmtExtras ); if ( hStmt->pszQuery != NULL ) free( hStmt->pszQuery ); hStmt->pszQuery = NULL; /************************ * generate a result set listing tables ************************/ /************************** * allocate memory for columns headers and result data (row 0 is column header while col 0 is reserved for bookmarks) **************************/ /************************** * gather column header information (save col 0 for bookmarks) **************************/ /************************ * gather data (save col 0 for bookmarks) ************************/ /************************** * free the snapshot **************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/SQLTransact.c0100755000076400007640000000253307406123161017737 0ustar nicknick/******************************************************************** * SQLTransact (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLTransact( SQLHENV hDrvEnv, SQLHDBC hDrvDbc, UWORD nType) { HDRVENV hEnv = (HDRVENV)hDrvEnv; HDRVDBC hDbc = (HDRVDBC)hDrvDbc; /* SANITY CHECKS */ if ( hDbc == SQL_NULL_HDBC ) return SQL_INVALID_HANDLE; sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg ); switch ( nType ) { case SQL_COMMIT: break; case SQL_ROLLBACK: break; default: sprintf((char*) hDbc->szSqlMsg, "SQL_ERROR Invalid nType=%d", nType ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg ); return SQL_ERROR; } logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/template/_FreeDbc.c0100644000076400007640000000255307363332155017237 0ustar nicknick/********************************************************************** * _FreeDbc * **********************************************************************/ #include "driver.h" SQLRETURN _FreeDbc( SQLHDBC hDrvDbc ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; HDRVDBC hPrevDbc; SQLRETURN nReturn; if ( hDbc == SQL_NULL_HDBC ) return SQL_ERROR; /* TRY TO FREE STATEMENTS */ /* THIS IS JUST IN CASE; SHOULD NOT BE REQUIRED */ nReturn = _FreeStmtList( hDbc ); if ( nReturn != SQL_SUCCESS ) return nReturn; /* SPECIAL CHECK FOR FIRST IN LIST */ if ( ((HDRVENV)hDbc->hEnv)->hFirstDbc == hDbc ) ((HDRVENV)hDbc->hEnv)->hFirstDbc = hDbc->pNext; /* SPECIAL CHECK FOR LAST IN LIST */ if ( ((HDRVENV)hDbc->hEnv)->hLastDbc == hDbc ) ((HDRVENV)hDbc->hEnv)->hLastDbc = hDbc->pPrev; /* EXTRACT SELF FROM LIST */ if ( hDbc->pPrev != SQL_NULL_HDBC ) hDbc->pPrev->pNext = hDbc->pNext; if ( hDbc->pNext != SQL_NULL_HDBC ) hDbc->pNext->pPrev = hDbc->pPrev; /**********************************************/ /* !!! CODE TO FREE DRIVER SPECIFIC MEMORY (hidden in hStmtExtras) HERE !!! */ if ( hDbc->hDbcExtras ) { free( hDbc->hDbcExtras ); } /**********************************************/ logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); logClose( hDbc->hLog ); free( hDbc ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/_FreeStmt.c0100644000076400007640000000254107363332155017473 0ustar nicknick/********************************************************************** * _FreeStmt * **********************************************************************/ #include "driver.h" SQLRETURN _FreeStmt( SQLHSTMT hDrvStmt ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; HDRVSTMT hPrevStmt; SQLRETURN nReturn; if ( hStmt == SQL_NULL_HDBC ) return SQL_ERROR; /* SPECIAL CHECK FOR FIRST IN LIST */ if ( ((HDRVDBC)hStmt->hDbc)->hFirstStmt == hStmt ) ((HDRVDBC)hStmt->hDbc)->hFirstStmt = hStmt->pNext; /* SPECIAL CHECK FOR LAST IN LIST */ if ( ((HDRVDBC)hStmt->hDbc)->hLastStmt == hStmt ) ((HDRVDBC)hStmt->hDbc)->hLastStmt = hStmt->pPrev; /* EXTRACT SELF FROM LIST */ if ( hStmt->pPrev != SQL_NULL_HSTMT ) hStmt->pPrev->pNext = hStmt->pNext; if ( hStmt->pNext != SQL_NULL_HSTMT ) hStmt->pNext->pPrev = hStmt->pPrev; /* FREE STANDARD MEMORY */ if( NULL != hStmt->pszQuery ) free( hStmt->pszQuery ); /*********************************************************************/ /* !!! FREE DRIVER SPECIFIC MEMORY (hidden in hStmtExtras) HERE !!! */ _FreeResults( hStmt->hStmtExtras ); free( hStmt->hStmtExtras ); /*********************************************************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); logClose( hStmt->hLog ); free( hStmt ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/_FreeDbcList.c0100644000076400007640000000135207363332155020067 0ustar nicknick/********************************************************************** * _FreeDbcList * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN _FreeDbcList( SQLHENV hDrvEnv ) { HDRVENV hEnv = (HDRVENV)hDrvEnv; if ( hEnv == SQL_NULL_HENV ) return SQL_SUCCESS; while ( _FreeDbc( hEnv->hFirstDbc ) == SQL_SUCCESS ) { } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/_FreeStmtList.c0100644000076400007640000000144707363332155020333 0ustar nicknick/********************************************************************** * _FreeStmtList * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN _FreeStmtList( SQLHDBC hDrvDbc ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; if ( hDbc == SQL_NULL_HDBC ) return SQL_SUCCESS; if ( hDbc->hFirstStmt == NULL ) return SQL_SUCCESS; while ( _FreeStmt( hDbc->hFirstStmt ) == SQL_SUCCESS ) { } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/_FreeResults.c0100644000076400007640000000302207363332155020200 0ustar nicknick/********************************************************************** * _FreeResults * **********************************************************************/ #include "driver.h" SQLRETURN _FreeResults( HSTMTEXTRAS hStmt ) { COLUMNHDR *pColumnHeader; int nCurColumn; if ( hStmt == NULL ) return SQL_ERROR; if ( hStmt->aResults == NULL ) return SQL_SUCCESS; /* COLUMN HDRS (col=0 is not used) */ for ( nCurColumn = 1; nCurColumn <= hStmt->nCols; nCurColumn++ ) { pColumnHeader = (COLUMNHDR*)(hStmt->aResults)[nCurColumn]; free( pColumnHeader->pszSQL_DESC_BASE_COLUMN_NAME ); free( pColumnHeader->pszSQL_DESC_BASE_TABLE_NAME ); free( pColumnHeader->pszSQL_DESC_CATALOG_NAME ); free( pColumnHeader->pszSQL_DESC_LABEL ); free( pColumnHeader->pszSQL_DESC_LITERAL_PREFIX ); free( pColumnHeader->pszSQL_DESC_LITERAL_SUFFIX ); free( pColumnHeader->pszSQL_DESC_LOCAL_TYPE_NAME ); free( pColumnHeader->pszSQL_DESC_NAME ); free( pColumnHeader->pszSQL_DESC_SCHEMA_NAME ); free( pColumnHeader->pszSQL_DESC_TABLE_NAME ); free( pColumnHeader->pszSQL_DESC_TYPE_NAME ); free( (hStmt->aResults)[nCurColumn] ); } /* RESULT DATA (col=0 is bookmark) */ for ( hStmt->nRow = 1; hStmt->nRow <= hStmt->nRows; hStmt->nRow++ ) { for ( nCurColumn = 1; nCurColumn <= hStmt->nCols; nCurColumn++ ) { free( (hStmt->aResults)[hStmt->nRow*hStmt->nCols+nCurColumn] ); } } free( hStmt->aResults ); hStmt->aResults = NULL; hStmt->nCols = 0; hStmt->nRows = 0; hStmt->nRow = 0; return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/_GetData.c0100644000076400007640000000643607406123161017253 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" SQLRETURN _GetData( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLSMALLINT nTargetType, /* C DATA TYPE */ SQLPOINTER pTarget, SQLLEN nTargetLength, SQLLEN *pnLengthOrIndicator ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; char *pSourceData = NULL; /* SANITY CHECKS */ if ( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; if ( hStmt->hStmtExtras == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; if ( hStmt->hStmtExtras->nRows == 0 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } /********************************************************************** * GET pSourceData FOR NORMAL RESULT SETS **********************************************************************/ if ( hStmt->hStmtExtras->nRow > hStmt->hStmtExtras->nRows || hStmt->hStmtExtras->nRow < 1 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No current row" ); return SQL_ERROR; } pSourceData = (hStmt->hStmtExtras->aResults)[hStmt->hStmtExtras->nRow*hStmt->hStmtExtras->nCols+nCol]; /**************************** * ALL cols are stored as SQL_CHAR... bad for storage... good for code * SO no need to determine the source type when translating to destination ***************************/ if ( pSourceData == NULL ) { /********************* * Now get the col if value = NULL *********************/ if ( pnLengthOrIndicator != NULL ) *pnLengthOrIndicator = SQL_NULL_DATA; switch ( nTargetType ) { case SQL_C_LONG: memset( pTarget, 0, sizeof(int) ); break; case SQL_C_FLOAT: memset( pTarget, 0, sizeof(float) ); break; case SQL_C_CHAR: *((char *)pTarget) = '\0'; break; default: sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Unknown target type %d", nTargetType ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); } } else { /********************* * Now get the col when we have a value *********************/ switch ( nTargetType ) { case SQL_C_LONG: *((int *)pTarget) = atoi(pSourceData); if ( NULL != pnLengthOrIndicator ) *pnLengthOrIndicator = sizeof( int ); break; case SQL_C_FLOAT: sscanf( pSourceData, "%g", pTarget ); if ( NULL != pnLengthOrIndicator ) *pnLengthOrIndicator = sizeof( float ); break; case SQL_C_CHAR: strncpy( pTarget, pSourceData, nTargetLength ); if ( NULL != pnLengthOrIndicator ) *pnLengthOrIndicator = strlen(pTarget); break; default: sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Unknown target type %d", nTargetType ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg ); } } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/_NativeToSQLColumnHeader.c0100644000076400007640000000100407363332155022333 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" SQLRETURN _NativeToSQLColumnHeader( COLUMNHDR *pColumnHeader, void *pNativeColumnHeader ) { return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/template/_NativeToSQLType.c0100644000076400007640000000073107363332155020714 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" int _NativeToSQLType( void *pNativeColumnHeader ) { return SQL_CHAR; } unixODBC-2.2.14-p2/Drivers/template/_NativeTypeDesc.c0100644000076400007640000000074507363332155020635 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" char *_NativeTypeDesc( char *pszTypeName, int nMySQLType ) { return pszTypeName; } unixODBC-2.2.14-p2/Drivers/template/_NativeTypeLength.c0100644000076400007640000000072307363332155021174 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" int _NativeTypeLength( void *pNativeColumnHeader ) { return 0; } unixODBC-2.2.14-p2/Drivers/template/_NativeTypePrecision.c0100644000076400007640000000072607363332155021711 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" int _NativeTypePrecision( void *pNativeColumnHeader ) { return 0; } unixODBC-2.2.14-p2/Drivers/template/driver.h0100644000076400007640000000621207363332155017102 0ustar nicknick/********************************************** * Driver.h * * Description: * * This is all of the stuff that is common among ALL drivers (but not to the DriverManager). * * Make sure that your driver specific driverextras.h exists! * * Creating a new driver? It is unlikely that you will need to change this * but take a look at driverextras.h * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************/ #ifndef _H_DRIVER #define _H_DRIVER /***************************************************************************** * ODBC VERSION (THAT THIS DRIVER COMPLIES WITH) *****************************************************************************/ #define ODBCVER 0x0351 #include #include #include #include #include "driverextras.h" #define SQL_MAX_CURSOR_NAME 100 /***************************************************************************** * STATEMENT *****************************************************************************/ typedef struct tDRVSTMT { struct tDRVSTMT *pPrev; /* prev struct or null */ struct tDRVSTMT *pNext; /* next struct or null */ SQLPOINTER hDbc; /* pointer to DB context */ SQLCHAR szCursorName[SQL_MAX_CURSOR_NAME]; /* name of cursor */ SQLCHAR *pszQuery; /* query string */ SQLCHAR szSqlMsg[LOG_MSG_MAX]; /* buff to format msgs */ HLOG hLog; /* handle to msg logs */ HSTMTEXTRAS hStmtExtras; /* DRIVER SPECIFIC STORAGE */ } DRVSTMT, *HDRVSTMT; /***************************************************************************** * CONNECTION *****************************************************************************/ typedef struct tDRVDBC { struct tDRVDBC *pPrev; /* prev struct or null */ struct tDRVDBC *pNext; /* next struct or null */ SQLPOINTER hEnv; /* pointer to ENV structure */ HDRVSTMT hFirstStmt; /* first in list or null */ HDRVSTMT hLastStmt; /* last in list or null */ SQLCHAR szSqlMsg[LOG_MSG_MAX]; /* buff to format msgs */ HLOG hLog; /* handle to msg logs */ int bConnected; /* TRUE on open connection */ HDBCEXTRAS hDbcExtras; /* DRIVER SPECIFIC DATA */ } DRVDBC, *HDRVDBC; /***************************************************************************** * ENVIRONMENT *****************************************************************************/ typedef struct tDRVENV { HDRVDBC hFirstDbc; /* first in list or null */ HDRVDBC hLastDbc; /* last in list or null */ SQLCHAR szSqlMsg[LOG_MSG_MAX]; /* buff to format msgs */ HLOG hLog; /* handle to msg logs */ HENVEXTRAS hEnvExtras; } DRVENV, *HDRVENV; #endif unixODBC-2.2.14-p2/Drivers/template/driverextras.h0100644000076400007640000001676510723055010020331 0ustar nicknick/********************************************** * driverextras.h * * Purpose: * * To define driver specifc extras such as structs to be included * along side the common ODBC includes. * * Description: * * The short-term storage a driver requires as infrastructure varies somewhat from * DBMS to DBMS. The ODBC DriverManager requires predictable storage and it is defined * in drivermanager.h. The Driver also requires predictable storage and * it is defined in driver.h. Storage *specific to a type of driver* is defined here. * * The three main storage items are the ENV, DBC, and STMT structs. These are defined * as type void * in isql.h. * * So if your driver requires extra storage (and it probably does) then define * the storage within these structs, allocate/initialize as required. Cast them * to and from the standard names as required. * * For example; * * App DM |DRV * (as per hdbc.h) |(as per driver.h) *==================================================================== * hDbc=void* hDbc=SQLHDBC hDbc=HDBCEXTRAS *-------------------------------------------------------------------- * * DO NOT FORGET TO FREE ANY ALLOCATED MEMORY (at some point) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #ifndef DRIVEREXTRAS_H #define DRIVEREXTRAS_H /********************************************** * KEEP IT SIMPLE; PUT ALL DRIVER INCLUDES HERE THEN EACH DRIVER MODULE JUST INCLUDES THIS ONE FILE **********************************************/ #include #include #include #include #include /**************************** * include DBMS specific includes here and make any required defines here as well */ /***************************/ /********************************************** * ENVIRONMENT: DRIVER SPECIFIC STUFF THAT NEEDS TO BE STORED IN THE DRIVERS ENVIRONMENT **********************************************/ typedef struct tENVEXTRAS { /**************************** * this is usually left empty ***************************/ int nDummy; } ENVEXTRAS, *HENVEXTRAS; /********************************************** * CONNECTION: DRIVER SPECIFIC STUFF THAT NEEDS TO BE STORED IN THE DRIVERS CONNECTIONS **********************************************/ typedef struct tDBCEXTRAS { /**************************** * replace dummy with your DBMS specific stuff. This often means such things as a socket handle. ***************************/ int nDummy; } DBCEXTRAS, *HDBCEXTRAS; /********************************************** * STATEMENT: DRIVER SPECIFIC STUFF THAT NEEDS TO BE STORED IN THE DRIVERS STATEMENTS **********************************************/ typedef struct tCOLUMNHDR /* each element of the 1st row of results is one of these (except col 0) */ { /* EVERYTHING YOU WOULD EVER WANT TO KNOW ABOUT THE COLUMN. INIT THIS BY CALLING */ /* _NativeToSQLColumnHeader AS SOON AS YOU HAVE COLUMN INFO. THIS MAKES THE COL HDR LARGER */ /* BUT GENERALIZES MORE CODE. see SQLColAttribute() */ int bSQL_DESC_AUTO_UNIQUE_VALUE; /* IS AUTO INCREMENT COL? */ char *pszSQL_DESC_BASE_COLUMN_NAME; /* empty string if N/A */ char *pszSQL_DESC_BASE_TABLE_NAME; /* empty string if N/A */ int bSQL_DESC_CASE_SENSITIVE; /* IS CASE SENSITIVE COLUMN? */ char *pszSQL_DESC_CATALOG_NAME; /* empty string if N/A */ int nSQL_DESC_CONCISE_TYPE; /* ie SQL_CHAR, SQL_TYPE_TIME... */ int nSQL_DESC_DISPLAY_SIZE; /* max digits required to display */ int bSQL_DESC_FIXED_PREC_SCALE; /* has data source specific precision? */ char *pszSQL_DESC_LABEL; /* display label, col name or empty string */ int nSQL_DESC_LENGTH; /* strlen or bin size */ char *pszSQL_DESC_LITERAL_PREFIX; /* empty string if N/A */ char *pszSQL_DESC_LITERAL_SUFFIX; /* empty string if N/A */ char *pszSQL_DESC_LOCAL_TYPE_NAME; /* empty string if N/A */ char *pszSQL_DESC_NAME; /* col alias, col name or empty string */ int nSQL_DESC_NULLABLE; /* SQL_NULLABLE, _NO_NULLS or _UNKNOWN */ int nSQL_DESC_NUM_PREC_RADIX; /* 2, 10, or if N/A... 0 */ int nSQL_DESC_OCTET_LENGTH; /* max size */ int nSQL_DESC_PRECISION; /* */ int nSQL_DESC_SCALE; /* */ char *pszSQL_DESC_SCHEMA_NAME; /* empty string if N/A */ int nSQL_DESC_SEARCHABLE; /* can be in a filter ie SQL_PRED_NONE... */ char *pszSQL_DESC_TABLE_NAME; /* empty string if N/A */ int nSQL_DESC_TYPE; /* SQL data type ie SQL_CHAR, SQL_INTEGER.. */ char *pszSQL_DESC_TYPE_NAME; /* DBMS data type ie VARCHAR, MONEY... */ int nSQL_DESC_UNNAMED; /* qualifier for SQL_DESC_NAME ie SQL_NAMED */ int bSQL_DESC_UNSIGNED; /* if signed FALSE else TRUE */ int nSQL_DESC_UPDATABLE; /* ie SQL_ATTR_READONLY, SQL_ATTR_WRITE... */ /* BINDING INFO */ short nTargetType; /* BIND: C DATA TYPE ie SQL_C_CHAR */ char *pTargetValue; /* BIND: POINTER FROM APPLICATION TO COPY TO*/ long nTargetValueMax; /* BIND: MAX SPACE IN pTargetValue */ long *pnLengthOrIndicator; /* BIND: TO RETURN LENGTH OR NULL INDICATOR */ } COLUMNHDR; typedef struct tSTMTEXTRAS { char **aResults; /* nRows x nCols OF CHAR POINTERS. Row 0= ptrs to COLUMNHDR. Col 0=Bookmarks */ int nCols; /* # OF VALID COLUMNS IN aColumns */ int nRows; /* # OF ROWS IN aResults */ int nRow; /* CURRENT ROW */ } STMTEXTRAS, *HSTMTEXTRAS; /* * Shadow functions * * There are times when a function needs to call another function to use common functionality. When the * called function is part of the ODBC API (an entry point to the driver) bad things can happen. The * linker will get confused and call the same-named function elsewhere in the namespace (ie the Driver * Manager). To get around this you create a shadow function - a function with a slightly different name * that will not be confused with others - and then put most if not all of the functionality in there for * common use. * */ SQLRETURN SQLGetDiagRec_( SQLSMALLINT nHandleType, SQLHANDLE hHandle, SQLSMALLINT nRecordNumber, SQLCHAR * pszState, SQLINTEGER * pnNativeError, SQLCHAR * pszMessageText, SQLSMALLINT nBufferLength, SQLSMALLINT * pnStringLength ); SQLRETURN _GetData( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLSMALLINT nTargetType, SQLPOINTER pTarget, SQLLEN nTargetLength, SQLLEN *pnLengthOrIndicator ); /* * Internal Support Functions */ SQLRETURN _NativeToSQLColumnHeader( COLUMNHDR *pColumnHeader, void *pNativeColumnHeader ); int _NativeToSQLType( void *pNativeColumnHeader ); char *_NativeTypeDesc( char *pszTypeName, int nType ); int _NativeTypeLength( void *pNativeColumnHeader ); int _NativeTypePrecision( void *pNativeColumnHeader ); #endif unixODBC-2.2.14-p2/Drivers/MiniSQL/0040755000076400007640000000000011150523345015071 5ustar nicknickunixODBC-2.2.14-p2/Drivers/MiniSQL/README0100644000076400007640000000265407363332151015761 0ustar nicknick*************************************************************** * This code is LGPL. You CAN make commercial solutions using * * LGPL software. * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | Driver for MiniSQL | +-------------------------------------------------------------+ This driver is for use with the MiniSQL SQL Server Version 2.x. To build 1. modify Config.mk as required 2. make Compliance This driver is a work in progress which strives to meet 3.51 CLI compliance. This driver currently implements a usefull set of; 1. catalog functions via SQLColumns, SQLTables, SQLDescribeCol, SQLColAttribute 2. alloc and free calls for Environment, Connection, and Statement 3. connect via SQLConnect 4. SQL execution via SQLPrepare, SQLExecute 5. data retreival via SQLFetch, SQLBindCol, SQLGetData If you would like to improve this driver then please send me (Peter Harvey) an email. +-------------------------------------------------------------+ | Please vist; | | www.codebydesign.com/unixODBC | | www.Hughes.com.au | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/Drivers/MiniSQL/Makefile.am0100644000076400007640000000744011025707353017133 0ustar nicknickif MSQL lib_LTLIBRARIES = libodbcmini.la INCLUDES = -I@top_srcdir@/include -I. -I@msql_headers@ -I${LTDLINCL} # PAH - Redundant? # DEFS = -DUNIXODBC @DEFS@ -DDRIVER_NAME=\"odbcminisql\" libodbcmini_la_SOURCES = \ SQLAllocConnect.c \ SQLAllocEnv.c \ SQLAllocHandle.c \ SQLAllocStmt.c \ SQLBindCol.c \ SQLBindParameter.c \ SQLBrowseConnect.c \ SQLBulkOperations.c \ SQLCancel.c \ SQLCloseCursor.c \ SQLColAttribute.c \ SQLColAttributes.c \ SQLColumnPrivileges.c \ SQLColumns.c \ SQLConnect.c \ SQLCopyDesc.c \ SQLDescribeCol.c \ SQLDescribeParam.c \ SQLDisconnect.c \ SQLDriverConnect.c \ SQLEndTran.c \ SQLError.c \ SQLExecDirect.c \ SQLExecute.c \ SQLExtendedFetch.c \ SQLFetch.c \ SQLFetchScroll.c \ SQLForeignKeys.c \ SQLFreeConnect.c \ SQLFreeEnv.c \ SQLFreeHandle.c \ SQLFreeStmt.c \ SQLGetConnectAttr.c \ SQLGetConnectOption.c \ SQLGetCursorName.c \ SQLGetData.c \ SQLGetDescField.c \ SQLGetDescRec.c \ SQLGetDiagField.c \ SQLGetDiagRec.c \ SQLGetEnvAttr.c \ SQLGetInfo.c \ SQLGetStmtAttr.c \ SQLGetStmtOption.c \ SQLGetTypeInfo.c \ SQLMoreResults.c \ SQLNativeSql.c \ SQLNumParams.c \ SQLNumResultCols.c \ SQLParamData.c \ SQLParamOptions.c \ SQLPrepare.c \ SQLPrimaryKeys.c \ SQLProcedureColumns.c \ SQLProcedures.c \ SQLPutData.c \ SQLRowCount.c \ SQLSetConnectOption.c \ SQLSetCursorName.c \ SQLSetDescField.c \ SQLSetDescRec.c \ SQLSetEnvAttr.c \ SQLSetParam.c \ SQLSetPos.c \ SQLSetScrollOptions.c \ SQLSetStmtAttr.c \ SQLSetStmtOption.c \ SQLSpecialColumns.c \ SQLStatistics.c \ SQLTablePrivileges.c \ SQLTables.c \ SQLTransact.c \ _AllocConnect.c \ _AllocEnv.c \ _AllocStmt.c \ _Execute.c \ _FreeDbc.c \ _FreeStmt.c \ _FreeDbcList.c \ _FreeStmtList.c \ _FreeResults.c \ _GetData.c \ _NativeToSQLColumnHeader.c \ _NativeToSQLType.c \ _NativeTypeDesc.c \ _NativeTypeLength.c \ _NativeTypePrecision.c \ _Prepare.c \ sqlFreeConnect.c \ sqlFreeEnv.c \ sqlFreeStmt.c endif EXTRA_DIST = \ SQLAllocConnect.c \ SQLAllocEnv.c \ SQLAllocHandle.c \ SQLAllocStmt.c \ SQLBindCol.c \ SQLBindParameter.c \ SQLBrowseConnect.c \ SQLBulkOperations.c \ SQLCancel.c \ SQLCloseCursor.c \ SQLColAttribute.c \ SQLColAttributes.c \ SQLColumnPrivileges.c \ SQLColumns.c \ SQLConnect.c \ SQLCopyDesc.c \ SQLDescribeCol.c \ SQLDescribeParam.c \ SQLDisconnect.c \ SQLDriverConnect.c \ SQLEndTran.c \ SQLError.c \ SQLExecDirect.c \ SQLExecute.c \ SQLExtendedFetch.c \ SQLFetch.c \ SQLFetchScroll.c \ SQLForeignKeys.c \ SQLFreeConnect.c \ SQLFreeEnv.c \ SQLFreeHandle.c \ SQLFreeStmt.c \ SQLGetConnectAttr.c \ SQLGetConnectOption.c \ SQLGetCursorName.c \ SQLGetData.c \ SQLGetDescField.c \ SQLGetDescRec.c \ SQLGetDiagField.c \ SQLGetDiagRec.c \ SQLGetEnvAttr.c \ SQLGetInfo.c \ SQLGetStmtAttr.c \ SQLGetStmtOption.c \ SQLGetTypeInfo.c \ SQLMoreResults.c \ SQLNativeSql.c \ SQLNumParams.c \ SQLNumResultCols.c \ SQLParamData.c \ SQLParamOptions.c \ SQLPrepare.c \ SQLPrimaryKeys.c \ SQLProcedureColumns.c \ SQLProcedures.c \ SQLPutData.c \ SQLRowCount.c \ SQLSetConnectOption.c \ SQLSetCursorName.c \ SQLSetDescField.c \ SQLSetDescRec.c \ SQLSetEnvAttr.c \ SQLSetParam.c \ SQLSetPos.c \ SQLSetScrollOptions.c \ SQLSetStmtAttr.c \ SQLSetStmtOption.c \ SQLSpecialColumns.c \ SQLStatistics.c \ SQLTablePrivileges.c \ SQLTables.c \ SQLTransact.c \ _AllocConnect.c \ _AllocEnv.c \ _AllocStmt.c \ _Execute.c \ _FreeDbc.c \ _FreeDbcList.c \ _FreeResults.c \ _FreeStmt.c \ _FreeStmtList.c \ _GetData.c \ _NativeToSQLColumnHeader.c \ _NativeToSQLType.c \ _NativeTypeDesc.c \ _NativeTypeLength.c \ _NativeTypePrecision.c \ _Prepare.c \ driver.h \ driverextras.h \ sqlFreeConnect.c \ sqlFreeEnv.c \ sqlFreeStmt.c libodbcmini_la_LDFLAGS = -no-undefined -version-info 1:0:0 \ -L@msql_libraries@ -lmsql -module unixODBC-2.2.14-p2/Drivers/MiniSQL/Makefile.in0100644000076400007640000007551411111035231017134 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = Drivers/MiniSQL DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libodbcmini_la_LIBADD = am__libodbcmini_la_SOURCES_DIST = SQLAllocConnect.c SQLAllocEnv.c \ SQLAllocHandle.c SQLAllocStmt.c SQLBindCol.c \ SQLBindParameter.c SQLBrowseConnect.c SQLBulkOperations.c \ SQLCancel.c SQLCloseCursor.c SQLColAttribute.c \ SQLColAttributes.c SQLColumnPrivileges.c SQLColumns.c \ SQLConnect.c SQLCopyDesc.c SQLDescribeCol.c SQLDescribeParam.c \ SQLDisconnect.c SQLDriverConnect.c SQLEndTran.c SQLError.c \ SQLExecDirect.c SQLExecute.c SQLExtendedFetch.c SQLFetch.c \ SQLFetchScroll.c SQLForeignKeys.c SQLFreeConnect.c \ SQLFreeEnv.c SQLFreeHandle.c SQLFreeStmt.c SQLGetConnectAttr.c \ SQLGetConnectOption.c SQLGetCursorName.c SQLGetData.c \ SQLGetDescField.c SQLGetDescRec.c SQLGetDiagField.c \ SQLGetDiagRec.c SQLGetEnvAttr.c SQLGetInfo.c SQLGetStmtAttr.c \ SQLGetStmtOption.c SQLGetTypeInfo.c SQLMoreResults.c \ SQLNativeSql.c SQLNumParams.c SQLNumResultCols.c \ SQLParamData.c SQLParamOptions.c SQLPrepare.c SQLPrimaryKeys.c \ SQLProcedureColumns.c SQLProcedures.c SQLPutData.c \ SQLRowCount.c SQLSetConnectOption.c SQLSetCursorName.c \ SQLSetDescField.c SQLSetDescRec.c SQLSetEnvAttr.c \ SQLSetParam.c SQLSetPos.c SQLSetScrollOptions.c \ SQLSetStmtAttr.c SQLSetStmtOption.c SQLSpecialColumns.c \ SQLStatistics.c SQLTablePrivileges.c SQLTables.c SQLTransact.c \ _AllocConnect.c _AllocEnv.c _AllocStmt.c _Execute.c _FreeDbc.c \ _FreeStmt.c _FreeDbcList.c _FreeStmtList.c _FreeResults.c \ _GetData.c _NativeToSQLColumnHeader.c _NativeToSQLType.c \ _NativeTypeDesc.c _NativeTypeLength.c _NativeTypePrecision.c \ _Prepare.c sqlFreeConnect.c sqlFreeEnv.c sqlFreeStmt.c @MSQL_TRUE@am_libodbcmini_la_OBJECTS = SQLAllocConnect.lo \ @MSQL_TRUE@ SQLAllocEnv.lo SQLAllocHandle.lo SQLAllocStmt.lo \ @MSQL_TRUE@ SQLBindCol.lo SQLBindParameter.lo \ @MSQL_TRUE@ SQLBrowseConnect.lo SQLBulkOperations.lo \ @MSQL_TRUE@ SQLCancel.lo SQLCloseCursor.lo SQLColAttribute.lo \ @MSQL_TRUE@ SQLColAttributes.lo SQLColumnPrivileges.lo \ @MSQL_TRUE@ SQLColumns.lo SQLConnect.lo SQLCopyDesc.lo \ @MSQL_TRUE@ SQLDescribeCol.lo SQLDescribeParam.lo \ @MSQL_TRUE@ SQLDisconnect.lo SQLDriverConnect.lo SQLEndTran.lo \ @MSQL_TRUE@ SQLError.lo SQLExecDirect.lo SQLExecute.lo \ @MSQL_TRUE@ SQLExtendedFetch.lo SQLFetch.lo SQLFetchScroll.lo \ @MSQL_TRUE@ SQLForeignKeys.lo SQLFreeConnect.lo SQLFreeEnv.lo \ @MSQL_TRUE@ SQLFreeHandle.lo SQLFreeStmt.lo \ @MSQL_TRUE@ SQLGetConnectAttr.lo SQLGetConnectOption.lo \ @MSQL_TRUE@ SQLGetCursorName.lo SQLGetData.lo \ @MSQL_TRUE@ SQLGetDescField.lo SQLGetDescRec.lo \ @MSQL_TRUE@ SQLGetDiagField.lo SQLGetDiagRec.lo \ @MSQL_TRUE@ SQLGetEnvAttr.lo SQLGetInfo.lo SQLGetStmtAttr.lo \ @MSQL_TRUE@ SQLGetStmtOption.lo SQLGetTypeInfo.lo \ @MSQL_TRUE@ SQLMoreResults.lo SQLNativeSql.lo SQLNumParams.lo \ @MSQL_TRUE@ SQLNumResultCols.lo SQLParamData.lo \ @MSQL_TRUE@ SQLParamOptions.lo SQLPrepare.lo SQLPrimaryKeys.lo \ @MSQL_TRUE@ SQLProcedureColumns.lo SQLProcedures.lo \ @MSQL_TRUE@ SQLPutData.lo SQLRowCount.lo SQLSetConnectOption.lo \ @MSQL_TRUE@ SQLSetCursorName.lo SQLSetDescField.lo \ @MSQL_TRUE@ SQLSetDescRec.lo SQLSetEnvAttr.lo SQLSetParam.lo \ @MSQL_TRUE@ SQLSetPos.lo SQLSetScrollOptions.lo \ @MSQL_TRUE@ SQLSetStmtAttr.lo SQLSetStmtOption.lo \ @MSQL_TRUE@ SQLSpecialColumns.lo SQLStatistics.lo \ @MSQL_TRUE@ SQLTablePrivileges.lo SQLTables.lo SQLTransact.lo \ @MSQL_TRUE@ _AllocConnect.lo _AllocEnv.lo _AllocStmt.lo \ @MSQL_TRUE@ _Execute.lo _FreeDbc.lo _FreeStmt.lo \ @MSQL_TRUE@ _FreeDbcList.lo _FreeStmtList.lo _FreeResults.lo \ @MSQL_TRUE@ _GetData.lo _NativeToSQLColumnHeader.lo \ @MSQL_TRUE@ _NativeToSQLType.lo _NativeTypeDesc.lo \ @MSQL_TRUE@ _NativeTypeLength.lo _NativeTypePrecision.lo \ @MSQL_TRUE@ _Prepare.lo sqlFreeConnect.lo sqlFreeEnv.lo \ @MSQL_TRUE@ sqlFreeStmt.lo libodbcmini_la_OBJECTS = $(am_libodbcmini_la_OBJECTS) @MSQL_TRUE@am_libodbcmini_la_rpath = -rpath $(libdir) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodbcmini_la_SOURCES) DIST_SOURCES = $(am__libodbcmini_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @MSQL_TRUE@lib_LTLIBRARIES = libodbcmini.la @MSQL_TRUE@INCLUDES = -I@top_srcdir@/include -I. -I@msql_headers@ -I${LTDLINCL} # PAH - Redundant? # DEFS = -DUNIXODBC @DEFS@ -DDRIVER_NAME=\"odbcminisql\" @MSQL_TRUE@libodbcmini_la_SOURCES = \ @MSQL_TRUE@ SQLAllocConnect.c \ @MSQL_TRUE@ SQLAllocEnv.c \ @MSQL_TRUE@ SQLAllocHandle.c \ @MSQL_TRUE@ SQLAllocStmt.c \ @MSQL_TRUE@ SQLBindCol.c \ @MSQL_TRUE@ SQLBindParameter.c \ @MSQL_TRUE@ SQLBrowseConnect.c \ @MSQL_TRUE@ SQLBulkOperations.c \ @MSQL_TRUE@ SQLCancel.c \ @MSQL_TRUE@ SQLCloseCursor.c \ @MSQL_TRUE@ SQLColAttribute.c \ @MSQL_TRUE@ SQLColAttributes.c \ @MSQL_TRUE@ SQLColumnPrivileges.c \ @MSQL_TRUE@ SQLColumns.c \ @MSQL_TRUE@ SQLConnect.c \ @MSQL_TRUE@ SQLCopyDesc.c \ @MSQL_TRUE@ SQLDescribeCol.c \ @MSQL_TRUE@ SQLDescribeParam.c \ @MSQL_TRUE@ SQLDisconnect.c \ @MSQL_TRUE@ SQLDriverConnect.c \ @MSQL_TRUE@ SQLEndTran.c \ @MSQL_TRUE@ SQLError.c \ @MSQL_TRUE@ SQLExecDirect.c \ @MSQL_TRUE@ SQLExecute.c \ @MSQL_TRUE@ SQLExtendedFetch.c \ @MSQL_TRUE@ SQLFetch.c \ @MSQL_TRUE@ SQLFetchScroll.c \ @MSQL_TRUE@ SQLForeignKeys.c \ @MSQL_TRUE@ SQLFreeConnect.c \ @MSQL_TRUE@ SQLFreeEnv.c \ @MSQL_TRUE@ SQLFreeHandle.c \ @MSQL_TRUE@ SQLFreeStmt.c \ @MSQL_TRUE@ SQLGetConnectAttr.c \ @MSQL_TRUE@ SQLGetConnectOption.c \ @MSQL_TRUE@ SQLGetCursorName.c \ @MSQL_TRUE@ SQLGetData.c \ @MSQL_TRUE@ SQLGetDescField.c \ @MSQL_TRUE@ SQLGetDescRec.c \ @MSQL_TRUE@ SQLGetDiagField.c \ @MSQL_TRUE@ SQLGetDiagRec.c \ @MSQL_TRUE@ SQLGetEnvAttr.c \ @MSQL_TRUE@ SQLGetInfo.c \ @MSQL_TRUE@ SQLGetStmtAttr.c \ @MSQL_TRUE@ SQLGetStmtOption.c \ @MSQL_TRUE@ SQLGetTypeInfo.c \ @MSQL_TRUE@ SQLMoreResults.c \ @MSQL_TRUE@ SQLNativeSql.c \ @MSQL_TRUE@ SQLNumParams.c \ @MSQL_TRUE@ SQLNumResultCols.c \ @MSQL_TRUE@ SQLParamData.c \ @MSQL_TRUE@ SQLParamOptions.c \ @MSQL_TRUE@ SQLPrepare.c \ @MSQL_TRUE@ SQLPrimaryKeys.c \ @MSQL_TRUE@ SQLProcedureColumns.c \ @MSQL_TRUE@ SQLProcedures.c \ @MSQL_TRUE@ SQLPutData.c \ @MSQL_TRUE@ SQLRowCount.c \ @MSQL_TRUE@ SQLSetConnectOption.c \ @MSQL_TRUE@ SQLSetCursorName.c \ @MSQL_TRUE@ SQLSetDescField.c \ @MSQL_TRUE@ SQLSetDescRec.c \ @MSQL_TRUE@ SQLSetEnvAttr.c \ @MSQL_TRUE@ SQLSetParam.c \ @MSQL_TRUE@ SQLSetPos.c \ @MSQL_TRUE@ SQLSetScrollOptions.c \ @MSQL_TRUE@ SQLSetStmtAttr.c \ @MSQL_TRUE@ SQLSetStmtOption.c \ @MSQL_TRUE@ SQLSpecialColumns.c \ @MSQL_TRUE@ SQLStatistics.c \ @MSQL_TRUE@ SQLTablePrivileges.c \ @MSQL_TRUE@ SQLTables.c \ @MSQL_TRUE@ SQLTransact.c \ @MSQL_TRUE@ _AllocConnect.c \ @MSQL_TRUE@ _AllocEnv.c \ @MSQL_TRUE@ _AllocStmt.c \ @MSQL_TRUE@ _Execute.c \ @MSQL_TRUE@ _FreeDbc.c \ @MSQL_TRUE@ _FreeStmt.c \ @MSQL_TRUE@ _FreeDbcList.c \ @MSQL_TRUE@ _FreeStmtList.c \ @MSQL_TRUE@ _FreeResults.c \ @MSQL_TRUE@ _GetData.c \ @MSQL_TRUE@ _NativeToSQLColumnHeader.c \ @MSQL_TRUE@ _NativeToSQLType.c \ @MSQL_TRUE@ _NativeTypeDesc.c \ @MSQL_TRUE@ _NativeTypeLength.c \ @MSQL_TRUE@ _NativeTypePrecision.c \ @MSQL_TRUE@ _Prepare.c \ @MSQL_TRUE@ sqlFreeConnect.c \ @MSQL_TRUE@ sqlFreeEnv.c \ @MSQL_TRUE@ sqlFreeStmt.c EXTRA_DIST = \ SQLAllocConnect.c \ SQLAllocEnv.c \ SQLAllocHandle.c \ SQLAllocStmt.c \ SQLBindCol.c \ SQLBindParameter.c \ SQLBrowseConnect.c \ SQLBulkOperations.c \ SQLCancel.c \ SQLCloseCursor.c \ SQLColAttribute.c \ SQLColAttributes.c \ SQLColumnPrivileges.c \ SQLColumns.c \ SQLConnect.c \ SQLCopyDesc.c \ SQLDescribeCol.c \ SQLDescribeParam.c \ SQLDisconnect.c \ SQLDriverConnect.c \ SQLEndTran.c \ SQLError.c \ SQLExecDirect.c \ SQLExecute.c \ SQLExtendedFetch.c \ SQLFetch.c \ SQLFetchScroll.c \ SQLForeignKeys.c \ SQLFreeConnect.c \ SQLFreeEnv.c \ SQLFreeHandle.c \ SQLFreeStmt.c \ SQLGetConnectAttr.c \ SQLGetConnectOption.c \ SQLGetCursorName.c \ SQLGetData.c \ SQLGetDescField.c \ SQLGetDescRec.c \ SQLGetDiagField.c \ SQLGetDiagRec.c \ SQLGetEnvAttr.c \ SQLGetInfo.c \ SQLGetStmtAttr.c \ SQLGetStmtOption.c \ SQLGetTypeInfo.c \ SQLMoreResults.c \ SQLNativeSql.c \ SQLNumParams.c \ SQLNumResultCols.c \ SQLParamData.c \ SQLParamOptions.c \ SQLPrepare.c \ SQLPrimaryKeys.c \ SQLProcedureColumns.c \ SQLProcedures.c \ SQLPutData.c \ SQLRowCount.c \ SQLSetConnectOption.c \ SQLSetCursorName.c \ SQLSetDescField.c \ SQLSetDescRec.c \ SQLSetEnvAttr.c \ SQLSetParam.c \ SQLSetPos.c \ SQLSetScrollOptions.c \ SQLSetStmtAttr.c \ SQLSetStmtOption.c \ SQLSpecialColumns.c \ SQLStatistics.c \ SQLTablePrivileges.c \ SQLTables.c \ SQLTransact.c \ _AllocConnect.c \ _AllocEnv.c \ _AllocStmt.c \ _Execute.c \ _FreeDbc.c \ _FreeDbcList.c \ _FreeResults.c \ _FreeStmt.c \ _FreeStmtList.c \ _GetData.c \ _NativeToSQLColumnHeader.c \ _NativeToSQLType.c \ _NativeTypeDesc.c \ _NativeTypeLength.c \ _NativeTypePrecision.c \ _Prepare.c \ driver.h \ driverextras.h \ sqlFreeConnect.c \ sqlFreeEnv.c \ sqlFreeStmt.c libodbcmini_la_LDFLAGS = -no-undefined -version-info 1:0:0 \ -L@msql_libraries@ -lmsql -module all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Drivers/MiniSQL/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Drivers/MiniSQL/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libodbcmini.la: $(libodbcmini_la_OBJECTS) $(libodbcmini_la_DEPENDENCIES) $(LINK) $(am_libodbcmini_la_rpath) $(libodbcmini_la_LDFLAGS) $(libodbcmini_la_OBJECTS) $(libodbcmini_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocEnv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindParameter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBrowseConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBulkOperations.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCancel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCloseCursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColAttribute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColAttributes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColumnPrivileges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCopyDesc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDescribeCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDescribeParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDisconnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDriverConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLEndTran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLError.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExecDirect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExecute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExtendedFetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFetchScroll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLForeignKeys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeEnv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConnectAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetCursorName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDescField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDescRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDiagField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetDiagRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetEnvAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetStmtAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetStmtOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetTypeInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLMoreResults.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNativeSql.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNumParams.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNumResultCols.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLParamData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLParamOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPrepare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPrimaryKeys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLProcedureColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLProcedures.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPutData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLRowCount.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetCursorName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetDescField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetDescRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetEnvAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetPos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetScrollOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetStmtAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetStmtOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSpecialColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLStatistics.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTablePrivileges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTables.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLTransact.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_AllocConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_AllocEnv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_AllocStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_Execute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_FreeDbc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_FreeDbcList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_FreeResults.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_FreeStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_FreeStmtList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_GetData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_NativeToSQLColumnHeader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_NativeToSQLType.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_NativeTypeDesc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_NativeTypeLength.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_NativeTypePrecision.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_Prepare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlFreeConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlFreeEnv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlFreeStmt.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/Drivers/MiniSQL/ChangeLog0100644000076400007640000000063707363332151016652 0ustar nicknick1999-05-03 Peter Harvey * SQLColAttribute: Returned SQL_ERROR even when all was ok. 1999-04-03 Peter Harvey * SQLSpecialColumns: Mostly implemented. Simply returns _rowid. Quick and dirty. 1999-04-02 Peter Harvey * SQLFetchScroll: Mostly implemented * SQLExecDirect: Created _Execute * SQLPrepare: Created _Prepare unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLAllocConnect.c0100755000076400007640000000104007363332151020160 0ustar nicknick/************************************************** * SQLAllocConnect * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" SQLRETURN SQLAllocConnect( SQLHENV hDrvEnv, SQLHDBC *phDrvDbc ) { return _AllocConnect( hDrvEnv, phDrvDbc ); } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLAllocEnv.c0100755000076400007640000000114207363332151017322 0ustar nicknick/********************************************************************** * SQLAllocEnv * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLAllocEnv( SQLHENV *phDrvEnv ) { return _AllocEnv( phDrvEnv ); } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLAllocHandle.c0100755000076400007640000000202007363332151017761 0ustar nicknick/********************************************************************** * SQLAllocHandle * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLAllocHandle( SQLSMALLINT nHandleType, SQLHANDLE nInputHandle, SQLHANDLE *pnOutputHandle ) { switch ( nHandleType ) { case SQL_HANDLE_ENV: return _AllocEnv( (SQLHENV *)pnOutputHandle ); case SQL_HANDLE_DBC: return _AllocConnect( (SQLHENV)nInputHandle, (SQLHDBC *)pnOutputHandle ); case SQL_HANDLE_STMT: return _AllocStmt( (SQLHDBC)nInputHandle, (SQLHSTMT *)pnOutputHandle ); case SQL_HANDLE_DESC: break; default: return SQL_ERROR; break; } return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLAllocStmt.c0100755000076400007640000000126207363332151017524 0ustar nicknick/********************************************************************** * SQLAllocStmt (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLAllocStmt( SQLHDBC hDrvDbc, SQLHSTMT *phDrvStmt ) { return _AllocStmt( hDrvDbc, phDrvStmt ); } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLBindCol.c0100755000076400007640000000477007363332151017143 0ustar nicknick/********************************************************************** * SQLBindCol * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" /* THIS IS THE CORRECT SYNTAX.... SQLRETURN SQLBindCol( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLSMALLINT nTargetType, SQLPOINTER pTargetValue, SQLINTEGER nTargetValueMax, SQLINTEGER *pnLengthOrIndicator ) AND THIS IS WHAT WORKS... */ SQLRETURN SQLBindCol( SQLHSTMT hDrvStmt, UWORD nCol, SWORD nTargetType, PTR pTargetValue, SDWORD nTargetValueMax, SDWORD *pnLengthOrIndicator ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; COLUMNHDR *pColumnHeader; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt=$%08lX nCol=%5d", hStmt, nCol ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( hStmt->hStmtExtras->nRows == 0 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } if ( nCol < 1 || nCol > hStmt->hStmtExtras->nCols ) { sprintf( hStmt->szSqlMsg, "SQL_ERROR Column %d is out of range. Range is 1 - %s", nCol, hStmt->hStmtExtras->nCols ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } if ( pTargetValue == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Invalid data pointer" ); return SQL_ERROR; } if ( pnLengthOrIndicator != NULL ) *pnLengthOrIndicator = 0; /* SET DEFAULTS */ /* validate length etc */ /* store app col pointer */ pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nCol]; pColumnHeader->nTargetType = nTargetType; pColumnHeader->nTargetValueMax = nTargetValueMax; pColumnHeader->pnLengthOrIndicator = pnLengthOrIndicator; pColumnHeader->pTargetValue = pTargetValue; logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLBindParameter.c0100755000076400007640000000335107363332151020340 0ustar nicknick/********************************************************************** * SQLBindParameter * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLBindParameter( SQLHSTMT hDrvStmt, SQLUSMALLINT nParameterNumber, SQLSMALLINT nIOType, SQLSMALLINT nBufferType, SQLSMALLINT nParamType, SQLUINTEGER nParamLength, SQLSMALLINT nScale, SQLPOINTER pData, SQLINTEGER nBufferLength, SQLINTEGER *pnLengthOrIndicator ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt=$%08lX nParameterNumber=%d nIOType=%d nBufferType=%d nParamType=%d nParamLength=%d nScale=%d pData=$%08lX nBufferLength=%d *pnLengthOrIndicator=$%08lX",hStmt,nParameterNumber,nIOType,nBufferType,nParamType,nParamLength,nScale,pData,nBufferLength, *pnLengthOrIndicator ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not currently supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLBrowseConnect.c0100755000076400007640000000250007363332151020371 0ustar nicknick/********************************************************************** * SQLBrowseConnect * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLBrowseConnect( SQLHDBC hDrvDbc, SQLCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT *pcbConnStrOut ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; if ( hDbc == NULL ) return SQL_INVALID_HANDLE; sprintf( hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not currently supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLBulkOperations.c0100644000076400007640000000313107363332151020555 0ustar nicknick/********************************************************************** * SQLBulkOperations * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLBulkOperations( SQLHSTMT hDrvStmt, SQLSMALLINT nOperation ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /* OK */ switch ( nOperation ) { case SQL_ADD: break; case SQL_UPDATE_BY_BOOKMARK: break; case SQL_DELETE_BY_BOOKMARK: break; case SQL_FETCH_BY_BOOKMARK: break; default: sprintf( hStmt->szSqlMsg, "SQL_ERROR Unknown nOperation=%d", nOperation ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not currently supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLCancel.c0100755000076400007640000000214107363332151017004 0ustar nicknick/********************************************************************** * SQLCancel * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLCancel( SQLHSTMT hDrvStmt ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLCloseCursor.c0100755000076400007640000000214707363332151020070 0ustar nicknick/********************************************************************** * SQLCloseCursor * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLCloseCursor( SQLHSTMT hDrvStmt ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLColAttribute.c0100644000076400007640000001246307363332151020225 0ustar nicknick/********************************************************************** * SQLColAttribute * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLColAttribute( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLUSMALLINT nFieldIdentifier, SQLPOINTER pszValue, SQLSMALLINT nValueLengthMax, SQLSMALLINT *pnValueLength, SQLPOINTER pnValue ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; COLUMNHDR *pColumnHeader; int nValue = 0; /* SANITY CHECKS */ if( !hStmt ) return SQL_INVALID_HANDLE; if ( !hStmt->hStmtExtras ) return SQL_INVALID_HANDLE; if ( hStmt->hStmtExtras->nRows < 1 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } if ( nCol < 1 || nCol > hStmt->hStmtExtras->nCols ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Invalid column" ); return SQL_ERROR; } /* OK */ pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nCol]; switch( nFieldIdentifier ) { case SQL_DESC_AUTO_UNIQUE_VALUE: nValue = pColumnHeader->bSQL_DESC_AUTO_UNIQUE_VALUE; break; case SQL_DESC_BASE_COLUMN_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_BASE_COLUMN_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_BASE_TABLE_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_BASE_TABLE_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_CASE_SENSITIVE: nValue = pColumnHeader->bSQL_DESC_CASE_SENSITIVE; break; case SQL_DESC_CATALOG_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_CATALOG_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_CONCISE_TYPE: nValue = pColumnHeader->nSQL_DESC_CONCISE_TYPE; break; case SQL_DESC_COUNT: nValue = hStmt->hStmtExtras->nCols; break; case SQL_DESC_DISPLAY_SIZE: nValue = pColumnHeader->nSQL_DESC_DISPLAY_SIZE; break; case SQL_DESC_FIXED_PREC_SCALE: nValue = pColumnHeader->bSQL_DESC_FIXED_PREC_SCALE; break; case SQL_DESC_LABEL: strncpy( pszValue, pColumnHeader->pszSQL_DESC_LABEL, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_LENGTH: nValue = pColumnHeader->nSQL_DESC_LENGTH; break; case SQL_DESC_LITERAL_PREFIX: strncpy( pszValue, pColumnHeader->pszSQL_DESC_LITERAL_PREFIX, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_LITERAL_SUFFIX: strncpy( pszValue, pColumnHeader->pszSQL_DESC_LITERAL_SUFFIX, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_LOCAL_TYPE_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_LOCAL_TYPE_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_NULLABLE: nValue = pColumnHeader->nSQL_DESC_NULLABLE; break; case SQL_DESC_NUM_PREC_RADIX: nValue = pColumnHeader->nSQL_DESC_NUM_PREC_RADIX; break; case SQL_DESC_OCTET_LENGTH: nValue = pColumnHeader->nSQL_DESC_OCTET_LENGTH; break; case SQL_DESC_PRECISION: nValue = pColumnHeader->nSQL_DESC_PRECISION; break; case SQL_DESC_SCALE: nValue = pColumnHeader->nSQL_DESC_SCALE; break; case SQL_DESC_SCHEMA_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_SCHEMA_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_SEARCHABLE: nValue = pColumnHeader->nSQL_DESC_SEARCHABLE; break; case SQL_DESC_TABLE_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_TABLE_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_TYPE: nValue = pColumnHeader->nSQL_DESC_TYPE; break; case SQL_DESC_TYPE_NAME: strncpy( pszValue, pColumnHeader->pszSQL_DESC_TYPE_NAME, nValueLengthMax ); if ( pnValueLength ) *pnValueLength = strlen( pszValue ); break; case SQL_DESC_UNNAMED: nValue = pColumnHeader->nSQL_DESC_UNNAMED; break; case SQL_DESC_UNSIGNED: nValue = pColumnHeader->bSQL_DESC_UNSIGNED; break; case SQL_DESC_UPDATABLE: nValue = pColumnHeader->nSQL_DESC_UPDATABLE; break; default: sprintf( hStmt->szSqlMsg, "Invalid nFieldIdentifier value of %d", nFieldIdentifier ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } if ( pnValue ) *(int*)pnValue = nValue; logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLColAttributes.c0100755000076400007640000000472407363332151020414 0ustar nicknick/********************************************************************** * SQLColAttributes (this function has been deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLColAttributes( SQLHSTMT hDrvStmt, UWORD nCol, UWORD nDescType, PTR pszDesc, SWORD nDescMax, SWORD *pcbDesc, SDWORD *pfDesc ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************** * 1. verify we have result set * 2. verify col is within range **************************/ /************************** * 3. process request **************************/ switch( nDescType ) { /* enum these case SQL_COLUMN_AUTO_INCREMENT: case SQL_COLUMN_CASE_SENSITIVE: case SQL_COLUMN_COUNT: case SQL_COLUMN_DISPLAY_SIZE: case SQL_COLUMN_LENGTH: case SQL_COLUMN_MONEY: case SQL_COLUMN_NULLABLE: case SQL_COLUMN_PRECISION: case SQL_COLUMN_SCALE: case SQL_COLUMN_SEARCHABLE: case SQL_COLUMN_TYPE: case SQL_COLUMN_UNSIGNED: case SQL_COLUMN_UPDATABLE: case SQL_COLUMN_CATALOG_NAME: case SQL_COLUMN_QUALIFIER_NAME: case SQL_COLUMN_DISTINCT_TYPE: case SQL_COLUMN_LABEL: case SQL_COLUMN_NAME: case SQL_COLUMN_SCHEMA_NAME: case SQL_COLUMN_OWNER_NAME: case SQL_COLUMN_TABLE_NAME: case SQL_COLUMN_TYPE_NAME: */ default: sprintf( hStmt->szSqlMsg, "SQL_ERROR nDescType=%d", nDescType ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLColumnPrivileges.c0100755000076400007640000000272307363332151021114 0ustar nicknick/******************************************************************** * SQLColumnPrivileges * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLColumnPrivileges( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength, SQLCHAR *szColumnName, SQLSMALLINT nColumnNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLColumns.c0100755000076400007640000001565707363332151017257 0ustar nicknick/******************************************************************** * SQLColumns * * This is something of a mess. Part of the problem here is that msqlListFields * are returned as mSQL 'column headers'... we want them to be returned as a * row for each. So we have to turn the results on their side . * * Another problem is that msqlListFields will also return indexs. So we have * to make sure that these are not included here. * * The end result is more code than what would usually be found here. * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" enum nSQLColumns { TABLE_CAT = 1, TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, DATA_TYPE, TYPE_NAME, COLUMN_SIZE, BUFFER_LENGTH, DECIMAL_DIGITS, NUM_PREC_RADIX, NULLABLE, REMARKS, COLUMN_DEF, SQL_DATA_TYPE, SQL_DATETIME_SUB, CHAR_OCTET_LENGTH, ORDINAL_POSITION, IS_NULLABLE, COL_MAX }; m_field aSQLColumns[] = { "", "", 0, 0, 0, "TABLE_CAT", "sys", CHAR_TYPE, 50, 0, "TABLE_SCHEM", "sys", CHAR_TYPE, 50, 0, "TABLE_NAME", "sys", CHAR_TYPE, 50, 0, "COLUMN_NAME", "sys", CHAR_TYPE, 50, 0, "DATA_TYPE", "sys", INT_TYPE, 3, 0, "TYPE_NAME", "sys", CHAR_TYPE, 50, 0, "COLUMN_SIZE", "sys", INT_TYPE, 3, 0, "BUFFER_LENGTH", "sys", INT_TYPE, 3, 0, "DECIMAL_DIGITS", "sys", INT_TYPE, 3, 0, "NUM_PREC_RADIX", "sys", INT_TYPE, 3, 0, "NULLABLE", "sys", INT_TYPE, 3, 0, "REMARKS", "sys", CHAR_TYPE, 50, 0, "COLUMN_DEF", "sys", CHAR_TYPE, 50, 0, "SQL_DATA_TYPE", "sys", INT_TYPE, 3, 0, "SQL_DATETIME_SUB", "sys", INT_TYPE, 3, 0, "CHAR_OCTET_LENGTH","sys", INT_TYPE, 3, 0, "ORDINAL_POSITION", "sys", CHAR_TYPE, 50, 0, "IS_NULLABLE", "sys", CHAR_TYPE, 50, 0 }; SQLRETURN SQLColumns( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength, SQLCHAR *szColumnName, SQLSMALLINT nColumnNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; m_result *pResults; /* mSQL DATA */ m_field *pField; /* mSQL field */ COLUMNHDR *pColumnHeader; int nColumn; long nCols; long nRow; long nCurRow; char szBuffer[101]; int nIndexColumns = 0; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( szTableName == NULL || szTableName[0] == '\0' ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Must supply a valid table name" ); return SQL_ERROR; } /************************** * close any existing result **************************/ if ( hStmt->hStmtExtras->aResults ) _FreeResults( hStmt->hStmtExtras ); if ( hStmt->pszQuery != NULL ) free( hStmt->pszQuery ); hStmt->pszQuery = NULL; /************************ * generate a result set listing columns (these will be our rows) ************************/ pResults = msqlListFields( ((HDRVDBC)hStmt->hDbc)->hDbcExtras->hServer, szTableName ); if ( pResults == NULL ) { sprintf( hStmt->szSqlMsg, "SQL_ERROR Query failed. %s", msqlErrMsg ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } /************************ * how many columns are indexs? ************************/ nIndexColumns = 0; while ( pField = msqlFetchField( pResults ) ) { if ( pField->type == IDX_TYPE) nIndexColumns++; } msqlFieldSeek( pResults, 0 ); /************************** * allocate memory for columns headers and result data (row 0 is column header while col 0 is reserved for bookmarks) **************************/ hStmt->hStmtExtras->nCols = COL_MAX-1; hStmt->hStmtExtras->nRows = msqlNumFields( pResults ) - nIndexColumns; hStmt->hStmtExtras->nRow = 0; hStmt->hStmtExtras->aResults = malloc( sizeof(char*) * (hStmt->hStmtExtras->nRows+1) * (hStmt->hStmtExtras->nCols+1) ); memset( hStmt->hStmtExtras->aResults, 0, sizeof(char*) * (hStmt->hStmtExtras->nRows+1) * (hStmt->hStmtExtras->nCols+1) ); if ( hStmt->hStmtExtras->aResults == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "Not enough memory. (malloc failed)" ); hStmt->hStmtExtras->nRows = 0; hStmt->hStmtExtras->nCols = 0; msqlFreeResult( pResults ); return SQL_ERROR; } /************************** * gather column header information (save col 0 for bookmarks) **************************/ for ( nColumn = 1; nColumn < COL_MAX; nColumn++ ) { (hStmt->hStmtExtras->aResults)[nColumn] = malloc( sizeof(COLUMNHDR) ); pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nColumn]; memset( pColumnHeader, 0, sizeof(COLUMNHDR) ); _NativeToSQLColumnHeader( pColumnHeader, &(aSQLColumns[nColumn]) ); } /************************ * gather data (save col 0 for bookmarks and factor out index columns) ************************/ nCols = hStmt->hStmtExtras->nCols; hStmt->hStmtExtras->nRow = 0; for ( nCurRow = 1; nCurRow <= msqlNumFields( pResults ); nCurRow++ ) { pField = msqlFetchField( pResults ); if ( pField->type != IDX_TYPE) { hStmt->hStmtExtras->nRow++; nRow = hStmt->hStmtExtras->nRow; for ( nColumn = 1; nColumn < COL_MAX; nColumn++ ) { switch ( nColumn ) { case TABLE_NAME: (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = (char*)strdup( szTableName ); break; case COLUMN_NAME: (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = (char*)strdup( pField->name ); break; case TYPE_NAME: (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = (char*)strdup( msqlTypeNames[pField->type] ); break; case COLUMN_SIZE: sprintf( szBuffer, "%d", pField->length ); (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = (char*)strdup( szBuffer ); break; case NULLABLE: (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = (char *)strdup( IS_NOT_NULL( pField->flags ) ? "0" : "1" ); break; default: (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = NULL; } /* switch nColumn */ } /* for nColumn */ } /* if */ } /* for nRow */ hStmt->hStmtExtras->nRow = 0; /************************** * free the snapshot **************************/ msqlFreeResult( pResults ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLConnect.c0100755000076400007640000001130107363332151017206 0ustar nicknick/********************************************************************** * SQLConnect * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLConnect( SQLHDBC hDrvDbc, SQLCHAR *szDataSource, SQLSMALLINT nDataSourceLength, SQLCHAR *szUID, SQLSMALLINT nUIDLength, SQLCHAR *szPWD, SQLSMALLINT nPWDLength ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; char szDATABASE[INI_MAX_PROPERTY_VALUE+1]; char szCONFIGFILE[INI_MAX_PROPERTY_VALUE+1]; char szHOST[INI_MAX_PROPERTY_VALUE+1]; /* SANITY CHECKS */ if( SQL_NULL_HDBC == hDbc ) return SQL_INVALID_HANDLE; sprintf( hDbc->szSqlMsg, "hDbc=$%08lX szDataSource=(%s)", hDbc, szDataSource ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); if( hDbc->bConnected == 1 ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Already connected" ); return SQL_ERROR; } if ( strlen( szDataSource ) > ODBC_FILENAME_MAX+INI_MAX_OBJECT_NAME ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Given Data Source is too long. I consider it suspect." ); return SQL_ERROR; } /******************** * gather and use any required DSN properties * - CONFIGFILE - for msqlLoadConfigFile() (has precedence over other properties) * - DATABASE * - HOST (localhost assumed if not supplied) ********************/ szDATABASE[0] = '\0'; szHOST[0] = '\0'; szCONFIGFILE[0] = '\0'; SQLGetPrivateProfileString( szDataSource, "DATABASE", "", szDATABASE, sizeof(szDATABASE), ".odbc.ini" ); if ( szDATABASE[0] == '\0' ) { sprintf( hDbc->szSqlMsg, "SQL_ERROR Could not find Driver entry for %s in system information", szDataSource ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); return SQL_ERROR; } SQLGetPrivateProfileString( szDataSource, "HOST", "", szHOST, sizeof(szHOST), ".odbc.ini" ); SQLGetPrivateProfileString( szDataSource, "CONFIGFILE", "", szCONFIGFILE, sizeof(szCONFIGFILE), ".odbc.ini" ); /******************** * 1. initialise structures * 2. try connection with database using your native calls * 3. store your server handle in the extras somewhere * 4. set connection state * hDbc->bConnected = TRUE; ********************/ if ( szCONFIGFILE[0] != '\0' ) { if ( msqlLoadConfigFile( szCONFIGFILE ) != 0 ) { sprintf( hDbc->szSqlMsg, "SQL_ERROR %s", msqlErrMsg ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); sprintf( hDbc->szSqlMsg, "SQL_WARNING Failed to use (%s)", szCONFIGFILE ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); return SQL_ERROR; } } if ( szHOST[0] == '\0' ) { hDbc->hDbcExtras->hServer = msqlConnect( NULL ); /* this is faster than using localhost */ strcpy( szHOST, "localhost" ); } else hDbc->hDbcExtras->hServer = msqlConnect( szHOST ); if ( hDbc->hDbcExtras->hServer < 0 ) { sprintf( hDbc->szSqlMsg, "SQL_ERROR %s", msqlErrMsg ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); sprintf( hDbc->szSqlMsg, "SQL_ERROR Failed to connect to (%s)", szHOST ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); return SQL_ERROR; } hDbc->bConnected = 1; /* SET DATABASE */ if ( szDATABASE[0] != '\0' ) { if ( msqlSelectDB( hDbc->hDbcExtras->hServer, szDATABASE ) == -1 ) { sprintf( hDbc->szSqlMsg, "SQL_WARNING %s", msqlErrMsg ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); sprintf( hDbc->szSqlMsg, "SQL_WARNING Connected to server but failed to use database (%s)", szDATABASE ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); } else { sprintf( hDbc->szSqlMsg, "SQL_INFO DATABASE=%s", szDATABASE ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); } } logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLCopyDesc.c0100755000076400007640000000134207363332151017332 0ustar nicknick/********************************************************************** * SQLCopyDesc * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLCopyDesc( SQLHDESC hSourceDescHandle, SQLHDESC hTargetDescHandle ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLDescribeCol.c0100755000076400007640000000441607363332151020004 0ustar nicknick/********************************************************************** * SQLDescribeCol * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLDescribeCol( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLCHAR *szColName, SQLSMALLINT nColNameMax, SQLSMALLINT *pnColNameLength, SQLSMALLINT *pnSQLDataType, SQLUINTEGER *pnColSize, SQLSMALLINT *pnDecDigits, SQLSMALLINT *pnNullable ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; COLUMNHDR *pColumnHeader; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( hStmt->hStmtExtras->nRows < 1 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } if ( nCol < 1 || nCol > hStmt->hStmtExtras->nCols ) { sprintf( hStmt->szSqlMsg, "SQL_ERROR Column %d is out of range. Range is 1 - %s", nCol, hStmt->hStmtExtras->nCols ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } /**************************** * Ok ***************************/ pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nCol]; if ( szColName ) strncpy( szColName, pColumnHeader->pszSQL_DESC_NAME, nColNameMax ); if ( pnColNameLength ) *pnColNameLength = strlen( szColName ); if ( pnSQLDataType ) *pnSQLDataType = pColumnHeader->nSQL_DESC_TYPE; if ( pnColSize ) *pnColSize = pColumnHeader->nSQL_DESC_LENGTH; if ( pnDecDigits ) *pnDecDigits = pColumnHeader->nSQL_DESC_SCALE; if ( pnNullable ) *pnNullable = pColumnHeader->nSQL_DESC_NULLABLE; logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLDescribeParam.c0100755000076400007640000000344107363332151020324 0ustar nicknick/********************************************************************** * SQLDescribeParam * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" /* HERES THE CORRECT WAY... SQLRETURN SQLDescribeParam( SQLHSTMT hDrvStmt, SQLUSMALLINT nParmNumber, SQLSMALLINT *pnDataType, SQLUINTEGER *pnSize, SQLSMALLINT *pnDecDigits, SQLSMALLINT *pnNullable ) HERES THE WAY THAT WORKS... */ SQLRETURN SQLDescribeParam( SQLHSTMT hDrvStmt, UWORD nParmNumber, SWORD *pnDataType, UDWORD *pnSize, SWORD *pnDecDigits, SWORD *pnNullable ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLDisconnect.c0100755000076400007640000000311207363332151017707 0ustar nicknick/********************************************************************** * SQLDisconnect * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLDisconnect( SQLHDBC hDrvDbc ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; /* SANITY CHECKS */ if( NULL == hDbc ) return SQL_INVALID_HANDLE; sprintf( hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); if( hDbc->bConnected == 0 ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_SUCCESS_WITH_INFO Connection not open" ); return SQL_SUCCESS_WITH_INFO; } if ( hDbc->hFirstStmt != SQL_NULL_HSTMT ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Active Statements exist. Can not disconnect." ); return SQL_ERROR; } /**************************** * 1. do driver specific close here ****************************/ msqlClose( hDbc->hDbcExtras->hServer ); hDbc->hDbcExtras->hServer = -1; hDbc->bConnected = 0; logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLDriverConnect.c0100755000076400007640000000461507363332151020374 0ustar nicknick/********************************************************************** * SQLDriverConnect * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLDriverConnect( SQLHDBC hDrvDbc, SQLHWND hWnd, SQLCHAR *szConnStrIn, SQLSMALLINT nConnStrIn, SQLCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT *pnConnStrOut, SQLUSMALLINT nDriverCompletion ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; /* SANITY CHECKS */ if( NULL == hDbc ) return SQL_INVALID_HANDLE; sprintf( hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); if( hDbc->bConnected == 1 ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Already connected" ); return SQL_ERROR; } /************************* * 1. parse nConnStrIn for connection options. Format is; * Property=Value;... * 2. we may not have all options so handle as per DM request * 3. fill as required szConnStrOut *************************/ switch( nDriverCompletion ) { case SQL_DRIVER_PROMPT: case SQL_DRIVER_COMPLETE: case SQL_DRIVER_COMPLETE_REQUIRED: case SQL_DRIVER_NOPROMPT: default: sprintf( hDbc->szSqlMsg, "Invalid nDriverCompletion=%d", nDriverCompletion ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); break; } /************************* * 4. try to connect * 5. set gathered options (ie USE Database or whatever) * 6. set connection state * hDbc->bConnected = TRUE; * hDbc->ciActive = 0; *************************/ logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported." ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLEndTran.c0100755000076400007640000000137207363332151017157 0ustar nicknick/********************************************************************** * SQLEndTran * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLEndTran( SQLSMALLINT nHandleType, SQLHANDLE nHandle, SQLSMALLINT nCompletionType ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLError.c0100755000076400007640000000422107363332151016711 0ustar nicknick/********************************************************************** * SQLError (deprecated see SQLGetDiagRec) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLError( SQLHENV hDrvEnv, SQLHDBC hDrvDbc, SQLHSTMT hDrvStmt, SQLCHAR *szSqlState, SQLINTEGER *pfNativeError, SQLCHAR *szErrorMsg, SQLSMALLINT nErrorMsgMax, SQLSMALLINT *pcbErrorMsg ) { HDRVENV hEnv = (HDRVENV)hDrvEnv; HDRVDBC hDbc = (HDRVDBC)hDrvDbc; HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; char *pszState = NULL; /* pointer to status code */ char *pszErrMsg = NULL; /* pointer to error message */ char szMsgHdr[1024]; int nCode; /* SANITY CHECKS */ if( hEnv == SQL_NULL_HENV && hDbc == SQL_NULL_HDBC && hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; /* DEFAULTS */ szSqlState[0] = '\0'; *pfNativeError = 0; szErrorMsg[0] = '\0'; *pcbErrorMsg = 0; /* STATEMENT */ if( hStmt != SQL_NULL_HENV ) { if ( logPopMsg( hStmt->hLog, szMsgHdr, &nCode, hStmt->szSqlMsg ) != LOG_SUCCESS ) return SQL_NO_DATA; strncpy( szErrorMsg, hStmt->szSqlMsg, nErrorMsgMax ); *pcbErrorMsg = strlen( szErrorMsg ); return SQL_SUCCESS; } /* CONNECTION */ if( hDbc != SQL_NULL_HDBC ) { if ( logPopMsg( hDbc->hLog, szMsgHdr, &nCode, hDbc->szSqlMsg ) != LOG_SUCCESS ) return SQL_NO_DATA; strncpy( szErrorMsg, hDbc->szSqlMsg, nErrorMsgMax ); *pcbErrorMsg = strlen( szErrorMsg ); return SQL_SUCCESS; } /* ENVIRONMENT */ if( hEnv != SQL_NULL_HSTMT ) { if ( logPopMsg( hEnv->hLog, szMsgHdr, &nCode, hEnv->szSqlMsg ) != LOG_SUCCESS ) return SQL_NO_DATA; strncpy( szErrorMsg, hEnv->szSqlMsg, nErrorMsgMax ); *pcbErrorMsg = strlen( szErrorMsg ); return SQL_SUCCESS; } return SQL_NO_DATA; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLExecDirect.c0100755000076400007640000000274507363332151017650 0ustar nicknick/********************************************************************** * SQLExecDirect * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLExecDirect( SQLHSTMT hDrvStmt, SQLCHAR *szSqlStr, SQLINTEGER nSqlStr ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; RETCODE rc; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /* prepare command */ rc = _Prepare( hDrvStmt, szSqlStr, nSqlStr ); if ( SQL_SUCCESS != rc ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "Could not prepare statement" ); return rc; } /* execute command */ rc = _Execute( hDrvStmt ); if ( SQL_SUCCESS != rc ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "Problem calling SQLEXecute" ); return rc; } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLExecute.c0100755000076400007640000000114107363332151017220 0ustar nicknick/********************************************************************** * SQLExecute * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLExecute( SQLHSTMT hDrvStmt ) { return _Execute( hDrvStmt ); } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLExtendedFetch.c0100755000076400007640000000257407363332151020343 0ustar nicknick/********************************************************************** * SQLExtendedFetch * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLExtendedFetch( SQLHSTMT hDrvStmt, SQLUSMALLINT nOrientation, SQLINTEGER nOffset, SQLUINTEGER *pnRowCount, SQLUSMALLINT *pRowStatusArray ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLFetch.c0100755000076400007640000000422207363332151016652 0ustar nicknick/********************************************************************** * SQLFetch * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLFetch( SQLHSTMT hDrvStmt) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; int nColumn = -1; COLUMNHDR *pColumnHeader; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( hStmt->hStmtExtras->nRows < 1 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } /************************ * goto next row ************************/ if ( hStmt->hStmtExtras->nRow < 0 ) return SQL_NO_DATA; if ( hStmt->hStmtExtras->nRow >= hStmt->hStmtExtras->nRows ) return SQL_NO_DATA; hStmt->hStmtExtras->nRow++; /************************ * transfer bound column values to bound storage as required ************************/ for ( nColumn=1; nColumn <= hStmt->hStmtExtras->nCols; nColumn++ ) { pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nColumn]; if ( pColumnHeader->pTargetValue != NULL ) { if ( _GetData( hDrvStmt, nColumn, pColumnHeader->nTargetType, pColumnHeader->pTargetValue, pColumnHeader->nTargetValueMax, pColumnHeader->pnLengthOrIndicator ) != SQL_SUCCESS ) { sprintf( hStmt->szSqlMsg, "SQL_ERROR Failed to get data for column %d", nColumn ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } } } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLFetchScroll.c0100644000076400007640000000545007363332151020032 0ustar nicknick/***************************************************************************** * SQLFetchScroll * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * *****************************************************************************/ #include "driver.h" SQLRETURN SQLFetchScroll( SQLHSTMT hDrvStmt, SQLSMALLINT nOrientation, SQLINTEGER nOffset ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; int nColumn = -1; COLUMNHDR *pColumnHeader; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /* how much do we want to move */ switch ( nOrientation ) { case SQL_FETCH_NEXT: if ( hStmt->hStmtExtras->nRow >= hStmt->hStmtExtras->nRows ) return SQL_NO_DATA; hStmt->hStmtExtras->nRow++; break; case SQL_FETCH_PRIOR: if ( hStmt->hStmtExtras->nRow == 0 ) return SQL_NO_DATA; hStmt->hStmtExtras->nRow--; break; case SQL_FETCH_FIRST: hStmt->hStmtExtras->nRow = 0; break; case SQL_FETCH_LAST: hStmt->hStmtExtras->nRow = hStmt->hStmtExtras->nRows-1; break; case SQL_FETCH_ABSOLUTE: if ( nOffset < 0 || nOffset >= hStmt->hStmtExtras->nRows ) return SQL_NO_DATA; hStmt->hStmtExtras->nRow = nOffset; break; case SQL_FETCH_RELATIVE: if ( hStmt->hStmtExtras->nRow+nOffset < 0 || hStmt->hStmtExtras->nRow+nOffset >= hStmt->hStmtExtras->nRows ) return SQL_NO_DATA; hStmt->hStmtExtras->nRow += nOffset; break; case SQL_FETCH_BOOKMARK: return SQL_ERROR; break; default: return SQL_ERROR; } /************************ * transfer bound column values to bound storage as required ************************/ for ( nColumn=1; nColumn <= hStmt->hStmtExtras->nCols; nColumn++ ) { pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nColumn]; if ( pColumnHeader->pTargetValue != NULL ) { if ( _GetData( hDrvStmt, nColumn, pColumnHeader->nTargetType, pColumnHeader->pTargetValue, pColumnHeader->nTargetValueMax, pColumnHeader->pnLengthOrIndicator ) != SQL_SUCCESS ) { sprintf( hStmt->szSqlMsg, "SQL_ERROR Failed to get data for column %d", nColumn ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } } } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLForeignKeys.c0100755000076400007640000000361707363332151020055 0ustar nicknick/******************************************************************** * SQLForeignKeys * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLForeignKeys( SQLHSTMT hDrvStmt, SQLCHAR *szPKCatalogName, SQLSMALLINT nPKCatalogNameLength, SQLCHAR *szPKSchemaName, SQLSMALLINT nPKSchemaNameLength, SQLCHAR *szPKTableName, SQLSMALLINT nPKTableNameLength, SQLCHAR *szFKCatalogName, SQLSMALLINT nFKCatalogNameLength, SQLCHAR *szFKSchemaName, SQLSMALLINT nFKSchemaNameLength, SQLCHAR *szFKTableName, SQLSMALLINT nFKTableNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLFreeConnect.c0100755000076400007640000000135207363332151020015 0ustar nicknick/********************************************************************** * SQLFreeConnect * * Do not try to Free Dbc if there are Stmts... return an error. Let the * Driver Manager do a recursive clean up if its wants. * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLFreeConnect( SQLHDBC hDrvDbc ) { return sqlFreeConnect( hDrvDbc ); } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLFreeEnv.c0100755000076400007640000000133407363332151017154 0ustar nicknick/********************************************************************** * SQLFreeEnv * * Do not try to Free Env if there are Dbcs... return an error. Let the * Driver Manager do a recursive clean up if it wants. * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLFreeEnv( SQLHENV hDrvEnv ) { return sqlFreeEnv( hDrvEnv ); } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLFreeHandle.c0100755000076400007640000000200607363332151017614 0ustar nicknick/********************************************************************** * SQLFreeHandle * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLFreeHandle( SQLSMALLINT nHandleType, SQLHANDLE nHandle ) { switch( nHandleType ) { case SQL_HANDLE_ENV: return sqlFreeEnv( (SQLHENV)nHandle ); case SQL_HANDLE_DBC: return sqlFreeConnect( (SQLHDBC)nHandle ); case SQL_HANDLE_STMT: return sqlFreeStmt( (SQLHSTMT)nHandle, 0 ); case SQL_HANDLE_DESC: break; default: return SQL_ERROR; } return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLFreeStmt.c0100755000076400007640000000122207363332151017347 0ustar nicknick/********************************************************************** * SQLFreeStmt * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLFreeStmt( SQLHSTMT hDrvStmt, SQLUSMALLINT nOption ) { return sqlFreeStmt( hDrvStmt, nOption ); } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetConnectAttr.c0100755000076400007640000000262507363332151020512 0ustar nicknick/********************************************************************** * SQLGetConnectAttr * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetConnectAttr( SQLHDBC hDrvDbc, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; /* SANITY CHECKS */ if( NULL == hDbc ) return SQL_INVALID_HANDLE; sprintf( hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetConnectOption.c0100755000076400007640000000224607363332151021047 0ustar nicknick/********************************************************************** * SQLGetConnectOption (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetConnectOption( SQLHDBC hDrvDbc, UWORD fOption, PTR pvParam ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; /* SANITY CHECKS */ if( NULL == hDbc ) return SQL_INVALID_HANDLE; sprintf( hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetCursorName.c0100755000076400007640000000334007363332151020337 0ustar nicknick/********************************************************************** * SQLGetCursorName * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetCursorName( SQLHSTMT hDrvStmt, SQLCHAR *szCursor, SQLSMALLINT nCursorMaxLength, SQLSMALLINT *pnCursorLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; int ci; /* counter variable */ /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( NULL == szCursor ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No cursor name." ); return SQL_ERROR; } /* ** copy cursor name */ strncpy( szCursor, hStmt->szCursorName, nCursorMaxLength ); /* ** set length of transfered data */ ci = strlen( hStmt->szCursorName ); /* if ( NULL != pnCursorLength ) *pnCursorLength = MIN( ci, nCursorMaxLength ); */ if ( nCursorMaxLength < ci ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_SUCCESS_WITH_INFO Cursor was truncated" ); return SQL_SUCCESS_WITH_INFO; } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetData.c0100755000076400007640000000200207363332151017124 0ustar nicknick/********************************************************************** * SQLGetData * * 1. MiniSQL server sends all data as ascii strings so things are * simplified. We always convert from string to nTargetType. * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetData( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLSMALLINT nTargetType, /* C DATA TYPE */ SQLPOINTER pTarget, SQLINTEGER nTargetLength, SQLINTEGER *pnLengthOrIndicator ) { return _GetData( hDrvStmt, nCol, nTargetType, pTarget, nTargetLength, pnLengthOrIndicator ); } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetDescField.c0100755000076400007640000000170407363332151020105 0ustar nicknick/********************************************************************** * SQLGetDescField * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetDescField( SQLHDESC DescriptorHandle, SQLSMALLINT RecordNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetDescRec.c0100755000076400007640000000232607363332151017574 0ustar nicknick/********************************************************************** * SQLGetDescRec * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetDescRec( SQLHDESC DescriptorHandle, SQLSMALLINT RecordNumber, SQLCHAR *Name, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLSMALLINT *Type, SQLSMALLINT *SubType, SQLINTEGER *Length, SQLSMALLINT *Precision, SQLSMALLINT *Scale, SQLSMALLINT *Nullable ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetDiagField.c0100755000076400007640000000177007363332151020076 0ustar nicknick/********************************************************************** * SQLGetDiagField * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetDiagField( SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecordNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetDiagRec.c0100755000076400007640000000205707363332151017563 0ustar nicknick/********************************************************************** * SQLGetDiagRec * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetDiagRec( SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecordNumber, SQLCHAR *Sqlstate, SQLINTEGER *NativeError, SQLCHAR *MessageText, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetEnvAttr.c0100755000076400007640000000157407363332151017653 0ustar nicknick/********************************************************************** * SQLGetEnvAttr * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetEnvAttr( SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetInfo.c0100755000076400007640000000314007363332151017152 0ustar nicknick/********************************************************************** * SQLGetInfo * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetInfo( SQLHDBC hDbc, SQLUSMALLINT nInfoType, SQLPOINTER pInfoValue, SQLSMALLINT nInfoValueMax, SQLSMALLINT *pnLength) { SQLRETURN rc=SQL_ERROR; switch (nInfoType) { case SQL_DBMS_NAME: if (nInfoValueMax < 5) break; strcpy( pInfoValue, "mSQL"); *pnLength = 4; rc = SQL_SUCCESS; break; case SQL_DBMS_VER: { SQLPOINTER ver=(SQLPOINTER)msqlGetServerInfo(); SQLSMALLINT len=strlen(ver); if (nInfoValueMax < len+1) break; strcpy( pInfoValue, ver); *pnLength = len; rc = SQL_SUCCESS; break; } case SQL_TXN_CAPABLE: { SQLSMALLINT supp=0; if (nInfoValueMax < sizeof(SQLSMALLINT)) break; pInfoValue = (SQLPOINTER)&supp; *pnLength = sizeof(SQLSMALLINT); rc = SQL_SUCCESS; break; } } return rc; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetStmtAttr.c0100755000076400007640000000256307363332151020051 0ustar nicknick/********************************************************************** * SQLGetStmtAttr * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetStmtAttr( SQLHSTMT hDrvStmt, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetStmtOption.c0100755000076400007640000000233007363332151020377 0ustar nicknick/********************************************************************** * SQLGetStmtOption (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetStmtOption( SQLHSTMT hDrvStmt, UWORD fOption, PTR pvParam) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLGetTypeInfo.c0100755000076400007640000000223507363332151020020 0ustar nicknick/********************************************************************** * SQLGetTypeInfo * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLGetTypeInfo( SQLHSTMT hDrvStmt, SQLSMALLINT nSqlType ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLMoreResults.c0100755000076400007640000000213607363332151020107 0ustar nicknick/********************************************************************** * SQLMoreResults * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLMoreResults( SQLHSTMT hDrvStmt ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLNativeSql.c0100755000076400007640000000256507363332151017537 0ustar nicknick/********************************************************************** * SQLNativeSql * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLNativeSql( SQLHSTMT hDrvStmt, SQLCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLNumParams.c0100755000076400007640000000223107363332151017522 0ustar nicknick/********************************************************************** * SQLNumParams * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLNumParams( SQLHSTMT hDrvStmt, SQLSMALLINT *pnParamCount ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLNumResultCols.c0100755000076400007640000000252707363332151020406 0ustar nicknick/********************************************************************** * SQLNumResultCols * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLNumResultCols( SQLHSTMT hDrvStmt, SQLSMALLINT *pnColumnCount ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( hStmt->hStmtExtras->nRows < 0 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } /******************** * get number of columns in result set ********************/ *pnColumnCount = hStmt->hStmtExtras->nCols; logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLParamData.c0100755000076400007640000000222207363332151017451 0ustar nicknick/********************************************************************** * SQLParamData * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLParamData( SQLHSTMT hDrvStmt, SQLPOINTER *pValue ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLParamOptions.c0100755000076400007640000000223710564052116020236 0ustar nicknick/********************************************************************** * SQLParamOptions (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLParamOptions( SQLHSTMT hDrvStmt, SQLULEN nRow, SQLULEN *pnRow ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLPrepare.c0100755000076400007640000000126707363332151017225 0ustar nicknick/********************************************************************** * SQLPrepare * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLPrepare( SQLHSTMT hDrvStmt, SQLCHAR *szSqlStr, SQLINTEGER nSqlStrLength ) { return _Prepare( hDrvStmt, szSqlStr, nSqlStrLength ); } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLPrimaryKeys.c0100755000076400007640000000255107363332151020103 0ustar nicknick/******************************************************************** * SQLPrimaryKeys * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLPrimaryKeys( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLProcedureColumns.c0100755000076400007640000000274407363332151021121 0ustar nicknick/******************************************************************** * SQLProcedureColumns * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLProcedureColumns( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szProcName, SQLSMALLINT nProcNameLength, SQLCHAR *szColumnName, SQLSMALLINT nColumnNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLProcedures.c0100755000076400007640000000255207363332151017740 0ustar nicknick/******************************************************************** * SQLProcedures * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLProcedures( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szProcName, SQLSMALLINT nProcNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLPutData.c0100755000076400007640000000241607363332151017166 0ustar nicknick/********************************************************************** * SQLPutData * * Supplies parameter data at execution time. Used in conjuction with * SQLParamData. ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLPutData( SQLHSTMT hDrvStmt, SQLPOINTER pData, SQLINTEGER nLengthOrIndicator ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLRowCount.c0100755000076400007640000000233307363332151017402 0ustar nicknick/********************************************************************** * SQLRowCount * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLRowCount( SQLHSTMT hDrvStmt, SQLINTEGER *pnRowCount) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( NULL == pnRowCount ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR pnRowCount can not be NULL" ); return SQL_ERROR; } *pnRowCount = hStmt->hStmtExtras->nRows; logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLSetConnectOption.c0100755000076400007640000000244707363332151021066 0ustar nicknick/********************************************************************** * SQLSetConnectOption (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetConnectOption( SQLHDBC hDrvDbc, UWORD nOption, UDWORD vParam) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; /* SANITY CHECKS */ if ( hDbc == SQL_NULL_HDBC ) return SQL_INVALID_HANDLE; switch ( nOption ) { case SQL_TRANSLATE_DLL: case SQL_TRANSLATE_OPTION: /* case SQL_CONNECT_OPT_DRVR_START: */ case SQL_ODBC_CURSORS: case SQL_OPT_TRACE: switch ( vParam ) { case SQL_OPT_TRACE_ON: case SQL_OPT_TRACE_OFF: default: ; } break; case SQL_OPT_TRACEFILE: case SQL_ACCESS_MODE: case SQL_AUTOCOMMIT: default: ; } logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_SUCCESS_WITH_INFO Function not fully implemented" ); return SQL_SUCCESS_WITH_INFO; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLSetCursorName.c0100755000076400007640000000304607363332151020356 0ustar nicknick/********************************************************************** * SQLSetCursorName * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetCursorName( SQLHSTMT hDrvStmt, SQLCHAR *szCursor, SQLSMALLINT nCursorLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( NULL == szCursor || 0 == isalpha(*szCursor) ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Invalid cursor name" ); return SQL_ERROR; } /* COPY CURSOR */ if ( SQL_NTS == nCursorLength ) { strncpy( hStmt->szCursorName, szCursor, SQL_MAX_CURSOR_NAME ); } else { /* strncpy( hStmt->szCursorName, szCursor, MIN(SQL_MAX_CURSOR_NAME - 1, nCursorLength) ); hStmt->szCursorName[ MIN( SQL_MAX_CURSOR_NAME - 1, nCursorLength) ] = '\0'; */ } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLSetDescField.c0100755000076400007640000000160507363332151020121 0ustar nicknick/********************************************************************** * SQLSetDescField * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetDescField( SQLHDESC DescriptorHandle, SQLSMALLINT RecordNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLSetDescRec.c0100755000076400007640000000223507363332151017607 0ustar nicknick/********************************************************************** * SQLSetDescRec * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetDescRec( SQLHDESC hDescriptorHandle, SQLSMALLINT nRecordNumber, SQLSMALLINT nType, SQLSMALLINT nSubType, SQLINTEGER nLength, SQLSMALLINT nPrecision, SQLSMALLINT nScale, SQLPOINTER pData, SQLINTEGER *pnStringLength, SQLINTEGER *pnIndicator ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLSetEnvAttr.c0100755000076400007640000000147507363332151017667 0ustar nicknick/********************************************************************** * SQLSetEnvAttr * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetEnvAttr( SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength ) { return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLSetParam.c0100755000076400007640000000315007363332151017334 0ustar nicknick/******************************************************************** * SQLSetParam (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLSetParam( SQLHSTMT hDrvStmt, UWORD nPar, SWORD nType, SWORD nSqlType, UDWORD nColDef, SWORD nScale, PTR pValue, SDWORD *pnValue ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( NULL == hStmt->pszQuery ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No prepared statement to work with" ); return SQL_ERROR; } /****************** * 1. Your param storage is in hStmt->hStmtExtras * so you will have to code for it. Do it here. ******************/ /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLSetPos.c0100755000076400007640000000356707363332151017051 0ustar nicknick/******************************************************************** * SQLSetPos * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLSetPos( SQLHSTMT hDrvStmt, SQLUSMALLINT nRow, SQLUSMALLINT nOperation, SQLUSMALLINT nLockType ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /* OK */ switch ( nOperation ) { case SQL_POSITION: break; case SQL_REFRESH: break; case SQL_UPDATE: break; case SQL_DELETE: break; default: sprintf( hStmt->szSqlMsg, "SQL_ERROR Invalid nOperation=%d", nOperation ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } switch ( nLockType ) { case SQL_LOCK_NO_CHANGE: break; case SQL_LOCK_EXCLUSIVE: break; case SQL_LOCK_UNLOCK: break; default: sprintf( hStmt->szSqlMsg, "SQL_ERROR Invalid nLockType=%d", nLockType ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLSetScrollOptions.c0100755000076400007640000000234707363332151021115 0ustar nicknick/******************************************************************** * SQLSetScrollOptions (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLSetScrollOptions( SQLHSTMT hDrvStmt, UWORD fConcurrency, SDWORD crowKeyset, UWORD crowRowset ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLSetStmtAttr.c0100755000076400007640000000251107363332151020056 0ustar nicknick/********************************************************************** * SQLSetStmtAttr * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetStmtAttr( SQLHSTMT hDrvStmt, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLSetStmtOption.c0100755000076400007640000000226307363332151020420 0ustar nicknick/********************************************************************** * SQLSetStmtOption (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN SQLSetStmtOption( SQLHSTMT hDrvStmt, UWORD fOption, UDWORD vParam) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLSpecialColumns.c0100755000076400007640000001207207363332151020544 0ustar nicknick/******************************************************************** * SQLSpecialColumns * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" enum nSQLSpecialColumns { COLUMN_NAME = 1, COL_MAX }; m_field aSQLSpecialColumns[] = { "", "", 0, 0, 0, "COLUMN_NAME", "sys", CHAR_TYPE, 50, 0 }; /* THIS IS CORRECT... SQLRETURN SQLSpecialColumns( SQLHSTMT hDrvStmt, SQLSMALLINT nColumnType, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength, SQLSMALLINT nScope, SQLSMALLINT nNullable ) THIS WORKS... */ SQLRETURN SQLSpecialColumns( SQLHSTMT hDrvStmt, UWORD nColumnType, UCHAR *szCatalogName, SWORD nCatalogNameLength, UCHAR *szSchemaName, SWORD nSchemaNameLength, UCHAR *szTableName, SWORD nTableNameLength, UWORD nScope, UWORD nNullable ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; COLUMNHDR *pColumnHeader; int nColumn; long nCols; long nRow; long nCurRow; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; if ( !szTableName ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /* validate nColumnType */ switch ( nColumnType ) { case SQL_BEST_ROWID: break; case SQL_ROWVER: default: logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } /* validate nScope */ switch ( nScope ) { case SQL_SCOPE_CURROW: case SQL_SCOPE_TRANSACTION: case SQL_SCOPE_SESSION: break; default: logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } /* validate nNullable */ switch ( nNullable ) { case SQL_NO_NULLS: case SQL_NULLABLE: break; default: logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } /* only one scenario supported: nColumnType=SQL_BEST_ROWID and nScope=ignored nNullable=ignored */ /************************** * close any existing result **************************/ if ( hStmt->hStmtExtras->aResults ) _FreeResults( hStmt->hStmtExtras ); if ( hStmt->pszQuery != NULL ) free( hStmt->pszQuery ); hStmt->pszQuery = NULL; /************************** * allocate memory for columns headers and result data (row 0 is column header while col 0 is reserved for bookmarks) **************************/ hStmt->hStmtExtras->nCols = COL_MAX-1; hStmt->hStmtExtras->nRows = 1; hStmt->hStmtExtras->nRow = 0; hStmt->hStmtExtras->aResults = malloc( sizeof(char*) * (hStmt->hStmtExtras->nRows+1) * (hStmt->hStmtExtras->nCols+1) ); memset( hStmt->hStmtExtras->aResults, 0, sizeof(char*) * (hStmt->hStmtExtras->nRows+1) * (hStmt->hStmtExtras->nCols+1) ); if ( hStmt->hStmtExtras->aResults == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "Not enough memory. (malloc failed)" ); hStmt->hStmtExtras->nRows = 0; hStmt->hStmtExtras->nCols = 0; return SQL_ERROR; } /************************** * gather column header information (save col 0 for bookmarks) **************************/ for ( nColumn = 1; nColumn < COL_MAX; nColumn++ ) { (hStmt->hStmtExtras->aResults)[nColumn] = malloc( sizeof(COLUMNHDR) ); pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nColumn]; memset( pColumnHeader, 0, sizeof(COLUMNHDR) ); _NativeToSQLColumnHeader( pColumnHeader, &(aSQLSpecialColumns[nColumn]) ); } /************************ * gather data (save col 0 for bookmarks and factor out index columns) ************************/ nCols = hStmt->hStmtExtras->nCols; hStmt->hStmtExtras->nRow = 0; nCurRow = 1; hStmt->hStmtExtras->nRow++; nRow = hStmt->hStmtExtras->nRow; for ( nColumn = 1; nColumn < COL_MAX; nColumn++ ) { switch ( nColumn ) { case COLUMN_NAME: (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = (char*)strdup( "_rowid" ); break; default: (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = NULL; } /* switch nColumn */ } /* for nColumn */ hStmt->hStmtExtras->nRow = 0; logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLStatistics.c0100755000076400007640000001427607363332151017765 0ustar nicknick/******************************************************************** * SQLStatistics * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" enum nSQLStatistics { TABLE_CAT = 1, TABLE_SCHEM, TABLE_NAME, NON_UNIQUE, INDEX_QUALIFIER, INDEX_NAME, TYPE, ORDINAL_POSITION, COLUMN_NAME, ASC_OR_DESC, CARDINALITY, PAGES, FILTER_CONDITION, COL_MAX }; m_field aSQLStatistics[] = { "", "", 0, 0, 0, "TABLE_CAT", "sys", CHAR_TYPE, 50, 0, "TABLE_SCHEM", "sys", CHAR_TYPE, 50, 0, "TABLE_NAME", "sys", CHAR_TYPE, 50, 0, "NON_UNIQUE", "sys", INT_TYPE, 3, 0, "INDEX_QUALIFIER", "sys", CHAR_TYPE, 50, 0, "INDEX_NAME", "sys", CHAR_TYPE, 50, 0, "TYPE", "sys", INT_TYPE, 3, 0, "ORDINAL_POSITION", "sys", CHAR_TYPE, 50, 0, "COLUMN_NAME", "sys", CHAR_TYPE, 50, 0, "ASC_OR_DESC", "sys", INT_TYPE, 3, 0, "CARDINALITY", "sys", INT_TYPE, 3, 0, "PAGES", "sys", INT_TYPE, 3, 0, "FILTER_CONDITION", "sys", CHAR_TYPE, 50, 0 }; SQLRETURN SQLStatistics( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, /* MUST BE SUPPLIED */ SQLSMALLINT nTableNameLength, SQLUSMALLINT nTypeOfIndex, SQLUSMALLINT nReserved ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; m_result *pResults; /* mSQL DATA */ m_field *pField; /* mSQL field */ COLUMNHDR *pColumnHeader; int nColumn; long nCols; long nCurRow; long nRow; char szBuffer[101]; int nIndexColumns = 0; int nNormalColumns = 0; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( szTableName == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No table name" ); return SQL_ERROR; } if ( szTableName[0] == '\0' ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No table name" ); return SQL_ERROR; } /************************** * close any existing result **************************/ if ( hStmt->hStmtExtras->aResults ) _FreeResults( hStmt->hStmtExtras ); if ( hStmt->pszQuery != NULL ) free( hStmt->pszQuery ); hStmt->pszQuery = NULL; /************************ * generate a result set listing columns (these will be our rows) ************************/ pResults = msqlListFields( ((HDRVDBC)hStmt->hDbc)->hDbcExtras->hServer, szTableName ); if ( pResults == NULL ) { sprintf( hStmt->szSqlMsg, "SQL_ERROR Query failed. %s", msqlErrMsg ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } /************************ * how many columns are indexs? ************************/ nIndexColumns = 0; while ( pField = msqlFetchField( pResults ) ) { if ( pField->type == IDX_TYPE) nIndexColumns++; } msqlFieldSeek( pResults, 0 ); nNormalColumns = msqlNumFields( pResults ) - nIndexColumns; /************************** * allocate memory for columns headers and result data (row 0 is column header while col 0 is reserved for bookmarks) **************************/ hStmt->hStmtExtras->nCols = COL_MAX-1; hStmt->hStmtExtras->nRows = nIndexColumns; hStmt->hStmtExtras->nRow = 0; hStmt->hStmtExtras->aResults = malloc( sizeof(char*) * (hStmt->hStmtExtras->nRows+1) * (hStmt->hStmtExtras->nCols+1) ); memset( hStmt->hStmtExtras->aResults, 0, sizeof(char*) * (hStmt->hStmtExtras->nRows+1) * (hStmt->hStmtExtras->nCols+1) ); if ( hStmt->hStmtExtras->aResults == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "Not enough memory. (malloc failed)" ); hStmt->hStmtExtras->nRows = 0; hStmt->hStmtExtras->nCols = 0; msqlFreeResult( pResults ); return SQL_ERROR; } /************************** * gather column header information (save col 0 for bookmarks) **************************/ for ( nColumn = 1; nColumn < COL_MAX; nColumn++ ) { (hStmt->hStmtExtras->aResults)[nColumn] = malloc( sizeof(COLUMNHDR) ); pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nColumn]; memset( pColumnHeader, 0, sizeof(COLUMNHDR) ); _NativeToSQLColumnHeader( pColumnHeader, &(aSQLStatistics[nColumn]) ); } /************************ * gather data (save col 0 for bookmarks and factor out normal columns) ************************/ nCols = hStmt->hStmtExtras->nCols; hStmt->hStmtExtras->nRow = 0; for ( nCurRow = 1; nCurRow <= msqlNumFields( pResults ); nCurRow++ ) { pField = msqlFetchField( pResults ); if ( pField->type == IDX_TYPE) { hStmt->hStmtExtras->nRow++; nRow = hStmt->hStmtExtras->nRow; for ( nColumn = 1; nColumn < COL_MAX; nColumn++ ) { switch ( nColumn ) { case TABLE_NAME: (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = (char*)strdup( szTableName ); break; case INDEX_NAME: (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = (char*)strdup( pField->name ); break; case NON_UNIQUE: (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = (char *)strdup( IS_NOT_NULL( pField->flags ) ? "0" : "1" ); break; default: (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = NULL; } /* switch nColumn */ } /* for nColumn */ } /* if */ } /* for nRow */ hStmt->hStmtExtras->nRow = 0; /************************** * free the snapshot **************************/ msqlFreeResult( pResults ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLTablePrivileges.c0100755000076400007640000000256507363332151020712 0ustar nicknick/******************************************************************** * SQLTablePrivileges * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLTablePrivileges( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************ * REPLACE THIS COMMENT WITH SOMETHING USEFULL ************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLTables.c0100755000076400007640000001074707363332151017044 0ustar nicknick/********************************************************************** * SQLTables * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" enum nSQLTables { TABLE_CAT = 1, TABLE_SCHEM, TABLE_NAME, TABLE_TYPE, REMARKS, COL_MAX }; m_field aSQLTables[] = { "", "", 0, 0, 0, /* keep things 1 based */ "TABLE_CAT", "sys", CHAR_TYPE, 50, 0, "TABLE_SCHEM", "sys", CHAR_TYPE, 50, 0, "TABLE_NAME", "sys", CHAR_TYPE, 50, 0, "TABLE_TYPE", "sys", CHAR_TYPE, 50, 0, "REMARKS", "sys", CHAR_TYPE, 50, 0 }; SQLRETURN SQLTables( SQLHSTMT hDrvStmt, SQLCHAR *szCatalogName, SQLSMALLINT nCatalogNameLength, SQLCHAR *szSchemaName, SQLSMALLINT nSchemaNameLength, SQLCHAR *szTableName, SQLSMALLINT nTableNameLength, SQLCHAR *szTableType, SQLSMALLINT nTableTypeLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; m_result *pResults; /* mSQL DATA */ m_field *pField; /* mSQL field */ COLUMNHDR *pColumnHeader; m_row rowResult; /* mSQL ROW */ int nColumn; long nResultMemory; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /************************** * close any existing result **************************/ if ( hStmt->hStmtExtras->aResults ) _FreeResults( hStmt->hStmtExtras ); if ( hStmt->pszQuery != NULL ) free( hStmt->pszQuery ); hStmt->pszQuery = NULL; /************************ * generate a result set listing tables ************************/ pResults = msqlListTables( ((HDRVDBC)hStmt->hDbc)->hDbcExtras->hServer ); if ( pResults == NULL ) { sprintf( hStmt->szSqlMsg, "SQL_ERROR Query failed. %s", msqlErrMsg ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } /************************** * allocate memory for columns headers and result data (row 0 is column header while col 0 is reserved for bookmarks) **************************/ hStmt->hStmtExtras->nCols = COL_MAX-1; hStmt->hStmtExtras->nRows = msqlNumRows( pResults ); hStmt->hStmtExtras->nRow = 0; nResultMemory = sizeof(char*) * (hStmt->hStmtExtras->nRows+1) * (hStmt->hStmtExtras->nCols+1); hStmt->hStmtExtras->aResults = malloc( nResultMemory ); if ( hStmt->hStmtExtras->aResults == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "Not enough memory. (malloc failed)" ); hStmt->hStmtExtras->nRows = 0; hStmt->hStmtExtras->nCols = 0; msqlFreeResult( pResults ); return SQL_ERROR; } /************************** * gather column header information (save col 0 for bookmarks) **************************/ for ( nColumn = 1; nColumn < COL_MAX; nColumn++ ) { (hStmt->hStmtExtras->aResults)[nColumn] = malloc( sizeof(COLUMNHDR) ); pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nColumn]; memset( pColumnHeader, 0, sizeof(COLUMNHDR) ); _NativeToSQLColumnHeader( pColumnHeader, &(aSQLTables[nColumn]) ); } /************************ * gather data (save col 0 for bookmarks) ************************/ hStmt->hStmtExtras->nRow = 0; while ( (rowResult = msqlFetchRow( pResults )) != NULL ) { hStmt->hStmtExtras->nRow++; msqlFieldSeek( pResults, 0 ); for ( nColumn = 1; nColumn <= hStmt->hStmtExtras->nCols; nColumn++ ) { switch ( nColumn ) { case TABLE_NAME: (hStmt->hStmtExtras->aResults)[hStmt->hStmtExtras->nRow*hStmt->hStmtExtras->nCols+nColumn] = (char *)strdup( rowResult[0] ); break; default: (hStmt->hStmtExtras->aResults)[hStmt->hStmtExtras->nRow*hStmt->hStmtExtras->nCols+nColumn] = NULL; } } } hStmt->hStmtExtras->nRow = 0; /************************** * free the snapshot **************************/ msqlFreeResult( pResults ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/SQLTransact.c0100755000076400007640000000247707363332151017412 0ustar nicknick/******************************************************************** * SQLTransact (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * ********************************************************************/ #include "driver.h" SQLRETURN SQLTransact( SQLHENV hDrvEnv, SQLHDBC hDrvDbc, UWORD nType) { HDRVENV hEnv = (HDRVENV)hDrvEnv; HDRVDBC hDbc = (HDRVDBC)hDrvDbc; /* SANITY CHECKS */ if ( hEnv == SQL_NULL_HENV ) return SQL_INVALID_HANDLE; sprintf( hEnv->szSqlMsg, "hEnv = $%08lX", hEnv ); logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hEnv->szSqlMsg ); switch ( nType ) { case SQL_COMMIT: break; case SQL_ROLLBACK: break; default: sprintf( hEnv->szSqlMsg, "SQL_ERROR Invalid nType=%d", nType ); logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hEnv->szSqlMsg ); return SQL_ERROR; } logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Function not supported" ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_AllocConnect.c0100644000076400007640000000515407363332151017746 0ustar nicknick/************************************************** * _AllocConnect * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" SQLRETURN _AllocConnect( SQLHENV hDrvEnv, SQLHDBC *phDrvDbc ) { HDRVENV hEnv = (HDRVENV)hDrvEnv; HDRVDBC *phDbc = (HDRVDBC*)phDrvDbc; /************************ * SANITY CHECKS ************************/ if( SQL_NULL_HENV == hEnv ) return SQL_INVALID_HANDLE; sprintf( hEnv->szSqlMsg, "hEnv = $%08lX phDbc = $%08lX", hEnv, phDbc ); logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hEnv->szSqlMsg ); if( SQL_NULL_HDBC == phDbc ) { logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR *phDbc is NULL" ); return SQL_ERROR; } /************************ * OK LETS DO IT ************************/ /* allocate database access structure */ *phDbc = (HDRVDBC)malloc( sizeof(DRVDBC) ); if( SQL_NULL_HDBC == *phDbc ) { *phDbc = SQL_NULL_HDBC; logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR malloc error" ); return SQL_ERROR; } /* initialize structure */ memset( *phDbc, 0, sizeof(DRVDBC) ); (*phDbc)->bConnected = 0; (*phDbc)->hDbcExtras = NULL; (*phDbc)->hFirstStmt = NULL; (*phDbc)->hLastStmt = NULL; (*phDbc)->pNext = NULL; (*phDbc)->pPrev = NULL; (*phDbc)->hEnv = (SQLPOINTER)hEnv; /* start logging */ if ( !logOpen( &(*phDbc)->hLog, DRIVER_NAME, NULL, 50 ) ) (*phDbc)->hLog = NULL; logOn( (*phDbc)->hLog, 1 ); /* ADD TO END OF LIST */ if ( hEnv->hFirstDbc == NULL ) { /* 1st is null so the list is empty right now */ hEnv->hFirstDbc = (*phDbc); hEnv->hLastDbc = (*phDbc); } else { /* at least one node in list */ hEnv->hLastDbc->pNext = (SQLPOINTER)(*phDbc); (*phDbc)->pPrev = (SQLPOINTER)hEnv->hLastDbc; hEnv->hLastDbc = (*phDbc); } /********************************************************/ /* ALLOCATE AND INIT EXTRAS HERE */ (*phDbc)->hDbcExtras = malloc( sizeof(DBCEXTRAS) ); (*phDbc)->hDbcExtras->hServer = -1; /********************************************************/ logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_AllocEnv.c0100644000076400007640000000265607363332151017111 0ustar nicknick/********************************************************************** * _AllocEnv * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN _AllocEnv( SQLHENV *phDrvEnv ) { HDRVENV *phEnv = (HDRVENV*)phDrvEnv; /* SANITY CHECKS */ if( NULL == phEnv ) return SQL_INVALID_HANDLE; /* OK */ /* allocate environment */ *phEnv = malloc( sizeof(DRVENV) ); if( SQL_NULL_HENV == *phEnv ) { *phEnv = SQL_NULL_HENV; return SQL_ERROR; } /* initialise environment */ memset( *phEnv, 0, sizeof(DRVENV) ); (*phEnv)->hFirstDbc = NULL; (*phEnv)->hLastDbc = NULL; (*phEnv)->hLog = NULL; /* start logging */ if ( !logOpen( &(*phEnv)->hLog, DRIVER_NAME, NULL, 50 ) ) (*phEnv)->hLog = NULL; logOn( (*phEnv)->hLog, 1 ); /* ALLOCATE AND INIT DRIVER SPECIFIC STORAGE */ (*phEnv)->hEnvExtras = malloc(sizeof(ENVEXTRAS)); (*phEnv)->hEnvExtras->nDummy = -1; logPushMsg( (*phEnv)->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_AllocStmt.c0100644000076400007640000000645607363332151017312 0ustar nicknick/********************************************************************** * _AllocStmt (deprecated) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN _AllocStmt( SQLHDBC hDrvDbc, SQLHSTMT *phDrvStmt ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; HDRVSTMT *phStmt = (HDRVSTMT*)phDrvStmt; /* SANITY CHECKS */ if( hDbc == SQL_NULL_HDBC ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_INVALID_HANDLE" ); return SQL_INVALID_HANDLE; } sprintf( hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); if( NULL == phStmt ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR phStmt=NULL" ); return SQL_ERROR; } /* OK */ /* allocate memory */ *phStmt = malloc( sizeof(DRVSTMT) ); if( SQL_NULL_HSTMT == *phStmt ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR memory allocation failure" ); return SQL_ERROR; } /* initialize memory */ sprintf( hDbc->szSqlMsg, "*phstmt = $%08lX", *phStmt ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); memset( *phStmt, 0, sizeof(DRVSTMT) ); /* SAFETY */ (*phStmt)->hDbc = (SQLPOINTER)hDbc; (*phStmt)->hLog = NULL; (*phStmt)->hStmtExtras = NULL; (*phStmt)->pNext = NULL; (*phStmt)->pPrev = NULL; (*phStmt)->pszQuery = NULL; sprintf( (*phStmt)->szCursorName, "CUR_%08lX", *phStmt ); /* ADD TO DBCs STATEMENT LIST */ /* start logging */ if ( logOpen( &(*phStmt)->hLog, DRIVER_NAME, NULL, 50 ) ) { logOn( (*phStmt)->hLog, 1 ); logPushMsg( (*phStmt)->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "Statement logging allocated ok" ); } else (*phStmt)->hLog = NULL; /* ADD TO END OF LIST */ if ( hDbc->hFirstStmt == NULL ) { /* 1st is null so the list is empty right now */ hDbc->hFirstStmt = (*phStmt); hDbc->hLastStmt = (*phStmt); } else { /* at least one node in list */ hDbc->hLastStmt->pNext = (SQLPOINTER)(*phStmt); (*phStmt)->pPrev = (SQLPOINTER)hDbc->hLastStmt; hDbc->hLastStmt = (*phStmt); } /****************************************************************************/ /* ALLOCATE AND INIT DRIVER EXTRAS HERE */ (*phStmt)->hStmtExtras = malloc(sizeof(STMTEXTRAS)); memset( (*phStmt)->hStmtExtras, 0, sizeof(STMTEXTRAS) ); /* SAFETY */ (*phStmt)->hStmtExtras->aResults = NULL; (*phStmt)->hStmtExtras->nCols = 0; (*phStmt)->hStmtExtras->nRow = 0; (*phStmt)->hStmtExtras->nRows = 0; /****************************************************************************/ logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_Execute.c0100644000076400007640000001016307363332151017000 0ustar nicknick/********************************************************************** * SQLExecute * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN _Execute( SQLHSTMT hDrvStmt ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; int nColumn; int nCols; int nRow; m_result *pResults; /* mSQL DATA */ m_row rowResult; /* mSQL ROW */ m_field *pField; /* mSQL COL HDR */ COLUMNHDR *pColumnHeader; /* SANITY CHECKS */ if( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if( hStmt->pszQuery == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No prepared statement" ); return SQL_ERROR; } /************************** * Free any current results **************************/ if ( hStmt->hStmtExtras->aResults ) _FreeResults( hStmt->hStmtExtras ); /************************** * send prepared query to server **************************/ if ( (hStmt->hStmtExtras->nRows = msqlQuery( ((HDRVDBC)hStmt->hDbc)->hDbcExtras->hServer, hStmt->pszQuery )) == -1 ) { sprintf( hStmt->szSqlMsg, "SQL_ERROR Query failed. %s", msqlErrMsg ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } /************************** * snapshot our results (assume no results means UPDATE, DELETE or INSERT **************************/ pResults = msqlStoreResult(); if ( !pResults ) return SQL_SUCCESS; /************************** * allocate memory for columns headers and result data (row 0 is column header while col 0 is reserved for bookmarks) **************************/ hStmt->hStmtExtras->nRows = msqlNumRows( pResults ); hStmt->hStmtExtras->nCols = msqlNumFields( pResults ); hStmt->hStmtExtras->aResults = malloc( sizeof(char*) * (hStmt->hStmtExtras->nRows+1) * (hStmt->hStmtExtras->nCols+1) ); if ( hStmt->hStmtExtras->aResults == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "Not enough memory. (malloc failed)" ); hStmt->hStmtExtras->nRows = 0; hStmt->hStmtExtras->nCols = 0; msqlFreeResult( pResults ); return SQL_ERROR; } memset( hStmt->hStmtExtras->aResults, 0, sizeof(char*) * (hStmt->hStmtExtras->nRows+1) * (hStmt->hStmtExtras->nCols+1) ); /************************** * gather column header information (save col 0 for bookmarks) **************************/ for ( nColumn = 1; nColumn <= hStmt->hStmtExtras->nCols; nColumn++ ) { pField = msqlFetchField( pResults ); (hStmt->hStmtExtras->aResults)[nColumn] = malloc( sizeof(COLUMNHDR) ); memset( (hStmt->hStmtExtras->aResults)[nColumn], 0, sizeof(COLUMNHDR) ); pColumnHeader = (COLUMNHDR*)(hStmt->hStmtExtras->aResults)[nColumn]; _NativeToSQLColumnHeader( pColumnHeader, pField ); } /************************ * gather data (save col 0 for bookmarks) ************************/ nCols = hStmt->hStmtExtras->nCols; nRow = 0; while ( (rowResult = msqlFetchRow( pResults )) != NULL ) { nRow++; msqlFieldSeek( pResults, 0 ); for ( nColumn=1; nColumn <= nCols; nColumn++ ) { if ( rowResult[nColumn-1] ) (hStmt->hStmtExtras->aResults)[nRow*nCols+nColumn] = (char *)strdup( rowResult[nColumn-1] ); } } hStmt->hStmtExtras->nRow = 0; /************************** * free the snapshot **************************/ msqlFreeResult( pResults ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_FreeDbc.c0100644000076400007640000000320007363332151016662 0ustar nicknick/************************************************** * _FreeDbc * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" SQLRETURN _FreeDbc( SQLHDBC hDrvDbc ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; HDRVDBC hPrevDbc; SQLRETURN nReturn; if ( hDbc == SQL_NULL_HDBC ) return SQL_ERROR; /* TRY TO FREE STATEMENTS */ /* THIS IS JUST IN CASE; SHOULD NOT BE REQUIRED */ nReturn = _FreeStmtList( hDbc ); if ( nReturn != SQL_SUCCESS ) return nReturn; /* SPECIAL CHECK FOR FIRST IN LIST */ if ( ((HDRVENV)hDbc->hEnv)->hFirstDbc == hDbc ) ((HDRVENV)hDbc->hEnv)->hFirstDbc = hDbc->pNext; /* SPECIAL CHECK FOR LAST IN LIST */ if ( ((HDRVENV)hDbc->hEnv)->hLastDbc == hDbc ) ((HDRVENV)hDbc->hEnv)->hLastDbc = hDbc->pPrev; /* EXTRACT SELF FROM LIST */ if ( hDbc->pPrev != SQL_NULL_HDBC ) hDbc->pPrev->pNext = hDbc->pNext; if ( hDbc->pNext != SQL_NULL_HDBC ) hDbc->pNext->pPrev = hDbc->pPrev; /**********************************************/ /* !!! CODE TO FREE DRIVER SPECIFIC MEMORY (hidden in hStmtExtras) HERE !!! */ if ( hDbc->hDbcExtras->hServer > -1 ) msqlClose( hDbc->hDbcExtras->hServer ); free( hDbc->hDbcExtras ); /**********************************************/ logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); logClose( hDbc->hLog ); free( hDbc ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_FreeStmt.c0100644000076400007640000000310107363332151017121 0ustar nicknick/************************************************** * _FreeStmt * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" SQLRETURN _FreeStmt( SQLHSTMT hDrvStmt ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; HDRVSTMT hPrevStmt; SQLRETURN nReturn; if ( hStmt == SQL_NULL_HDBC ) return SQL_ERROR; /* SPECIAL CHECK FOR FIRST IN LIST */ if ( ((HDRVDBC)hStmt->hDbc)->hFirstStmt == hStmt ) ((HDRVDBC)hStmt->hDbc)->hFirstStmt = hStmt->pNext; /* SPECIAL CHECK FOR LAST IN LIST */ if ( ((HDRVDBC)hStmt->hDbc)->hLastStmt == hStmt ) ((HDRVDBC)hStmt->hDbc)->hLastStmt = hStmt->pPrev; /* EXTRACT SELF FROM LIST */ if ( hStmt->pPrev != SQL_NULL_HSTMT ) hStmt->pPrev->pNext = hStmt->pNext; if ( hStmt->pNext != SQL_NULL_HSTMT ) hStmt->pNext->pPrev = hStmt->pPrev; /* FREE STANDARD MEMORY */ if( NULL != hStmt->pszQuery ) free( hStmt->pszQuery ); /*********************************************************************/ /* !!! FREE DRIVER SPECIFIC MEMORY (hidden in hStmtExtras) HERE !!! */ _FreeResults( hStmt->hStmtExtras ); free( hStmt->hStmtExtras ); /*********************************************************************/ logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); logClose( hStmt->hLog ); free( hStmt ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_FreeDbcList.c0100644000076400007640000000116507363332151017526 0ustar nicknick/************************************************** * _FreeDbcList * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" SQLRETURN _FreeDbcList( SQLHENV hDrvEnv ) { HDRVENV hEnv = (HDRVENV)hDrvEnv; if ( hEnv == SQL_NULL_HENV ) return SQL_SUCCESS; while ( _FreeDbc( hEnv->hFirstDbc ) == SQL_SUCCESS ) { } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_FreeStmtList.c0100644000076400007640000000126207363332151017763 0ustar nicknick/************************************************** * _FreeStmtList * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" SQLRETURN _FreeStmtList( SQLHDBC hDrvDbc ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; if ( hDbc == SQL_NULL_HDBC ) return SQL_SUCCESS; if ( hDbc->hFirstStmt == NULL ) return SQL_SUCCESS; while ( _FreeStmt( hDbc->hFirstStmt ) == SQL_SUCCESS ) { } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_FreeResults.c0100644000076400007640000000336207363332151017644 0ustar nicknick/************************************************** * _FreeResults * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" SQLRETURN _FreeResults( HSTMTEXTRAS hStmt ) { COLUMNHDR *pColumnHeader; int nCurColumn; if ( hStmt == NULL ) return SQL_ERROR; if ( hStmt->aResults == NULL ) return SQL_SUCCESS; /* COLUMN HDRS (col=0 is not used) */ for ( nCurColumn = 1; nCurColumn <= hStmt->nCols; nCurColumn++ ) { pColumnHeader = (COLUMNHDR*)(hStmt->aResults)[nCurColumn]; free( pColumnHeader->pszSQL_DESC_BASE_COLUMN_NAME ); free( pColumnHeader->pszSQL_DESC_BASE_TABLE_NAME ); free( pColumnHeader->pszSQL_DESC_CATALOG_NAME ); free( pColumnHeader->pszSQL_DESC_LABEL ); free( pColumnHeader->pszSQL_DESC_LITERAL_PREFIX ); free( pColumnHeader->pszSQL_DESC_LITERAL_SUFFIX ); free( pColumnHeader->pszSQL_DESC_LOCAL_TYPE_NAME ); free( pColumnHeader->pszSQL_DESC_NAME ); free( pColumnHeader->pszSQL_DESC_SCHEMA_NAME ); free( pColumnHeader->pszSQL_DESC_TABLE_NAME ); free( pColumnHeader->pszSQL_DESC_TYPE_NAME ); free( (hStmt->aResults)[nCurColumn] ); } /* RESULT DATA (col=0 is bookmark) */ for ( hStmt->nRow = 1; hStmt->nRow <= hStmt->nRows; hStmt->nRow++ ) { for ( nCurColumn = 1; nCurColumn <= hStmt->nCols; nCurColumn++ ) { free( (hStmt->aResults)[hStmt->nRow*hStmt->nCols+nCurColumn] ); } } free( hStmt->aResults ); hStmt->aResults = NULL; hStmt->nCols = 0; hStmt->nRows = 0; hStmt->nRow = 0; return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_GetData.c0100644000076400007640000000641407363332151016713 0ustar nicknick/************************************************** * _GetData * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" SQLRETURN _GetData( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLSMALLINT nTargetType, /* C DATA TYPE */ SQLPOINTER pTarget, SQLINTEGER nTargetLength, SQLINTEGER *pnLengthOrIndicator ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; char *pSourceData = NULL; /* SANITY CHECKS */ if ( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; if ( hStmt->hStmtExtras == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; if ( hStmt->hStmtExtras->nRows == 0 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No result set." ); return SQL_ERROR; } /********************************************************************** * GET pSourceData FOR NORMAL RESULT SETS **********************************************************************/ if ( hStmt->hStmtExtras->nRow > hStmt->hStmtExtras->nRows || hStmt->hStmtExtras->nRow < 1 ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No current row" ); return SQL_ERROR; } pSourceData = (hStmt->hStmtExtras->aResults)[hStmt->hStmtExtras->nRow*hStmt->hStmtExtras->nCols+nCol]; /**************************** * ALL cols are stored as SQL_CHAR... bad for storage... good for code * SO no need to determine the source type when translating to destination ***************************/ if ( pSourceData == NULL ) { /********************* * Now get the col if value = NULL *********************/ if ( pnLengthOrIndicator != NULL ) *pnLengthOrIndicator = SQL_NULL_DATA; switch ( nTargetType ) { case SQL_C_LONG: memset( pTarget, 0, sizeof(int) ); break; case SQL_C_FLOAT: memset( pTarget, 0, sizeof(float) ); break; case SQL_C_CHAR: *((char *)pTarget) = '\0'; break; default: sprintf( hStmt->szSqlMsg, "SQL_ERROR Unknown target type %d", nTargetType ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); } } else { /********************* * Now get the col when we have a value *********************/ switch ( nTargetType ) { case SQL_C_LONG: *((int *)pTarget) = atoi(pSourceData); if ( NULL != pnLengthOrIndicator ) *pnLengthOrIndicator = sizeof( int ); break; case SQL_C_FLOAT: sscanf( pSourceData, "%g", pTarget ); if ( NULL != pnLengthOrIndicator ) *pnLengthOrIndicator = sizeof( float ); break; case SQL_C_CHAR: strncpy( pTarget, pSourceData, nTargetLength ); if ( NULL != pnLengthOrIndicator ) *pnLengthOrIndicator = strlen(pTarget); break; default: sprintf( hStmt->szSqlMsg, "SQL_ERROR Unknown target type %d", nTargetType ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); } } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_NativeToSQLColumnHeader.c0100644000076400007640000000723007363332151021777 0ustar nicknick/************************************************** * _NativeToSQLColumnHeader * * We want to make the driver code as general as possible. This isolates * the translation from the native client to the SQL format for column * header information. ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" SQLRETURN _NativeToSQLColumnHeader( COLUMNHDR *pColumnHeader, void *pNativeColumnHeader ) { m_field *pField = (m_field*)pNativeColumnHeader; char szBuffer[501]; if ( !pNativeColumnHeader ) return SQL_ERROR; if ( !pColumnHeader ) return SQL_ERROR; /* IS AUTO INCREMENT COL? */ pColumnHeader->bSQL_DESC_AUTO_UNIQUE_VALUE = 0; /* empty string if N/A */ pColumnHeader->pszSQL_DESC_BASE_COLUMN_NAME = (char*)strdup( pField->name ); /* empty string if N/A */ pColumnHeader->pszSQL_DESC_BASE_TABLE_NAME = pField->table ? (char*)strdup( pField->table ) : (char*)strdup( "" ); /* IS CASE SENSITIVE COLUMN? */ pColumnHeader->bSQL_DESC_CASE_SENSITIVE = 0; /* empty string if N/A */ pColumnHeader->pszSQL_DESC_CATALOG_NAME = (char*)strdup( "" ); /* ie SQL_CHAR, SQL_TYPE_TIME... */ pColumnHeader->nSQL_DESC_CONCISE_TYPE = _NativeToSQLType( pField ); /* max digits required to display */ pColumnHeader->nSQL_DESC_DISPLAY_SIZE = pField->length; /* has data source specific precision? */ pColumnHeader->bSQL_DESC_FIXED_PREC_SCALE = 0; /* display label, col name or empty string */ pColumnHeader->pszSQL_DESC_LABEL = (char*)strdup( pField->name ); /* strlen or bin size */ pColumnHeader->nSQL_DESC_LENGTH = _NativeTypeLength( pField ); /* empty string if N/A */ pColumnHeader->pszSQL_DESC_LITERAL_PREFIX = (char*)strdup( "" ); /* empty string if N/A */ pColumnHeader->pszSQL_DESC_LITERAL_SUFFIX = (char*)strdup( "" ); /* empty string if N/A */ pColumnHeader->pszSQL_DESC_LOCAL_TYPE_NAME = (char*)strdup( "" ); /* col alias, col name or empty string */ pColumnHeader->pszSQL_DESC_NAME = (char*)strdup( pField->name ); /* SQL_NULLABLE, _NO_NULLS or _UNKNOWN */ pColumnHeader->nSQL_DESC_NULLABLE = IS_NOT_NULL( pField->flags ) ? SQL_NO_NULLS : SQL_NULLABLE; /* 2, 10, or if N/A... 0 */ pColumnHeader->nSQL_DESC_NUM_PREC_RADIX = 0; /* max size */ pColumnHeader->nSQL_DESC_OCTET_LENGTH = pField->length; /* */ pColumnHeader->nSQL_DESC_PRECISION = _NativeTypePrecision( pField ); /* */ pColumnHeader->nSQL_DESC_SCALE = 4; /* empty string if N/A */ pColumnHeader->pszSQL_DESC_SCHEMA_NAME = (char*)strdup( "" ); /* can be in a filter ie SQL_PRED_NONE... */ pColumnHeader->nSQL_DESC_SEARCHABLE = SQL_PRED_SEARCHABLE; /* empty string if N/A */ pColumnHeader->pszSQL_DESC_TABLE_NAME = pField->table ? (char*)strdup( pField->table ) : (char*)strdup( "" ); /* SQL data type ie SQL_CHAR, SQL_INTEGER.. */ pColumnHeader->nSQL_DESC_TYPE = _NativeToSQLType( pField ); /* DBMS data type ie VARCHAR, MONEY... */ pColumnHeader->pszSQL_DESC_TYPE_NAME = (char*)strdup( _NativeTypeDesc( szBuffer, pField->type ) ); /* qualifier for SQL_DESC_NAME ie SQL_NAMED */ pColumnHeader->nSQL_DESC_UNNAMED = SQL_NAMED; /* if signed FALSE else TRUE */ pColumnHeader->bSQL_DESC_UNSIGNED = 0; /* ie SQL_ATTR_READONLY, SQL_ATTR_WRITE... */ pColumnHeader->nSQL_DESC_UPDATABLE = SQL_ATTR_READONLY; return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_NativeToSQLType.c0100644000076400007640000000174507363332151020357 0ustar nicknick/************************************************** * _NativeToSQLType * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" int _NativeToSQLType( void *pNativeColumnHeader ) { m_field *pField = (m_field*)pNativeColumnHeader; switch ( pField->type ) { case MONEY_TYPE: return SQL_REAL; case INT_TYPE: return SQL_INTEGER; case UINT_TYPE: return SQL_INTEGER; case TIME_TYPE: return SQL_CHAR; case DATE_TYPE: return SQL_CHAR; case REAL_TYPE: return SQL_REAL; case CHAR_TYPE: return SQL_CHAR; case TEXT_TYPE: return SQL_CHAR; case IDENT_TYPE: return SQL_CHAR; default: return SQL_UNKNOWN_TYPE; } return SQL_CHAR; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_NativeTypeDesc.c0100644000076400007640000000106507363332151020266 0ustar nicknick/************************************************** * _NativeTypeDesc * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" char *_NativeTypeDesc( char *pszTypeName, int nMiniSQLType ) { sprintf( pszTypeName, "%s", msqlTypeNames[nMiniSQLType] ); return pszTypeName; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_NativeTypeLength.c0100644000076400007640000000213007363332151020623 0ustar nicknick/************************************************** * _NativeTypeLength * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" int _NativeTypeLength( void *pNativeColumnHeader ) { m_field *pField = (m_field*)pNativeColumnHeader; int nLength; /**************************** * DEFAULT ***************************/ nLength = pField->length; /**************************** * NON-DEFAULT ***************************/ switch ( pField->type ) { case MONEY_TYPE: return 16; case INT_TYPE: return 5; case UINT_TYPE: return 5; case TIME_TYPE: return nLength; case DATE_TYPE: return nLength; case REAL_TYPE: return nLength; case CHAR_TYPE: return nLength; case TEXT_TYPE: return nLength; case IDENT_TYPE: return nLength; default: return nLength; } return nLength; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_NativeTypePrecision.c0100644000076400007640000000075207363332151021345 0ustar nicknick/************************************************** * _NativeTypePrecision * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "driver.h" int _NativeTypePrecision( void *pNativeColumnHeader ) { return 4; } unixODBC-2.2.14-p2/Drivers/MiniSQL/_Prepare.c0100644000076400007640000000325307363332151016776 0ustar nicknick/********************************************************************** * SQLPrepare * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN _Prepare( SQLHSTMT hDrvStmt, SQLCHAR *szSqlStr, SQLINTEGER nSqlStrLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( szSqlStr == NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No SQL to process" ); return SQL_ERROR; } if ( hStmt->pszQuery != NULL ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Statement already in use." ); return SQL_ERROR; } /* allocate and copy statement to buffer (process escape sequences and parameter tokens as required) */ hStmt->pszQuery = (char *)strdup( szSqlStr ); if ( NULL == hStmt->pszQuery ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Memory allocation error" ); return SQL_ERROR; } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/sqlFreeConnect.c0100644000076400007640000000262407363332151020155 0ustar nicknick/********************************************************************** * sqlFreeConnect * * Do not try to Free Dbc if there are Stmts... return an error. Let the * Driver Manager do a recursive clean up if its wants. * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN sqlFreeConnect( SQLHDBC hDrvDbc ) { HDRVDBC hDbc = (HDRVDBC)hDrvDbc; int nReturn; /* SANITY CHECKS */ if( NULL == hDbc ) return SQL_INVALID_HANDLE; sprintf( hDbc->szSqlMsg, "hDbc = $%08lX", hDbc ); logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hDbc->szSqlMsg ); if( hDbc->hDbcExtras->hServer > -1 ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Connection is active" ); return SQL_ERROR; } if ( hDbc->hFirstStmt != NULL ) { logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR Connection has allocated statements" ); return SQL_ERROR; } nReturn = _FreeDbc( hDbc ); return nReturn; } unixODBC-2.2.14-p2/Drivers/MiniSQL/sqlFreeEnv.c0100644000076400007640000000266707363332151017323 0ustar nicknick/********************************************************************** * sqlFreeEnv * * Do not try to Free Env if there are Dbcs... return an error. Let the * Driver Manager do a recursive clean up if it wants. * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN sqlFreeEnv( SQLHENV hDrvEnv ) { HDRVENV hEnv = (HDRVENV)hDrvEnv; /* SANITY CHECKS */ if( hEnv == SQL_NULL_HENV ) return SQL_INVALID_HANDLE; sprintf( hEnv->szSqlMsg, "hEnv = $%08lX", hEnv ); logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hEnv->szSqlMsg ); if ( hEnv->hFirstDbc != NULL ) { logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR There are allocated Connections" ); return SQL_ERROR; } /************ * !!! ADD CODE TO FREE DRIVER SPECIFIC MEMORY (hidden in hEnvExtras) HERE !!! ************/ free( hEnv->hEnvExtras ); logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); logClose( hEnv->hLog ); free( hEnv ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/sqlFreeStmt.c0100644000076400007640000000254407363332151017514 0ustar nicknick/********************************************************************** * sqlFreeStmt * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include "driver.h" SQLRETURN sqlFreeStmt( SQLHSTMT hDrvStmt, SQLUSMALLINT nOption ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; /* SANITY CHECKS */ if( hStmt == SQL_NULL_HSTMT ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); /********* * RESET PARAMS *********/ switch( nOption ) { case SQL_CLOSE: break; case SQL_DROP: return _FreeStmt( hStmt ); case SQL_UNBIND: break; case SQL_RESET_PARAMS: break; default: sprintf( hStmt->szSqlMsg, "SQL_ERROR Invalid nOption=%d", nOption ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); return SQL_ERROR; } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/MiniSQL/driver.h0100644000076400007640000000615407363332151016544 0ustar nicknick/********************************************** * Driver.h * * Description: * * This is all of the stuff that is common among ALL drivers (but not to the DriverManager). * * Make sure that your driver specific driverextras.h exists! * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************/ #ifndef _H_DRIVER #define _H_DRIVER /***************************************************************************** * ODBC VERSION (THAT THIS DRIVER COMPLIES WITH) *****************************************************************************/ #define ODBCVER 0x0351 /* this is optimistic to say the least but we are heading to full 3.51 compliance */ #include #include #include #include #include "driverextras.h" #define SQL_MAX_CURSOR_NAME 100 /***************************************************************************** * STATEMENT *****************************************************************************/ typedef struct tDRVSTMT { struct tDRVSTMT *pPrev; /* prev struct or null */ struct tDRVSTMT *pNext; /* next struct or null */ SQLPOINTER hDbc; /* pointer to DB context */ SQLCHAR szCursorName[SQL_MAX_CURSOR_NAME]; /* name of cursor */ SQLCHAR *pszQuery; /* query string */ SQLCHAR szSqlMsg[LOG_MSG_MAX]; /* buff to format msgs */ HLOG hLog; /* handle to msg logs */ HSTMTEXTRAS hStmtExtras; /* DRIVER SPECIFIC STORAGE */ } DRVSTMT, *HDRVSTMT; /***************************************************************************** * CONNECTION *****************************************************************************/ typedef struct tDRVDBC { struct tDRVDBC *pPrev; /* prev struct or null */ struct tDRVDBC *pNext; /* next struct or null */ SQLPOINTER hEnv; /* pointer to ENV structure */ HDRVSTMT hFirstStmt; /* first in list or null */ HDRVSTMT hLastStmt; /* last in list or null */ SQLCHAR szSqlMsg[LOG_MSG_MAX]; /* buff to format msgs */ HLOG hLog; /* handle to msg logs */ int bConnected; /* TRUE on open connection */ HDBCEXTRAS hDbcExtras; /* DRIVER SPECIFIC DATA */ } DRVDBC, *HDRVDBC; /***************************************************************************** * ENVIRONMENT *****************************************************************************/ typedef struct tDRVENV { HDRVDBC hFirstDbc; /* first in list or null */ HDRVDBC hLastDbc; /* last in list or null */ SQLCHAR szSqlMsg[LOG_MSG_MAX]; /* buff to format msgs */ HLOG hLog; /* handle to msg logs */ HENVEXTRAS hEnvExtras; } DRVENV, *HDRVENV; #endif unixODBC-2.2.14-p2/Drivers/MiniSQL/driverextras.h0100644000076400007640000001420407363332151017766 0ustar nicknick/********************************************** * driverextras.h * * Purpose: * * To define driver specifc extras such as structs to be included * along side the common ODBC includes. * * Description: * * The short-term storage a driver requires as infrastructure varies somewhat from * DBMS to DBMS. The ODBC DriverManager requires predictable storage and it is defined * in include files such as hstmt.h. The Driver also requires predictable storage and * it is defined in driver.h. Storage *specific to a type of driver* is defined here. * * The three main storage items are the ENV, DBC, and STMT structs. These are defined * as type void * in sql.h. * * So if your driver requires extra storage (and it probably does) then define * the storage within these structs, allocate/initialize as required. Cast them * to and from the standard names as required. * * For example; * * App DM |DRV * (as per hdbc.h) |(as per driver.h) *==================================================================== * hDbc=void* hDbc=SQLHDBC hDbc=HDBCEXTRAS *-------------------------------------------------------------------- * * DO NOT FORGET TO FREE ANY ALLOCATED MEMORY (at some point) * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #ifndef DRIVEREXTRAS_H #define DRIVEREXTRAS_H /********************************************** * KEEP IT SIMPLE; PUT ALL DRIVER INCLUDES HERE THEN EACH DRIVER MODULE JUST INCLUDES THIS ONE FILE **********************************************/ #include #include #include #include #include #include /********************************************** * ENVIRONMENT: DRIVER SPECIFIC STUFF THAT NEEDS TO BE STORED IN THE DRIVERS ENVIRONMENT **********************************************/ typedef struct tENVEXTRAS { int nDummy; } ENVEXTRAS, *HENVEXTRAS; /********************************************** * CONNECTION: DRIVER SPECIFIC STUFF THAT NEEDS TO BE STORED IN THE DRIVERS CONNECTIONS **********************************************/ typedef struct tDBCEXTRAS { int hServer; /* HANDLE TO mSQl SERVER (socket) */ } DBCEXTRAS, *HDBCEXTRAS; /********************************************** * STATEMENT: DRIVER SPECIFIC STUFF THAT NEEDS TO BE STORED IN THE DRIVERS STATEMENTS **********************************************/ typedef struct tCOLUMNHDR /* this is how we will store bound columns */ { /* EVERYTHING YOU WOULD EVER WANT TO KNOW ABOUT THE COLUMN. INIT THIS BY CALLING */ /* _NativeToSQLColumnHeader AS SOON AS YOU HAVE COLUMN INFO. THIS MAKES THE COL HDR LARGER */ /* BUT GENERALIZES MORE CODE. see SQLColAttribute() */ int bSQL_DESC_AUTO_UNIQUE_VALUE; /* IS AUTO INCREMENT COL? */ char *pszSQL_DESC_BASE_COLUMN_NAME; /* empty string if N/A */ char *pszSQL_DESC_BASE_TABLE_NAME; /* empty string if N/A */ int bSQL_DESC_CASE_SENSITIVE; /* IS CASE SENSITIVE COLUMN? */ char *pszSQL_DESC_CATALOG_NAME; /* empty string if N/A */ int nSQL_DESC_CONCISE_TYPE; /* ie SQL_CHAR, SQL_TYPE_TIME... */ int nSQL_DESC_DISPLAY_SIZE; /* max digits required to display */ int bSQL_DESC_FIXED_PREC_SCALE; /* has data source specific precision? */ char *pszSQL_DESC_LABEL; /* display label, col name or empty string */ int nSQL_DESC_LENGTH; /* strlen or bin size */ char *pszSQL_DESC_LITERAL_PREFIX; /* empty string if N/A */ char *pszSQL_DESC_LITERAL_SUFFIX; /* empty string if N/A */ char *pszSQL_DESC_LOCAL_TYPE_NAME; /* empty string if N/A */ char *pszSQL_DESC_NAME; /* col alias, col name or empty string */ int nSQL_DESC_NULLABLE; /* SQL_NULLABLE, _NO_NULLS or _UNKNOWN */ int nSQL_DESC_NUM_PREC_RADIX; /* 2, 10, or if N/A... 0 */ int nSQL_DESC_OCTET_LENGTH; /* max size */ int nSQL_DESC_PRECISION; /* */ int nSQL_DESC_SCALE; /* */ char *pszSQL_DESC_SCHEMA_NAME; /* empty string if N/A */ int nSQL_DESC_SEARCHABLE; /* can be in a filter ie SQL_PRED_NONE... */ char *pszSQL_DESC_TABLE_NAME; /* empty string if N/A */ int nSQL_DESC_TYPE; /* SQL data type ie SQL_CHAR, SQL_INTEGER.. */ char *pszSQL_DESC_TYPE_NAME; /* DBMS data type ie VARCHAR, MONEY... */ int nSQL_DESC_UNNAMED; /* qualifier for SQL_DESC_NAME ie SQL_NAMED */ int bSQL_DESC_UNSIGNED; /* if signed FALSE else TRUE */ int nSQL_DESC_UPDATABLE; /* ie SQL_ATTR_READONLY, SQL_ATTR_WRITE... */ /* BINDING INFO */ short nTargetType; /* BIND: C DATA TYPE ie SQL_C_CHAR */ char *pTargetValue; /* BIND: POINTER FROM APPLICATION TO COPY TO*/ long nTargetValueMax; /* BIND: MAX SPACE IN pTargetValue */ long *pnLengthOrIndicator; /* BIND: TO RETURN LENGTH OR NULL INDICATOR */ } COLUMNHDR; typedef struct tSTMTEXTRAS { char **aResults; /* nRows x nCols OF CHAR POINTERS. Row 0= ptrs to COLUMNHDR. Col 0=Bookmarks */ int nCols; /* # OF VALID COLUMNS IN aColumns */ int nRows; /* # OF ROWS IN aResults */ int nRow; /* CURRENT ROW */ } STMTEXTRAS, *HSTMTEXTRAS; /**************************** * ***************************/ SQLRETURN _GetData( SQLHSTMT hDrvStmt, SQLUSMALLINT nCol, SQLSMALLINT nTargetType, SQLPOINTER pTarget, SQLINTEGER nTargetLength, SQLINTEGER *pnLengthOrIndicator ); SQLRETURN _NativeToSQLColumnHeader( COLUMNHDR *pColumnHeader, void *pNativeColumnHeader ); int _NativeToSQLType( void *pNativeColumnHeader ); char *_NativeTypeDesc( char *pszTypeName, int nType ); int _NativeTypeLength( void *pNativeColumnHeader ); int _NativeTypePrecision( void *pNativeColumnHeader ); #endif unixODBC-2.2.14-p2/Drivers/nn/0040755000076400007640000000000011150523345014230 5ustar nicknickunixODBC-2.2.14-p2/Drivers/nn/README0100644000076400007640000000263207363332153015116 0ustar nicknick*************************************************************** * This code is GPL. * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | Driver for internet News Servers | +-------------------------------------------------------------+ This is Ke Jin's NN ODBC driver, adapted for unixODBC. Ke Jin's original README is in README.orig. This is a first pass at the effort to integrate it into unixODBC. It works, in its current state, but much more needs to be done (see the TODO). THIS CODE IS FUNCTIONAL BUT IS IN MID-HACK; ONLY THE MOST ADVENTUROUS SHOULD EVEN TRY TO FIGURE THIS OUT IN ITS CURRENT STATE. - PAH The basic concept is that a news server is like a SERVER/DATABASE, a news group is like a TABLE, and data such as Subject is a COLUMN. A useful subset of SQL is supported in the driver. Check out Ke Jins original README (README.orig). This driver can be quite usefull so I hope someone volunteers to tackle some of the items in the TODO list. +-------------------------------------------------------------+ | Peter Harvey pharvey@codebydesign.com | | http://www.unixodbc.org | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/Drivers/nn/Makefile.am0100644000076400007640000000215711025707426016273 0ustar nicknicklib_LTLIBRARIES = libnn.la INCLUDES = -I@top_srcdir@/include -I. libnn_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module DEFS = -DUNIXODBC @DEFS@ EXTRA_DIST = \ config.h \ connect.h \ convert.h \ driver.h \ herr.h \ hstmt.h \ isql.h \ isqlext.h \ nncol.h \ nndate.h \ nnsql.h \ nntp.h \ stmt.h \ yyenv.h \ yyerr.h \ yylex.h \ yyparse.tab.h \ yystmt.h \ herr.ci \ nncol.ci \ nntp.ci \ yyerr.ci \ yylex.ci \ README libnn_la_SOURCES = \ SQLAllocConnect.c \ SQLAllocEnv.c \ SQLAllocStmt.c \ SQLBindCol.c \ SQLBindParameter.c \ SQLCancel.c \ SQLConnect.c \ SQLDescribeCol.c \ SQLDisconnect.c \ SQLDriverConnect.c \ SQLError.c \ SQLExecDirect.c \ SQLExecute.c \ SQLFetch.c \ SQLFreeConnect.c \ SQLFreeEnv.c \ SQLFreeStmt.c \ SQLGetConnectOption.c \ SQLGetData.c \ SQLNumParams.c \ SQLNumResultCols.c \ SQLParamData.c \ SQLPrepare.c \ SQLPutData.c \ SQLRowCount.c \ SQLSetConnectOption.c \ SQLSetParam.c \ misc.c \ connect.c \ convert.c \ execute.c \ herr.c \ prepare.c \ yyparse.c \ yylex.c \ yystmt.c \ yyerr.c \ yyevl.c \ yytchk.c \ nncol.c \ nndate.c \ nntp.c unixODBC-2.2.14-p2/Drivers/nn/Makefile.in0100644000076400007640000005014211111035235016265 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = Drivers/nn DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ChangeLog TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libnn_la_LIBADD = am_libnn_la_OBJECTS = SQLAllocConnect.lo SQLAllocEnv.lo \ SQLAllocStmt.lo SQLBindCol.lo SQLBindParameter.lo SQLCancel.lo \ SQLConnect.lo SQLDescribeCol.lo SQLDisconnect.lo \ SQLDriverConnect.lo SQLError.lo SQLExecDirect.lo SQLExecute.lo \ SQLFetch.lo SQLFreeConnect.lo SQLFreeEnv.lo SQLFreeStmt.lo \ SQLGetConnectOption.lo SQLGetData.lo SQLNumParams.lo \ SQLNumResultCols.lo SQLParamData.lo SQLPrepare.lo \ SQLPutData.lo SQLRowCount.lo SQLSetConnectOption.lo \ SQLSetParam.lo misc.lo connect.lo convert.lo execute.lo \ herr.lo prepare.lo yyparse.lo yylex.lo yystmt.lo yyerr.lo \ yyevl.lo yytchk.lo nncol.lo nndate.lo nntp.lo libnn_la_OBJECTS = $(am_libnn_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libnn_la_SOURCES) DIST_SOURCES = $(libnn_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DUNIXODBC @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libnn.la INCLUDES = -I@top_srcdir@/include -I. libnn_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module EXTRA_DIST = \ config.h \ connect.h \ convert.h \ driver.h \ herr.h \ hstmt.h \ isql.h \ isqlext.h \ nncol.h \ nndate.h \ nnsql.h \ nntp.h \ stmt.h \ yyenv.h \ yyerr.h \ yylex.h \ yyparse.tab.h \ yystmt.h \ herr.ci \ nncol.ci \ nntp.ci \ yyerr.ci \ yylex.ci \ README libnn_la_SOURCES = \ SQLAllocConnect.c \ SQLAllocEnv.c \ SQLAllocStmt.c \ SQLBindCol.c \ SQLBindParameter.c \ SQLCancel.c \ SQLConnect.c \ SQLDescribeCol.c \ SQLDisconnect.c \ SQLDriverConnect.c \ SQLError.c \ SQLExecDirect.c \ SQLExecute.c \ SQLFetch.c \ SQLFreeConnect.c \ SQLFreeEnv.c \ SQLFreeStmt.c \ SQLGetConnectOption.c \ SQLGetData.c \ SQLNumParams.c \ SQLNumResultCols.c \ SQLParamData.c \ SQLPrepare.c \ SQLPutData.c \ SQLRowCount.c \ SQLSetConnectOption.c \ SQLSetParam.c \ misc.c \ connect.c \ convert.c \ execute.c \ herr.c \ prepare.c \ yyparse.c \ yylex.c \ yystmt.c \ yyerr.c \ yyevl.c \ yytchk.c \ nncol.c \ nndate.c \ nntp.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Drivers/nn/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Drivers/nn/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libnn.la: $(libnn_la_OBJECTS) $(libnn_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libnn_la_LDFLAGS) $(libnn_la_OBJECTS) $(libnn_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocEnv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLAllocStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLBindParameter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLCancel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDescribeCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDisconnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLDriverConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLError.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExecDirect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLExecute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeEnv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLFreeStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLGetData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNumParams.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLNumResultCols.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLParamData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPrepare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLPutData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLRowCount.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SQLSetParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/herr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nncol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nndate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nntp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prepare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yyerr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yyevl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yylex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yyparse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yystmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yytchk.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/Drivers/nn/ChangeLog0100644000076400007640000000045507363332153016011 0ustar nicknick1999-05-15 Peter Harvey * All: Started code resconstruction to unixODBC framework. 1999-05-13 Peter Harvey * All: adapted Ke Jin's NN ODBC driver for unixODBC (1st clean compile and successfull query) * ChangeLog: Started ChangeLog unixODBC-2.2.14-p2/Drivers/nn/TODO0100644000076400007640000000046307363332154014727 0ustar nicknickTODO ---- 0. standardize makefile(s) 1. modularize to the function level 2. get all sources to reside in one dir 3. replace redundent code with unixODBC libs such as odbcinst 4. update function declares to ODBC 3.5.1 standard 5. implement catalog functions ( SQLTables, SQLColumns... ) - Peter Harvey unixODBC-2.2.14-p2/Drivers/nn/SQLAllocConnect.c0100755000076400007640000000213407363332153017326 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLAllocConnect( HENV henv, HDBC * phdbc) { env_t* penv = henv; dbc_t* pdbc; int i; UNSET_ERROR( penv->herr ); pdbc = *phdbc = (void*)MEM_ALLOC( sizeof(dbc_t) ); if (! pdbc ) { PUSHSQLERR( penv->herr, en_S1001 ); return SQL_ERROR; } pdbc->next = penv->hdbc; penv->hdbc = pdbc; pdbc->henv = henv; pdbc->stmt= 0; pdbc->herr = 0; pdbc->hcndes = 0; return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLAllocEnv.c0100755000076400007640000000157207363332153016472 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLAllocEnv( HENV* phenv) { env_t* penv; *phenv = penv = (env_t*)MEM_ALLOC(sizeof(env_t)); if ( ! penv ) return SQL_ERROR; penv->herr = 0; penv->hdbc = 0; return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLAllocStmt.c0100755000076400007640000000300607363332153016663 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLAllocStmt( HDBC hdbc, HSTMT* phstmt ) { void* hcndes; void* yystmt; stmt_t* pstmt; *phstmt = 0; hcndes = nnodbc_getnntpcndes(hdbc); if ( ! (yystmt = nnsql_allocyystmt(hcndes)) ) { int code = nnsql_errcode(hcndes); if ( code == -1 ) code = errno; nnodbc_pushdbcerr( hdbc, code, nnsql_errmsg(hcndes)); return SQL_ERROR; } pstmt = (stmt_t*)MEM_ALLOC(sizeof(stmt_t)); if ( !pstmt ) { nnsql_dropyystmt(yystmt); nnodbc_pushdbcerr(hdbc, en_S1001, 0); return SQL_ERROR; } if ( nnodbc_attach_stmt( hdbc, pstmt ) ) { nnsql_dropyystmt(yystmt); MEM_FREE( pstmt ); return SQL_ERROR; } pstmt->yystmt = yystmt; pstmt->herr = 0; pstmt->pcol = 0; pstmt->ppar = 0; pstmt->ndelay = 0; pstmt->hdbc = hdbc; pstmt->refetch = 0; pstmt->putipar = 0; *phstmt = pstmt; return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLBindCol.c0100755000076400007640000000364010065530751016274 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLBindCol( HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD* pcbValue ) { stmt_t* pstmt = hstmt; column_t* pcol; int i, max; UNSET_ERROR( pstmt->herr ); if ( fCType == SQL_C_BOOKMARK ) fCType = SQL_C_ULONG; switch (fCType) { case SQL_C_DEFAULT: case SQL_C_CHAR: case SQL_C_TINYINT: case SQL_C_STINYINT: case SQL_C_UTINYINT: case SQL_C_SHORT: case SQL_C_SSHORT: case SQL_C_USHORT: case SQL_C_LONG: case SQL_C_SLONG: case SQL_C_ULONG: case SQL_C_DATE: break; default: PUSHSQLERR( pstmt->herr, en_S1C00 ); return SQL_ERROR; } max = nnsql_max_column(); if ( icol > (UWORD)max ) { PUSHSQLERR( pstmt->herr, en_S1002 ); return SQL_ERROR; } if ( ! pstmt->pcol ) { if ( ! rgbValue ) return SQL_SUCCESS; pstmt->pcol = (column_t*)MEM_ALLOC( sizeof(column_t)*(max+1) ); if ( ! pstmt->pcol ) { PUSHSQLERR( pstmt->herr, en_S1001 ); return SQL_ERROR; } MEM_SET(pstmt->pcol, 0, sizeof(column_t)*(max+1) ); } pcol = pstmt->pcol + icol; pcol->ctype = fCType; pcol->userbuf = rgbValue; pcol->userbufsize = cbValueMax; pcol->pdatalen = (long*) pcbValue; pcol->offset = 0; return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLBindParameter.c0100755000076400007640000000463610065530751017505 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLBindParameter( HSTMT hstmt, UWORD ipar, SWORD fParamType, SWORD fCType, SWORD fSqlType, UDWORD cbColDef, SWORD ibScale, PTR rgbValue, SDWORD cbValueMax, SDWORD* pcbValue) { param_t* ppar; int i, max; stmt_t* pstmt = hstmt; fptr_t cvt; UNSET_ERROR( pstmt->herr ); max = nnsql_max_param(); if ( ipar > (UWORD)max ) { PUSHSQLERR( pstmt->herr, en_S1093); return SQL_ERROR; } if ( fCType == SQL_C_DEFAULT ) { switch ( fSqlType ) { case SQL_CHAR: case SQL_VARCHAR: case SQL_LONGVARCHAR: fCType = SQL_C_CHAR; break; case SQL_TINYINT: fCType = SQL_C_STINYINT; break; case SQL_SMALLINT: fCType = SQL_C_SSHORT; break; case SQL_INTEGER: fCType = SQL_C_SLONG; break; case SQL_DATE: fCType = SQL_C_DATE; break; default: PUSHSQLERR( pstmt->herr, en_S1C00 ); return SQL_ERROR; } } cvt = nnodbc_get_c2sql_cvt( fCType, fSqlType); if ( ! cvt ) { PUSHSQLERR( pstmt->herr, en_07006 ); return SQL_ERROR; } if ( ! pstmt->ppar ) { int i; pstmt->ppar = (param_t*)MEM_ALLOC( sizeof(param_t)*max ); if ( ! pstmt->ppar ) { PUSHSQLERR( pstmt->herr, en_S1001 ); return SQL_ERROR; } ppar = pstmt->ppar; MEM_SET( ppar, 0, sizeof(param_t)*max ); for (i=0; i< max; i++ ) { ppar->bind = 0; ppar ++; } } ppar = pstmt->ppar + ipar - 1; ppar->bind = 1; ppar->type = fParamType; ppar->coldef = cbColDef; ppar->scale = ibScale; ppar->userbuf = rgbValue; ppar->userbufsize = cbValueMax; ppar->pdatalen = (long*) pcbValue; ppar->ctype = fCType; ppar->sqltype = fSqlType; ppar->cvt = cvt; return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLCancel.c0100755000076400007640000000214307363332153016147 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLCancel( HSTMT hstmt) { stmt_t* pstmt = hstmt; param_t* ppar; int i, npar; UNSET_ERROR( pstmt->herr ); npar = nnsql_getparnum(pstmt->yystmt); for (i=1, ppar = pstmt->ppar; ppar && i < npar + 1; i++, ppar++ ) { nnsql_yyunbindpar( pstmt->yystmt, i); MEM_FREE(ppar->putdtbuf); ppar->putdtbuf = 0; ppar->putdtlen = 0; ppar->need = 0; } pstmt->ndelay = 0; pstmt->putipar= 0; return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLConnect.c0100755000076400007640000000246507363332153016362 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLConnect( HDBC hdbc, UCHAR* szDSN, SWORD cbDSN, UCHAR* szUID, SWORD cbUID, UCHAR* szAuthStr, SWORD cbAuthStr) { dbc_t* pdbc = hdbc; char* ptr; char buf[64]; UNSET_ERROR( pdbc->herr ); ptr = (char*)getkeyvalbydsn( (char*)szDSN, cbDSN, "Server", buf, sizeof(buf)); if ( ! ptr ) { PUSHSQLERR( pdbc->herr, en_IM002 ); return SQL_ERROR; } pdbc->hcndes = nntp_connect(ptr); if ( ! pdbc->hcndes ) { PUSHSQLERR( pdbc->herr, en_08001 ); PUSHSYSERR( pdbc->herr, errno, nntp_errmsg(0)); return SQL_ERROR; } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLDescribeCol.c0100755000076400007640000000426107363332154017144 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLDescribeCol( HSTMT hstmt, UWORD icol, UCHAR* szColName, SWORD cbColNameMax, SWORD* pcbColName, SWORD* pfSqlType, UDWORD* pcbColDef, SWORD* pibScale, SWORD* pfNullable ) { stmt_t* pstmt = hstmt; char* colname; int colnamelen, sqltype, precision, ncol; RETCODE retcode = SQL_SUCCESS; UNSET_ERROR( pstmt->herr ); ncol = nnsql_getcolnum(pstmt->yystmt); if ( icol > (UWORD)(ncol - 1) ) { PUSHSQLERR( pstmt->herr, en_S1002 ); return SQL_ERROR; } colname = nnsql_getcolnamebyidx( nnsql_column_descid(pstmt->yystmt, icol) ); colnamelen = STRLEN(colname); if ( szColName ) { if ( cbColNameMax < colnamelen + 1 ) { colnamelen = cbColNameMax - 1; PUSHSQLERR( pstmt->herr, en_01004 ); retcode = SQL_SUCCESS_WITH_INFO; } STRNCPY( szColName, colname, colnamelen); szColName[colnamelen] = 0; if ( pcbColName ) *pcbColName = colnamelen; } if ( nnsql_isstrcol(pstmt->yystmt, icol) ) { sqltype = SQL_LONGVARCHAR; precision = SQL_NO_TOTAL; } else if ( nnsql_isnumcol(pstmt->yystmt, icol) ) { sqltype = SQL_INTEGER; precision = 10; } else if ( nnsql_isdatecol(pstmt->yystmt, icol) ) { sqltype = SQL_DATE; precision = 10; } else { sqltype= 0; precision = SQL_NO_TOTAL; } if ( pfSqlType ) *pfSqlType = sqltype; if ( pcbColDef ) *pcbColDef = precision; if ( pfNullable ) *pfNullable = nnsql_isnullablecol(pstmt->yystmt, icol); return retcode; } unixODBC-2.2.14-p2/Drivers/nn/SQLDisconnect.c0100755000076400007640000000164007363332154017055 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLDisconnect( HDBC hdbc) { dbc_t* pdbc = hdbc; UNSET_ERROR( pdbc->herr ); for (;pdbc->stmt;) nnodbc_sqlfreestmt(pdbc->stmt->hstmt, SQL_DROP); nntp_close( pdbc->hcndes ); pdbc->hcndes = 0; return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLDriverConnect.c0100755000076400007640000000432107363332154017530 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLDriverConnect( HDBC hdbc, HWND hwnd, UCHAR* szConnStrIn, SWORD cbConnStrIn, UCHAR* szConnStrOut, SWORD cbConnStrOutMax, SWORD* pcbConnStrOut, UWORD fDriverCompletion) { dbc_t* pdbc = hdbc; char *dsn, *server; char buf[64]; int sqlstat = en_00000; UNSET_ERROR( pdbc->herr ); server = getkeyvalinstr((char*)szConnStrIn, cbConnStrIn, "Server", buf, sizeof(buf)); if ( ! server ) { dsn = getkeyvalinstr((char*)szConnStrIn, cbConnStrIn, "DSN", buf, sizeof(buf)); if ( !dsn ) dsn = "default"; server = getkeyvalbydsn((char*)dsn, SQL_NTS, "Server", buf, sizeof(buf)); } if ( ! server ) buf[0] = 0; switch ( fDriverCompletion ) { case SQL_DRIVER_NOPROMPT: break; case SQL_DRIVER_COMPLETE: case SQL_DRIVER_COMPLETE_REQUIRED: if ( ! server ) break; /* to next case */ case SQL_DRIVER_PROMPT: if ( nnodbc_conndialog( hwnd, buf, sizeof(buf)) ) { sqlstat = en_IM008; break; } server = buf; break; default: sqlstat = en_S1110; break; } if ( sqlstat != en_00000 ) { PUSHSQLERR( pdbc->herr, sqlstat ); return SQL_ERROR; } if ( !server ) { PUSHSYSERR( pdbc->herr, en_S1000, NNODBC_ERRHEAD "server name or address not specified" ); return SQL_ERROR; } pdbc->hcndes = nntp_connect(server); if ( ! pdbc->hcndes ) { PUSHSQLERR( pdbc->herr, en_08001 ); PUSHSYSERR( pdbc->herr, errno, nntp_errmsg(0)); return SQL_ERROR; } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLError.c0100755000076400007640000000331107363332154016052 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLError( HENV henv, HDBC hdbc, HSTMT hstmt, UCHAR* szSqlStat, SDWORD* pNativeCode, UCHAR* szMsg, SWORD cbMsgMax, SWORD* pcbMsg ) { void* herr; char* ststr; if ( hstmt ) herr = nnodbc_getstmterrstack(hstmt); else if ( hdbc ) herr = nnodbc_getdbcerrstack(hdbc); else if ( henv ) herr = nnodbc_getenverrstack(henv); if ( nnodbc_errstkempty(herr) ) return SQL_NO_DATA_FOUND; ststr = nnodbc_getsqlstatstr(herr); if (!ststr) ststr = "S1000"; if ( szSqlStat ) STRCPY( szSqlStat, ststr ); if ( pNativeCode ) *pNativeCode = nnodbc_getnativcode(herr); if ( szMsg ) { char buf[128]; char* msg; msg = nnodbc_getsqlstatmsg(herr); if ( !msg ) msg = nnodbc_getnativemsg( herr ); if ( !msg ) msg = "(null)"; sprintf(buf, NNODBC_ERRHEAD "%s", msg); STRNCPY( szMsg, buf, cbMsgMax ); szMsg[cbMsgMax-1]=0; if ( pcbMsg ) *pcbMsg = STRLEN(szMsg); } else if (pcbMsg) *pcbMsg = 0; nnodbc_poperr(herr); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLExecDirect.c0100755000076400007640000000205507363332154017004 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLExecDirect( HSTMT hstmt, UCHAR* szSqlStr, SDWORD cbSqlStr ) { stmt_t* pstmt = hstmt; int sqlcode; UNSET_ERROR( pstmt->herr ); sqlcode = nnodbc_sqlprepare( hstmt, (char*)szSqlStr, cbSqlStr); if ( sqlcode != SQL_SUCCESS && sqlcode != SQL_SUCCESS_WITH_INFO ) return sqlcode; sqlcode |= sqlexecute(hstmt); return sqlcode; } unixODBC-2.2.14-p2/Drivers/nn/SQLExecute.c0100755000076400007640000000145607363332154016373 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLExecute ( HSTMT hstmt ) { stmt_t* pstmt = hstmt; UNSET_ERROR( pstmt->herr ); return sqlexecute(hstmt); } unixODBC-2.2.14-p2/Drivers/nn/SQLFetch.c0100755000076400007640000000602007363332154016012 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLFetch( HSTMT hstmt ) { stmt_t* pstmt = hstmt; column_t* pcol = pstmt->pcol; int ncol, i; long len, clen; char* ptr; int sqltype, sqlstat, dft_ctype, flag = 0, err; fptr_t cvt; char* ret; UNSET_ERROR( pstmt->herr ); ncol = nnsql_getcolnum(pstmt->yystmt); if ( !pstmt->refetch && (err = nnsql_fetch(pstmt->yystmt)) ) { int code; if ( err == 100 ) return SQL_NO_DATA_FOUND; code = nnsql_errcode(pstmt->yystmt); if ( code == -1 ) code = errno; PUSHSYSERR( pstmt->herr, code, nnsql_errmsg(pstmt->yystmt)); return SQL_ERROR; } if ( !pcol ) { int max; max = nnsql_max_column(); pcol = pstmt->pcol = (column_t*)MEM_ALLOC( sizeof(column_t)*(max+1) ); if ( ! pcol ) { PUSHSQLERR( pstmt->herr, en_S1001 ); return SQL_ERROR; } MEM_SET(pcol, 0, sizeof(column_t)*(max+1) ); return SQL_SUCCESS; } for (i=0;ioffset = 0; if ( ! pcol->userbuf ) continue; if ( nnsql_isnullcol(pstmt->yystmt, i) ) { if ( pcol->pdatalen ) *(pcol->pdatalen) = SQL_NULL_DATA; continue; } if ( pcol->pdatalen ) *(pcol->pdatalen ) = 0L; if ( nnsql_isstrcol(pstmt->yystmt, i) ) { ptr = nnsql_getstr(pstmt->yystmt, i); len = STRLEN(ptr) + 1; sqltype = SQL_CHAR; dft_ctype = SQL_C_CHAR; } else if ( nnsql_isnumcol(pstmt->yystmt, i) ) { ptr = (char*)nnsql_getnum(pstmt->yystmt, i); sqltype = SQL_INTEGER; dft_ctype = SQL_C_LONG; } else if ( nnsql_isdatecol(pstmt->yystmt, i) ) { ptr = (char*)nnsql_getdate(pstmt->yystmt, i); sqltype = SQL_DATE; dft_ctype = SQL_C_DATE; } else abort(); if ( pcol->ctype == SQL_C_DEFAULT ) pcol->ctype = dft_ctype; cvt = nnodbc_get_sql2c_cvt(sqltype, pcol->ctype); if ( ! cvt ) { pstmt->refetch = 1; PUSHSQLERR(pstmt->herr, en_07006); return SQL_ERROR; } ret = cvt( ptr, pcol->userbuf, pcol->userbufsize, &clen); if ( ret ) { pstmt->refetch = 1; if ( clen ) sqlstat = en_22003; else sqlstat = en_22005; PUSHSQLERR( pstmt->herr, sqlstat ); return SQL_ERROR; } if ( len && clen == len ) flag = 1; if ( len && pcol->pdatalen ) *(pcol->pdatalen) = clen; /* not 'len' but 'clen' */ } if ( flag ) { PUSHSQLERR( pstmt->herr, en_01004 ); return SQL_SUCCESS_WITH_INFO; } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLFreeConnect.c0100755000076400007640000000213507363332154017157 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLFreeConnect( HDBC hdbc) { dbc_t* tpdbc; dbc_t* pdbc = hdbc; env_t* penv = pdbc->henv; UNSET_ERROR( pdbc->herr ); for ( tpdbc = penv->hdbc; tpdbc; tpdbc = tpdbc->next ) { if ( pdbc == tpdbc ) { penv->hdbc = pdbc->next; break; } if ( pdbc == tpdbc->next ) { tpdbc->next = pdbc->next; break; } } CLEAR_ERROR( pdbc->herr ); MEM_FREE( pdbc ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLFreeEnv.c0100755000076400007640000000145007363332154016315 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLFreeEnv( HENV henv) { CLEAR_ERROR( ((env_t*)henv)->herr ); MEM_FREE( henv ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLFreeStmt.c0100755000076400007640000000143607363332154016520 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLFreeStmt( HSTMT hstmt, UWORD fOption ) { return nnodbc_sqlfreestmt(hstmt, fOption); } unixODBC-2.2.14-p2/Drivers/nn/SQLGetConnectOption.c0100755000076400007640000000240307363332154020204 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLGetConnectOption(HDBC hdbc, UWORD fOption, PTR pvParam) { dbc_t* pdbc = hdbc; UDWORD opt; UNSET_ERROR( pdbc->herr ); if ( fOption == SQL_ACCESS_MODE ) { switch (nntp_getaccmode(pdbc->hcndes)) { case ACCESS_MODE_SELECT: opt = SQL_MODE_READ_ONLY; break; case ACCESS_MODE_INSERT: case ACCESS_MODE_DELETE_TEST: case ACCESS_MODE_DELETE_ANY: opt = SQL_MODE_READ_WRITE; break; default: opt = SQL_MODE_DEFAULT; break; } if (pvParam) *((UDWORD*)pvParam) = opt; return SQL_SUCCESS; } PUSHSQLERR( pdbc->herr, en_S1C00 ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/nn/SQLGetData.c0100755000076400007640000000571607363332154016305 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLGetData( HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD* pcbValue ) { stmt_t* pstmt = hstmt; column_t* pcol; int ncol, flag = 0, clen = 0, len = 0; int sqltype, dft_ctype, sqlstat; char* ptr; char* ret; fptr_t cvt; UNSET_ERROR( pstmt->herr ); ncol = nnsql_getcolnum(pstmt->yystmt); if ( icol >= (UWORD)ncol ) { PUSHSQLERR( pstmt->herr, en_S1002 ); return SQL_ERROR; } pcol = pstmt->pcol + icol; if ( pcol->offset == -1 ) return SQL_NO_DATA_FOUND; if ( fCType == SQL_C_BOOKMARK ) fCType = SQL_C_ULONG; switch (fCType) { case SQL_C_DEFAULT: case SQL_C_CHAR: case SQL_C_TINYINT: case SQL_C_STINYINT: case SQL_C_UTINYINT: case SQL_C_SHORT: case SQL_C_SSHORT: case SQL_C_USHORT: case SQL_C_LONG: case SQL_C_SLONG: case SQL_C_ULONG: case SQL_C_DATE: break; default: PUSHSQLERR( pstmt->herr, en_S1C00 ); return SQL_ERROR; } if ( nnsql_isnullcol(pstmt->yystmt, icol) ) { if ( pcbValue ) *pcbValue = SQL_NULL_DATA; return SQL_SUCCESS; } if ( pcbValue ) *pcbValue = 0L; if ( nnsql_isstrcol(pstmt->yystmt, icol) ) { ptr = nnsql_getstr(pstmt->yystmt, icol) + pcol->offset; len = STRLEN(ptr) + 1; sqltype = SQL_CHAR; dft_ctype = SQL_C_CHAR; } else if ( nnsql_isnumcol(pstmt->yystmt, icol) ) { ptr = (char*)nnsql_getnum(pstmt->yystmt, icol); sqltype = SQL_INTEGER; dft_ctype = SQL_C_LONG; } else if ( nnsql_isdatecol(pstmt->yystmt, icol) ) { ptr = (char*)nnsql_getdate(pstmt->yystmt, icol); sqltype = SQL_DATE; dft_ctype = SQL_C_DATE; } else abort(); if ( fCType == SQL_C_DEFAULT ) fCType = dft_ctype; cvt = nnodbc_get_sql2c_cvt(sqltype, fCType); if ( ! cvt ) { PUSHSQLERR(pstmt->herr, en_07006); return SQL_ERROR; } ret = cvt(ptr, rgbValue, cbValueMax, &clen); if ( ret ) { if ( clen ) sqlstat = en_22003; else sqlstat = en_22005; PUSHSQLERR( pstmt->herr, sqlstat ); return SQL_ERROR; } if ( len && clen == cbValueMax ) { flag = 1; pcol->offset += (clen - 1); } else pcol->offset = -1; if ( len && pcbValue ) *pcbValue = len; /* not 'clen' but 'len' */ if ( flag ) { PUSHSQLERR(pstmt->herr, en_01004 ); return SQL_SUCCESS_WITH_INFO; } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLNumParams.c0100755000076400007640000000160607363332154016671 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLNumParams( HSTMT hstmt, SWORD *pcpar ) { stmt_t* pstmt = hstmt; UNSET_ERROR( pstmt->herr ); if ( pcpar ) *pcpar = nnsql_getparnum( ((stmt_t*)hstmt)->yystmt ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLNumResultCols.c0100755000076400007640000000167607363332154017554 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLNumResultCols( HSTMT hstmt, SWORD* pccol ) { stmt_t* pstmt = hstmt; UNSET_ERROR( pstmt->herr ); if ( pccol ) { int ncol; ncol = nnsql_getcolnum(((stmt_t*)hstmt)->yystmt); *pccol = (ncol)? ncol-1:0; } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLParamData.c0100755000076400007640000000374407363332154016625 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLParamData( HSTMT hstmt, PTR* prgbValue) { stmt_t* pstmt = hstmt; int ipar; param_t* ppar; fptr_t cvt; char* data; date_t dt; UNSET_ERROR( pstmt->herr ); ipar = pstmt->putipar; ppar = pstmt->ppar + ipar - 1; if ( ipar ) { ppar->need = 0; pstmt->ndelay --; if ( ppar->ctype == SQL_C_CHAR ) { if ( ! ppar->putdtbuf && ! ppar->putdtlen ) data = 0; else { cvt = ppar->cvt; data= cvt(ppar->putdtbuf, ppar->putdtlen, &dt); } MEM_FREE( ppar->putdtbuf ); ppar->putdtbuf = 0; ppar->putdtlen = 0; if ( data == (char*)(-1) ) { PUSHSQLERR( pstmt->herr, en_S1000 ); return SQL_ERROR; } sqlputdata( pstmt, ipar, data ); } } if ( pstmt->ndelay ) { for (ipar++, ppar++;;) { if ( ppar->need ) { *prgbValue = (PTR)(ppar->userbuf); pstmt->putipar = ipar; return SQL_NEED_DATA; } } } if ( nnsql_execute(pstmt->yystmt) ) { int code; code = nnsql_errcode( pstmt->yystmt ); if ( code == -1 ) code = errno; PUSHSYSERR( pstmt->herr, code, nnsql_errmsg(pstmt->yystmt)); return SQL_ERROR; } if ( ! nnsql_getcolnum(pstmt->yystmt) && nnsql_getrowcount(pstmt->yystmt) > 1 ) { PUSHSQLERR( pstmt->herr, en_01S04); return SQL_SUCCESS_WITH_INFO; } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLPrepare.c0100755000076400007640000000161007363332154016357 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLPrepare( HSTMT hstmt, UCHAR* szSqlStr, SDWORD cbSqlStr ) { stmt_t* pstmt = hstmt; UNSET_ERROR( pstmt->herr ); return nnodbc_sqlprepare(hstmt, (char*)szSqlStr, cbSqlStr); } unixODBC-2.2.14-p2/Drivers/nn/SQLPutData.c0100755000076400007640000000344607363332154016334 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLPutData( HSTMT hstmt, PTR rgbValue, SDWORD cbValue) { stmt_t* pstmt = hstmt; param_t* ppar; char* ptr; fptr_t cvt; char* data; date_t dt; UNSET_ERROR( pstmt->herr ); ppar = pstmt->ppar + pstmt->putipar - 1; if ( ppar->ctype == SQL_C_CHAR ) { if ( cbValue == SQL_NULL_DATA ) return SQL_SUCCESS; if ( cbValue == SQL_NTS ) cbValue = STRLEN(rgbValue); if ( ! ppar->putdtbuf ) { ppar->putdtbuf = (char*)MEM_ALLOC(cbValue + 1); } else if ( cbValue ) { ppar->putdtbuf = (char*)MEM_REALLOC( ppar->putdtbuf, ppar->putdtlen + cbValue + 1); } if ( ! ppar->putdtbuf ) { PUSHSQLERR(pstmt->herr, en_S1001); return SQL_ERROR; } ptr = ppar->putdtbuf + ppar->putdtlen; STRNCPY(ptr, rgbValue, cbValue); ptr[cbValue] = 0; ppar->putdtlen += cbValue; return SQL_SUCCESS; } cvt = ppar->cvt; data= cvt(ppar->putdtbuf, ppar->putdtlen, &dt); if ( data == (char*)(-1) ) { PUSHSQLERR( pstmt->herr, en_S1000 ); return SQL_ERROR; } sqlputdata( pstmt, pstmt->putipar, data ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLRowCount.c0100755000076400007640000000160707363332154016547 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLRowCount( HSTMT hstmt, SDWORD* pcrow ) { stmt_t* pstmt = hstmt; UNSET_ERROR( pstmt->herr ); if ( pcrow ) *pcrow = nnsql_getrowcount( ((stmt_t*)hstmt)->yystmt ); return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/SQLSetConnectOption.c0100755000076400007640000000232607363332154020224 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLSetConnectOption(HDBC hdbc, UWORD fOption, UDWORD vParam) { dbc_t* pdbc = hdbc; UNSET_ERROR( pdbc->herr ); if ( fOption == SQL_ACCESS_MODE ) { switch (vParam) { case SQL_MODE_READ_ONLY: nntp_setaccmode( pdbc->hcndes, ACCESS_MODE_SELECT ); break; case SQL_MODE_READ_WRITE: nntp_setaccmode( pdbc->hcndes, ACCESS_MODE_DELETE_TEST ); break; default: PUSHSQLERR(pdbc->herr, en_S1009 ); return SQL_ERROR; } return SQL_SUCCESS; } PUSHSQLERR(pdbc->herr, en_S1C00 ); return SQL_ERROR; } unixODBC-2.2.14-p2/Drivers/nn/SQLSetParam.c0100755000076400007640000000223007363332154016474 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" RETCODE SQL_API SQLSetParam ( HSTMT hstmt, UWORD ipar, SWORD fCType, SWORD fSqlType, UDWORD cbColDef, SWORD ibScale, PTR rgbValue, SDWORD FAR *pcbValue) { return SQLBindParameter(hstmt, ipar, (SWORD)SQL_PARAM_INPUT_OUTPUT, fCType, fSqlType, cbColDef, ibScale, rgbValue, SQL_SETPARAM_VALUE_MAX, pcbValue ); } unixODBC-2.2.14-p2/Drivers/nn/misc.c0100644000076400007640000000210707363332154015333 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include int upper_strneq( char* s1, char* s2, int n ) { int i; char c1, c2; for(i=0;i= 'a' && c1 <= 'z' ) c1 += ('A' - 'a'); else if( c1 == '\n' ) c1 = '\0'; if( c2 >= 'a' && c2 <= 'z' ) c2 += ('A' - 'a'); else if( c2 == '\n' ) c2 = '\0'; if( (c1 - c2) || !c1 || !c2 ) break; } return (int)!(c1 - c2); } int nnodbc_conndialog() { return -1; } unixODBC-2.2.14-p2/Drivers/nn/connect.c0100644000076400007640000001362107363332154016034 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" void* nnodbc_getenverrstack(void* henv) { return ((env_t*)henv)->herr; } void* nnodbc_getdbcerrstack(void* hdbc) { return ((dbc_t*)hdbc)->herr; } void nnodbc_pushdbcerr( void* hdbc, int code, char* msg ) { PUSHSYSERR( ((dbc_t*)hdbc)->herr, code, msg ); } void* nnodbc_getnntpcndes( void* hdbc ) { return ((dbc_t*)hdbc)->hcndes; } int nnodbc_attach_stmt(void* hdbc, void* hstmt) { dbc_t* pdbc = hdbc; gstmt_t* pstmt; pstmt = (gstmt_t*)MEM_ALLOC(sizeof(gstmt_t)); if( ! pstmt ) { PUSHSQLERR( pdbc->herr, en_S1001 ); return SQL_ERROR; } pstmt->next = pdbc->stmt; pdbc->stmt = pstmt; pstmt->hstmt= hstmt; pstmt->hdbc = pdbc; return SQL_SUCCESS; } int nnodbc_detach_stmt(void* hdbc, void* hstmt) { dbc_t* pdbc = hdbc; gstmt_t* pstmt; gstmt_t* ptr; for(pstmt=pdbc->stmt;pstmt;pstmt = pstmt->next) { if(pstmt->hstmt == hstmt) { pdbc->stmt = pstmt->next; MEM_FREE(pstmt); return 0; } if(pstmt->next->hstmt == hstmt ) { ptr = pstmt->next; pstmt->next = ptr->next; MEM_FREE(ptr); return 0; } } return -1; } char* /* return new position in input str */ readtoken( char* istr, /* old position in input buf */ char* obuf ) /* token string ( if "\0", then finished ) */ { for(; *istr && *istr != '\n' ; istr ++ ) { char c, nx; c = *(istr); if( c == ' ' || c == '\t' ) { continue; } nx = *(istr + 1); *obuf = c; obuf ++; if( c == ';' || c == '=' ) { istr ++; break; } if( nx == ' ' || nx == '\t' || nx == ';' || nx == '=' ) { istr ++; break; } } *obuf = '\0'; return istr; } #if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2) # include # define UNIX_PWD #endif char* getinitfile(char* buf, int size) { int i, j; char* ptr; j = STRLEN("/odbc.ini") + 1; if( size < j ) { return NULL; } #if !defined(UNIX_PWD) i = GetWindowsDirectory((LPSTR)buf, size ); if( i == 0 || i > size - j ) { return NULL; } sprintf( buf + i, "/odbc.ini"); return buf; #else ptr = (char*)getpwuid(getuid()); if( ptr == NULL ) { return NULL; } ptr = ((struct passwd*)ptr)->pw_dir; if( ptr == NULL || *ptr == '\0' ) { ptr = "/home"; } if( size < STRLEN(ptr) + j ) { return NULL; } sprintf( buf, "%s%s", ptr, "/.odbc.ini"); /* i.e. searching ~/.odbc.ini */ #endif return buf; } char* getkeyvalbydsn( char* dsn, int dsnlen, char* keywd, char* value, int size ) /* read odbc init file to resolve the value of specified * key from named or defaulted dsn section */ { char buf[1024]; char dsntk[SQL_MAX_DSN_LENGTH + 3] = { '[', '\0' }; char token[1024]; /* large enough */ FILE* file; char pathbuf[1024]; char* path; #define DSN_NOMATCH 0 #define DSN_NAMED 1 #define DSN_DEFAULT 2 int dsnid = DSN_NOMATCH; int defaultdsn = DSN_NOMATCH; if( dsn == NULL || *dsn == 0 ) { dsn = "default"; dsnlen = STRLEN(dsn); } if( dsnlen == SQL_NTS ) { dsnlen = STRLEN(dsn); } if( dsnlen <= 0 || keywd == NULL || buf == 0 || size <= 0 ) { return NULL; } if( dsnlen > sizeof(dsntk) - 2 ) { return NULL; } STRNCAT( dsntk, dsn, dsnlen ); STRCAT( dsntk, "]" ); value[0] = 0; dsnlen = dsnlen + 2; path = getinitfile(pathbuf, sizeof(pathbuf)); if( path == NULL ) { return NULL; } file = (FILE*)fopen(path, "r"); if( file == NULL ) { return NULL; } for(;;) { char* str; str = fgets(buf, sizeof(buf), file); if( str == NULL ) { break; } if( *str == '[' ) { if( upper_strneq(str, "[default]", STRLEN("[default]")) ) { /* we only read first dsn default dsn * section (as well as named dsn). */ if( defaultdsn == DSN_NOMATCH ) { dsnid = DSN_DEFAULT; defaultdsn = DSN_DEFAULT; } else { dsnid = DSN_NOMATCH; } continue; } else if( upper_strneq( str, dsntk, dsnlen ) ) { dsnid = DSN_NAMED; } else { dsnid = DSN_NOMATCH; } continue; } else if( dsnid == DSN_NOMATCH ) { continue; } str = readtoken(str, token); if( upper_strneq( keywd, token, STRLEN(keywd)) ) { str = readtoken(str, token); if( ! STREQ( token, "=") ) /* something other than = */ { continue; } str = readtoken(str, token); if( STRLEN(token) > size - 1) { break; } STRNCPY(value, token, size); /* copy the value(i.e. next token) to buf */ if( dsnid != DSN_DEFAULT ) { break; } } } fclose(file); return (*value)? value:NULL; } char* getkeyvalinstr( char* cnstr, int cnlen, char* keywd, char* value, int size ) { char token[1024] = { '\0' }; int flag = 0; if( cnstr == NULL || value == NULL || keywd == NULL || size < 1 ) { return NULL; } if( cnlen == SQL_NTS ) { cnlen = STRLEN (cnstr); } if( cnlen <= 0 ) { return NULL; } for(;;) { cnstr = readtoken(cnstr, token); if( *token == '\0' ) { break; } if( STREQ( token, ";" ) ) { flag = 0; continue; } switch(flag) { case 0: if( upper_strneq(token, keywd, strlen(keywd)) ) { flag = 1; } break; case 1: if( STREQ( token, "=" ) ) { flag = 2; } break; case 2: if( size < strlen(token) + 1 ) { return NULL; } STRNCPY( value, token, size ); return value; default: break; } } return NULL; } unixODBC-2.2.14-p2/Drivers/nn/convert.c0100644000076400007640000001662207363332154016067 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" /* It looks silly to use a MEM_ALLOC() in function char2str(), etc, * for converting C data type into STRING SQL data type. Esspecially * for char2str(), simply return the C data buffer address seems can * do the same thing. However, all these 'to STRING' functions are * assumed to be invoked in SQLExecute(), etc. According to ODBC, after * that, user buffers are detached from the statement been executed. * For example, for a statement: * * "SELECT FROM comp.databases WHERE subject LIKE ?" * * You may bind a SQL_C_CHAR data to it as the pattern for the * LIKE condition. After SQLExecute(), the user buffer should be * detached from the statement. You can change the data in that * buffer without worry about the SQLFetch() results will be * affected. If we don't use a separate buffer to keep the user * data at SQLExecute() time but only keep a pointer of user buffer, * then when user changes data in user buffer after SQLExecute() * but before or during SQLFetch()s, the SQLFetch()'s result will * be affected as a result of the change of LIKE condition. * * These allocated memory will be released by SQL layer. */ typedef DATE_STRUCT odbc_date_t; char* char2str( char* buf, int size ) { char* ptr; int len; if( size < 0 ) size = STRLEN(buf); ptr = (char*)MEM_ALLOC(size + 1); if( ! ptr ) return (char*)(-1); STRNCPY(ptr, buf, size+1); ptr[size] = 0; return ptr; } char* char2num( char* buf, int size) { char tbuf[16]; if( size < 0 ) size = strlen(buf); if( size>15 ) size = 15; STRNCPY(tbuf, buf, size); tbuf[15] = 0; return (char*)atol(tbuf); } char* char2date( char* buf, int size, date_t* dt) { char tbuf[16]; if( size < 0 ) size = strlen(buf); if( size > 15 ) size = 15; STRNCPY( tbuf, buf, size); tbuf[15] = 0; if( nnsql_odbcdatestr2date(tbuf, dt) ) return (char*)(-1); return (char*)dt; } char* date2str( odbc_date_t* dt ) { char* ptr; if( dt->year < 0 || dt->year > 9999 || dt->month< 1 || dt->month> 12 || dt->day < 1 || dt->day > 31 || !( ptr = (char*)MEM_ALLOC(12)) ) return (char*)(-1); sprintf(ptr, "%04d-%02d-%02d", dt->year, dt->month, dt->day); return ptr; } char* odate2date( odbc_date_t* odt, int size, date_t* dt ) { if( dt->year < 0 || dt->year > 9999 || dt->month< 1 || dt->month> 12 || dt->day < 1 || dt->day > 31 ) return (char*)(-1); dt->year = odt->year; dt->month= odt->month; dt->day = odt->day; return (char*)dt; } char* tint2num( char* d ) { long num = *d; return (char*)num; } char* short2num( short* d ) { long num = *d; return (char*)num; } char* long2num( long* d ) { return (char*)*d; } char* tint2str( char* d ) { int c = *d; char* ptr; if( ! (ptr = MEM_ALLOC(5)) ) return (char*)(-1); sprintf(ptr, "%d", c); return ptr; } char* short2str( short* d ) { int c = *d; char* ptr; if( ! (ptr = MEM_ALLOC(32)) ) return (char*)(-1); sprintf(ptr, "%d", c); return ptr; } char* long2str( long* d ) { long l = *d; char* ptr; if( ! (ptr = MEM_ALLOC(64)) ) return (char*)(-1); sprintf(ptr, "%ld", l); return ptr; } static fptr_t c2sql_cvt_tab[5][3] = { char2str, char2num, char2date, tint2str, tint2num, 0, short2str, short2num,0, long2str, long2num, 0, date2str, 0, odate2date }; static struct { int ctype; int idx; } ctype_idx_tab[] = { SQL_C_CHAR, 0, SQL_C_TINYINT, 1, SQL_C_STINYINT, 1, SQL_C_UTINYINT, 1, SQL_C_SHORT, 2, SQL_C_SSHORT, 2, SQL_C_USHORT, 2, SQL_C_LONG, 3, SQL_C_SLONG, 3, SQL_C_ULONG, 3, SQL_C_DATE, 4 }; static struct { int sqltype; int idx; } sqltype_idx_tab[] = { SQL_CHAR, 0, SQL_VARCHAR, 0, SQL_LONGVARCHAR,0, SQL_TINYINT, 1, SQL_SMALLINT, 1, SQL_INTEGER, 1, SQL_DATE, 2 }; fptr_t nnodbc_get_c2sql_cvt(int ctype, int sqltype) { int i, cidx = -1, sqlidx = -1; for(i=0; i< sizeof(ctype_idx_tab); i++ ) { if( ctype_idx_tab[i].ctype == ctype ) { cidx = ctype_idx_tab[i].idx; break; } } if( cidx == -1 ) return 0; for(i=0; i< sizeof(ctype_idx_tab); i++ ) { if( sqltype_idx_tab[i].sqltype == sqltype ) { sqlidx = sqltype_idx_tab[i].idx; break; } } if( sqlidx == -1 ) return 0; return c2sql_cvt_tab[cidx][sqlidx]; } static char* str2char( char* ptr, char* buf, long size, long* psize) { long len; len = STRLEN(ptr) + 1; if( len > size ) len = size; if( len ) { STRNCPY( buf, ptr, len ); buf[len - 1] = 0; } *psize = len; return 0; } static char* str2tint( char* ptr, char* buf, long size, long* psize ) { unsigned long a, b = (unsigned char)(-1); a = (unsigned long)atol(ptr); if( a > b ) { *psize = a; return (char*)(-1); } *buf = (char)a; return 0; } static char* str2short( char* ptr, short* buf, long size, long* psize) { unsigned long a, b = (unsigned short)(-1); a = atoi(ptr); if( a > b ) { *psize = a; return (char*)(-1); } *buf = (short)a; return 0; } static char* str2long( char* ptr, long* buf) { *buf = atol(ptr); return 0; } static char* str2date( char* ptr, odbc_date_t* buf ) { date_t dt; if( nnsql_nndatestr2date(ptr, &dt) ) return (char*)(-1); buf->year = dt.year; buf->month= dt.month; buf->day = dt.day; return 0; } static char* num2char( long x, char* buf, long size, long* psize) { char tbuf[48]; sprintf(tbuf, "%ld", x); *psize = STRLEN(buf) + 1; if(*psize > size ) return (char*)(-1); STRCPY(buf, tbuf); return 0; } static char* num2tint(long x, char* buf, long size, long* psize) { unsigned long a = x, b = (unsigned char)(-1); if( a > b ) { *psize = x; return (char*)(-1); } *buf = (char)x; return 0; } static char* num2short(long x, short* buf, long size, long* psize) { unsigned long a = x, b = (unsigned short)(-1); if( a > b) { *psize = x; return (char*)(-1); } *buf = (short)x; return 0; } static char* num2long(long x, long* buf ) { *buf = x; return 0; } static char* date2char(date_t* dt, char* buf, long size, long* psize) { *psize = 11; if(size < 11) return (char*)(-1); sprintf(buf, "%04d-%02d-%02d", dt->year, dt->month, dt->day); return 0; } static char* date2odate(date_t* dt, odbc_date_t* buf) { buf->year = dt->year; buf->month= dt->month; buf->day = dt->day; return 0; } static fptr_t sql2c_cvt_tab[3][5] = { str2char, str2tint, str2short, str2long, str2date, num2char, num2tint, num2short, num2long, 0, date2char, 0, 0, 0, date2odate }; fptr_t nnodbc_get_sql2c_cvt(int sqltype, int ctype) { int i, cidx = -1, sqlidx = -1; for(i=0; i< sizeof(ctype_idx_tab); i++ ) { if( ctype_idx_tab[i].ctype == ctype ) { cidx = ctype_idx_tab[i].idx; break; } } if( cidx == -1 ) return 0; for(i=0; i< sizeof(ctype_idx_tab); i++ ) { if( sqltype_idx_tab[i].sqltype == sqltype ) { sqlidx = sqltype_idx_tab[i].idx; break; } } if( sqlidx == -1 ) return 0; return sql2c_cvt_tab[sqlidx][cidx]; } unixODBC-2.2.14-p2/Drivers/nn/execute.c0100644000076400007640000000621607363332154016047 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" int sqlputdata ( stmt_t* pstmt, int ipar, char* data ) { param_t* ppar; ppar = pstmt->ppar + ipar - 1; switch( ppar->sqltype ) { case SQL_CHAR: case SQL_VARCHAR: case SQL_LONGVARCHAR: if( ! data ) nnsql_putnull(pstmt->yystmt, ipar ); else nnsql_putstr(pstmt->yystmt, ipar, (char*)data); break; case SQL_TINYINT: case SQL_SMALLINT: case SQL_INTEGER: nnsql_putnum(pstmt->yystmt, ipar, (long)data); break; case SQL_DATE: if(!data ) nnsql_putnull(pstmt->yystmt, ipar ); else nnsql_putdate(pstmt->yystmt, ipar, (date_t*)data); break; default: return -1; } return 0; } int sqlexecute ( stmt_t* pstmt) { param_t* ppar = pstmt->ppar; int i, npar, flag = 0; long csize; pstmt->refetch = 0; pstmt->ndelay = 0; npar = nnsql_getparnum(pstmt->yystmt); for( i = 0; ppar && i< npar; i++ ) /* general check */ { ppar = pstmt->ppar + i; if( ! ppar->bind ) { PUSHSQLERR( pstmt->herr, en_07001 ); return SQL_ERROR; } if( ( ! ppar->userbuf && ppar->pdatalen ) || ( ppar->userbuf && ppar->pdatalen && *ppar->pdatalen < 0 && *ppar->pdatalen != SQL_NTS ) ) { if( *ppar->pdatalen || *ppar->pdatalen == (long)SQL_NULL_DATA || *ppar->pdatalen == (long)SQL_DATA_AT_EXEC || *ppar->pdatalen <= (long)SQL_LEN_DATA_AT_EXEC(0) ) continue; PUSHSQLERR( pstmt->herr, en_S1090 ); return SQL_ERROR; } } for( i = 0; ppar && i< npar; i++ ) { char* (*cvt)(); date_t date; char* data; ppar = pstmt->ppar + i; if( ! ppar->pdatalen ) csize = 0; else csize = *(ppar->pdatalen); if( csize == (long)SQL_NULL_DATA ) { nnsql_putnull(pstmt->yystmt, i+1); continue; } if( csize == (long)SQL_DATA_AT_EXEC || csize <= (long)SQL_LEN_DATA_AT_EXEC(0) ) /* delated parameter */ { pstmt->ndelay ++; ppar->need = 1; continue; } cvt = ppar->cvt; data= cvt(ppar->userbuf, csize, &date ); if( data == (char*)(-1) ) { PUSHSQLERR(pstmt->herr, en_S1000 ); return SQL_ERROR; } sqlputdata(pstmt, i+1, data); } if( pstmt->ndelay ) return SQL_NEED_DATA; if( nnsql_execute(pstmt->yystmt) ) { int code; code = nnsql_errcode( pstmt->yystmt ); if( code == -1 ) code = errno; PUSHSYSERR( pstmt->herr, code, nnsql_errmsg(pstmt->yystmt)); return SQL_ERROR; } if( ! nnsql_getcolnum(pstmt->yystmt) && nnsql_getrowcount(pstmt->yystmt) > 1 ) { PUSHSQLERR( pstmt->herr, en_01S04); return SQL_SUCCESS_WITH_INFO; } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/herr.c0100644000076400007640000000572507363332154015351 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include #include #include "herr.ci" typedef struct { int code; /* sqlstat(if msg == null) or native code */ char* msg; } err_t; # define ERRSTACK_DEPTH 3 typedef struct { err_t stack[ERRSTACK_DEPTH]; int top; /* top free slot */ } err_stack_t; void* nnodbc_pusherr(void* stack, int code, char* msg) { err_stack_t* err_stack = stack; if( ! err_stack ) { err_stack = (err_stack_t*)MEM_ALLOC( sizeof(err_stack_t)); if( ! err_stack ) return 0; err_stack->top = 0; } if( err_stack->top < ERRSTACK_DEPTH - 1) err_stack->top ++; (err_stack->stack)[err_stack->top - 1].code = code; (err_stack->stack)[err_stack->top - 1].msg = msg; return err_stack; } int nnodbc_errstkempty(void* stack) { err_stack_t* err_stack = stack; if( ! err_stack || ! err_stack->top ) return 1; return 0; } void nnodbc_errstkunset(void* stack) { if( stack ) ((err_stack_t*)stack)->top = 0; } void nnodbc_poperr(void* stack ) { err_stack_t* err_stack = stack; if( ! nnodbc_errstkempty( err_stack ) ) err_stack->top --; return; } static int is_sqlerr(err_t* err) { return !(err->msg); } int nnodbc_getsqlstatcode(void* stack) { err_stack_t* err_stack = stack; err_t* err; err = err_stack->stack + err_stack->top - 1; if( ! is_sqlerr(err) ) return 0; return err->code; } char* nnodbc_getsqlstatstr(void* stack) { err_stack_t* err_stack = stack; err_t* err; int i; err = err_stack->stack + err_stack->top - 1; if( ! is_sqlerr(err) ) return 0; for(i=0;sqlerrmsg_tab[i].stat;i++) { if( sqlerrmsg_tab[i].code == err->code ) return sqlerrmsg_tab[i].stat; } return 0; } char* nnodbc_getsqlstatmsg(void* stack) { err_stack_t* err_stack = stack; err_t* err; int i; err = err_stack->stack + err_stack->top - 1; if( ! is_sqlerr(err) ) return 0; for(i=0;sqlerrmsg_tab[i].stat;i++) { if( sqlerrmsg_tab[i].code == err->code ) return sqlerrmsg_tab[i].msg; } return 0; } int nnodbc_getnativcode(void* stack) { err_stack_t* err_stack = stack; err_t* err; err = err_stack->stack + err_stack->top - 1; if( is_sqlerr(err) ) return 0; return err->code; } char* nnodbc_getnativemsg(void* stack) { err_stack_t* err_stack = stack; err_t* err; err = err_stack->stack + err_stack->top - 1; return err->msg; } void* nnodbc_clearerr(void* stack) { MEM_FREE(stack); return 0; } unixODBC-2.2.14-p2/Drivers/nn/prepare.c0100644000076400007640000000376407363332154016050 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" void* nnodbc_getstmterrstack(void* hstmt) { return ((stmt_t*)hstmt)->herr; } int nnodbc_sqlfreestmt( void* hstmt, int fOption) { stmt_t* pstmt = hstmt; int i, max; switch( fOption ) { case SQL_DROP: nnodbc_detach_stmt(pstmt->hdbc, hstmt); /* free all resources */ MEM_FREE(pstmt->pcol); MEM_FREE(pstmt->ppar); CLEAR_ERROR(pstmt->herr); MEM_FREE(hstmt); break; case SQL_CLOSE: nnsql_close_cursor(hstmt); break; case SQL_UNBIND: max = nnsql_max_column(); for(i=0; pstmt->pcol && i < max + 1; i++ ) (pstmt->pcol)[i].userbuf = 0; break; case SQL_RESET_PARAMS: max = nnsql_max_param(); for(i=1;pstmt->ppar && i < max + 1; i++ ) { nnsql_yyunbindpar( pstmt->yystmt, i); (pstmt->ppar)[i-1].bind = 0; } break; default: /* this error will be caught by driver manager */ return SQL_ERROR; } return SQL_SUCCESS; } int nnodbc_sqlprepare ( void* hstmt, char* szSqlStr, int cbSqlStr ) { stmt_t* pstmt = hstmt; int len; len = (cbSqlStr == SQL_NTS )? STRLEN(szSqlStr):cbSqlStr; if ( nnsql_prepare(pstmt->yystmt, szSqlStr, len ) ) { int code; code = nnsql_errcode(pstmt->yystmt); if ( code == -1 ) code = errno; PUSHSYSERR( pstmt->herr, code, nnsql_errmsg(pstmt->yystmt) ); return SQL_ERROR; } return SQL_SUCCESS; } unixODBC-2.2.14-p2/Drivers/nn/yyparse.c0100644000076400007640000015534607363332155016113 0ustar nicknick /* A Bison parser, made from yyparse.y with Bison version GNU Bison version 1.22 */ #define YYBISON 1 /* Identify Bison output. */ #define kwd_select 258 #define kwd_all 259 #define kwd_news 260 #define kwd_xnews 261 #define kwd_distinct 262 #define kwd_count 263 #define kwd_from 264 #define kwd_where 265 #define kwd_in 266 #define kwd_between 267 #define kwd_like 268 #define kwd_escape 269 #define kwd_group 270 #define kwd_by 271 #define kwd_having 272 #define kwd_order 273 #define kwd_for 274 #define kwd_insert 275 #define kwd_into 276 #define kwd_values 277 #define kwd_delete 278 #define kwd_update 279 #define kwd_create 280 #define kwd_alter 281 #define kwd_drop 282 #define kwd_table 283 #define kwd_column 284 #define kwd_view 285 #define kwd_index 286 #define kwd_of 287 #define kwd_current 288 #define kwd_grant 289 #define kwd_revoke 290 #define kwd_is 291 #define kwd_null 292 #define kwd_call 293 #define kwd_uncase 294 #define kwd_case 295 #define kwd_fn 296 #define kwd_d 297 #define QSTRING 298 #define NUM 299 #define NAME 300 #define PARAM 301 #define kwd_or 302 #define kwd_and 303 #define kwd_not 304 #define CMPOP 305 #line 1 "yyparse.y" /** source of nntp odbc sql parser -- yyparse.y Copyright (C) 1995, 1996 by Ke Jin This program is free software; you can 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. **/ static char sccsid[] = "@(#)SQL parser for NNSQL(NetNews SQL), Copyright(c) 1995, 1996 by Ke Jin"; #include #include #include #include #include #include #include # ifdef YYLSP_NEEDED # undef YYLSP_NEEDED # endif #ifdef YYBISON # define yylex(pyylval) nnsql_yylex(pyylval, pyyenv) #else # define yylex() nnsql_yylex(&yylval, pyyenv) #endif #define yyparse() nnsql_yyparse (yyenv_t* pyyenv) #define yyerror(msg) nnsql_yyerror (pyyenv, msg) #define SETYYERROR(env, code) { env->pstmt->errcode = code; \ env->pstmt->errpos = env->errpos;} typedef struct { char* schema_tab_name; char* column_name; } column_name_t; static void unpack_col_name(char* schema_tab_column_name, column_name_t* ptr); static void* add_node(yystmt_t* pstmt, node_t* node); static void srchtree_reloc(node_t* srchtree, int num); static int add_attr(yystmt_t* pstmt, int idx, int wstat); static void* add_all_attr(yystmt_t* pstmt); static void* add_news_attr(yystmt_t* pstmt); static void* add_xnews_attr(yystmt_t* pstmt); static void* add_column(yystmt_t* pstmt, yycol_t* pcol); static void nnsql_yyerror(yyenv_t* pyyenv, char* msg); static int table_check(yystmt_t* pstmt); static int column_name(yystmt_t* pstmt, char* name); static void* attr_name(yystmt_t* pstmt, char* name); static int add_ins_head(yystmt_t* pstmt, char* head, int idx); static int add_ins_value(yystmt_t* pstmt, node_t node, int idx); static char* get_unpacked_attrname(yystmt_t* pstmt, char* name); #define ERROR_PTR ((void*)(-1L)) #define EMPTY_PTR ERROR_PTR #line 74 "yyparse.y" typedef union { char* qstring; char* name; long number; int ipar; /* parameter index */ int cmpop; /* for comparsion operators */ char esc; int flag; /* for not_opt and case_opt */ int idx; void* offset; /* actually, it is used as a 'int' offset */ node_t node; /* a node haven't add to tree */ } YYSTYPE; #ifndef YYLTYPE typedef struct yyltype { int timestamp; int first_line; int first_column; int last_line; int last_column; char *text; } yyltype; #define YYLTYPE yyltype #endif #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 219 #define YYFLAG -32768 #define YYNTBASE 59 #define YYTRANSLATE(x) ((unsigned)(x) <= 305 ? yytranslate[x] : 92) static const char 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, 53, 54, 52, 2, 57, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 51, 2, 58, 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, 55, 2, 56, 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, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 3, 4, 11, 13, 15, 17, 19, 25, 26, 31, 32, 34, 36, 37, 39, 41, 43, 45, 47, 51, 58, 60, 64, 71, 73, 77, 80, 82, 87, 95, 97, 99, 104, 106, 107, 110, 114, 118, 122, 126, 128, 132, 134, 139, 147, 149, 150, 153, 157, 160, 164, 168, 175, 182, 189, 194, 198, 199, 201, 203, 206, 208, 213, 221, 223, 227, 229, 231, 233, 235, 240, 241, 244, 249, 251, 253, 254, 256, 257, 261, 262, 265, 266, 270, 281, 283, 287, 289, 294, 302, 304, 308, 310, 312, 314, 319, 327, 329, 331, 333, 335, 338, 343, 345 }; static const short yyrhs[] = { 60, 51, 0, 0, 3, 63, 64, 9, 70, 61, 0, 84, 0, 89, 0, 90, 0, 91, 0, 72, 81, 82, 83, 62, 0, 0, 19, 24, 32, 67, 0, 0, 4, 0, 7, 0, 0, 52, 0, 65, 0, 66, 0, 67, 0, 5, 0, 5, 53, 54, 0, 55, 41, 5, 53, 54, 56, 0, 6, 0, 6, 53, 54, 0, 55, 41, 6, 53, 54, 56, 0, 68, 0, 67, 57, 68, 0, 8, 69, 0, 45, 0, 29, 53, 43, 54, 0, 55, 41, 29, 53, 43, 54, 56, 0, 43, 0, 44, 0, 55, 42, 43, 56, 0, 46, 0, 0, 53, 54, 0, 53, 52, 54, 0, 53, 45, 54, 0, 53, 43, 54, 0, 53, 44, 54, 0, 71, 0, 70, 57, 71, 0, 45, 0, 28, 53, 43, 54, 0, 55, 41, 28, 53, 43, 54, 56, 0, 46, 0, 0, 10, 73, 0, 53, 73, 54, 0, 49, 73, 0, 73, 47, 73, 0, 73, 48, 73, 0, 75, 80, 11, 53, 76, 54, 0, 75, 80, 12, 77, 48, 77, 0, 75, 80, 74, 13, 79, 78, 0, 75, 36, 80, 37, 0, 75, 50, 77, 0, 0, 40, 0, 39, 0, 4, 40, 0, 45, 0, 29, 53, 43, 54, 0, 55, 41, 29, 53, 43, 54, 56, 0, 77, 0, 76, 57, 77, 0, 37, 0, 46, 0, 43, 0, 44, 0, 55, 42, 43, 56, 0, 0, 14, 43, 0, 55, 14, 43, 56, 0, 46, 0, 43, 0, 0, 49, 0, 0, 15, 16, 67, 0, 0, 17, 73, 0, 0, 18, 16, 67, 0, 20, 21, 71, 53, 85, 54, 22, 53, 87, 54, 0, 86, 0, 85, 57, 86, 0, 45, 0, 29, 53, 43, 54, 0, 55, 41, 29, 53, 43, 54, 56, 0, 88, 0, 87, 57, 88, 0, 37, 0, 43, 0, 46, 0, 23, 9, 71, 72, 0, 23, 9, 71, 10, 33, 32, 45, 0, 25, 0, 26, 0, 27, 0, 24, 0, 55, 38, 0, 55, 46, 58, 38, 0, 34, 0, 35, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 162, 166, 167, 177, 181, 185, 186, 194, 198, 199, 207, 208, 209, 217, 218, 219, 220, 221, 225, 226, 227, 231, 232, 233, 237, 238, 242, 253, 255, 257, 259, 270, 281, 294, 299, 300, 301, 302, 303, 304, 308, 309, 322, 324, 326, 328, 336, 340, 354, 355, 367, 380, 392, 417, 447, 476, 501, 516, 518, 520, 522, 527, 529, 531, 536, 541, 555, 565, 578, 589, 600, 616, 617, 618, 622, 636, 651, 652, 656, 657, 665, 666, 674, 675, 683, 733, 738, 746, 748, 750, 755, 760, 768, 772, 777, 785, 797, 805, 806, 807, 808, 809, 810, 812, 813 }; static const char * const yytname[] = { "$","error","$illegal.","kwd_select", "kwd_all","kwd_news","kwd_xnews","kwd_distinct","kwd_count","kwd_from","kwd_where", "kwd_in","kwd_between","kwd_like","kwd_escape","kwd_group","kwd_by","kwd_having", "kwd_order","kwd_for","kwd_insert","kwd_into","kwd_values","kwd_delete","kwd_update", "kwd_create","kwd_alter","kwd_drop","kwd_table","kwd_column","kwd_view","kwd_index", "kwd_of","kwd_current","kwd_grant","kwd_revoke","kwd_is","kwd_null","kwd_call", "kwd_uncase","kwd_case","kwd_fn","kwd_d","QSTRING","NUM","NAME","PARAM","kwd_or", "kwd_and","kwd_not","CMPOP","';'","'*'","'('","')'","'{'","'}'","','","'='", "sql_stmt","stmt_body","select_clauses","for_stmt","distinct_opt","select_list", "news_hotlist","news_xhotlist","col_name_list","col_name","count_sub_opt","tab_list", "tab_name","where_clause","search_condition","case_opt","attr_name","value_list", "value","escape_desc","pattern","not_opt","group_clause","having_clause","order_clause", "insert_stmt","ins_head_list","ins_head","ins_value_list","ins_value","srch_delete_stmt", "posi_delete_stmt","other_stmt","" }; #endif static const short yyr1[] = { 0, 59, 60, 60, 60, 60, 60, 60, 61, 62, 62, 63, 63, 63, 64, 64, 64, 64, 64, 65, 65, 65, 66, 66, 66, 67, 67, 68, 68, 68, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 70, 70, 71, 71, 71, 71, 72, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, 74, 74, 74, 74, 75, 75, 75, 76, 76, 77, 77, 77, 77, 77, 78, 78, 78, 79, 79, 80, 80, 81, 81, 82, 82, 83, 83, 84, 85, 85, 86, 86, 86, 87, 87, 88, 88, 88, 89, 90, 91, 91, 91, 91, 91, 91, 91, 91 }; static const short yyr2[] = { 0, 2, 0, 6, 1, 1, 1, 1, 5, 0, 4, 0, 1, 1, 0, 1, 1, 1, 1, 1, 3, 6, 1, 3, 6, 1, 3, 2, 1, 4, 7, 1, 1, 4, 1, 0, 2, 3, 3, 3, 3, 1, 3, 1, 4, 7, 1, 0, 2, 3, 2, 3, 3, 6, 6, 6, 4, 3, 0, 1, 1, 2, 1, 4, 7, 1, 3, 1, 1, 1, 1, 4, 0, 2, 4, 1, 1, 0, 1, 0, 3, 0, 2, 0, 3, 10, 1, 3, 1, 4, 7, 1, 3, 1, 1, 1, 4, 7, 1, 1, 1, 1, 2, 4, 1, 1 }; static const short yydefact[] = { 2, 11, 0, 0, 101, 98, 99, 100, 104, 105, 0, 0, 4, 5, 6, 7, 12, 13, 14, 0, 0, 102, 0, 1, 19, 22, 35, 0, 31, 32, 28, 34, 15, 0, 0, 16, 17, 18, 25, 0, 43, 46, 0, 0, 47, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 103, 20, 23, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 47, 41, 0, 26, 0, 0, 0, 88, 0, 0, 86, 0, 0, 62, 0, 0, 0, 48, 77, 39, 40, 38, 37, 29, 0, 0, 0, 33, 0, 0, 3, 79, 0, 44, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 77, 78, 0, 58, 0, 0, 0, 42, 0, 81, 0, 0, 0, 0, 87, 0, 97, 49, 0, 51, 52, 0, 67, 69, 70, 68, 0, 57, 0, 0, 0, 60, 59, 0, 21, 24, 0, 0, 0, 83, 0, 89, 0, 0, 63, 0, 56, 0, 61, 0, 0, 0, 30, 80, 82, 0, 9, 45, 0, 93, 94, 95, 0, 91, 0, 0, 0, 65, 0, 76, 75, 72, 0, 0, 8, 0, 85, 0, 0, 71, 53, 0, 54, 0, 0, 55, 84, 0, 90, 92, 64, 66, 73, 0, 0, 0, 10, 74, 0, 0, 0 }; static const short yydefgoto[] = { 217, 11, 103, 193, 18, 34, 35, 36, 37, 38, 49, 73, 43, 59, 90, 152, 91, 185, 146, 204, 190, 122, 128, 158, 175, 12, 82, 83, 181, 182, 13, 14, 15 }; static const short yypact[] = { 1, 7, -14, 25,-32768,-32768,-32768,-32768,-32768,-32768, -26, -38,-32768,-32768,-32768,-32768,-32768,-32768, 34, 21, 21, -32768, -39,-32768, -23, 45, 47, 53,-32768,-32768,-32768, -32768,-32768, 28, 102,-32768,-32768, 56,-32768, 62,-32768, -32768, 77, 67, 111, 84, 69, 70, 10,-32768, 82, 12, 83, 21, 29, 86, 99, 54, 52,-32768,-32768, -32768,-32768, 76, 78, 79, 80,-32768, 81, 85, 87, 88, 75, -5,-32768, 61,-32768, 89, 91, 92,-32768, 95, 33,-32768, 93, 105,-32768, 59, 59, 98, -2, -27,-32768,-32768,-32768,-32768,-32768, 94, 96, 104,-32768, 59, 21,-32768, 127, 120,-32768, 108, 109, 124, 132, 54, 112, 113,-32768, 3, 128, 59, 59, 107,-32768, 73, 4, 103, 106, 110,-32768, 144, 146, 114, 115, 117, 118,-32768, 119,-32768,-32768, 121, 129,-32768, 130, -32768,-32768,-32768,-32768, 123,-32768, 126, 122, 73,-32768, -32768, 148,-32768,-32768, 116, 29, 59, 158, 125,-32768, 135, 22,-32768, 136,-32768, 137,-32768, 73, 134, 48, -32768, 56, -2, 167, 165,-32768, 131,-32768,-32768,-32768, 38,-32768, 133, 138, 39,-32768, 73,-32768,-32768, -8, 29, 162,-32768, 139,-32768, 22, 140,-32768,-32768, 73, -32768, 145, 175,-32768, 56, 159,-32768,-32768,-32768,-32768, -32768, 147, 29, 141, 56,-32768, 192, 193,-32768 }; static const short yypgoto[] = {-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768, -153, 149,-32768, -32768, -20, 142, -86,-32768,-32768,-32768, -139,-32768,-32768, 90,-32768,-32768,-32768,-32768,-32768, 97,-32768, 2,-32768, -32768,-32768 }; #define YYLAST 215 static const short yytable[] = { 44, 114, 115, 172, 1, 101, 202, 19, 147, 119, 169, 16, 21, 23, 17, 148, 149, 69, 70, 45, 22, 2, 120, 121, 3, 4, 5, 6, 7, 186, 46, 138, 139, 74, 20, 8, 9, 26, 205, 24, 25, 71, 26, 150, 151, 117, 118, 203, 201, 39, 117, 118, 102, 63, 64, 65, 10, 136, 27, 178, 215, 210, 66, 27, 67, 179, 40, 41, 180, 51, 52, 173, 28, 29, 30, 31, 42, 28, 29, 30, 31, 84, 126, 79, 75, 85, 32, 110, 84, 33, 111, 188, 195, 199, 189, 196, 200, 86, 47, 80, 48, 87, 105, 52, 86, 88, 50, 89, 87, 81, 141, 53, 88, 54, 89, 55, 142, 143, 56, 144, 57, 58, 60, 61, 62, 68, 72, 78, 145, 77, 92, 100, 93, 94, 95, 96, 109, 113, 97, 116, 98, 99, 127, 106, 107, 108, 112, 125, 123, 71, 124, 129, 130, 131, 132, 134, 120, 137, 135, 153, 156, 170, 154, 157, 155, 166, 167, 165, 159, 160, 161, 162, 171, 163, 164, 168, 174, 118, 177, 183, 184, 176, 187, 191, 192, 194, 206, 197, 211, 212, 214, 213, 218, 219, 198, 207, 209, 216, 208, 0, 0, 0, 0, 76, 0, 0, 0, 0, 133, 140, 0, 0, 0, 0, 0, 104 }; static const short yycheck[] = { 20, 87, 88, 156, 3, 10, 14, 21, 4, 36, 149, 4, 38, 51, 7, 11, 12, 5, 6, 58, 46, 20, 49, 50, 23, 24, 25, 26, 27, 168, 53, 117, 118, 53, 9, 34, 35, 8, 191, 5, 6, 29, 8, 39, 40, 47, 48, 55, 187, 28, 47, 48, 57, 43, 44, 45, 55, 54, 29, 37, 213, 200, 52, 29, 54, 43, 45, 46, 46, 41, 42, 157, 43, 44, 45, 46, 55, 43, 44, 45, 46, 29, 102, 29, 55, 33, 52, 54, 29, 55, 57, 43, 54, 54, 46, 57, 57, 45, 53, 45, 53, 49, 41, 42, 45, 53, 53, 55, 49, 55, 37, 9, 53, 57, 55, 53, 43, 44, 41, 46, 53, 10, 38, 54, 54, 43, 43, 28, 55, 43, 54, 56, 54, 54, 54, 54, 41, 32, 53, 41, 53, 53, 15, 54, 53, 53, 53, 43, 54, 29, 54, 43, 43, 29, 22, 43, 49, 29, 45, 56, 16, 13, 56, 17, 54, 42, 40, 37, 54, 54, 53, 53, 56, 54, 53, 53, 18, 48, 43, 43, 43, 56, 48, 16, 19, 54, 24, 54, 43, 14, 43, 32, 0, 0, 56, 56, 56, 56, 196, -1, -1, -1, -1, 54, -1, -1, -1, -1, 111, 119, -1, -1, -1, -1, -1, 73 }; #define YYPURE 1 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/lib/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef alloca #ifdef __GNUC__ #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) #include #else /* not sparc */ #if defined (MSDOS) && !defined (__TURBOC__) #include #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) #include #pragma alloca #else /* not MSDOS, __TURBOC__, or _AIX */ #ifdef __hpux #ifdef __cplusplus extern "C" { void *alloca (unsigned int); }; #else /* not __cplusplus */ void *alloca (); #endif /* not __cplusplus */ #endif /* __hpux */ #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc. */ #endif /* not GNU C. */ #endif /* alloca not defined. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT return(0) #define YYABORT return(1) #define YYERROR goto yyerrlab1 /* 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); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #define YYLEX yylex(&yylval, &yylloc) #else #define YYLEX yylex(&yylval) #endif #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ int yyparse (); #endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_bcopy (from, to, count) char *from; char *to; int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_bcopy (char *from, char *to, int count) { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 184 "/usr/lib/bison.simple" int yyparse() { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ int yychar1 = 0; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ short *yyss = yyssa; /* refer to the stacks thru separate pointers */ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif int yystacksize = YYINITDEPTH; #ifdef YYPURE int yychar; YYSTYPE yylval; int yynerrs; #ifdef YYLSP_NEEDED YYLTYPE yylloc; #endif #endif YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yylen; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif 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 - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* 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; short *yyss1 = yyss; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif goto yybackup; yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif fprintf (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 1: #line 162 "yyparse.y" { YYACCEPT; ; break;} case 3: #line 168 "yyparse.y" { if( ! table_check( pyyenv->pstmt ) ) { SETYYERROR(pyyenv, NOT_SUPPORT_MULTITABLE_QUERY); YYABORT; } pyyenv->pstmt->type = en_stmt_select; ; break;} case 4: #line 178 "yyparse.y" { pyyenv->pstmt->type = en_stmt_insert; ; break;} case 5: #line 182 "yyparse.y" { pyyenv->pstmt->type = en_stmt_srch_delete; ; break;} case 7: #line 187 "yyparse.y" { pyyenv->pstmt->type = en_stmt_alloc; YYABORT; ; break;} case 10: #line 200 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_UPDATEABLE_CURSOR) ; YYABORT; ; break;} case 13: #line 210 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_DISTINCT_SELECT); YYABORT; ; break;} case 14: #line 217 "yyparse.y" { if(add_all_attr(pyyenv->pstmt)) YYABORT; ; break;} case 15: #line 218 "yyparse.y" { if(add_all_attr(pyyenv->pstmt)) YYABORT; ; break;} case 16: #line 219 "yyparse.y" { if(add_news_attr(pyyenv->pstmt)) YYABORT; ; break;} case 17: #line 220 "yyparse.y" { if(add_xnews_attr(pyyenv->pstmt)) YYABORT; ; break;} case 18: #line 221 "yyparse.y" { if(add_attr(pyyenv->pstmt, 0, 0)) YYABORT; ; break;} case 27: #line 243 "yyparse.y" { yycol_t col; col.iattr = en_sql_count; col.table = 0; if( add_column(pyyenv->pstmt, &col) ) YYABORT; ; break;} case 28: #line 254 "yyparse.y" { if( column_name( pyyenv->pstmt, yyvsp[0].name ) ) YYABORT; ; break;} case 29: #line 256 "yyparse.y" { if( column_name( pyyenv->pstmt, yyvsp[-1].qstring ) ) YYABORT; ; break;} case 30: #line 258 "yyparse.y" { if( column_name( pyyenv->pstmt, yyvsp[-2].qstring ) ) YYABORT; ; break;} case 31: #line 260 "yyparse.y" { yycol_t col; col.iattr = en_sql_qstr; col.value.qstr = yyvsp[0].qstring; col.table = 0; if( add_column(pyyenv->pstmt, &col) ) YYABORT; ; break;} case 32: #line 271 "yyparse.y" { yycol_t col; col.iattr = en_sql_num; col.value.num = yyvsp[0].number; col.table = 0; if( add_column(pyyenv->pstmt, &col) ) YYABORT; ; break;} case 33: #line 282 "yyparse.y" { yycol_t col; col.iattr = en_sql_date; if( nnsql_odbcdatestr2date(yyvsp[-1].qstring, &(col.value.date)) ) YYABORT; col.table = 0; if( add_column(pyyenv->pstmt, &col) ) YYABORT; ; break;} case 34: #line 295 "yyparse.y" { SETYYERROR(pyyenv, VARIABLE_IN_SELECT_LIST); YYABORT; ; break;} case 41: #line 308 "yyparse.y" { pyyenv->pstmt->table = yyvsp[0].name; ; break;} case 42: #line 310 "yyparse.y" { if( ! pyyenv->pstmt->table ) pyyenv->pstmt->table = yyvsp[0].name; else if( !STREQ(pyyenv->pstmt->table, yyvsp[0].name) ) { SETYYERROR(pyyenv, NOT_SUPPORT_MULTITABLE_QUERY); YYABORT; } ; break;} case 43: #line 323 "yyparse.y" { yyval.name = yyvsp[0].name; ; break;} case 44: #line 325 "yyparse.y" { yyval.name = yyvsp[-1].qstring; ; break;} case 45: #line 327 "yyparse.y" { yyval.name = yyvsp[-2].qstring; ; break;} case 46: #line 329 "yyparse.y" { SETYYERROR(pyyenv, VARIABLE_IN_TABLE_LIST); YYABORT; ; break;} case 47: #line 337 "yyparse.y" { pyyenv->pstmt->srchtree = 0; ; break;} case 48: #line 341 "yyparse.y" { yystmt_t* pstmt; int offset; pstmt = pyyenv->pstmt; offset = (int)(yyvsp[0].offset); pstmt->srchtree = pstmt->node_buf + offset; srchtree_reloc ( pstmt->node_buf, pstmt->srchtreenum); ; break;} case 49: #line 354 "yyparse.y" { yyval.offset = yyvsp[-1].offset; ; break;} case 50: #line 356 "yyparse.y" { node_t node; node.type = en_nt_logop; node.value.logop = en_logop_not; node.left = EMPTY_PTR; node.right= yyvsp[0].offset; if((yyval.offset = add_node(pyyenv->pstmt, &node)) == ERROR_PTR ) YYABORT; ; break;} case 51: #line 368 "yyparse.y" { node_t node; void* p; node.type = en_nt_logop; node.value.logop = en_logop_or; node.left = yyvsp[-2].offset; node.right= yyvsp[0].offset; if((yyval.offset = add_node(pyyenv->pstmt, &node)) == ERROR_PTR ) YYABORT; ; break;} case 52: #line 381 "yyparse.y" { node_t node; node.type = en_nt_logop; node.value.logop = en_logop_and; node.left = yyvsp[-2].offset; node.right= yyvsp[0].offset; if((yyval.offset = add_node(pyyenv->pstmt, &node)) == ERROR_PTR ) YYABORT; ; break;} case 53: #line 393 "yyparse.y" { node_t node; void* ptr; node.type = en_nt_in; node.left = yyvsp[-5].offset; node.right= yyvsp[-1].offset; if((ptr = add_node(pyyenv->pstmt, &node)) == ERROR_PTR) YYABORT; if( yyvsp[-4].flag ) { node.type = en_nt_logop; node.value.logop = en_logop_not; node.left = EMPTY_PTR; node.right = ptr; if((ptr = add_node(pyyenv->pstmt, &node)) == ERROR_PTR) YYABORT; } yyval.offset = ptr; ; break;} case 54: #line 418 "yyparse.y" { node_t node; void* ptr; if( ((node.left = add_node(pyyenv->pstmt, &(yyvsp[-2].node))) == ERROR_PTR) || ((node.right= add_node(pyyenv->pstmt, &(yyvsp[0].node))) == ERROR_PTR) || ((ptr = add_node(pyyenv->pstmt, &node)) == ERROR_PTR) ) YYABORT; node.type = en_nt_between; node.left = yyvsp[-5].offset; node.right = ptr; if((ptr = add_node(pyyenv->pstmt, &node)) == ERROR_PTR) YYABORT; if( yyvsp[-4].flag ) { node.type = en_nt_logop; node.value.logop = en_logop_not; node.left = EMPTY_PTR; node.right= ptr; if((ptr = add_node(pyyenv->pstmt, &node)) == ERROR_PTR) YYABORT; } yyval.offset = ptr; ; break;} case 55: #line 448 "yyparse.y" { node_t node; void* ptr; if( yyvsp[-3].flag ) node.type = en_nt_caselike; else node.type = en_nt_like; node.value.esc = yyvsp[0].esc; node.left = yyvsp[-5].offset; node.right= yyvsp[-1].offset; if((ptr = add_node(pyyenv->pstmt, &node)) == ERROR_PTR) YYABORT; if( yyvsp[-4].flag ) { node.type = en_nt_logop; node.value.logop = en_logop_not; node.left = EMPTY_PTR; node.right= ptr; if((ptr = add_node(pyyenv->pstmt, &node)) == ERROR_PTR) YYABORT; } yyval.offset = ptr; ; break;} case 56: #line 477 "yyparse.y" { node_t node; void* ptr; node.type = en_nt_isnull; node.left = yyvsp[-3].offset; node.right= EMPTY_PTR; if((ptr = add_node(pyyenv->pstmt, &node)) == ERROR_PTR) YYABORT; if( yyvsp[-1].flag ) { node.type = en_nt_logop; node.value.logop = en_logop_not; node.left = EMPTY_PTR; node.right= ptr; if((ptr = add_node(pyyenv->pstmt, &node)) == ERROR_PTR) YYABORT; } yyval.offset = ptr; ; break;} case 57: #line 502 "yyparse.y" { node_t node; node.type = en_nt_cmpop; node.value.cmpop = yyvsp[-1].cmpop; node.left = yyvsp[-2].offset; if( ((node.right= add_node(pyyenv->pstmt, &(yyvsp[0].node))) == ERROR_PTR) || ((yyval.offset = add_node(pyyenv->pstmt, &node)) == ERROR_PTR) ) YYABORT; ; break;} case 58: #line 517 "yyparse.y" { yyval.flag = 0; ; break;} case 59: #line 519 "yyparse.y" { yyval.flag = 0; ; break;} case 60: #line 521 "yyparse.y" { yyval.flag = 1; ; break;} case 61: #line 523 "yyparse.y" { yyval.flag = 1; ; break;} case 62: #line 528 "yyparse.y" { yyval.offset = attr_name( pyyenv->pstmt, yyvsp[0].name ); if( yyval.offset == ERROR_PTR ) YYABORT; ; break;} case 63: #line 530 "yyparse.y" { yyval.offset = attr_name( pyyenv->pstmt, yyvsp[-1].qstring ); if( yyval.offset == ERROR_PTR ) YYABORT; ; break;} case 64: #line 532 "yyparse.y" { yyval.offset = attr_name( pyyenv->pstmt, yyvsp[-2].qstring ); if( yyval.offset == ERROR_PTR ) YYABORT; ; break;} case 65: #line 537 "yyparse.y" { if( (yyval.offset = add_node( pyyenv->pstmt, &(yyvsp[0].node))) == ERROR_PTR ) YYABORT; ; break;} case 66: #line 542 "yyparse.y" { node_t node; node = yyvsp[0].node; node.left = EMPTY_PTR; node.right= yyvsp[-2].offset; if( (yyval.offset = add_node(pyyenv->pstmt, &node)) == ERROR_PTR ) YYABORT; ; break;} case 67: #line 556 "yyparse.y" { node_t node; node.type = en_nt_null; node.left = EMPTY_PTR; node.right= EMPTY_PTR; yyval.node = node; ; break;} case 68: #line 566 "yyparse.y" { node_t node; node.type = en_nt_param, node.value.ipar = yyvsp[0].ipar; node.left = EMPTY_PTR; node.right= EMPTY_PTR; pyyenv->pstmt->npar ++; yyval.node = node; ; break;} case 69: #line 579 "yyparse.y" { node_t node; node.type = en_nt_qstr; node.value.qstr = yyvsp[0].qstring; node.left = EMPTY_PTR; node.right= EMPTY_PTR; yyval.node = node; ; break;} case 70: #line 590 "yyparse.y" { node_t node; node.type = en_nt_num; node.value.num = yyvsp[0].number; node.left = EMPTY_PTR; node.right= EMPTY_PTR; yyval.node = node; ; break;} case 71: #line 601 "yyparse.y" { node_t node; node.type = en_nt_date; if( nnsql_odbcdatestr2date(yyvsp[-1].qstring, &(node.value.date)) ) YYABORT; node.left = EMPTY_PTR; node.right= EMPTY_PTR; yyval.node = node; ; break;} case 72: #line 616 "yyparse.y" { yyval.esc = 0; ; break;} case 73: #line 617 "yyparse.y" { yyval.esc = yyvsp[0].qstring[0]; ; break;} case 74: #line 618 "yyparse.y" { yyval.esc = yyvsp[-1].qstring[0]; ; break;} case 75: #line 623 "yyparse.y" { node_t node; node.type = en_nt_param; node.value.ipar = yyvsp[0].ipar; node.left = EMPTY_PTR; node.right= EMPTY_PTR; pyyenv->pstmt->npar ++; if((yyval.offset = add_node(pyyenv->pstmt, &node)) == EMPTY_PTR) YYABORT; ; break;} case 76: #line 637 "yyparse.y" { node_t node; node.type = en_nt_qstr; node.value.qstr = yyvsp[0].qstring; node.left = EMPTY_PTR; node.right= EMPTY_PTR; if((yyval.offset = add_node(pyyenv->pstmt, &node)) == ERROR_PTR) YYABORT; ; break;} case 77: #line 651 "yyparse.y" { yyval.flag = 0; ; break;} case 78: #line 652 "yyparse.y" { yyval.flag = 1; ; break;} case 80: #line 658 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_GROUP_CLAUSE); YYABORT; ; break;} case 82: #line 667 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_HAVING_CLAUSE); YYABORT; ; break;} case 84: #line 676 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_ORDER_CLAUSE); YYABORT; ; break;} case 85: #line 684 "yyparse.y" { int i; char* head = 0; if( yyvsp[-5].idx > yyvsp[-1].idx ) { SETYYERROR(pyyenv, INSERT_VALUE_LESS); YYABORT; } if( yyvsp[-5].idx < yyvsp[-1].idx ) { SETYYERROR(pyyenv, INSERT_VALUE_MORE); YYABORT; } for(i=0;;i++) { head = (pyyenv->pstmt->ins_heads)[i]; if( ! head ) { SETYYERROR(pyyenv, POST_WITHOUT_BODY); YYABORT; } if( nnsql_getcolidxbyname(head) == en_body) break; } if( add_ins_head(pyyenv->pstmt, 0, yyvsp[-5].idx) == -1 ) YYABORT; pyyenv->pstmt->table = yyvsp[-7].name; /* we will not check table(i.e. group)name here. * According to RFC1036, it is totally legal to * post an articl to a group which is not access * able locally. * table name here is actually newsgroups name. * it should look like: * ,,... * Be aware, there are must no space between the * ',' and the two s. Also, group * names are case sensitive. */ ; break;} case 86: #line 734 "yyparse.y" { if( (yyval.idx = add_ins_head(pyyenv->pstmt, yyvsp[0].qstring, 0)) == -1) YYABORT; ; break;} case 87: #line 739 "yyparse.y" { if( (yyval.idx = add_ins_head(pyyenv->pstmt, yyvsp[0].qstring, yyvsp[-2].idx))== -1) YYABORT; ; break;} case 88: #line 747 "yyparse.y" { yyval.qstring = get_unpacked_attrname(pyyenv->pstmt, yyvsp[0].name); ; break;} case 89: #line 749 "yyparse.y" { yyval.qstring = get_unpacked_attrname(pyyenv->pstmt, yyvsp[-1].qstring); ; break;} case 90: #line 751 "yyparse.y" { yyval.qstring = yyvsp[-2].qstring; ; break;} case 91: #line 756 "yyparse.y" { if( (yyval.idx = add_ins_value(pyyenv->pstmt, yyvsp[0].node, 0))== -1) YYABORT; ; break;} case 92: #line 761 "yyparse.y" { if( (yyval.idx = add_ins_value(pyyenv->pstmt, yyvsp[0].node, yyvsp[-2].idx))==-1) YYABORT; ; break;} case 93: #line 769 "yyparse.y" { yyval.node.type = en_nt_null; ; break;} case 94: #line 773 "yyparse.y" { yyval.node.type = en_nt_qstr; yyval.node.value.qstr = yyvsp[0].qstring; ; break;} case 95: #line 778 "yyparse.y" { yyval.node.type = en_nt_param; yyval.node.value.ipar= yyvsp[0].ipar; ; break;} case 96: #line 786 "yyparse.y" { pyyenv->pstmt->table = yyvsp[-1].name; if( add_attr( pyyenv->pstmt, en_sender, 1 ) || add_attr( pyyenv->pstmt, en_from, 1 ) || add_attr( pyyenv->pstmt, en_msgid, 1 ) ) YYABORT; ; break;} case 97: #line 798 "yyparse.y" { SETYYERROR( pyyenv, NOT_SUPPORT_POSITION_DELETE ); YYABORT; ; break;} case 98: #line 805 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_DDL_DCL); ; break;} case 99: #line 806 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_DDL_DCL); ; break;} case 100: #line 807 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_DDL_DCL); ; break;} case 101: #line 808 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_UPDATE); ; break;} case 102: #line 809 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_SPROC); ; break;} case 103: #line 811 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_SPROC); ; break;} case 104: #line 812 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_DDL_DCL); ; break;} case 105: #line 813 "yyparse.y" { SETYYERROR(pyyenv, NOT_SUPPORT_DDL_DCL); ; break;} } /* the action file gets copied in in place of this dollarsign */ #line 465 "/usr/lib/bison.simple" yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #endif /* 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 - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; yyerrlab: /* here on detecting error */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; } } yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } goto yyerrlab1; yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; } #line 815 "yyparse.y" static void unpack_col_name(char* schema_tab_column_name, column_name_t* ptr) { int len, i; char c; len = STRLEN(schema_tab_column_name); for(i=len; i; i--) { if( schema_tab_column_name[i-1] == '.' ) { schema_tab_column_name[i-1] = 0; break; } } ptr->column_name = ( schema_tab_column_name + i ); if( i ) ptr->schema_tab_name = schema_tab_column_name; else ptr->schema_tab_name = schema_tab_column_name + len; } static char* get_unpacked_attrname(yystmt_t* pstmt, char* name) { column_name_t attrname; unpack_col_name( name, &attrname ); return attrname.column_name; } #define FILTER_CHUNK_SIZE 16 static void* add_node(yystmt_t* pstmt, node_t* node) { int i; node_t* srchtree; if (!pstmt->node_buf) { pstmt->node_buf = (node_t*)MEM_ALLOC( sizeof(node_t)*FILTER_CHUNK_SIZE); if( ! pstmt->node_buf ) { pstmt->errcode = -1; return ERROR_PTR; } pstmt->srchtreesize = FILTER_CHUNK_SIZE; pstmt->srchtreenum = 0; } if( pstmt->srchtreenum == pstmt->srchtreesize ) { pstmt->node_buf = (node_t*)MEM_REALLOC( pstmt->node_buf, sizeof(node_t)*(pstmt->srchtreesize + FILTER_CHUNK_SIZE)); if( ! pstmt->node_buf ) { pstmt->errcode = -1; return ERROR_PTR; } pstmt->srchtreesize += FILTER_CHUNK_SIZE; } srchtree = pstmt->node_buf; srchtree[pstmt->srchtreenum] = *node; pstmt->srchtreenum ++; for(i=pstmt->srchtreenum;isrchtreesize;i++) { srchtree[i].left = EMPTY_PTR; srchtree[i].right= EMPTY_PTR; } return (void*)(pstmt->srchtreenum - 1); } static void srchtree_reloc(node_t* buf, int num) /* The 'where' srchtree is build on a re-allocateable array with addnode(). The purpose * of using an array rather than a link list is to easy the job of freeing it. Thus, * the left and right pointer of a node point is an offset to the array address not * the virtual address of the subtree. However, an evaluate function would be easy to * work by using virtual address of subtree rather than an offset. Because, in the first * case, a recrusive evaluate function only need to pass virtual address of (sub)tree * without worry about the offset of subtree. The purpose of this function, srchtree_reloc(), * is to convert all subnodes' offset into virtual address. It will called only once * after the whole tree has been built. */ { int i, offset; node_t* ptr = buf; for(i=0; ptr && ileft == EMPTY_PTR ) ptr->left = 0; else { offset = (int)(ptr->left); ptr->left = buf + offset; } if( ptr->right== EMPTY_PTR ) ptr->right= 0; else { offset = (int)(ptr->right); ptr->right= buf+ offset; } } } static int add_attr(yystmt_t* pstmt, int idx, int wstat) { if( ! pstmt->pattr ) { pstmt->pattr = (yyattr_t*)MEM_ALLOC((en_body+1)*sizeof(yyattr_t)); if( ! pstmt->pattr ) { pstmt->errcode = -1; return -1; } MEM_SET(pstmt->pattr, 0, (en_body+1)*sizeof(yyattr_t)); } (pstmt->pattr)[0].stat = 1; (pstmt->pattr)[0].wstat = 1; (pstmt->pattr)[0].article = 0; (pstmt->pattr)[0].nntp_hand = 0; (pstmt->pattr)[idx].stat = 1; (pstmt->pattr)[idx].wstat |= wstat; return 0; } static void* add_all_attr(yystmt_t* pstmt) { int i; yycol_t col; for(i=en_article_num + 1; i < en_body + 1; i++) { col.iattr = i; col.table = 0; if( add_column(pstmt, &col) || add_attr (pstmt, i, 0) ) return ERROR_PTR; } return 0; } static const int news_attr[] = { en_subject, en_date, en_from, en_organization, en_msgid, en_body }; static void* add_news_attr(yystmt_t* pstmt) { int i, n; yycol_t col; n = sizeof(news_attr)/sizeof(news_attr[0]); for(i=0; ipcol ) { pstmt->pcol = (yycol_t*)MEM_ALLOC((MAX_COLUMN_NUMBER + 1)*sizeof(yycol_t)); if( ! pstmt->pcol ) { pstmt->errcode = -1; return ERROR_PTR; } MEM_SET( pstmt->pcol, 0, (MAX_COLUMN_NUMBER + 1)*sizeof(yycol_t)); } if( ! pstmt->ncol ) { pstmt->ncol = 1; pstmt->pcol->iattr = en_article_num; pstmt->pcol->table = 0; } if( pstmt->ncol > MAX_COLUMN_NUMBER + 1) { pstmt->errcode = TOO_MANY_COLUMNS; return ERROR_PTR; } pcol = pstmt->pcol + pstmt->ncol; pstmt->ncol++; *pcol = *column; return 0; } static void nnsql_yyerror(yyenv_t* pyyenv, char* msg) { yystmt_t* pstmt = pyyenv->pstmt; pstmt->errcode = PARSER_ERROR; pstmt->errpos = pyyenv->errpos; sprintf(pstmt->msgbuf, NNSQL_ERRHEAD "%s", msg); } static int table_check(yystmt_t* pstmt) { int i; char *table, *table1; table = pstmt->table; if( ! (table && *table) ) return 0; for(i=1;pstmt->pcol && incol;i++) { table1 = (pstmt->pcol)[i].table; if( table1 && *table1 && !STREQ( table, table1 ) ) return 0; } return 1; } static void* attr_name(yystmt_t* pstmt, char* name) { node_t node; column_name_t attrname; int attridx; void* offset; unpack_col_name( name, &attrname ); attridx = nnsql_getcolidxbyname( attrname.column_name ); if( attridx == -1 ) { pstmt->errcode = INVALID_COLUMN_NAME; return ERROR_PTR; } if( attridx == en_body ) { pstmt->errcode = UNSEARCHABLE_ATTR; return ERROR_PTR; } node.type = en_nt_attr; node.value.iattr = attridx; node.left = EMPTY_PTR; node.right= EMPTY_PTR; if( (offset = add_node(pstmt, &node)) == ERROR_PTR ) return ERROR_PTR; if( add_attr(pstmt, attridx, 1) ) return ERROR_PTR; return offset; } static int column_name(yystmt_t* pstmt, char* name) { column_name_t colname; int colidx; yycol_t col; unpack_col_name( name, &colname ); colidx = nnsql_getcolidxbyname( colname.column_name ); if( colidx == -1 ) { pstmt->errcode = INVALID_COLUMN_NAME; return -1; } col.iattr = colidx; col.table = colname.schema_tab_name; if( add_column(pstmt, &col) || add_attr(pstmt, colidx, 0) ) return -1; return 0; } static int add_ins_head( yystmt_t* pstmt, char* head, int idx) { if( !idx ) { MEM_FREE(pstmt->ins_heads); pstmt->ins_heads = (char**)MEM_ALLOC( FILTER_CHUNK_SIZE * sizeof(char*)); } else if( ! idx%FILTER_CHUNK_SIZE ) { pstmt->ins_heads = (char**)MEM_REALLOC( pstmt->ins_heads, (idx+FILTER_CHUNK_SIZE)*sizeof(char*)); } if( ! pstmt->ins_heads ) return -1; (pstmt->ins_heads)[idx] = head; return idx + 1; } static int add_ins_value( yystmt_t* pstmt, node_t node, int idx) { if( !idx ) { MEM_FREE(pstmt->ins_values) pstmt->ins_values = (node_t*)MEM_ALLOC( FILTER_CHUNK_SIZE * sizeof(node_t)); } else if( ! idx%FILTER_CHUNK_SIZE ) { pstmt->ins_values = (node_t*)MEM_REALLOC( pstmt->ins_values, (idx+FILTER_CHUNK_SIZE)*sizeof(node_t)); } if( ! pstmt->ins_values ) return -1; (pstmt->ins_values)[idx] = node; return idx + 1; } unixODBC-2.2.14-p2/Drivers/nn/yylex.c0100644000076400007640000001242607363332155015560 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include #include #include #include #include #include "yylex.ci" # define YYERRCODE 256 #include static int getcmpopidxbyname(char* name) { int i, size; size = sizeof(cmpop_tab)/sizeof(cmpop_tab[0]); for(i=0; ipstmt->sqlexpr)[(penv->scanpos)]; (penv->errpos) = (penv->scanpos); (penv->scanpos) ++; return c; } static void unputc(char c, yyenv_t* penv) { (penv->errpos) = (--(penv->scanpos)); if( (penv->pstmt->sqlexpr)[(penv->scanpos)] != c ) (penv->pstmt->sqlexpr)[(penv->scanpos)] = c; } static long getnum(yyenv_t* penv) { long a; char c; int i, errpos = (penv->scanpos); a = atol((penv->pstmt->sqlexpr) + (penv->scanpos)); for(i=0;;i++) { c = popc(penv); if( ! isdigit(c) ) { unputc(c, penv); break; } } (penv->errpos) = errpos; return a; } static int getqstring(char* buf, int len, yyenv_t* penv, char term) { char c, c1; int i, errpos = (penv->scanpos); for(i=0; len == -1 || ierrpos) = errpos; return i; } static int getname(char* buf, int len, yyenv_t* penv) { int i = 0; char c; int errpos = (penv->scanpos); for(i=0; len == -1 || ierrpos) = errpos; return i; } static int getcmpop(yyenv_t* penv) { char opname[3]; char c, c1; int errpos = (penv->scanpos); opname[0] = c = popc(penv); opname[1] = c1= popc(penv); opname[2] = 0; if( c1 != '=' && c1 != '>' && c1 != '<' ) { opname[1] = 0; unputc(c1, penv); } (penv->errpos) = errpos; return getcmpopidxbyname(opname); } int nnsql_yylex(YYSTYPE* pyylval, yyenv_t* penv) { int len, cmpop; char c; do { c = popc(penv); } while( c == ' ' || c == '\t' || c == '\n' ); if( isalpha(c) ) { int keywdidx; unputc(c, penv); len = getname(penv->texts_bufptr, -1, penv); if( len == YYERRCODE ) return len; if( penv->extlevel ) keywdidx = getxkeywdidxbyname( penv->texts_bufptr ); else keywdidx = YYERRCODE; if( keywdidx == YYERRCODE ) keywdidx = getkeywdidxbyname( penv->texts_bufptr); if( keywdidx != YYERRCODE ) return keywdidx; pyylval->name = penv->texts_bufptr; (penv->texts_bufptr) += (len + 1); return NAME; } if( isdigit(c) ) { unputc(c, penv); pyylval->number = getnum(penv); return NUM; } switch( c ) { case ';': case '\0': return ';'; case '\'': case '"': len = getqstring(penv->texts_bufptr, -1, penv, c); if( len == YYERRCODE ) return len; if( c == '\'' ) { pyylval->qstring = penv->texts_bufptr; penv->texts_bufptr += (len + 1); return QSTRING; } pyylval->name = penv->texts_bufptr; (penv->texts_bufptr) += (len + 1); return NAME; case '=': case '<': case '>': case '!': unputc(c, penv); cmpop = getcmpop( penv ); if(cmpop == YYERRCODE ) return cmpop; pyylval->cmpop = cmpop; return CMPOP; case '?': pyylval->ipar = (++(penv->dummy_npar)); return PARAM; case '{': penv->extlevel ++; break; case '}': penv->extlevel --; break; default: break; } return c; } void nnsql_yyinit(yyenv_t* penv, yystmt_t* yystmt) { penv->extlevel = 0; penv->dummy_npar = penv->errpos = penv->scanpos = 0; penv->pstmt = yystmt; penv->texts_bufptr = yystmt->texts_buf; } unixODBC-2.2.14-p2/Drivers/nn/yystmt.c0100644000076400007640000004015507363332155015757 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include "driver.h" static char sccsid[] = "@(#)NNSQL(NetNews SQL) v0.5, Copyright(c) 1995, 1996 by Ke Jin"; static int yyunbindpar(yystmt_t* yystmt, int ipar); void* nnsql_allocyystmt(void* hcndes) { yystmt_t* yystmt; yystmt = (yystmt_t*)MEM_ALLOC(sizeof(yystmt_t)); if( ! yystmt ) return 0; MEM_SET(yystmt, 0, sizeof(yystmt_t)); yystmt->hcndes = hcndes; return yystmt; } void nnsql_close_cursor(void* hstmt) { yystmt_t* yystmt = hstmt; yyattr_t* pattr; int i; if( !hstmt ) return; for(pattr = yystmt->pattr, i=0; pattr && i<=en_body; pattr++, i++) { pattr->stat = 0; /* not needed */ pattr->wstat= 0; nntp_closeheader(pattr->nntp_hand); pattr->nntp_hand = 0; } } void nnsql_dropyystmt(void* hstmt) { yystmt_t* yystmt = hstmt; int i; if(! hstmt ) return; /* allocated for any statement */ MEM_FREE( yystmt->texts_buf ); MEM_FREE( yystmt->sqlexpr ); /* allocated for SELECT statement */ MEM_FREE( yystmt->node_buf ); MEM_FREE( yystmt->pcol ); nnsql_close_cursor(hstmt); if( yystmt->pattr ) { MEM_FREE( (yystmt->pattr)[en_body].value.location ); MEM_FREE( yystmt->pattr ); } /* allocated for yybindpar(). i.e. nnsql_put{date, str, num}() */ for(i=1;;i++) { if( yyunbindpar(yystmt, i) ) break; } MEM_FREE( yystmt->ppar ); /* allocated for INSERT statement */ MEM_FREE( yystmt->ins_heads ); MEM_FREE( yystmt->ins_values); /* the statement object itself */ MEM_FREE( hstmt ); } static void nnsql_resetyystmt(void* hstmt) { yystmt_t* yystmt = hstmt; int i; if( ! hstmt ) return; yystmt->type = en_stmt_alloc; /* clear result from any statement */ MEM_FREE( yystmt->sqlexpr ); MEM_FREE( yystmt->texts_buf ); yystmt->sqlexpr = 0; yystmt->texts_buf = 0; yystmt->table = 0; yystmt->ncol = 0; yystmt->npar = 0; yystmt->count = 0; /* reset the search tree (but not free the buffer of it) */ yystmt->srchtree = 0; yystmt->srchtreenum = 0; /* clear fetched result */ nnsql_close_cursor(hstmt); /* clear result of bindpar() */ for(i=1; ;i++ ) { if( yyunbindpar(yystmt, i) ) break; } /* clear result of insert statement */ MEM_FREE( yystmt->ins_heads ); MEM_FREE( yystmt->ins_values ); yystmt->ins_heads = 0; yystmt->ins_values= 0; } static int yyfetch(void* hstmt, int wstat) { int i, j, nattr; yystmt_t* yystmt = hstmt; if( ! hstmt || ! yystmt->pattr ) return -1; for(i=en_article_num + 1, nattr=0; i<= en_body; i++) { yyattr_t* pattr; yyattr_t* tpattr; void* hrh = 0; pattr = yystmt->pattr + i; if(i == en_body ) { if( nattr ) break; i = en_lines; /* use lines to retrive article number */ pattr = yystmt->pattr; nattr --; } if( pattr->stat && pattr->wstat == wstat ) { char* header; long data; int r; nattr++; if( ! (header = nnsql_getcolnamebyidx(i)) ) return -1; if( !wstat && !hrh ) { for(j = 0, tpattr = yystmt->pattr; j < en_body; j++) { tpattr++; if( tpattr->wstat ) { hrh = tpattr->nntp_hand; break; } } if( !hrh && yystmt->pattr->wstat ) hrh = yystmt->pattr->nntp_hand; } if( ! pattr->nntp_hand ) { nnsql_getrange(yystmt, &(yystmt->artnum_min), &(yystmt->artnum_max)); pattr->nntp_hand = nntp_openheader( yystmt->hcndes, header, &(yystmt->artnum_min), &(yystmt->artnum_max) ); if( ! pattr->nntp_hand ) return -1; } if( yystmt->artnum_max ) r = nntp_fetchheader( pattr->nntp_hand, &((yystmt->pattr->value).number), &data, hrh ); else r = 100; if( !r && !i ) { data = (yystmt->pattr->value).number; if(data > yystmt->artnum_max) r = 100; } switch(r) { case 100: (yystmt->pattr->value).number = 0; case -1: nntp_closeheader(pattr->nntp_hand); pattr->nntp_hand = 0; return r; case 0: break; default: abort(); break; } switch(i) { case en_lines: if( nattr ) (pattr->value).number = (long)(data); else return 0; break; case en_date: nnsql_nndatestr2date((char*)data, &((pattr->value).date) ); break; default: (pattr->value).location = (char*)(data); break; } } } return 0; } #include int nnsql_fetch(void* hstmt) { int r, i; yystmt_t* pstmt = hstmt; yyattr_t* pattr = pstmt->pattr + en_body; for(;;) { switch( pstmt->type ) { case en_stmt_fetch_count: pstmt->type = en_stmt_alloc; return 100; case en_stmt_select: break; default: return -1; } r = yyfetch(hstmt, 1); switch(r) { case 100: for(i=1; incol; i++) { if( (pstmt->pcol + i)->iattr == en_sql_count ) { pstmt->type = en_stmt_fetch_count; return 0; } } pstmt->type = en_stmt_alloc; return 100; case -1: pstmt->type = en_stmt_alloc; return -1; case 0: r = nnsql_srchtree_evl(hstmt); switch(r) { case -1: pstmt->type = en_stmt_alloc; return r; case 1: pstmt->count++; if( pstmt->ncol == 2 && (pstmt->pcol + 1)->iattr == en_sql_count ) continue; if( (r = yyfetch(hstmt, 0)) == -1 ) { pstmt->type = en_stmt_alloc; return -1; } if( pattr->stat ) /* pattr has already init to point * to the en_body attr */ { MEM_FREE( (pattr->value).location ); (pattr->value).location = nntp_body( pstmt->hcndes, (pstmt->pattr->value).number, 0); } return 0; case 0: continue; default: abort(); break; } break; default: abort(); break; } break; } abort(); return -1; } int nnsql_opentable(void* hstmt, char* table) { yystmt_t* yystmt = hstmt; if(! hstmt ) return -1; if( !table ) table = yystmt->table; return nntp_group( yystmt->hcndes, table ); } int nnsql_yyunbindpar(void* yystmt, int ipar) { return yyunbindpar(yystmt, ipar); } static int yyunbindpar(yystmt_t* yystmt, int ipar) { int i; yypar_t* par; if( yystmt || ipar <= 0 || ipar > MAX_PARAM_NUMBER || yystmt->ppar ) return -1; par = yystmt->ppar + ipar - 1; switch( par->type ) { case -1: case en_nt_num: case en_nt_null: break; case en_nt_qstr: MEM_FREE( par->value.location ); break; default: abort(); break; } yystmt->ppar->type = -1; return 0; } static int yybindpar(yystmt_t* yystmt, int ipar, long data, int type) { int i; ipar --; if( ! yystmt->ppar ) { yystmt->ppar = (yypar_t*)MEM_ALLOC( sizeof(yypar_t)*MAX_PARAM_NUMBER); if( ! yystmt->ppar ) { yystmt->errcode = -1; return -1; } for(i=0; ippar)[i].type = -1; /* unbind */ } yyunbindpar( yystmt, ipar + 1); (yystmt->ppar)[ipar].type = type; switch(type) { case en_nt_null: return 0; case en_nt_qstr: (yystmt->ppar)[ipar].value.location = (char*)data; break; case en_nt_num: (yystmt->ppar)[ipar].value.number = (long)data; break; case en_nt_date: (yystmt->ppar)[ipar].value.date = *((date_t*)data); break; default: abort(); break; } return 0; } int nnsql_putnull(void* hstmt, int ipar ) { return yybindpar((yystmt_t*)hstmt, ipar, 0, en_nt_null); } int nnsql_putstr(void* hstmt, int ipar, char* str) { return yybindpar((yystmt_t*)hstmt, ipar, (long)str, en_nt_qstr); } int nnsql_putnum(void* hstmt, int ipar, long num) { return yybindpar((yystmt_t*)hstmt, ipar, num, en_nt_num); } int nnsql_putdate(void* hstmt, int ipar, date_t* date) { return yybindpar((yystmt_t*)hstmt, ipar, (long)(date), en_nt_date); } int nnsql_max_param() { return MAX_PARAM_NUMBER; } int nnsql_max_column() { return MAX_COLUMN_NUMBER; } static int access_mode_chk( yystmt_t* pstmt ) { int mode; pstmt->errcode = 0; mode = nntp_getaccmode(pstmt->hcndes); switch( pstmt->type ) { case en_stmt_insert: if( mode < ACCESS_MODE_INSERT ) pstmt->errcode = NO_INSERT_PRIVILEGE; break; case en_stmt_srch_delete: if( nnsql_strlike( pstmt->table, "%.test", 0, 0) ) { if( mode < ACCESS_MODE_DELETE_TEST ) pstmt->errcode = NO_DELETE_PRIVILEGE; } else { if( mode < ACCESS_MODE_DELETE_ANY ) pstmt->errcode = NO_DELETE_ANY_PRIVILEGE; } if( nnsql_opentable(pstmt, 0) ) return -1; break; case en_stmt_select: if( nnsql_opentable(pstmt, 0) ) return -1; return 0; default: pstmt->errcode = -1; break; } if( ! pstmt->errcode && ! nntp_postok( pstmt->hcndes ) ) pstmt->errcode = NO_POST_PRIVILEGE; if( pstmt->errcode ) { nnsql_resetyystmt(pstmt); return -1; } return 0; } int nnsql_prepare(void* hstmt, char* expr, int len) { yyenv_t yyenv; yystmt_t* pstmt = hstmt; int r; if( ! hstmt || ! expr || len < 0 ) return -1; nnsql_resetyystmt(hstmt); pstmt->errcode = -1; pstmt->sqlexpr = MEM_ALLOC(len + 1); if( ! pstmt->sqlexpr ) return -1; pstmt->texts_buf = MEM_ALLOC( len + 1 ); if( ! pstmt->texts_buf ) { MEM_FREE( pstmt->sqlexpr ); pstmt->sqlexpr = 0; return -1; } STRNCPY(pstmt->sqlexpr, expr, len); (pstmt->sqlexpr)[len] = 0; nnsql_yyinit(&yyenv, pstmt); if( nnsql_yyparse(&yyenv) || access_mode_chk( pstmt ) ) { nnsql_resetyystmt(pstmt); return -1; } return 0; } int nnsql_column_descid(void* hstmt, int icol) { if( icol < 0 || icol > MAX_COLUMN_NUMBER ) return -1; return (((yystmt_t*)hstmt)->pcol)[icol].iattr; } static int do_insert(void* hstmt) { yystmt_t* pstmt = hstmt; char *body, *head, *value; node_t* node; int i, attridx; yypar_t* par; int subj_set = 0, from_set = 0; pstmt->count = 0; if( nntp_start_post( pstmt->hcndes) || nntp_send_head( pstmt->hcndes, "X-Newsreader", "NetNews SQL Agent v0.5") || nntp_send_head( pstmt->hcndes, "Newsgroups", pstmt->table ) ) return -1; for(i=0; ;i++) { head = (pstmt->ins_heads)[i]; if( ! head ) break; if( ! *head ) continue; attridx = nnsql_getcolidxbyname( head ); switch( attridx ) { case en_article_num: case en_x_newsreader: case en_newsgroups: case en_xref: case en_host: case en_date: case en_path: case en_lines: case en_msgid: /* better to let srv set id */ continue; case en_subject: subj_set = 1; break; case en_from: from_set = 1; break; case -1: /* an extended header */ break; default: /* any normal header */ head = nnsql_getcolnamebyidx(attridx); /* use stand representation */ break; } node = pstmt->ins_values + i; switch(node->type) { case en_nt_qstr: value = node->value.qstr; break; case en_nt_null: continue; case en_nt_param: par = pstmt->ppar + (node->value).ipar - 1; if(par->type != en_nt_qstr ) continue; value = (par->value).location; break; default: continue; } if( attridx == en_body ) { body = value; continue; } nntp_send_head(pstmt->hcndes, head, value); } if( !subj_set ) nntp_send_head(pstmt->hcndes, "Subject", "(none)"); if( !from_set ) nntp_send_head(pstmt->hcndes, "From", "(none)"); if( nntp_end_head (pstmt->hcndes) || nntp_send_body(pstmt->hcndes, body) || nntp_end_post (pstmt->hcndes) ) return -1; pstmt->count = 1; return 0; } int do_srch_delete(void* hstmt) { int r, i, rcnt; yystmt_t* pstmt = hstmt; yyattr_t* pattr = pstmt->pattr; pstmt->count = 0; for(;;) { r = yyfetch(hstmt, 1); switch(r) { case 100: pstmt->type = en_stmt_alloc; return 0; case -1: pstmt->type = en_stmt_alloc; return -1; case 0: r = nnsql_srchtree_evl(hstmt); switch(r) { case -1: pstmt->type = en_stmt_alloc; return -1; case 1: for(rcnt=0; r && rcnt<6; rcnt++) /* retry 6 times */ { if(rcnt && pstmt->count ) sleep(1 + rcnt); /* give server time to * finish previous DELETE */ r = nntp_cancel( pstmt->hcndes, pstmt->table, pattr[en_sender].value.location, pattr[en_from].value.location, pattr[en_msgid].value.location); } if( r ) return -1; pstmt->count++; continue; case 0: continue; default: abort(); break; } break; default: abort(); break; } break; } abort(); return -1; } int nnsql_execute(void* hstmt) { yystmt_t* pstmt = hstmt; yypar_t* par; int i; par = pstmt->ppar; if( !par && pstmt->npar ) return 99; for(i=0;inpar;i++) { par = pstmt->ppar + i; if(par->type == -1) return 99; } switch(pstmt->type) { case en_stmt_insert: return do_insert(hstmt); case en_stmt_srch_delete: case en_stmt_select: if( nnsql_srchtree_tchk(hstmt) || nnsql_opentable(hstmt, 0) ) break; if( pstmt->type == en_stmt_srch_delete ) return do_srch_delete(hstmt); return 0; default: break; } return -1; } int nnsql_isnullablecol( void* hstmt, int icol ) { switch( (((yystmt_t*)hstmt)->pcol + icol)->iattr ) { case en_subject: case en_from: case en_body: return 0; default: break; } return 1; } int nnsql_isnumcol(void* hstmt, int icol ) { switch( (((yystmt_t*)hstmt)->pcol + icol)->iattr ) { case en_lines: case en_article_num: case en_sql_count: case en_sql_num: return 1; default: break; } return 0; } int nnsql_isdatecol(void* hstmt, int icol) { switch( (((yystmt_t*)hstmt)->pcol + icol)->iattr ) { case en_date: case en_sql_date: return 1; default: break; } return 0; } long nnsql_getnum(void* hstmt, int icol ) { yystmt_t* pstmt = hstmt; yycol_t* pcol; pcol = ((yystmt_t*)hstmt)->pcol + icol; switch( pcol->iattr ) { case en_lines: case en_article_num: return ((pstmt->pattr + pcol->iattr)->value).number; case en_sql_num: return (pcol->value).num; case en_sql_count: return (pstmt->count); default: break; } return 0; } int nnsql_isstrcol(void* hstmt, int icol ) { return ! nnsql_isnumcol(hstmt, icol) && ! nnsql_isdatecol(hstmt, icol); } char* nnsql_getstr(void* hstmt, int icol ) { yystmt_t* pstmt = hstmt; yycol_t* pcol; pcol = ((yystmt_t*)hstmt)->pcol + icol; switch( pcol->iattr ) { case en_lines: case en_article_num: case en_sql_count: case en_sql_num: return 0; case en_sql_qstr: return (pcol->value).qstr; default: break; } return ((pstmt->pattr + pcol->iattr)->value).location; } date_t* nnsql_getdate(void* hstmt, int icol ) { yystmt_t* pstmt = hstmt; yycol_t* pcol; pcol = ((yystmt_t*)hstmt)->pcol + icol; switch( pcol->iattr ) { case en_date: return &(((pstmt->pattr + pcol->iattr)->value).date); case en_sql_date: return &((pcol->value).date); default: break; } return 0; } int nnsql_iscountcol(void* hstmt, int icol ) { return ( (((yystmt_t*)hstmt)->pcol + icol)->iattr == en_sql_count ); } int nnsql_isnullcol(void* hstmt, int icol ) { yystmt_t* pstmt = hstmt; yycol_t* pcol; long artnum; date_t* date; artnum = (pstmt->pattr->value).number; pcol = ((yystmt_t*)hstmt)->pcol + icol; switch( pcol->iattr ) { case en_sql_count: return !!artnum; case en_sql_num: case en_sql_qstr: case en_sql_date: case en_lines: case en_article_num: return !artnum; case en_date: date = nnsql_getdate(hstmt, icol); return !artnum || !date || !date->day; default: break; } return !artnum || !nnsql_getstr(hstmt, icol); } int nnsql_getcolnum(void* hstmt) { return ((yystmt_t*)hstmt)->ncol; } int nnsql_getparnum(void* hstmt) { return ((yystmt_t*)hstmt)->npar; } int nnsql_getrowcount(void* hstmt) { return ((yystmt_t*)hstmt)->count; } unixODBC-2.2.14-p2/Drivers/nn/yyerr.c0100644000076400007640000000263507363332155015561 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include #include "driver.h" #include "yyerr.ci" int nnsql_errcode(void* yystmt) { if( ! yystmt ) return -1; return ((yystmt_t*)yystmt)->errcode; } char* nnsql_errmsg(void* yystmt) { yystmt_t* pstmt = yystmt; int i, errcode; errcode = nnsql_errcode( yystmt ); switch( errcode ) { case 0: return nntp_errmsg(pstmt->hcndes); case -1: if( nntp_errcode(pstmt->hcndes) ) return nntp_errmsg(pstmt->hcndes); else return strerror( errno ); case PARSER_ERROR: return ((yystmt_t*)yystmt)->msgbuf; default: break; } for(i=0; ierrpos; } unixODBC-2.2.14-p2/Drivers/nn/yyevl.c0100644000076400007640000002641007363332155015554 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include #include #include #include #include typedef struct { int type; /* can only be en_nt_qstr, en_nt_num and en_nt_null */ union { char* qstr; long num; date_t date; } value; } leaf_t; static int getleaf(yystmt_t* yystmt, node_t* nd, leaf_t* lf) { yypar_t* par; yyattr_t* attr; switch( nd->type ) { case en_nt_attr: attr = yystmt->pattr + (nd->value).iattr; if( (nd->value).iattr == en_lines || (nd->value).iattr == en_article_num ) { lf->type = en_nt_num; (lf->value).num = (attr->value).number; break; } if( (nd->value).iattr == en_date ) { if( (attr->value).date.day ) { lf->type = en_nt_date; (lf->value).date = (attr->value).date; } else lf->type = en_nt_null; break; } if( (attr->value).location ) { lf->type = en_nt_qstr; (lf->value).qstr = (attr->value).location; } else lf->type = en_nt_null; break; case en_nt_param: par = yystmt->ppar + (nd->value).ipar - 1; if( par->type == en_nt_null ) { lf->type = en_nt_null; break; } if( par->type == en_nt_num ) { lf->type = en_nt_num; (lf->value).num = (par->value).number; break; } if( par->type == en_nt_qstr) { if( (par->value).location ) { lf->type = en_nt_qstr; (lf->value).qstr = (par->value).location; break; } lf->type = en_nt_null; break; } if( par->type == en_nt_date) { if( (par->value).date.day ) { lf->type = en_nt_date; (lf->value).date = (par->value).date; break; } lf->type = en_nt_null; } return -1; case en_nt_num: lf->type = en_nt_num; (lf->value).num = (nd->value).num; break; case en_nt_qstr: lf->type = en_nt_qstr; if( (nd->value).qstr ) { lf->type = en_nt_qstr; (lf->value).qstr = (nd->value).qstr; break; } lf->type = en_nt_null; break; case en_nt_date: lf->type = en_nt_date; (lf->value).date = (nd->value).date; break; case en_nt_null: lf->type = en_nt_null; break; default: return -1; } return 0; } #ifndef MAX_SIGNED_LONG # define MAX_SIGNED_LONG ((-1UL) >> 1) #endif # define AREA ( MAX_SIGNED_LONG + 1UL ) # define RANGE_ALL { 0, 1UL, MAX_SIGNED_LONG } # define RANGE_EMPTY { 1, 0UL, 0UL } # define ALL_RANGE(r) { r.flag = 0; \ r.min = 1UL; \ r.max = MAX_SIGNED_LONG; } # define EMPTY_RANGE(r) { r.flag = 1;\ r.min = r.max = 0UL; } # define IS_EMPTY_RANGE(r) \ (((r.min == 0UL) && (r.max==0UL))? 1:0) # define RANGE_MIN(a, b) ((((unsigned long)(a)) < ((unsigned long)(b)))? a:b) # define RANGE_MAX(a, b) ((((unsigned long)(a)) > ((unsigned long)(b)))? a:b) typedef struct { int flag; unsigned long min; unsigned long max; } range_t; static range_t range_and(range_t r1, range_t r2) { range_t r = RANGE_EMPTY; if( !(r.flag = r1.flag || r2.flag) ) return r; if( r1.min > r2.max || r1.max < r2.min ) return r; r.min = (RANGE_MAX(r1.min, r2.min))%AREA; r.max = (RANGE_MIN(r1.max, r2.max))%AREA; return r; } static range_t range_or(range_t r1, range_t r2) { range_t r = RANGE_ALL; if( !(r.flag = r1.flag || r2.flag) ) return r; if( !(r1.max/AREA) || !(r2.max/AREA) ) /* at least one of the rangion does not cross cell */ { unsigned long c1, c2; c1 = (r1.max/2) + (r1.min/2); /* central of rangion 1 */ c2 = (r2.max/2) + (r2.min/2); /* central of rangion 2 */ if( c1 > c2 && (c1 - c2) > (AREA/2) ) { /* shift it to the second cell */ r2.min += AREA; r2.max += AREA; } else if( c2 > c1 && (c2 - c1) > (AREA/2) ) { /* shift it to the second cell */ r1.min += AREA; r1.max += AREA; } } r.min = (RANGE_MIN(r1.min, r2.min))%AREA; r.max = (RANGE_MAX(r1.max, r2.max))%AREA; return r; } static range_t getrange(yystmt_t* yystmt, node_t* pnd) { range_t r = RANGE_ALL, r1, r2; node_t* tpnd = 0; leaf_t a, b; int flag = 0; if( !pnd ) return r; if( pnd->left && pnd->left->type == en_nt_attr && (pnd->left->value).iattr == en_article_num ) { r.flag = 1; switch( pnd->type ) { case en_nt_between: getleaf(yystmt, pnd->right->left, &a); getleaf(yystmt, pnd->right->right, &b); if( a.type == en_nt_null || b.type == en_nt_null ) break; r.min = RANGE_MIN(a.value.num, b.value.num); r.max = RANGE_MAX(a.value.num, b.value.num); break; case en_nt_in: EMPTY_RANGE(r); for(tpnd = pnd->right; tpnd; tpnd=tpnd->right) { getleaf(yystmt, tpnd, &a); if( a.type == en_nt_null ) continue; if( IS_EMPTY_RANGE(r) ) r.min = r.max = a.value.num; else { r.min = RANGE_MIN(r.min, a.value.num); r.max = RANGE_MAX(r.max, a.value.num); } } break; case en_nt_cmpop: getleaf(yystmt, pnd->right, &a); if( a.type == en_nt_null ) break; switch((pnd->value).cmpop) { case en_cmpop_eq: r.min = r.max = a.value.num; break; case en_cmpop_ne: r.min = (a.value.num + 1UL )%AREA; r.max = (a.value.num - 1UL + AREA)%AREA; break; case en_cmpop_gt: r.min = (a.value.num + 1UL)%AREA; break; case en_cmpop_lt: r.max = (a.value.num - 1UL + AREA)%AREA; r.min = (r.max)? 1UL:0UL; break; case en_cmpop_ge: r.min = a.value.num; break; case en_cmpop_le: r.max = a.value.num; r.min = (r.max)? 1UL:0UL; break; default: EMPTY_RANGE(r); break; } break; default: break; } return r; } if( pnd->type != en_nt_logop ) return r; switch( (pnd->value).logop ) { case en_logop_not: r1 = getrange(yystmt, pnd->right); if( r1.flag ) { r.min = (r1.max + 1UL)%AREA; r.max = (r1.min - 1UL + AREA)%AREA; } break; case en_logop_or: flag = 1; case en_logop_and: r1 = getrange(yystmt, pnd->left); r2 = getrange(yystmt, pnd->right); if( !(r1.flag || r2.flag ) ) break; if( r1.min > r1.max ) r1.max = r1.max + AREA; if( r2.min > r2.max ) r2.max = r2.max + AREA; if( flag ) r = range_or ( r1, r2 ); else r = range_and( r1, r2 ); break; default: EMPTY_RANGE(r); break; } return r; } void nnsql_getrange(void* hstmt, long* pmin, long* pmax) { yystmt_t* yystmt = hstmt; range_t r; r = getrange(hstmt, yystmt->srchtree); if( !r.flag ) { *pmin = 1UL; *pmax = MAX_SIGNED_LONG; } else { *pmin = r.min; *pmax = r.max; } } static int is_sql_null(yystmt_t* yystmt, node_t* a) { leaf_t lf; if( getleaf(yystmt, a, &lf) ) return -1; return (lf.type == en_nt_null); } static int compare(yystmt_t* yystmt, node_t* a, node_t* b, int op) { leaf_t la, lb; int diff, r; if( getleaf( yystmt, a, &la ) || getleaf( yystmt, b, &lb ) ) return -1; if( la.type == en_nt_date && lb.type == en_nt_qstr ) { lb.type = en_nt_date; if( nnsql_odbcdatestr2date(lb.value.qstr, &(lb.value.date)) ) return -1; } if( la.type != lb.type || la.type == en_nt_null || lb.type == en_nt_null ) return 0; switch( la.type ) { case en_nt_qstr: diff = STRCMP(la.value.qstr, lb.value.qstr); break; case en_nt_num: diff = la.value.num - lb.value.num; break; case en_nt_date: diff = nnsql_datecmp(&(la.value.date), &(lb.value.date)); break; default: abort(); return -1; } switch(op) { case en_cmpop_eq: r = !diff; break; case en_cmpop_ne: r = !!diff; break; case en_cmpop_gt: r = (diff>0)? 1:0; break; case en_cmpop_ge: r = (diff>=0)? 1:0; break; case en_cmpop_lt: r = (diff<0)? 1:0; break; case en_cmpop_le: r = (diff<=0)? 1:0; break; default: r = -1; break; } return r; } static int ch_case_cmp(char a, char b) { if( a >= 'a' && a <= 'z' ) a += ('A' - 'a'); if( b >= 'a' && b <= 'z' ) b += ('A' - 'a'); return (a - b); } static int strlike( char* str, char* pattern, char esc, int flag ) /* flag = 0: case sensitive */ { char c, cp; for(;;str++, pattern++) { c = *str; cp= *pattern; if( esc && cp == esc ) { cp = *pattern++; if( (!flag && (c - cp) ) || ( flag && ch_case_cmp(c, cp) ) ) return 0; if( !c ) return 1; continue; } switch(cp) { case 0: return !c; case '_': if(!c) return 0; break; case '%': if(! *(pattern + 1) ) return 1; for(;*str;str++) { if(strlike(str, pattern + 1, esc, flag)) return 1; } return 0; default: if( (!flag && (c - cp) ) || ( flag && ch_case_cmp(c, cp) ) ) return 0; break; } } } int nnsql_strlike(char* str, char* pattern, char esc, int flag) { return strlike(str, pattern, esc, flag); } static int evl_like(yystmt_t* yystmt, node_t* a, node_t* b, char esc, int flag) { leaf_t la, lb; if( getleaf(yystmt, a, &la ) || getleaf(yystmt, b, &lb ) ) return -1; if( la.type != en_nt_qstr || lb.type != en_nt_qstr ) return 0; return strlike(la.value.qstr, lb.value.qstr, esc, flag); } static int srchtree_evl(yystmt_t* yystmt, node_t* node) /* return -1: syserr, 0: fail, 1: true */ { int r, s, flag = 0; node_t* ptr; if( ! node ) return 1; switch( node->type ) { case en_nt_cmpop: return compare(yystmt, node->left, node->right, (node->value).cmpop); case en_nt_logop: switch( (node->value).logop ) { case en_logop_not: r = srchtree_evl(yystmt, node->right); if( r == -1 ) return -1; return ( ! r ); case en_logop_and: flag = 1; case en_logop_or: r = srchtree_evl(yystmt, node->left); s = srchtree_evl(yystmt, node->right); if( r == -1 || s == -1 ) return -1; if( flag ) return ( r && s ); else return ( r || s ); default: abort(); break; /* just for turn off the warning */ } break; /* just for turn off the warning */ case en_nt_isnull: return is_sql_null(yystmt, node->left); case en_nt_between: r = compare(yystmt, node->left, node->right->left, en_cmpop_ge); s = compare(yystmt, node->left, node->right->right, en_cmpop_le); if( r == -1 || s == -1 ) return -1; return ( r && s ); case en_nt_in: for(ptr=node->right; ptr; ptr=ptr->right) { r = compare(yystmt, node->left, ptr, en_cmpop_eq); if( r ) /* -1 or 1 */ return r; } return 0; case en_nt_caselike: flag = 1; case en_nt_like: return evl_like( yystmt, node->left, node->right, (node->value).esc, flag ); default: abort(); break; /* turn off the warning */ } return -1; /* just for turn off the warning */ } int nnsql_srchtree_evl(void* hstmt) { yystmt_t* yystmt = hstmt; return srchtree_evl(yystmt, yystmt->srchtree); } unixODBC-2.2.14-p2/Drivers/nn/yytchk.c0100644000076400007640000000715107363332155015720 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include #include #include #include #include #include static int getleaftype(yystmt_t* yystmt, node_t* nd) { yypar_t* par; yyattr_t* attr; switch( nd->type ) { case en_nt_attr: attr = yystmt->pattr + (nd->value).iattr; switch((nd->value).iattr) { case en_lines: case en_article_num: case en_sql_num: case en_sql_count: return en_nt_num; case en_date: case en_sql_date: return en_nt_date; default: break; } return en_nt_qstr; case en_nt_param: par = yystmt->ppar + (nd->value).ipar - 1; switch(par->type) { case en_nt_null: case en_nt_num: case en_nt_qstr: case en_nt_date: break; default: return -1; } return par->type; case en_nt_num: case en_nt_qstr: case en_nt_date: case en_nt_null: return nd->type; default: return -1; } } static int cmp_tchk(yystmt_t* yystmt, node_t* a, node_t* b) { int ta, tb; ta = getleaftype( yystmt, a ); tb = getleaftype( yystmt, b ); if( ta == -1 || tb == -1 ) return -1; if( ta == en_nt_date && tb == en_nt_qstr ) return 0; if( ta != tb && ta != en_nt_null && tb != en_nt_null ) return -1; return 0; } static int evl_like_tchk(yystmt_t* yystmt, node_t* a, node_t* b) { int ta, tb; ta = getleaftype(yystmt, a); tb = getleaftype(yystmt, b); if( tb == en_nt_null || tb == en_nt_null ) return 0; if( ta != en_nt_qstr || tb != en_nt_qstr ) return -1; return 0; } static int srchtree_tchk(yystmt_t* yystmt, node_t* node) /* return -1: err or syserr, 0: ok */ { int r, s, flag = 0; node_t* ptr; if( ! node ) return 0; switch( node->type ) { case en_nt_cmpop: return cmp_tchk(yystmt, node->left, node->right); case en_nt_logop: switch( (node->value).logop ) { case en_logop_not: return srchtree_tchk(yystmt, node->right); case en_logop_and: case en_logop_or: r = srchtree_tchk(yystmt, node->left); s = srchtree_tchk(yystmt, node->right); if( r == -1 || s == -1 ) return -1; return 0; default: abort(); break; /* just for turn off the warning */ } break; /* just for turn off the warning */ case en_nt_isnull: return 0; case en_nt_between: r = cmp_tchk(yystmt, node->left, node->right->left); s = cmp_tchk(yystmt, node->left, node->right->right); if( r == -1 || s == -1 ) return -1; return 0; case en_nt_in: for(ptr=node->right; ptr; ptr=ptr->right) { r = cmp_tchk(yystmt, node->left, ptr); if( r == -1 ) return -1; } return 0; case en_nt_caselike: case en_nt_like: return evl_like_tchk( yystmt, node->left, node->right); default: abort(); break; /* turn off the warning */ } return -1; /* just for turn off the warning */ } int nnsql_srchtree_tchk(void* hstmt) { yystmt_t* yystmt = hstmt; int r; r = srchtree_tchk(yystmt, yystmt->srchtree); if( r ) yystmt->errcode = TYPE_VIOLATION; return r; } unixODBC-2.2.14-p2/Drivers/nn/nncol.c0100644000076400007640000000337507363332154015521 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include #include #include "nncol.ci" int nnsql_getcolidxbyname( char* col_name ) { int i; for( i= 0; nncol_info_tab[i].idx != en_sql_count; i++ ) { if(upper_strneq( col_name, nncol_info_tab[i].name, 16)) return nncol_info_tab[i].idx; } return -1; } char* nnsql_getcolnamebyidx( int idx ) { int i; if( nncol_info_tab[idx].idx == idx ) return nncol_info_tab[idx].name; for(i=0; nncol_info_tab[i].idx != en_sql_count;i++) { if( nncol_info_tab[i].idx == idx ) return nncol_info_tab[i].name; } return 0; } void* nnsql_getcoldescbyidx( int idx ) { int i; if( nncol_info_tab[idx].idx == idx ) return &(nncol_info_tab[idx]); for(i=0; iname; } int nnsql_getcoldatatypebydesc( void* hdesc ) { col_desc_t* desc = hdesc; return desc->datatype; } int nnsql_getcolnullablebydesc( void* hdesc ) { col_desc_t* desc = hdesc; return desc->nullable; } unixODBC-2.2.14-p2/Drivers/nn/nndate.c0100644000076400007640000000560707363332154015661 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include #include static char* month_name[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; static int nndate2date(char* str, date_t* date) { int i; char buf[4]; date_t dt; if( STRLEN(str) < STRLEN("yyyy m d") ) return -1; sscanf(str, "%d %s %d", &(dt.day), buf, &(dt.year)); if( dt.year < 100 && dt.year > 0 ) dt.year += 1900; if( dt.day <= 0 || dt.day > 31 ) return -1; if(i = atoi(buf)) { dt.month = i; if( i <= 0 || i > 12 ) return -1; *date = dt; date->month = i; return 0; } for(i=0;i<12;i++) { if( upper_strneq(buf, month_name[i], 3) ) { *date = dt; date->month = i+1; return 0; } } return -1; } int nnsql_nndatestr2date(char* str, date_t* date) /* convert 'dd mm year' or 'week, dd mm year' to date struct */ { int r; date_t dt; if( !str ) { if(date) date->day = 0; return 0; } if(atoi(str)) r = nndate2date(str, &dt); /* a 'dd mm year' string */ else r = nndate2date(str+5, &dt); /* a 'week, dd mm year' string */ if( r ) dt.day = 0; if( date ) *date = dt; return r; } int nnsql_datecmp(date_t* a, date_t* b) { int r; if( (r = a->year - b->year) ) return r; if( (r = a->month- b->month) ) return r; return (a->day - b->day); } int nnsql_odbcdatestr2date(char* str, date_t* date) /* convert 'yyyy-m-d', 'yyyy-mm-dd' or 'yyyy-mmm-dd' or even 'yyyy/mm/dd' * string to date struct */ { date_t dt; int i; if( ! str ) { if( date ) date->day = 0; return 0; } if( STRLEN(str) < STRLEN("yyyy-m-d") ) { if( date ) date->day = 0; return -1; } dt.day = 0; dt.year = atoi(str); str += 5; dt.month = atoi(str); if( dt.month < 0 || dt.month > 12 ) { if(date) date->day = 0; return -1; } if(! dt.month) /* jan to dec */ { for(i=0;i<12;i++) { if( upper_strneq(str, month_name[i], 3) ) { dt.month = i+1; break; } } if( ! dt.month ) { if(date) date->day = 0; return -1; } str += 4; } else { if( *str == '0' || dt.month > 9 ) /* 01 to 12 */ str += 3; else /* 1 to 9 */ str += 2; } dt.day = atoi(str); if( dt.day <= 0 || dt.day > 31 ) { if(date) date->day = 0; return -1; } if(date) *date = dt; return 0; } unixODBC-2.2.14-p2/Drivers/nn/nntp.c0100644000076400007640000003406707363332154015371 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #include #include #include #include # include "nntp.ci" #ifndef WINSOCK # include # include # include # include #else # include #endif #include typedef struct { long article_num; long data; } nntp_xhdridx_t; typedef struct { char* header; long start; long end; int count; nntp_xhdridx_t* idxs; char* buf; } nntp_xhdrinfo_t; typedef struct { void* sin; void* sout; int postok; int code; /* group info */ long start; long end; int count; /* access mode */ int mode; } nntp_cndes_t; void* nntp_connect( char* server ) { int sock, err; char msgbuf[128]; struct sockaddr_in srvaddr; nntp_cndes_t* cndes; #ifdef WINSOCK WSADATA winsock_data; # ifndef WINSOCKVERSION # define WINSOCKVERSION ( 0x0101 ) /* default version 1.1 */ # endif if( WSAStartup((WORD)WINSOCKVERSION, &winsock_data) ) return 0; /* fail to init winsock */ #endif if( atoi(server) > 0 ) /* an IP address */ { srvaddr.sin_family = AF_INET; srvaddr.sin_addr.s_addr = inet_addr(server); } else /* a domain name */ { struct hostent* ph; if( ! (ph = gethostbyname( server )) ) return 0; srvaddr.sin_family = ph->h_addrtype; memcpy( (char*)&srvaddr.sin_addr, (char*)ph->h_addr, ph->h_length); } cndes = (nntp_cndes_t*)MEM_ALLOC(sizeof(nntp_cndes_t)); if( ! cndes ) return 0; srvaddr.sin_port = htons(119); if( (sock = socket( AF_INET, SOCK_STREAM, 0)) == -1 ) { MEM_FREE(cndes); return 0; } if( connect( sock, (struct sockaddr*)&srvaddr, sizeof(srvaddr) ) == -1 ) { SOCK_CLOSE( sock ); MEM_FREE(cndes); return 0; } if( ! (cndes->sin = SOCK_FDOPEN( sock, "r")) ) { SOCK_CLOSE( sock ); MEM_FREE(cndes); return 0; } if( ! (cndes->sout = SOCK_FDOPEN( sock, "w")) ) { SOCK_FCLOSE( cndes->sin ); MEM_FREE(cndes); return 0; } if( ! SOCK_FGETS(msgbuf, sizeof(msgbuf), cndes->sin ) ) { SOCK_FCLOSE( cndes->sin ); SOCK_FCLOSE( cndes->sout ); MEM_FREE(cndes); return 0; } /* a patch from Julia Anne Case */ SOCK_FPUTS("MODE READER\r\n", cndes->sout); if( SOCK_FFLUSH(cndes->sout) == EOF ) return 0; if( ! SOCK_FGETS(msgbuf, sizeof(msgbuf), cndes->sin ) ) { SOCK_FCLOSE( cndes->sin ); SOCK_FCLOSE( cndes->sout ); MEM_FREE(cndes); return 0; } switch( atoi( msgbuf ) ) { case NNTP_POST_CONN_OK: cndes->postok = 1; break; case NNTP_READ_CONN_OK: cndes->postok = 0; break; default: SOCK_FCLOSE( cndes->sin ); SOCK_FCLOSE( cndes->sout ); MEM_FREE(cndes); return 0; } cndes->code = 0; /* group info */ cndes->start= 0L; cndes->end = 0L; cndes->count= 0; cndes->mode = 0; return (void*)cndes; } void nntp_close(void* hcndes) { nntp_cndes_t* pcndes = (nntp_cndes_t*)hcndes; char msgbuf[128]; SOCK_FPUTS( "QUIT\r\n", pcndes->sout ); SOCK_FFLUSH( pcndes->sout ); SOCK_FGETS(msgbuf, sizeof(msgbuf), pcndes->sin ); SOCK_FCLOSE( pcndes->sin ); SOCK_FCLOSE( pcndes->sout ); MEM_FREE( hcndes ); #ifdef WINSOCK WSACleanup(); #endif } int nntp_errcode( void* hcndes ) { if( ! hcndes ) return -1; return ((nntp_cndes_t*)hcndes)->code; } char* nntp_errmsg( void* hcndes ) { int i, errcode; errcode = nntp_errcode( hcndes ); switch( errcode ) { case 0: return 0; case -1: return strerror( errno ); default: break; } for(i=0;ipostok; } int nntp_group( void* hcndes, char* grpnam ) { nntp_cndes_t* pcndes = hcndes; char response[64]; int code; pcndes->code = -1; /* system error */ SOCK_FPRINTF( pcndes->sout, "GROUP %s\r\n", grpnam); if( SOCK_FFLUSH( pcndes->sout ) == EOF ) return -1; if( ! SOCK_FGETS( response, sizeof( response ), pcndes->sin ) ) return -1; code = atoi(response); if( code != NNTP_GROUP_OK ) { pcndes->code = code; return -1; } sscanf( response, "%d%d%ld%ld", &code, &(pcndes->count), &(pcndes->start), &(pcndes->end)); pcndes->code = 0; return 0; } char* nntp_body( void* hcndes, long msgnum, char* msgid) { nntp_cndes_t* pcndes = hcndes; char tmsgbuf[128]; int code; char* body; int totsize, freesize, offset; pcndes->code = -1; if( msgnum > 0 ) SOCK_FPRINTF(pcndes->sout, "BODY %ld\r\n", msgnum ); else if( msgid ) SOCK_FPRINTF(pcndes->sout, "BODY %s\r\n", msgid ); else { SOCK_FPUTS("BODY\r\n", pcndes->sout); } if( SOCK_FFLUSH( pcndes->sout ) == EOF ) return 0; if( ! SOCK_FGETS(tmsgbuf, sizeof(tmsgbuf), pcndes->sin ) ) return 0; code = atoi(tmsgbuf); if( code != NNTP_BODY_OK ) { pcndes->code = code; return 0; } body = MEM_ALLOC(BODY_CHUNK_SIZE); if( !body ) abort(); totsize = freesize = BODY_CHUNK_SIZE; offset = 0; for(;;) { if( freesize <= BODY_CHUNK_SIZE/2 ) { totsize += BODY_CHUNK_SIZE; freesize += BODY_CHUNK_SIZE; body = MEM_REALLOC(body, totsize); if( ! body ) abort(); } if( ! SOCK_FGETS( body + offset, freesize, pcndes->sin ) ) return 0; if( STREQ( body+offset, ".\r\n") ) { *(body+offset) = 0; break; } /* strip off CR i.e '\r' */ offset += STRLEN(body+offset) - 1; freesize = totsize - offset; body[offset-1] = '\n'; } return body; } int nntp_next( void* hcndes ) { nntp_cndes_t* pcndes = hcndes; char tmsgbuf[128]; int code; pcndes->code = -1; SOCK_FPUTS("NEXT\r\n", pcndes->sout); if( SOCK_FFLUSH( pcndes->sout ) == EOF ) return -1; if( ! SOCK_FGETS( tmsgbuf, sizeof(tmsgbuf), pcndes->sin) ) return -1; pcndes->code = atoi(tmsgbuf); switch( pcndes->code ) { case NNTP_END_OF_GROUP: return 100; case NNTP_NEXT_OK: return 0; default: break; } return -1; } int nntp_last( void* hcndes ) { nntp_cndes_t* pcndes = hcndes; char tmsgbuf[128]; int code, sock; char* body; int size; pcndes->code = -1; SOCK_FPUTS("LAST\r\n", pcndes->sout); if( SOCK_FFLUSH( pcndes->sout ) == EOF ) return -1; if( ! SOCK_FGETS( tmsgbuf, sizeof(tmsgbuf), pcndes->sin) ) return -1; pcndes->code = atoi(tmsgbuf); switch( pcndes->code ) { case NNTP_TOP_OF_GROUP: return 100; case NNTP_LAST_OK: return 0; default: break; } return -1; } static int nntp_xhdr( void* hcndes, nntp_xhdrinfo_t* xhdr_data) { nntp_cndes_t* pcndes = hcndes; char tbuf[128]; int totsize, freesize; int flag; char* ptr; pcndes->code = -1; xhdr_data->count = 0; SOCK_FPRINTF( pcndes->sout, "XHDR %s %ld-%ld\r\n", xhdr_data->header, xhdr_data->start, xhdr_data->end ); if( SOCK_FFLUSH( pcndes->sout ) == EOF ) return -1; if( ! SOCK_FGETS( tbuf, sizeof(tbuf), pcndes->sin ) ) return -1; pcndes->code = atoi(tbuf); if( pcndes->code != NNTP_XHDR_OK ) return -1; flag = upper_strneq(xhdr_data->header, "lines", 6); if( flag ) { xhdr_data->buf = 0; } else { totsize = freesize = XHDR_CHUNK_SIZE; xhdr_data->buf = MEM_ALLOC(totsize); if( ! xhdr_data->buf ) return -1; ptr = xhdr_data->buf; } for(xhdr_data->count=0;;xhdr_data->count++) { int num; if( flag ) { if( ! SOCK_FGETS(tbuf, sizeof(tbuf), pcndes->sin) ) return -1; if( STRNEQ(tbuf, ".\r\n", 3) ) break; sscanf(tbuf, "%ld%ld", &(xhdr_data->idxs[xhdr_data->count].article_num), &(xhdr_data->idxs[xhdr_data->count].data) ); } else { if( freesize < XHDR_CHUNK_SIZE/2 ) { int offset; totsize += XHDR_CHUNK_SIZE; freesize += XHDR_CHUNK_SIZE; offset = (int)(ptr - xhdr_data->buf); xhdr_data->buf = MEM_REALLOC( xhdr_data->buf, totsize ); if( ! xhdr_data->buf ) return -1; ptr = xhdr_data->buf + offset; } if( ! SOCK_FGETS(ptr, freesize, pcndes->sin ) ) return -1; if( STRNEQ(ptr, ".\r\n", 3) ) break; sscanf( ptr, "%ld%n", &(xhdr_data->idxs[xhdr_data->count].article_num), &num); if( STREQ( ptr + num + 1, "(none)\r\n") ) { xhdr_data->idxs[xhdr_data->count].data = 0; ptr += (num + 1); } else { xhdr_data->idxs[xhdr_data->count].data = ptr - xhdr_data->buf + num + 1; ptr += (STRLEN(ptr) - 1); } ptr[-1] = 0; freesize = totsize - (int)(ptr - xhdr_data->buf); } } return 0; } typedef struct { void* hcndes; char header[20]; nntp_xhdrinfo_t* hdrinfo; long position; long last; } nntp_header_t; void* nntp_openheader(void* hcndes, char* header, long* tmin, long* tmax) { nntp_cndes_t* pcndes = hcndes; nntp_header_t* hd; long start; pcndes->code = -1; hd = (nntp_header_t*)MEM_ALLOC(sizeof(nntp_header_t)); if( !hd ) return 0; hd->hcndes = hcndes; STRCPY(hd->header, header); hd->last = pcndes->end; hd->hdrinfo = (nntp_xhdrinfo_t*)MEM_ALLOC(sizeof(nntp_xhdrinfo_t)); if( !hd->hdrinfo ) { MEM_FREE( hd ); return 0; } start = pcndes->start; if( *tmax < *tmin ) { #ifndef MAX_SIGNED_LONG # define MAX_SIGNED_LONG ( (-1UL) >> 1 ) #endif if( start < *tmax || start > *tmin ) *tmin = start; *tmax = MAX_SIGNED_LONG; } if( *tmin < start ) *tmin = start; if( *tmin == MAX_SIGNED_LONG ) *tmin = *tmax = 0L; hd->hdrinfo->header = hd->header; hd->hdrinfo->start = 0L; hd->hdrinfo->end = *tmin - 1L; hd->hdrinfo->count = 0; hd->hdrinfo->idxs = (nntp_xhdridx_t*)MEM_ALLOC( sizeof(nntp_xhdridx_t)*NNTP_HEADER_CHUNK); if( ! hd->hdrinfo->idxs ) { MEM_FREE( hd->hdrinfo ); MEM_FREE( hd ); return 0; } hd->hdrinfo->buf = 0; hd->position = 0; return hd; } void nntp_closeheader(void* hh) { nntp_header_t* ph = hh; if( !hh ) return; if( ph->hdrinfo ) { MEM_FREE( ph->hdrinfo->idxs ); MEM_FREE( ph->hdrinfo->buf ); MEM_FREE( ph->hdrinfo ); } MEM_FREE( hh ); } int nntp_fetchheader( void* hh, long* artnum, long* data, void* hrh) { nntp_header_t* ph = hh; nntp_header_t* prh= hrh; /* reference header */ nntp_cndes_t* pcndes; long position; long ldata; if(! hh ) return -1; pcndes = ph->hcndes; position = ph->position; pcndes->code = -1; if( ph->hdrinfo->start >= ph->last ) return 100; if( prh ) { if( ph->hdrinfo->end != prh->hdrinfo->end ) { MEM_FREE(ph->hdrinfo->buf); ph->hdrinfo->buf = 0; ph->hdrinfo->start = prh->hdrinfo->start; ph->hdrinfo->end = prh->hdrinfo->end; if( nntp_xhdr( pcndes, ph->hdrinfo ) ) return -1; } position = ph->position = prh->position-1; } else if( ph->hdrinfo->count == position ) { MEM_FREE(ph->hdrinfo->buf); ph->hdrinfo->buf = 0; for(;;) { ph->hdrinfo->start = ph->hdrinfo->end + 1; ph->hdrinfo->end = ph->hdrinfo->end + NNTP_HEADER_CHUNK; ph->hdrinfo->count = 0; position = ph->position = 0; if( ph->hdrinfo->start > ph->last ) return 100; if( nntp_xhdr( pcndes, ph->hdrinfo ) ) return -1; if( ph->hdrinfo->count ) break; } } if( artnum ) *artnum = (ph->hdrinfo->idxs)[position].article_num; ldata = (ph->hdrinfo->idxs)[position].data; if( ldata ) ldata = (long)(ph->hdrinfo->buf) + ldata; if( data ) *data = ldata; ph->position ++; return 0; } int nntp_start_post(void* hcndes) { nntp_cndes_t* pcndes = hcndes; char msgbuf[128]; int i; pcndes->code = -1; if( ! nntp_postok(hcndes) ) { pcndes->code = NNTP_CANNOT_POST; return -1; } SOCK_FPUTS( "POST\r\n", pcndes->sout ); if( SOCK_FFLUSH( pcndes->sout ) == EOF ) return -1; if( ! SOCK_FGETS(msgbuf, sizeof(msgbuf), pcndes->sin) ) return -1; pcndes->code = atoi(msgbuf); if(pcndes->code != NNTP_POSTING ) return -1; return 0; } int nntp_send_head(void* hcndes, char* head_name, char* head) { nntp_cndes_t* pcndes = hcndes; int i; for(i=0;head[i];i++) /* to make sure there is no new line char in a head string * here, head must be pointed to a writeable area and don't * care whether it will be overwritten after posting */ { if( head[i] == '\n' ) { head[i] = 0; break; } } SOCK_FPRINTF( pcndes->sout, "%s: %s\n", head_name, head); return 0; } int nntp_end_head(void* hcndes) { nntp_cndes_t* pcndes = hcndes; SOCK_FPUTS("\n", pcndes->sout); return 0; } int nntp_send_body(void* hcndes, char* body) { nntp_cndes_t* pcndes = hcndes; char* ptr; for(ptr=body;*ptr;ptr++) /* we require the article body buffer is located in a * writeable area and can be overwritten during the * post action. */ { if( *ptr == '\n' ) { if( STRNEQ( ptr, "\n.\n", 3) || STRNEQ( ptr, "\n.\r\n", 4 ) ) { *ptr = 0; break; } } } SOCK_FPUTS(body, pcndes->sout); return 0; } int nntp_end_post(void* hcndes) { nntp_cndes_t* pcndes = hcndes; char msgbuf[128]; pcndes->code = -1; SOCK_FPUTS("\r\n.\r\n", pcndes->sout); if( SOCK_FFLUSH(pcndes->sout) == EOF ) return -1; if( ! SOCK_FGETS(msgbuf, sizeof(msgbuf), pcndes->sin) ) return -1; pcndes->code = atoi(msgbuf); if( pcndes->code != NNTP_POST_OK ) return -1; return 0; } int nntp_cancel( void* hcndes, char* group, char* sender, char* from, char* msgid ) { char msgbuf[128]; if( ! from ) from = "(none)"; sprintf( msgbuf, "cancel %s", msgid); if( nntp_start_post(hcndes) || nntp_send_head(hcndes, "Newsgroups", group) || ( sender && nntp_send_head(hcndes, "Sender", sender) ) || nntp_send_head(hcndes, "From", from) || nntp_send_head(hcndes, "Control", msgbuf) || nntp_end_head(hcndes) || nntp_end_post(hcndes) ) return -1; return 0; } void nntp_setaccmode(void* hcndes, int mode) { nntp_cndes_t* pcndes = hcndes; pcndes->mode = mode; } int nntp_getaccmode(void* hcndes ) { nntp_cndes_t* pcndes = hcndes; return pcndes->mode; } unixODBC-2.2.14-p2/Drivers/nn/config.h0100644000076400007640000000701607363332154015656 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _CONFIG_H #define _CONFIG_H # if !defined(WINDOWS) && !defined(WIN32_SYSTEM) # define _UNIX_ # include # include # include # define MEM_ALLOC(size) (malloc((size_t)(size))) # define MEM_FREE(ptr) {if(ptr) free(ptr);} # define MEM_REALLOC(ptr, size) (ptr? realloc(ptr, size):malloc(size)) # define STRCPY(t, s) (strcpy((char*)(t), (char*)(s))) # define STRNCPY(t,s,n) (strncpy((char*)(t), (char*)(s), (size_t)(n))) # define STRCAT(t, s) (strcat((char*)(t), (char*)(s))) # define STRNCAT(t,s,n) (strncat((char*)(t), (char*)(s), (size_t)(n))) # define STRCMP(a, b) strcmp((char*)(a), (char*)(b)) # define STRNCMP(a,b,n) strncmp((char*)(a), (char*)(b), n) # define STREQ(a, b) (strcmp((char*)(a), (char*)(b)) == 0) # define STRNEQ(a,b,n) (strncmp((char*)(a), (char*)(b), n)==0) # define STRLEN(str) ((str)? strlen((char*)(str)):0) # define MEM_SET(p,c,n) (memset((char*)p, (int)c, (int)n)) # define EXPORT # define CALLBACK # define FAR typedef signed short SSHORT; typedef short WORD; typedef long DWORD; typedef WORD WPARAM; typedef DWORD LPARAM; typedef void* HWND; typedef int BOOL; # endif /* _UNIX_ */ /* for nntp driver */ # ifdef WINSOCK # define SOCK_CLOSE(sd) closesocket(sock) # define SOCK_FDOPEN(fd, mode) wsa_fdopen(fd, mode) # define SOCK_FCLOSE(stream) wsa_fclose(stream) # define SOCK_FGETS(buf, size, stream) wsa_fgets(buf, size, stream) # define SOCK_FPUTS(str, stream) wsa_fputs(str, stream) # define SOCK_FPRINTF wsa_fprintf # define SOCK_FFLUSH(stream) wsa_fflush(stream) # else # include # define SOCK_CLOSE(sd) close(sd) # define SOCK_FDOPEN(fd, mode) fdopen(fd, mode) # define SOCK_FCLOSE(stream) fclose(stream) # define SOCK_FGETS(buf, size, stream) fgets(buf, size, stream) # define SOCK_FPUTS(str, stream) fputs(str, stream) # define SOCK_FPRINTF fprintf # define SOCK_FFLUSH(stream) fflush(stream) # endif # if defined(WINDOWS) || defined(WIN32_SYSTEM) # include # include # ifdef _MSVC_ # define MEM_ALLOC(size) (fmalloc((size_t)(size))) # define MEM_FREE(ptr) ((ptr)? ffree((PTR)(ptr)):0)) # define STRCPY(t, s) (fstrcpy((char FAR*)(t), (char FAR*)(s))) # define STRNCPY(t,s,n) (fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n))) # define STRLEN(str) ((str)? fstrlen((char FAR*)(str)):0) # define STREQ(a, b) (fstrcmp((char FAR*)(a), (char FAR*)(b) == 0) # endif # ifdef _BORLAND_ # define MEM_ALLOC(size) (farmalloc((unsigned long)(size)) # define MEM_FREE(ptr) ((ptr)? farfree((void far*)(ptr)):0) # define STRCPY(t, s) (_fstrcpy((char FAR*)(t), (char FAR*)(s))) # define STRNCPY(t,s,n) (_fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n))) # define STRLEN(str) ((str)? _fstrlen((char FAR*)(str)):0) # define STREQ(a, b) (_fstrcmp((char FAR*)(a), (char FAR*)(b) == 0) # endif # endif /* WINDOWS */ #endif unixODBC-2.2.14-p2/Drivers/nn/connect.h0100644000076400007640000000177107363332154016044 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _CONNECT_H # define _CONNECT_H extern int nnodbc_attach_stmt(void* hdbc, void* hstmt); extern int nnodbc_detach_stmt(void* hdbc, void* hstmt); extern void* nnodbc_getenverrstack(void* henv); extern void* nnodbc_getdbcerrstack(void* hdbc); extern void nnodbc_pushdbcerr(void* hdbc, int code, char* msg); extern void* nnodbc_getnntpcndes(void* hdbc); #endif unixODBC-2.2.14-p2/Drivers/nn/convert.h0100644000076400007640000000151707363332154016071 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _CONVERT_H # define _CONVERT_H typedef char* (*fptr_t)(); extern fptr_t nnodbc_get_c2sql_cvt(int ctype, int sqltype); extern fptr_t nnodbc_get_sql2c_cvt(int sqltype, int ctype); #endif unixODBC-2.2.14-p2/Drivers/nn/driver.h0100644000076400007640000000412307363332154015700 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _H_DRIVER #define _H_DRIVER #include "config.h" #include "isql.h" #include "isqlext.h" #include "convert.h" #include "yystmt.h" #include "yyerr.h" #include "yyenv.h" #include "hstmt.h" #include "herr.h" typedef struct GSTMT { void* hdbc; void* hstmt; struct GSTMT* next; } gstmt_t; typedef struct DBC { void* hcndes; void* henv; gstmt_t* stmt; void* herr; struct DBC* next; } dbc_t; typedef struct { void* hdbc; void* herr; } env_t; typedef struct { int bind; short type; unsigned long coldef; short scale; char* userbuf; long userbufsize; long* pdatalen; int ctype; int sqltype; fptr_t cvt; /* c to sql type convert function */ /* for SQLPutData() on SQL_CHAR, SQL_VARCHAR, SQL_LONGVARCHAR */ char* putdtbuf; int putdtlen; int need; } param_t; typedef struct { short ctype; char* userbuf; long userbufsize; long* pdatalen; long offset; /* getdata offset */ } column_t; typedef struct { void* herr; void* hdbc; column_t* pcol; /* user bound columns */ param_t* ppar; /* user bound parameters */ int ndelay; /* number of delay parameters */ void* yystmt; /* sql layer object handle */ int refetch; /* need refetch */ int putipar; } stmt_t; #include "connect.h" #include "nnsql.h" #include "nntp.h" char* getkeyvalbydsn( char* dsn, int dsnlen, char* keywd, char* value, int size ); char* getkeyvalinstr( char* cnstr, int cnlen, char* keywd, char* value, int size ); #endif unixODBC-2.2.14-p2/Drivers/nn/herr.h0100644000076400007640000000472307363332154015353 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _HERR_H # define _HERR_H enum { en_00000 = 0, en_01000, en_01002, en_01004, en_01006, en_01S00, en_01S01, en_01S02, en_01S03, en_01S04, en_07001, en_07006, en_08001, en_08002, en_08003, en_08004, en_08007, en_08S01, en_0A000, en_21S01, en_21S02, en_22001, en_22003, en_22005, en_22008, en_22012, en_22026, en_23000, en_24000, en_25000, en_28000, en_34000, en_37000, en_3C000, en_40001, en_42000, en_70100, en_IM001, en_IM002, en_IM003, en_IM004, en_IM005, en_IM006, en_IM007, en_IM008, en_IM009, en_IM010, en_IM011, en_IM012, en_IM013, en_IM014, en_S0001, en_S0002, en_S0011, en_S0012, en_S0021, en_S0022, en_S0023, en_S1000, en_S1001, en_S1002, en_S1003, en_S1004, en_S1008, en_S1009, en_S1010, en_S1011, en_S1012, en_S1015, en_S1090, en_S1091, en_S1092, en_S1093, en_S1094, en_S1095, en_S1096, en_S1097, en_S1098, en_S1099, en_S1100, en_S1101, en_S1103, en_S1104, en_S1105, en_S1106, en_S1107, en_S1108, en_S1109, en_S1110, en_S1111, en_S1C00, en_S1T00 }; extern void* nnodbc_pusherr (void* stack, int code, char* msg); extern void nnodbc_poperr (void* stack); extern int nnodbc_errstkempty (void* stack); extern int nnodbc_getsqlstatcode (void* stack); extern char* nnodbc_getsqlstatstr (void* stack); extern char* nnodbc_getsqlstatmsg (void* stack); extern int nnodbc_getnativcode (void* stack); extern char* nnodbc_getnativemsg (void* stack); extern void* nnodbc_clearerr (void* stack); # define PUSHSQLERR(stack, stat) \ stack = nnodbc_pusherr(stack, stat, 0) # define PUSHSYSERR(stack, code, msg) \ stack = nnodbc_pusherr(stack, code, msg) # define UNSET_ERROR(stack) \ nnodbc_errstkunset(stack) # define CLEAR_ERROR(stack) \ stack = nnodbc_clearerr(stack) # define NNODBC_ERRHEAD "[NetNews ODBC][NNODBC driver]" #endif /* _HERR_H */ unixODBC-2.2.14-p2/Drivers/nn/hstmt.h0100644000076400007640000000153607363332154015551 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _HSTMT_H # define _HSTMT_H extern int nnodbc_sqlfreestmt(void* hstmt, int flag); extern int nnodbc_sqlprepare(void* hstmt, char* str, int len); extern void* nnodbc_getstmterrstack(void* hstmt); #endif unixODBC-2.2.14-p2/Drivers/nn/isql.h0100644000076400007640000000427110564052117015354 0ustar nicknick#ifndef _INTRINSIC_SQL_H #define _INTRINSIC_SQL_H typedef unsigned char UCHAR; #if (SIZEOF_LONG_INT == 4) typedef long int SDWORD; typedef unsigned long int UDWORD; #else typedef int SDWORD; typedef unsigned int UDWORD; #endif typedef short int SWORD; typedef unsigned short int UWORD; typedef void FAR* PTR; typedef void FAR* HENV; typedef void FAR* HDBC; typedef void FAR* HSTMT; typedef signed short RETCODE; #ifdef WIN32 #define SQL_API __stdcall #else #define SQL_API EXPORT CALLBACK #endif #define ODBCVER 0x0200 #define SQL_MAX_MESSAGE_LENGTH 512 #define SQL_MAX_DSN_LENGTH 32 /* return code */ #define SQL_INVALID_HANDLE (-2) #define SQL_ERROR (-1) #define SQL_SUCCESS 0 #define SQL_SUCCESS_WITH_INFO 1 #define SQL_NO_DATA_FOUND 100 /* standard SQL datatypes (agree with ANSI type numbering) */ #define SQL_CHAR 1 #define SQL_NUMERIC 2 #define SQL_DECIMAL 3 #define SQL_INTEGER 4 #define SQL_SMALLINT 5 #define SQL_FLOAT 6 #define SQL_REAL 7 #define SQL_DOUBLE 8 #define SQL_VARCHAR 12 #define SQL_TYPE_MIN SQL_CHAR #define SQL_TYPE_NULL 0 #define SQL_TYPE_MAX SQL_VARCHAR /* C to SQL datatype mapping */ #define SQL_C_CHAR SQL_CHAR #define SQL_C_LONG SQL_INTEGER #define SQL_C_SHORT SQL_SMALLINT #define SQL_C_FLOAT SQL_REAL #define SQL_C_DOUBLE SQL_DOUBLE #define SQL_C_DEFAULT 99 #define SQL_NO_NULLS 0 #define SQL_NULLABLE 1 #define SQL_NULLABLE_UNKNOWN 2 /* some special length values */ #define SQL_NULL_DATA (-1) #define SQL_DATA_AT_EXEC (-2) #define SQL_NTS (-3) /* SQLFreeStmt flag values */ #define SQL_CLOSE 0 #define SQL_DROP 1 #define SQL_UNBIND 2 #define SQL_RESET_PARAMS 3 /* SQLTransact flag values */ #define SQL_COMMIT 0 #define SQL_ROLLBACK 1 /* SQLColAttributes flag values */ #define SQL_COLUMN_COUNT 0 #define SQL_COLUMN_LABEL 18 #define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL #define SQL_COLUMN_DRIVER_START 1000 #define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT /* Null handles */ #define SQL_NULL_HENV 0 #define SQL_NULL_HDBC 0 #define SQL_NULL_HSTMT 0 #endif unixODBC-2.2.14-p2/Drivers/nn/isqlext.h0100644000076400007640000002076607363332154016111 0ustar nicknick#ifndef _INTRINSIC_SQLEXT_H # define _INTRINSIC_SQLEXT_H # include # define SQL_STILL_EXECUTING 2 # define SQL_NEED_DATA 99 /* extend SQL datatypes */ # define SQL_DATE 9 # define SQL_TIME 10 # define SQL_TIMESTAMP 11 # define SQL_LONGVARCHAR (-1) # define SQL_BINARY (-2) # define SQL_VARBINARY (-3) # define SQL_LONGVARBINARY (-4) # define SQL_BIGINT (-5) # define SQL_TINYINT (-6) # define SQL_BIT (-7) /* conflict with SQL3 ??? */ # define SQL_TYPE_DRIVER_START (-80) /* C to SQL datatype mapping */ # define SQL_C_DATE SQL_DATE # define SQL_C_TIME SQL_TIME # define SQL_C_TIMESTAMP SQL_TIMESTAMP # define SQL_C_BINARY SQL_BINARY # define SQL_C_BIT SQL_BIT # define SQL_C_TINYINT SQL_TINYINT # define SQL_SIGNED_OFFSET (-20) # define SQL_UNSIGNED_OFFSET (-22) # define SQL_C_SLONG (SQL_C_LONG + SQL_SIGNED_OFFSET) # define SQL_C_SSHORT (SQL_C_SHORT + SQL_SIGNED_OFFSET) # define SQL_C_STINYINT (SQL_TINYINT + SQL_SIGNED_OFFSET) # define SQL_C_ULONG (SQL_C_LONG + SQL_UNSIGNED_OFFSET) # define SQL_C_USHORT (SQL_C_SHORT + SQL_UNSIGNED_OFFSET) # define SQL_C_UTINYINT (SQL_TINYINT + SQL_UNSIGNED_OFFSET) # define SQL_C_BOOKMARK SQL_C_ULONG # if defined(SQL_TYPE_MIN) # undef SQL_TYPE_MIN # define SQL_TYPE_MIN SQL_BIT /* Note:If SQL_BIT uses SQL3 value (i.e. 14) then, * SQL_TYPE_MIN need to be defined as SQL_TINYINT * (i.e. -6). */ # endif # define SQL_ALL_TYPES 0 /* SQLDriverConnect flag values */ # define SQL_DRIVER_NOPROMPT 0 # define SQL_DRIVER_COMPLETE 1 # define SQL_DRIVER_PROMPT 2 # define SQL_DRIVER_COMPLETE_REQUIRED 3 # define SQL_NO_TOTAL (-4) /* SQLSetParam extensions */ # define SQL_DEFAULT_PARAM (-5) # define SQL_IGNORE (-6) # define SQL_LEN_DATA_AT_EXEC_OFFSET (-100) # define SQL_LEN_DATA_AT_EXEC(length) ( SQL_LEN_DATA_AT_EXEC_OFFSET - length ) /* function number for SQLGetFunctions */ # define SQL_API_SQLALLOCCONNECT 1 # define SQL_API_SQLALLOCENV 2 # define SQL_API_SQLALLOCSTMT 3 # define SQL_API_SQLBINDCOL 4 # define SQL_API_SQLCANCEL 5 # define SQL_API_SQLCOLATTRIBUTES 6 # define SQL_API_SQLCONNECT 7 # define SQL_API_SQLDESCRIBECOL 8 # define SQL_API_SQLDISCONNECT 9 # define SQL_API_SQLERROR 10 # define SQL_API_SQLEXECDIRECT 11 # define SQL_API_SQLEXECUTE 12 # define SQL_API_SQLFETCH 13 # define SQL_API_SQLFREECONNECT 14 # define SQL_API_SQLFREEENV 15 # define SQL_API_SQLFREESTMT 16 # define SQL_API_SQLGETCURSORNAME 17 # define SQL_API_SQLNUMRESULTCOLS 18 # define SQL_API_SQLPREPARE 19 # define SQL_API_SQLROWCOUNT 20 # define SQL_API_SQLSETCURSORNAME 21 # define SQL_API_SQLSETPARAM 22 # define SQL_API_SQLTRANSACT 23 # define SQL_NUM_FUNCTIONS 23 # define SQL_EXT_API_START 40 # define SQL_API_SQLCOLUMNS 40 # define SQL_API_SQLDRIVERCONNECT 41 # define SQL_API_SQLGETCONNECTOPTION 42 # define SQL_API_SQLGETDATA 43 # define SQL_API_SQLGETFUNCTIONS 44 # define SQL_API_SQLGETINFO 45 # define SQL_API_SQLGETSTMTOPTION 46 # define SQL_API_SQLGETTYPEINFO 47 # define SQL_API_SQLPARAMDATA 48 # define SQL_API_SQLPUTDATA 49 # define SQL_API_SQLSETCONNECTOPTION 50 # define SQL_API_SQLSETSTMTOPTION 51 # define SQL_API_SQLSPECIALCOLUMNS 52 # define SQL_API_SQLSTATISTICS 53 # define SQL_API_SQLTABLES 54 # define SQL_API_SQLBROWSECONNECT 55 # define SQL_API_SQLCOLUMNPRIVILEGES 56 # define SQL_API_SQLDATASOURCES 57 # define SQL_API_SQLDESCRIBEPARAM 58 # define SQL_API_SQLEXTENDEDFETCH 59 # define SQL_API_SQLFOREIGNKEYS 60 # define SQL_API_SQLMORERESULTS 61 # define SQL_API_SQLNATIVESQL 62 # define SQL_API_SQLNUMPARAMS 63 # define SQL_API_SQLPARAMOPTIONS 64 # define SQL_API_SQLPRIMARYKEYS 65 # define SQL_API_SQLPROCEDURECOLUMNS 66 # define SQL_API_SQLPROCEDURES 67 # define SQL_API_SQLSETPOS 68 # define SQL_API_SQLSETSCROLLOPTIONS 69 # define SQL_API_SQLTABLEPRIVILEGES 70 # define SQL_API_SQLDRIVERS 71 # define SQL_API_SQLBINDPARAMETER 72 # define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER # define SQL_API_ALL_FUNCTIONS 0 /* SQLGetInfo infor number */ # define SQL_INFO_FIRST 0 # define SQL_DRIVER_HDBC 3 # define SQL_DRIVER_HENV 4 # define SQL_DRIVER_HSTMT 5 # define SQL_DRIVER_NAME 6 # define SQL_ODBC_VER 10 # define SQL_CURSOR_COMMIT_BEHAVIOR 23 # define SQL_CURSOR_ROLLBACK_BEHAVIOR 24 # define SQL_DEFAULT_TXN_ISOLATION 26 # define SQL_TXN_ISOLATION_OPTION 72 # define SQL_NON_NULLABLE_COLUMNS 75 # define SQL_DRIVER_HLIB 76 # define SQL_DRIVER_ODBC_VER 77 # define SQL_QUALIFIER_LOCATION 114 # define SQL_INFO_LAST SQL_QUALIFIER_LOCATION # define SQL_INFO_DRIVER_START 1000 /* SQL_TXN_ISOLATION_OPTION masks */ # define SQL_TXN_READ_UNCOMMITTED 0x00000001L # define SQL_TXN_READ_COMMITTED 0x00000002L # define SQL_TXN_REPEATABLE_READ 0x00000004L # define SQL_TXN_SERIALIZABLE 0x00000008L # define SQL_TXN_VERSIONING 0x00000010L /* SQL_CURSOR_COMMIT_BEHAVIOR and SQL_CURSOR_ROLLBACK_BEHAVIOR values */ # define SQL_CB_DELETE 0x0000 # define SQL_CB_CLOSE 0x0001 # define SQL_CB_PRESERVE 0x0002 /* options for SQLGetStmtOption/SQLSetStmtOption */ # define SQL_QUERY_TIMEOUT 0 # define SQL_MAX_ROWS 1 # define SQL_NOSCAN 2 # define SQL_MAX_LENGTH 3 # define SQL_ASYNC_ENABLE 4 # define SQL_BIND_TYPE 5 # define SQL_CURSOR_TYPE 6 # define SQL_CONCURRENCY 7 # define SQL_KEYSET_SIZE 8 # define SQL_ROWSET_SIZE 9 # define SQL_SIMULATE_CURSOR 10 # define SQL_RETRIEVE_DATA 11 # define SQL_USE_BOOKMARKS 12 # define SQL_GET_BOOKMARK 13 /* GetStmtOption Only */ # define SQL_ROW_NUMBER 14 /* GetStmtOption Only */ # define SQL_STMT_OPT_MAX SQL_ROW_NUMBER # define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT /* SQL_QUERY_TIMEOUT options */ # define SQL_QUERY_TIMEOUT_DEFAULT 0UL /* SQL_MAX_ROWS options */ # define SQL_MAX_ROWS_DEFAULT 0UL /* SQL_MAX_LENGTH options */ # define SQL_MAX_LENGTH_DEFAULT 0UL /* SQL_CONCURRENCY options */ # define SQL_CONCUR_READ_ONLY 1 # define SQL_CONCUR_LOCK 2 # define SQL_CONCUR_ROWVER 3 # define SQL_CONCUR_VALUES 4 /* options for SQLSetConnectOption/SQLGetConnectOption */ # define SQL_ACCESS_MODE 101 # define SQL_AUTOCOMMIT 102 # define SQL_LOGIN_TIMEOUT 103 # define SQL_OPT_TRACE 104 # define SQL_OPT_TRACEFILE 105 # define SQL_TRANSLATE_DLL 106 # define SQL_TRANSLATE_OPTION 107 # define SQL_TXN_ISOLATION 108 # define SQL_CURRENT_QUALIFIER 109 # define SQL_ODBC_CURSORS 110 # define SQL_QUIET_MODE 111 # define SQL_PACKET_SIZE 112 # define SQL_CONN_OPT_MAX SQL_PACKET_SIZE # define SQL_CONNECT_OPT_DRVR_START 1000 # define SQL_CONN_OPT_MIN SQL_ACCESS_MODE /* SQL_ACCESS_MODE options */ # define SQL_MODE_READ_WRITE 0UL # define SQL_MODE_READ_ONLY 1UL # define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE /* SQL_AUTOCOMMIT options */ # define SQL_AUTOCOMMIT_OFF 0UL # define SQL_AUTOCOMMIT_ON 1UL # define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON /* SQL_LOGIN_TIMEOUT options */ # define SQL_LOGIN_TIMEOUT_DEFAULT 15UL /* SQL_OPT_TRACE options */ # define SQL_OPT_TRACE_OFF 0UL # define SQL_OPT_TRACE_ON 1UL # define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF # define SQL_OPT_TRACE_FILE_DEFAULT "odbc.log" /* SQL_ODBC_CURSORS options */ # define SQL_CUR_USE_IF_NEEDED 0UL # define SQL_CUR_USE_ODBC 1UL # define SQL_CUR_USE_DRIVER 2UL # define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER /* Column types and scopes in SQLSpecialColumns. */ # define SQL_BEST_ROWID 1 # define SQL_ROWVER 2 # define SQL_SCOPE_CURROW 0 # define SQL_SCOPE_TRANSACTION 1 # define SQL_SCOPE_SESSION 2 /* Operations in SQLSetPos */ # define SQL_ADD 4 /* Lock options in SQLSetPos */ # define SQL_LOCK_NO_CHANGE 0 # define SQL_LOCK_EXCLUSIVE 1 # define SQL_LOCK_UNLOCK 2 /* SQLExtendedFetch flag values */ # define SQL_FETCH_NEXT 1 # define SQL_FETCH_FIRST 2 # define SQL_FETCH_LAST 3 # define SQL_FETCH_PRIOR 4 # define SQL_FETCH_ABSOLUTE 5 # define SQL_FETCH_RELATIVE 6 # define SQL_FETCH_BOOKMARK 8 /* Defines for SQLBindParameter/SQLProcedureColumns */ # define SQL_PARAM_TYPE_UNKNOWN 0 # define SQL_PARAM_INPUT 1 # define SQL_PARAM_INPUT_OUTPUT 2 # define SQL_RESULT_COL 3 # define SQL_PARAM_OUTPUT 4 /* Defines used by Driver Manager for mapping SQLSetParam to SQLBindParameter */ # define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT # define SQL_SETPARAM_VALUE_MAX (-1L) /* SQLStatistics flag values */ # define SQL_INDEX_UNIQUE 0 # define SQL_INDEX_ALL 1 # define SQL_QUICK 0 # define SQL_ENSURE 1 /* SQLSetScrollOption flag values */ # define SQL_SCROLL_FORWARD_ONLY 0L # define SQL_SCROLL_KEYSET_DRIVEN (-1L) # define SQL_SCROLL_DYNAMIC (-2L) # define SQL_SCROLL_STATIC (-3L) typedef struct { SWORD year; UWORD month; UWORD day; } DATE_STRUCT; #endif unixODBC-2.2.14-p2/Drivers/nn/nncol.h0100644000076400007640000000270607363332154015523 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _NNCOL_H # define _NNCOL_H # define PRIV_NONE 0 # define PRIV_REFER 1 # define PRIV_SELECT 2 # define PRIV_INSERT 3 # define PRIV_UPDATE 4 enum { en_article_num = 0, en_newsgroups, en_subject, en_from, en_sender, en_organization, en_summary, en_keywords, en_expires, en_msgid, en_references, en_followup_to, en_reply_to, en_distribution, en_xref, en_host, en_date, en_path, en_x_newsreader, en_lines, en_body, en_sql_count, en_sql_qstr, en_sql_num, en_sql_date }; enum { en_t_null, en_t_num, en_t_str, en_t_date, en_t_text }; char* nnsql_getcolnamebyidx(int idx); int nnsql_getcolidxbyname(char* name); void* nnsql_getcoldescbyidx(int idx); char* nnsql_getcolnamebydesc(void* desc); int nnsql_getcoldatetypebydesc(void* desc); int nnsql_getcolnullablebydesc(void* desc); #endif unixODBC-2.2.14-p2/Drivers/nn/nndate.h0100644000076400007640000000161007363332154015654 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _NN_DATE_H # define _NN_DATE_H typedef struct { int year; int month; int day; } date_t; extern int nnsql_odbcdatestr2date(char*, date_t*); extern int nnsql_nndatestr2date(char*, date_t*); extern int nnsql_datecmp(date_t*, date_t*); #endif unixODBC-2.2.14-p2/Drivers/nn/nnsql.h0100644000076400007640000002144107363332154015542 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _NN_SQL_H # define _NN_SQL_H # include "nndate.h" # include "nncol.h" /* interface of nnsql layer */ /* basic statement handle object */ extern void* nnsql_allocyystmt(void* hcndes); /* Allocating and initiating a statement * handle on a given connection. On success, * a statement handle is returned or null on * failure */ extern void nnsql_dropyystmt(void* hstmt); /* Drop(i.e free and detach from the * connection) it */ extern void nnsql_close_cursor(void* hstmt); /* Close a result set, terminate the * fetching process. */ /* open table(i.e. group) */ extern int nnsql_opentable(void* hstmt, char* table); /* Set the active table(i.e. netnews group). * It returns 0 on success, -1 on failure.*/ /* prepare (i.e. parsing and accessing mode check) */ extern int nnsql_prepare(void* hstmt, char* sqlstmt, int len); /* Parsing the SQL statement and check the * accessing mode for INSERT and DELETE * statement. It returns 0 on success, * -1 on failure. */ /* open table(i.e. group), type check, do insert, search delete */ extern int nnsql_execute(void* hstmt); /* Execute a prepared statement(i.e. commit * the INSERT or DELETE, type check, * set active table or open a result set. * It returns 0 on success, -1 on failure.*/ /* fetch result */ extern int nnsql_fetch(void* hstmt); /* Fetching result from a opened result set. * It returns 0 on success, -1 on failure, 100 * on hitting the end of the result set. * The fetched result at the 'th column * in the current row can be gotten with * nnsql_getxxx(hstmt, icol) calls. The * properties(i.e. null, datatype, etc.) of * the 'th column in the result set can * be gotten with nnsql_isxxxcol(hstmt,icol) * calls. */ /* get column describor id */ extern int nnsql_column_descid(void* hstmt, int icol); /* Getting column describator id(i.e en_subject, * en_from, en_msgid, en_body, etc.) for the * the 'th column of a prepared or * executed statement if a result set will or * already been opened. It returns the * describator id or -1 on failure. Note, the * user column index starts from 1 and * column index 0 is always used as a hidden * internal column, the article number. */ /* max number of parameters/columns */ extern int nnsql_max_param(); /* Return the up limit of parameter number(32)*/ extern int nnsql_max_column(); /* Return the up limit of column number (32)*/ /* get value from column */ extern long nnsql_getnum(void* hstmt, int icol); /* Return a long integer from the 'th * column of the current row of the result set. * If the datatype of this column is not INTEGER * (i.e. NUMBER), this function will return 0. * Using nnsql_isnumcol() to check this before * getting the long integer. */ extern char* nnsql_getstr(void* hstmt, int icol); /* Return an null terminated string at the * 'th column of current row of the result * set. If datatype of this column is STRING, * this function will return an null pointer. * Using nnsql_isstrcol() to check this before * getting a string. The string itself is placed * in an internal buffer. It may be overwritten * by the result of later(if not next) * nnsql_fetch() call. Thus, it is your duty to * keep a copy of it when necessary. */ extern date_t* nnsql_getdate(void* hstmt, int icol); /* Return a pointer point to an internal date * datatype structure from the 'th column * of the current row of the result set. If the * datatype of this column is not DATE, this * function will return a null pointer. Using * nnsql_isdatecol() to check this before * getting a date pointer. The date structure * is place in an internal buffer. It may be * overwritten by the result of later(if not * next) nnsql_fetch() call. It is your job to * keep a copy of it when necessary. */ /* get total number of columns and parameters */ extern int nnsql_getcolnum(void* hstmt); /* Return total column number of a prepared or * executed statement, if a result set has been * opened or will be opened after the prepared * statement been executed. It return 0 if there * is no result set will or already been opened. * Unlike ODBC, the column number returned from * this function will be, if it is not 0, equal * or large than 2 to include the hidden internal * column -- the article-num column(it is always * the 0'th column). */ extern int nnsql_getparnum(void* hstmt); /* return total parameter number(i.e. number of * outstanding ? marks) of a prepared SQL * statement.*/ extern int nnsql_getrowcount(void* hstmt); /* For a DELETE statement, this function returns * the total deleted rows(i.e. articles). * For an INSERT statement, this function * returns 0(i.e. insert unsuccess) or 1(i.e. * successed inserted or posted). * For a SELECT statement, this function returns * the current cursor location(i.e. current row * number) which equals to the total number of * successful nnsql_fetch(). */ /* get type of column */ extern int nnsql_isnullcol(void* hstmt, int icol); /* Return TRUE if the 'th column at current * row is null or return FAIL if not */ extern int nnsql_isstrcol(void* hstmt, int icol); /* Return TRUE if datatype of the 'th column * is STRING or return FAIL if not */ extern int nnsql_isnumcol(void* hstmt, int icol); /* Return TRUE if datatype of the 'th column * is INTEGER(i.e NUMBER) or return FAIL if not */ extern int nnsql_isdatecol(void* hstmt, int icol); /* Return TRUE if datatype of the 'th column * is DATE or return FAIL if not */ extern int nnsql_iscountcol(void* hstmt, int icol);/* Return TRUE if the 'th column is a count * column or return FAIL if not */ extern int nnsql_isnullablecol(void* hstmt, int icol); /* Return TRUE if the 'th column is an * nullable one(i.e. not necessary specified in * INSERT statement. return FAIL if not */ /* unbind dummy variable(s) */ extern int nnsql_yyunbindpar(void* hstmt, int ipar); /* Unbinding the 'th parameter * (corrosponding to the value previouse bound * for the 'th outstanding ? mark. This * will free the *user* buffer(if an user string * was previously bound) from the statement * handle.*/ /* put data for dummy variable(s) */ extern int nnsql_putnum(void* hstmt, int ipar, long num); /* Binding an integer as the 'th parameter * (i.e. its value and type will be used in * place of the 'th outstanding ? mark in * the prepared SQL statement. Same as ODBC, here * the index start from 1. */ extern int nnsql_putstr(void* hstmt, int ipar, char* str); /* Binding a string(keep a pointer of the user * string location) as the 'th parameter.*/ extern int nnsql_putdate(void* hstmt, int ipar, date_t* date); /* Binding a date(copy the date struct to an * internal recyclable buffer) as the 'th * parameter */ extern int nnsql_putnull(void* hstmt, int ipar); /* Binding a null as the 'th parameter */ /* error report function */ extern int nnsql_errcode(void* hstmt); /* Return the current errcode or 0 */ extern char* nnsql_errmsg(void* hstmt); /* Return the current errmsg(null terminate * string) or null */ extern int nnsql_errpos(void* hstmt); /* Return parsing position of error in the sql * statement */ /* nntp connection access mode flag. used in nntp_accmode() */ # define ACCESS_MODE_SELECT 0 /* Allow SELECT only */ # define ACCESS_MODE_INSERT 1 /* Allow INSERT and SELECT */ # define ACCESS_MODE_DELETE_TEST 2 /* Allow SELECT, INSERT, DELETE(from *.test * groups) */ # define ACCESS_MODE_DELETE_ANY 3 /* Allow SELECT, INSERT, DELETE(from all groups)*/ #endif unixODBC-2.2.14-p2/Drivers/nn/nntp.h0100644000076400007640000000525007363332154015366 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _NNTP_H # define _NNTP_H /* part of useful nntp response code */ # define NNTP_POST_CONN_OK 200 # define NNTP_READ_CONN_OK 201 # define NNTP_SLAVE_CONN_OK 202 # define NNTP_QUIT_OK 205 # define NNTP_GROUP_OK 211 # define NNTP_LIST_OK 215 # define NNTP_ARTICLE_OK 220 # define NNTP_HEAD_OK 221 # define NNTP_XHDR_OK NNTP_HEAD_OK # define NNTP_BODY_OK 222 # define NNTP_NEXT_OK 223 # define NNTP_LAST_OK NNTP_NEXT_OK # define NNTP_NEWMSG_OK 230 # define NNTP_NEWGRP_OK 231 # define NNTP_POST_OK 240 # define NNTP_POSTING 340 # define NNTP_SERVICE_DOWN 400 # define NNTP_INVALID_GROUP 411 # define NNTP_NOT_IN_GROUP 412 # define NNTP_NOT_IN_ARTICLE 420 # define NNTP_END_OF_GROUP 421 # define NNTP_TOP_OF_GROUP 422 # define NNTP_INVALID_MSGNUM 423 # define NNTP_INVALID_MSGID 430 # define NNTP_UNWANTED_MSG 435 # define NNTP_REJECTED_MSG 437 # define NNTP_CANNOT_POST 440 # define NNTP_POSTING_FAILED 441 # define BODY_CHUNK_SIZE 4096 # define XHDR_CHUNK_SIZE 4096 # define NNTP_HEADER_CHUNK 128 extern void* nntp_connect ( char* server ); extern void nntp_close ( void* hcndes ); extern int nntp_group ( void* hcndes, char* grp); extern int nntp_next ( void* hcndes ); extern int nntp_last ( void* hcndes ); extern int nntp_errcode ( void* hcndes ); extern char* nntp_errmsg ( void* hcndes ); extern void* nntp_openheader ( void* hcndes, char* header, long* tmin, long* tmax ); extern int nntp_fetchheader( void* hhead, long* article_num, long* data, void* hrh ); extern void nntp_closeheader( void* hhead ); extern char* nntp_body ( void* hcndes, long artnum, char* artid); extern int nntp_start_post ( void* hcndes ); extern int nntp_send_head ( void* hcndes, char* header_name, char* header ); extern int nntp_end_head ( void* hcndes ); extern int nntp_send_body ( void* hcndes, char* body); extern int nntp_end_post ( void* hcndes ); extern int nntp_cancel ( void* hcndes, char* group, char* sender, char* from, char* msgid); extern int nntp_getaccmode( void* hcndes ); extern void nntp_setaccmode( void* hcndes, int mode ); #endif unixODBC-2.2.14-p2/Drivers/nn/stmt.h0100644000076400007640000000134007363332154015372 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _STMT_H # define _STMT_H # include # include #endif unixODBC-2.2.14-p2/Drivers/nn/yyenv.h0100644000076400007640000000245307363332155015564 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _YYENV_H # define _YYENV_H # include typedef struct { int extlevel; /* {} block nest level */ int errpos; /* error position */ int scanpos; /* current position */ char* texts_bufptr; int dummy_npar; /* total number of dummy parameters */ yystmt_t* pstmt; } yyenv_t; /* it is unlikely we will exceed bison's default init stack depth YYINITDEPTH, * i.e. 200. Thus, for system/compiler which not support alloca(), we simply * set it to null and make a bit larger init stack depth for more safty. */ # if defined(__hpux) && !defined (alloca) && !defined(__GNUC__) # define alloca(size) (0) # define YYINITDEPTH (512) # endif #endif unixODBC-2.2.14-p2/Drivers/nn/yyerr.h0100644000076400007640000000315507363332155015564 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _YYERR_H # define _YYERR_H # include # define NNSQL_ERRHEAD "[NetNewSQL][Dynamic SQL parser]" # define INVALID_COLUMN_NAME 200 # define NOT_SUPPORT_UPDATEABLE_CURSOR 201 # define NOT_SUPPORT_DISTINCT_SELECT 202 # define NOT_SUPPORT_MULTITABLE_QUERY 203 # define NOT_SUPPORT_GROUP_CLAUSE 204 # define NOT_SUPPORT_HAVING_CLAUSE 205 # define NOT_SUPPORT_ORDER_CLAUSE 206 # define NOT_SUPPORT_DDL_DCL 207 # define NOT_SUPPORT_UPDATE 208 # define NOT_SUPPORT_POSITION_DELETE 209 # define NOT_SUPPORT_SPROC 210 # define TOO_MANY_COLUMNS 211 # define VARIABLE_IN_SELECT_LIST 212 # define VARIABLE_IN_TABLE_LIST 213 # define UNSEARCHABLE_ATTR 214 # define INSERT_VALUE_LESS 215 # define INSERT_VALUE_MORE 216 # define POST_WITHOUT_BODY 217 # define NO_POST_PRIVILEGE 218 # define NO_INSERT_PRIVILEGE 219 # define NO_DELETE_PRIVILEGE 220 # define NO_DELETE_ANY_PRIVILEGE 221 # define TYPE_VIOLATION 222 # define PARSER_ERROR 256 #endif unixODBC-2.2.14-p2/Drivers/nn/yylex.h0100644000076400007640000000157107363332155015564 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _YYLEX_H # define _YYLEX_H typedef struct { int idx; char* name; } keywd_ent_t; enum { en_cmpop_eq, en_cmpop_ne, en_cmpop_gt, en_cmpop_lt, en_cmpop_ge, en_cmpop_le, en_logop_and, en_logop_or, en_logop_not }; #endif unixODBC-2.2.14-p2/Drivers/nn/yyparse.tab.h0100644000076400007640000000247307363332155016655 0ustar nicknicktypedef union { char* qstring; char* name; long number; int ipar; /* parameter index */ int cmpop; /* for comparsion operators */ char esc; int flag; /* for not_opt and case_opt */ int idx; void* offset; /* actually, it is used as a 'int' offset */ node_t node; /* a node haven't add to tree */ } YYSTYPE; #define kwd_select 258 #define kwd_all 259 #define kwd_news 260 #define kwd_xnews 261 #define kwd_distinct 262 #define kwd_count 263 #define kwd_from 264 #define kwd_where 265 #define kwd_in 266 #define kwd_between 267 #define kwd_like 268 #define kwd_escape 269 #define kwd_group 270 #define kwd_by 271 #define kwd_having 272 #define kwd_order 273 #define kwd_for 274 #define kwd_insert 275 #define kwd_into 276 #define kwd_values 277 #define kwd_delete 278 #define kwd_update 279 #define kwd_create 280 #define kwd_alter 281 #define kwd_drop 282 #define kwd_table 283 #define kwd_column 284 #define kwd_view 285 #define kwd_index 286 #define kwd_of 287 #define kwd_current 288 #define kwd_grant 289 #define kwd_revoke 290 #define kwd_is 291 #define kwd_null 292 #define kwd_call 293 #define kwd_uncase 294 #define kwd_case 295 #define kwd_fn 296 #define kwd_d 297 #define QSTRING 298 #define NUM 299 #define NAME 300 #define PARAM 301 #define kwd_or 302 #define kwd_and 303 #define kwd_not 304 #define CMPOP 305 unixODBC-2.2.14-p2/Drivers/nn/yystmt.h0100644000076400007640000000633507363332155015766 0ustar nicknick/** Copyright (C) 1995, 1996 by Ke Jin Enhanced for unixODBC (1999) by Peter Harvey This program is free software; you can 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. **/ #ifndef _YYSTMT_H # define _YYSTMT_H # define MAX_COLUMN_NUMBER 32 # define MAX_PARAM_NUMBER 32 # include # include # include typedef enum { en_nt_cmpop, /* en_cmpop_eq, */ en_nt_logop, /* kwd_and, kwd_or, kwd_not */ en_nt_attr, en_nt_qstr, en_nt_num, en_nt_date, en_nt_param, en_nt_null, en_nt_like, en_nt_between, en_nt_in, en_nt_caselike, en_nt_isnull } node_type; typedef struct tnode { int type; /* compare operator, * logical operator, * column value, * literal value, * dummy parameter */ union { int cmpop; /* en_cmpop_eq, en_cmpop_ne, ... */ int logop; /* kwd_or, kwd_and, kwd_not */ int iattr; /* attribute index */ int ipar; /* parameter idx */ char* qstr; long num; date_t date; char esc; /* escape for like pattern match */ } value; struct tnode* left; struct tnode* right; } node_t; typedef struct { int iattr; char* table; /* table name from yyparse */ union { long num; char* qstr; date_t date; } value; } yycol_t; typedef struct { int stat; /* 0 don't needed(either by select list or by where tree) 1 needed */ int wstat; /* 0 if don't need by where tree, 1 if need */ int article;/* article number */ union { char* location; long number; date_t date; } value; void* nntp_hand; /* create with nntp_openheader() * freed with nntp_closeheader() * fetch with nntp_fetchheader() */ } yyattr_t; typedef struct { int type; /* can only be en_nt_qstr, en_nt_num and en_nt_null */ union { char* location; long number; date_t date; } value; } yypar_t; enum { en_stmt_alloc = 0, /* only in allocated stat */ en_stmt_select, en_stmt_insert, en_stmt_srch_delete, en_stmt_fetch_count = 100 }; typedef struct { void* hcndes; /* nntp cndes */ int type; int errcode; int errpos; yycol_t* pcol; /* column descriptor */ yyattr_t* pattr; /* fetched required column */ yypar_t* ppar; /* user parameter area */ char* table; /* table name from yyparse */ int ncol; int npar; int count; /* num. of record has been fetched. */ char* sqlexpr; /* point to sqlexpr in hstmt_t */ char* texts_buf; char msgbuf[64]; /* buf to hold message string passed to * nnsql_yyerror() */ /* search tree */ node_t* srchtree; /* root of search tree */ node_t* node_buf; /* address of array */ int srchtreesize; /* search tree array size */ int srchtreenum; /* number of nodes in tree */ /* insert headers and values */ char** ins_heads; node_t* ins_values; /* article-num range */ long artnum_min; long artnum_max; } yystmt_t; #endif unixODBC-2.2.14-p2/Drivers/nn/herr.ci0100644000076400007640000001115107363332154015510 0ustar nicknickstatic struct { int code; char* stat; char* msg; } sqlerrmsg_tab[] = { en_00000, "00000", "", en_01000, "01000", "General warning", en_01002, "01002", "Disconnect error", en_01004, "01004", "Data truncated", en_01006, "01006", "Privilege not revoked", en_01S00, "01S00", "Invalid connection string attribute", en_01S01, "01S01", "Error in row", en_01S02, "01S02", "Optional value changed", en_01S03, "01S03", "No rows updated or deleted", en_01S04, "01S04", "More than one row updated or deleted", en_07001, "07001", "Wrong number of parameters", en_07006, "07006", "Restricted data type attribute violation", en_08001, "08001", "Unable to connect to data source", en_08002, "08002", "Connection in use", en_08003, "08003", "Connect not open", en_08004, "08004", "Data source rejected establishment of connection", en_08007, "08007", "Connection failure during transaction", en_08S01, "08S01", "Communication link failure", en_0A000, "0A000", "Feature not supported", en_21S01, "21S01", "Insert value list does not match", en_21S02, "21S02", "Degree of derived table does not match column list", en_22001, "22001", "String data right truncation", en_22003, "22003", "Numeric value out of range", en_22005, "22005", "Error in assignment", en_22008, "22008", "Datetime field overflow", en_22012, "22012", "Division by zero", en_22026, "22026", "String data, length mismatch", en_23000, "23000", "Integrity constraint violation", en_24000, "24000", "Invalid cursor state", en_25000, "25000", "Invalid transaction state", en_28000, "28000", "Invalid authorization specification", en_34000, "34000", "Invalid cursor name", en_37000, "37000", "Syntex error or access violation", en_3C000, "3C000", "Duplicate cursor name", en_40001, "40001", "Serialization failure", en_42000, "42000", "Syntax error or access violation", en_70100, "70100", "Operation aborted", en_IM001, "IM001", "Driver does not support this function", en_IM002, "IM002", "Data source name not found and no default " "driver specified. Driver could not be loaded", en_IM003, "IM003", "Specified driver could not be loaded", en_IM004, "IM004", "Driver's SQLAllocEnv() failed", en_IM005, "IM005", "Driver's SQLAllocConnect() failed", en_IM006, "IM006", "Driver's SQLSetConnectOption failed", en_IM007, "IM007", "No data source or driver specified, dialog prohibited", en_IM008, "IM008", "Dialog failed", en_IM009, "IM009", "Unable to load translation DLL", en_IM010, "IM010", "Data source name too long", en_IM011, "IM011", "Driver name too long", en_IM012, "IM012", "DRIVER keyword syntax error", en_IM013, "IM013", "Trace file error", en_IM014, "IM014", "Try to change tracing file while tracing is on", en_S0001, "S0001", "Base table or view already exists", en_S0002, "S0002", "Base table not found", en_S0011, "S0011", "Index already exists", en_S0012, "S0012", "Index not found", en_S0021, "S0021", "Column already exists", en_S0022, "S0022", "Column not found", en_S0023, "S0023", "No default for column", en_S1000, "S1000", "General error", en_S1001, "S1001", "Memory allocation failure", en_S1002, "S1002", "Invalid column number", en_S1003, "S1003", "Program type out of range", en_S1004, "S1004", "SQL data type out of range", en_S1008, "S1008", "Operation canceled", en_S1009, "S1009", "Invalid argument value", en_S1010, "S1010", "Function sequence error", en_S1011, "S1011", "Operation invalid at this time", en_S1012, "S1012", "Invalid transaction operation code specified", en_S1015, "S1015", "No cursor name available", en_S1090, "S1090", "Invalid string or buffer length", en_S1091, "S1091", "Descriptor type out of range", en_S1092, "S1092", "Option type out of range", en_S1093, "S1093", "Invalid parameter", en_S1094, "S1094", "Invalid scale value", en_S1095, "S1095", "Function type out of range", en_S1096, "S1096", "Information type out of range", en_S1097, "S1097", "Column type out of range", en_S1098, "S1098", "Scope type out of range", en_S1099, "S1099", "Nullable type out of range", en_S1100, "S1100", "Uniquenss option type out of range", en_S1101, "S1101", "Accuracy option type out of range", en_S1103, "S1103", "Direction option out of range", en_S1104, "S1104", "Invalid precision value", en_S1105, "S1105", "Invalid parameter type", en_S1106, "S1106", "Fetch type out of range", en_S1107, "S1107", "Row value out of range", en_S1108, "S1108", "Concurrency option out of range", en_S1109, "S1109", "Invalid cursor position", en_S1110, "S1110", "Invalid driver completion", en_S1111, "S1111", "Invalid bookmark value", en_S1C00, "S1C00", "Driver not capable", en_S1T00, "S1T00", "Timeout expired", -1, 0, 0 }; unixODBC-2.2.14-p2/Drivers/nn/nncol.ci0100644000076400007640000000277007363332154015670 0ustar nicknicktypedef struct { int idx; char* name; int datatype; int nullable; int writable; } col_desc_t; static col_desc_t nncol_info_tab[] = { en_article_num, "Article-Num", en_t_num, 0, 0, en_article_num, "Article", en_t_num, 0, 0, /* alias name */ en_newsgroups, "Newsgroups", en_t_str, 1, 0, en_newsgroups, "Groups", en_t_str, 1, 0, /* alias name */ en_subject, "Subject", en_t_str, 0, 1, en_from, "From", en_t_str, 0, 1, en_sender, "Sender", en_t_str, 1, 1, en_organization,"Organization", en_t_str, 1, 1, en_summary, "Summary", en_t_str, 1, 1, en_keywords, "Keywords", en_t_str, 1, 1, en_expires, "Expires", en_t_str, 1, 1, en_msgid, "Message-ID", en_t_str, 1, 1, en_msgid, "Msgid", en_t_str, 1, 1, /* alias name */ en_references, "References", en_t_str, 1, 1, en_followup_to, "Followup-To", en_t_str, 1, 1, en_reply_to, "Reply-To", en_t_str, 1, 1, en_distribution,"Distribution", en_t_str, 1, 1, en_xref, "Xref", en_t_str, 1, 0, en_host, "NNTP-Posting-Host", en_t_str, 1, 0, en_host, "Host", en_t_str, 1, 0, /* alias name */ en_date, "Date", en_t_date,1, 0, en_path, "Path", en_t_str, 1, 0, en_lines, "Lines", en_t_num, 1, 0, en_x_newsreader,"X-Newsreader", en_t_str, 1, 0, en_x_newsreader,"Agent", en_t_str, 1, 0, /* alias name */ en_body, "Body", en_t_text,0, 1, en_body, "Text", en_t_text,0, 1, /* alias name */ en_sql_count, "count()", en_t_num, 1, 0, en_sql_qstr, "qstring", en_t_str, 1, 0, en_sql_num, "number", en_t_num, 1, 0, en_sql_date, "const. date", en_t_date,1, 0 }; unixODBC-2.2.14-p2/Drivers/nn/nntp.ci0100644000076400007640000000140507363332154015530 0ustar nicknick#include # define MSGHEAD "[INN][NNRP server]" static struct { int code; char* msg; } nntp_msg[] = { NNTP_POSTING, MSGHEAD "Article in posting", NNTP_SERVICE_DOWN, MSGHEAD "NNTP Server down", NNTP_INVALID_GROUP, MSGHEAD "No such news group on this server", NNTP_NOT_IN_GROUP, MSGHEAD "Not in a news group", NNTP_NOT_IN_ARTICLE, MSGHEAD "Not in a article", NNTP_END_OF_GROUP, MSGHEAD "End of news group", NNTP_TOP_OF_GROUP, MSGHEAD "Top of news group", NNTP_INVALID_MSGNUM, MSGHEAD "Invalid article number", NNTP_INVALID_MSGID, MSGHEAD "Invalid article ID", NNTP_UNWANTED_MSG, MSGHEAD "Unwanted article", NNTP_REJECTED_MSG, MSGHEAD "Article rejected", NNTP_CANNOT_POST, MSGHEAD "Can't post", NNTP_POSTING_FAILED, MSGHEAD "NNTP Posting failed" }; unixODBC-2.2.14-p2/Drivers/nn/yyerr.ci0100644000076400007640000000357307363332155015734 0ustar nicknick#include static struct { int errcode; char* msg; } yy_errmsg[] = { PARSER_ERROR, 0, INVALID_COLUMN_NAME, NNSQL_ERRHEAD "Invalid column name", NOT_SUPPORT_UPDATEABLE_CURSOR, NNSQL_ERRHEAD "Don't support update cursor", NOT_SUPPORT_DISTINCT_SELECT, NNSQL_ERRHEAD "Don't support distinct select", NOT_SUPPORT_MULTITABLE_QUERY, NNSQL_ERRHEAD "Don't support multi-table query", NOT_SUPPORT_GROUP_CLAUSE, NNSQL_ERRHEAD "Don't support GROUP clause", NOT_SUPPORT_HAVING_CLAUSE, NNSQL_ERRHEAD "Don't support HAVING condition", NOT_SUPPORT_ORDER_CLAUSE, NNSQL_ERRHEAD "Don't support ORDER clause", NOT_SUPPORT_DDL_DCL, NNSQL_ERRHEAD "Don't support DDL and DCL", NOT_SUPPORT_UPDATE, NNSQL_ERRHEAD "Don't support UPDATE", NOT_SUPPORT_POSITION_DELETE, NNSQL_ERRHEAD "Don't support position DELETE", TOO_MANY_COLUMNS, NNSQL_ERRHEAD "Too many columns in select list", NOT_SUPPORT_SPROC, NNSQL_ERRHEAD "Don't support stored procedure feature", VARIABLE_IN_SELECT_LIST, NNSQL_ERRHEAD "A variable was used in select list", VARIABLE_IN_TABLE_LIST, NNSQL_ERRHEAD "A variable was used in table list", UNSEARCHABLE_ATTR, NNSQL_ERRHEAD "Unsearchable column was used in " "searching condition", INSERT_VALUE_LESS, NNSQL_ERRHEAD "Number of values less than number of " "columns in insert statement", INSERT_VALUE_MORE, NNSQL_ERRHEAD "Number of values more than number of " "columns in insert statement", POST_WITHOUT_BODY, NNSQL_ERRHEAD "Try to post a article without body", NO_POST_PRIVILEGE, NNSQL_ERRHEAD "No INSERT and DELETE privilege as " "server not accept POST", NO_INSERT_PRIVILEGE, NNSQL_ERRHEAD "No INSERT privilege", NO_DELETE_PRIVILEGE, NNSQL_ERRHEAD "No DELETE privilege on any groups", NO_DELETE_ANY_PRIVILEGE, NNSQL_ERRHEAD "No DELETE privilege on non-test groups", TYPE_VIOLATION, NNSQL_ERRHEAD "Restricted data type attribute violation" }; unixODBC-2.2.14-p2/Drivers/nn/yylex.ci0100644000076400007640000000226407363332155015730 0ustar nicknickstatic keywd_ent_t keywd_tab[] = { kwd_select, "select", kwd_all, "all", kwd_news, "news", kwd_xnews, "xnews", kwd_distinct, "distinct", kwd_count, "count", kwd_from, "from", kwd_where, "where", kwd_group, "group", kwd_by, "by", kwd_having, "having", kwd_order, "order", kwd_insert, "insert", kwd_into, "into", kwd_values, "values", kwd_delete, "delete", kwd_is, "is", kwd_null, "null", kwd_update, "update", kwd_create, "create", kwd_alter, "alter", kwd_drop, "drop", kwd_for, "for", kwd_of, "of", kwd_current, "current", kwd_grant, "grant", kwd_revoke, "revoke", kwd_in, "in", kwd_like, "like", kwd_escape, "escape", kwd_between, "between", kwd_call, "call", kwd_or, "or", kwd_and, "and", kwd_not, "not", kwd_index, "index", kwd_view, "view", kwd_table, "table", kwd_column, "column", kwd_case, "case", kwd_uncase, "uncase" }; static keywd_ent_t xkeywd_tab[] = /* keyword which scope in an extersion block -- { extension } */ { kwd_fn, "fn", kwd_d, "d" }; static keywd_ent_t cmpop_tab[] = { en_cmpop_eq, "=", en_cmpop_eq, "==", en_cmpop_ne, "<>", en_cmpop_ne, "!=", en_cmpop_gt, ">", en_cmpop_ge, ">=", en_cmpop_lt, "<", en_cmpop_le, "<=" }; unixODBC-2.2.14-p2/include/0040755000076400007640000000000011150523346013623 5ustar nicknickunixODBC-2.2.14-p2/include/odbcinst.h0100755000076400007640000004354610732317314015616 0ustar nicknick/************************************************** * odbcinst.h * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef __ODBCINST_H #define __ODBCINST_H #include #ifndef BOOL #define BOOL int #endif #ifndef __SQL #include "sql.h" #endif /*! * \brief Our generic window handle. * * This is used wherever a HWND is needed. The caller inits this according * to which UI the caller has (or simply desires). This may be a; console, xlib, qt3, qt4, * gtk, mono, carbon, etc. * * SQLCreateDataSource * (maps to ODBCCreateDataSource entry point in UI plugin) * * This function requires a HWND (and it must NOT be NULL as per ODBC spec.). So * the caller should *always* init an ODBCINSTWND and cast it to HWND as it is passed to * SQLCreateDataSource. * * SQLManageDataSources * (maps to ODBCManageDataSources entry point in UI plugin) * * This function requires a HWND (and it must NOT be NULL as per ODBC spec.). So * the caller should *always* init an ODBCINSTWND and cast it to HWND as it is passed to * SQLManageDataSources. However; it may make sense to have a NULL hWnd... this is what * an ODBC Administrator program would typically do. * * Plugin Selection * * 1. Passing a NULL to a function instead of a valid HODBCINSTWND may result in an error * (this is the case with SQLCreateDataSource). In anycase; passing a NULL in this way * negates the use of any UI plugin. * * 2. szUI has a value and it is the file name (no path and no extension) of the UI * plugin. The plugin is loaded and the appropriate function is called with hWnd. The * caller must have init hWnd in a manner which is appropriate for the UI plugin. * * 3. Passing an empty szUI indicates that the UI plugin should be determined by other * means (see 4). In such a case it is dangerous to use hWnd because it may not match * the type expected by the plugin. hWnd will be ignored and a NULL will be passed to the UI * plugin. * * 4. The fallback logic for determining the UI plugin is as follows; * - use the ODBCINSTUI environment variable to get the UI plugin file name * - use the ODBCINSTUI value in odbcinst.ini to get the UI plugin file name * * NOTE: In the future we may want to consider making HWND of this type instead of having * two different types and having to cast HODBCINSTWND into a HWND. */ typedef struct tODBCINSTWND { char szUI[FILENAME_MAX]; /*!< Plugin file name (no path and no extension) ie "odbcinstQ4". */ HWND hWnd; /*!< this is passed to the UI plugin - caller must know what the plugin is expecting */ } ODBCINSTWND, *HODBCINSTWND; #ifdef __cplusplus extern "C" { #endif #ifndef ODBCVER #define ODBCVER 0x0351 #endif #ifndef WINVER #define WINVER 0x0400 #endif /* SQLConfigDataSource request flags */ #define ODBC_ADD_DSN 1 #define ODBC_CONFIG_DSN 2 #define ODBC_REMOVE_DSN 3 #if (ODBCVER >= 0x0250) #define ODBC_ADD_SYS_DSN 4 #define ODBC_CONFIG_SYS_DSN 5 #define ODBC_REMOVE_SYS_DSN 6 #if (ODBCVER >= 0x0300) #define ODBC_REMOVE_DEFAULT_DSN 7 #endif /* ODBCVER >= 0x0300 */ /* install request flags */ #define ODBC_INSTALL_INQUIRY 1 #define ODBC_INSTALL_COMPLETE 2 /* config driver flags */ #define ODBC_INSTALL_DRIVER 1 #define ODBC_REMOVE_DRIVER 2 #define ODBC_CONFIG_DRIVER 3 #define ODBC_CONFIG_DRIVER_MAX 100 #endif /* SQLGetConfigMode and SQLSetConfigMode flags */ #if (ODBCVER >= 0x0300) #define ODBC_BOTH_DSN 0 #define ODBC_USER_DSN 1 #define ODBC_SYSTEM_DSN 2 #endif /* ODBCVER >= 0x0300 */ /* SQLInstallerError code */ #if (ODBCVER >= 0x0300) #define ODBC_ERROR_GENERAL_ERR 1 #define ODBC_ERROR_INVALID_BUFF_LEN 2 #define ODBC_ERROR_INVALID_HWND 3 #define ODBC_ERROR_INVALID_STR 4 #define ODBC_ERROR_INVALID_REQUEST_TYPE 5 #define ODBC_ERROR_COMPONENT_NOT_FOUND 6 #define ODBC_ERROR_INVALID_NAME 7 #define ODBC_ERROR_INVALID_KEYWORD_VALUE 8 #define ODBC_ERROR_INVALID_DSN 9 #define ODBC_ERROR_INVALID_INF 10 #define ODBC_ERROR_REQUEST_FAILED 11 #define ODBC_ERROR_INVALID_PATH 12 #define ODBC_ERROR_LOAD_LIB_FAILED 13 #define ODBC_ERROR_INVALID_PARAM_SEQUENCE 14 #define ODBC_ERROR_INVALID_LOG_FILE 15 #define ODBC_ERROR_USER_CANCELED 16 #define ODBC_ERROR_USAGE_UPDATE_FAILED 17 #define ODBC_ERROR_CREATE_DSN_FAILED 18 #define ODBC_ERROR_WRITING_SYSINFO_FAILED 19 #define ODBC_ERROR_REMOVE_DSN_FAILED 20 #define ODBC_ERROR_OUT_OF_MEM 21 #define ODBC_ERROR_OUTPUT_STRING_TRUNCATED 22 #endif /* ODBCVER >= 0x0300 */ #ifndef EXPORT #define EXPORT #endif #ifdef __OS2__ #define INSTAPI _System #else #define INSTAPI #endif /* HIGH LEVEL CALLS */ BOOL INSTAPI SQLInstallODBC (HWND hwndParent, LPCSTR lpszInfFile, LPCSTR lpszSrcPath, LPCSTR lpszDrivers); BOOL INSTAPI SQLManageDataSources (HWND hwndParent); BOOL INSTAPI SQLCreateDataSource (HWND hwndParent, LPCSTR lpszDSN); BOOL INSTAPI SQLGetTranslator (HWND hwnd, LPSTR lpszName, WORD cbNameMax, WORD *pcbNameOut, LPSTR lpszPath, WORD cbPathMax, WORD *pcbPathOut, DWORD *pvOption); /* LOW LEVEL CALLS */ BOOL INSTAPI SQLInstallDriver (LPCSTR lpszInfFile, LPCSTR lpszDriver, LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut); BOOL INSTAPI SQLInstallDriverManager (LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut); BOOL INSTAPI SQLGetInstalledDrivers (LPSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut); BOOL INSTAPI SQLGetAvailableDrivers (LPCSTR lpszInfFile, LPSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut); BOOL INSTAPI SQLConfigDataSource (HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszAttributes); BOOL INSTAPI SQLRemoveDefaultDataSource(void); BOOL INSTAPI SQLWriteDSNToIni (LPCSTR lpszDSN, LPCSTR lpszDriver); BOOL INSTAPI SQLRemoveDSNFromIni (LPCSTR lpszDSN); BOOL INSTAPI SQLValidDSN (LPCSTR lpszDSN); BOOL INSTAPI SQLWritePrivateProfileString(LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszString, LPCSTR lpszFilename); int INSTAPI SQLGetPrivateProfileString( LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszDefault, LPSTR lpszRetBuffer, int cbRetBuffer, LPCSTR lpszFilename); #if (ODBCVER >= 0x0250) BOOL INSTAPI SQLRemoveDriverManager(LPDWORD lpdwUsageCount); BOOL INSTAPI SQLInstallTranslator(LPCSTR lpszInfFile, LPCSTR lpszTranslator, LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLRemoveTranslator(LPCSTR lpszTranslator, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLRemoveDriver(LPCSTR lpszDriver, BOOL fRemoveDSN, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLConfigDriver(HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut); #endif #if (ODBCVER >= 0x0300) SQLRETURN INSTAPI SQLInstallerError(WORD iError, DWORD *pfErrorCode, LPSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD *pcbErrorMsg); SQLRETURN INSTAPI SQLPostInstallerError(DWORD dwErrorCode, LPCSTR lpszErrMsg); BOOL INSTAPI SQLWriteFileDSN(LPCSTR lpszFileName, LPCSTR lpszAppName, LPCSTR lpszKeyName, LPCSTR lpszString); BOOL INSTAPI SQLReadFileDSN(LPCSTR lpszFileName, LPCSTR lpszAppName, LPCSTR lpszKeyName, LPSTR lpszString, WORD cbString, WORD *pcbString); BOOL INSTAPI SQLInstallDriverEx(LPCSTR lpszDriver, LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLInstallTranslatorEx(LPCSTR lpszTranslator, LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLGetConfigMode(UWORD *pwConfigMode); BOOL INSTAPI SQLSetConfigMode(UWORD wConfigMode); #endif /* ODBCVER >= 0x0300 */ /* Driver specific Setup APIs called by installer */ BOOL INSTAPI ConfigDSN (HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszAttributes); BOOL INSTAPI ConfigTranslator ( HWND hwndParent, DWORD *pvOption); #if (ODBCVER >= 0x0250) BOOL INSTAPI ConfigDriver(HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut); #endif /* * UNICODE APIs */ BOOL INSTAPI SQLInstallODBCW (HWND hwndParent, LPCWSTR lpszInfFile, LPCWSTR lpszSrcPath, LPCWSTR lpszDrivers); BOOL INSTAPI SQLCreateDataSourceW (HWND hwndParent, LPCWSTR lpszDSN); BOOL INSTAPI SQLGetTranslatorW (HWND hwnd, LPWSTR lpszName, WORD cbNameMax, WORD *pcbNameOut, LPWSTR lpszPath, WORD cbPathMax, WORD *pcbPathOut, DWORD *pvOption); BOOL INSTAPI SQLInstallDriverW (LPCWSTR lpszInfFile, LPCWSTR lpszDriver, LPWSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut); BOOL INSTAPI SQLInstallDriverManagerW (LPWSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut); BOOL INSTAPI SQLGetInstalledDriversW (LPWSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut); BOOL INSTAPI SQLGetAvailableDriversW (LPCWSTR lpszInfFile, LPWSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut); BOOL INSTAPI SQLConfigDataSourceW (HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszAttributes); BOOL INSTAPI SQLWriteDSNToIniW (LPCWSTR lpszDSN, LPCWSTR lpszDriver); BOOL INSTAPI SQLRemoveDSNFromIniW (LPCWSTR lpszDSN); BOOL INSTAPI SQLValidDSNW (LPCWSTR lpszDSN); BOOL INSTAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry, LPCWSTR lpszString, LPCWSTR lpszFilename); int INSTAPI SQLGetPrivateProfileStringW( LPCWSTR lpszSection, LPCWSTR lpszEntry, LPCWSTR lpszDefault, LPWSTR lpszRetBuffer, int cbRetBuffer, LPCWSTR lpszFilename); #if (ODBCVER >= 0x0250) BOOL INSTAPI SQLInstallTranslatorW(LPCWSTR lpszInfFile, LPCWSTR lpszTranslator, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLRemoveTranslatorW(LPCWSTR lpszTranslator, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLRemoveDriverW(LPCWSTR lpszDriver, BOOL fRemoveDSN, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLConfigDriverW(HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszArgs, LPWSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut); #endif #if (ODBCVER >= 0x0300) SQLRETURN INSTAPI SQLInstallerErrorW(WORD iError, DWORD *pfErrorCode, LPWSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD *pcbErrorMsg); SQLRETURN INSTAPI SQLPostInstallerErrorW(DWORD dwErrorCode, LPCWSTR lpszErrorMsg); BOOL INSTAPI SQLWriteFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName, LPCWSTR lpszKeyName, LPCWSTR lpszString); BOOL INSTAPI SQLReadFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName, LPCWSTR lpszKeyName, LPWSTR lpszString, WORD cbString, WORD *pcbString); BOOL INSTAPI SQLInstallDriverExW(LPCWSTR lpszDriver, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLInstallTranslatorExW(LPCWSTR lpszTranslator, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount); #endif /* ODBCVER >= 0x0300 */ /* Driver specific Setup APIs called by installer */ BOOL INSTAPI ConfigDSNW (HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszAttributes); #if (ODBCVER >= 0x0250) BOOL INSTAPI ConfigDriverW(HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszArgs, LPWSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut); #endif #ifndef SQL_NOUNICODEMAP /* define this to disable the mapping */ #ifdef UNICODE #define SQLInstallODBC SQLInstallODBCW #define SQLCreateDataSource SQLCreateDataSourceW #define SQLGetTranslator SQLGetTranslatorW #define SQLInstallDriver SQLInstallDriverW #define SQLInstallDriverManager SQLInstallDriverManagerW #define SQLGetInstalledDrivers SQLGetInstalledDriversW #define SQLGetAvailableDrivers SQLGetAvailableDriversW #define SQLConfigDataSource SQLConfigDataSourceW #define SQLWriteDSNToIni SQLWriteDSNToIniW #define SQLRemoveDSNFromIni SQLRemoveDSNFromIniW #define SQLValidDSN SQLValidDSNW #define SQLWritePrivateProfileString SQLWritePrivateProfileStringW #define SQLGetPrivateProfileString SQLGetPrivateProfileStringW #define SQLInstallTranslator SQLInstallTranslatorW #define SQLRemoveTranslator SQLRemoveTranslatorW #define SQLRemoveDriver SQLRemoveDriverW #define SQLConfigDriver SQLConfigDriverW #define SQLInstallerError SQLInstallerErrorW #define SQLPostInstallerError SQLPostInstallerErrorW #define SQLReadFileDSN SQLReadFileDSNW #define SQLWriteFileDSN SQLWriteFileDSNW #define SQLInstallDriverEx SQLInstallDriverExW #define SQLInstallTranslatorEx SQLInstallTranslatorExW #endif #endif #ifdef __cplusplus } #endif #endif unixODBC-2.2.14-p2/include/odbcinstext.h0100644000076400007640000002512711111040711016311 0ustar nicknick/************************************************** * odbcinstext.h * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef _ODBCINST_H #define _ODBCINST_H #ifdef UNIXODBC_SOURCE #include #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_PWD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #include #define ODBCVER 0x0351 #include #include #include /******************************************************** * CONSTANTS WHICH DO NOT EXIST ELSEWHERE ********************************************************/ #ifndef TRUE #define FALSE 0; #define TRUE 1; #endif #else /* not UNIXODBC_SOURCE */ /******************************************************** * outside the unixODBC source tree only the * * public interface is exposed * ********************************************************/ #include /******************************************************** * these limits are originally defined in ini.h * * but are needed to implement ODBCINSTGetProperties * * for the Driver Setup * ********************************************************/ #define INI_MAX_LINE 1000 #define INI_MAX_OBJECT_NAME INI_MAX_LINE #define INI_MAX_PROPERTY_NAME INI_MAX_LINE #define INI_MAX_PROPERTY_VALUE INI_MAX_LINE #endif /* UNIXODBC_SOURCE */ /******************************************************** * PUBLIC API ********************************************************/ #ifdef __cplusplus extern "C" { #endif BOOL INSTAPI SQLConfigDataSource( HWND hWnd, WORD nRequest, LPCSTR pszDriver, LPCSTR pszAttributes ); BOOL INSTAPI SQLGetConfigMode( UWORD *pnConfigMode ); BOOL INSTAPI SQLGetInstalledDrivers( LPSTR pszBuf, WORD nBufMax, WORD *pnBufOut ); BOOL INSTAPI SQLInstallDriverEx( LPCSTR pszDriver, LPCSTR pszPathIn, LPSTR pszPathOut, WORD nPathOutMax, WORD *nPathOut, WORD nRequest, LPDWORD pnUsageCount ); BOOL INSTAPI SQLInstallDriverManager( LPSTR pszPath, WORD nPathMax, WORD *pnPathOut ); RETCODE INSTAPI SQLInstallerError( WORD nError, DWORD *pnErrorCode, LPSTR pszErrorMsg, WORD nErrorMsgMax, WORD *nErrorMsg ); BOOL INSTAPI SQLManageDataSources( HWND hWnd ); BOOL INSTAPI SQLReadFileDSN( LPCSTR pszFileName, LPCSTR pszAppName, LPCSTR pszKeyName, LPSTR pszString, WORD nString, WORD *pnString ); BOOL INSTAPI SQLRemoveDriver( LPCSTR pszDriver, BOOL nRemoveDSN, LPDWORD pnUsageCount ); BOOL INSTAPI SQLRemoveDriverManager( LPDWORD pnUsageCount ); BOOL INSTAPI SQLRemoveDSNFromIni( LPCSTR pszDSN ); BOOL INSTAPI SQLRemoveTranslator( LPCSTR pszTranslator, LPDWORD pnUsageCount ); BOOL INSTAPI SQLSetConfigMode( UWORD nConfigMode ); BOOL INSTAPI SQLValidDSN( LPCSTR pszDSN ); BOOL INSTAPI SQLWriteDSNToIni( LPCSTR pszDSN, LPCSTR pszDriver ); BOOL INSTAPI SQLWriteFileDSN( LPCSTR pszFileName, LPCSTR pszAppName, LPCSTR pszKeyName, LPCSTR pszString ); BOOL INSTAPI SQLWritePrivateProfileString( LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszString, LPCSTR pszFileName ); #ifdef __cplusplus } #endif #ifdef UNIXODBC_SOURCE /******************************************************** * PRIVATE API ********************************************************/ #if defined(__cplusplus) extern "C" { #endif BOOL _odbcinst_UserINI( char *pszFileName, BOOL bVerify ); BOOL _odbcinst_SystemINI( char *pszFileName, BOOL bVerify ); BOOL _odbcinst_FileINI( char *pszPath ); char * INSTAPI odbcinst_system_file_path( char *buffer ); char * INSTAPI odbcinst_system_file_name( char *buffer ); char * INSTAPI odbcinst_user_file_path( char *buffer ); char * INSTAPI odbcinst_user_file_name( char *buffer ); BOOL _odbcinst_ConfigModeINI( char *pszFileName ); int _odbcinst_GetSections( HINI hIni, LPSTR pRetBuffer, int nRetBuffer, int *pnBufPos ); int _odbcinst_GetEntries( HINI hIni, LPCSTR pszSection, LPSTR pRetBuffer, int nRetBuffer, int *pnBufPos ); int _SQLGetInstalledDrivers( LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszDefault, LPCSTR pRetBuffer, int nRetBuffer ); BOOL _SQLWriteInstalledDrivers( LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszString ); void __set_config_mode( int mode ); int __get_config_mode( void ); int inst_logPushMsg( char *pszModule, char *pszFunctionName, int nLine, int nSeverity, int nCode, char *pszMessage ); int inst_logPeekMsg( long nMsg, HLOGMSG *phMsg ); int inst_logClear(); /* * we should look at caching this info, the calls can become expensive */ #ifndef DISABLE_INI_CACHING struct ini_cache { char *fname; char *section; char *entry; char *value; char *default_value; int buffer_size; int ret_value; int config_mode; long timestamp; struct ini_cache *next; }; #endif #ifdef __cplusplus } #endif #endif /* UNIXODBC_SOURCE */ /********************************* * ODBCINST - PROPERTIES ********************************* * * PURPOSE: * * To provide the caller a mechanism to interact with Data Source properties * containing Driver specific options while avoiding embedding GUI code in * the ODBC infrastructure. * * DETAILS: * * 1. Application calls libodbcinst.ODBCINSTConstructProperties() * - odbcinst will load the driver and call libMyDrvS.ODBCINSTGetProperties() to build a list of all possible properties * 2. Application calls libodbcinst.ODBCINSTSetProperty() * - use, as required, to init values (ie if configuring existing DataSource) * - use libodbcinst.SetConfigMode() & libodbcinst.SQLGetPrivateProfileString() to read existing Data Source info (do not forget to set the mode back) * - do not forget to set mode back to ODBC_BOTH_DSN using SetConfigMode() when done reading * - no call to Driver Setup * 3. Application calls libodbcinst.ODBCINSTValidateProperty() * - use as required (ie on leave widget event) * - an assesment of the entire property list is also done * - this is passed onto the driver setup DLL * 4. Application should refresh widgets in case aPromptData or szValue has changed * - refresh should occur for each property where bRefresh = 1 * 5. Application calls libodbcinst.ODBCINSTValidateProperties() * - call this just before saving new Data Source or updating existing Data Source * - should always call this before saving * - use libodbcinst.SetConfigMode() & libodbcinst.SQLWritePrivateProfileString() to save Data Source info * - do not forget to set mode back to ODBC_BOTH_DSN using SetConfigMode() when done saving * - this is passed onto the driver setup DLL * 6. Application calls ODBCINSTDestructProperties() to free up memory * - unload Driver Setup DLL * - frees memory (Driver Setup allocates most of the memory but we free ALL of it in odbcinst) * * NOTES * * 1. odbcinst implements 5 functions to support this GUI config stuff * 2. Driver Setup DLL implements just 3 functions for its share of the work * *********************************/ #define ODBCINST_SUCCESS 0 #define ODBCINST_WARNING 1 #define ODBCINST_ERROR 2 #define ODBCINST_PROMPTTYPE_LABEL 0 /* readonly */ #define ODBCINST_PROMPTTYPE_TEXTEDIT 1 #define ODBCINST_PROMPTTYPE_LISTBOX 2 #define ODBCINST_PROMPTTYPE_COMBOBOX 3 #define ODBCINST_PROMPTTYPE_FILENAME 4 #define ODBCINST_PROMPTTYPE_HIDDEN 5 #define ODBCINST_PROMPTTYPE_TEXTEDIT_PASSWORD 6 typedef struct tODBCINSTPROPERTY { struct tODBCINSTPROPERTY *pNext; /* pointer to next property, NULL if last property */ char szName[INI_MAX_PROPERTY_NAME+1]; /* property name */ char szValue[INI_MAX_PROPERTY_VALUE+1]; /* property value */ int nPromptType; /* PROMPTTYPE_TEXTEDIT, PROMPTTYPE_LISTBOX, PROMPTTYPE_COMBOBOX, PROMPTTYPE_FILENAME */ char **aPromptData; /* array of pointers terminated with a NULL value in array. */ char *pszHelp; /* help on this property (driver setups should keep it short) */ void *pWidget; /* CALLER CAN STORE A POINTER TO ? HERE */ int bRefresh; /* app should refresh widget ie Driver Setup has changed aPromptData or szValue */ void *hDLL; /* for odbcinst internal use... only first property has valid one */ } ODBCINSTPROPERTY, *HODBCINSTPROPERTY; /* * Conversion routines for wide interface */ char* _multi_string_alloc_and_copy( LPCWSTR in ); char* _single_string_alloc_and_copy( LPCWSTR in ); void _single_string_copy_to_wide( SQLWCHAR *out, LPCSTR in, int len ); void _multi_string_copy_to_wide( SQLWCHAR *out, LPCSTR in, int len ); void _single_copy_to_wide( SQLWCHAR *out, LPCSTR in, int len ); SQLWCHAR* _multi_string_alloc_and_expand( LPCSTR in ); SQLWCHAR* _single_string_alloc_and_expand( LPCSTR in ); void _single_copy_from_wide( SQLCHAR *out, LPCWSTR in, int len ); /* * To support finding UI plugin */ char *_getUIPluginName( char *pszName, char *pszUI ); char *_appendUIPluginExtension( char *pszNameAndExtension, char *pszName ); char *_prependUIPluginPath( char *pszPathAndName, char *pszName ); #if defined(__cplusplus) extern "C" { #endif /* ONLY IMPLEMENTED IN ODBCINST (not in Driver Setup) */ int INSTAPI ODBCINSTConstructProperties( char *szDriver, HODBCINSTPROPERTY *hFirstProperty ); int INSTAPI ODBCINSTSetProperty( HODBCINSTPROPERTY hFirstProperty, char *pszProperty, char *pszValue ); int INSTAPI ODBCINSTDestructProperties( HODBCINSTPROPERTY *hFirstProperty ); int INSTAPI ODBCINSTAddProperty( HODBCINSTPROPERTY hFirstProperty, char *pszProperty, char *pszValue ); /* IMPLEMENTED IN ODBCINST AND DRIVER SETUP */ int INSTAPI ODBCINSTValidateProperty( HODBCINSTPROPERTY hFirstProperty, char *pszProperty, char *pszMessage ); int INSTAPI ODBCINSTValidateProperties( HODBCINSTPROPERTY hFirstProperty, HODBCINSTPROPERTY hBadProperty, char *pszMessage ); /* ONLY IMPLEMENTED IN DRIVER SETUP (not in ODBCINST) */ int INSTAPI ODBCINSTGetProperties( HODBCINSTPROPERTY hFirstProperty ); #if defined(__cplusplus) } #endif #endif unixODBC-2.2.14-p2/include/sql.h0100644000076400007640000007650611102630157014602 0ustar nicknick/************************************************** * sql.h * * These should be consistent with the MS version. * **************************************************/ #ifndef __SQL_H #define __SQL_H /**************************** * default to 3.51 declare something else before here and you get a whole new ball of wax ***************************/ #ifndef ODBCVER #define ODBCVER 0x0351 #endif #ifndef __SQLTYPES_H #include "sqltypes.h" #endif #ifdef __cplusplus extern "C" { #endif /**************************** * some ret values ***************************/ #define SQL_NULL_DATA (-1) #define SQL_DATA_AT_EXEC (-2) #define SQL_SUCCESS 0 #define SQL_SUCCESS_WITH_INFO 1 #if (ODBCVER >= 0x0300) #define SQL_NO_DATA 100 #endif #define SQL_ERROR (-1) #define SQL_INVALID_HANDLE (-2) #define SQL_STILL_EXECUTING 2 #define SQL_NEED_DATA 99 #define SQL_SUCCEEDED(rc) (((rc)&(~1))==0) /**************************** * use these to indicate string termination to some function ***************************/ #define SQL_NTS (-3) #define SQL_NTSL (-3L) /* maximum message length */ #define SQL_MAX_MESSAGE_LENGTH 512 /* date/time length constants */ #if (ODBCVER >= 0x0300) #define SQL_DATE_LEN 10 #define SQL_TIME_LEN 8 /* add P+1 if precision is nonzero */ #define SQL_TIMESTAMP_LEN 19 /* add P+1 if precision is nonzero */ #endif /* handle type identifiers */ #if (ODBCVER >= 0x0300) #define SQL_HANDLE_ENV 1 #define SQL_HANDLE_DBC 2 #define SQL_HANDLE_STMT 3 #define SQL_HANDLE_DESC 4 #endif /* environment attribute */ #if (ODBCVER >= 0x0300) #define SQL_ATTR_OUTPUT_NTS 10001 #endif /* connection attributes */ #if (ODBCVER >= 0x0300) #define SQL_ATTR_AUTO_IPD 10001 #define SQL_ATTR_METADATA_ID 10014 #endif /* ODBCVER >= 0x0300 */ /* statement attributes */ #if (ODBCVER >= 0x0300) #define SQL_ATTR_APP_ROW_DESC 10010 #define SQL_ATTR_APP_PARAM_DESC 10011 #define SQL_ATTR_IMP_ROW_DESC 10012 #define SQL_ATTR_IMP_PARAM_DESC 10013 #define SQL_ATTR_CURSOR_SCROLLABLE (-1) #define SQL_ATTR_CURSOR_SENSITIVITY (-2) #endif /* SQL_ATTR_CURSOR_SCROLLABLE values */ #if (ODBCVER >= 0x0300) #define SQL_NONSCROLLABLE 0 #define SQL_SCROLLABLE 1 #endif /* ODBCVER >= 0x0300 */ /* identifiers of fields in the SQL descriptor */ #if (ODBCVER >= 0x0300) #define SQL_DESC_COUNT 1001 #define SQL_DESC_TYPE 1002 #define SQL_DESC_LENGTH 1003 #define SQL_DESC_OCTET_LENGTH_PTR 1004 #define SQL_DESC_PRECISION 1005 #define SQL_DESC_SCALE 1006 #define SQL_DESC_DATETIME_INTERVAL_CODE 1007 #define SQL_DESC_NULLABLE 1008 #define SQL_DESC_INDICATOR_PTR 1009 #define SQL_DESC_DATA_PTR 1010 #define SQL_DESC_NAME 1011 #define SQL_DESC_UNNAMED 1012 #define SQL_DESC_OCTET_LENGTH 1013 #define SQL_DESC_ALLOC_TYPE 1099 #endif /* identifiers of fields in the diagnostics area */ #if (ODBCVER >= 0x0300) #define SQL_DIAG_RETURNCODE 1 #define SQL_DIAG_NUMBER 2 #define SQL_DIAG_ROW_COUNT 3 #define SQL_DIAG_SQLSTATE 4 #define SQL_DIAG_NATIVE 5 #define SQL_DIAG_MESSAGE_TEXT 6 #define SQL_DIAG_DYNAMIC_FUNCTION 7 #define SQL_DIAG_CLASS_ORIGIN 8 #define SQL_DIAG_SUBCLASS_ORIGIN 9 #define SQL_DIAG_CONNECTION_NAME 10 #define SQL_DIAG_SERVER_NAME 11 #define SQL_DIAG_DYNAMIC_FUNCTION_CODE 12 #endif /* dynamic function codes */ #if (ODBCVER >= 0x0300) #define SQL_DIAG_ALTER_DOMAIN 3 #define SQL_DIAG_ALTER_TABLE 4 #define SQL_DIAG_CALL 7 #define SQL_DIAG_CREATE_ASSERTION 6 #define SQL_DIAG_CREATE_CHARACTER_SET 8 #define SQL_DIAG_CREATE_COLLATION 10 #define SQL_DIAG_CREATE_DOMAIN 23 #define SQL_DIAG_CREATE_INDEX (-1) #define SQL_DIAG_CREATE_SCHEMA 64 #define SQL_DIAG_CREATE_TABLE 77 #define SQL_DIAG_CREATE_TRANSLATION 79 #define SQL_DIAG_CREATE_VIEW 84 #define SQL_DIAG_DELETE_WHERE 19 #define SQL_DIAG_DROP_ASSERTION 24 #define SQL_DIAG_DROP_CHARACTER_SET 25 #define SQL_DIAG_DROP_COLLATION 26 #define SQL_DIAG_DROP_DOMAIN 27 #define SQL_DIAG_DROP_INDEX (-2) #define SQL_DIAG_DROP_SCHEMA 31 #define SQL_DIAG_DROP_TABLE 32 #define SQL_DIAG_DROP_TRANSLATION 33 #define SQL_DIAG_DROP_VIEW 36 #define SQL_DIAG_DYNAMIC_DELETE_CURSOR 38 #define SQL_DIAG_DYNAMIC_UPDATE_CURSOR 81 #define SQL_DIAG_GRANT 48 #define SQL_DIAG_INSERT 50 #define SQL_DIAG_REVOKE 59 #define SQL_DIAG_SELECT_CURSOR 85 #define SQL_DIAG_UNKNOWN_STATEMENT 0 #define SQL_DIAG_UPDATE_WHERE 82 #endif /* ODBCVER >= 0x0300 */ /* SQL data type codes */ #define SQL_UNKNOWN_TYPE 0 #define SQL_CHAR 1 #define SQL_NUMERIC 2 #define SQL_DECIMAL 3 #define SQL_INTEGER 4 #define SQL_SMALLINT 5 #define SQL_FLOAT 6 #define SQL_REAL 7 #define SQL_DOUBLE 8 #if (ODBCVER >= 0x0300) #define SQL_DATETIME 9 #endif #define SQL_VARCHAR 12 /* One-parameter shortcuts for date/time data types */ #if (ODBCVER >= 0x0300) #define SQL_TYPE_DATE 91 #define SQL_TYPE_TIME 92 #define SQL_TYPE_TIMESTAMP 93 #endif /* Statement attribute values for cursor sensitivity */ #if (ODBCVER >= 0x0300) #define SQL_UNSPECIFIED 0 #define SQL_INSENSITIVE 1 #define SQL_SENSITIVE 2 #endif /* GetTypeInfo() request for all data types */ #define SQL_ALL_TYPES 0 /* Default conversion code for SQLBindCol(), SQLBindParam() and SQLGetData() */ #if (ODBCVER >= 0x0300) #define SQL_DEFAULT 99 #endif /* SQLGetData() code indicating that the application row descriptor * specifies the data type */ #if (ODBCVER >= 0x0300) #define SQL_ARD_TYPE (-99) #endif /* SQL date/time type subcodes */ #if (ODBCVER >= 0x0300) #define SQL_CODE_DATE 1 #define SQL_CODE_TIME 2 #define SQL_CODE_TIMESTAMP 3 #endif /* CLI option values */ #if (ODBCVER >= 0x0300) #define SQL_FALSE 0 #define SQL_TRUE 1 #endif /* values of NULLABLE field in descriptor */ #define SQL_NO_NULLS 0 #define SQL_NULLABLE 1 /* Value returned by SQLGetTypeInfo() to denote that it is * not known whether or not a data type supports null values. */ #define SQL_NULLABLE_UNKNOWN 2 /* Values returned by SQLGetTypeInfo() to show WHERE clause * supported */ #if (ODBCVER >= 0x0300) #define SQL_PRED_NONE 0 #define SQL_PRED_CHAR 1 #define SQL_PRED_BASIC 2 #endif /* values of UNNAMED field in descriptor */ #if (ODBCVER >= 0x0300) #define SQL_NAMED 0 #define SQL_UNNAMED 1 #endif /* values of ALLOC_TYPE field in descriptor */ #if (ODBCVER >= 0x0300) #define SQL_DESC_ALLOC_AUTO 1 #define SQL_DESC_ALLOC_USER 2 #endif /* FreeStmt() options */ #define SQL_CLOSE 0 #define SQL_DROP 1 #define SQL_UNBIND 2 #define SQL_RESET_PARAMS 3 /* Codes used for FetchOrientation in SQLFetchScroll(), and in SQLDataSources() */ #define SQL_FETCH_NEXT 1 #define SQL_FETCH_FIRST 2 /* Other codes used for FetchOrientation in SQLFetchScroll() */ #define SQL_FETCH_LAST 3 #define SQL_FETCH_PRIOR 4 #define SQL_FETCH_ABSOLUTE 5 #define SQL_FETCH_RELATIVE 6 /* SQLEndTran() options */ #define SQL_COMMIT 0 #define SQL_ROLLBACK 1 /* null handles returned by SQLAllocHandle() */ #define SQL_NULL_HENV 0 #define SQL_NULL_HDBC 0 #define SQL_NULL_HSTMT 0 #if (ODBCVER >= 0x0300) #define SQL_NULL_HDESC 0 #define SQL_NULL_DESC 0 #endif /* null handle used in place of parent handle when allocating HENV */ #if (ODBCVER >= 0x0300) #define SQL_NULL_HANDLE 0L #endif /* Values that may appear in the result set of SQLSpecialColumns() */ #define SQL_SCOPE_CURROW 0 #define SQL_SCOPE_TRANSACTION 1 #define SQL_SCOPE_SESSION 2 #define SQL_PC_UNKNOWN 0 #if (ODBCVER >= 0x0300) #define SQL_PC_NON_PSEUDO 1 #endif #define SQL_PC_PSEUDO 2 /* Reserved value for the IdentifierType argument of SQLSpecialColumns() */ #if (ODBCVER >= 0x0300) #define SQL_ROW_IDENTIFIER 1 #endif /* Reserved values for UNIQUE argument of SQLStatistics() */ #define SQL_INDEX_UNIQUE 0 #define SQL_INDEX_ALL 1 /* Values that may appear in the result set of SQLStatistics() */ #define SQL_INDEX_CLUSTERED 1 #define SQL_INDEX_HASHED 2 #define SQL_INDEX_OTHER 3 /* SQLGetFunctions() values to identify ODBC APIs */ #define SQL_API_SQLALLOCCONNECT 1 #define SQL_API_SQLALLOCENV 2 #if (ODBCVER >= 0x0300) #define SQL_API_SQLALLOCHANDLE 1001 #endif #define SQL_API_SQLALLOCSTMT 3 #define SQL_API_SQLBINDCOL 4 #if (ODBCVER >= 0x0300) #define SQL_API_SQLBINDPARAM 1002 #endif #define SQL_API_SQLCANCEL 5 #if (ODBCVER >= 0x0300) #define SQL_API_SQLCLOSECURSOR 1003 #define SQL_API_SQLCOLATTRIBUTE 6 #endif #define SQL_API_SQLCOLUMNS 40 #define SQL_API_SQLCONNECT 7 #if (ODBCVER >= 0x0300) #define SQL_API_SQLCOPYDESC 1004 #endif #define SQL_API_SQLDATASOURCES 57 #define SQL_API_SQLDESCRIBECOL 8 #define SQL_API_SQLDISCONNECT 9 #if (ODBCVER >= 0x0300) #define SQL_API_SQLENDTRAN 1005 #endif #define SQL_API_SQLERROR 10 #define SQL_API_SQLEXECDIRECT 11 #define SQL_API_SQLEXECUTE 12 #define SQL_API_SQLFETCH 13 #if (ODBCVER >= 0x0300) #define SQL_API_SQLFETCHSCROLL 1021 #endif #define SQL_API_SQLFREECONNECT 14 #define SQL_API_SQLFREEENV 15 #if (ODBCVER >= 0x0300) #define SQL_API_SQLFREEHANDLE 1006 #endif #define SQL_API_SQLFREESTMT 16 #if (ODBCVER >= 0x0300) #define SQL_API_SQLGETCONNECTATTR 1007 #endif #define SQL_API_SQLGETCONNECTOPTION 42 #define SQL_API_SQLGETCURSORNAME 17 #define SQL_API_SQLGETDATA 43 #if (ODBCVER >= 0x0300) #define SQL_API_SQLGETDESCFIELD 1008 #define SQL_API_SQLGETDESCREC 1009 #define SQL_API_SQLGETDIAGFIELD 1010 #define SQL_API_SQLGETDIAGREC 1011 #define SQL_API_SQLGETENVATTR 1012 #endif #define SQL_API_SQLGETFUNCTIONS 44 #define SQL_API_SQLGETINFO 45 #if (ODBCVER >= 0x0300) #define SQL_API_SQLGETSTMTATTR 1014 #endif #define SQL_API_SQLGETSTMTOPTION 46 #define SQL_API_SQLGETTYPEINFO 47 #define SQL_API_SQLNUMRESULTCOLS 18 #define SQL_API_SQLPARAMDATA 48 #define SQL_API_SQLPREPARE 19 #define SQL_API_SQLPUTDATA 49 #define SQL_API_SQLROWCOUNT 20 #if (ODBCVER >= 0x0300) #define SQL_API_SQLSETCONNECTATTR 1016 #endif #define SQL_API_SQLSETCONNECTOPTION 50 #define SQL_API_SQLSETCURSORNAME 21 #if (ODBCVER >= 0x0300) #define SQL_API_SQLSETDESCFIELD 1017 #define SQL_API_SQLSETDESCREC 1018 #define SQL_API_SQLSETENVATTR 1019 #endif #define SQL_API_SQLSETPARAM 22 #if (ODBCVER >= 0x0300) #define SQL_API_SQLSETSTMTATTR 1020 #endif #define SQL_API_SQLSETSTMTOPTION 51 #define SQL_API_SQLSPECIALCOLUMNS 52 #define SQL_API_SQLSTATISTICS 53 #define SQL_API_SQLTABLES 54 #define SQL_API_SQLTRANSACT 23 /* Information requested by SQLGetInfo() */ #if (ODBCVER >= 0x0300) #define SQL_MAX_DRIVER_CONNECTIONS 0 #define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS #define SQL_MAX_CONCURRENT_ACTIVITIES 1 #define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIES #endif #define SQL_DATA_SOURCE_NAME 2 #define SQL_FETCH_DIRECTION 8 #define SQL_SERVER_NAME 13 #define SQL_SEARCH_PATTERN_ESCAPE 14 #define SQL_DBMS_NAME 17 #define SQL_DBMS_VER 18 #define SQL_ACCESSIBLE_TABLES 19 #define SQL_ACCESSIBLE_PROCEDURES 20 #define SQL_CURSOR_COMMIT_BEHAVIOR 23 #define SQL_DATA_SOURCE_READ_ONLY 25 #define SQL_DEFAULT_TXN_ISOLATION 26 #define SQL_IDENTIFIER_CASE 28 #define SQL_IDENTIFIER_QUOTE_CHAR 29 #define SQL_MAX_COLUMN_NAME_LEN 30 #define SQL_MAXIMUM_COLUMN_NAME_LENGTH SQL_MAX_COLUMN_NAME_LEN #define SQL_MAX_CURSOR_NAME_LEN 31 #define SQL_MAXIMUM_CURSOR_NAME_LENGTH SQL_MAX_CURSOR_NAME_LEN #define SQL_MAX_SCHEMA_NAME_LEN 32 #define SQL_MAXIMUM_SCHEMA_NAME_LENGTH SQL_MAX_SCHEMA_NAME_LEN #define SQL_MAX_CATALOG_NAME_LEN 34 #define SQL_MAXIMUM_CATALOG_NAME_LENGTH SQL_MAX_CATALOG_NAME_LEN #define SQL_MAX_TABLE_NAME_LEN 35 #define SQL_SCROLL_CONCURRENCY 43 #define SQL_TXN_CAPABLE 46 #define SQL_TRANSACTION_CAPABLE SQL_TXN_CAPABLE #define SQL_USER_NAME 47 #define SQL_TXN_ISOLATION_OPTION 72 #define SQL_TRANSACTION_ISOLATION_OPTION SQL_TXN_ISOLATION_OPTION #define SQL_INTEGRITY 73 #define SQL_GETDATA_EXTENSIONS 81 #define SQL_NULL_COLLATION 85 #define SQL_ALTER_TABLE 86 #define SQL_ORDER_BY_COLUMNS_IN_SELECT 90 #define SQL_SPECIAL_CHARACTERS 94 #define SQL_MAX_COLUMNS_IN_GROUP_BY 97 #define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY SQL_MAX_COLUMNS_IN_GROUP_BY #define SQL_MAX_COLUMNS_IN_INDEX 98 #define SQL_MAXIMUM_COLUMNS_IN_INDEX SQL_MAX_COLUMNS_IN_INDEX #define SQL_MAX_COLUMNS_IN_ORDER_BY 99 #define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY SQL_MAX_COLUMNS_IN_ORDER_BY #define SQL_MAX_COLUMNS_IN_SELECT 100 #define SQL_MAXIMUM_COLUMNS_IN_SELECT SQL_MAX_COLUMNS_IN_SELECT #define SQL_MAX_COLUMNS_IN_TABLE 101 #define SQL_MAX_INDEX_SIZE 102 #define SQL_MAXIMUM_INDEX_SIZE SQL_MAX_INDEX_SIZE #define SQL_MAX_ROW_SIZE 104 #define SQL_MAXIMUM_ROW_SIZE SQL_MAX_ROW_SIZE #define SQL_MAX_STATEMENT_LEN 105 #define SQL_MAXIMUM_STATEMENT_LENGTH SQL_MAX_STATEMENT_LEN #define SQL_MAX_TABLES_IN_SELECT 106 #define SQL_MAXIMUM_TABLES_IN_SELECT SQL_MAX_TABLES_IN_SELECT #define SQL_MAX_USER_NAME_LEN 107 #define SQL_MAXIMUM_USER_NAME_LENGTH SQL_MAX_USER_NAME_LEN #if (ODBCVER >= 0x0300) #define SQL_OJ_CAPABILITIES 115 #define SQL_OUTER_JOIN_CAPABILITIES SQL_OJ_CAPABILITIES #endif /* ODBCVER >= 0x0300 */ #if (ODBCVER >= 0x0300) #define SQL_XOPEN_CLI_YEAR 10000 #define SQL_CURSOR_SENSITIVITY 10001 #define SQL_DESCRIBE_PARAMETER 10002 #define SQL_CATALOG_NAME 10003 #define SQL_COLLATION_SEQ 10004 #define SQL_MAX_IDENTIFIER_LEN 10005 #define SQL_MAXIMUM_IDENTIFIER_LENGTH SQL_MAX_IDENTIFIER_LEN #endif /* ODBCVER >= 0x0300 */ /* SQL_ALTER_TABLE bitmasks */ #if (ODBCVER >= 0x0200) #define SQL_AT_ADD_COLUMN 0x00000001L #define SQL_AT_DROP_COLUMN 0x00000002L #endif /* ODBCVER >= 0x0200 */ #if (ODBCVER >= 0x0300) #define SQL_AT_ADD_CONSTRAINT 0x00000008L /* The following bitmasks are ODBC extensions and defined in sqlext.h *#define SQL_AT_COLUMN_SINGLE 0x00000020L *#define SQL_AT_ADD_COLUMN_DEFAULT 0x00000040L *#define SQL_AT_ADD_COLUMN_COLLATION 0x00000080L *#define SQL_AT_SET_COLUMN_DEFAULT 0x00000100L *#define SQL_AT_DROP_COLUMN_DEFAULT 0x00000200L *#define SQL_AT_DROP_COLUMN_CASCADE 0x00000400L *#define SQL_AT_DROP_COLUMN_RESTRICT 0x00000800L *#define SQL_AT_ADD_TABLE_CONSTRAINT 0x00001000L *#define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE 0x00002000L *#define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT 0x00004000L *#define SQL_AT_CONSTRAINT_NAME_DEFINITION 0x00008000L *#define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED 0x00010000L *#define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00020000L *#define SQL_AT_CONSTRAINT_DEFERRABLE 0x00040000L *#define SQL_AT_CONSTRAINT_NON_DEFERRABLE 0x00080000L */ #endif /* ODBCVER >= 0x0300 */ /* SQL_ASYNC_MODE values */ #if (ODBCVER >= 0x0300) #define SQL_AM_NONE 0 #define SQL_AM_CONNECTION 1 #define SQL_AM_STATEMENT 2 #endif /* SQL_CURSOR_COMMIT_BEHAVIOR values */ #define SQL_CB_DELETE 0 #define SQL_CB_CLOSE 1 #define SQL_CB_PRESERVE 2 /* SQL_FETCH_DIRECTION bitmasks */ #define SQL_FD_FETCH_NEXT 0x00000001L #define SQL_FD_FETCH_FIRST 0x00000002L #define SQL_FD_FETCH_LAST 0x00000004L #define SQL_FD_FETCH_PRIOR 0x00000008L #define SQL_FD_FETCH_ABSOLUTE 0x00000010L #define SQL_FD_FETCH_RELATIVE 0x00000020L /* SQL_GETDATA_EXTENSIONS bitmasks */ #define SQL_GD_ANY_COLUMN 0x00000001L #define SQL_GD_ANY_ORDER 0x00000002L /* SQL_IDENTIFIER_CASE values */ #define SQL_IC_UPPER 1 #define SQL_IC_LOWER 2 #define SQL_IC_SENSITIVE 3 #define SQL_IC_MIXED 4 /* SQL_OJ_CAPABILITIES bitmasks */ /* NB: this means 'outer join', not what you may be thinking */ #if (ODBCVER >= 0x0201) #define SQL_OJ_LEFT 0x00000001L #define SQL_OJ_RIGHT 0x00000002L #define SQL_OJ_FULL 0x00000004L #define SQL_OJ_NESTED 0x00000008L #define SQL_OJ_NOT_ORDERED 0x00000010L #define SQL_OJ_INNER 0x00000020L #define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L #endif /* SQL_SCROLL_CONCURRENCY bitmasks */ #define SQL_SCCO_READ_ONLY 0x00000001L #define SQL_SCCO_LOCK 0x00000002L #define SQL_SCCO_OPT_ROWVER 0x00000004L #define SQL_SCCO_OPT_VALUES 0x00000008L /* SQL_TXN_CAPABLE values */ #define SQL_TC_NONE 0 #define SQL_TC_DML 1 #define SQL_TC_ALL 2 #define SQL_TC_DDL_COMMIT 3 #define SQL_TC_DDL_IGNORE 4 /* SQL_TXN_ISOLATION_OPTION bitmasks */ #define SQL_TXN_READ_UNCOMMITTED 0x00000001L #define SQL_TRANSACTION_READ_UNCOMMITTED SQL_TXN_READ_UNCOMMITTED #define SQL_TXN_READ_COMMITTED 0x00000002L #define SQL_TRANSACTION_READ_COMMITTED SQL_TXN_READ_COMMITTED #define SQL_TXN_REPEATABLE_READ 0x00000004L #define SQL_TRANSACTION_REPEATABLE_READ SQL_TXN_REPEATABLE_READ #define SQL_TXN_SERIALIZABLE 0x00000008L #define SQL_TRANSACTION_SERIALIZABLE SQL_TXN_SERIALIZABLE /* SQL_NULL_COLLATION values */ #define SQL_NC_HIGH 0 #define SQL_NC_LOW 1 SQLRETURN SQL_API SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionHandle); SQLRETURN SQL_API SQLAllocEnv(SQLHENV *EnvironmentHandle); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle); #endif SQLRETURN SQL_API SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandle); SQLRETURN SQL_API SQLBindCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLLEN BufferLength, SQLLEN *StrLen_or_Ind); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLULEN LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLLEN *StrLen_or_Ind); #endif SQLRETURN SQL_API SQLCancel(SQLHSTMT StatementHandle); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLCloseCursor(SQLHSTMT StatementHandle); SQLRETURN SQL_API SQLColAttribute(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLLEN *NumericAttribute /* spec says (SQLPOINTER) not (SQLEN*) - PAH */ ); /* Ms now say SQLLEN* http://msdn.microsoft.com/library/en-us/odbc/htm/dasdkodbcoverview_64bit.asp - NG */ #endif SQLRETURN SQL_API SQLColumns(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *ColumnName, SQLSMALLINT NameLength4); SQLRETURN SQL_API SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSMALLINT NameLength1, SQLCHAR *UserName, SQLSMALLINT NameLength2, SQLCHAR *Authentication, SQLSMALLINT NameLength3); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLCopyDesc(SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle); #endif SQLRETURN SQL_API SQLDataSources(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLCHAR *ServerName, SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, SQLCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2); SQLRETURN SQL_API SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, SQLSMALLINT *DataType, SQLULEN *ColumnSize, SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable); SQLRETURN SQL_API SQLDisconnect(SQLHDBC ConnectionHandle); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType); #endif SQLRETURN SQL_API SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle, SQLCHAR *Sqlstate, SQLINTEGER *NativeError, SQLCHAR *MessageText, SQLSMALLINT BufferLength, SQLSMALLINT *TextLength); SQLRETURN SQL_API SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength); SQLRETURN SQL_API SQLExecute(SQLHSTMT StatementHandle); SQLRETURN SQL_API SQLFetch(SQLHSTMT StatementHandle); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLLEN FetchOffset); #endif SQLRETURN SQL_API SQLFreeConnect(SQLHDBC ConnectionHandle); SQLRETURN SQL_API SQLFreeEnv(SQLHENV EnvironmentHandle); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle); #endif SQLRETURN SQL_API SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength); #endif SQLRETURN SQL_API SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value); SQLRETURN SQL_API SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength); SQLRETURN SQL_API SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLLEN BufferLength, SQLLEN *StrLen_or_Ind); #if (ODBCVER >= 0x0300) SQLRETURN SQLGetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength); SQLRETURN SQL_API SQLGetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLCHAR *Name, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLSMALLINT *Type, SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision, SQLSMALLINT *Scale, SQLSMALLINT *Nullable); SQLRETURN SQL_API SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength); SQLRETURN SQL_API SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLCHAR *Sqlstate, SQLINTEGER *NativeError, SQLCHAR *MessageText, SQLSMALLINT BufferLength, SQLSMALLINT *TextLength); SQLRETURN SQL_API SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength); #endif /* ODBCVER >= 0x0300 */ SQLRETURN SQL_API SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported); SQLRETURN SQL_API SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength); #endif /* ODBCVER >= 0x0300 */ SQLRETURN SQL_API SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLPOINTER Value); SQLRETURN SQL_API SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType); SQLRETURN SQL_API SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount); SQLRETURN SQL_API SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value); SQLRETURN SQL_API SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength); SQLRETURN SQL_API SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN StrLen_or_Ind); SQLRETURN SQL_API SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength); #endif /* ODBCVER >= 0x0300 */ SQLRETURN SQL_API SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value); SQLRETURN SQL_API SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT NameLength); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLSetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength); SQLRETURN SQL_API SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT Type, SQLSMALLINT SubType, SQLLEN Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLLEN *StringLength, SQLLEN *Indicator); SQLRETURN SQL_API SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength); #endif /* ODBCVER >= 0x0300 */ SQLRETURN SQL_API SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLULEN LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLLEN *StrLen_or_Ind); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength); #endif SQLRETURN SQL_API SQLSetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLULEN Value); SQLRETURN SQL_API SQLSpecialColumns(SQLHSTMT StatementHandle, SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SQLUSMALLINT Nullable); SQLRETURN SQL_API SQLStatistics(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved); SQLRETURN SQL_API SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *TableType, SQLSMALLINT NameLength4); SQLRETURN SQL_API SQLTransact(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLUSMALLINT CompletionType); #ifdef __cplusplus } #endif #endif unixODBC-2.2.14-p2/include/sqlext.h0100644000076400007640000023504011015234041015304 0ustar nicknick/***************************************************** * sqlext.h * * These should be consistent with the MS version. * *****************************************************/ #ifndef __SQLEXT_H #define __SQLEXT_H /* BEGIN - unixODBC ONLY (programs like ODBCConfig and DataManager use these) */ /* COLUMNS IN SQLTables() RESULT SET */ #define SQLTables_TABLE_CATALOG 1 #define SQLTables_TABLE_SCHEM 2 #define SQLTables_TABLE_NAME 3 #define SQLTables_TABLE_TYPE 4 #define SQLTables_REMARKS 5 /* COLUMNS IN SQLColumns() RESULT SET */ #define SQLColumns_TABLE_CAT 1 #define SQLColumns_TABLE_SCHEM 2 #define SQLColumns_TABLE_NAME 3 #define SQLColumns_COLUMN_NAME 4 #define SQLColumns_DATA_TYPE 5 #define SQLColumns_TYPE_NAME 6 #define SQLColumns_COLUMN_SIZE 7 #define SQLColumns_BUFFER_LENGTH 8 #define SQLColumns_DECIMAL_DIGITS 9 #define SQLColumns_NUM_PREC_RADIX 10 #define SQLColumns_NULLABLE 11 #define SQLColumns_REMARKS 12 #define SQLColumns_COLUMN_DEF 13 #define SQLColumns_SQL_DATA_TYPE 14 #define SQLColumns_SQL_DATETIME_SUB 15 #define SQLColumns_CHAR_OCTET_LENGTH 16 #define SQLColumns_ORDINAL_POSITION 17 #define SQLColumns_IS_NULLABLE 18 /* END - unixODBC ONLY */ #ifndef __SQL_H #include "sql.h" #endif #ifdef __cplusplus extern "C" { /* Assume C declarations for C++ */ #endif /* generally useful constants */ #define SQL_SPEC_MAJOR 3 /* Major version of specification */ #define SQL_SPEC_MINOR 52 /* Minor version of specification */ #define SQL_SPEC_STRING "03.52" /* String constant for version */ #define SQL_SQLSTATE_SIZE 5 /* size of SQLSTATE */ #define SQL_MAX_DSN_LENGTH 32 /* maximum data source name size */ #define SQL_MAX_OPTION_STRING_LENGTH 256 /* return code SQL_NO_DATA_FOUND is the same as SQL_NO_DATA */ #if (ODBCVER < 0x0300) #define SQL_NO_DATA_FOUND 100 #else #define SQL_NO_DATA_FOUND SQL_NO_DATA #endif /* an end handle type */ #if (ODBCVER >= 0x0300) #define SQL_HANDLE_SENV 5 #endif /* ODBCVER >= 0x0300 */ /* env attribute */ #if (ODBCVER >= 0x0300) #define SQL_ATTR_ODBC_VERSION 200 #define SQL_ATTR_CONNECTION_POOLING 201 #define SQL_ATTR_CP_MATCH 202 /* unixODBC additions */ #define SQL_ATTR_UNIXODBC_SYSPATH 65001 #define SQL_ATTR_UNIXODBC_VERSION 65002 #define SQL_ATTR_UNIXODBC_ENVATTR 65003 #endif /* ODBCVER >= 0x0300 */ #if (ODBCVER >= 0x0300) /* values for SQL_ATTR_CONNECTION_POOLING */ #define SQL_CP_OFF 0UL #define SQL_CP_ONE_PER_DRIVER 1UL #define SQL_CP_ONE_PER_HENV 2UL #define SQL_CP_DEFAULT SQL_CP_OFF /* values for SQL_ATTR_CP_MATCH */ #define SQL_CP_STRICT_MATCH 0UL #define SQL_CP_RELAXED_MATCH 1UL #define SQL_CP_MATCH_DEFAULT SQL_CP_STRICT_MATCH /* values for SQL_ATTR_ODBC_VERSION */ #define SQL_OV_ODBC2 2UL #define SQL_OV_ODBC3 3UL #endif /* ODBCVER >= 0x0300 */ /* connection attributes */ #define SQL_ACCESS_MODE 101 #define SQL_AUTOCOMMIT 102 #define SQL_LOGIN_TIMEOUT 103 #define SQL_OPT_TRACE 104 #define SQL_OPT_TRACEFILE 105 #define SQL_TRANSLATE_DLL 106 #define SQL_TRANSLATE_OPTION 107 #define SQL_TXN_ISOLATION 108 #define SQL_CURRENT_QUALIFIER 109 #define SQL_ODBC_CURSORS 110 #define SQL_QUIET_MODE 111 #define SQL_PACKET_SIZE 112 /* connection attributes with new names */ #if (ODBCVER >= 0x0300) #define SQL_ATTR_ACCESS_MODE SQL_ACCESS_MODE #define SQL_ATTR_AUTOCOMMIT SQL_AUTOCOMMIT #define SQL_ATTR_CONNECTION_TIMEOUT 113 #define SQL_ATTR_CURRENT_CATALOG SQL_CURRENT_QUALIFIER #define SQL_ATTR_DISCONNECT_BEHAVIOR 114 #define SQL_ATTR_ENLIST_IN_DTC 1207 #define SQL_ATTR_ENLIST_IN_XA 1208 #define SQL_ATTR_LOGIN_TIMEOUT SQL_LOGIN_TIMEOUT #define SQL_ATTR_ODBC_CURSORS SQL_ODBC_CURSORS #define SQL_ATTR_PACKET_SIZE SQL_PACKET_SIZE #define SQL_ATTR_QUIET_MODE SQL_QUIET_MODE #define SQL_ATTR_TRACE SQL_OPT_TRACE #define SQL_ATTR_TRACEFILE SQL_OPT_TRACEFILE #define SQL_ATTR_TRANSLATE_LIB SQL_TRANSLATE_DLL #define SQL_ATTR_TRANSLATE_OPTION SQL_TRANSLATE_OPTION #define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION #endif /* ODBCVER >= 0x0300 */ #define SQL_ATTR_CONNECTION_DEAD 1209 /* GetConnectAttr only */ #define SQL_ATTR_DRIVER_THREADING 1028 /* Driver threading level */ #if (ODBCVER >= 0x0351) /* ODBC Driver Manager sets this connection attribute to a unicode driver (which supports SQLConnectW) when the application is an ANSI application (which calls SQLConnect, SQLDriverConnect, or SQLBrowseConnect). This is SetConnectAttr only and application does not set this attribute This attribute was introduced because some unicode driver's some APIs may need to behave differently on ANSI or Unicode applications. A unicode driver, which has same behavior for both ANSI or Unicode applications, should return SQL_ERROR when the driver manager sets this connection attribute. When a unicode driver returns SQL_SUCCESS on this attribute, the driver manager treates ANSI and Unicode connections differently in connection pooling. */ #define SQL_ATTR_ANSI_APP 115 #endif /* SQL_CONNECT_OPT_DRVR_START is not meaningful for 3.0 driver */ #if (ODBCVER < 0x0300) #define SQL_CONNECT_OPT_DRVR_START 1000 #endif /* ODBCVER < 0x0300 */ #if (ODBCVER < 0x0300) #define SQL_CONN_OPT_MAX SQL_PACKET_SIZE #define SQL_CONN_OPT_MIN SQL_ACCESS_MODE #endif /* ODBCVER < 0x0300 */ /* SQL_ACCESS_MODE options */ #define SQL_MODE_READ_WRITE 0UL #define SQL_MODE_READ_ONLY 1UL #define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE /* SQL_AUTOCOMMIT options */ #define SQL_AUTOCOMMIT_OFF 0UL #define SQL_AUTOCOMMIT_ON 1UL #define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON /* SQL_LOGIN_TIMEOUT options */ #define SQL_LOGIN_TIMEOUT_DEFAULT 15UL /* SQL_OPT_TRACE options */ #define SQL_OPT_TRACE_OFF 0UL #define SQL_OPT_TRACE_ON 1UL #define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF #define SQL_OPT_TRACE_FILE_DEFAULT "/tmp/SQL.LOG" /* SQL_ODBC_CURSORS options */ #define SQL_CUR_USE_IF_NEEDED 0UL #define SQL_CUR_USE_ODBC 1UL #define SQL_CUR_USE_DRIVER 2UL #define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER #if (ODBCVER >= 0x0300) /* values for SQL_ATTR_DISCONNECT_BEHAVIOR */ #define SQL_DB_RETURN_TO_POOL 0UL #define SQL_DB_DISCONNECT 1UL #define SQL_DB_DEFAULT SQL_DB_RETURN_TO_POOL /* values for SQL_ATTR_ENLIST_IN_DTC */ #define SQL_DTC_DONE 0L #endif /* ODBCVER >= 0x0300 */ /* values for SQL_ATTR_CONNECTION_DEAD */ #define SQL_CD_TRUE 1L /* Connection is closed/dead */ #define SQL_CD_FALSE 0L /* Connection is open/available */ /* values for SQL_ATTR_ANSI_APP */ #if (ODBCVER >= 0x0351) #define SQL_AA_TRUE 1L /* the application is an ANSI app */ #define SQL_AA_FALSE 0L /* the application is a Unicode app */ #endif /* statement attributes */ #define SQL_QUERY_TIMEOUT 0 #define SQL_MAX_ROWS 1 #define SQL_NOSCAN 2 #define SQL_MAX_LENGTH 3 #define SQL_ASYNC_ENABLE 4 /* same as SQL_ATTR_ASYNC_ENABLE */ #define SQL_BIND_TYPE 5 #define SQL_CURSOR_TYPE 6 #define SQL_CONCURRENCY 7 #define SQL_KEYSET_SIZE 8 #define SQL_ROWSET_SIZE 9 #define SQL_SIMULATE_CURSOR 10 #define SQL_RETRIEVE_DATA 11 #define SQL_USE_BOOKMARKS 12 #define SQL_GET_BOOKMARK 13 /* GetStmtOption Only */ #define SQL_ROW_NUMBER 14 /* GetStmtOption Only */ /* statement attributes for ODBC 3.0 */ #if (ODBCVER >= 0x0300) #define SQL_ATTR_ASYNC_ENABLE 4 #define SQL_ATTR_CONCURRENCY SQL_CONCURRENCY #define SQL_ATTR_CURSOR_TYPE SQL_CURSOR_TYPE #define SQL_ATTR_ENABLE_AUTO_IPD 15 #define SQL_ATTR_FETCH_BOOKMARK_PTR 16 #define SQL_ATTR_KEYSET_SIZE SQL_KEYSET_SIZE #define SQL_ATTR_MAX_LENGTH SQL_MAX_LENGTH #define SQL_ATTR_MAX_ROWS SQL_MAX_ROWS #define SQL_ATTR_NOSCAN SQL_NOSCAN #define SQL_ATTR_PARAM_BIND_OFFSET_PTR 17 #define SQL_ATTR_PARAM_BIND_TYPE 18 #define SQL_ATTR_PARAM_OPERATION_PTR 19 #define SQL_ATTR_PARAM_STATUS_PTR 20 #define SQL_ATTR_PARAMS_PROCESSED_PTR 21 #define SQL_ATTR_PARAMSET_SIZE 22 #define SQL_ATTR_QUERY_TIMEOUT SQL_QUERY_TIMEOUT #define SQL_ATTR_RETRIEVE_DATA SQL_RETRIEVE_DATA #define SQL_ATTR_ROW_BIND_OFFSET_PTR 23 #define SQL_ATTR_ROW_BIND_TYPE SQL_BIND_TYPE #define SQL_ATTR_ROW_NUMBER SQL_ROW_NUMBER /*GetStmtAttr*/ #define SQL_ATTR_ROW_OPERATION_PTR 24 #define SQL_ATTR_ROW_STATUS_PTR 25 #define SQL_ATTR_ROWS_FETCHED_PTR 26 #define SQL_ATTR_ROW_ARRAY_SIZE 27 #define SQL_ATTR_SIMULATE_CURSOR SQL_SIMULATE_CURSOR #define SQL_ATTR_USE_BOOKMARKS SQL_USE_BOOKMARKS #endif /* ODBCVER >= 0x0300 */ #if (ODBCVER < 0x0300) #define SQL_STMT_OPT_MAX SQL_ROW_NUMBER #define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT #endif /* ODBCVER < 0x0300 */ /* New defines for SEARCHABLE column in SQLGetTypeInfo */ #if (ODBCVER >= 0x0300) #define SQL_COL_PRED_CHAR SQL_LIKE_ONLY #define SQL_COL_PRED_BASIC SQL_ALL_EXCEPT_LIKE #endif /* ODBCVER >= 0x0300 */ /* whether an attribute is a pointer or not */ #if (ODBCVER >= 0x0300) #define SQL_IS_POINTER (-4) #define SQL_IS_UINTEGER (-5) #define SQL_IS_INTEGER (-6) #define SQL_IS_USMALLINT (-7) #define SQL_IS_SMALLINT (-8) #endif /* ODBCVER >= 0x0300 */ /* the value of SQL_ATTR_PARAM_BIND_TYPE */ #if (ODBCVER >= 0x0300) #define SQL_PARAM_BIND_BY_COLUMN 0UL #define SQL_PARAM_BIND_TYPE_DEFAULT SQL_PARAM_BIND_BY_COLUMN #endif /* ODBCVER >= 0x0300 */ /* SQL_QUERY_TIMEOUT options */ #define SQL_QUERY_TIMEOUT_DEFAULT 0UL /* SQL_MAX_ROWS options */ #define SQL_MAX_ROWS_DEFAULT 0UL /* SQL_NOSCAN options */ #define SQL_NOSCAN_OFF 0UL /* 1.0 FALSE */ #define SQL_NOSCAN_ON 1UL /* 1.0 TRUE */ #define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF /* SQL_MAX_LENGTH options */ #define SQL_MAX_LENGTH_DEFAULT 0UL /* values for SQL_ATTR_ASYNC_ENABLE */ #define SQL_ASYNC_ENABLE_OFF 0UL #define SQL_ASYNC_ENABLE_ON 1UL #define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF /* SQL_BIND_TYPE options */ #define SQL_BIND_BY_COLUMN 0UL #define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN /* Default value */ /* SQL_CONCURRENCY options */ #define SQL_CONCUR_READ_ONLY 1 #define SQL_CONCUR_LOCK 2 #define SQL_CONCUR_ROWVER 3 #define SQL_CONCUR_VALUES 4 #define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY /* Default value */ /* SQL_CURSOR_TYPE options */ #define SQL_CURSOR_FORWARD_ONLY 0UL #define SQL_CURSOR_KEYSET_DRIVEN 1UL #define SQL_CURSOR_DYNAMIC 2UL #define SQL_CURSOR_STATIC 3UL #define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY /* Default value */ /* SQL_ROWSET_SIZE options */ #define SQL_ROWSET_SIZE_DEFAULT 1UL /* SQL_KEYSET_SIZE options */ #define SQL_KEYSET_SIZE_DEFAULT 0UL /* SQL_SIMULATE_CURSOR options */ #define SQL_SC_NON_UNIQUE 0UL #define SQL_SC_TRY_UNIQUE 1UL #define SQL_SC_UNIQUE 2UL /* SQL_RETRIEVE_DATA options */ #define SQL_RD_OFF 0UL #define SQL_RD_ON 1UL #define SQL_RD_DEFAULT SQL_RD_ON /* SQL_USE_BOOKMARKS options */ #define SQL_UB_OFF 0UL #define SQL_UB_ON 01UL #define SQL_UB_DEFAULT SQL_UB_OFF /* New values for SQL_USE_BOOKMARKS attribute */ #if (ODBCVER >= 0x0300) #define SQL_UB_FIXED SQL_UB_ON #define SQL_UB_VARIABLE 2UL #endif /* ODBCVER >= 0x0300 */ /* extended descriptor field */ #if (ODBCVER >= 0x0300) #define SQL_DESC_ARRAY_SIZE 20 #define SQL_DESC_ARRAY_STATUS_PTR 21 #define SQL_DESC_AUTO_UNIQUE_VALUE SQL_COLUMN_AUTO_INCREMENT #define SQL_DESC_BASE_COLUMN_NAME 22 #define SQL_DESC_BASE_TABLE_NAME 23 #define SQL_DESC_BIND_OFFSET_PTR 24 #define SQL_DESC_BIND_TYPE 25 #define SQL_DESC_CASE_SENSITIVE SQL_COLUMN_CASE_SENSITIVE #define SQL_DESC_CATALOG_NAME SQL_COLUMN_QUALIFIER_NAME #define SQL_DESC_CONCISE_TYPE SQL_COLUMN_TYPE #define SQL_DESC_DATETIME_INTERVAL_PRECISION 26 #define SQL_DESC_DISPLAY_SIZE SQL_COLUMN_DISPLAY_SIZE #define SQL_DESC_FIXED_PREC_SCALE SQL_COLUMN_MONEY #define SQL_DESC_LABEL SQL_COLUMN_LABEL #define SQL_DESC_LITERAL_PREFIX 27 #define SQL_DESC_LITERAL_SUFFIX 28 #define SQL_DESC_LOCAL_TYPE_NAME 29 #define SQL_DESC_MAXIMUM_SCALE 30 #define SQL_DESC_MINIMUM_SCALE 31 #define SQL_DESC_NUM_PREC_RADIX 32 #define SQL_DESC_PARAMETER_TYPE 33 #define SQL_DESC_ROWS_PROCESSED_PTR 34 #if (ODBCVER >= 0x0350) #define SQL_DESC_ROWVER 35 #endif /* ODBCVER >= 0x0350 */ #define SQL_DESC_SCHEMA_NAME SQL_COLUMN_OWNER_NAME #define SQL_DESC_SEARCHABLE SQL_COLUMN_SEARCHABLE #define SQL_DESC_TYPE_NAME SQL_COLUMN_TYPE_NAME #define SQL_DESC_TABLE_NAME SQL_COLUMN_TABLE_NAME #define SQL_DESC_UNSIGNED SQL_COLUMN_UNSIGNED #define SQL_DESC_UPDATABLE SQL_COLUMN_UPDATABLE #endif /* ODBCVER >= 0x0300 */ /* defines for diagnostics fields */ #if (ODBCVER >= 0x0300) #define SQL_DIAG_CURSOR_ROW_COUNT (-1249) #define SQL_DIAG_ROW_NUMBER (-1248) #define SQL_DIAG_COLUMN_NUMBER (-1247) #endif /* ODBCVER >= 0x0300 */ /* SQL extended datatypes */ #define SQL_DATE 9 #if (ODBCVER >= 0x0300) #define SQL_INTERVAL 10 #endif /* ODBCVER >= 0x0300 */ #define SQL_TIME 10 #define SQL_TIMESTAMP 11 #define SQL_LONGVARCHAR (-1) #define SQL_BINARY (-2) #define SQL_VARBINARY (-3) #define SQL_LONGVARBINARY (-4) #define SQL_BIGINT (-5) #define SQL_TINYINT (-6) #define SQL_BIT (-7) #if (ODBCVER >= 0x0350) #define SQL_GUID (-11) #endif /* ODBCVER >= 0x0350 */ #if (ODBCVER >= 0x0300) /* interval code */ #define SQL_CODE_YEAR 1 #define SQL_CODE_MONTH 2 #define SQL_CODE_DAY 3 #define SQL_CODE_HOUR 4 #define SQL_CODE_MINUTE 5 #define SQL_CODE_SECOND 6 #define SQL_CODE_YEAR_TO_MONTH 7 #define SQL_CODE_DAY_TO_HOUR 8 #define SQL_CODE_DAY_TO_MINUTE 9 #define SQL_CODE_DAY_TO_SECOND 10 #define SQL_CODE_HOUR_TO_MINUTE 11 #define SQL_CODE_HOUR_TO_SECOND 12 #define SQL_CODE_MINUTE_TO_SECOND 13 #define SQL_INTERVAL_YEAR (100 + SQL_CODE_YEAR) #define SQL_INTERVAL_MONTH (100 + SQL_CODE_MONTH) #define SQL_INTERVAL_DAY (100 + SQL_CODE_DAY) #define SQL_INTERVAL_HOUR (100 + SQL_CODE_HOUR) #define SQL_INTERVAL_MINUTE (100 + SQL_CODE_MINUTE) #define SQL_INTERVAL_SECOND (100 + SQL_CODE_SECOND) #define SQL_INTERVAL_YEAR_TO_MONTH (100 + SQL_CODE_YEAR_TO_MONTH) #define SQL_INTERVAL_DAY_TO_HOUR (100 + SQL_CODE_DAY_TO_HOUR) #define SQL_INTERVAL_DAY_TO_MINUTE (100 + SQL_CODE_DAY_TO_MINUTE) #define SQL_INTERVAL_DAY_TO_SECOND (100 + SQL_CODE_DAY_TO_SECOND) #define SQL_INTERVAL_HOUR_TO_MINUTE (100 + SQL_CODE_HOUR_TO_MINUTE) #define SQL_INTERVAL_HOUR_TO_SECOND (100 + SQL_CODE_HOUR_TO_SECOND) #define SQL_INTERVAL_MINUTE_TO_SECOND (100 + SQL_CODE_MINUTE_TO_SECOND) #else #define SQL_INTERVAL_YEAR (-80) #define SQL_INTERVAL_MONTH (-81) #define SQL_INTERVAL_YEAR_TO_MONTH (-82) #define SQL_INTERVAL_DAY (-83) #define SQL_INTERVAL_HOUR (-84) #define SQL_INTERVAL_MINUTE (-85) #define SQL_INTERVAL_SECOND (-86) #define SQL_INTERVAL_DAY_TO_HOUR (-87) #define SQL_INTERVAL_DAY_TO_MINUTE (-88) #define SQL_INTERVAL_DAY_TO_SECOND (-89) #define SQL_INTERVAL_HOUR_TO_MINUTE (-90) #define SQL_INTERVAL_HOUR_TO_SECOND (-91) #define SQL_INTERVAL_MINUTE_TO_SECOND (-92) #endif /* ODBCVER >= 0x0300 */ #if (ODBCVER <= 0x0300) #define SQL_UNICODE (-95) #define SQL_UNICODE_VARCHAR (-96) #define SQL_UNICODE_LONGVARCHAR (-97) #define SQL_UNICODE_CHAR SQL_UNICODE #else /* The previous definitions for SQL_UNICODE_ are historical and obsolete */ #define SQL_UNICODE SQL_WCHAR #define SQL_UNICODE_VARCHAR SQL_WVARCHAR #define SQL_UNICODE_LONGVARCHAR SQL_WLONGVARCHAR #define SQL_UNICODE_CHAR SQL_WCHAR #endif #if (ODBCVER < 0x0300) #define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR #define SQL_TYPE_DRIVER_END SQL_UNICODE_LONGVARCHAR #endif /* ODBCVER < 0x0300 */ /* C datatype to SQL datatype mapping SQL types ------------------- */ #define SQL_C_CHAR SQL_CHAR /* CHAR, VARCHAR, DECIMAL, NUMERIC */ #define SQL_C_LONG SQL_INTEGER /* INTEGER */ #define SQL_C_SHORT SQL_SMALLINT /* SMALLINT */ #define SQL_C_FLOAT SQL_REAL /* REAL */ #define SQL_C_DOUBLE SQL_DOUBLE /* FLOAT, DOUBLE */ #if (ODBCVER >= 0x0300) #define SQL_C_NUMERIC SQL_NUMERIC #endif /* ODBCVER >= 0x0300 */ #define SQL_C_DEFAULT 99 #define SQL_SIGNED_OFFSET (-20) #define SQL_UNSIGNED_OFFSET (-22) /* C datatype to SQL datatype mapping */ #define SQL_C_DATE SQL_DATE #define SQL_C_TIME SQL_TIME #define SQL_C_TIMESTAMP SQL_TIMESTAMP #if (ODBCVER >= 0x0300) #define SQL_C_TYPE_DATE SQL_TYPE_DATE #define SQL_C_TYPE_TIME SQL_TYPE_TIME #define SQL_C_TYPE_TIMESTAMP SQL_TYPE_TIMESTAMP #define SQL_C_INTERVAL_YEAR SQL_INTERVAL_YEAR #define SQL_C_INTERVAL_MONTH SQL_INTERVAL_MONTH #define SQL_C_INTERVAL_DAY SQL_INTERVAL_DAY #define SQL_C_INTERVAL_HOUR SQL_INTERVAL_HOUR #define SQL_C_INTERVAL_MINUTE SQL_INTERVAL_MINUTE #define SQL_C_INTERVAL_SECOND SQL_INTERVAL_SECOND #define SQL_C_INTERVAL_YEAR_TO_MONTH SQL_INTERVAL_YEAR_TO_MONTH #define SQL_C_INTERVAL_DAY_TO_HOUR SQL_INTERVAL_DAY_TO_HOUR #define SQL_C_INTERVAL_DAY_TO_MINUTE SQL_INTERVAL_DAY_TO_MINUTE #define SQL_C_INTERVAL_DAY_TO_SECOND SQL_INTERVAL_DAY_TO_SECOND #define SQL_C_INTERVAL_HOUR_TO_MINUTE SQL_INTERVAL_HOUR_TO_MINUTE #define SQL_C_INTERVAL_HOUR_TO_SECOND SQL_INTERVAL_HOUR_TO_SECOND #define SQL_C_INTERVAL_MINUTE_TO_SECOND SQL_INTERVAL_MINUTE_TO_SECOND #endif /* ODBCVER >= 0x0300 */ #define SQL_C_BINARY SQL_BINARY #define SQL_C_BIT SQL_BIT #if (ODBCVER >= 0x0300) #define SQL_C_SBIGINT (SQL_BIGINT+SQL_SIGNED_OFFSET) /* SIGNED BIGINT */ #define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED BIGINT */ #endif /* ODBCVER >= 0x0300 */ #define SQL_C_TINYINT SQL_TINYINT #define SQL_C_SLONG (SQL_C_LONG+SQL_SIGNED_OFFSET) /* SIGNED INTEGER */ #define SQL_C_SSHORT (SQL_C_SHORT+SQL_SIGNED_OFFSET) /* SIGNED SMALLINT */ #define SQL_C_STINYINT (SQL_TINYINT+SQL_SIGNED_OFFSET) /* SIGNED TINYINT */ #define SQL_C_ULONG (SQL_C_LONG+SQL_UNSIGNED_OFFSET) /* UNSIGNED INTEGER*/ #define SQL_C_USHORT (SQL_C_SHORT+SQL_UNSIGNED_OFFSET) /* UNSIGNED SMALLINT*/ #define SQL_C_UTINYINT (SQL_TINYINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED TINYINT*/ #if (ODBCVER >= 0x0300) && (SIZEOF_LONG_INT == 8) && !defined(BUILD_LEGACY_64_BIT_MODE) #define SQL_C_BOOKMARK SQL_C_UBIGINT /* BOOKMARK */ #else #define SQL_C_BOOKMARK SQL_C_ULONG /* BOOKMARK */ #endif #if (ODBCVER >= 0x0350) #define SQL_C_GUID SQL_GUID #endif /* ODBCVER >= 0x0350 */ #define SQL_TYPE_NULL 0 #if (ODBCVER < 0x0300) #define SQL_TYPE_MIN SQL_BIT #define SQL_TYPE_MAX SQL_VARCHAR #endif #if (ODBCVER >= 0x0300) #define SQL_C_VARBOOKMARK SQL_C_BINARY #endif /* ODBCVER >= 0x0300 */ /* define for SQL_DIAG_ROW_NUMBER and SQL_DIAG_COLUMN_NUMBER */ #if (ODBCVER >= 0x0300) #define SQL_NO_ROW_NUMBER (-1) #define SQL_NO_COLUMN_NUMBER (-1) #define SQL_ROW_NUMBER_UNKNOWN (-2) #define SQL_COLUMN_NUMBER_UNKNOWN (-2) #endif /* SQLBindParameter extensions */ #define SQL_DEFAULT_PARAM (-5) #define SQL_IGNORE (-6) #if (ODBCVER >= 0x0300) #define SQL_COLUMN_IGNORE SQL_IGNORE #endif /* ODBCVER >= 0x0300 */ #define SQL_LEN_DATA_AT_EXEC_OFFSET (-100) #define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET) /* binary length for driver specific attributes */ #define SQL_LEN_BINARY_ATTR_OFFSET (-100) #define SQL_LEN_BINARY_ATTR(length) (-(length)+SQL_LEN_BINARY_ATTR_OFFSET) /* Defines used by Driver Manager when mapping SQLSetParam to SQLBindParameter */ #define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT #define SQL_SETPARAM_VALUE_MAX (-1L) /* SQLColAttributes defines */ #define SQL_COLUMN_COUNT 0 #define SQL_COLUMN_NAME 1 #define SQL_COLUMN_TYPE 2 #define SQL_COLUMN_LENGTH 3 #define SQL_COLUMN_PRECISION 4 #define SQL_COLUMN_SCALE 5 #define SQL_COLUMN_DISPLAY_SIZE 6 #define SQL_COLUMN_NULLABLE 7 #define SQL_COLUMN_UNSIGNED 8 #define SQL_COLUMN_MONEY 9 #define SQL_COLUMN_UPDATABLE 10 #define SQL_COLUMN_AUTO_INCREMENT 11 #define SQL_COLUMN_CASE_SENSITIVE 12 #define SQL_COLUMN_SEARCHABLE 13 #define SQL_COLUMN_TYPE_NAME 14 #define SQL_COLUMN_TABLE_NAME 15 #define SQL_COLUMN_OWNER_NAME 16 #define SQL_COLUMN_QUALIFIER_NAME 17 #define SQL_COLUMN_LABEL 18 #define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL #if (ODBCVER < 0x0300) #define SQL_COLUMN_DRIVER_START 1000 #endif /* ODBCVER < 0x0300 */ #define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT /* SQLColAttributes subdefines for SQL_COLUMN_UPDATABLE */ #define SQL_ATTR_READONLY 0 #define SQL_ATTR_WRITE 1 #define SQL_ATTR_READWRITE_UNKNOWN 2 /* SQLColAttributes subdefines for SQL_COLUMN_SEARCHABLE */ /* These are also used by SQLGetInfo */ #define SQL_UNSEARCHABLE 0 #define SQL_LIKE_ONLY 1 #define SQL_ALL_EXCEPT_LIKE 2 #define SQL_SEARCHABLE 3 #define SQL_PRED_SEARCHABLE SQL_SEARCHABLE /* Special return values for SQLGetData */ #define SQL_NO_TOTAL (-4) /********************************************/ /* SQLGetFunctions: additional values for */ /* fFunction to represent functions that */ /* are not in the X/Open spec. */ /********************************************/ #if (ODBCVER >= 0x0300) #define SQL_API_SQLALLOCHANDLESTD 73 #define SQL_API_SQLBULKOPERATIONS 24 #endif /* ODBCVER >= 0x0300 */ #define SQL_API_SQLBINDPARAMETER 72 #define SQL_API_SQLBROWSECONNECT 55 #define SQL_API_SQLCOLATTRIBUTES 6 #define SQL_API_SQLCOLUMNPRIVILEGES 56 #define SQL_API_SQLDESCRIBEPARAM 58 #define SQL_API_SQLDRIVERCONNECT 41 #define SQL_API_SQLDRIVERS 71 #define SQL_API_SQLEXTENDEDFETCH 59 #define SQL_API_SQLFOREIGNKEYS 60 #define SQL_API_SQLMORERESULTS 61 #define SQL_API_SQLNATIVESQL 62 #define SQL_API_SQLNUMPARAMS 63 #define SQL_API_SQLPARAMOPTIONS 64 #define SQL_API_SQLPRIMARYKEYS 65 #define SQL_API_SQLPROCEDURECOLUMNS 66 #define SQL_API_SQLPROCEDURES 67 #define SQL_API_SQLSETPOS 68 #define SQL_API_SQLSETSCROLLOPTIONS 69 #define SQL_API_SQLTABLEPRIVILEGES 70 /*-------------------------------------------*/ /* SQL_EXT_API_LAST is not useful with ODBC */ /* version 3.0 because some of the values */ /* from X/Open are in the 10000 range. */ /*-------------------------------------------*/ #if (ODBCVER < 0x0300) #define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER #define SQL_NUM_FUNCTIONS 23 #define SQL_EXT_API_START 40 #define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1) #endif /*--------------------------------------------*/ /* SQL_API_ALL_FUNCTIONS returns an array */ /* of 'booleans' representing whether a */ /* function is implemented by the driver. */ /* */ /* CAUTION: Only functions defined in ODBC */ /* version 2.0 and earlier are returned, the */ /* new high-range function numbers defined by */ /* X/Open break this scheme. See the new */ /* method -- SQL_API_ODBC3_ALL_FUNCTIONS */ /*--------------------------------------------*/ #define SQL_API_ALL_FUNCTIONS 0 /* See CAUTION above */ /*----------------------------------------------*/ /* 2.X drivers export a dummy function with */ /* ordinal number SQL_API_LOADBYORDINAL to speed*/ /* loading under the windows operating system. */ /* */ /* CAUTION: Loading by ordinal is not supported */ /* for 3.0 and above drivers. */ /*----------------------------------------------*/ #define SQL_API_LOADBYORDINAL 199 /* See CAUTION above */ /*----------------------------------------------*/ /* SQL_API_ODBC3_ALL_FUNCTIONS */ /* This returns a bitmap, which allows us to */ /* handle the higher-valued function numbers. */ /* Use SQL_FUNC_EXISTS(bitmap,function_number) */ /* to determine if the function exists. */ /*----------------------------------------------*/ #if (ODBCVER >= 0x0300) #define SQL_API_ODBC3_ALL_FUNCTIONS 999 #define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE 250 /* array of 250 words */ #define SQL_FUNC_EXISTS(pfExists, uwAPI) ((*(((UWORD*) (pfExists)) + ((uwAPI) >> 4)) & (1 << ((uwAPI) & 0x000F)) ) ? SQL_TRUE : SQL_FALSE ) #endif /* ODBCVER >= 0x0300 */ /************************************************/ /* Extended definitions for SQLGetInfo */ /************************************************/ /*---------------------------------*/ /* Values in ODBC 2.0 that are not */ /* in the X/Open spec */ /*---------------------------------*/ #define SQL_INFO_FIRST 0 #define SQL_ACTIVE_CONNECTIONS 0 /* MAX_DRIVER_CONNECTIONS */ #define SQL_ACTIVE_STATEMENTS 1 /* MAX_CONCURRENT_ACTIVITIES */ #define SQL_DRIVER_HDBC 3 #define SQL_DRIVER_HENV 4 #define SQL_DRIVER_HSTMT 5 #define SQL_DRIVER_NAME 6 #define SQL_DRIVER_VER 7 #define SQL_ODBC_API_CONFORMANCE 9 #define SQL_ODBC_VER 10 #define SQL_ROW_UPDATES 11 #define SQL_ODBC_SAG_CLI_CONFORMANCE 12 #define SQL_ODBC_SQL_CONFORMANCE 15 #define SQL_PROCEDURES 21 #define SQL_CONCAT_NULL_BEHAVIOR 22 #define SQL_CURSOR_ROLLBACK_BEHAVIOR 24 #define SQL_EXPRESSIONS_IN_ORDERBY 27 #define SQL_MAX_OWNER_NAME_LEN 32 /* MAX_SCHEMA_NAME_LEN */ #define SQL_MAX_PROCEDURE_NAME_LEN 33 #define SQL_MAX_QUALIFIER_NAME_LEN 34 /* MAX_CATALOG_NAME_LEN */ #define SQL_MULT_RESULT_SETS 36 #define SQL_MULTIPLE_ACTIVE_TXN 37 #define SQL_OUTER_JOINS 38 #define SQL_OWNER_TERM 39 #define SQL_PROCEDURE_TERM 40 #define SQL_QUALIFIER_NAME_SEPARATOR 41 #define SQL_QUALIFIER_TERM 42 #define SQL_SCROLL_OPTIONS 44 #define SQL_TABLE_TERM 45 #define SQL_CONVERT_FUNCTIONS 48 #define SQL_NUMERIC_FUNCTIONS 49 #define SQL_STRING_FUNCTIONS 50 #define SQL_SYSTEM_FUNCTIONS 51 #define SQL_TIMEDATE_FUNCTIONS 52 #define SQL_CONVERT_BIGINT 53 #define SQL_CONVERT_BINARY 54 #define SQL_CONVERT_BIT 55 #define SQL_CONVERT_CHAR 56 #define SQL_CONVERT_DATE 57 #define SQL_CONVERT_DECIMAL 58 #define SQL_CONVERT_DOUBLE 59 #define SQL_CONVERT_FLOAT 60 #define SQL_CONVERT_INTEGER 61 #define SQL_CONVERT_LONGVARCHAR 62 #define SQL_CONVERT_NUMERIC 63 #define SQL_CONVERT_REAL 64 #define SQL_CONVERT_SMALLINT 65 #define SQL_CONVERT_TIME 66 #define SQL_CONVERT_TIMESTAMP 67 #define SQL_CONVERT_TINYINT 68 #define SQL_CONVERT_VARBINARY 69 #define SQL_CONVERT_VARCHAR 70 #define SQL_CONVERT_LONGVARBINARY 71 #define SQL_CONVERT_GUID 173 #define SQL_ODBC_SQL_OPT_IEF 73 /* SQL_INTEGRITY */ #define SQL_CORRELATION_NAME 74 #define SQL_NON_NULLABLE_COLUMNS 75 #define SQL_DRIVER_HLIB 76 #define SQL_DRIVER_ODBC_VER 77 #define SQL_LOCK_TYPES 78 #define SQL_POS_OPERATIONS 79 #define SQL_POSITIONED_STATEMENTS 80 #define SQL_BOOKMARK_PERSISTENCE 82 #define SQL_STATIC_SENSITIVITY 83 #define SQL_FILE_USAGE 84 #define SQL_COLUMN_ALIAS 87 #define SQL_GROUP_BY 88 #define SQL_KEYWORDS 89 #define SQL_OWNER_USAGE 91 #define SQL_QUALIFIER_USAGE 92 #define SQL_QUOTED_IDENTIFIER_CASE 93 #define SQL_SUBQUERIES 95 #define SQL_UNION 96 #define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103 #define SQL_MAX_CHAR_LITERAL_LEN 108 #define SQL_TIMEDATE_ADD_INTERVALS 109 #define SQL_TIMEDATE_DIFF_INTERVALS 110 #define SQL_NEED_LONG_DATA_LEN 111 #define SQL_MAX_BINARY_LITERAL_LEN 112 #define SQL_LIKE_ESCAPE_CLAUSE 113 #define SQL_QUALIFIER_LOCATION 114 #if (ODBCVER >= 0x0201 && ODBCVER < 0x0300) #ifndef SQL_OJ_CAPABILITIES #define SQL_OJ_CAPABILITIES 65003 /* Temp value until ODBC 3.0 */ #endif #endif /* ODBCVER >= 0x0201 && ODBCVER < 0x0300 */ /*----------------------------------------------*/ /* SQL_INFO_LAST and SQL_INFO_DRIVER_START are */ /* not useful anymore, because X/Open has */ /* values in the 10000 range. You */ /* must contact X/Open directly to get a range */ /* of numbers for driver-specific values. */ /*----------------------------------------------*/ #if (ODBCVER < 0x0300) #define SQL_INFO_LAST SQL_QUALIFIER_LOCATION #define SQL_INFO_DRIVER_START 1000 #endif /* ODBCVER < 0x0300 */ /*-----------------------------------------------*/ /* ODBC 3.0 SQLGetInfo values that are not part */ /* of the X/Open standard at this time. X/Open */ /* standard values are in sql.h. */ /*-----------------------------------------------*/ #if (ODBCVER >= 0x0300) #define SQL_ACTIVE_ENVIRONMENTS 116 #define SQL_ALTER_DOMAIN 117 #define SQL_SQL_CONFORMANCE 118 #define SQL_DATETIME_LITERALS 119 #define SQL_ASYNC_MODE 10021 /* new X/Open spec */ #define SQL_BATCH_ROW_COUNT 120 #define SQL_BATCH_SUPPORT 121 #define SQL_CATALOG_LOCATION SQL_QUALIFIER_LOCATION #define SQL_CATALOG_NAME_SEPARATOR SQL_QUALIFIER_NAME_SEPARATOR #define SQL_CATALOG_TERM SQL_QUALIFIER_TERM #define SQL_CATALOG_USAGE SQL_QUALIFIER_USAGE #define SQL_CONVERT_WCHAR 122 #define SQL_CONVERT_INTERVAL_DAY_TIME 123 #define SQL_CONVERT_INTERVAL_YEAR_MONTH 124 #define SQL_CONVERT_WLONGVARCHAR 125 #define SQL_CONVERT_WVARCHAR 126 #define SQL_CREATE_ASSERTION 127 #define SQL_CREATE_CHARACTER_SET 128 #define SQL_CREATE_COLLATION 129 #define SQL_CREATE_DOMAIN 130 #define SQL_CREATE_SCHEMA 131 #define SQL_CREATE_TABLE 132 #define SQL_CREATE_TRANSLATION 133 #define SQL_CREATE_VIEW 134 #define SQL_DRIVER_HDESC 135 #define SQL_DROP_ASSERTION 136 #define SQL_DROP_CHARACTER_SET 137 #define SQL_DROP_COLLATION 138 #define SQL_DROP_DOMAIN 139 #define SQL_DROP_SCHEMA 140 #define SQL_DROP_TABLE 141 #define SQL_DROP_TRANSLATION 142 #define SQL_DROP_VIEW 143 #define SQL_DYNAMIC_CURSOR_ATTRIBUTES1 144 #define SQL_DYNAMIC_CURSOR_ATTRIBUTES2 145 #define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 146 #define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 147 #define SQL_INDEX_KEYWORDS 148 #define SQL_INFO_SCHEMA_VIEWS 149 #define SQL_KEYSET_CURSOR_ATTRIBUTES1 150 #define SQL_KEYSET_CURSOR_ATTRIBUTES2 151 #define SQL_MAX_ASYNC_CONCURRENT_STATEMENTS 10022 /* new X/Open spec */ #define SQL_ODBC_INTERFACE_CONFORMANCE 152 #define SQL_PARAM_ARRAY_ROW_COUNTS 153 #define SQL_PARAM_ARRAY_SELECTS 154 #define SQL_SCHEMA_TERM SQL_OWNER_TERM #define SQL_SCHEMA_USAGE SQL_OWNER_USAGE #define SQL_SQL92_DATETIME_FUNCTIONS 155 #define SQL_SQL92_FOREIGN_KEY_DELETE_RULE 156 #define SQL_SQL92_FOREIGN_KEY_UPDATE_RULE 157 #define SQL_SQL92_GRANT 158 #define SQL_SQL92_NUMERIC_VALUE_FUNCTIONS 159 #define SQL_SQL92_PREDICATES 160 #define SQL_SQL92_RELATIONAL_JOIN_OPERATORS 161 #define SQL_SQL92_REVOKE 162 #define SQL_SQL92_ROW_VALUE_CONSTRUCTOR 163 #define SQL_SQL92_STRING_FUNCTIONS 164 #define SQL_SQL92_VALUE_EXPRESSIONS 165 #define SQL_STANDARD_CLI_CONFORMANCE 166 #define SQL_STATIC_CURSOR_ATTRIBUTES1 167 #define SQL_STATIC_CURSOR_ATTRIBUTES2 168 #define SQL_AGGREGATE_FUNCTIONS 169 #define SQL_DDL_INDEX 170 #define SQL_DM_VER 171 #define SQL_INSERT_STATEMENT 172 #define SQL_UNION_STATEMENT SQL_UNION #endif /* ODBCVER >= 0x0300 */ #define SQL_DTC_TRANSITION_COST 1750 /* SQL_ALTER_TABLE bitmasks */ #if (ODBCVER >= 0x0300) /* the following 5 bitmasks are defined in sql.h *#define SQL_AT_ADD_COLUMN 0x00000001L *#define SQL_AT_DROP_COLUMN 0x00000002L *#define SQL_AT_ADD_CONSTRAINT 0x00000008L */ #define SQL_AT_ADD_COLUMN_SINGLE 0x00000020L #define SQL_AT_ADD_COLUMN_DEFAULT 0x00000040L #define SQL_AT_ADD_COLUMN_COLLATION 0x00000080L #define SQL_AT_SET_COLUMN_DEFAULT 0x00000100L #define SQL_AT_DROP_COLUMN_DEFAULT 0x00000200L #define SQL_AT_DROP_COLUMN_CASCADE 0x00000400L #define SQL_AT_DROP_COLUMN_RESTRICT 0x00000800L #define SQL_AT_ADD_TABLE_CONSTRAINT 0x00001000L #define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE 0x00002000L #define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT 0x00004000L #define SQL_AT_CONSTRAINT_NAME_DEFINITION 0x00008000L #define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED 0x00010000L #define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00020000L #define SQL_AT_CONSTRAINT_DEFERRABLE 0x00040000L #define SQL_AT_CONSTRAINT_NON_DEFERRABLE 0x00080000L #endif /* ODBCVER >= 0x0300 */ /* SQL_CONVERT_* return value bitmasks */ #define SQL_CVT_CHAR 0x00000001L #define SQL_CVT_NUMERIC 0x00000002L #define SQL_CVT_DECIMAL 0x00000004L #define SQL_CVT_INTEGER 0x00000008L #define SQL_CVT_SMALLINT 0x00000010L #define SQL_CVT_FLOAT 0x00000020L #define SQL_CVT_REAL 0x00000040L #define SQL_CVT_DOUBLE 0x00000080L #define SQL_CVT_VARCHAR 0x00000100L #define SQL_CVT_LONGVARCHAR 0x00000200L #define SQL_CVT_BINARY 0x00000400L #define SQL_CVT_VARBINARY 0x00000800L #define SQL_CVT_BIT 0x00001000L #define SQL_CVT_TINYINT 0x00002000L #define SQL_CVT_BIGINT 0x00004000L #define SQL_CVT_DATE 0x00008000L #define SQL_CVT_TIME 0x00010000L #define SQL_CVT_TIMESTAMP 0x00020000L #define SQL_CVT_LONGVARBINARY 0x00040000L #if (ODBCVER >= 0x0300) #define SQL_CVT_INTERVAL_YEAR_MONTH 0x00080000L #define SQL_CVT_INTERVAL_DAY_TIME 0x00100000L #define SQL_CVT_WCHAR 0x00200000L #define SQL_CVT_WLONGVARCHAR 0x00400000L #define SQL_CVT_WVARCHAR 0x00800000L #define SQL_CVT_GUID 0x01000000L #endif /* ODBCVER >= 0x0300 */ /* SQL_CONVERT_FUNCTIONS functions */ #define SQL_FN_CVT_CONVERT 0x00000001L #if (ODBCVER >= 0x0300) #define SQL_FN_CVT_CAST 0x00000002L #endif /* ODBCVER >= 0x0300 */ /* SQL_STRING_FUNCTIONS functions */ #define SQL_FN_STR_CONCAT 0x00000001L #define SQL_FN_STR_INSERT 0x00000002L #define SQL_FN_STR_LEFT 0x00000004L #define SQL_FN_STR_LTRIM 0x00000008L #define SQL_FN_STR_LENGTH 0x00000010L #define SQL_FN_STR_LOCATE 0x00000020L #define SQL_FN_STR_LCASE 0x00000040L #define SQL_FN_STR_REPEAT 0x00000080L #define SQL_FN_STR_REPLACE 0x00000100L #define SQL_FN_STR_RIGHT 0x00000200L #define SQL_FN_STR_RTRIM 0x00000400L #define SQL_FN_STR_SUBSTRING 0x00000800L #define SQL_FN_STR_UCASE 0x00001000L #define SQL_FN_STR_ASCII 0x00002000L #define SQL_FN_STR_CHAR 0x00004000L #define SQL_FN_STR_DIFFERENCE 0x00008000L #define SQL_FN_STR_LOCATE_2 0x00010000L #define SQL_FN_STR_SOUNDEX 0x00020000L #define SQL_FN_STR_SPACE 0x00040000L #if (ODBCVER >= 0x0300) #define SQL_FN_STR_BIT_LENGTH 0x00080000L #define SQL_FN_STR_CHAR_LENGTH 0x00100000L #define SQL_FN_STR_CHARACTER_LENGTH 0x00200000L #define SQL_FN_STR_OCTET_LENGTH 0x00400000L #define SQL_FN_STR_POSITION 0x00800000L #endif /* ODBCVER >= 0x0300 */ /* SQL_SQL92_STRING_FUNCTIONS */ #if (ODBCVER >= 0x0300) #define SQL_SSF_CONVERT 0x00000001L #define SQL_SSF_LOWER 0x00000002L #define SQL_SSF_UPPER 0x00000004L #define SQL_SSF_SUBSTRING 0x00000008L #define SQL_SSF_TRANSLATE 0x00000010L #define SQL_SSF_TRIM_BOTH 0x00000020L #define SQL_SSF_TRIM_LEADING 0x00000040L #define SQL_SSF_TRIM_TRAILING 0x00000080L #endif /* ODBCVER >= 0x0300 */ /* SQL_NUMERIC_FUNCTIONS functions */ #define SQL_FN_NUM_ABS 0x00000001L #define SQL_FN_NUM_ACOS 0x00000002L #define SQL_FN_NUM_ASIN 0x00000004L #define SQL_FN_NUM_ATAN 0x00000008L #define SQL_FN_NUM_ATAN2 0x00000010L #define SQL_FN_NUM_CEILING 0x00000020L #define SQL_FN_NUM_COS 0x00000040L #define SQL_FN_NUM_COT 0x00000080L #define SQL_FN_NUM_EXP 0x00000100L #define SQL_FN_NUM_FLOOR 0x00000200L #define SQL_FN_NUM_LOG 0x00000400L #define SQL_FN_NUM_MOD 0x00000800L #define SQL_FN_NUM_SIGN 0x00001000L #define SQL_FN_NUM_SIN 0x00002000L #define SQL_FN_NUM_SQRT 0x00004000L #define SQL_FN_NUM_TAN 0x00008000L #define SQL_FN_NUM_PI 0x00010000L #define SQL_FN_NUM_RAND 0x00020000L #define SQL_FN_NUM_DEGREES 0x00040000L #define SQL_FN_NUM_LOG10 0x00080000L #define SQL_FN_NUM_POWER 0x00100000L #define SQL_FN_NUM_RADIANS 0x00200000L #define SQL_FN_NUM_ROUND 0x00400000L #define SQL_FN_NUM_TRUNCATE 0x00800000L /* SQL_SQL92_NUMERIC_VALUE_FUNCTIONS */ #if (ODBCVER >= 0x0300) #define SQL_SNVF_BIT_LENGTH 0x00000001L #define SQL_SNVF_CHAR_LENGTH 0x00000002L #define SQL_SNVF_CHARACTER_LENGTH 0x00000004L #define SQL_SNVF_EXTRACT 0x00000008L #define SQL_SNVF_OCTET_LENGTH 0x00000010L #define SQL_SNVF_POSITION 0x00000020L #endif /* ODBCVER >= 0x0300 */ /* SQL_TIMEDATE_FUNCTIONS functions */ #define SQL_FN_TD_NOW 0x00000001L #define SQL_FN_TD_CURDATE 0x00000002L #define SQL_FN_TD_DAYOFMONTH 0x00000004L #define SQL_FN_TD_DAYOFWEEK 0x00000008L #define SQL_FN_TD_DAYOFYEAR 0x00000010L #define SQL_FN_TD_MONTH 0x00000020L #define SQL_FN_TD_QUARTER 0x00000040L #define SQL_FN_TD_WEEK 0x00000080L #define SQL_FN_TD_YEAR 0x00000100L #define SQL_FN_TD_CURTIME 0x00000200L #define SQL_FN_TD_HOUR 0x00000400L #define SQL_FN_TD_MINUTE 0x00000800L #define SQL_FN_TD_SECOND 0x00001000L #define SQL_FN_TD_TIMESTAMPADD 0x00002000L #define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L #define SQL_FN_TD_DAYNAME 0x00008000L #define SQL_FN_TD_MONTHNAME 0x00010000L #if (ODBCVER >= 0x0300) #define SQL_FN_TD_CURRENT_DATE 0x00020000L #define SQL_FN_TD_CURRENT_TIME 0x00040000L #define SQL_FN_TD_CURRENT_TIMESTAMP 0x00080000L #define SQL_FN_TD_EXTRACT 0x00100000L #endif /* ODBCVER >= 0x0300 */ /* SQL_SQL92_DATETIME_FUNCTIONS */ #if (ODBCVER >= 0x0300) #define SQL_SDF_CURRENT_DATE 0x00000001L #define SQL_SDF_CURRENT_TIME 0x00000002L #define SQL_SDF_CURRENT_TIMESTAMP 0x00000004L #endif /* ODBCVER >= 0x0300 */ /* SQL_SYSTEM_FUNCTIONS functions */ #define SQL_FN_SYS_USERNAME 0x00000001L #define SQL_FN_SYS_DBNAME 0x00000002L #define SQL_FN_SYS_IFNULL 0x00000004L /* SQL_TIMEDATE_ADD_INTERVALS and SQL_TIMEDATE_DIFF_INTERVALS functions */ #define SQL_FN_TSI_FRAC_SECOND 0x00000001L #define SQL_FN_TSI_SECOND 0x00000002L #define SQL_FN_TSI_MINUTE 0x00000004L #define SQL_FN_TSI_HOUR 0x00000008L #define SQL_FN_TSI_DAY 0x00000010L #define SQL_FN_TSI_WEEK 0x00000020L #define SQL_FN_TSI_MONTH 0x00000040L #define SQL_FN_TSI_QUARTER 0x00000080L #define SQL_FN_TSI_YEAR 0x00000100L /* bitmasks for SQL_DYNAMIC_CURSOR_ATTRIBUTES1, * SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1, * SQL_KEYSET_CURSOR_ATTRIBUTES1, and SQL_STATIC_CURSOR_ATTRIBUTES1 */ #if (ODBCVER >= 0x0300) /* supported SQLFetchScroll FetchOrientation's */ #define SQL_CA1_NEXT 0x00000001L #define SQL_CA1_ABSOLUTE 0x00000002L #define SQL_CA1_RELATIVE 0x00000004L #define SQL_CA1_BOOKMARK 0x00000008L /* supported SQLSetPos LockType's */ #define SQL_CA1_LOCK_NO_CHANGE 0x00000040L #define SQL_CA1_LOCK_EXCLUSIVE 0x00000080L #define SQL_CA1_LOCK_UNLOCK 0x00000100L /* supported SQLSetPos Operations */ #define SQL_CA1_POS_POSITION 0x00000200L #define SQL_CA1_POS_UPDATE 0x00000400L #define SQL_CA1_POS_DELETE 0x00000800L #define SQL_CA1_POS_REFRESH 0x00001000L /* positioned updates and deletes */ #define SQL_CA1_POSITIONED_UPDATE 0x00002000L #define SQL_CA1_POSITIONED_DELETE 0x00004000L #define SQL_CA1_SELECT_FOR_UPDATE 0x00008000L /* supported SQLBulkOperations operations */ #define SQL_CA1_BULK_ADD 0x00010000L #define SQL_CA1_BULK_UPDATE_BY_BOOKMARK 0x00020000L #define SQL_CA1_BULK_DELETE_BY_BOOKMARK 0x00040000L #define SQL_CA1_BULK_FETCH_BY_BOOKMARK 0x00080000L #endif /* ODBCVER >= 0x0300 */ /* bitmasks for SQL_DYNAMIC_CURSOR_ATTRIBUTES2, * SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2, * SQL_KEYSET_CURSOR_ATTRIBUTES2, and SQL_STATIC_CURSOR_ATTRIBUTES2 */ #if (ODBCVER >= 0x0300) /* supported values for SQL_ATTR_SCROLL_CONCURRENCY */ #define SQL_CA2_READ_ONLY_CONCURRENCY 0x00000001L #define SQL_CA2_LOCK_CONCURRENCY 0x00000002L #define SQL_CA2_OPT_ROWVER_CONCURRENCY 0x00000004L #define SQL_CA2_OPT_VALUES_CONCURRENCY 0x00000008L /* sensitivity of the cursor to its own inserts, deletes, and updates */ #define SQL_CA2_SENSITIVITY_ADDITIONS 0x00000010L #define SQL_CA2_SENSITIVITY_DELETIONS 0x00000020L #define SQL_CA2_SENSITIVITY_UPDATES 0x00000040L /* semantics of SQL_ATTR_MAX_ROWS */ #define SQL_CA2_MAX_ROWS_SELECT 0x00000080L #define SQL_CA2_MAX_ROWS_INSERT 0x00000100L #define SQL_CA2_MAX_ROWS_DELETE 0x00000200L #define SQL_CA2_MAX_ROWS_UPDATE 0x00000400L #define SQL_CA2_MAX_ROWS_CATALOG 0x00000800L #define SQL_CA2_MAX_ROWS_AFFECTS_ALL (SQL_CA2_MAX_ROWS_SELECT | SQL_CA2_MAX_ROWS_INSERT | SQL_CA2_MAX_ROWS_DELETE | SQL_CA2_MAX_ROWS_UPDATE | SQL_CA2_MAX_ROWS_CATALOG) /* semantics of SQL_DIAG_CURSOR_ROW_COUNT */ #define SQL_CA2_CRC_EXACT 0x00001000L #define SQL_CA2_CRC_APPROXIMATE 0x00002000L /* the kinds of positioned statements that can be simulated */ #define SQL_CA2_SIMULATE_NON_UNIQUE 0x00004000L #define SQL_CA2_SIMULATE_TRY_UNIQUE 0x00008000L #define SQL_CA2_SIMULATE_UNIQUE 0x00010000L #endif /* ODBCVER >= 0x0300 */ /* SQL_ODBC_API_CONFORMANCE values */ #define SQL_OAC_NONE 0x0000 #define SQL_OAC_LEVEL1 0x0001 #define SQL_OAC_LEVEL2 0x0002 /* SQL_ODBC_SAG_CLI_CONFORMANCE values */ #define SQL_OSCC_NOT_COMPLIANT 0x0000 #define SQL_OSCC_COMPLIANT 0x0001 /* SQL_ODBC_SQL_CONFORMANCE values */ #define SQL_OSC_MINIMUM 0x0000 #define SQL_OSC_CORE 0x0001 #define SQL_OSC_EXTENDED 0x0002 /* SQL_CONCAT_NULL_BEHAVIOR values */ #define SQL_CB_NULL 0x0000 #define SQL_CB_NON_NULL 0x0001 /* SQL_SCROLL_OPTIONS masks */ #define SQL_SO_FORWARD_ONLY 0x00000001L #define SQL_SO_KEYSET_DRIVEN 0x00000002L #define SQL_SO_DYNAMIC 0x00000004L #define SQL_SO_MIXED 0x00000008L #define SQL_SO_STATIC 0x00000010L /* SQL_FETCH_DIRECTION masks */ /* SQL_FETCH_RESUME is no longer supported #define SQL_FD_FETCH_RESUME 0x00000040L */ #define SQL_FD_FETCH_BOOKMARK 0x00000080L /* SQL_TXN_ISOLATION_OPTION masks */ /* SQL_TXN_VERSIONING is no longer supported #define SQL_TXN_VERSIONING 0x00000010L */ /* SQL_CORRELATION_NAME values */ #define SQL_CN_NONE 0x0000 #define SQL_CN_DIFFERENT 0x0001 #define SQL_CN_ANY 0x0002 /* SQL_NON_NULLABLE_COLUMNS values */ #define SQL_NNC_NULL 0x0000 #define SQL_NNC_NON_NULL 0x0001 /* SQL_NULL_COLLATION values */ #define SQL_NC_START 0x0002 #define SQL_NC_END 0x0004 /* SQL_FILE_USAGE values */ #define SQL_FILE_NOT_SUPPORTED 0x0000 #define SQL_FILE_TABLE 0x0001 #define SQL_FILE_QUALIFIER 0x0002 #define SQL_FILE_CATALOG SQL_FILE_QUALIFIER /* ODBC 3.0 */ /* SQL_GETDATA_EXTENSIONS values */ #define SQL_GD_BLOCK 0x00000004L #define SQL_GD_BOUND 0x00000008L /* SQL_POSITIONED_STATEMENTS masks */ #define SQL_PS_POSITIONED_DELETE 0x00000001L #define SQL_PS_POSITIONED_UPDATE 0x00000002L #define SQL_PS_SELECT_FOR_UPDATE 0x00000004L /* SQL_GROUP_BY values */ #define SQL_GB_NOT_SUPPORTED 0x0000 #define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001 #define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002 #define SQL_GB_NO_RELATION 0x0003 #if (ODBCVER >= 0x0300) #define SQL_GB_COLLATE 0x0004 #endif /* ODBCVER >= 0x0300 */ /* SQL_OWNER_USAGE masks */ #define SQL_OU_DML_STATEMENTS 0x00000001L #define SQL_OU_PROCEDURE_INVOCATION 0x00000002L #define SQL_OU_TABLE_DEFINITION 0x00000004L #define SQL_OU_INDEX_DEFINITION 0x00000008L #define SQL_OU_PRIVILEGE_DEFINITION 0x00000010L /* SQL_SCHEMA_USAGE masks */ #if (ODBCVER >= 0x0300) #define SQL_SU_DML_STATEMENTS SQL_OU_DML_STATEMENTS #define SQL_SU_PROCEDURE_INVOCATION SQL_OU_PROCEDURE_INVOCATION #define SQL_SU_TABLE_DEFINITION SQL_OU_TABLE_DEFINITION #define SQL_SU_INDEX_DEFINITION SQL_OU_INDEX_DEFINITION #define SQL_SU_PRIVILEGE_DEFINITION SQL_OU_PRIVILEGE_DEFINITION #endif /* ODBCVER >= 0x0300 */ /* SQL_QUALIFIER_USAGE masks */ #define SQL_QU_DML_STATEMENTS 0x00000001L #define SQL_QU_PROCEDURE_INVOCATION 0x00000002L #define SQL_QU_TABLE_DEFINITION 0x00000004L #define SQL_QU_INDEX_DEFINITION 0x00000008L #define SQL_QU_PRIVILEGE_DEFINITION 0x00000010L #if (ODBCVER >= 0x0300) /* SQL_CATALOG_USAGE masks */ #define SQL_CU_DML_STATEMENTS SQL_QU_DML_STATEMENTS #define SQL_CU_PROCEDURE_INVOCATION SQL_QU_PROCEDURE_INVOCATION #define SQL_CU_TABLE_DEFINITION SQL_QU_TABLE_DEFINITION #define SQL_CU_INDEX_DEFINITION SQL_QU_INDEX_DEFINITION #define SQL_CU_PRIVILEGE_DEFINITION SQL_QU_PRIVILEGE_DEFINITION #endif /* ODBCVER >= 0x0300 */ /* SQL_SUBQUERIES masks */ #define SQL_SQ_COMPARISON 0x00000001L #define SQL_SQ_EXISTS 0x00000002L #define SQL_SQ_IN 0x00000004L #define SQL_SQ_QUANTIFIED 0x00000008L #define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010L /* SQL_UNION masks */ #define SQL_U_UNION 0x00000001L #define SQL_U_UNION_ALL 0x00000002L /* SQL_BOOKMARK_PERSISTENCE values */ #define SQL_BP_CLOSE 0x00000001L #define SQL_BP_DELETE 0x00000002L #define SQL_BP_DROP 0x00000004L #define SQL_BP_TRANSACTION 0x00000008L #define SQL_BP_UPDATE 0x00000010L #define SQL_BP_OTHER_HSTMT 0x00000020L #define SQL_BP_SCROLL 0x00000040L /* SQL_STATIC_SENSITIVITY values */ #define SQL_SS_ADDITIONS 0x00000001L #define SQL_SS_DELETIONS 0x00000002L #define SQL_SS_UPDATES 0x00000004L /* SQL_VIEW values */ #define SQL_CV_CREATE_VIEW 0x00000001L #define SQL_CV_CHECK_OPTION 0x00000002L #define SQL_CV_CASCADED 0x00000004L #define SQL_CV_LOCAL 0x00000008L /* SQL_LOCK_TYPES masks */ #define SQL_LCK_NO_CHANGE 0x00000001L #define SQL_LCK_EXCLUSIVE 0x00000002L #define SQL_LCK_UNLOCK 0x00000004L /* SQL_POS_OPERATIONS masks */ #define SQL_POS_POSITION 0x00000001L #define SQL_POS_REFRESH 0x00000002L #define SQL_POS_UPDATE 0x00000004L #define SQL_POS_DELETE 0x00000008L #define SQL_POS_ADD 0x00000010L /* SQL_QUALIFIER_LOCATION values */ #define SQL_QL_START 0x0001 #define SQL_QL_END 0x0002 /* Here start return values for ODBC 3.0 SQLGetInfo */ #if (ODBCVER >= 0x0300) /* SQL_AGGREGATE_FUNCTIONS bitmasks */ #define SQL_AF_AVG 0x00000001L #define SQL_AF_COUNT 0x00000002L #define SQL_AF_MAX 0x00000004L #define SQL_AF_MIN 0x00000008L #define SQL_AF_SUM 0x00000010L #define SQL_AF_DISTINCT 0x00000020L #define SQL_AF_ALL 0x00000040L /* SQL_SQL_CONFORMANCE bit masks */ #define SQL_SC_SQL92_ENTRY 0x00000001L #define SQL_SC_FIPS127_2_TRANSITIONAL 0x00000002L #define SQL_SC_SQL92_INTERMEDIATE 0x00000004L #define SQL_SC_SQL92_FULL 0x00000008L /* SQL_DATETIME_LITERALS masks */ #define SQL_DL_SQL92_DATE 0x00000001L #define SQL_DL_SQL92_TIME 0x00000002L #define SQL_DL_SQL92_TIMESTAMP 0x00000004L #define SQL_DL_SQL92_INTERVAL_YEAR 0x00000008L #define SQL_DL_SQL92_INTERVAL_MONTH 0x00000010L #define SQL_DL_SQL92_INTERVAL_DAY 0x00000020L #define SQL_DL_SQL92_INTERVAL_HOUR 0x00000040L #define SQL_DL_SQL92_INTERVAL_MINUTE 0x00000080L #define SQL_DL_SQL92_INTERVAL_SECOND 0x00000100L #define SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH 0x00000200L #define SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR 0x00000400L #define SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE 0x00000800L #define SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND 0x00001000L #define SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE 0x00002000L #define SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND 0x00004000L #define SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND 0x00008000L /* SQL_CATALOG_LOCATION values */ #define SQL_CL_START SQL_QL_START #define SQL_CL_END SQL_QL_END /* values for SQL_BATCH_ROW_COUNT */ #define SQL_BRC_PROCEDURES 0x0000001 #define SQL_BRC_EXPLICIT 0x0000002 #define SQL_BRC_ROLLED_UP 0x0000004 /* bitmasks for SQL_BATCH_SUPPORT */ #define SQL_BS_SELECT_EXPLICIT 0x00000001L #define SQL_BS_ROW_COUNT_EXPLICIT 0x00000002L #define SQL_BS_SELECT_PROC 0x00000004L #define SQL_BS_ROW_COUNT_PROC 0x00000008L /* Values for SQL_PARAM_ARRAY_ROW_COUNTS getinfo */ #define SQL_PARC_BATCH 1 #define SQL_PARC_NO_BATCH 2 /* values for SQL_PARAM_ARRAY_SELECTS */ #define SQL_PAS_BATCH 1 #define SQL_PAS_NO_BATCH 2 #define SQL_PAS_NO_SELECT 3 /* Bitmasks for SQL_INDEX_KEYWORDS */ #define SQL_IK_NONE 0x00000000L #define SQL_IK_ASC 0x00000001L #define SQL_IK_DESC 0x00000002L #define SQL_IK_ALL (SQL_IK_ASC | SQL_IK_DESC) /* Bitmasks for SQL_INFO_SCHEMA_VIEWS */ #define SQL_ISV_ASSERTIONS 0x00000001L #define SQL_ISV_CHARACTER_SETS 0x00000002L #define SQL_ISV_CHECK_CONSTRAINTS 0x00000004L #define SQL_ISV_COLLATIONS 0x00000008L #define SQL_ISV_COLUMN_DOMAIN_USAGE 0x00000010L #define SQL_ISV_COLUMN_PRIVILEGES 0x00000020L #define SQL_ISV_COLUMNS 0x00000040L #define SQL_ISV_CONSTRAINT_COLUMN_USAGE 0x00000080L #define SQL_ISV_CONSTRAINT_TABLE_USAGE 0x00000100L #define SQL_ISV_DOMAIN_CONSTRAINTS 0x00000200L #define SQL_ISV_DOMAINS 0x00000400L #define SQL_ISV_KEY_COLUMN_USAGE 0x00000800L #define SQL_ISV_REFERENTIAL_CONSTRAINTS 0x00001000L #define SQL_ISV_SCHEMATA 0x00002000L #define SQL_ISV_SQL_LANGUAGES 0x00004000L #define SQL_ISV_TABLE_CONSTRAINTS 0x00008000L #define SQL_ISV_TABLE_PRIVILEGES 0x00010000L #define SQL_ISV_TABLES 0x00020000L #define SQL_ISV_TRANSLATIONS 0x00040000L #define SQL_ISV_USAGE_PRIVILEGES 0x00080000L #define SQL_ISV_VIEW_COLUMN_USAGE 0x00100000L #define SQL_ISV_VIEW_TABLE_USAGE 0x00200000L #define SQL_ISV_VIEWS 0x00400000L /* Bitmasks for SQL_ASYNC_MODE */ #define SQL_AM_NONE 0 #define SQL_AM_CONNECTION 1 #define SQL_AM_STATEMENT 2 /* Bitmasks for SQL_ALTER_DOMAIN */ #define SQL_AD_CONSTRAINT_NAME_DEFINITION 0x00000001L #define SQL_AD_ADD_DOMAIN_CONSTRAINT 0x00000002L #define SQL_AD_DROP_DOMAIN_CONSTRAINT 0x00000004L #define SQL_AD_ADD_DOMAIN_DEFAULT 0x00000008L #define SQL_AD_DROP_DOMAIN_DEFAULT 0x00000010L #define SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L #define SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L #define SQL_AD_ADD_CONSTRAINT_DEFERRABLE 0x00000080L #define SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE 0x00000100L /* SQL_CREATE_SCHEMA bitmasks */ #define SQL_CS_CREATE_SCHEMA 0x00000001L #define SQL_CS_AUTHORIZATION 0x00000002L #define SQL_CS_DEFAULT_CHARACTER_SET 0x00000004L /* SQL_CREATE_TRANSLATION bitmasks */ #define SQL_CTR_CREATE_TRANSLATION 0x00000001L /* SQL_CREATE_ASSERTION bitmasks */ #define SQL_CA_CREATE_ASSERTION 0x00000001L #define SQL_CA_CONSTRAINT_INITIALLY_DEFERRED 0x00000010L #define SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000020L #define SQL_CA_CONSTRAINT_DEFERRABLE 0x00000040L #define SQL_CA_CONSTRAINT_NON_DEFERRABLE 0x00000080L /* SQL_CREATE_CHARACTER_SET bitmasks */ #define SQL_CCS_CREATE_CHARACTER_SET 0x00000001L #define SQL_CCS_COLLATE_CLAUSE 0x00000002L #define SQL_CCS_LIMITED_COLLATION 0x00000004L /* SQL_CREATE_COLLATION bitmasks */ #define SQL_CCOL_CREATE_COLLATION 0x00000001L /* SQL_CREATE_DOMAIN bitmasks */ #define SQL_CDO_CREATE_DOMAIN 0x00000001L #define SQL_CDO_DEFAULT 0x00000002L #define SQL_CDO_CONSTRAINT 0x00000004L #define SQL_CDO_COLLATION 0x00000008L #define SQL_CDO_CONSTRAINT_NAME_DEFINITION 0x00000010L #define SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L #define SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L #define SQL_CDO_CONSTRAINT_DEFERRABLE 0x00000080L #define SQL_CDO_CONSTRAINT_NON_DEFERRABLE 0x00000100L /* SQL_CREATE_TABLE bitmasks */ #define SQL_CT_CREATE_TABLE 0x00000001L #define SQL_CT_COMMIT_PRESERVE 0x00000002L #define SQL_CT_COMMIT_DELETE 0x00000004L #define SQL_CT_GLOBAL_TEMPORARY 0x00000008L #define SQL_CT_LOCAL_TEMPORARY 0x00000010L #define SQL_CT_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L #define SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L #define SQL_CT_CONSTRAINT_DEFERRABLE 0x00000080L #define SQL_CT_CONSTRAINT_NON_DEFERRABLE 0x00000100L #define SQL_CT_COLUMN_CONSTRAINT 0x00000200L #define SQL_CT_COLUMN_DEFAULT 0x00000400L #define SQL_CT_COLUMN_COLLATION 0x00000800L #define SQL_CT_TABLE_CONSTRAINT 0x00001000L #define SQL_CT_CONSTRAINT_NAME_DEFINITION 0x00002000L /* SQL_DDL_INDEX bitmasks */ #define SQL_DI_CREATE_INDEX 0x00000001L #define SQL_DI_DROP_INDEX 0x00000002L /* SQL_DROP_COLLATION bitmasks */ #define SQL_DC_DROP_COLLATION 0x00000001L /* SQL_DROP_DOMAIN bitmasks */ #define SQL_DD_DROP_DOMAIN 0x00000001L #define SQL_DD_RESTRICT 0x00000002L #define SQL_DD_CASCADE 0x00000004L /* SQL_DROP_SCHEMA bitmasks */ #define SQL_DS_DROP_SCHEMA 0x00000001L #define SQL_DS_RESTRICT 0x00000002L #define SQL_DS_CASCADE 0x00000004L /* SQL_DROP_CHARACTER_SET bitmasks */ #define SQL_DCS_DROP_CHARACTER_SET 0x00000001L /* SQL_DROP_ASSERTION bitmasks */ #define SQL_DA_DROP_ASSERTION 0x00000001L /* SQL_DROP_TABLE bitmasks */ #define SQL_DT_DROP_TABLE 0x00000001L #define SQL_DT_RESTRICT 0x00000002L #define SQL_DT_CASCADE 0x00000004L /* SQL_DROP_TRANSLATION bitmasks */ #define SQL_DTR_DROP_TRANSLATION 0x00000001L /* SQL_DROP_VIEW bitmasks */ #define SQL_DV_DROP_VIEW 0x00000001L #define SQL_DV_RESTRICT 0x00000002L #define SQL_DV_CASCADE 0x00000004L /* SQL_INSERT_STATEMENT bitmasks */ #define SQL_IS_INSERT_LITERALS 0x00000001L #define SQL_IS_INSERT_SEARCHED 0x00000002L #define SQL_IS_SELECT_INTO 0x00000004L /* SQL_ODBC_INTERFACE_CONFORMANCE values */ #define SQL_OIC_CORE 1UL #define SQL_OIC_LEVEL1 2UL #define SQL_OIC_LEVEL2 3UL /* SQL_SQL92_FOREIGN_KEY_DELETE_RULE bitmasks */ #define SQL_SFKD_CASCADE 0x00000001L #define SQL_SFKD_NO_ACTION 0x00000002L #define SQL_SFKD_SET_DEFAULT 0x00000004L #define SQL_SFKD_SET_NULL 0x00000008L /* SQL_SQL92_FOREIGN_KEY_UPDATE_RULE bitmasks */ #define SQL_SFKU_CASCADE 0x00000001L #define SQL_SFKU_NO_ACTION 0x00000002L #define SQL_SFKU_SET_DEFAULT 0x00000004L #define SQL_SFKU_SET_NULL 0x00000008L /* SQL_SQL92_GRANT bitmasks */ #define SQL_SG_USAGE_ON_DOMAIN 0x00000001L #define SQL_SG_USAGE_ON_CHARACTER_SET 0x00000002L #define SQL_SG_USAGE_ON_COLLATION 0x00000004L #define SQL_SG_USAGE_ON_TRANSLATION 0x00000008L #define SQL_SG_WITH_GRANT_OPTION 0x00000010L #define SQL_SG_DELETE_TABLE 0x00000020L #define SQL_SG_INSERT_TABLE 0x00000040L #define SQL_SG_INSERT_COLUMN 0x00000080L #define SQL_SG_REFERENCES_TABLE 0x00000100L #define SQL_SG_REFERENCES_COLUMN 0x00000200L #define SQL_SG_SELECT_TABLE 0x00000400L #define SQL_SG_UPDATE_TABLE 0x00000800L #define SQL_SG_UPDATE_COLUMN 0x00001000L /* SQL_SQL92_PREDICATES bitmasks */ #define SQL_SP_EXISTS 0x00000001L #define SQL_SP_ISNOTNULL 0x00000002L #define SQL_SP_ISNULL 0x00000004L #define SQL_SP_MATCH_FULL 0x00000008L #define SQL_SP_MATCH_PARTIAL 0x00000010L #define SQL_SP_MATCH_UNIQUE_FULL 0x00000020L #define SQL_SP_MATCH_UNIQUE_PARTIAL 0x00000040L #define SQL_SP_OVERLAPS 0x00000080L #define SQL_SP_UNIQUE 0x00000100L #define SQL_SP_LIKE 0x00000200L #define SQL_SP_IN 0x00000400L #define SQL_SP_BETWEEN 0x00000800L #define SQL_SP_COMPARISON 0x00001000L #define SQL_SP_QUANTIFIED_COMPARISON 0x00002000L /* SQL_SQL92_RELATIONAL_JOIN_OPERATORS bitmasks */ #define SQL_SRJO_CORRESPONDING_CLAUSE 0x00000001L #define SQL_SRJO_CROSS_JOIN 0x00000002L #define SQL_SRJO_EXCEPT_JOIN 0x00000004L #define SQL_SRJO_FULL_OUTER_JOIN 0x00000008L #define SQL_SRJO_INNER_JOIN 0x00000010L #define SQL_SRJO_INTERSECT_JOIN 0x00000020L #define SQL_SRJO_LEFT_OUTER_JOIN 0x00000040L #define SQL_SRJO_NATURAL_JOIN 0x00000080L #define SQL_SRJO_RIGHT_OUTER_JOIN 0x00000100L #define SQL_SRJO_UNION_JOIN 0x00000200L /* SQL_SQL92_REVOKE bitmasks */ #define SQL_SR_USAGE_ON_DOMAIN 0x00000001L #define SQL_SR_USAGE_ON_CHARACTER_SET 0x00000002L #define SQL_SR_USAGE_ON_COLLATION 0x00000004L #define SQL_SR_USAGE_ON_TRANSLATION 0x00000008L #define SQL_SR_GRANT_OPTION_FOR 0x00000010L #define SQL_SR_CASCADE 0x00000020L #define SQL_SR_RESTRICT 0x00000040L #define SQL_SR_DELETE_TABLE 0x00000080L #define SQL_SR_INSERT_TABLE 0x00000100L #define SQL_SR_INSERT_COLUMN 0x00000200L #define SQL_SR_REFERENCES_TABLE 0x00000400L #define SQL_SR_REFERENCES_COLUMN 0x00000800L #define SQL_SR_SELECT_TABLE 0x00001000L #define SQL_SR_UPDATE_TABLE 0x00002000L #define SQL_SR_UPDATE_COLUMN 0x00004000L /* SQL_SQL92_ROW_VALUE_CONSTRUCTOR bitmasks */ #define SQL_SRVC_VALUE_EXPRESSION 0x00000001L #define SQL_SRVC_NULL 0x00000002L #define SQL_SRVC_DEFAULT 0x00000004L #define SQL_SRVC_ROW_SUBQUERY 0x00000008L /* SQL_SQL92_VALUE_EXPRESSIONS bitmasks */ #define SQL_SVE_CASE 0x00000001L #define SQL_SVE_CAST 0x00000002L #define SQL_SVE_COALESCE 0x00000004L #define SQL_SVE_NULLIF 0x00000008L /* SQL_STANDARD_CLI_CONFORMANCE bitmasks */ #define SQL_SCC_XOPEN_CLI_VERSION1 0x00000001L #define SQL_SCC_ISO92_CLI 0x00000002L /* SQL_UNION_STATEMENT bitmasks */ #define SQL_US_UNION SQL_U_UNION #define SQL_US_UNION_ALL SQL_U_UNION_ALL #endif /* ODBCVER >= 0x0300 */ /* SQL_DTC_TRANSITION_COST bitmasks */ #define SQL_DTC_ENLIST_EXPENSIVE 0x00000001L #define SQL_DTC_UNENLIST_EXPENSIVE 0x00000002L /* additional SQLDataSources fetch directions */ #if (ODBCVER >= 0x0300) #define SQL_FETCH_FIRST_USER 31 #define SQL_FETCH_FIRST_SYSTEM 32 #endif /* ODBCVER >= 0x0300 */ /* Defines for SQLSetPos */ #define SQL_ENTIRE_ROWSET 0 /* Operations in SQLSetPos */ #define SQL_POSITION 0 /* 1.0 FALSE */ #define SQL_REFRESH 1 /* 1.0 TRUE */ #define SQL_UPDATE 2 #define SQL_DELETE 3 /* Operations in SQLBulkOperations */ #define SQL_ADD 4 #define SQL_SETPOS_MAX_OPTION_VALUE SQL_ADD #if (ODBCVER >= 0x0300) #define SQL_UPDATE_BY_BOOKMARK 5 #define SQL_DELETE_BY_BOOKMARK 6 #define SQL_FETCH_BY_BOOKMARK 7 #endif /* ODBCVER >= 0x0300 */ /* Lock options in SQLSetPos */ #define SQL_LOCK_NO_CHANGE 0 /* 1.0 FALSE */ #define SQL_LOCK_EXCLUSIVE 1 /* 1.0 TRUE */ #define SQL_LOCK_UNLOCK 2 #define SQL_SETPOS_MAX_LOCK_VALUE SQL_LOCK_UNLOCK /* Macros for SQLSetPos */ #define SQL_POSITION_TO(hstmt,irow) SQLSetPos(hstmt,irow,SQL_POSITION,SQL_LOCK_NO_CHANGE) #define SQL_LOCK_RECORD(hstmt,irow,fLock) SQLSetPos(hstmt,irow,SQL_POSITION,fLock) #define SQL_REFRESH_RECORD(hstmt,irow,fLock) SQLSetPos(hstmt,irow,SQL_REFRESH,fLock) #define SQL_UPDATE_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_UPDATE,SQL_LOCK_NO_CHANGE) #define SQL_DELETE_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_DELETE,SQL_LOCK_NO_CHANGE) #define SQL_ADD_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_ADD,SQL_LOCK_NO_CHANGE) /* Column types and scopes in SQLSpecialColumns. */ #define SQL_BEST_ROWID 1 #define SQL_ROWVER 2 /* Defines for SQLSpecialColumns (returned in the result set) SQL_PC_UNKNOWN and SQL_PC_PSEUDO are defined in sql.h */ #define SQL_PC_NOT_PSEUDO 1 /* Defines for SQLStatistics */ #define SQL_QUICK 0 #define SQL_ENSURE 1 /* Defines for SQLStatistics (returned in the result set) SQL_INDEX_CLUSTERED, SQL_INDEX_HASHED, and SQL_INDEX_OTHER are defined in sql.h */ #define SQL_TABLE_STAT 0 /* Defines for SQLTables */ #if (ODBCVER >= 0x0300) #define SQL_ALL_CATALOGS "%" #define SQL_ALL_SCHEMAS "%" #define SQL_ALL_TABLE_TYPES "%" #endif /* ODBCVER >= 0x0300 */ /* Options for SQLDriverConnect */ #define SQL_DRIVER_NOPROMPT 0 #define SQL_DRIVER_COMPLETE 1 #define SQL_DRIVER_PROMPT 2 #define SQL_DRIVER_COMPLETE_REQUIRED 3 SQLRETURN SQL_API SQLDriverConnect( SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT *pcbConnStrOut, SQLUSMALLINT fDriverCompletion); /* Level 2 Functions */ /* SQLExtendedFetch "fFetchType" values */ #define SQL_FETCH_BOOKMARK 8 /* SQLExtendedFetch "rgfRowStatus" element values */ #define SQL_ROW_SUCCESS 0 #define SQL_ROW_DELETED 1 #define SQL_ROW_UPDATED 2 #define SQL_ROW_NOROW 3 #define SQL_ROW_ADDED 4 #define SQL_ROW_ERROR 5 #if (ODBCVER >= 0x0300) #define SQL_ROW_SUCCESS_WITH_INFO 6 #define SQL_ROW_PROCEED 0 #define SQL_ROW_IGNORE 1 #endif /* value for SQL_DESC_ARRAY_STATUS_PTR */ #if (ODBCVER >= 0x0300) #define SQL_PARAM_SUCCESS 0 #define SQL_PARAM_SUCCESS_WITH_INFO 6 #define SQL_PARAM_ERROR 5 #define SQL_PARAM_UNUSED 7 #define SQL_PARAM_DIAG_UNAVAILABLE 1 #define SQL_PARAM_PROCEED 0 #define SQL_PARAM_IGNORE 1 #endif /* ODBCVER >= 0x0300 */ /* Defines for SQLForeignKeys (UPDATE_RULE and DELETE_RULE) */ #define SQL_CASCADE 0 #define SQL_RESTRICT 1 #define SQL_SET_NULL 2 #if (ODBCVER >= 0x0250) #define SQL_NO_ACTION 3 #define SQL_SET_DEFAULT 4 #endif /* ODBCVER >= 0x0250 */ #if (ODBCVER >= 0x0300) /* Note that the following are in a different column of SQLForeignKeys than */ /* the previous #defines. These are for DEFERRABILITY. */ #define SQL_INITIALLY_DEFERRED 5 #define SQL_INITIALLY_IMMEDIATE 6 #define SQL_NOT_DEFERRABLE 7 #endif /* ODBCVER >= 0x0300 */ /* Defines for SQLBindParameter and SQLProcedureColumns (returned in the result set) */ #define SQL_PARAM_TYPE_UNKNOWN 0 #define SQL_PARAM_INPUT 1 #define SQL_PARAM_INPUT_OUTPUT 2 #define SQL_RESULT_COL 3 #define SQL_PARAM_OUTPUT 4 #define SQL_RETURN_VALUE 5 /* Defines for SQLProcedures (returned in the result set) */ #define SQL_PT_UNKNOWN 0 #define SQL_PT_PROCEDURE 1 #define SQL_PT_FUNCTION 2 /* This define is too large for RC */ #define SQL_ODBC_KEYWORDS "ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,"\ "ASC,ASSERTION,AT,AUTHORIZATION,AVG,"\ "BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,"\ "CHAR,CHAR_LENGTH,CHARACTER,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,"\ "COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,"\ "CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,"\ "CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,"\ "DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,"\ "DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,"\ "DISTINCT,DOMAIN,DOUBLE,DROP,"\ "ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,EXEC,EXECUTE,"\ "EXISTS,EXTERNAL,EXTRACT,"\ "FALSE,FETCH,FIRST,FLOAT,FOR,FOREIGN,FORTRAN,FOUND,FROM,FULL,"\ "GET,GLOBAL,GO,GOTO,GRANT,GROUP,HAVING,HOUR,"\ "IDENTITY,IMMEDIATE,IN,INCLUDE,INDEX,INDICATOR,INITIALLY,INNER,"\ "INPUT,INSENSITIVE,INSERT,INT,INTEGER,INTERSECT,INTERVAL,INTO,IS,ISOLATION,"\ "JOIN,KEY,LANGUAGE,LAST,LEADING,LEFT,LEVEL,LIKE,LOCAL,LOWER,"\ "MATCH,MAX,MIN,MINUTE,MODULE,MONTH,"\ "NAMES,NATIONAL,NATURAL,NCHAR,NEXT,NO,NONE,NOT,NULL,NULLIF,NUMERIC,"\ "OCTET_LENGTH,OF,ON,ONLY,OPEN,OPTION,OR,ORDER,OUTER,OUTPUT,OVERLAPS,"\ "PAD,PARTIAL,PASCAL,PLI,POSITION,PRECISION,PREPARE,PRESERVE,"\ "PRIMARY,PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,"\ "READ,REAL,REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWS"\ "SCHEMA,SCROLL,SECOND,SECTION,SELECT,SESSION,SESSION_USER,SET,SIZE,"\ "SMALLINT,SOME,SPACE,SQL,SQLCA,SQLCODE,SQLERROR,SQLSTATE,SQLWARNING,"\ "SUBSTRING,SUM,SYSTEM_USER,"\ "TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,"\ "TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,"\ "UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,"\ "VALUE,VALUES,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,WRITE,"\ "YEAR,ZONE" SQLRETURN SQL_API SQLBrowseConnect( SQLHDBC hdbc, SQLCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT *pcbConnStrOut); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLBulkOperations( SQLHSTMT StatementHandle, SQLSMALLINT Operation); #endif /* ODBCVER >= 0x0300 */ SQLRETURN SQL_API SQLColAttributes( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT *pcbDesc, SQLLEN *pfDesc); SQLRETURN SQL_API SQLColumnPrivileges( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName, SQLCHAR *szColumnName, SQLSMALLINT cbColumnName); SQLRETURN SQL_API SQLDescribeParam( SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT *pfSqlType, SQLULEN *pcbParamDef, SQLSMALLINT *pibScale, SQLSMALLINT *pfNullable); SQLRETURN SQL_API SQLExtendedFetch( SQLHSTMT hstmt, SQLUSMALLINT fFetchType, SQLLEN irow, SQLULEN *pcrow, SQLUSMALLINT *rgfRowStatus); SQLRETURN SQL_API SQLForeignKeys( SQLHSTMT hstmt, SQLCHAR *szPkCatalogName, SQLSMALLINT cbPkCatalogName, SQLCHAR *szPkSchemaName, SQLSMALLINT cbPkSchemaName, SQLCHAR *szPkTableName, SQLSMALLINT cbPkTableName, SQLCHAR *szFkCatalogName, SQLSMALLINT cbFkCatalogName, SQLCHAR *szFkSchemaName, SQLSMALLINT cbFkSchemaName, SQLCHAR *szFkTableName, SQLSMALLINT cbFkTableName); SQLRETURN SQL_API SQLMoreResults( SQLHSTMT hstmt); SQLRETURN SQL_API SQLNativeSql( SQLHDBC hdbc, SQLCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr); SQLRETURN SQL_API SQLNumParams( SQLHSTMT hstmt, SQLSMALLINT *pcpar); SQLRETURN SQL_API SQLParamOptions( SQLHSTMT hstmt, SQLULEN crow, SQLULEN *pirow); SQLRETURN SQL_API SQLPrimaryKeys( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName); SQLRETURN SQL_API SQLProcedureColumns( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szProcName, SQLSMALLINT cbProcName, SQLCHAR *szColumnName, SQLSMALLINT cbColumnName); SQLRETURN SQL_API SQLProcedures( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szProcName, SQLSMALLINT cbProcName); SQLRETURN SQL_API SQLSetPos( SQLHSTMT hstmt, SQLSETPOSIROW irow, SQLUSMALLINT fOption, SQLUSMALLINT fLock); SQLRETURN SQL_API SQLTablePrivileges( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName); SQLRETURN SQL_API SQLDrivers( SQLHENV henv, SQLUSMALLINT fDirection, SQLCHAR *szDriverDesc, SQLSMALLINT cbDriverDescMax, SQLSMALLINT *pcbDriverDesc, SQLCHAR *szDriverAttributes, SQLSMALLINT cbDrvrAttrMax, SQLSMALLINT *pcbDrvrAttr); SQLRETURN SQL_API SQLBindParameter( SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT fParamType, SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLULEN cbColDef, SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue); /*---------------------------------------------------------*/ /* SQLAllocHandleStd is implemented to make SQLAllocHandle */ /* compatible with X/Open standard. an application should */ /* not call SQLAllocHandleStd directly */ /*---------------------------------------------------------*/ #ifdef ODBC_STD #define SQLAllocHandle SQLAllocHandleStd #define SQLAllocEnv(phenv) SQLAllocHandleStd(SQL_HANDLE_ENV, SQL_NULL_HANDLE, phenv) /* Internal type subcodes */ #define SQL_YEAR SQL_CODE_YEAR #define SQL_MONTH SQL_CODE_MONTH #define SQL_DAY SQL_CODE_DAY #define SQL_HOUR SQL_CODE_HOUR #define SQL_MINUTE SQL_CODE_MINUTE #define SQL_SECOND SQL_CODE_SECOND #define SQL_YEAR_TO_MONTH SQL_CODE_YEAR_TO_MONTH #define SQL_DAY_TO_HOUR SQL_CODE_DAY_TO_HOUR #define SQL_DAY_TO_MINUTE SQL_CODE_DAY_TO_MINUTE #define SQL_DAY_TO_SECOND SQL_CODE_DAY_TO_SECOND #define SQL_HOUR_TO_MINUTE SQL_CODE_HOUR_TO_MINUTE #define SQL_HOUR_TO_SECOND SQL_CODE_HOUR_TO_SECOND #define SQL_MINUTE_TO_SECOND SQL_CODE_MINUTE_TO_SECOND #endif /* ODBC_STD */ #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLAllocHandleStd( SQLSMALLINT fHandleType, SQLHANDLE hInput, SQLHANDLE *phOutput); #endif /* Deprecated defines from prior versions of ODBC */ #define SQL_DATABASE_NAME 16 /* Use SQLGetConnectOption/SQL_CURRENT_QUALIFIER */ #define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR #define SQL_FETCH_PREV SQL_FETCH_PRIOR #define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER #define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER #define SQL_CC_DELETE SQL_CB_DELETE #define SQL_CR_DELETE SQL_CB_DELETE #define SQL_CC_CLOSE SQL_CB_CLOSE #define SQL_CR_CLOSE SQL_CB_CLOSE #define SQL_CC_PRESERVE SQL_CB_PRESERVE #define SQL_CR_PRESERVE SQL_CB_PRESERVE /* SQL_FETCH_RESUME is not supported by 2.0+ drivers #define SQL_FETCH_RESUME 7 */ #define SQL_SCROLL_FORWARD_ONLY 0L /*-SQL_CURSOR_FORWARD_ONLY */ #define SQL_SCROLL_KEYSET_DRIVEN (-1L) /*-SQL_CURSOR_KEYSET_DRIVEN */ #define SQL_SCROLL_DYNAMIC (-2L) /*-SQL_CURSOR_DYNAMIC */ #define SQL_SCROLL_STATIC (-3L) /*-SQL_CURSOR_STATIC */ /* Deprecated functions from prior versions of ODBC */ SQLRETURN SQL_API SQLSetScrollOptions( /* Use SQLSetStmtOptions */ SQLHSTMT hstmt, SQLUSMALLINT fConcurrency, SQLLEN crowKeyset, SQLUSMALLINT crowRowset); /*! * \defgroup Tracing. * * unixODBC implements a slight variation of the tracing mechanism used * on MS platforms. The unixODBC method loses the ability to produce trace * output for invalid handles but gains the following; * * - better concurrency * - allows tracing to be turned on/off and configured at finer granularity * - hopefully; better performance * * unixODBC provides a cross-platform helper library called 'trace' and an * example/default trace plugin called 'odbctrac'. Those writing an ODBC * driver can use the 'trace' helper library (a static library). Those wanting * to create custom trace output can implement a different version of the * 'odbctrac' plugin. * * The text file driver (odbctxt) included with unixODBC is an example of a * driver using the 'trace' helper library. * * The 'trace' library and the example plugin 'odbctrac' are designed to be * portable on all platforms where unixODBC is available and on MS platforms. * This will allow drivers using 'trace' and 'odbctrac' plugin to equilly * portable. On MS platforms - this compliments traditional tracing (mostly * just used by the Driver Manager). * * \sa trace * odbctxt * odbctrac */ /*@{*/ #define TRACE_VERSION 1000 /*!< Version of trace API */ #ifdef UNICODE RETCODE TraceOpenLogFile(SQLPOINTER,LPWSTR,LPWSTR,DWORD); /*!< open a trace log file */ #else RETCODE TraceOpenLogFile(SQLPOINTER,LPSTR,LPSTR,DWORD); /*!< open a trace log file */ #endif RETCODE TraceCloseLogFile(SQLPOINTER); /*!< Request to close a trace log */ SQLRETURN TraceReturn(SQLPOINTER,SQLRETURN); /*!< Call to produce trace output upon function return. */ #ifdef __cplusplus DWORD TraceVersion(); /*!< Returns trace API version */ #else DWORD TraceVersion(VOID); /*!< Returns trace API version */ #endif /* Functions for Visual Studio Analyzer*/ /* to turn on/off tracing or VS events, call TraceVSControl by setting or clearing the following bits */ #define TRACE_ON 0x00000001L #define TRACE_VS_EVENT_ON 0x00000002L RETCODE TraceVSControl(DWORD); /* the flags in ODBC_VS_ARGS */ #define ODBC_VS_FLAG_UNICODE_ARG 0x00000001L /* the argument is unicode */ #define ODBC_VS_FLAG_UNICODE_COR 0x00000002L /* the correlation is unicode */ #define ODBC_VS_FLAG_RETCODE 0x00000004L /* RetCode field is set */ #define ODBC_VS_FLAG_STOP 0x00000008L /* Stop firing visual studio analyzer events */ typedef struct tagODBC_VS_ARGS { #ifdef GUID_DEFINED const GUID *pguidEvent; /* the GUID for event */ #else const void *pguidEvent; /* the GUID for event */ #endif DWORD dwFlags; /* flags for the call */ union { WCHAR *wszArg; CHAR *szArg; }u1; union { WCHAR *wszCorrelation; CHAR *szCorrelation; }u2; RETCODE RetCode; } ODBC_VS_ARGS, *PODBC_VS_ARGS; VOID FireVSDebugEvent(PODBC_VS_ARGS); /*@}*/ #ifdef __cplusplus } #endif /* * connection pooling retry times */ BOOL ODBCSetTryWaitValue ( DWORD dwValue ); #ifdef __cplusplus DWORD ODBCGetTryWaitValue ( ); #else DWORD ODBCGetTryWaitValue ( VOID ); #endif #ifndef __SQLUCODE_H #include "sqlucode.h" #endif #endif unixODBC-2.2.14-p2/include/sqltypes.h0100644000076400007640000002515611102630241015654 0ustar nicknick/************************************************************* * sqltypes.h * * This is the lowest level include in unixODBC. It defines * the basic types required by unixODBC and is heavily based * upon the MS include of the same name (it has to be for * binary compatability between drivers developed under different * packages). * * You can include this file directly but it is almost always * included indirectly, by including.. for example sqlext.h * * This include makes no effort to be usefull on any platforms other * than Linux (with some exceptions for UNIX in general). * * !!!DO NOT CONTAMINATE THIS FILE WITH NON-Linux CODE!!! * *************************************************************/ #ifndef __SQLTYPES_H #define __SQLTYPES_H /**************************** * default to the 3.51 definitions. should define ODBCVER before here if you want an older set of defines ***************************/ #ifndef ODBCVER #define ODBCVER 0x0351 #endif /* * if thi sis set, then use a 4 byte unicode definition, insteead of the 2 bye that MS use */ #ifdef SQL_WCHART_CONVERT /* * Use this if you want to use the C/C++ portable definition of a wide char, wchar_t * Microsoft hardcoded a definition of unsigned short which may not be compatible with * your platform specific wide char definition. */ #include #endif #ifdef __cplusplus extern "C" { #endif /* * this is defined by configure, but will not be on a normal application build * the install creates a unixodbc_conf.h file that contains the current build settings */ #ifndef SIZEOF_LONG_INT #include #endif #ifndef SIZEOF_LONG_INT #error "Needs to know how big a long int is to continue!!!" #endif /**************************** * These make up for having no windows.h ***************************/ #ifndef ALLREADY_HAVE_WINDOWS_TYPE #define FAR #define CALLBACK #ifdef __OS2__ #define SQL_API _System #else #define SQL_API #endif #define BOOL int typedef void* HWND; typedef char CHAR; #ifdef UNICODE /* * NOTE: The Microsoft unicode define is only for apps that want to use TCHARs and * be able to compile for both unicode and non-unicode with the same source. * This is not recommanded for linux applications and is not supported * by the standard linux string header files. */ #ifdef SQL_WCHART_CONVERT typedef wchar_t TCHAR; #else typedef signed short TCHAR; #endif #else typedef char TCHAR; #endif #ifndef DONT_TD_VOID typedef void VOID; #endif typedef unsigned short WORD; #if (SIZEOF_LONG_INT == 4) typedef unsigned long DWORD; #else typedef unsigned int DWORD; #endif typedef unsigned char BYTE; #ifdef SQL_WCHART_CONVERT typedef wchar_t WCHAR; #else typedef unsigned short WCHAR; #endif typedef WCHAR* LPWSTR; typedef const char* LPCSTR; typedef const WCHAR* LPCWSTR; typedef TCHAR* LPTSTR; typedef char* LPSTR; typedef DWORD* LPDWORD; typedef void* HINSTANCE; #endif /**************************** * standard SQL* data types. use these as much as possible when using ODBC calls/vars ***************************/ typedef unsigned char SQLCHAR; #if (ODBCVER >= 0x0300) typedef unsigned char SQLDATE; typedef unsigned char SQLDECIMAL; typedef double SQLDOUBLE; typedef double SQLFLOAT; #endif /* * can't use a long it fails on 64 platforms */ /* * Hopefully by now it should be safe to assume most drivers know about SQLLEN now * and the defaukt is now sizeof( SQLLEN ) = 8 on 64 bit platforms * */ #if (SIZEOF_LONG_INT == 8) #ifdef BUILD_LEGACY_64_BIT_MODE typedef int SQLINTEGER; typedef unsigned int SQLUINTEGER; #define SQLLEN SQLINTEGER #define SQLULEN SQLUINTEGER #define SQLSETPOSIROW SQLUSMALLINT /* * These are not supprted on 64bit ODBC according to MS, removed, so use at your peril * typedef SQLULEN SQLROWCOUNT; typedef SQLULEN SQLROWSETSIZE; typedef SQLULEN SQLTRANSID; typedef SQLLEN SQLROWOFFSET; */ #else typedef int SQLINTEGER; typedef unsigned int SQLUINTEGER; typedef long SQLLEN; typedef unsigned long SQLULEN; typedef unsigned long SQLSETPOSIROW; /* * These are not supprted on 64bit ODBC according to MS, removed, so use at your peril * typedef SQLULEN SQLTRANSID; typedef SQLULEN SQLROWCOUNT; typedef SQLUINTEGER SQLROWSETSIZE; typedef SQLLEN SQLROWOFFSET; */ #endif #else typedef long SQLINTEGER; typedef unsigned long SQLUINTEGER; #define SQLLEN SQLINTEGER #define SQLULEN SQLUINTEGER #define SQLSETPOSIROW SQLUSMALLINT typedef SQLULEN SQLROWCOUNT; typedef SQLULEN SQLROWSETSIZE; typedef SQLULEN SQLTRANSID; typedef SQLLEN SQLROWOFFSET; #endif #if (ODBCVER >= 0x0300) typedef unsigned char SQLNUMERIC; #endif typedef void * SQLPOINTER; #if (ODBCVER >= 0x0300) typedef float SQLREAL; #endif typedef signed short int SQLSMALLINT; typedef unsigned short SQLUSMALLINT; #if (ODBCVER >= 0x0300) typedef unsigned char SQLTIME; typedef unsigned char SQLTIMESTAMP; typedef unsigned char SQLVARCHAR; #endif typedef SQLSMALLINT SQLRETURN; #if (ODBCVER >= 0x0300) typedef void * SQLHANDLE; typedef SQLHANDLE SQLHENV; typedef SQLHANDLE SQLHDBC; typedef SQLHANDLE SQLHSTMT; typedef SQLHANDLE SQLHDESC; #else typedef void * SQLHENV; typedef void * SQLHDBC; typedef void * SQLHSTMT; /* * some things like PHP won't build without this */ typedef void * SQLHANDLE; #endif /**************************** * These are cast into the actual struct that is being passed around. The * DriverManager knows what its structs look like and the Driver knows about its * structs... the app knows nothing about them... just void* * These are deprecated in favour of SQLHENV, SQLHDBC, SQLHSTMT ***************************/ #if (ODBCVER >= 0x0300) typedef SQLHANDLE HENV; typedef SQLHANDLE HDBC; typedef SQLHANDLE HSTMT; #else typedef void * HENV; typedef void * HDBC; typedef void * HSTMT; #endif /**************************** * more basic data types to augment what windows.h provides ***************************/ #ifndef ALLREADY_HAVE_WINDOWS_TYPE typedef unsigned char UCHAR; typedef signed char SCHAR; typedef SCHAR SQLSCHAR; #if (SIZEOF_LONG_INT == 4) typedef long int SDWORD; typedef unsigned long int UDWORD; #else typedef int SDWORD; typedef unsigned int UDWORD; #endif typedef signed short int SWORD; typedef unsigned short int UWORD; typedef unsigned int UINT; typedef signed long SLONG; typedef signed short SSHORT; typedef unsigned long ULONG; typedef unsigned short USHORT; typedef double SDOUBLE; typedef double LDOUBLE; typedef float SFLOAT; typedef void* PTR; typedef signed short RETCODE; typedef void* SQLHWND; #endif /**************************** * standard structs for working with date/times ***************************/ #ifndef __SQLDATE #define __SQLDATE typedef struct tagDATE_STRUCT { SQLSMALLINT year; SQLUSMALLINT month; SQLUSMALLINT day; } DATE_STRUCT; #if (ODBCVER >= 0x0300) typedef DATE_STRUCT SQL_DATE_STRUCT; #endif typedef struct tagTIME_STRUCT { SQLUSMALLINT hour; SQLUSMALLINT minute; SQLUSMALLINT second; } TIME_STRUCT; #if (ODBCVER >= 0x0300) typedef TIME_STRUCT SQL_TIME_STRUCT; #endif typedef struct tagTIMESTAMP_STRUCT { SQLSMALLINT year; SQLUSMALLINT month; SQLUSMALLINT day; SQLUSMALLINT hour; SQLUSMALLINT minute; SQLUSMALLINT second; SQLUINTEGER fraction; } TIMESTAMP_STRUCT; #if (ODBCVER >= 0x0300) typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT; #endif #if (ODBCVER >= 0x0300) typedef enum { SQL_IS_YEAR = 1, SQL_IS_MONTH = 2, SQL_IS_DAY = 3, SQL_IS_HOUR = 4, SQL_IS_MINUTE = 5, SQL_IS_SECOND = 6, SQL_IS_YEAR_TO_MONTH = 7, SQL_IS_DAY_TO_HOUR = 8, SQL_IS_DAY_TO_MINUTE = 9, SQL_IS_DAY_TO_SECOND = 10, SQL_IS_HOUR_TO_MINUTE = 11, SQL_IS_HOUR_TO_SECOND = 12, SQL_IS_MINUTE_TO_SECOND = 13 } SQLINTERVAL; #endif #if (ODBCVER >= 0x0300) typedef struct tagSQL_YEAR_MONTH { SQLUINTEGER year; SQLUINTEGER month; } SQL_YEAR_MONTH_STRUCT; typedef struct tagSQL_DAY_SECOND { SQLUINTEGER day; SQLUINTEGER hour; SQLUINTEGER minute; SQLUINTEGER second; SQLUINTEGER fraction; } SQL_DAY_SECOND_STRUCT; typedef struct tagSQL_INTERVAL_STRUCT { SQLINTERVAL interval_type; SQLSMALLINT interval_sign; union { SQL_YEAR_MONTH_STRUCT year_month; SQL_DAY_SECOND_STRUCT day_second; } intval; } SQL_INTERVAL_STRUCT; #endif #endif /**************************** * ***************************/ #ifndef ODBCINT64 # if (ODBCVER >= 0x0300) # if (SIZEOF_LONG_INT == 8) # define ODBCINT64 long # define UODBCINT64 unsigned long # else # ifdef HAVE_LONG_LONG # define ODBCINT64 long long # define UODBCINT64 unsigned long long # else /* * may fail in some cases, but what else can we do ? */ struct __bigint_struct { int hiword; unsigned int loword; }; struct __bigint_struct_u { unsigned int hiword; unsigned int loword; }; # define ODBCINT64 struct __bigint_struct # define UODBCINT64 struct __bigint_struct_u # endif # endif #endif #endif #ifdef ODBCINT64 typedef ODBCINT64 SQLBIGINT; #endif #ifdef UODBCINT64 typedef UODBCINT64 SQLUBIGINT; #endif /**************************** * cursor and bookmark ***************************/ #if (ODBCVER >= 0x0300) #define SQL_MAX_NUMERIC_LEN 16 typedef struct tagSQL_NUMERIC_STRUCT { SQLCHAR precision; SQLSCHAR scale; SQLCHAR sign; /* 1=pos 0=neg */ SQLCHAR val[SQL_MAX_NUMERIC_LEN]; } SQL_NUMERIC_STRUCT; #endif #if (ODBCVER >= 0x0350) #ifdef GUID_DEFINED #ifndef ALLREADY_HAVE_WINDOWS_TYPE typedef GUID SQLGUID; #else typedef struct tagSQLGUID { DWORD Data1; WORD Data2; WORD Data3; BYTE Data4[ 8 ]; } SQLGUID; #endif #else typedef struct tagSQLGUID { DWORD Data1; WORD Data2; WORD Data3; BYTE Data4[ 8 ]; } SQLGUID; #endif #endif typedef SQLULEN BOOKMARK; typedef WCHAR SQLWCHAR; #ifdef UNICODE typedef SQLWCHAR SQLTCHAR; #else typedef SQLCHAR SQLTCHAR; #endif #ifdef __cplusplus } #endif #endif unixODBC-2.2.14-p2/include/sqlucode.h0100644000076400007640000005224210604157754015626 0ustar nicknick/************************************************** * sqlucode.h * * These should be consistent with the MS version. * **************************************************/ #ifndef __SQLUCODE_H #define __SQLUCODE_H #ifdef __cplusplus extern "C" { #endif #define SQL_WCHAR (-8) #define SQL_WVARCHAR (-9) #define SQL_WLONGVARCHAR (-10) #define SQL_C_WCHAR SQL_WCHAR #ifdef UNICODE #define SQL_C_TCHAR SQL_C_WCHAR #else #define SQL_C_TCHAR SQL_C_CHAR #endif #define SQL_SQLSTATE_SIZEW 10 /* size of SQLSTATE for unicode */ /* UNICODE versions */ SQLRETURN SQL_API SQLColAttributeW( SQLHSTMT hstmt, SQLUSMALLINT iCol, SQLUSMALLINT iField, SQLPOINTER pCharAttr, SQLSMALLINT cbCharAttrMax, SQLSMALLINT *pcbCharAttr, SQLLEN *pNumAttr); SQLRETURN SQL_API SQLColAttributesW( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT *pcbDesc, SQLLEN *pfDesc); SQLRETURN SQL_API SQLConnectW( SQLHDBC hdbc, SQLWCHAR *szDSN, SQLSMALLINT cbDSN, SQLWCHAR *szUID, SQLSMALLINT cbUID, SQLWCHAR *szAuthStr, SQLSMALLINT cbAuthStr); SQLRETURN SQL_API SQLDescribeColW( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLWCHAR *szColName, SQLSMALLINT cbColNameMax, SQLSMALLINT *pcbColName, SQLSMALLINT *pfSqlType, SQLULEN *pcbColDef, SQLSMALLINT *pibScale, SQLSMALLINT *pfNullable); SQLRETURN SQL_API SQLErrorW( SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLWCHAR *szSqlState, SQLINTEGER *pfNativeError, SQLWCHAR *szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT *pcbErrorMsg); SQLRETURN SQL_API SQLExecDirectW( SQLHSTMT hstmt, SQLWCHAR *szSqlStr, SQLINTEGER cbSqlStr); SQLRETURN SQL_API SQLGetConnectAttrW( SQLHDBC hdbc, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue); SQLRETURN SQL_API SQLGetCursorNameW( SQLHSTMT hstmt, SQLWCHAR *szCursor, SQLSMALLINT cbCursorMax, SQLSMALLINT *pcbCursor); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength); SQLRETURN SQL_API SQLGetDescFieldW( SQLHDESC hdesc, SQLSMALLINT iRecord, SQLSMALLINT iField, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue); SQLRETURN SQL_API SQLGetDescRecW( SQLHDESC hdesc, SQLSMALLINT iRecord, SQLWCHAR *szName, SQLSMALLINT cbNameMax, SQLSMALLINT *pcbName, SQLSMALLINT *pfType, SQLSMALLINT *pfSubType, SQLLEN *pLength, SQLSMALLINT *pPrecision, SQLSMALLINT *pScale, SQLSMALLINT *pNullable); SQLRETURN SQL_API SQLGetDiagFieldW( SQLSMALLINT fHandleType, SQLHANDLE handle, SQLSMALLINT iRecord, SQLSMALLINT fDiagField, SQLPOINTER rgbDiagInfo, SQLSMALLINT cbDiagInfoMax, SQLSMALLINT *pcbDiagInfo); SQLRETURN SQL_API SQLGetDiagRecW( SQLSMALLINT fHandleType, SQLHANDLE handle, SQLSMALLINT iRecord, SQLWCHAR *szSqlState, SQLINTEGER *pfNativeError, SQLWCHAR *szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT *pcbErrorMsg); #endif SQLRETURN SQL_API SQLPrepareW( SQLHSTMT hstmt, SQLWCHAR *szSqlStr, SQLINTEGER cbSqlStr); SQLRETURN SQL_API SQLSetConnectAttrW( SQLHDBC hdbc, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValue); SQLRETURN SQL_API SQLSetCursorNameW( SQLHSTMT hstmt, SQLWCHAR *szCursor, SQLSMALLINT cbCursor); SQLRETURN SQL_API SQLColumnsW( SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName, SQLWCHAR *szColumnName, SQLSMALLINT cbColumnName); SQLRETURN SQL_API SQLGetConnectOptionW( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLPOINTER pvParam); SQLRETURN SQL_API SQLGetInfoW( SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT *pcbInfoValue); SQLRETURN SQL_API SQLGetTypeInfoW( SQLHSTMT StatementHandle, SQLSMALLINT DataType); SQLRETURN SQL_API SQLSetConnectOptionW( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam); SQLRETURN SQL_API SQLSpecialColumnsW( SQLHSTMT hstmt, SQLUSMALLINT fColType, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fScope, SQLUSMALLINT fNullable); SQLRETURN SQL_API SQLStatisticsW( SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fUnique, SQLUSMALLINT fAccuracy); SQLRETURN SQL_API SQLTablesW( SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName, SQLWCHAR *szTableType, SQLSMALLINT cbTableType); SQLRETURN SQL_API SQLDataSourcesW( SQLHENV henv, SQLUSMALLINT fDirection, SQLWCHAR *szDSN, SQLSMALLINT cbDSNMax, SQLSMALLINT *pcbDSN, SQLWCHAR *szDescription, SQLSMALLINT cbDescriptionMax, SQLSMALLINT *pcbDescription); SQLRETURN SQL_API SQLDriverConnectW( SQLHDBC hdbc, SQLHWND hwnd, SQLWCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn, SQLWCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT *pcbConnStrOut, SQLUSMALLINT fDriverCompletion); SQLRETURN SQL_API SQLBrowseConnectW( SQLHDBC hdbc, SQLWCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn, SQLWCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT *pcbConnStrOut); SQLRETURN SQL_API SQLColumnPrivilegesW( SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName, SQLWCHAR *szColumnName, SQLSMALLINT cbColumnName); SQLRETURN SQL_API SQLGetStmtAttrW( SQLHSTMT hstmt, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue); SQLRETURN SQL_API SQLSetStmtAttrW( SQLHSTMT hstmt, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValueMax); SQLRETURN SQL_API SQLForeignKeysW( SQLHSTMT hstmt, SQLWCHAR *szPkCatalogName, SQLSMALLINT cbPkCatalogName, SQLWCHAR *szPkSchemaName, SQLSMALLINT cbPkSchemaName, SQLWCHAR *szPkTableName, SQLSMALLINT cbPkTableName, SQLWCHAR *szFkCatalogName, SQLSMALLINT cbFkCatalogName, SQLWCHAR *szFkSchemaName, SQLSMALLINT cbFkSchemaName, SQLWCHAR *szFkTableName, SQLSMALLINT cbFkTableName); SQLRETURN SQL_API SQLNativeSqlW( SQLHDBC hdbc, SQLWCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLWCHAR *szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr); SQLRETURN SQL_API SQLPrimaryKeysW( SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName); SQLRETURN SQL_API SQLProcedureColumnsW( SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szProcName, SQLSMALLINT cbProcName, SQLWCHAR *szColumnName, SQLSMALLINT cbColumnName); SQLRETURN SQL_API SQLProceduresW( SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szProcName, SQLSMALLINT cbProcName); SQLRETURN SQL_API SQLTablePrivilegesW( SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName); SQLRETURN SQL_API SQLDriversW( SQLHENV henv, SQLUSMALLINT fDirection, SQLWCHAR *szDriverDesc, SQLSMALLINT cbDriverDescMax, SQLSMALLINT *pcbDriverDesc, SQLWCHAR *szDriverAttributes, SQLSMALLINT cbDrvrAttrMax, SQLSMALLINT *pcbDrvrAttr); /* ANSI versions */ SQLRETURN SQL_API SQLColAttributeA( SQLHSTMT hstmt, SQLSMALLINT iCol, SQLSMALLINT iField, SQLPOINTER pCharAttr, SQLSMALLINT cbCharAttrMax, SQLSMALLINT *pcbCharAttr, SQLLEN *pNumAttr); SQLRETURN SQL_API SQLColAttributesA( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT *pcbDesc, SQLLEN *pfDesc); SQLRETURN SQL_API SQLConnectA( SQLHDBC hdbc, SQLCHAR *szDSN, SQLSMALLINT cbDSN, SQLCHAR *szUID, SQLSMALLINT cbUID, SQLCHAR *szAuthStr, SQLSMALLINT cbAuthStr); SQLRETURN SQL_API SQLDescribeColA( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLCHAR *szColName, SQLSMALLINT cbColNameMax, SQLSMALLINT *pcbColName, SQLSMALLINT *pfSqlType, SQLULEN *pcbColDef, SQLSMALLINT *pibScale, SQLSMALLINT *pfNullable); SQLRETURN SQL_API SQLErrorA( SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLCHAR *szSqlState, SQLINTEGER *pfNativeError, SQLCHAR *szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT *pcbErrorMsg); SQLRETURN SQL_API SQLExecDirectA( SQLHSTMT hstmt, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStr); SQLRETURN SQL_API SQLGetConnectAttrA( SQLHDBC hdbc, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue); SQLRETURN SQL_API SQLGetCursorNameA( SQLHSTMT hstmt, SQLCHAR *szCursor, SQLSMALLINT cbCursorMax, SQLSMALLINT *pcbCursor); #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLGetDescFieldA( SQLHDESC hdesc, SQLSMALLINT iRecord, SQLSMALLINT iField, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue); SQLRETURN SQL_API SQLGetDescRecA( SQLHDESC hdesc, SQLSMALLINT iRecord, SQLCHAR *szName, SQLSMALLINT cbNameMax, SQLSMALLINT *pcbName, SQLSMALLINT *pfType, SQLSMALLINT *pfSubType, SQLLEN *pLength, SQLSMALLINT *pPrecision, SQLSMALLINT *pScale, SQLSMALLINT *pNullable); SQLRETURN SQL_API SQLGetDiagFieldA( SQLSMALLINT fHandleType, SQLHANDLE handle, SQLSMALLINT iRecord, SQLSMALLINT fDiagField, SQLPOINTER rgbDiagInfo, SQLSMALLINT cbDiagInfoMax, SQLSMALLINT *pcbDiagInfo); SQLRETURN SQL_API SQLGetDiagRecA( SQLSMALLINT fHandleType, SQLHANDLE handle, SQLSMALLINT iRecord, SQLCHAR *szSqlState, SQLINTEGER *pfNativeError, SQLCHAR *szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT *pcbErrorMsg); SQLRETURN SQL_API SQLGetStmtAttrA( SQLHSTMT hstmt, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue); #endif SQLRETURN SQL_API SQLGetTypeInfoA( SQLHSTMT StatementHandle, SQLSMALLINT DataTyoe); SQLRETURN SQL_API SQLPrepareA( SQLHSTMT hstmt, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStr); SQLRETURN SQL_API SQLSetConnectAttrA( SQLHDBC hdbc, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValue); SQLRETURN SQL_API SQLSetCursorNameA( SQLHSTMT hstmt, SQLCHAR *szCursor, SQLSMALLINT cbCursor); SQLRETURN SQL_API SQLColumnsA( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName, SQLCHAR *szColumnName, SQLSMALLINT cbColumnName); SQLRETURN SQL_API SQLGetConnectOptionA( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLPOINTER pvParam); SQLRETURN SQL_API SQLGetInfoA( SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT* pcbInfoValue); SQLRETURN SQL_API SQLGetStmtOptionA( SQLHSTMT hstmt, SQLUSMALLINT fOption, SQLPOINTER pvParam); SQLRETURN SQL_API SQLSetConnectOptionA( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam); SQLRETURN SQL_API SQLSetStmtOptionA( SQLHSTMT hstmt, SQLUSMALLINT fOption, SQLULEN vParam); SQLRETURN SQL_API SQLSpecialColumnsA( SQLHSTMT hstmt, SQLUSMALLINT fColType, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fScope, SQLUSMALLINT fNullable); SQLRETURN SQL_API SQLStatisticsA( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fUnique, SQLUSMALLINT fAccuracy); SQLRETURN SQL_API SQLTablesA( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName, SQLCHAR *szTableType, SQLSMALLINT cbTableType); SQLRETURN SQL_API SQLDataSourcesA( SQLHENV henv, SQLUSMALLINT fDirection, SQLCHAR *szDSN, SQLSMALLINT cbDSNMax, SQLSMALLINT *pcbDSN, SQLCHAR *szDescription, SQLSMALLINT cbDescriptionMax, SQLSMALLINT *pcbDescription); SQLRETURN SQL_API SQLDriverConnectA( SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT *pcbConnStrOut, SQLUSMALLINT fDriverCompletion); SQLRETURN SQL_API SQLBrowseConnectA( SQLHDBC hdbc, SQLCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT *pcbConnStrOut); SQLRETURN SQL_API SQLColumnPrivilegesA( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName, SQLCHAR *szColumnName, SQLSMALLINT cbColumnName); SQLRETURN SQL_API SQLDescribeParamA( SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT *pfSqlType, SQLUINTEGER *pcbParamDef, SQLSMALLINT *pibScale, SQLSMALLINT *pfNullable); SQLRETURN SQL_API SQLForeignKeysA( SQLHSTMT hstmt, SQLCHAR *szPkCatalogName, SQLSMALLINT cbPkCatalogName, SQLCHAR *szPkSchemaName, SQLSMALLINT cbPkSchemaName, SQLCHAR *szPkTableName, SQLSMALLINT cbPkTableName, SQLCHAR *szFkCatalogName, SQLSMALLINT cbFkCatalogName, SQLCHAR *szFkSchemaName, SQLSMALLINT cbFkSchemaName, SQLCHAR *szFkTableName, SQLSMALLINT cbFkTableName); SQLRETURN SQL_API SQLNativeSqlA( SQLHDBC hdbc, SQLCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLCHAR *szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr); SQLRETURN SQL_API SQLPrimaryKeysA( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName); SQLRETURN SQL_API SQLProcedureColumnsA( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szProcName, SQLSMALLINT cbProcName, SQLCHAR *szColumnName, SQLSMALLINT cbColumnName); SQLRETURN SQL_API SQLProceduresA( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szProcName, SQLSMALLINT cbProcName); SQLRETURN SQL_API SQLTablePrivilegesA( SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName); SQLRETURN SQL_API SQLDriversA( SQLHENV henv, SQLUSMALLINT fDirection, SQLCHAR *szDriverDesc, SQLSMALLINT cbDriverDescMax, SQLSMALLINT *pcbDriverDesc, SQLCHAR *szDriverAttributes, SQLSMALLINT cbDrvrAttrMax, SQLSMALLINT *pcbDrvrAttr); /*---------------------------------------------*/ /* Mapping macros for Unicode */ /*---------------------------------------------*/ #ifndef SQL_NOUNICODEMAP /* define this to disable the mapping */ #ifdef UNICODE #define SQLColAttribute SQLColAttributeW #define SQLColAttributes SQLColAttributesW #define SQLConnect SQLConnectW #define SQLDescribeCol SQLDescribeColW #define SQLError SQLErrorW #define SQLExecDirect SQLExecDirectW #define SQLGetConnectAttr SQLGetConnectAttrW #define SQLGetCursorName SQLGetCursorNameW #define SQLGetDescField SQLGetDescFieldW #define SQLGetDescRec SQLGetDescRecW #define SQLGetDiagField SQLGetDiagFieldW #define SQLGetDiagRec SQLGetDiagRecW #define SQLPrepare SQLPrepareW #define SQLSetConnectAttr SQLSetConnectAttrW #define SQLSetCursorName SQLSetCursorNameW #define SQLSetDescField SQLSetDescFieldW #define SQLSetStmtAttr SQLSetStmtAttrW #define SQLGetStmtAttr SQLGetStmtAttrW #define SQLColumns SQLColumnsW #define SQLGetConnectOption SQLGetConnectOptionW #define SQLGetInfo SQLGetInfoW #define SQLGetTypeInfo SQLGetTypeInfoW #define SQLSetConnectOption SQLSetConnectOptionW #define SQLSpecialColumns SQLSpecialColumnsW #define SQLStatistics SQLStatisticsW #define SQLTables SQLTablesW #define SQLDataSources SQLDataSourcesW #define SQLDriverConnect SQLDriverConnectW #define SQLBrowseConnect SQLBrowseConnectW #define SQLColumnPrivileges SQLColumnPrivilegesW #define SQLForeignKeys SQLForeignKeysW #define SQLNativeSql SQLNativeSqlW #define SQLPrimaryKeys SQLPrimaryKeysW #define SQLProcedureColumns SQLProcedureColumnsW #define SQLProcedures SQLProceduresW #define SQLTablePrivileges SQLTablePrivilegesW #define SQLDrivers SQLDriversW #endif /* UNICODE */ #endif /* SQL_NOUNICODEMAP */ #ifdef __cplusplus } #endif #ifndef __SQLEXT_H #include #endif #endif unixODBC-2.2.14-p2/include/uodbc_stats.h0100644000076400007640000000503707363332174016320 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: uodbc_stats.h,v 1.1.1.1 2001/10/17 16:40:28 lurcher Exp $ * * $Log: uodbc_stats.h,v $ * Revision 1.1.1.1 2001/10/17 16:40:28 lurcher * * First upload to SourceForge * * Revision 1.2 2000/12/19 07:28:45 pharvey * - added first pass at Stats page content * - wrapped public stats functions for C++ * * Revision 1.1 2000/12/18 11:54:22 martin * * handle statistic API. * * **********************************************************************/ #ifndef UODBC__stats_h #define UODBC__stats_h 1 #include #include typedef struct uodbc_stats_retentry { unsigned long type; /* type of statistic */ # define UODBC_STAT_STRING 1 # define UODBC_STAT_LONG 2 union { char s_value[256]; /* string type */ long l_value; /* number type */ } value; char name[32]; /* name of statistic */ } uodbc_stats_retentry; #if defined(__cplusplus) extern "C" { #endif int uodbc_open_stats(void **rh, unsigned int mode); #define UODBC_STATS_READ 0x1 #define UODBC_STATS_WRITE 0x2 int uodbc_close_stats(void *rh); int uodbc_get_stats(void *h, pid_t request_pid, uodbc_stats_retentry *s, int n_stats); char *uodbc_stats_error(char *buf, size_t buflen); #if defined(__cplusplus) } #endif #endif /* UODBC__stats_h */ unixODBC-2.2.14-p2/include/uodbc_extras.h0100644000076400007640000000437610212140115016450 0ustar nicknick/********************************************************************* * * This is based on code created by Peter Harvey, * (pharvey@codebydesign.com). * * Modified and extended by Nick Gorham * (nick@easysoft.com). * * Further modified and extend by Eric Sharkey * (sharkey@netrics.com). * * Any bugs or problems should be considered the fault of Nick or * Eric and not Peter. * * copyright (c) 2005 Eric Sharkey * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: uodbc_extras.h,v 1.1 2005/03/04 20:08:45 sharkey Exp $ * **********************************************************************/ #ifndef UODBC__extras_h #define UODBC__extras_h 1 #if defined(HAVE_STDARG_H) # include # define HAVE_STDARGS #else # if defined(HAVE_VARARGS_H) # include # ifdef HAVE_STDARGS # undef HAVE_STDARGS # endif # endif #endif #if defined(__cplusplus) extern "C" { #endif extern int uodbc_vsnprintf (char *str, size_t count, const char *fmt, va_list args); #ifdef HAVE_STDARGS int uodbc_snprintf (char *str,size_t count,const char *fmt,...); #else int uodbc_snprintf (va_alist) va_dcl; #endif #ifndef HAVE_SNPRINTF #define snprintf uodbc_snprintf #endif #ifndef HAVE_VSNPRINTF #define vsnprintf uodbc_vsnprintf #endif #ifndef HAVE_STRCASECMP extern int strcasecmp( const char *s1, const char * s2 ); #endif #ifndef HAVE_STRNCASECMP extern int strncasecmp (const char *s1, const char *s2, int n ); #endif #if defined(__cplusplus) } #endif #endif /* UODBC__extras_h */ unixODBC-2.2.14-p2/include/autotest.h0100644000076400007640000001260707363332174015657 0ustar nicknick/*--------------------------------------------------------------------------------- | Title: AUTOTEST.H | | This file contains constants and prototypes required to compile an | Auto Test DLL. | | Should be consistant with MS version | *---------------------------------------------------------------------------------*/ #ifndef AUTOTEST_DEFS #define AUTOTEST_DEFS #include #include #include "sql.h" #include "sqlext.h" #include "sqltypes.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifdef PATH_MAX #define _MAX_PATH PATH_MAX #else #define _MAX_PATH 256 #endif extern HINSTANCE hLoadedInst; /*---------------------------------------------------------------------------------- Defines and Macros ----------------------------------------------------------------------------------*/ #define TEST_ABORTED (-1) #define AUTO_MAX_TEST_NAME 35 #define AUTO_MAX_TESTCASE_NAME 35 #define AUTO_MAX_TESTDESC_NAME 75 #define MAXFLUSH 300 #define MAX_USER_INFO 50 #define MAX_KEYWORD_LEN 149 #define EXTFUNCDECL #define EXTFUN #define InitTest(lps) \ { lps->cErrors=0; } #define AbortTest(lps) \ { lps->cErrors=TEST_ABORTED; } #define AllocateMemory(cb) (calloc(cb,1)) #define ReleaseMemory(lp) (free(lp)) #define NumItems(s) (sizeof(s) / sizeof(s[0])) /* Following will access bit number pos in a bit array and return */ /* TRUE if it is set, FALSE if it is not */ #define CQBITS (sizeof(unsigned int) * 8) #define getqbit(lpa, pos) \ (lpa[((pos) / CQBITS)] & (1 << ((pos) - (CQBITS * ((pos) / CQBITS))))) #define GETBIT(p1,p2) getqbit(p1,(p2)-1) /* * Message box defines */ #define MB_OK (0x0000) #define MB_ABORTRETRYIGNORE (0x0001) #define MB_OKCANCEL (0x0002) #define MB_RETRYCANCEL (0x0003) #define MB_YESNO (0x0004) #define MB_YESNOCANCEL (0x0005) #define MB_ICONEXCLAMATION (0x0000) #define MB_ICONWARNING MB_ICONEXCLAMATION #define MB_ICONINFORMATION (0x0010) #define MB_ICONASTERISK MB_ICONINFORMATION #define MB_ICONQUESTION (0x0020) #define MB_ICONSTOP (0x0030) #define MB_ICONERROR MB_ICONSTOP #define MB_ICONHAND MB_ICONSTOP #define MB_DEFBUTTON1 (0x0000) #define MB_DEFBUTTON2 (0x0100) #define MB_DEFBUTTON3 (0x0200) #define MB_DEFBUTTON4 (0x0300) #define MB_APPMODAL (0x0000) #define MB_SYSTEMMODAL (0x1000) #define MB_TASKMODAL (0x2000) #define MB_DEFAULT_DESKTOP_ONLY (0x0000) #define MB_HELP (0x0000) #define MB_RIGHT (0x0000) #define MB_RTLREADING (0x0000) #define MB_SETFOREGROUND (0x0000) #define MB_TOPMOST (0x0000) #define MB_SERVICE_NOTIFICATION (0x0000) #define MB_SERVICE_NOTIFICATION_NT3X (0x0000) /* // This structure contains the information found in the .INI file for a // data source. The filled out structure is in turn passed to AutoTestFunc // to drive the individual tests. */ typedef struct tagSERVERINFO { HWND hwnd; /* Output edit window */ CHAR szLogFile[_MAX_PATH]; /* Output log file */ HENV henv; /* .EXE's henv */ HDBC hdbc; /* .EXE's hdbc */ HSTMT hstmt; /* .EXE's hstmt */ /* The following items are gathered from the .INI file and may be defined */ /* via the "Manage Test Sources" menu item from ODBC Test */ CHAR szSource[SQL_MAX_DSN_LENGTH+1]; CHAR szValidServer0[SQL_MAX_DSN_LENGTH+1]; CHAR szValidLogin0[MAX_USER_INFO+1]; CHAR szValidPassword0[MAX_USER_INFO+1]; CHAR szKeywords[MAX_KEYWORD_LEN+1]; /* Following are used for run-time */ UINT FAR * rglMask; /* Run test mask */ int failed; /* Track failures on a test case basis */ int cErrors; /* Count of errors */ BOOL fDebug; /* TRUE if debugging is to be enabled */ BOOL fScreen; /* TRUE if test output goes to screen */ BOOL fLog; /* TRUE if test output goes to log */ BOOL fIsolate; /* TRUE to isolate output */ UDWORD vCursorLib; /* Value for SQL_ODBC_CURSOR on SQLSetConnectOption */ HINSTANCE hLoadedInst; /* Instance handle of loaded test */ /* Following are used for buffering output to edit window */ CHAR szBuff[MAXFLUSH]; /* Hold temporary results */ UINT cBuff; /* Number of TCHARs in szBuff */ } SERVERINFO; typedef SERVERINFO FAR * lpSERVERINFO; /*---------------------------------------------------------------------------------- // Function prototypes //---------------------------------------------------------------------------------*/ BOOL EXTFUNCDECL FAR szLogPrintf(lpSERVERINFO lps, BOOL fForce, LPTSTR szFmt, ...); int EXTFUNCDECL FAR szMessageBox(HWND hwnd, UINT style, LPTSTR szTitle, LPTSTR szFmt, ...); LPTSTR EXTFUN GetRCString(HINSTANCE hInst, LPTSTR buf, int cbbuf, UINT ids); #ifdef __cplusplus } #endif #endif unixODBC-2.2.14-p2/include/Makefile.am0100644000076400007640000000054411017512677015666 0ustar nicknickEXTRA_DIST = \ ini.h \ log.h \ lst.h \ odbcinst.h \ odbcinstext.h \ sql.h \ sqlext.h \ sqltypes.h \ sqlucode.h \ sqp.h \ uodbc_stats.h \ uodbc_extras.h \ autotest.h \ odbctrace.h \ odbctrac.h include_HEADERS = \ odbcinst.h \ odbcinstext.h \ sql.h \ sqlext.h \ sqltypes.h \ sqlucode.h \ uodbc_stats.h \ uodbc_extras.h \ autotest.h unixODBC-2.2.14-p2/include/Makefile.in0100644000076400007640000003174011111035255015664 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = include DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(includedir)" includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = \ ini.h \ log.h \ lst.h \ odbcinst.h \ odbcinstext.h \ sql.h \ sqlext.h \ sqltypes.h \ sqlucode.h \ sqp.h \ uodbc_stats.h \ uodbc_extras.h \ autotest.h \ odbctrace.h \ odbctrac.h include_HEADERS = \ odbcinst.h \ odbcinstext.h \ sql.h \ sqlext.h \ sqltypes.h \ sqlucode.h \ uodbc_stats.h \ uodbc_extras.h \ autotest.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu 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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ rm -f "$(DESTDIR)$(includedir)/$$f"; \ 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) 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-libtool \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-includeHEADERS install-exec-am: install-info: install-info-am install-man: 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-info-am .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-exec install-exec-am \ install-includeHEADERS install-info install-info-am \ install-man 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-info-am # 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: unixODBC-2.2.14-p2/include/ini.h0100644000076400007640000003316710213146763014565 0ustar nicknick/********************************************************************************** * ini.h * * Include file for libini.a. Coding? Include this and link against libini.a. * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 28.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef INCLUDED_INI_H #define INCLUDED_INI_H /*********[ CONSTANTS AND TYPES ]**************************************************/ #include #include #include #include #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #define STDINFILE ((char*)-1) #define INI_NO_DATA 2 #define INI_SUCCESS 1 #define INI_ERROR 0 #define INI_MAX_LINE 1000 #define INI_MAX_OBJECT_NAME INI_MAX_LINE #define INI_MAX_PROPERTY_NAME INI_MAX_LINE #define INI_MAX_PROPERTY_VALUE INI_MAX_LINE #if HAVE_LIMITS_H #include #endif #ifdef PATH_MAX #define ODBC_FILENAME_MAX PATH_MAX #elif MAXPATHLEN #define ODBC_FILENAME_MAX MAXPATHLEN #else #define ODBC_FILENAME_MAX FILENAME_MAX #endif /******************************************** * tINIPROPERTY * * Each property line has Name=Value pair. * They are stored in this structure and linked together to provide a list * of all properties for a given Object. ********************************************/ typedef struct tINIPROPERTY { struct tINIPROPERTY *pNext; struct tINIPROPERTY *pPrev; char szName[INI_MAX_PROPERTY_NAME+1]; char szValue[INI_MAX_PROPERTY_VALUE+1]; } INIPROPERTY, *HINIPROPERTY; /******************************************** * tINIOBJECT * * Each object line has just an object name. This structure * stores the object name and its subordinate information. * The lines that follow are considered to be properties * and are stored in a list of tINIPROPERTY. ********************************************/ typedef struct tINIOBJECT { struct tINIOBJECT *pNext; struct tINIOBJECT *pPrev; char szName[INI_MAX_OBJECT_NAME+1]; HINIPROPERTY hFirstProperty; HINIPROPERTY hLastProperty; int nProperties; } INIOBJECT, *HINIOBJECT; /******************************************** * tINI * * Each INI file contains a list of objects. This * structure stores each object in a list of tINIOBJECT. ********************************************/ typedef struct tINI { #ifdef __OS2__ int iniFileType; /* ini file type 0 = text, 1 = binary (OS/2 only) */ #endif char szFileName[ODBC_FILENAME_MAX+1]; /* FULL INI FILE NAME */ char cComment[ 5 ]; /* COMMENT CHAR MUST BE IN FIRST COLUMN */ char cLeftBracket; /* BRACKETS DELIMIT THE OBJECT NAME, THE LEFT BRACKET MUST BE IN COLUMN ONE */ char cRightBracket; char cEqual; /* SEPERATES THE PROPERTY NAME FROM ITS VALUE */ int bChanged; /* IF true, THEN THE WHOLE FILE IS OVERWRITTEN UPON iniCommit */ int bReadOnly; /* TRUE IF AT LEAST ONE CALL HAS BEEN MADE TO iniAppend() */ HINIOBJECT hFirstObject; HINIOBJECT hLastObject; HINIOBJECT hCurObject; int nObjects; HINIPROPERTY hCurProperty; } INI, *HINI; /******************************************** * tINIBOOKMARK * * Used to store the current Object and Property pointers so * that the caller can quickly return to some point in the * INI data. ********************************************/ typedef struct tINIBOOKMARK { HINI hIni; HINIOBJECT hCurObject; HINIPROPERTY hCurProperty; } INIBOOKMARK, *HINIBOOKMARK; #if defined(__cplusplus) extern "C" { #endif /*********[ PRIMARY INTERFACE ]*****************************************************/ /****************************** * iniOpen * * 1. make sure file exists * 2. allocate memory for HINI * 3. initialize HINI * 4. load entire file into structured memory * 5. set TRUE if you want to create file if non-existing ******************************/ #ifdef __OS2__ int iniOpen( HINI *hIni, char *pszFileName, char *cComment, char cLeftBracket, char cRightBracket, char cEqual, int bCreate, int bFileType ); #else int iniOpen( HINI *hIni, char *pszFileName, char *cComment, char cLeftBracket, char cRightBracket, char cEqual, int bCreate ); #endif /****************************** * iniAppend * * 1. append Sections in pszFileName that do not already exist in hIni * 2. Makes hIni ReadOnly! ******************************/ int iniAppend( HINI hIni, char *pszFileName ); /****************************** * iniDelete * * 1. simple removes all objects (and their properties) from the list using iniObjectDelete() in a loop ******************************/ int iniDelete( HINI hIni ); /****************************** * iniClose * * 1. free memory previously allocated for HINI * 2. DO NOT SAVE ANY CHANGES (see iniCommit) ******************************/ int iniClose( HINI hIni ); /****************************** * iniCommit * * 1. replaces file contents with memory contents (overwrites the file) ******************************/ int iniCommit( HINI hIni ); /****************************** * iniObjectFirst * ******************************/ int iniObjectFirst( HINI hIni ); /****************************** * iniObjectLast * ******************************/ int iniObjectLast( HINI hIni ); /****************************** * iniObjectNext * * 1. iniObjects() if no current object name else * 2. find and store next object name ******************************/ int iniObjectNext( HINI hIni ); /****************************** * iniObjectSeek * * 1. find and store object name ******************************/ int iniObjectSeek( HINI hIni, char *pszObject ); /****************************** * iniObjectSeekSure * * 1. find and store object name * 2. ensure that it exists ******************************/ int iniObjectSeekSure( HINI hIni, char *pszObject ); /****************************** * iniObjectEOL * ******************************/ int iniObjectEOL( HINI hIni ); /****************************** * iniObject * * 1. returns the current object name ******************************/ int iniObject( HINI hIni, char *pszObject ); /****************************** * iniObjectDelete * * 1. deletes current Object ******************************/ int iniObjectDelete( HINI hIni ); /****************************** * iniObjectUpdate * * 1. update current Object ******************************/ int iniObjectUpdate( HINI hIni, char *pszObject ); /****************************** * iniPropertyObject * * 1. inserts a new Object * 2. becomes current ******************************/ int iniObjectInsert( HINI hIni, char *pszObject ); /****************************** * iniPropertyFirst * ******************************/ int iniPropertyFirst( HINI hIni ); /****************************** * iniPropertyLast * ******************************/ int iniPropertyLast( HINI hIni ); /****************************** * iniPropertyNext * * 1. iniProperties() if no current property name else * 2. find and store next property name ******************************/ int iniPropertyNext( HINI hIni ); /****************************** * iniPropertySeek * * 1. set current Object & Property positions where matching parameters * 2. any parms which are empty strings (ie pszObject[0]) are ignored * 3. it is kinda pointless to pass empty strings for all parms... you will get 1st Property in 1st Object ******************************/ int iniPropertySeek( HINI hIni, char *pszObject, char *pszProperty, char *pszValue ); /****************************** * iniPropertySeekSure * * 1. same as iniPropertySeek but * 2. will ensure that both Object and Property exist ******************************/ int iniPropertySeekSure( HINI hIni, char *pszObject, char *pszProperty, char *pszValue ); /****************************** * iniPropertyEOL * ******************************/ int iniPropertyEOL( HINI hIni ); /****************************** * iniProperty * * 1. returns the current property name ******************************/ int iniProperty( HINI hIni, char *pszProperty ); /****************************** * iniPropertyDelete * * 1. deletes current Property ******************************/ int iniPropertyDelete( HINI hIni ); /****************************** * iniPropertyUpdate * * 1. update current Property ******************************/ int iniPropertyUpdate( HINI hIni, char *pszProperty, char *pszValue ); /****************************** * iniPropertyInsert * * 1. inserts a new Property for current Object * 2. becomes current ******************************/ int iniPropertyInsert( HINI hIni, char *pszProperty, char *pszValue ); /****************************** * iniValue * * 1. returns the value for the current object/property ******************************/ int iniValue( HINI hIni, char *pszValue ); /****************************** * iniGetBookmark * * 1. Store the current data positions (Object and Property) * into hIniBookmark. * 2. Does not allocate memory for hIniBookmark so pass a * pointer to a valid bookmark. ******************************/ int iniGetBookmark( HINI hIni, HINIBOOKMARK hIniBookmark ); /****************************** * iniGotoBookmark * * 1. Sets the current Object and Property positions to * those stored in IniBookmark. * 2. Does not account for the bookmark becoming * invalid ie from the Object or Property being deleted. ******************************/ int iniGotoBookmark( INIBOOKMARK IniBookmark ); /****************************** * iniCursor * * 1. Returns a copy of the hIni with a new * set of position cursors (current Object and Property). * 2. Not safe to use when in the possibility of * deleting data in another cursor on same data. * 3. Use when reading data only. * 4. Does not allocate memory so hIniCursor should be valid. * 5. All calls, other than those for movement, are * global and will affect any other view of the data. ******************************/ int iniCursor( HINI hIni, HINI hIniCursor ); /*************************************************************************************/ /*********[ SUPPORT FUNCS ]***********************************************************/ /*************************************************************************************/ /****************************** * iniElement * ******************************/ int iniElement( char *pszData, char cSeperator, char cTerminator, int nElement, char *pszElement, int nMaxElement ); int iniElementMax( char *pData, char cSeperator, int nDataLen, int nElement, char *pszElement, int nMaxElement ); int iniElementToEnd( char *pszData, char cSeperator, char cTerminator, int nElement, char *pszElement, int nMaxElement ); int iniElementEOL( char *pszData, char cSeperator, char cTerminator, int nElement, char *pszElement, int nMaxElement ); /****************************** * iniElementCount * ******************************/ int iniElementCount( char *pszData, char cSeperator, char cTerminator ); /****************************** * iniPropertyValue * * 1. returns the property value for pszProperty in pszValue * 2. pszString example; * "PropertyName1=Value1;PropertyName2=Value2;..." * 3. cEqual is usually '=' * 4. cPropertySep is usually ';' * * This function can be called without calling any other functions in this lib. ******************************/ int iniPropertyValue( char *pszString, char *pszProperty, char *pszValue, char cEqual, char cPropertySep ); /****************************** * iniAllTrim * * 1. trims blanks, tabs and newlines from start and end of pszString * * This function can be called without calling any other functions in this lib. ******************************/ int iniAllTrim( char *pszString ); /****************************** * iniToUpper * * 1. Converts all chars in pszString to upper case. * * This function can be called without calling any other functions in this lib. ******************************/ int iniToUpper( char *pszString ); /****************************** * _iniObjectRead * ******************************/ int _iniObjectRead( HINI hIni, char *szLine, char *pszObjectName ); /****************************** * _iniPropertyRead * ******************************/ int _iniPropertyRead( HINI hIni, char *szLine, char *pszPropertyName, char *pszPropertyValue ); /****************************** * _iniDump * ******************************/ int _iniDump( HINI hIni, FILE *hStream ); /****************************** * _iniScanUntilObject * ******************************/ int _iniScanUntilObject( HINI hIni, FILE *hFile, char *pszLine ); int _iniScanUntilNextObject( HINI hIni, FILE *hFile, char *pszLine ); /* * Some changes to avoid a 255 file handle limit, thanks MQJoe. * Make it conditional as it does have some performance impact esp with LARGE ini files (like what I have :-) */ #if defined( HAVE_VSNPRINTF ) && defined( USE_LL_FIO ) FILE *uo_fopen( const char *filename, const char *mode ); int uo_fclose( FILE *stream ); char *uo_fgets( char *szbuffer, int n, FILE *stream ); int uo_fprintf( FILE *stream, const char *fmt, ...); int uo_vfprintf( FILE *stream, const char *fmt, va_list ap); #else #define uo_fopen fopen #define uo_fclose fclose #define uo_fgets fgets #define uo_fprintf fprintf #define uo_vfprintf vfprintf #endif #if defined(__cplusplus) } #endif #endif unixODBC-2.2.14-p2/include/log.h0100644000076400007640000000725410732317314014563 0ustar nicknick/********************************************************************************** * log.h * * Include file for liblog.a. Coding? Include this and link against liblog.a. * * At this time; its a simple list manager but I expect that this will evolve into * a list manager which; * * - allows for messages of different severity and types to be stored * - allows for actions (such as saving to file or poping) to occur on selected message * types and severities * **********************************************************************************/ #ifndef INCLUDED_LOG_H #define INCLUDED_LOG_H #include #include #include #if defined(HAVE_STDARG_H) # include # define HAVE_STDARGS #else # if defined(HAVE_VARARGS_H) # include # ifdef HAVE_STDARGS # undef HAVE_STDARGS # endif # endif #endif #include /***************************************************************************** * FUNCTION RETURN CODES *****************************************************************************/ #define LOG_ERROR 0 #define LOG_SUCCESS 1 #define LOG_NO_DATA 2 /***************************************************************************** * SEVERITY *****************************************************************************/ #define LOG_INFO 0 #define LOG_WARNING 1 #define LOG_CRITICAL 2 /***************************************************************************** * *****************************************************************************/ #define LOG_MSG_MAX 1024 /***************************************************************************** * HANDLES *****************************************************************************/ typedef struct tLOGMSG { char * pszModuleName; /*!< file where message originated */ char * pszFunctionName; /*!< function where message originated. */ int nLine; /*!< File line where message originated. */ int nSeverity; int nCode; char * pszMessage; } LOGMSG, *HLOGMSG; typedef struct tLOG { HLST hMessages; /* list of messages (we may want to switch to vector) */ char *pszProgramName; /* liblog will malloc, copy, and free */ char *pszLogFile; /* NULL, or filename */ long nMaxMsgs; /* OLDEST WILL BE DELETED ONCE MAX */ int bOn; /* turn logging on/off (default=off) */ } LOG, *HLOG; /***************************************************************************** * API *****************************************************************************/ int logOpen( HLOG *phLog, char *pszProgramName, char *pszLogFile, long nMaxMsgs ); int logClose( HLOG hLog ); int logClear( HLOG hLog ); int logPushMsg( HLOG hLog, char *pszModule, char *pszFunctionName, int nLine, int nSeverity, int nCode, char *pszMsg ); int logPushMsgf( HLOG hLog, char *pszModule, char *pszFunctionName, int nLine, int nSeverity, int nCode, char *pszMessageFormat, ... ); int logvPushMsgf( HLOG hLog, char *pszModule, char *pszFunctionName, int nLine, int nSeverity, int nCode, char *pszMessageFormat, va_list args ); int logPeekMsg( HLOG hLog, long nMsg, HLOGMSG *phMsg ); int logPopMsg( HLOG hLog ); int logOn( HLOG hLog, int bOn ); /***************************************************************************** * SUPPORTING FUNCS (do not call directly) *****************************************************************************/ /****************************** * _logFreeMsg * * 1. This is called by lstDelete() ******************************/ void _logFreeMsg( void *pMsg ); #endif unixODBC-2.2.14-p2/include/lst.h0100644000076400007640000002325307363332174014610 0ustar nicknick/********************************************************************************** * lst.h * * lib for creating/managing/deleting doubly-linked lists. * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under LGPL 04.APR.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef INCLUDED_LST_H #define INCLUDED_LST_H /*********[ CONSTANTS AND TYPES ]**************************************************/ #include #include #include #include #ifndef true #define true 1 #endif #ifndef false #define false 0 #endif #define LST_NO_DATA 2 #define LST_SUCCESS 1 #define LST_ERROR 0 /******************************************** * tLSTITEM * ********************************************/ typedef struct tLSTITEM { struct tLSTITEM *pNext; struct tLSTITEM *pPrev; int bDelete; /* true if flagged for delete. do delete when refs = 0 */ /* will become invisible for new cursors */ /* ONLY APPLIES TO THE root LIST */ int bHide; /* used in nav funcs if HLST bShowHidden=false (default) */ long nRefs; /* the number of hItems that refer to this item to get pData */ /* if bDelete and refs = 0 then item is really removed */ void *hLst; /* ptr to its list handle. */ void *pData; /* ptr to user data or (if Cursor item) ptr to some base LSTITEM */ } LSTITEM, *HLSTITEM; /******************************************** * tLST * ********************************************/ typedef struct tLST { HLSTITEM hFirst; HLSTITEM hLast; HLSTITEM hCurrent; long nItems; /* number of items in the list (not counting where bDelete or bHide)*/ /* !!! not used anymore !!!! */ long nRefs; /* the number of cursors that are based upon this list */ int bExclusive; /* set this for exclusive access to list ie when navigating with */ /* hCurrent or when doing an insert or delete */ /* do this only for VERY short periods all other access will loop */ /* until this is set back to false */ /* THIS IS FOR INTERNAL USE... IT IS USED WHEN MAINTAINING INTERNAL */ /* LISTS SUCH AS REFERENCE LISTS DO NOT USE IT TO LOCK A ROOT OR */ /* CURSOR LIST */ int bShowHidden; /* true to have nav funcs show bHidden items(default=false) */ int bShowDeleted; /* true to have nav funcs show bDeleted items (default=false) */ void (*pFree)( void *pData ); /* function to use when need to free pData. default is free() */ int (*pFilter)( struct tLST *, void * ); /* this function returns true if we want the data in our result set */ /* default is all items included. no affect if root list */ struct tLST *hLstBase; /* this list was derived from hLstBase. NULL if root list. */ /* we must use this if we are adding a new item in an empty list */ /* and to dec nRefs in our base list */ void *pExtras; /* app can store what ever it wants here. no attempt to interpret it*/ /* or to free it is made by lst */ } LST, *HLST; /******************************************** * tLSTBOOKMARK * ********************************************/ typedef struct tLSTBOOKMARK { HLST hLst; HLSTITEM hCurrent; } LSTBOOKMARK, *HLSTBOOKMARK; #if defined(__cplusplus) extern "C" { #endif /*********[ PRIMARY INTERFACE ]*****************************************************/ /****************************** * lstAppend * * 1. Appends a new item to the end of the list. * 2. Makes the new item the current item. ******************************/ int lstAppend( HLST hLst, void *pData ); /****************************** * lstClose * * 1. free memory previously allocated for HLST * 2. Will call lstDelete with bFreeData for each (if any) * existing items. ******************************/ int lstClose( HLST hLst ); /****************************** * lstDelete * * 1. deletes current item * 2. dec ref count in root item * 3. deletes root item if ref count < 1 OR sets delete flag ******************************/ int lstDelete( HLST hLst ); /****************************** * lstEOL * ******************************/ int lstEOL( HLST hLst ); /****************************** * lstFirst * * 1. makes First item the current item. * 2. returns pData or NULL ******************************/ void *lstFirst( HLST hLst ); /****************************** * lstGet * * 1. Return pData for current item or NULL * 2. Will recurse down to base data if bIsCursor. ******************************/ void *lstGet( HLST hLst ); /****************************** * lstGetBookMark * * !!! BOOKMARKS ONLY SAFE WHEN READONLY !!! ******************************/ int lstGetBookMark( HLST hLst, HLSTBOOKMARK hLstBookMark ); /****************************** * lstGoto * * 1. Return pData for current item or NULL * 2. IF nIndex is out of range THEN * lstEOL = TRUE * returns NULL ******************************/ void *lstGoto( HLST hLst, long nIndex ); /****************************** * lstGotoBookMark * * !!! BOOKMARKS ONLY SAFE WHEN READONLY !!! ******************************/ int lstGotoBookMark( HLSTBOOKMARK hLstBookMark ); /****************************** * lstInsert * * 1. inserts a new item before the current item * 2. becomes current ******************************/ int lstInsert( HLST hLst, void *pData ); /****************************** * lstLast * * 1. makes last item the current item * 2. returns pData or NULL ******************************/ void *lstLast( HLST hLst ); /****************************** * lstNext * * 1. makes next item the current item * 2. returns pData or NULL ******************************/ void *lstNext( HLST hLst ); /****************************** * lstOpen * * 1. Create an empty list. * * *** MUST CALL lstClose WHEN DONE OR LOSE MEMORY *** * ******************************/ HLST lstOpen(); /****************************** * lstOpenCursor * * 1. If you are going to use cursors then just use cursors. Do * not use move funcs, get funcs, etc on base list and use * cursors as well. Garbage collection only accounts for * cursors when deleting items that have been flagged for * deletion... so direct access could result in the list * changing unexpectedly. * * 2. pFilterFunc is optional. If you provide this function * pointer the cursor list will be generated to include * all items where pFilterFunc( lstGet( hBase ) ) = true. * Leaving it NULL just means that all items in hBase will * be included in the cursor list. * * *** MUST CALL lstClose WHEN DONE OR LOSE MEMORY *** * ******************************/ HLST lstOpenCursor( HLST hBase, int (*pFilterFunc)( HLST, void * ), void *pExtras ); /****************************** * lstPrev * * 1. makes prev item the current item * 2. returns pData or NULL ******************************/ void *lstPrev( HLST hLst ); /****************************** * lstSet * * 1. replaces pData pointer * 2. returns pData * 3. Will recurse down to base data. * * *** THIS SHOULD BE CHANGED TO AVOID CHANGING THE pData POINTER AND RESIZE THE BUFFER INSTEAD * ******************************/ void *lstSet( HLST hLst, void *pData ); /****************************** * lstSetFreeFunc * * 1. The given function will be called when ever there is a need to free pData * 2. The default action is to simply free(pData). ******************************/ int lstSetFreeFunc( HLST hLst, void (*pFree)( void *pData ) ); /****************************** * lstSeek * * 1. Tries to set hCurrent to the item where pData is at * 2. simply scans from 1st to last so lsEOL() = true when not found * ******************************/ int lstSeek( HLST hLst, void *pData ); /****************************** * lstSeekItem * * 1. Tries to set hCurrent to the item where hItem is at * 2. simply scans from 1st to last so lsEOL() = true when not found * ******************************/ int lstSeekItem( HLST hLst, HLSTITEM hItem ); /***************[ FOR INTERNAL USE ]***********************/ /*************************** * ENSURE CURRENT IS NOT ON A bDelete ITEM ***************************/ void *_lstAdjustCurrent( HLST hLst ); /*************************** * ***************************/ void _lstDump( HLST hLst ); /****************************** * _lstFreeItem * * 1. Does a real delete. Frees memory used by item. * will delete root item as required. * ******************************/ int _lstFreeItem( HLSTITEM hItem ); /****************************** * _lstNextValidItem * * 1. Starts scanning hLst at hItem until a non-deleted Item found or EOL * ******************************/ HLSTITEM _lstNextValidItem( HLST hLst, HLSTITEM hItem ); /****************************** * _lstPrevValidItem * * 1. Starts scanning hLst at hItem until a non-deleted Item found or EOL * ******************************/ HLSTITEM _lstPrevValidItem( HLST hLst, HLSTITEM hItem ); /****************************** * _lstVisible * * ******************************/ int _lstVisible( HLSTITEM hItem ); /****************************** * _lstAppend * * ******************************/ int _lstAppend( HLST hLst, HLSTITEM hItem ); /****************************** * _lstInsert * * ******************************/ int _lstInsert( HLST hLst, HLSTITEM hItem ); #if defined(__cplusplus) } #endif #endif unixODBC-2.2.14-p2/include/sqp.h0100644000076400007640000001777610100545336014613 0ustar nicknick#ifndef _SQP_H #define _SQP_H #include /* #define SQPDEBUG */ /***[ PARSED, SUPPORTED, SQL PARTS ]**********************************************/ typedef enum sqpStatementType { sqpcreatetable, sqpdroptable, sqpselect, sqpdelete, sqpinsert, sqpupdate } sqpStatementType; typedef enum sqpOrder { sqpnone, sqpasc, sqpdesc } sqpOrder; typedef struct tSQPTABLE { char *pszOwner; char *pszTable; } SQPTABLE, *HSQPTABLE; typedef struct tSQPCOLUMN { char *pszTable; char *pszColumn; int nColumn; /* index into row data for col value */ } SQPCOLUMN, *HSQPCOLUMN; typedef struct tSQPCOMPARISON { char *pszLValue; /* must be a column name */ char *pszOperator; /* > < >= <= = LIKE NOTLIKE */ char *pszRValue; /* must be a string (quotes removed) */ char cEscape; /* escape char for LIKE operator */ int nLColumn; /* index into row data for col value */ } SQPCOMPARISON, *HSQPCOMPARISON; typedef struct tSQPASSIGNMENT { char *pszColumn; char *pszValue; int nColumn; /* index into row data for col value */ } SQPASSIGNMENT, *HSQPASSIGNMENT; typedef struct tSQPDATATYPE { char *pszType; short nType; int nPrecision; int nScale; } SQPDATATYPE, *HSQPDATATYPE; typedef struct tSQPCOLUMNDEF { char * pszColumn; HSQPDATATYPE hDataType; int bNulls; } SQPCOLUMNDEF, *HSQPCOLUMNDEF; typedef struct tSQPPARAM { char *pszValue; } SQPPARAM, *HSQPPARAM; typedef enum sqpCondType { sqpor, sqpand, sqpnot, sqppar, sqpcomp } sqpCondType; typedef struct tSQPCOND { sqpCondType nType; struct tSQPCOND *hLCond; struct tSQPCOND *hRCond; HSQPCOMPARISON hComp; } SQPCOND, *HSQPCOND; /***[ PARSED, SUPPORTED, SQL STATEMENTS ]**********************************************/ typedef struct tSQPCREATETABLE { char *pszTable; HLST hColumnDefs; /* list of HSQPCOLUMNDEF */ } SQPCREATETABLE, *HSQPCREATETABLE; typedef char SQPDROPTABLE; typedef SQPDROPTABLE * HSQPDROPTABLE; typedef struct tSQPSELECT { HLST hColumns; /* list of HSQPCOLUMN */ char *pszTable; HSQPCOND hWhere; /* tree of HSQPCOND */ HLST hOrderBy; /* list of HSQPCOLUMN */ sqpOrder nOrderDirection; } SQPSELECT, *HSQPSELECT; typedef struct tSQPDELETE { char *pszTable; HSQPCOND hWhere; /* tree of HSQPCOND */ char *pszCursor; } SQPDELETE, *HSQPDELETE; typedef struct tSQPINSERT { HLST hColumns; /* list of HSQPCOLUMN */ char *pszTable; HLST hValues; /* list of strings */ } SQPINSERT, *HSQPINSERT; typedef struct tSQPUPDATE { char *pszTable; HLST hAssignments; /* list of HSQPASSIGNMENT */ HSQPCOND hWhere; /* tree of HSQPCOND */ char *pszCursor; } SQPUPDATE, *HSQPUPDATE; /***[ TOP LEVEL STRUCT ]**********************************************/ typedef struct tSQPPARSEDSQL { sqpStatementType nType; union { HSQPCREATETABLE hCreateTable; HSQPDROPTABLE hDropTable; HSQPSELECT hSelect; HSQPDELETE hDelete; HSQPINSERT hInsert; HSQPUPDATE hUpdate; } h; } SQPPARSEDSQL, *HSQPPARSEDSQL; /*********************** * GLOBALS (yuck... gotta get rid of them): * * TEMPS USED WHEN LEX/YACC DO THEIR THING ***********************/ extern char g_szError[1024]; extern HSQPPARSEDSQL g_hParsedSQL; extern char * g_pszTable; extern char * g_pszType; extern HLST g_hColumns; extern HSQPDATATYPE g_hDataType; extern HLST g_hColumnDefs; extern HLST g_hValues; extern HLST g_hAssignments; extern char * g_pszCursor; extern HLST g_hOrderBy; extern sqpOrder g_nOrderDirection; extern int g_nNulls; extern char * g_pszSQLCursor; /* yyparse position init to start of SQL string before yyparse */ extern char * g_pszSQLLimit; /* ptr to NULL terminator of SQL string (yyparse stops here) */ extern int g_nLineNo; extern HLST g_hParams; extern HSQPCOND g_hConds; /********************************************************************************************* * PUBLIC INTERFACE *********************************************************************************************/ #if defined(__cplusplus) extern "C" { #endif /*********************** * sqpOpen * * Inits parser globals. Must call this before any other functions * and sqpClose MUST be called before next sqpOpen. * * pszFirstChar - pointer to 1st char in sql string * pszLastChar - pointer to last char in sql string (typically a pointer to a '\0' char) * hParams - list of bound parameters * ***********************/ void sqpOpen( char *pszFirstChar, char *pszLastChar, HLST hParams ); /*********************** * sqpParse * * Attempts to parse the sql given in sqpOpen. * Returns true if success else error. Use sqpError to get exact error after call. * Only call this once per sqpOpen. * ***********************/ int sqpParse(); /*********************** * sqpError * * Returns the last error message (i.e. why a parse failed). Will * be an empty string if no error. * ***********************/ char * sqpError(); /*********************** * sqpClose * * Cleans up globals in prep for next call to sqpOpen. * ***********************/ void sqpClose(); /*********************** * sqpAdoptParsedSQL * * Caller adopts the top level pointer to the parsed sql. This means * that the caller must also call sqpFreeParsedSQL when done with it! * ***********************/ HSQPPARSEDSQL sqpAdoptParsedSQL(); /*********************** * sqpFreeParsedSQL * * Frees the parsed sql from memory. * If this is being called as a result if a prior call to * sqpAdoptParsedSQL (which is the only reason it should be called in * this interface) then it can be called even after the sqpClose. * ***********************/ int sqpFreeParsedSQL( HSQPPARSEDSQL hParsedSQL ); /*********************** * sqpFreeParam * * Frees a bound param from memory. * ***********************/ void sqpFreeParam( void *pData ); #if defined(__cplusplus) } #endif /********************************************************************************************* * INTERNAL FUNCS *********************************************************************************************/ int my_yyinput(char *buf, int max_size); void yyerror( char *s ); int yyparse(); int yywrap(); short sqpStringTypeToSQLTYPE (char * pszType); void sqpFreeAssignment( void *pData ); void sqpFreeColumn( void *pData ); void sqpFreeColumnDef( void *pData ); void sqpFreeDataType( void *pData ); void sqpFreeComparison( void *pData ); void sqpFreeCond( void *pData ); void sqpFreeCreateTable( void *pData ); void sqpFreeDropTable( void *pData ); void sqpFreeDelete( void *pData ); void sqpFreeInsert( void *pData ); void sqpFreeSelect( void *pData ); void sqpFreeUpdate( void *pData ); void sqpStoreAssignment( char *pszColumn, char *pszValue ); void sqpStoreColumn( HLST *ph, char *pszColumn, int nColumn ); void sqpStoreColumnDef( char *pszColumn ); void sqpStoreDataType( char *pszType, int nPrecision, int nScale ); HSQPCOMPARISON sqpStoreComparison( char *pszLValue, char *pszOperator, char *pszRValue, char *pszEscape ); HSQPCOND sqpStoreCond( sqpCondType nType, HSQPCOND pLCond, HSQPCOND pRCond, HSQPCOMPARISON pComp ); void sqpStoreCreateTable(); void sqpStoreDropTable(); void sqpStoreDelete(); void sqpStoreInsert(); void sqpStorePositioned( char *pszCursor ); void sqpStoreSelect(); void sqpStoreTable( char *pszTable ); void sqpStoreUpdate(); void sqpStoreValue( char *pszValue ); #endif unixODBC-2.2.14-p2/include/odbctrace.h0100644000076400007640000006321111017476327015732 0ustar nicknick/*! * \file * * \author Peter Harvey www.peterharvey.org * \author \sa AUTHORS file * \version 1 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ /*! * \mainpage ODBC Trace Manager * * \section intro_sec Introduction * * This library provides an interface to trace code which is cross-platform and supports plugin trace * handlers. Drivers can use this to simplify support for producing trace output. * * odbctrac is an example of a trace plugin which can be used with this trace interface. * * odbctxt is an example of a Driver which uses this trace interface. */ #ifndef TRACE_H #define TRACE_H #include #include typedef SQLHANDLE *HTRACECALL; /*!< internal call handle of trace plugin */ /*! * \brief Trace handle. * * Create an instance of this at the desired scope. The scope could be 1 for driver or * 1 for each driver handle (env, dbc, stmt, desc) or some other scope. * * Use #traceAlloc to allocate the instance or otherwise init the struct. Then use #traceOpen * and #traceClose to open/close the trace plugin. Use #traceFree when your done with the * trace handle. * \code // init SQLHDBC pConnection; HTRACE pTrace = traceAlloc(); { char szTrace[50]; SQLGetPrivateProfileString( "odbctxt", "TraceFile", "/tmp/sql.log", pTrace->szTraceFile, FILENAME_MAX - 2, "odbcinst.ini" ); SQLGetPrivateProfileString( "odbctxt", "TraceLibrary", "libodbctrac.so", pTrace->szFileName, FILENAME_MAX - 2, "odbcinst.ini" ); SQLGetPrivateProfileString( "odbctxt", "Trace", "No", szTrace, sizeof( szTrace ), "odbcinst.ini" ); if ( szTrace[ 0 ] == '1' || toupper( szTrace[ 0 ] ) == 'Y' || ( toupper( szTrace[ 0 ] ) == 'O' && toupper( szTrace[ 1 ] ) == 'N' ) ) traceOpen( pTrace ); } // use (SQLConnect as example) { HTRACECALL hCall = traceConnect( pTrace, pConnection, "DataSource", SQL_NTS, "UID", SQL_NTS, "PWD", SQL_NTS ); // do connect here return traceReturn( pTrace, hCall, nReturn ); } // fini { traceFree( pTrace ); } \endcode */ typedef struct tTRACE { void * hPlugIn; /*!< library handle of trace plugin */ char szFileName[FILENAME_MAX]; /*!< file name of trace plugin */ char szTraceFile[FILENAME_MAX]; /*!< SQL_ATTR_TRACEFILE */ SQLUINTEGER nTrace; /*!< SQL_ATTR_TRACE */ SQLHANDLE hPlugInInternal; /*!< internal handle of trace plugin */ SQLHANDLE (*pTraceAlloc)(); void (*pTraceFree)(); SQLRETURN (*pTraceReturn)(); RETCODE (*pTraceOpenLogFile)(); RETCODE (*pTraceCloseLogFile)(); HTRACECALL (*pTraceSQLAlloConnect)(); HTRACECALL (*pTraceSQLAllocEnv)(); HTRACECALL (*pTraceSQLAllocHandle)(); HTRACECALL (*pTraceSQLAllocHandleStd)(); HTRACECALL (*pTraceSQLAllocStmt)(); HTRACECALL (*pTraceSQLBindCol)(); HTRACECALL (*pTraceSQLBindParam)(); HTRACECALL (*pTraceSQLBindParameter)(); HTRACECALL (*pTraceSQLBrowseConnect)(); HTRACECALL (*pTraceSQLBrowseConnectw)(); HTRACECALL (*pTraceSQLBulkOperations)(); HTRACECALL (*pTraceSQLCancel)(); HTRACECALL (*pTraceSQLCloseCursor)(); HTRACECALL (*pTraceSQLColAttribute)(); HTRACECALL (*pTraceSQLColAttributes)(); HTRACECALL (*pTraceSQLColAttributesW)(); HTRACECALL (*pTraceSQLColAttributeW)(); HTRACECALL (*pTraceSQLColumnPrivileges)(); HTRACECALL (*pTraceSQLColumnPrivilegesW)(); HTRACECALL (*pTraceSQLColumns)(); HTRACECALL (*pTraceSQLColumnsW)(); HTRACECALL (*pTraceSQLConnect)(); HTRACECALL (*pTraceSQLConnectW)(); HTRACECALL (*pTraceSQLCopyDesc)(); HTRACECALL (*pTraceSQLDataSources)(); HTRACECALL (*pTraceSQLDataSourcesW)(); HTRACECALL (*pTraceSQLDescribeCol)(); HTRACECALL (*pTraceSQLDescribeColW)(); HTRACECALL (*pTraceSQLDescribeParam)(); HTRACECALL (*pTraceSQLDisconnect)(); HTRACECALL (*pTraceSQLDriverConnect)(); HTRACECALL (*pTraceSQLDriverConnectW)(); HTRACECALL (*pTraceSQLDrivers)(); HTRACECALL (*pTraceSQLDriversW)(); HTRACECALL (*pTraceSQLEndTran)(); HTRACECALL (*pTraceSQLError)(); HTRACECALL (*pTraceSQLErrorW)(); HTRACECALL (*pTraceSQLExecDirect)(); HTRACECALL (*pTraceSQLExecDirectW)(); HTRACECALL (*pTraceSQLExecute)(); HTRACECALL (*pTraceSQLExtendedFetch)(); HTRACECALL (*pTraceSQLFetch)(); HTRACECALL (*pTraceSQLFetchScroll)(); HTRACECALL (*pTraceSQLForeignKeys)(); HTRACECALL (*pTraceSQLForeignKeysW)(); HTRACECALL (*pTraceSQLFreeConnect)(); HTRACECALL (*pTraceSQLFreeEnv)(); HTRACECALL (*pTraceSQLFreeHandle)(); HTRACECALL (*pTraceSQLFreeStmt)(); HTRACECALL (*pTraceSQLGetConnectAttr)(); HTRACECALL (*pTraceSQLGetConnectAttrW)(); HTRACECALL (*pTraceSQLGetConnectOption)(); HTRACECALL (*pTraceSQLGetConnectOptionW)(); HTRACECALL (*pTraceSQLGetCursorName)(); HTRACECALL (*pTraceSQLGetCursorNameW)(); HTRACECALL (*pTraceSQLGetData)(); HTRACECALL (*pTraceSQLGetDescField)(); HTRACECALL (*pTraceSQLGetDescFieldw)(); HTRACECALL (*pTraceSQLGetDescRec)(); HTRACECALL (*pTraceSQLGetDescRecW)(); HTRACECALL (*pTraceSQLGetDiagField)(); HTRACECALL (*pTraceSQLGetDiagFieldW)(); HTRACECALL (*pTraceSQLGetDiagRec)(); HTRACECALL (*pTraceSQLGetDiagRecW)(); HTRACECALL (*pTraceSQLGetEnvAttr)(); HTRACECALL (*pTraceSQLGetFunctions)(); HTRACECALL (*pTraceSQLGetInfo)(); HTRACECALL (*pTraceSQLGetInfoW)(); HTRACECALL (*pTraceSQLGetStmtAttr)(); HTRACECALL (*pTraceSQLGetStmtAttrW)(); HTRACECALL (*pTraceSQLGetStmtOption)(); HTRACECALL (*pTraceSQLGetTypeInfo)(); HTRACECALL (*pTraceSQLGetTypeInfoW)(); HTRACECALL (*pTraceSQLMoreResults)(); HTRACECALL (*pTraceSQLNativeSql)(); HTRACECALL (*pTraceSQLNativeSqlW)(); HTRACECALL (*pTraceSQLNumParams)(); HTRACECALL (*pTraceSQLNumResultCols)(); HTRACECALL (*pTraceSQLParamData)(); HTRACECALL (*pTraceSQLParamOptions)(); HTRACECALL (*pTraceSQLPrepare)(); HTRACECALL (*pTraceSQLPrepareW)(); HTRACECALL (*pTraceSQLPrimaryKeys)(); HTRACECALL (*pTraceSQLPrimaryKeysw)(); HTRACECALL (*pTraceSQLProcedureColumns)(); HTRACECALL (*pTraceSQLProcedureColumnsw)(); HTRACECALL (*pTraceSQLProcedures)(); HTRACECALL (*pTraceSQLProceduresW)(); HTRACECALL (*pTraceSQLPutData)(); HTRACECALL (*pTraceSQLRowCount)(); HTRACECALL (*pTraceSQLSetConnectAttr)(); HTRACECALL (*pTraceSQLSetConnectAttrW)(); HTRACECALL (*pTraceSQLSetConnectoption)(); HTRACECALL (*pTraceSQLSetConnectoptionW)(); HTRACECALL (*pTraceSQLSetCursorName)(); HTRACECALL (*pTraceSQLSetCursorNameW)(); HTRACECALL (*pTraceSQLSetDescField)(); HTRACECALL (*pTraceSQLSetDescFieldW)(); HTRACECALL (*pTraceSQLSetDescRec)(); HTRACECALL (*pTraceSQLSetDescRecW)(); HTRACECALL (*pTraceSQLSetEnvAttr)(); HTRACECALL (*pTraceSQLSetParam)(); HTRACECALL (*pTraceSQLSetPos)(); HTRACECALL (*pTraceSQLSetScrollOptions)(); HTRACECALL (*pTraceSQLSetStmtAttr)(); HTRACECALL (*pTraceSQLSetStmtAttrW)(); HTRACECALL (*pTraceSQLSetStmtOption)(); HTRACECALL (*pTraceSQLSetStmtOptionW)(); HTRACECALL (*pTraceSQLSpecialColumns)(); HTRACECALL (*pTraceSQLSpecialColumnsW)(); HTRACECALL (*pTraceSQLStatistics)(); HTRACECALL (*pTraceSQLStatisticsW)(); HTRACECALL (*pTraceSQLTablePrivileges)(); HTRACECALL (*pTraceSQLTablePrivilegesW)(); HTRACECALL (*pTraceSQLTables)(); HTRACECALL (*pTraceSQLTablesW)(); HTRACECALL (*pTraceSQLTransact)(); } TRACE, *HTRACE; /*! * \brief Allocates a trace handle. * * Tracing is turned off and no trace plugin is loaded. * * \return HTRACE */ HTRACE traceAlloc(); /*! * \brief Frees trace handle. * * Compliments #traceAlloc. Will call #traceClose as needed. * * This will call #traceClose as needed. * * \param pTrace */ void traceFree( HTRACE pTrace ); /*! * \brief Opens trace plugin. * * This will open/load the trace plugin/library specified in pTrace->szFileName. The * trace output will go to pTrace->szTraceFile. pTrace->nTrace is set to * SQL_OPT_TRACE_ON but can be set to SQL_OPT_TRACE_OFF at any time to 'pause' tracing. * Set it back to SQL_OPT_TRACE_ON to resume tracing. * * \param pTrace * \param pszApplication * * \return int */ int traceOpen( HTRACE pTrace, char *pszApplication ); /*! * \brief Close trace plugin. * * This will close/unload the trace plugin/library. pTrace->nTrace is set to SQL_OPT_TRACE_OFF * but pTrace->szTraceFile and pTrace->szFileName remain unchanged. * * The #traceFree function will silently call #traceClose as needed. * * \param pTrace */ void traceClose( HTRACE pTrace ); /* this is just to shorten the following macros */ #define traceOn ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ) /* these macros are used to call trace plugin functions - they help by calling ONLY if relevant */ #define traceAllocConnect( pTrace, B, C ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLAllocConnect( pTrace->hPlugInInternal, B, C ) : NULL ); #define traceAllocEnv( pTrace, B ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLAllocEnv( pTrace->hPlugInInternal, B ) : NULL ); #define traceAllocHandle( pTrace, B, C, D ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLAllocHandle( pTrace->hPlugInInternal, B, C, D ) : NULL ); #define traceAllocStmt( pTrace, B, C ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLAllocStmt( pTrace->hPlugInInternal, B, C ) : NULL ); #define traceBindCol( pTrace, B, C, D, E, F, G ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLBindCol( pTrace->hPlugInInternal, B, C, D, E, F, G ) : NULL ); #define traceBindParam( pTrace, B, C, D, E, F, G, H, I ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLBindParam( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I ) : NULL ); #define traceBindParameter( pTrace, B, C, D, E, F, G, H, I, J, K ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLBindParameter( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J, K ) : NULL ); #define traceBrowseConnect( pTrace, B, C, D, E, F, G ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLBrowseConnect( pTrace->hPlugInInternal, B, C, D, E, F, G ) : NULL ); #define traceBrowseConnectW( pTrace, B, C, D, E, F, G ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLBrowseConnectW( pTrace->hPlugInInternal, B, C, D, E, F, G ) : NULL ); #define traceBulkOperations( pTrace, B, C ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLBulkOperations( pTrace->hPlugInInternal, B, C ) : NULL ); #define traceCancel( pTrace, B ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLCancel( pTrace->hPlugInInternal, B ) : NULL ); #define traceCloseCursor( pTrace, B ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLCloseCursor( pTrace->hPlugInInternal, B ) : NULL ); #define traceColAttribute( pTrace, B, C, D, E, F, G, H ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLColAttribute( pTrace->hPlugInInternal, B, C, D, E, F, G, H ) : NULL ); #define traceColAttributes( pTrace, B, C, D, E, F, G, H ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLColAttributes( pTrace->hPlugInInternal, B, C, D, E, F, G, H ) : NULL ); #define traceColAttributesW( pTrace, B, C, D, E, F, G, H ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLColAttributesW( pTrace->hPlugInInternal, B, C, D, E, F, G, H ) : NULL ); #define traceColAttributeW( pTrace, B, C, D, E, F, G, H ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLColAttributeW( pTrace->hPlugInInternal, B, C, D, E, F, G, H ) : NULL ); #define traceColumnPrivileges( pTrace, B, C, D, E, F, G, H, I, J ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLColumnPrivileges( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J ) : NULL ); #define traceColumnPrivilegesW( pTrace, B, C, D, E, F, G, H, I, J ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLColumnPrivilegesW( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J ) : NULL ); #define traceColumns( pTrace, B, C, D, E, F, G, H, I, J ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLColumns( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J ) : NULL ); #define traceColumnsW( pTrace, B, C, D, E, F, G, H, I, J ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLColumnsW( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J ) : NULL ); #define traceConnect( pTrace, B, C, D, E, F, G, H ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLConnect( pTrace->hPlugInInternal, B, C, D, E, F, G, H ) : NULL ); #define traceConnectW( pTrace, B, C, D, E, F, G, H ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLConnectW( pTrace->hPlugInInternal, B, C, D, E, F, G, H ) : NULL ); #define traceCopyDesc( pTrace, B, C ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLCopyDesc( pTrace->hPlugInInternal, B, C ) : NULL ); #define traceDataSources( pTrace, B, C, D, E, F, G, H, I ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLDataSources( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I ) : NULL ); #define traceDataSourcesW( pTrace, B, C, D, E, F, G, H, I ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLDataSourcesW( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I ) : NULL ); #define traceDescribeCol( pTrace, B, C, D, E, F, G, H, I, J ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLDescribeCol( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J ) : NULL ); #define traceDescribeColW( pTrace, B, C, D, E, F, G, H, I, J ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLDescribeColW( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J ) : NULL ); #define traceDescribeParam( pTrace, B, C, D, E, F, G ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLDescribeParam( pTrace->hPlugInInternal, B, C, D, E, F, G ) : NULL ); #define traceDisconnect( pTrace, B ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLDisconnect( pTrace->hPlugInInternal, B ) : NULL ); #define traceDriverConnect( pTrace, B, C, D, E, F, G, H, I ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLDriverConnect( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I ) : NULL ); #define traceDriverConnectW( pTrace, B, C, D, E, F, G, H, I ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLDriverConnectW( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I ) : NULL ); #define traceDrivers( pTrace, B, C, D, E, F, G, H, I ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLDrivers( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I ) : NULL ); #define traceDriversW( pTrace, B, C, D, E, F, G, H, I ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLDriversW( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I ) : NULL ); #define traceEndTran( pTrace, B, C, D ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLEndTran( pTrace->hPlugInInternal, B, C, D ) : NULL ); #define traceError( pTrace, B, C, D, E, F, G, H, I ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLError( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I ) : NULL ); #define traceErrorW( pTrace, B, C, D, E, F, G, H, I ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLErrorW( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I ) : NULL ); #define traceExecDirect( pTrace, B, C, D ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLExecDirect( pTrace->hPlugInInternal, B, C, D ) : NULL ); #define traceExecDirectW( pTrace, B, C, D ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLExecDirectW( pTrace->hPlugInInternal, B, C, D ) : NULL ); #define traceExecute( pTrace, B ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLExecute( pTrace->hPlugInInternal, B ) : NULL ); #define traceExtendedFetch( pTrace, B, C, D, E, F ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLExtendedFetch( pTrace->hPlugInInternal, B, C, D, E, F ) : NULL ); #define traceFetch( pTrace, B ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLFetch( pTrace->hPlugInInternal, B ) : NULL ); #define traceFetchScroll( pTrace, B, C, D ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLFetchScroll( pTrace->hPlugInInternal, B, C, D ) : NULL ); #define traceForeignKeys( pTrace, B, C, D, E, F, G, H, I, J, K, L, M, N ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLForeignKeys( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J, K, L, M, N ) : NULL ); #define traceForeignKeysW( pTrace, B, C, D, E, F, G, H, I, J, K, L, M, N ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLForeignKeysW( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J, K, L, M, N ) : NULL ); #define traceFreeConnect( pTrace, B ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLFreeConnect( pTrace->hPlugInInternal, B ) : NULL ); #define traceFreeEnv( pTrace, B ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLFreeEnv( pTrace->hPlugInInternal, B ) : NULL ); #define traceFreeHandle( pTrace, B, C ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLFreeHandle( pTrace->hPlugInInternal, B, C ) : NULL ); #define traceFreeStmt( pTrace, B, C ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLFreeStmt( pTrace->hPlugInInternal, B, C ) : NULL ); #define traceGetConnectAttr( pTrace, B, C, D, E, F ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetConnectAttr( pTrace->hPlugInInternal, B, C, D, E, F ) : NULL ); #define traceGetCursorName( pTrace, B, C, D, E ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetCursorName( pTrace->hPlugInInternal, B, C, D, E ) : NULL ); #define traceGetData( pTrace, B, C, D, E, F, G ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetData( pTrace->hPlugInInternal, B, C, D, E, F, G ) : NULL ); #define traceGetDescField( pTrace, B, C, D, E, F, G ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetDescField( pTrace->hPlugInInternal, B, C, D, E, F, G ) : NULL ); #define traceGetDescRec( pTrace, B, C, D, E, F, G, H, I, J, K, L ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetDescRec( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J, K, L ) : NULL ); #define traceGetDiagField( pTrace, B, C, D, E, F, G, H ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetDiagField( pTrace->hPlugInInternal, B, C, D, E, F, G, H ) : NULL ); #define traceGetDiagRec( pTrace, B, C, D, E, F, G, H, I ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetDiagRec( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I ) : NULL ); #define traceGetEnvAttr( pTrace, B, C, D, E, F ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetEnvAttr( pTrace->hPlugInInternal, B, C, D, E, F ) : NULL ); #define traceGetFunctions( pTrace, B, C, D ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetFunctions( pTrace->hPlugInInternal, B, C, D ) : NULL ); #define traceGetInfo( pTrace, B, C, D, E, F ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetInfo( pTrace->hPlugInInternal, B, C, D, E, F ) : NULL ); #define traceGetStmtAttr( pTrace, B, C, D, E, F ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetStmtAttr( pTrace->hPlugInInternal, B, C, D, E, F ) : NULL ); #define traceGetTypeInfo( pTrace, B, C ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLGetTypeInfo( pTrace->hPlugInInternal, B, C ) : NULL ); #define traceMoreResults( pTrace, B ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLMoreResults( pTrace->hPlugInInternal, B ) : NULL ); #define traceNativeSql( pTrace, B, C, D, E, F, G ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLNativeSql( pTrace->hPlugInInternal, B, C, D, E, F, G ) : NULL ); #define traceNumParams( pTrace, B, C ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLNumParams( pTrace->hPlugInInternal, B, C ) : NULL ); #define traceNumResultCols( pTrace, B, C ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLNumResultCols( pTrace->hPlugInInternal, B, C ) : NULL ); #define traceNumParamData( pTrace, B, C ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLParamData( pTrace->hPlugInInternal, B, C ) : NULL ); #define traceParamOptions( pTrace, B, C, D ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLParamOptions( pTrace->hPlugInInternal, B, C, D ) : NULL ); #define tracePrepare( pTrace, B, C, D ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLPrepare( pTrace->hPlugInInternal, B, C, D ) : NULL ); #define tracePrimaryKeys( pTrace, B, C, D, E, F, G, H ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLPrimaryKeys( pTrace->hPlugInInternal, B, C, D, E, F, G, H ) : NULL ); #define traceProcedureColumns( pTrace, B, C, D, E, F, G, H, I, J ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLProcedureColumns( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J ) : NULL ); #define traceProcedures( pTrace, B, C, D, E, F, G, H ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLProcedures( pTrace->hPlugInInternal, B, C, D, E, F, G, H ) : NULL ); #define tracePutData( pTrace, B, C, D ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLPutData( pTrace->hPlugInInternal, B, C, D ) : NULL ); #define traceRowCount( pTrace, B, C ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLRowCount( pTrace->hPlugInInternal, B, C ) : NULL ); #define traceSetConnectAttr( pTrace, B, C, D, E ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLSetConnectAttr( pTrace->hPlugInInternal, B, C, D, E ) : NULL ); #define traceSetCursorName( pTrace, B, C, D ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLSetCursorName( pTrace->hPlugInInternal, B, C, D ) : NULL ); #define traceSetDescField( pTrace, B, C, D, E, F ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLSetDescField( pTrace->hPlugInInternal, B, C, D, E, F ) : NULL ); #define traceSetDescRec( pTrace, B, C, D, E, F, G, H, I, J, K ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLSetDescRec( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J, K ) : NULL ); #define traceSetEnvAttr( pTrace, B, C, D, E ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLSetEnvAttr( pTrace->hPlugInInternal, B, C, D, E ) : NULL ); #define traceSetPos( pTrace, B, C, D, E ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLSetPos( pTrace->hPlugInInternal, B, C, D, E ) : NULL ); #define traceSetScrollOptions( pTrace, B, C, D, E ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLSetScrollOptions( pTrace->hPlugInInternal, B, C, D, E ) : NULL ); #define traceSetStmtAttr( pTrace, B, C, D, E ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLSetStmtAttr( pTrace->hPlugInInternal, B, C, D, E ) : NULL ); #define traceSpecialColumns( pTrace, B, C, D, E, F, G, H, I, J, K ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLSpecialColumns( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J, K ) : NULL ); #define traceStatistics( pTrace, B, C, D, E, F, G, H, I, J ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLStatistics( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J ) : NULL ); #define traceTablePrivileges( pTrace, B, C, D, E, F, G, H ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLTablePrivileges( pTrace->hPlugInInternal, B, C, D, E, F, G, H ) : NULL ); #define traceTables( pTrace, B, C, D, E, F, G, H, I, J ) ( pTrace->hPlugIn && pTrace->nTrace == SQL_OPT_TRACE_ON ? pTrace->pTraceSQLTables( pTrace->hPlugInInternal, B, C, D, E, F, G, H, I, J ) : NULL ); #define traceReturn( pTrace, pCall, nReturn ) ( pCall ? pTrace->pTraceReturn( pCall, nReturn ) : nReturn ); #endif unixODBC-2.2.14-p2/include/odbctrac.h0100644000076400007640000000646710737235467015605 0ustar nicknick/*! * \file * * \author Peter Harvey www.peterharvey.org * \author \sa AUTHORS file * \version 1 * \date 2007 * \license Copyright unixODBC Project 2007-2008, LGPL */ /*! * \mainpage ODBC Trace PlugIn * * \section intro_sec Introduction * * This library provides a Driver with a cross-platform (including MS Windows) means of producing trace output. * This may also be used by Driver Managers. This is compat. with MS approach but not the same. * * This concept is based upon the MS odbctrac method of producing ODBC trace output. The main principle of this * is that the trace library can be swapped out with a custom trace library allowing the trace output to be * tailored to an organizations needs. It also allows trace code to be shared among Drivers and even the * Driver Manager. * * This library differs from the MS implementation in some significant ways. * * - all TraceSQL* functions return SQLPOINTER for call context... not SQLRETURN (this improves perf.) * - TraceReturn accepts an SQLPOINTER for call context... not SQLRETURN (this improves perf.) * - all functions accept SQLPOINTER as first arg - a trace handle (this can reduce concurrency issues) * * A notable weakness over MS odbctrac is the fact that we work with a HTRACE and that a Driver will want to * maintain this within environment and connection handles. This means that we can not produce trace output * for case when the environment/connection (whichever is relevant for the call) handle is invalid. This weakness * is offset by our ability to reduce conccurency issues and provide more options with regard to the granularity * of the tracing (environment/driver scope or connection/dsn scope for example). The driver can, at the developers * option, make a global HTRACE and thereby allow trace output even when the ODBC handles are invalid - but * this is not recommended. * * If an application is getting back an SQL_INVALID_HANDLE and no trace... then we can pretty much assume that * the application is providing an invalid handle :) * * unixODBC provides a cross-platform (including MS platforms) helper library called 'trace'. This is the * recommended method to use tracing. The text file driver (odbctxt) included with unixODBC demonstrates * how to use the 'trace' helper library. * * Why create a custom trace plugin? Here are a few possible reasons; * * - produce trace output showing a hierarchy (tree view) of calls * - allow config to limit or filter trace output * - allow trace output to be provided to some sort of UI like an IDE via shared mem or other * - allow trace output to be provided to remote machine via RPC or whatever * - produce trace output in XML * - produce trace output in a manner which can allow the calls to be played back (ie to reproduce bug * in a closed source app) */ #ifndef ODBCTRAC_H #define ODBCTRAC_H #include #include #include #endif unixODBC-2.2.14-p2/doc/0040755000076400007640000000000011150523346012745 5ustar nicknickunixODBC-2.2.14-p2/doc/Makefile.am0100644000076400007640000000021007706745273015010 0ustar nicknickSUBDIRS = \ AdministratorManual \ ProgrammerManual \ UserManual \ lst EXTRA_DIST = \ index.html \ smallbook.gif \ unixODBC.gif unixODBC-2.2.14-p2/doc/Makefile.in0100644000076400007640000003645511111035245015015 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = \ AdministratorManual \ ProgrammerManual \ UserManual \ lst EXTRA_DIST = \ index.html \ smallbook.gif \ unixODBC.gif all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # 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): @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; \ (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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @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; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ 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) 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-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: 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: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # 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: unixODBC-2.2.14-p2/doc/index.html0100644000076400007640000002052110612770266014746 0ustar nicknick unixODBC

unixODBC is...

News


unixODBC is an implementation of the ODBC standard which is;
  • open source
  • licensed under LGPL/GPL
  • community developed and community supported
  • proven with over a decade of active use/development

March 15th 2007
New look for unixodbc.org
The old web site was serving the project fine but it seemed like it was about time to make it all 'fresh'. We hope you find it more pleasing to use.
October 13th 2006
2.2.12 Released
More...

Key features...

Architecture


Software Development Kit (SDK) - Develop ODBC applications and drivers using the C language and the unixODBC SDK.

Driver Manager (DM)  - The unixODBC DM allows the end-User to switch data sources without recompiling/linking application source code. The application does not have to be linked to a specific vendors product.

Tools - unixODBC includes CrossPlatform command-line and GUI tools to make working with ODBC easy.

Applications typically link with the unixODBC Driver Manager (DM) which then uses the appropriate Driver to communicate with the data source. The DM understands ODBC but relies on the Driver to understand specifics of the data source.

The Driver is typically provided by the data source Vendor. The Driver understands ODBC and the specifics of the data source.


CrossPlatform

Applications built using unixODBC are compatible with the Microsoft implementation of ODBC. unixODBC is provided with all majour Linux distributions. unixODBC has been ported to all majour UNIX and UNIX-like platforms;
- Linux, Solaris, SGI, etc
- VMS, OS/2, etc
CrossDatabase

unixODBC supports drivers from all majour database vendors including;
- Oracle
- DB2
- Interbase
- Mimer
- MySQL
- others
License

unixODBC was developed by the open source community and is provided under the LGPL and GPL licenses. Commercial applications can be developed using unixODBC without paying for a license or royalty. Free support is provided by the community. Commercial support can be purchased from others such as Easysoft.
More... More... More...

unixODBC-2.2.14-p2/doc/smallbook.gif0100644000076400007640000000021711055554411015415 0ustar nicknickGIF89a€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿÿÿ!þMade with GIMP!ù ,B8ºÀá^\3èzóÞ€¥xˆQ%h‘) unixODBC - Administrator Manual unixODBC

ADMINISTRATOR MANUAL

Introduction

Welcome to the unixODBC Administrator Manual. This manual has been created to help system administrators install and manage the ODBC sub-system.

Getting Started

At this point you know what ODBC is and what it can offer the Users of your system(s) - now you want to get it on your system(s).

Platforms

unixODBC implements ODBC on the following platforms;

  • Linux
  • Mac OSX
  • VMS
  • and various flavours of UNIX
This manual covers all platforms and will give special indication of differences for any particular platform.

Do You Have It?
 
It is possible that your system already has unixODBC installed. The best way to check for this is to drop to a terminal and execute 'odbcinst --version'.
 
[root@p12 qt]# odbcinst --version
unixODBC 2.1.1
[root@p12 qt]#

Downloading

You can get the source from Source Forge.

You can get binary distributions from various places. One place to look is with the vendor of your operating system. You can also go to Source Forge and take a look at the Home Page to see the availibility and location of binary distributions.

Whether you choose a binary distribution or source code depends largely upon your site policy and which operating system you are working with. I recommend the following;

  • Mac OSX - use a binary distribution
  • Others - use a source distribution (tar-ball NOT CVS)


Installing From Source

There are two options when installing from source. You can install from a source distribution (a gzipped tar-ball) or from CVS. In either case you will find README files in the main directory which should help you build and install unixODBC.

The unixODBC build process uses the GNU auto-tools. This will be a concern to you if you choose to build from CVS because you must start the build process with 'make -f Makefile.cvs' - this, in turn, uses the GNU auto-tools (i.e. automake, autoconf) to build a 'configure' script. Unfortunately; the GNU auto-tools can be very version sensitive. See the README file(s) for more on this if you plan to build from CVS source.
 
[root@p12 unixODBC]# make -f Makefile.cvs 

You do not have to 'make -f Makefile.cvs' when using a source distribution. Regardless of whether you choose to use CVS or a source distribution you will want to execute the 'configure' script with options appropriate for your needs.
 
[root@p12 unixODBC]# ./configure --help

The 'configure' script will check your system for features of interest and build some make files as well as create some include file(s) which will ensure that unixODBC will build without errors and only with features supported by your operating system.

At this point it is important to think about whether or not GUI tools are important to you (and your Users). The 'configure' script will try to detect support for the GUI applications in unixODBC and will build them if such support exists. unixODBC includes GUI tools based upon the Qt class library and GTK. The Qt based tools will be built if libqt*so can be found. Linux systems will probably have this. You can get this from Troll Tech.

Now you are ready to build the sources. Do this with the usual build sequence of commands.
 
[root@p12 unixODBC]# make
[root@p12 unixODBC]# make install

Mac OSX: The Apple folks seem to be grappling with their support for the GNU auto-tools at the time of this writing. I recommend installing from a binary distribution of unixODBC. If you must install from source, and you are having problems with the GNU auto-tools, then you may want to try the qmake build. The qmake build process is not well documented at this time. People familiar with qmake should be able to build unixODBC with the included qmake project files.

Installing From Binary

RPM

Various RPMs exist for unixODBC. The best idea is to use any RPM files you can from your O/S vendor. Typically RPM distributions break unixODBC into more than one RPM distribution such as; core, and GUI.

Mac OSX Disk Images

A binary distribution for OSX has recently become availible in the downloads section at CodeByDesign. This includes proper Mac installs. The install should be done in the following order;

  1. Qt Runtime
  2. unixODBC
  3. drivers in any order
Others

Proper install packages are also avalible for other platforms such as the Debian package format for Debian Linux. Check with the O/S vendor.

Where Are Installed Files

The location for files vary somewhat depending upon how you installed unixODBC (source or binary) and which platform you installed on. Furthermore; the location can be changed during a source install by './configure --prefix='.

Typically;

  • library files will go in /usr/lib or /usr/local/lib
  • binaries will go in /usr/bin or /usr/local/bin
  • system config files will go in /etc or /usr/local/etc
The system config files are;
  • odbcinst.ini - list of registered drivers
  • odbc.ini - system data source names
The location of the system config files can be changed by setting the ODBCSYSINI environment variable at run-time. The system config files can be edited using a simple text editor but it is recommended that you use the ODBCConfig GUI tool or the odcinst command-line tool because they will validate the reading and writing of these files while ensuring that the current location is used.

Mac OSX: The OSX binary install will use; /usr/lib, /usr/bin, /Applications/Utilities and /etc.

Post Install

You now have an ODBC sub-system installed on your system(s). What is the system administrators role from here? The system administrator is the only person who can install and register ODBC drivers and create/edit/delete system Data Source Names (DSN).

Drivers

Drivers should be installed and configured based upon the driver vendors instructions. Many drivers do not include a full install process - lacking the driver registration step. These drivers can be registered using the ODBCConfig GUI tool or the odbcinst command-line tool.

System DSN

These can be created using the ODBCConfig GUI tool or the odbcinst command-line tool. ODBCConfig is the prefered method but not all drivers have a User Interface (U.I.) part.

Mac OSX: In some cases the ODBCConfig icon will not open. In such a case you should drop to a terminal window and use the open command.
 
# open /Applications/Utilities/ODBCConfig.app

Summary

unixODBC implements an ODBC sub-system for a wide variety of platforms. unixODBC can be installed using; binary, source and source from CVS. Drivers can be installed using installation methods created by the driver vendor with unixODBC tools availible to fill any gaps. ODBC system information can be managed using; ODBCConfig, odbcinst, or a text editor.
 



 
  unixODBC-2.2.14-p2/doc/AdministratorManual/unixODBC.gif0100644000076400007640000000153207363332160021026 0ustar nicknickGIF89a ÂÀÀÀøøÐløÿÿÿÿÿÿÿÿÿ!ÿ NETSCAPE2.0!þMade with GIMP!ù , ¬ºÜþ†Ig¼ŠŽÍ·ÅÍÔŠ$Y}R¦±¶/LÜwµ€[«¸ Œ×óýJBËøCÅ’¹]óCF‹5ÖÎÕÀO.Ï«"îªÐ1Ê3{„…cÁJyゼ>ov[ñ{z}!vJ{ƒ[‡ˆ|fDbŽr+Œ;•‰…W”›‰žZ=¡ˆ’p`¦¨Ÿ„¬‰†u«±aŠnµ›1& gº¢¸¾ÃäÇ !ù , ­ºÌñ0´IÝ8ÆZ/ÎÐ J\ã}™¨Ždy¢B°®À¨<«u‡ç;šï÷yy”tM”˘®ÙR@‘¦ÓAì²Áê5'–Ëq‘3µÔöñ-}Ñ/˜÷‰þ.«&siX€_f‚Vc`BiP^••Y€”7–—2…š” ¦¦I§«¨{i¬°ž…V±¬®&µ­v_¹¡»‰¹š¿‰¥§Ã’oÈÌ !ù , ­ºÜÑ0JÞ¼² Q+ÆÝ&nÝGUD0®¤°ÊÎÞÀé¬s®ƒ§²ÝªFùÅ‚BQ€2“â(Cêz·iÇÚY²ÚïBsU€Ë±×<ÚÖç_šoÏÇÛ-‡iÏä€%q8[‰‚\m…ˆŠ€ƒ)‘‹lv5˜.„…’—ž’xv¥˜œ¡)©‘ F¤®D‡²´¥¶–[®£¾»À¹£w&y%&ËÌ !ù , µÈI«½xºïYöDiš^X‘ä颛*µo]Æagï~é¼â ò†3 ±†—'20 ¹F×€€µª>Qœ‘` Ò ÎèOoå»ËN´¼êœjÝoóüÜœáÿ1T{}ux ‚s„~†8‰Š"†dzƒ‘’Ž{|p…—D™^p’[] š£¤¥Ÿ§^ªy¦ ©ªMƒw´¶Š¯„§¸‹¿™Á‡‹IŗȬ¡Æœ2#mdÐ2l#Ö;unixODBC-2.2.14-p2/doc/AdministratorManual/odbcinst.html0100644000076400007640000002267607363332160021433 0ustar nicknick unixODBC without the GUI

unixODBC without the GUI

Or
everything you wanted to know about odbcinst but were afraid to ask

Purpose

A lot of people are using unixODBC but for a number of reasons are not building the GUI configuration and testing tools (ODBCConfig and DataManager). This document is aimed at these people and hopes to explain what you need to do and when to do it.

What's a ini file ?

ODBC first appeared within Windows 3.0. At this time Windows used .ini files to contain configuration information. These are text files containing the following layout
[section1]
entry1 = value
entry2 = value

[section2]
entry1 = value
entry2 = value
...
With the advent of Windows NT these ini files have been replaced by the registry, but the API to access them in ODBC has remained the same. Windows has two function in odbcinst.dll that allow applications and drivers to query and modify these files, SQLGetPrivateProfileString and SQLPutPrivateProfileString.

As part of unixODBC's aim of reproducing the ODBC environment on non Windows platform's the ini files and libodbcinst provide the same format and functionality.

System versus User

ODBC distingushes between two types of ini files. System ini files are designed to be accessable but not modifable by any user, and user files are provate to a particular user, and may be modified by that user.

The system files are odbcinst.ini and odbc.ini (note no leading dot), and the user file is ~/.odbc.ini in each user's home directory (note leading dot).

The system file odbcinst.ini contains information about ODBC drivers available to all users, and the odbc.ini file contains information about DSN's available to all users. These "System DSN's" are useful for application such as web servers that may not be running as a real user and so will not have a home directory to contain a .odbc.ini file.

A good example of this is Apache and PHP with ODBC support. When the http server is first started it calls SQLAllocEnv as root. it then at a later time changes to the specified user (in my case nobody) and calls SQLConnect. If the DSN's was not a system DSN then this fails.

FILEDSN's

ODBC 3 also has a third sort of DSN, a file DSN. These store the connection information in a file that may be accessable to anyone. unixODBC does not at this time support FILEDSN's but it will when I get around to it. They are useful things but of less use to UNIX's than NT. Because of the MS view that everyone should have Windows on there desk, each workstation will have it's own registry with it's own set of system and user DSN's that can not be used by other workstations. File DSN's are a fix to allow the information to be stored in a central server that is accessable to all the workstations.

Why not vi ?

All the configuration files needed by unixODBC are plain text files, so there is no reason that you can not use your favorite text editor to setup the files.

However since beta 1.6 the location of the system files odbcinst.ini and odbc.ini are determined by the configure script. The default location is /usr/local/etc, and if a prefix is specified the location is {prefix}/etc. The location of the etc path can be broken out of the normal prefix tree by specifing --sysconfdir=DIR, so the following will expect the system files to be in the same location as pre 1.6 builds.

./configure --sysconfdir=/etc
The upshot of all this is that if you use odbcinst to configure the files you can be sure that the same path to the files will be used as are used by the driver manager, so the modifications will take effect.

What goes into them ?

Ok now we know a bit of the history of ini files and ODBC so now we need to get to the bit that is actually of use. What you put in them.

odbcinst.ini

This contains a section heading that provides a name for the driver, so for the example below PostgreSQL to indicate a Postgres driver. The following lines contain a description and then the important bits. The Driver and Setup paths point to the ODBC driver and setup libs. The setup lib is used when you click on Add in ODBCConfig to add a new DSN, but as this document is about not using the GUI tools, this is not that important for us. Far more important is the Driver entry (vital in fact) This is the library that the driver manager will dynamicaly load when SQLConnect or SQLDriverConnect is called for that DSN. If this points to the wrong place the DSN will not work. If the dlopen() fails the DSN will not work. The fileusage entry is added by the odbcinst program, so if you are using a text editor, you will need to add it yourself.
[PostgreSQL]
Description     = PostgreSQL driver for Linux & Win32
Driver          = /usr/local/lib/libodbcpsql.so
Setup           = /usr/local/lib/libodbcpsqlS.so
FileUsage       = 1

templates

odbcinst expects to be supplied with a template file. If you are adding a driver for the above entry the template file would contain the following
[PostgreSQL]
Description     = PostgreSQL driver for Linux & Win32
Driver          = /usr/local/lib/libodbcpsql.so
Setup           = /usr/local/lib/libodbcpsqlS.so
and you would invoke odbcinst with the following arguments, assuming that you have created a file template_file with the above entries in.
odbcinst -i -d -f template_file
The args to odbcinst are as follows

-i install
-d driver
-f name of template file

Threads

Since 1.6 if the driver manager was built with thread support you may add another entry to each driver entry. For example
[PostgreSQL]
Description     = PostgreSQL driver for Linux & Win32
Driver          = /usr/local/lib/libodbcpsql.so
Setup           = /usr/local/lib/libodbcpsqlS.so
Threading       = 2
This entry alters the default thread serialization level. More details can be found in the file DriverManager/__handles.c in the source tree.

[.]odbc.ini

The contents of the odbc.ini files are a bit more complicated, but they follow just the same format as the odbcinst.ini entries. These are complicated by each driver requiring different entries. The entries for all the drivers supplied with the distribution are included bellow for reference. The entries may be added in the same way using odbcinst, or a text editor. A sample entry to match the above driver could be
[PostgreSQL]
Description         = Test to Postgres
Driver              = PostgreSQL
Trace               = Yes
TraceFile           = sql.log
Database            = nick
Servername          = localhost
UserName            =
Password            =
Port                = 5432
Protocol            = 6.4
ReadOnly            = No
RowVersioning       = No
ShowSystemTables    = No
ShowOidColumn       = No
FakeOidIndex        = No
ConnSettings        =
And this may be written to a template file, and inserted in the ini file for the current user by
odbcinst -i -s -f template_file
The individual entries of course may vary.

The Driver line is used to match the [section] entry in the odbcinst.ini file and the the Driver line in the odbcinst file is used to fine the path for the driver library, and this loaded and the connection is then established. It's possible to replace the driver entry with a path to the driver itself. This can be used, for example if the user can't get root access to setup anything in /etc (less important now because of the movable etc path). For example

[PostgreSQL]
Description         = Test to Postgres
Driver              = /usr/local/lib/libodbcpsql.so
Trace               = Yes
TraceFile           = sql.log
Database            = nick
Servername          = localhost
UserName            =
Password            =
Port                = 5432
Protocol            = 6.4
ReadOnly            = No
RowVersioning       = No
ShowSystemTables    = No
ShowOidColumn       = No
FakeOidIndex        = No
ConnSettings        =

Templates

The templates for the included drivers are...

Postgress

[PostgreSQL]
Description         = Test to Postgres
Driver              = PostgreSQL
Trace               = Yes
TraceFile           = sql.log
Database            = nick
Servername          = localhost
UserName            =
Password            =
Port                = 5432
Protocol            = 6.4
ReadOnly            = No
RowVersioning       = No
ShowSystemTables    = No
ShowOidColumn       = No
FakeOidIndex        = No
ConnSettings        =

Mini SQL

[Mini SQL]
Description     = MiniSQL
Driver          = MiniSQL
Trace           = No
TraceFile       =
Host            = localhost
Database        =
ConfigFile      =

MySQL

[MySQL]
Description     = MySQL
Driver          = MySQL
Trace           = No
TraceFile       =
Host            = localhost
Port            =
Socket          =
Database        =

NNTP driver

[nntp Data Source]
Description     = nntp Driver
Driver          = nntp Driver
Trace           = No
TraceFile       =
Host            = localhost
Database        =
Port            =

Sybase SQL Anywhere 5.0

Thanks Greg.
[Sybase SQL Anywhere 5.0]
Driver=Sybase SQL Anywhere 5.0
Description=Sybase SQL Anywhere 5.0 ODBC Driver
Userid=dba
Password=sql
DatabaseFile=sademo.db
Hopefully this will be of some use to someone... Nick Gorham unixODBC-2.2.14-p2/doc/AdministratorManual/php3.html0100644000076400007640000000371007363332160020464 0ustar nicknick Installing PHP with unixODBC

Installing PHP with unixODBC

This install procedure is based on apache 1.3.6 and PHP 3.0.9. The PHP4 from beta 3 will have a configure option to use unixODBC so most of the following will be redundant.

This document assumes that unixODBC has been built and installed, in this case in the default location /usr/local, and that both Apache and PHP have been untarred in the users home directory.

  1. In the Apache directory run the following command
       ./configure --prefix=/www
    
    plus any other local config you need

  2. Create a file in /usr/local/include called odbc.h containing the following three lines
       #include <sql.h>
       #include <sqlext.h>
       #include <odbcinst.h>
    
    replacing /www with your desired apache install path

  3. Move to the PHP directory Define the following environment variables
       CFLAGS="-I/usr/local/include"
       LDFLAGS=
       CUSTOM_ODBC_LIBS="-L/usr/local/lib -lodbc"
    
    remember to export these variables
       export CFLAGS LDFLAGS CUSTOM_ODBC_LIBS 
    

  4. Configure PHP with
       ./configure --with-apache=../apache_1.3.6 --with-custom-odbc=/usr/local  --enable-track-vars
    
    plus any other local config you need then...
       make
       make install
    

  5. Go back to your apache directory, and do
       ./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a
       make
       make install
    

  6. Back to the PHP directory Then to quote from the PHP INSTALL
       cp php3.ini-dist /usr/local/lib/php3.ini
       You can edit /usr/local/lib/php3.ini file to set PHP options.
       Edit your httpd.conf or srm.conf file and add:
         AddType application/x-httpd-php3 .php3
    
    
    
And that should be that.

If this is of any help to someone, good, any problems let me know.

Nick Gorham unixODBC-2.2.14-p2/doc/AdministratorManual/unixODBCsetup.html0100644000076400007640000003113307363332160022306 0ustar nicknick

A neophyte's guide
to getting unixODBC and Mysql/MyODBC working


Introduction

UnixODBC is an idea whose time has come. It holds many promises for those of us who use databases in our daily work and would like to do more of that work on Linux or one of the UNIX variants. Those coming from a windows background will rapidly discover that it can be much more involved setting up a working Unix based database than they are used to. They will also discover a world of great advantages too; stability, scalability and freely available source code are values not easily dismissed.

This document is designed to help people set up and use unixODBC. My database of choice is MySQL, which I have used with great success for several years, and it is the database I will discuss setting up

ODBC is an interface by which programs and programmers can communicate with any database which has an ODBC driver. While most databases have one or more APIs in various programming languages, ODBC allows the same programming code to talk with numerous types of databases. (ODBC is not the only interface to do this, but it is very widely used and supported)

Getting Started

UnixODBC is available in source code only. This means that you download a tar file from http://www.unixODBC.org , extract it, compile it, and install it. Before you do so though you need some other things.

Prerequisets:

  1. The Qt toolkit version 2.x sources from http://www.troll.no . Make sure it is version 2 or higher !

    1. Download the Qt v2 sources.

    2. Extract the sources to somewhere, usually this is done by placing the tar file in a directory like /usr/local or /opt and using the command.
      tar zxvf qt-2.0.1.tar.gz
      to extract the files. This will create a subdirectory qt-2.0.1 . Remember that only root can normally write to /usr/local or /opt. This is an exaple, use the name of the file you have.

    3. Compile the sources. Assuming you have a relatively recent version of Linux with all the appropriate stuff (libg++, gcc or egcs etc) You issue 3 commands from the qt-2.0.1 directory.
      ./configure
      make
      make install

    4. This last command is scary since it will install the new libqt into places where any old v1.4x libqt may exist. Rest assured that the full name of the library is different and it will not overwrite your existing libqt. It should choke on rewriting the symlink to libqt.so and thus not mess up your existing Qt / KDE apps. If it does rewrite this link, you will need to set it back to its original link.

    5. For more information, see http://www.troll.no . Please don't bother the unixODBC people for instructions on setting up Qt.

  1. A Database - in this case MySQL from http://www.mysql.com

    1. Again, I strongly suggest you get the sources and compile them yourself. The process is similar if not identical to that for Qt described above. By default MySQL installs it's executable files in /usr/local/bin, it's include files (source headers) in /usr/local/include/mysql and it's libraries in /usr/local/lib/mysql. The actual database files are in /usr/local/var.

    2. Before you can use MySQL, you need to run
      /usr/local/bin/mysql_install_db
      as root to set up the system tables. To actually start the database, run
      /usr/local/bin/safe_mysqld &

    3. MySQL comes with very extensive documentation. Refer to it for questions on compiling, installing and using MySQL. This is expecially true for permissions. If the permissions aren't correct, no interface will work.

Installing unixODBC

  1. As mentioned before, get the source tar file from http://www.unixodbc.org . As root, move the tar file to /op or /usr/local or where ever you want the source to reside. Untar the file and run the following commands from the command line in the unixODBC source directories:
    ./configure
    ./make
    ./make install

  2. Assuming that you have all the libraries and tools that it needs, you should be breezing through this compile. Certainly after all that practice with Qt and MySQL this should be old hat. UnixODBC takes quite a while to compile, actually all of these packages do. Relax and enjoy it.

Installing a Driver

UnixODBC by itself isn't a whole lot of good without a driver. MySQL has an ODBC driver named MyODBC but it isn't included with the current edition of unixODBC, so you have to get it and compile it yourself. I'll be referring to version 2.50.24, the latest as of this writing. The installation is much the same as the other packages, but you need to give configure some options. It will prompt you for the path to the MySQL sources if you don't specify the path, but you also have to supply the --with-unixODBC=<your unixODBC directory here> flag. The following is from the MyODBC INSTALL file:

To make configure look for unixODBC instead of iODBC, use

--with-unixODBC=DIR

Where DIR is where unixODBC is installed.

And (as usual), if the unixODBC headers and libraries aren't located

in DIR/include and DIR/lib, use

--with-unixODBC-libs=LIBDIR --with-unixODBC-includes=INCDIR

You might want to specify a prefix other than /usr/local for installation,
I, for example keep my ODBC drivers in /usr/local/odbc/lib, so I add

--prefix=/usr/local/odbc

So here is my configure line:

./configure --with-unixodbc=/usr/local --with-mysql-sources=/usr/local/mysql

Running make and then make install puts the resulting library: libmyodbc-2.50.23.so into /usr/local/lib. WAIT A MINUTE ! Didn't I say it was version 2.50.24 ? Yes, I did. However, unless you want to go in and change the version info in the source code, it will create the library with that name. I don't consider this a big deal and so I didn't mess with it.

If you omit the --with-mysql-sources flag, configure will fail. If you omit the --with-unixodbc flag, configure will complete and MyODBC will compile. However, it will not work correctly when using it with unixODBC. The problems described below occurred when I omitted this flag:

1) If the DSN (Data Source Name) you create is also the name of a database, the driver points to that database no matter what you specify the database to be.
2) If the DSN is not the name of an existing database, it will fail, not allowing you to login to the database. The trace log file will tell you that it couldn't find a database with the name of the DSN. This is confusing if you specified a valid database name in the .odbc.ini file .

When using the --with-unixodbc flag, These problems dissappear and it works the way it should.

A note: MyODBC does not support ODBC version 3 as of version 2.50.24 . When writing programs that utilize this driver, I have had success with specifying V_OD_ODBC2 when calling SQLSetEnvAttr(...) .

Setting up unixODBC

At long last we come to actually setting up unixODBC and using it. While most of this information exists on the unixODBC web pages and user's guide, I found it difficult to find and follow, so I repeat it here in hopes that it will be made clearer.

UnixODBC consists of a lot of libraries, installed in /usr/local/lib, and a few executable files (binaries) installed into /usr/local/bin. These executable files are ODBCConfig, DataManager, and odbcinst.

In order to get unixODBC running, do these things in this order:

Do this as root...

In an xterm, type ODBCConfig . This is a GUI program and must be run in an X session. At the very least you need to set up a driver to use. The drivers will be specific to one database application, like MyODBC is specific to MySQL. In addition to this, you need to specify a setup file to use for this drive. The setup files are the /usr/local/lib/libodbc*S.so libraries where * signifies the database application, so /usr/local/lib/libodbcmyS.so is the "setup file" for MyODBC. The driver (not the setup file) is /usr/local/lib/libmyodbc-2.50.23.so.

To set up the driver, run ODBCConfig as root, go to the drivers tab and click on "New". The following are the settings I use...

Name: myodbc
Description: MySQL driver.
Driver: /usr/local/lib/libmyodbc-2.50.23.so
Setup: /usr/local/lib/libodbcmyS.so

FileUsage: 1

You should have a driver set up before setting up a DSN. After having done so, you may want to set up a system DSN. You do this by selecting the "System DSN" tab, clicking on 'New', specifying the driver to use and filling in the required information. You will want to select the driver name you just defined as the Driver in the first screen that displays, and click OK.

Doing this as root will create and edit the /usr/local/etc/odbcinst.ini (for the driver info) and /usr/local/etc/odbc.ini (for the system DSN) files. Early versions of unixODBC would put these files in /etc, and you can still use a configure option : --sysconfdir=/etc to put those files in that location.

Do this as a normal user:

The process for setting up a user DSN is identical to setting up a system DSN. You simply select the "User DSN" tab in ODBCConfig and fill out the required fields. The following is how I filled out a User DSN.

Name: mysqltest
Description: myodbc
Driver: myodbc
Trace: Yes
TraceFile: mysql.log
Host: localhost
Port: 3306
Socket:
Database: test

This will create and edit a file named ~/.odbc.ini . Since the test database comes without any tables, you may want to specify mysql as the database instead, so you can see the tables when running DataManager.

Run DataManager

Now you should be able to run DataManager and see your drivers, DSNs and tables for each DSN. See the unixODBC web site for screen shots of what it should look like.

OK, Now What ?

UnixODBC is not so much an end user program, but rather an intermediary between a program and one or more databases. There is information in the unixODBC documentation for example, about setting up StarOffice to use an ODBC connection. I am in the process of writing a program that makes use of unixODBC and numerous others are as well. It may well be that in time unixODBC will be included in numerous Linux distributions and installed by default. Until that time I hope that this document helps you get this sofware up and running.

Charles Morrison
cmorrison@info2000.net

unixODBC-2.2.14-p2/doc/ProgrammerManual/0040755000076400007640000000000011150523346016216 5ustar nicknickunixODBC-2.2.14-p2/doc/ProgrammerManual/Makefile.am0100644000076400007640000000007707363332157020264 0ustar nicknickSUBDIRS = Tutorial EXTRA_DIST = \ index.html \ unixODBC.gif unixODBC-2.2.14-p2/doc/ProgrammerManual/Makefile.in0100644000076400007640000003643111111035246020261 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = doc/ProgrammerManual DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = Tutorial EXTRA_DIST = \ index.html \ unixODBC.gif all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/ProgrammerManual/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/ProgrammerManual/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # 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): @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; \ (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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @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; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ 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) 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-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: 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: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # 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: unixODBC-2.2.14-p2/doc/ProgrammerManual/index.html0100644000076400007640000001135407410302315020207 0ustar nicknick unixODBC

PROGRAMMER MANUAL
Peter Harvey
19.DEC.01

Introduction

Welcome to the unixODBC Programmer Manual. This manual is a starting point for a programmer who is interested in developing an application which *uses* ODBC. This manual does not address Driver development or any other development which is internal to the ODBC sub-system.

Why Use ODBC?

ODBC provides a portable Application Programmers Interface (API) with which to access data. This means that your data access code will recompile without changes on all popular platforms. In practice; portability is sometimes hampered by incomplete drivers. However; the core ODBC functionality (the most used functionality) is always supported any working driver. Other advantages to developing with ODBC include;

  • most popular API of its kind
  • most mature API of its kind
  • skills more reusable/easily found
  • hundreds, if not thousands, of applications use it
  • availible on all majour platforms
  • easy to change data storage solution/vendor (ah; freedom)
  • easy to upscale data storage (developer and end-user)
  • arguably the most complete API of its kind
  • many books on the subject
  • greater support base
Languages Supported

ODBC is based upon a C API. C++ programmers will find a number of C++ class libraries for using the ODBC API. These are wrappers - using the C API internally but can provide a much nicer way to use ODBC for C++ programmers.

Any language which can call a C API should be able to use the ODBC API and most languages, such as PHP and Perl, provide an interface to work with ODBC but these are not covered in this manual.

Architecture

Client Libraries

These are client libraries which are specific to the particular database being used. These, often, provide a C API of their own which is used by Driver developers. In some cases these exist inside of the Driver itself or are staticly linked into the Driver. Any Client Libraries required by a Driver will be a part of the installation of your Driver or will simply be a requirement for the installation of your Driver. Sometimes Client Libraries must be configured before any ODBC configuration.

Driver

Driver Manager

The Driver Manager acts as a gateway to the ODBC drivers. The main advantage to having a Driver Manager is that the end-user can configure the Driver Manager to use a different Driver than the one original conceived of by the programmer.

It as virtualy identical functions declarations as a Driver which means that one *could* create an application
 



 
  unixODBC-2.2.14-p2/doc/ProgrammerManual/unixODBC.gif0100644000076400007640000000023411055554411020315 0ustar nicknickGIF89a ÂÀÀÀøøÐløÿÿÿÿÿÿÿÿÿ!ÿ NETSCAPE2.0!þMade with GIMP!ù , ¬ºÜþ†Ig¼ŠŽÍ·ÅÍÔŠ$Y}R¦±¶/LÜwµ€[«¸ Œ×óýJBËøCÅ’¹]óCF‹5ÖÎunixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/0040755000076400007640000000000011150523346020021 5ustar nicknickunixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/Makefile.am0100644000076400007640000000022507363332157022062 0ustar nicknickEXTRA_DIST = \ close.html \ conne.html \ dsn.html \ gloss.html \ index.html \ intro.html \ navi.html \ odbc.css \ query.html \ resul.html unixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/Makefile.in0100644000076400007640000002413611111035247022064 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = doc/ProgrammerManual/Tutorial DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = \ close.html \ conne.html \ dsn.html \ gloss.html \ index.html \ intro.html \ navi.html \ odbc.css \ query.html \ resul.html all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/ProgrammerManual/Tutorial/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/ProgrammerManual/Tutorial/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) 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-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .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-exec install-exec-am \ install-info install-info-am install-man 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-info-am # 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: unixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/close.html0100755000076400007640000000270407363332157022030 0ustar nicknick Closing a connection
Closing a connection

Before your program terminates you need to free all resources you have allocated. If you checked the source on the previous page, you certainly spotted SQLFreeHandle. This function must be used to free each allocated handle. It expects a parameter which states the type of the handle to be freed and the handle itself. So if you want to free an environment handle you should call (in our example program):

SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);

Before you free any handle make sure that it is no longer needed, wouldn't be funny, if you released to connection handle but forgot to close the connection ;)

And if you want to close a connection you need SQLDisconnect. This closes the connection associated with the connection handle offered as argument to SQLDisconnect. In our programm we need to call:

SQLDisconnect(V_OD_hdbc);

If you need source code, please have a look here.

unixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/conne.html0100755000076400007640000001165207363332157022027 0ustar nicknick Connecting
Connecting to a Datasource

First thing you will need is a variable of type SQLHENV. This is a handle (pointer) to an internal ODBC structure which holds all informationen about the ODBC environment. Without a handle of that kind you won't be able do to very much. To get this handle you call SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &V_OD_Env). V_OD_Erg is a variable of type SQLHENV which holds the allocated environment handle.

If you have allocated the handle you need to define which version of ODBC to use. Therefore you should call SQLSetEnvAttr(V_OD_Env, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0). The constant SQL_ATTR_ODBC_VERSION defines that the needed version of ODBC will be defined and SQL_OV_ODBC3 says that the program will need ODBC 3.0.

Next thing to do is to create a handle for the database connection which is of the type SQLHDBC. Once again you call SQLAllocHandle this time with SQL_HANDLE_DBC and the variable to the environment returned by the first call to SQLAllocHandle.

Then you may choose to modify the connection attributes, mainly the timeout for any given action on the connection. You do this by calling SQLSetConnectAttr with the connection handle, attribute and value pointer and the string length (if available).

Finally we are able to connect to the database via SQLConnect, which needs the name of the data source, the username and password as parameters. For each parameter you need to specify how long the string is or just gib SQL_NTS which says that it is a string which length has to be determined by SQLConnect

That's it, we are connected to the database. Please note, that all functions mentioned on this page return either SQL_SUCCESS, SQL_SUCCESS_WITH_INFO if all went smoothly or SQL_ERROR or SQL_INVALID_HANDLE in case of an error. We will have a look on how to get diagnostic messages a little later.

So let's have a look at the code:


  
/* odbc.c

    testing unixODBC
*/
#include <stdlib.h>
#include <stdio.h>
#include <odbc/sql.h>
#include <odbc/sqlext.h>
#include <odbc/sqltypes.h>

SQLHENV			 V_OD_Env;     // Handle ODBC environment
long			 V_OD_erg;     // result of functions
SQLHDBC			 V_OD_hdbc;    // Handle connection

char			 V_OD_stat[10]; // Status SQL
SQLINTEGER		 V_OD_err,V_OD_rowanz,V_OD_id;
SQLSMALLINT		 V_OD_mlen;
char             V_OD_msg[200],V_OD_buffer[200];


int main(int argc,char *argv[])
{
	// 1. allocate Environment handle and register version 
	V_OD_erg=SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&V_OD_Env);
	if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
	{
		printf("Error AllocHandle\n");
		exit(0);
	}
	V_OD_erg=SQLSetEnvAttr(V_OD_Env, SQL_ATTR_ODBC_VERSION, 
                               (void*)SQL_OV_ODBC3, 0); 
	if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
	{
		printf("Error SetEnv\n");
		SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
		exit(0);
	}
	// 2. allocate connection handle, set timeout
	V_OD_erg = SQLAllocHandle(SQL_HANDLE_DBC, V_OD_Env, &V_OD_hdbc); 
	if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
	{
		printf("Error AllocHDB %d\n",V_OD_erg);
		SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
		exit(0);
	}
	SQLSetConnectAttr(V_OD_hdbc, SQL_LOGIN_TIMEOUT, (SQLPOINTER *)5, 0);
	// 3. Connect to the datasource "web" 
	V_OD_erg = SQLConnect(V_OD_hdbc, (SQLCHAR*) "web", SQL_NTS,
                                     (SQLCHAR*) "christa", SQL_NTS,
                                     (SQLCHAR*) "", SQL_NTS);
	if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
	{
		printf("Error SQLConnect %d\n",V_OD_erg);
		SQLGetDiagRec(SQL_HANDLE_DBC, V_OD_hdbc,1, 
		              V_OD_stat, &V_OD_err,V_OD_msg,100,&V_OD_mlen);
		printf("%s (%d)\n",V_OD_msg,V_OD_err);
		SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
		exit(0);
	}
	printf("Connected !\n");
	/* continued on next page */
  
  
unixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/dsn.html0100644000076400007640000000513407363332157021504 0ustar nicknick Obtainign Datasources
Obtaining a Datasourcename

A simple query should be a nobrainer right now. But what if your programm runs on a system where you can't be sure which datasource names are configured?

Then you should use SQLDataSources(). After allocating a environment handle you may use this to find out about the DSN and the supplied description for the datasource.

As ODBC knows systemwide and userwide datasources, you need to give a direction which datasource types you are looking for. There you may specify either of the following values:

SQL_FETCH_FIRST Sets up SQLDataSources() to lookup the first of all available datasources (either user or systemwide).
SQL_FETCH_FIRST_USER Sets up SQLDataSources() to lookup the first of the available user datasources.
SQL_FETCH_FIRST_SYSTEM Sets up SQLDataSources() to lookup the first of the available system datasources.
SQL_FETCH_NEXT Fetches the next datasource. Depending on SQL_FETCH_FIRST_USER, SQL_FETCH_FIRST_SYSTEM or SQL_FETCH_FIRST this may only be a user datasource, only a system datasource or one of either.

So let's have a look on a small function, which will return all available datasource names. You may insert this code into the program which you built before and call it somewhere after you've obtained an environment handle.

void OD_ListDSN(void)
{
 char       l_dsn[100],l_desc[100];
 short int  l_len1,l_len2,l_next;

 l_next=SQL_FETCH_FIRST;
 while( SQLDataSources(V_OD_Env,l_next,l_dsn, sizeof(l_dsn),
        &l_len1, l_desc, sizeof(l_desc), &l_len2) == SQL_SUCCESS)
     {
      printf("Server=(%s) Beschreibung=(%s)\n",l_dsn,l_desc);
      l_next=SQL_FETCH_NEXT;
     }
}
unixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/gloss.html0100755000076400007640000004722207363332157022056 0ustar nicknick Glossary
Index / Glossary
A B C D E F G H I J K L M
N O P Q R S T U V W X Y Z
C   Column
 

A column is another name for field in a SQL table. It has a data type (Integer, Char, Money etc) and a name by which it is addressed.

You specify the name of a column in a query (either DELETE, UPDATE, SELECT or INSERT)

D   data source
  A data source defines all informationen needed by ODBC to connect to a database. This includes the name of the driver to use (Postgres, mySQL etc.), the name of the user, his password, the server name on which the database resides and of course the name of the database. There are a lot more options available.
  Data Types
 

The following table show some ODBC data types and how the relate to standard C data types:

Type identifier ODBC typedef C typedef
SQL_C_CHAR SQLCHAR * unsigned char *
SQL_C_SSHORT SQLSMALLINT short int
SQL_C_USHORT SQLUSMALLINT unsigned short int
SQL_C_SLONG SQLINTEGER long int
SQL_C_FLOAT SQLREAL float
SQL_C_DOUBLE SQLDOUBLE, SQLFLOAT double
SQL_C_BINARY SQLCHAR * unsigned char
SQL_C_TYPE_DATE SQL_DATE_STRUCT struct
tagDATE_STRUCT {
SQLSMALLINT year;
SQLUSMALLINT month;
SQLUSMALLINT day;
} DATE_STRUCT;
SQL_C_TYPE_TIME SQL_TIME_STRUCT struct
tagTIME_STRUCT {
SQLUSMALLINT hour;
SQLUSMALLINT minute;
SQLUSMALLINT second;
} TIME_STRUCT;

You will need the type identifier in calls to SQLBindCol.

 
O   odbc.ini
  /etc/odbc.ini is the configuration file for system data sources. It contains information which will be needed when connecting to a database. It is modified by a graphical utility ODBCConfig.
R   Row
  A row is a set of columns in a query. For example in our table there are two users. Each user makes up a row in the table or in the result of our query.
S   SQLAllocHandle
  allocates needed handles.
SQLRETURN 
SQLAllocHandle(SQLSMALLINT  HandleType,     
               SQLHANDLE    InputHandle, 
               SQLHANDLE   *OutputHandlePtr); 

	  

Arguments

HandleType

Defines the type of handle to be allocated by SQLAllocHandle. There are four possible values:

SQL_HANDLE_ENV
SQL_HANDLE_DBC
SQL_HANDLE_STMT
SQL_HANDLE_DESC
InputHandle
This is the input handle in whose context the new handle will be allocated. If HandleType is SQL_HANDLE_ENV, this is SQL_NULL_HANDLE. For a handle of type SQL_HANDLE_DBC, this has to be an environment handle, and if it is SQL_HANDLE_STMT or SQL_HANDLE_DESC, it must be a connection handle.
OutputHandlePtr
Pointer to a buffer in which to return the allocated handle.

Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_INVALID_HANDLE, or SQL_ERROR.
  SQLBindCol
  binds a variable to a column in the result.
SQLRETURN 
SQLBindCol(SQLHSTMT      StatementHandle, 
           SQLUSMALLINT  ColumnNumber, 
           SQLSMALLINT   TargetType,  
           SQLPOINTER    TargetValuePtr, 
           SQLINTEGER    BufferLength, 
           SQLINTEGER   *StrLen_or_IndPtr); 

Arguments

StatementHandle
StatementHandle must have been allocated by SQLAllocHandle and will hold all information and the result set of the statement.
ColumnNumber
Number of the column in the result set. Starts with 1.
TargetType
Type identifier of the data type
TargetValuePtr
The pointer to the variable in which the data will be stored.
BufferLength
The size of the buffer TargetValuePtr points at in bytes.
StrLen_or_IndPtr
When data is fetched, returns either
  • The length of the data available to return
  • SQL_NO_TOTAL
  • SQL_NULL_DATA

Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR or SQL_INVALID_HANDLE.
  SQLConnect
  connects to a datasource
SQLRETURN SQLConnect(SQLHDBC     ConnectionHandle, 
                     SQLCHAR    *ServerName, 
                     SQLSMALLINT NameLength1, 
                     SQLCHAR    *UserName, 
                     SQLSMALLINT NameLength2, 
                     SQLCHAR    *Authentication, 
                     SQLSMALLINT NameLength3); 

Arguments

ConnectionHandle
ConnectionHandle must have been allocated by SQLAllocHandle and will hold all information about the connection.
ServerName
Name of the database server
NameLength1
The length of ServerName or SQL_NTS
UserName
The name of the user who connects to the database.
NameLength2
The length of UserName or SQL_NTS
Authentication
Password of the user
NameLength3
The length of Authentication or SQL_NTS

Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR or SQL_INVALID_HANDLE.
  SQLDataSources
  fetches avaible datasource names either user, system or both.
SQLRETURN 
SQLDataSources(SQLHENV      EnvironmentHandle, 
               SQLUSMALLINT Direction, 
               SQLCHAR     *ServerName, 
               SQLSMALLINT  BufferLength1, 
               SQLSMALLINT *NameLength1Ptr, 
               SQLCHAR     *Description, 
               SQLSMALLINT  BufferLength2, 
               SQLSMALLINT *NameLength2Ptr); 

Arguments

EnvironmentHandle
EnvironmentHandle must have been allocated by SQLAllocHandle.
Direction
Which DSN we are looking for. May be on of:
SQL_FETCH_FIRST Sets up SQLDataSources() to lookup the first of all available datasources (either user or systemwide).
SQL_FETCH_FIRST_USER Sets up SQLDataSources() to lookup the first of the available user datasources.
SQL_FETCH_FIRST_SYSTEM Sets up SQLDataSources() to lookup the first of the available system datasources.
SQL_FETCH_NEXT Fetches the next datasource. Depending on SQL_FETCH_FIRST_USER, SQL_FETCH_FIRST_SYSTEM or SQL_FETCH_FIRST this may only be a user datasource, only a system datasource or one of either.
ServerName
The name of the datasource is returned herein.
BufferLength1
Defines how many chars Servername may contain at most.
NameLength1Ptr
The pointer to the variable in which the actual length of the datasource name is stored. If NameLength1Ptr is greater than BufferLength1, then the DSN in ServerName is truncated to fit.
BufferLength
The size of the buffer TargetValuePtr points at in bytes.
Description
The description supplied with the datasource, giving more information on the datasource in human readable form.
BufferLength2
Defines how many chars Description may contain at most.
NameLength2Ptr
The pointer to the variable in which the actual length of the description is stored. If NameLength2Ptr is greater than BufferLength2, then the description in Description is truncated to fit.

Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, SQL_NO_DATA> or SQL_INVALID_HANDLE.
  SQLExecDirect
  Executes a SQL statement
SQLRETURN SQLExecDirect(SQLHSTMT    StatementHandle, 
                        SQLCHAR    *StatementText, 
                        SQLINTEGER  TextLength); 

Arguments

StatementHandle
StatementHandle must have been allocated by SQLAllocHandle and will hold all information and the result set of the statement.
StatementText
The SQL statement to be executed
TextLength
The length of StatementText or SQL_NTS

Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR or SQL_INVALID_HANDLE.
  SQLDisconnect
  disconnects the specified connection
SQLRETURN SQLDisconnect(SQLHDBC     ConnectionHandle);

	  

Arguments

ConnectionHandle
The handle of the connection to be closed.

Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_INVALID_HANDLE, or SQL_ERROR.
  SQLFetch
  Fetches the next row of the result set.
SQLRETURN SQLFetch(SQLHDBC     StatementHandle);

	  

Arguments

StatementHandle
The handle of the statement to be closed fromwhich the data should be fetched.

Returns

SQL_SUCCESS, SQL_NO_DATA, SQL_STILL_EXECUTING, SQL_SUCCESS_WITH_INFO, SQL_INVALID_HANDLE, or SQL_ERROR.


  SQLFreeHandle
  frees allocated handles.
SQLRETURN SQLFreeHandle(SQLSMALLINT  HandleType,     
                        SQLHANDLE    InputHandle);

	  

Arguments

HandleType

Defines the type of handle to be freed. There are four possible values:

SQL_HANDLE_ENV
SQL_HANDLE_DBC
SQL_HANDLE_STMT
SQL_HANDLE_DESC
InputHandle
The handle to be freed. Should match the type stated by HandleType

Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_INVALID_HANDLE, or SQL_ERROR.
  SQLNumResultCols
  returns the number of columns in the result set.
SQLRETURN SQLNumResultCols(SQLHSTMT     StatementHandle, 
                           SQLSMALLINT *ColumnCountPtr); 
	  

Arguments

StatementHandle
StatementHandle must have been allocated by SQLAllocHandle and holds all information and the result set of the statement.
ColumnCountPtr
A pointer to a variable to hold the result value.

Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_INVALID_HANDLE, or SQL_ERROR.


  SQLRowCount
  returns the number of rows affected by INSERT, UPDATE or DELETE. Many drivers (but not all) return the number of rows returned by the last executed SELECT statement too.
SQLRETURN SQLSQLRowCount(SQLHSTMT     StatementHandle, 
                         SQLSMALLINT *RowCountPtr); 
	  

Arguments

StatementHandle
StatementHandle must have been allocated by SQLAllocHandle and holds all information and the result set of the statement.
RowCountPtr
A pointer to a variable to hold the result value.

Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_INVALID_HANDLE, or SQL_ERROR.


  SQLSetConnectAttr
  modifies attributes of connections.
SQLRETURN SQLSetConnectAttr(SQLHDBC    ConnectionHandle, 
                            SQLINTEGER Attribute, 
                            SQLPOINTER ValuePtr, 
                            SQLINTEGER StringLength); 

Arguments

ConnectionHandle
ConnectionHandle must have been allocated by SQLAllocHandle and defines the connection which will be modified.
Attribute
which attribute to set
ValuePtr
Pointer to the value for Attribute. Depending on Attribute, ValuePtr will be a 32-bit integer value or a pointer to a null-terminated string.
StringLength
If ValuePtr points to a character string or a binary buffer, this argument should be the length of *ValuePtr. Otherwise, for ValuePtr of type integer StringLength is ignored.

Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR or SQL_INVALID_HANDLE.


  SQLSetEnvAttr
  sets attributes of environments.
SQLRETURN  SQLSetEnvAttr(SQLHENV    EnvironmentHandle, 
                         SQLINTEGER Attribute, 
                         SQLPOINTER ValuePtr, 
                         SQLINTEGER StringLength); 

Arguments

EnvironmentHandle
EnvironmentHandle must have been allocated by SQLAllocHandle
Attribute
which attribute to set
ValuePtr
Pointer to the value for Attribute. Depending on Attribute, ValuePtr will be a 32-bit integer value or a pointer to a null-terminated string.
StringLength
If ValuePtr points to a character string or a binary buffer, this argument should be the length of *ValuePtr. Otherwise, for ValuePtr of type integer StringLength is ignored.

Returns

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR or SQL_INVALID_HANDLE.
unixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/index.html0100755000076400007640000000042511055554411022020 0ustar nicknick Dokumenttitel unixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/intro.html0100755000076400007640000000450607363332157022060 0ustar nicknick Introduction
Introduction
Welcome to a short tutorial on ODBC programming. The goal of this tutorial is to introduce a C-Programmer to ODBC programming. During this tutorial we will code a simple program which connects to a database via ODBC and reads some data. There won't be any information on how to program ODBC Drivers or about unixODBC internals. Configuration won't be covered too. The program developed throughout this tutorial was originally coded under WinNT and later ported without any adjustments to Linux and unixODBC. This is how compatibility should work :)

The information given within this tutorial are brief at best. Please take it as a pointer where and how to start.


Requirements   I assume that you have
 
  • a system with unixODBC installed and with at least one working datasource configured.
  • the include files installed under /usr/include/odbc
  • a compiler installed and that you know how to use it ;)
Compiling   If gcc is installed type:
  gcc odbc.c -o odbc -lodbc
which will result in an executable named "odbc".
Database   Our database will have a single table:
 
tkeyuser
iduser sequence
dtname char(40)
dtmaxSize Integer

Our datasource will be named "web" and access is granted to the user "christa" with no password.
unixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/navi.html0100755000076400007640000000177707363332157021671 0ustar nicknick Navigation
ODBC Programming Tutorial
 
Introduction
Connection
Closing
Queries
Results
Obtaining DSN
Index / Glossary
unixODBC Home
unixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/odbc.css0100644000076400007640000001522107363332157021451 0ustar nicknick/* Style Sheet for odbc documentation =20 M.Rathmann */ BODY {background-color: white; color: black; font-family: Arial; font-style: normal; font-size: medium; background-attachment: fixed; } /*=20 2. Die Verweise: Standard: Text unterstrichen link: #008080=20 vlink=3D"#800000" alink=3D"#008080" */ a:link {color: #2222ff; text-decoration: none; } a:visited {color: #3333ee; text-decoration: none; } a:active {color: #4444dd; text-decoration: none; } TH {border-style: none; background-color: #dddddd; font-family: Arial; font-size: normal; color: white; vertical-align: top; text-align: center; } TD {border-style: none; background-color: white; font-family: Arial; font-size: normal; color: black; border-width: 3px; border-color: white; vertical-align: top; text-align: justify; } TD.center {border-style: none; background-color: #ddddff; text-align: center; font-family: Arial; font-size: medium; color: black; border-width: 3px; border-color: white; vertical-align: top; } TD.head {border-style: none; background-color: #ddddff; text-align: left; font-family: Arial; font-size: medium; color: black; font-weight: bold; vertical-align: top; } Th.head {border-style: none; background-color: #dddddd;=09 text-align: center; font-family: Arial; font-size: medium; color: black; font-weight: bold; vertical-align: top; } TD.big { font-family: Arial; font-size: x-large; } TD.small { font-family: Arial; font-size: x-small; } /* 5. =DCberschriften immer in Rot, Zeichensatz Arial */ H4 { color: black; font-family: Arial; font-size: small; font-weight: bold; } H5 { color: black; font-size: x-small; font-family: courier; } /* 6. Blockquote St=E4rkere Einr=FCckung=20 */ Blockquote {margin-left: 10pt; } CODE.list {margin-left: 10 pt; font-size: xx-small; } } /* 7. Listen */ UL {color: black; font-family: Arial } OL {color: black; list-style-type: decimal} LI {color: black} P {font-family: Arial; font-size: normal; } TD P {font-family: Arial; font-size: normal; } small {font-family: Arial; font-size: x-small } From - Sun Jun 6 14:11:04 1999 Return-path: Envelope-to: pharvey@interlog.com Delivery-date: Sun, 6 Jun 1999 03:55:51 -0400 Received: from plus.interlog.com ([207.34.202.21] ident=root) by mailhub4.interlog.com with esmtp (Exim 2.05 #1) id 10qXmY-0002kw-00 for pharvey@interlog.com; Sun, 6 Jun 1999 03:55:50 -0400 Received: from lilly.ping.de (qmailr@lilly.ping.de [195.37.120.2]) by plus.interlog.com (8.9.3/8.9.3) with SMTP id DAA23367 for ; Sun, 6 Jun 1999 03:55:48 -0400 (EDT) Received: (qmail 26070 invoked by alias); 6 Jun 1999 07:55:45 -0000 Received: (qmail 26063 invoked from network); 6 Jun 1999 07:55:37 -0000 Received: from suprimo-54.ping.de (HELO koala) (195.37.122.54) by lilly.ping.de with SMTP; 6 Jun 1999 07:55:37 -0000 Message-ID: <001a01beaff2$66b90320$030aa8c0@koala> From: "Markus Rathmann" To: "Peter Harvey" Subject: The newest docu, to be sure :) Date: Sun, 6 Jun 1999 09:58:43 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0017_01BEB003.29819060" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Mozilla-Status: 8001 X-Mozilla-Status2: 00000000 X-UIDL: ea3859ca9b1d73dac919ee5e69391b0b This is a multi-part message in MIME format. ------=_NextPart_000_0017_01BEB003.29819060 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi Peter, I'm sorry, but I think that you haven't got the newest version. Therefore I'm sending it to you again. It has one more page (Obtaining Datasource names) and a few display glitches (mainly Netscape) solved. Furthermore I've added a link to the unixODBC Homepage, so that you may use the complete browser window (if you like). Bye Markus ------=_NextPart_000_0017_01BEB003.29819060 Content-Type: text/css; name="ODBC.CSS" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ODBC.CSS" /* Style Sheet for odbc documentation =20 M.Rathmann */ BODY {background-color: white; color: black; font-family: Arial; font-style: normal; font-size: medium; background-attachment: fixed; } /*=20 2. Die Verweise: Standard: Text unterstrichen link: #008080=20 vlink=3D"#800000" alink=3D"#008080" */ a:link {color: #2222ff; text-decoration: none; } a:visited {color: #3333ee; text-decoration: none; } a:active {color: #4444dd; text-decoration: none; } TH {border-style: none; background-color: #dddddd; font-family: Arial; font-size: normal; color: white; vertical-align: top; text-align: center; } TD {border-style: none; background-color: white; font-family: Arial; font-size: normal; color: black; border-width: 3px; border-color: white; vertical-align: top; text-align: justify; } TD.center {border-style: none; background-color: #ddddff; text-align: center; font-family: Arial; font-size: medium; color: black; border-width: 3px; border-color: white; vertical-align: top; } TD.head {border-style: none; background-color: #ddddff; text-align: left; font-family: Arial; font-size: medium; color: black; font-weight: bold; vertical-align: top; } Th.head {border-style: none; background-color: #dddddd;=09 text-align: center; font-family: Arial; font-size: medium; color: black; font-weight: bold; vertical-align: top; } TD.big { font-family: Arial; font-size: x-large; } TD.small { font-family: Arial; font-size: x-small; } /* 5. =DCberschriften immer in Rot, Zeichensatz Arial */ H4 { color: black; font-family: Arial; font-size: small; font-weight: bold; } H5 { color: black; font-size: x-small; font-family: courier; } /* 6. Blockquote St=E4rkere Einr=FCckung=20 */ Blockquote {margin-left: 10pt; } CODE.list {margin-left: 10 pt; font-size: xx-small; } } /* 7. Listen */ UL {color: black; font-family: Arial } OL {color: black; list-style-type: decimal} LI {color: black} P {font-family: Arial; font-size: normal; } TD P {font-family: Arial; font-size: normal; } small {font-family: Arial; font-size: x-small } unixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/query.html0100755000076400007640000000702007363332157022064 0ustar nicknick executing a query
Executing a query

If you want to execute a query you will need to specify a handle (SQL_HANDLE_STMT) for a SQL-statement. In order to get one you have to allocate one with SQLAllocHandle.

Then you have to think about the SQL statement you want to execute. As I mentioned in the introduction I assume that we have a table tkeyuser which contains the following data:

iduser dtname dtmaxSize
1 Christa 10000
2 Nicole 9000

In this example, we want to execute a query which returns all the rows for the fields iduser and dtname in this table ordered by iduser. So the SQL statement would be:

SELECT iduser,dtname FROM tkeydata ORDER BY iduser

If you execute this statement you would get two rows each with two columns of data. This data has to be stored somewhere so that your programm can actually use it, so you need to define a variable for each of the columns. So you need to bind a column to variable in your program. Binding a variable automatically stores the data of the column in the variable when you retrieve a result row from the connection. It is important that your variables match the type of the column in the table within the database.

So we need to bin column #1 to a variable of type SQLINTEGER and the second column to a variable of type char. This is done by SQLBindCol. Therefore we add the variables:

SQLHSTMT V_OD_hstmt;   // Handle for a statement
SQLINTEGER V_OD_err,V_OD_id;
char V_OD_buffer[200];

Now we can bind the variables:

SQLBindCol(V_OD_hstmt,1,SQL_C_CHAR, &V_OD_buffer,200,&V_OD_err);
SQLBindCol(V_OD_hstmt,2,SQL_C_ULONG,&V_OD_id,sizeof(V_OD_id),&V_OD_err);

Yes you should check for the return code of the function call. I'm to lazy to code it here once again :(

Now we can execute the query by calling SQLExecDirect:

 V_OD_erg=SQLExecDirect(V_OD_hstmt,
             "SELECT dtname,iduser FROM tkeyuser order by iduser",SQL_NTS);
 if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
    {
     printf("Error Select %d\n",V_OD_erg);
     SQLGetDiagRec(SQL_HANDLE_DBC, V_OD_hdbc,1, V_OD_stat, &V_OD_err,
	               V_OD_msg,100,&V_OD_mlen);
     printf("%s (%d)\n",V_OD_msg,V_OD_err);
     SQLFreeHandle(SQL_HANDLE_DBC,V_OD_hdbc);
     SQLFreeHandle(SQL_HANDLE_STMT,V_OD_hstmt);
     SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
     exit(0);
    }
  
unixODBC-2.2.14-p2/doc/ProgrammerManual/Tutorial/resul.html0100755000076400007640000001545407363332157022063 0ustar nicknick Fetching Data
Fetching data from a result set

If the execution of the statement went fine you are now able to fetch the data column by column. May be you would first like to know how many columns there are in the result set (if you use a SELECT * FROM tkeyuser you wouldn't know in your program). A call to SQLNumResultCols. This function takes the statement handle and a pointer to an integer variable which will yield the number of columns after the call.

Knowing that much we can add this to our program:
// At the beginning add:
SQLSMALLINT      V_OD_colanz;    // Num of columns

// At the end add:
   V_OD_erg=SQLNumResultCols(V_OD_hstmt,&V_OD_colanz);
   if ((V_OD_erg != SQL_SUCCESS) && 
       (V_OD_erg != SQL_SUCCESS_WITH_INFO))
      {
       printf("Fehler im ResultCols %d\n",V_OD_erg);
       SQLFreeHandle(SQL_HANDLE_STMT,V_OD_hstmt);
       SQLFreeHandle(SQL_HANDLE_DBC,V_OD_hdbc);
       SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
       exit(0);
      }
   printf("Number of Columns %d\n",V_OD_colanz);

  

The next thing you need to know is how many rows have been returned by the query. A call to SQLRowCount should quench your thirst for knowledge.

The last thing to do is to fetch the data itself from the result set. You should call SQLFetch with a statement handle (which has been allocated and SQLBind has been called for all columns). SQLFetch returns SQL_NO_DATA if there is no more data in the result set.

So here is the complete source code. Real C-programmers will moan in disgust how inefficient the program is coded, but I prefer it that way (doesn't it look a little bit like PASCAL?). Take it as a starting point for your own endeavors with ODBC.

/* odbc.c

    testing unixODBC
*/
#include <stdlib.h>
#include <stdio.h>
#include <odbc/sql.h>
#include <odbc/sqlext.h>
#include <odbc/sqltypes.h>

SQLHENV			 V_OD_Env;			// Handle ODBC environment
long			 V_OD_erg;			// result of functions
SQLHDBC			 V_OD_hdbc;			// Handle connection

char			 V_OD_stat[10];		// Status SQL
SQLINTEGER		 V_OD_err,V_OD_rowanz,V_OD_id;
SQLSMALLINT		 V_OD_mlen,V_OD_colanz;
char             V_OD_msg[200],V_OD_buffer[200];


int main(int argc,char *argv[])
{
	// 1. allocate Environment handle and register version 
	V_OD_erg=SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&V_OD_Env);
	if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
	{
		printf("Error AllocHandle\n");
		exit(0);
	}
	V_OD_erg=SQLSetEnvAttr(V_OD_Env, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0); 
	if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
	{
		printf("Error SetEnv\n");
		SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
		exit(0);
	}
	// 2. allocate connection handle, set timeout
	V_OD_erg = SQLAllocHandle(SQL_HANDLE_DBC, V_OD_Env, &V_OD_hdbc); 
	if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
	{
		printf("Error AllocHDB %d\n",V_OD_erg);
		SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
		exit(0);
	}
	SQLSetConnectAttr(V_OD_hdbc, SQL_LOGIN_TIMEOUT, (SQLPOINTER *)5, 0);
	// 3. Connect to the datasource "web" 
	V_OD_erg = SQLConnect(V_OD_hdbc, (SQLCHAR*) "web", SQL_NTS,
                                     (SQLCHAR*) "christa", SQL_NTS,
                                     (SQLCHAR*) "", SQL_NTS);
	if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
	{
		printf("Error SQLConnect %d\n",V_OD_erg);
		SQLGetDiagRec(SQL_HANDLE_DBC, V_OD_hdbc,1, 
		              V_OD_stat, &V_OD_err,V_OD_msg,100,&V_OD_mlen);
		printf("%s (%d)\n",V_OD_msg,V_OD_err);
		SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
		exit(0);
	}
	printf("Connected !\n");
	V_OD_erg=SQLAllocHandle(SQL_HANDLE_STMT, V_OD_hdbc, &V_OD_hstmt);
	if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
	{
		printf("Fehler im AllocStatement %d\n",V_OD_erg);
		SQLGetDiagRec(SQL_HANDLE_DBC, V_OD_hdbc,1, V_OD_stat,&V_OD_err,V_OD_msg,100,&V_OD_mlen);
		printf("%s (%d)\n",V_OD_msg,V_OD_err);
		SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
		exit(0);
	}
    SQLBindCol(V_OD_hstmt,1,SQL_C_CHAR, &V_OD_buffer,150,&V_OD_err);
    SQLBindCol(V_OD_hstmt,2,SQL_C_ULONG,&V_OD_id,150,&V_OD_err);
	
    V_OD_erg=SQLExecDirect(V_OD_hstmt,"SELECT dtname,iduser FROM tkeyuser order by iduser",SQL_NTS);   
    if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
    {
       printf("Error in Select %d\n",V_OD_erg);
       SQLGetDiagRec(SQL_HANDLE_DBC, V_OD_hdbc,1, V_OD_stat,&V_OD_err,V_OD_msg,100,&V_OD_mlen);
       printf("%s (%d)\n",V_OD_msg,V_OD_err);
       SQLFreeHandle(SQL_HANDLE_STMT,V_OD_hstmt);
       SQLFreeHandle(SQL_HANDLE_DBC,V_OD_hdbc);
       SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
       exit(0);
    }
    V_OD_erg=SQLNumResultCols(V_OD_hstmt,&V_OD_colanz);
    if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
    {
        SQLFreeHandle(SQL_HANDLE_STMT,V_OD_hstmt);
        SQLDisconnect(V_OD_hdbc);
        SQLFreeHandle(SQL_HANDLE_DBC,V_OD_hdbc);
        SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
        exit(0);
    }
    printf("Number of Columns %d\n",V_OD_colanz);
    V_OD_erg=SQLRowCount(V_OD_hstmt,&V_OD_rowanz);
    if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
    {
      printf("Number ofRowCount %d\n",V_OD_erg);
      SQLFreeHandle(SQL_HANDLE_STMT,V_OD_hstmt);
      SQLDisconnect(V_OD_hdbc);
      SQLFreeHandle(SQL_HANDLE_DBC,V_OD_hdbc);
      SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
      exit(0);
    }
    printf("Number of Rows %d\n",V_OD_rowanz);
    V_OD_erg=SQLFetch(V_OD_hstmt);  
    while(V_OD_erg != SQL_NO_DATA)
    {
     printf("Result: %d %s\n",V_OD_id,V_OD_buffer);
     V_OD_erg=SQLFetch(V_OD_hstmt);  
    }  ;
    SQLFreeHandle(SQL_HANDLE_STMT,V_OD_hstmt);
    SQLDisconnect(V_OD_hdbc);
    SQLFreeHandle(SQL_HANDLE_DBC,V_OD_hdbc);
    SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
    return(0);
}
  
If I find some more time I will add something about diagnostics, cursor positioning updating and and and...
unixODBC-2.2.14-p2/doc/UserManual/0040755000076400007640000000000011150523346015021 5ustar nicknickunixODBC-2.2.14-p2/doc/UserManual/Makefile.am0100644000076400007640000000023207363332160017052 0ustar nicknickEXTRA_DIST = \ Figure1.gif \ Figure2.gif \ Figure3.gif \ Figure4.gif \ Figure6.gif \ My.sql \ StarOfficeDataGrid.gif \ index.html \ unixODBC.gif unixODBC-2.2.14-p2/doc/UserManual/Makefile.in0100644000076400007640000002406311111035250017055 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = doc/UserManual DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = \ Figure1.gif \ Figure2.gif \ Figure3.gif \ Figure4.gif \ Figure6.gif \ My.sql \ StarOfficeDataGrid.gif \ index.html \ unixODBC.gif all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/UserManual/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/UserManual/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) 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-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .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-exec install-exec-am \ install-info install-info-am install-man 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-info-am # 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: unixODBC-2.2.14-p2/doc/UserManual/Figure1.gif0100644000076400007640000001735707363332160017027 0ustar nicknickGIF87aú}÷ÿÿÿ2b„666LLL–mÿ™™™¨¨¨ÃÃÃÆÆÆåååÿÓÿÿÿgò€uÿrüe`ô1óÿ.ÿg‹i)‚f¯'®*?*^xZ´[¶*~øà[Rò ÿøRÔØó´­ÿ¶û*À™øª™R™ÀàªòÿÀÿªôÿÿÿ؈ÿ´ôÿ¶ÿÿ*W±*Øô´ÿ¶*0” Yôóÿÿ\c±*Ø ¨´ôX¶ÿ* 0õôYÿÿ)c±®**¨øØXY´¶*0 0YôYÿ\8óØØz´´®¶¶¯***0ø4YRóÿDø*õRÿ®*z ø®ôR¯ÿ¨™@X™ó™ÿ0(*Yôÿ®*\øRØT`´ôa„Ô@õô[à) ¥®*­,nZ €T|ôó ‹ö‚ÿ¯*غ@´[ð¶**øôRóÿø öRÿ TØöô´ÿÿ¶*ÿ@ÿðÿ2ÌÄ*´œIõJ¬ÿί**ÌÀÚªŒ¤@ôóðÿÿ*M×Ðôÿ}Àª¿Øª´¶ *OverœwJrÎi*tpeõ ÿÿex†i—sÄt*i¤Ðnôgÿ f²i\l e ô 'õ/ÿhodÐmôeÿ/pÀhªarvÿeÿyuÀnªixOnÐD—ôBÿC/,ú}þH° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç ,`@²¤É“(Sª\ɲ¥Ë—0cÊœI³¦Í›8sêÜɳ§ÏŸ@ƒ¦, ’‚£H“*]Ê´©Ó§P£JJµªÕ«X³jÝʵ«×¯`ÊKv)Ñ‘e§X˶­Û·pãÊK·®Ý»xóêÝË·¯ß¿€ L˜®Ñ´eÏFü´Ç#KžL¹²å˘3kÞ̹³çÏ C‹Mº´éÓ¨//fV1ëÆ©cËžM»¶íÛ¸së6½úµW×N$ ñîãÈ“+_μ¹s½}s¾Àƒسoý¼»÷ïàÃþ‹Ÿ=«ƒóèÓ;€êÀ@Óöf‹2}p=»ýíQ ¸Oº?©ãñ(à€&WVíé§à‚ìé·T‚ñ¡¥}gŸvRßQ*õ_d„ˆ"ŽY‰!JVâd(b–âf-"÷¢Š&^6#–Ýèb­È¢ˆ”ù˜™™ÙWm¨”’NAˆ”“Ê—”u g¡}ž§ “G}øØ‹3‚Yc˜cš¨£˜6ò˜æ‰jÞFä—m¢¦ãšž¡I"œ80çxé§eHZÅåQƒ2å$”QJˆ…ôáwåpªgÀPJiHyy£zšYfŸ•‘ §˜¤Æ)j§v¦¨êˆB¾yâ—þlvª'ª´ÊºjŸ>®xk®@¢ê©¬AªÉ)ŸœíùçŸH¢7U¡…ª¢‰öÆ(~G]¸ÔØf;i¥ÜbÚå± ì©Æ‚z븿ŠK"h¶‹â¯ÃâÊê¼óÊkë®õ¢;*¯öÞÛkžàîùo°àª{¬‘É*àm“ +Ь³6EÝQÓ*Eq ,µ ‚ØNê±Yë+o«q†kp¼¯k¯»é†;§»x¦Z/Ì£Û¦Ì1+pËÄÒÈ®°å<^²7è,U 6œ©”‹Vé¨P @mSo ²É"grÁ¥¶c¨ç†ïÉ_³©+¼é⛳Ù.ÿÜ+Î:—¼5¨X§L·ÐZþ³J?ølÑÑNXñQD-u~®€¦?›ë5Ï=‹ÝïËŸÂ|oÝånúv¾4£­²Öi‡nwæ‡ÌöèAã žÞH7üpR‡*Þ%Ó„O+µáPOÍà { ºã&Ç‹³¾›GÎùÌç¹æ«¿vç+“‹¶ç=Ç wéÖß\²êCÕžzèõýdÑÐήhíâ5q_ùîëºÌ×ìjÙ@Ê<¶ÙdŠšüûûV¯öõÊë_öTf?ì½kdŸâߎ\Å=±nY³ÚSÊW¾‰!…8PßáÀâ¾zðƒ ᑤð÷ôŽvSÒ î¦#ºð…| ¥bA‹]Ì80Ì¡w Î*þ5$ayHÄ"ñ6>ü¡S‚(¡8ñ‰PŒ¢§HÅ*Zq'Jœ ³ÈÅ.zñ‹` £ÇHƨ0±ŒhL£×ÈÆ6º1»âßHÇ:ÚñŽxä Ó’>Nd…y ¤ IÈ4‡…bqäÈH•(¥‘6y$$O"ÉI>±’–L‰o¹€D6|ô£(3‚ŸPŽr#¥<åCR©ÊV„•®„ ÅÂIO.Q$¶Ä Q€È:î²—aüe's%^Ó³Ô£„€IÌ¥³™4\ä3Ý(Ì1Vš³3æwɘZbÓ|ߌ¦6})Mk–ó›×D&k¼ $Å[A‘RJ„xÖó*gþ §ÏIÇt‚ÑŸÍ(¹ G)1Ó)öT@B±’P{6ô(!z'>qùzRe¡V‘ç;EtO‰VE å(S0ÚM~"T¤ EèV@º’Bt†.½å8£²Ð˜¶ó£ÉlŸA§Ù”‡B´¡}iMçùÒ–¦´¨8å©G‘JÓx.Õ§Aeª8JÔŽz‘¥V=jLmºÏ™ªÔ¥\KX‹IÕ‘UªÅé:w*¨Õ¡?5êS‡ W«äS¥r=kPEŠRw“¤C=«DëJ¬ V«)ý«UûªÕ±’U©K­ç^'ûWÇ.Í«==lD‹TÆFU¡ŸE)hÛÕ²õ¡¡*\E«Èµ.²U}þkl9[©ªV¶v¥èIg‹[ÚVv´ ìh›Õ©ÂV³qE,n»\µ˜´§­+g-»¸çæUº¾ílr³«×·R·º˜5kg§ÛQ骵¤¯më\%ËWñw¹~èq%»XÛjW¹Á­ípñ›ÛðFV¹æ.aûkÚ–¸·º´.oï{à£Õ¼hmmëËàòZ¸°9ý [›Z\Ú¾¹‚Íîw«;_zø¶ m/€;,ÞÕø¸Ñ­¯C- Ô‰ú¯3Þ+}Õ:᣸»@ÕqsªbÒJ¸Äí®’!ì\צÇL%ï’Ý«äæ~Ö¹0~*i¥lâWÕ­B}qE¿,ã÷æ—Çó3þ“#,Ó ÇX»„p^)Œá³xÊðe³Ä2Üv¶S´©m°kÊØÿF3ËeF0ž=嬞ø»†õi•C|á÷¦†0£<æ.ï—ÒyÆ3~!­àÿþÖÁÌ5²LÑûäò®'½2¡w\èM'™È&µ­åÿøÓM†²E‡ËQ¿žºÎnžm|}ß8z£ªnsšÉülú»«¬>аß5â.Â:£‰4,Å=CrÒÜ\$hZü ÍoÏ“Ûz¾#V¹}å¢{¤ïês©3šï`î{ÐÃ^«“µíêsë6­ž¼·¿wmïRá 8Ã~p}2â_ÄxA'npާ›ÏZLo8þÝmñÇÚQãëvø«Uîm¯tÃè¬xÉýÃrsz|“5$Êq.q(¯|$™Ì$Ѓ>“¡$F?zP’®t“Tä茥ԧNõª[ýêX¿ÈÓ“8ó®{ýë`/÷ÃNö²›ýì:=Ú×Îö¶»Ý™\»ÜçNwƒ/³îxÏ»Þu>ö½ûýï€ÿgßOøÂ>1ƒ?¼âÏx «½ñ¼äá>ùÊ[žñAlºæ7ÏùÎ{>“˜üöâË¢÷Ï8(Ûïþ™Ã)ùÇwô÷x¼d}ˆaøq x^ýWrÿ§m¯Gzõg€ÒÁ~|·€uÖ€h}â×uä7æWûwü§áô€¼„[5g!Õ‚w¦S«qk]±‚ÑöI3p†fc&¨O(ˆDV,XRø‚×m†~#Øh¬ÑmK3ƒ;¨a=èƒi±lÖ–…"X„LaÄ5^.bõföEdHh†a¦X”¥W·5†KbÍv_)vO 5}S~U€egÛ•\<ç‚]HtXi¿µYr8;þPèiüµdÓ%eÆhd‡\öˆñq‡ßôƒ{HgÜõ‡#{‚¨hž6‰Q’ˆ„X†½¦i&U‘øf¨¶f—e‰Ð„‰d‘dLæ„Yñè…‰æcŠFƒ«øeÃök©¸ˆµ8Ц&‡X¨Q$e‡°HH²(¬¸‰¯‹FHŠË†Š–Fs¤8dŠHaØXŒÚxŒU–ŒC^ÍHLÏo&dõ¶q€è‰0er¶ˆ‡õ‹šŠ”HŒ¥ŽŽFg –æxŽx}V(VÊÆ†ú8Ôˆñbsx`9ÈZ€dÞ¸_†ˆ†“V]ZýRÆŒ™Gé蘋Ÿ¸V@ˆiz´’Ø6’‰Tþ’*ØoY´ðx„8ç’xÕ’%“ƒ$“%g“’Ô%¥“™Õoȉ>ù“yÁw’Õ(‚F9II•KYH@iqBh| Ô|ñ•Èç}W™FY©O[ €Öw1lÙ–nù–p—r9—tY—vy—x™—rY–LI–Ë• YP˜†y˜ˆ™˜Š¹˜ŒÙ˜Žù˜™’9™”Y™–y™˜™™š¹™œÙ™žY˜(¨—¢9𤙗\x“Ÿ™šª¹š¬Ùš®ùš°›²I™(øvåG˜³™›º¹›¼Ù›¾ù›³Y›nw›ÀYœÆyœÈ™œÊ©šÂÙvĹœÐÒ9Ô™›ÍÉvÏYÚþ¹ÜÙÞi˜×¹vÙùäYžæyž±ùƒÚ·‚‰šèùžðŸò™g9rí9”¸9Ÿú¹ŸüYžõs§‰Ÿý9 Z ËùŸØ”–Úf}Ú ú ²‰ ívŸ\¹z¡š¡™)¡E¡ji¡¢":¢ˆÉ¡Ä¤ ¢$º¢,ú &šK(Z|-:£4ÚŸ/jK1Ê 5º£µX‹™/ºUmXYÉ‘²åµR(ªˆšµf«™[{”©6§ÄV^uš`N»­g;·*´w]©8¨vƒMF¶ÓJ·€+™ië^ó¨·¾¥´­{–¸Œ»˜ƒ‹·‹F§‡¨oq»°¸S«ˆ…ë]œ;Ž”ë·8{¹¢{˜I[‘Yz¸ùhØ(N [´£+º<[µLZ¹¯ûº&Jo¶ˆ¦îX©£Z»°k·Y¤VÙºO뻘 ¼ãwµÆ{¶±;nÊ»¼YÛ¼e³ÐK·ßþ ®cI»Õ ¸¡¹®Þû½u©½Û;·Kv;¾G[¾øª–‹¾:«¾Oɾî˼;œ ;¿f ¿Òw¿ø‹µú›¼òÛ¿Qû¿&Àœ¾õëœü{ÀFKÀ3w¾ ̲” Áï›ÀØYÁ<³¬•¼Á-ÛÁhùÁ |²"lŸ\Â!ŒÁâIÂ* ²'s)üÂ&à êÂ4L±6<¡3œÃ»ÃÚÃ>¬Ã,¯8<Ä Ä'zÄH °J £LÜÄúúÄ8ÅRL¯TœpV|ÅîšÅá¶Å\\®^LqBÆS\Ä÷ ÆfÌ­cüsF¸Æ ÛÆv÷Æp\°r,H\ÇäzÇ|WÆz,ÆþhܯjüÇÆÊÇy”Ç„\­†\«ƒœÈ¹ºÈÃêÇŽ¬È<°<ɱ ÉÊ*ɘ|¬šLNœÜÉÀúÉÙÊ¢üÈ•l¾—|Ê—Jʻʬ¼¨®L²¦Ë¥:Ë*[˶œ©¸ ³°¼Ë³šÊëKÇÀìÉ¿Ä\Ì£|Ìû«Ëʬ¨½ì±ÎüÌ{Í=;ÍÔì¦ÖŒLØœÍÁÊÌœÌÞ|Ëà\Àâ<μ\ÎüËè|¤Ûì¼ÝÜÎȪÎÏòìÎôìÁö|ÏEúÎÓËÎü¼£þâǹáH‰á(.¸%îË,Þâ©âÊtâ2þ›4žv6~ã½™ãã<Θ>®o@äŠ9ä!·ãF®ÜnÄE¾ä¤ûâÒ¬äPžžR~ÍT^寉ä/÷äZÎåJèåUæv*æPNæ fæKŽæò•åZŽ´WÎÍnþæ«Éæ¹¥æFnçI5çþtžšzîx|ÞçžùçXè‚Ι„~h†~èhçð¼èŒ®µŽþÏx䉾O•Îã—®H™~ã›þI.ãŸ~K¡Þ⣾gì ±ª¾ê¬Þê8Ñäiüª®>ë´^ë´ë‚̾ػë¼Þë¾þëÀþx—yÁ^ìÆ~ìÈžì1ì‰Ç—Îþì^ݱÐ>íÔλÕ~íØ^ãÙ¾íÜÞåÒÞíàÞŒ¥gëä^îæ~îåN´Ê¾îìÞîîþîð¾êîôNíÏ7ïõžï|yï­[Ýúþï#ÉïÖ®mþðo‰ïªÄWðßð˜ðŠ ïðy?|]8ñ*… µ“‰$¼Y±iS1b ºþe?TòUë„(pX˜„˜¶òYqñÔ—ñ0ÅñWaƒo5Ï0ïTMÈóÐhóU!òM4ñľóã’’ mV:‡No`J?ebË^@õÆf†3ÖŠ%¶MŸX€µcPïôž¥¥Ùeíèl§‹\Õ–XòV`{ÕÆWm¸‘UŠ‘`ÿnµ(dŒè2ô$¤f ©›ëeZß¹àxŠnÛ‹}hø™ø„okƒÚ¶½%ø„_ø©†„e ¶&/ùz?økëòò¨ø &Š|HôUÑ÷õ§ñWØ¢Ök¬¿ùj®ofû©®(ú{[i,h¸û¨¹{¦„›·²ûiOf²ÏUŸÊ-jlË÷FþŸúH¸&òh¸g_ü¹?ýCü–¯ºÍÿ¶YoµÏ^/W ¶‰z‹ø¢Oƒ‘«ý›ÏýF§nÏŽÂ/ý\ú¹¨ú™xgg6ú¯gA $hp`Â… >D¸áA‰)Z¬ÈPãÅ‹ '>Ôè¤G‘#–ir¤À]BÌØ’£È•1QÂÄ)³!Ë‘8ož<¹Ñ¥Nž@{É ÀÈ0HºéTª5m’|¹Ó J¬!‡^…ÀµkP/gzä(ölY¯XÉ~5 ö­Ð”tÝvÔ×íͼaõŽÕ‘çTÁ`iþüÛ²kÕžJ™:… Ò1cÊTÃú•(sÛ­ý²þ<ø9¥fÍ‹/ïÜ 1õiÄž]ã= ڳ⹃vÆÍ:¤nÛmÅúÜZoÆÙ†ƒ÷mzõf̺Î65ê¢%WCŸ^¹áä‡MŸFÕ^üxòåÍŸ·Š^ýzöÐÛ¿‡ôv|úæ¹7ôùáýúýýÿ'O1|o>¤Ì@ˆ¿òo &¤°B /İB7d7?¬JA9qÄÿTBɤR C 8€g”ñ€ MÄ1Gwä±GÉCQÅýXtqB”1I d²I'Ÿ„2Êò‚„,Â]D2K%-”²K/¿3L©ünÅ…°LRK€ËûóðMäº<þ+¼Ú´+qNËð< ¾<ÇÑÀùòü=2õÛŽÈ ÓdTK65”3¾BÍÌᬋ@Bù䬽I9eoSµ2CE•MU!Í«8¾Ž³mÐå>j.¹Þ¸,ÎÎ&ª54YI£.ØÌPËT(Њ%eËŒ6Œ–óŠ5]™…5XjcEÎÙÜz­èÒjoU×Þ¬;.Wn± w=RÍ”ðÂSÕLRÕU),VÜ>k -¸Bû _}éòWº|×:ÌÙ´»ŠXÀÎÍ¢¹lØ®˜ê|¸5Šw¬ÕƒoÍ5b‚Ç-K¦O§ZwÈ3ÝEI.cÓFz}²×·WïMøã…µÕ8Ó;u.–¸á*þÝëæši&:ä¡srá¢n5_„ãyß§Ÿ»íâNd¿*Ù½²Bx×¼ ‚GYe:à™ežz`ëâ¤MÚf«v¸à˜+-j›c¾´mæ”^¸¯¤Ef»ßiÙ­¸½ Ûb¸Æ"öqTIÞ ÁX¡T!o‡xÌ£¹HF6’*qœã‹Å&;"Ò‘—Äd&ùÉA†1Iv 59JR–ÒIœœ\)YIæ™Ò•¯„åˆP‰?”ýÏkBd"c¹K^ö2>³l¢»`þÔ¿åÉ—ÇDf2kÈ% 2• @ÅbºH™×Äf6 ’@~ñ™’æ@Í\ŠR›çDg)y¡p @œ;ŒÑØ–”NzÖS“ë„æàNwFórñ €<ÍiO‚Tø„¦4ù¹ÏhŽ1j¨@'dPŠV”‹µB÷¹Q44í¨D-:R’~ £&G7ÚP´Œ%…iL™tR 5T¥uéKeºSžÊ’™eº_0‹„SÞ¨§GE*€™T¦65JKujT¥ÚÅŸ"j›SÅjV?U­vÕ«ýáêWÅ:VCUÕJdEkZ—ù 2Q­o…+RÂWºÂu®uÅ+YïšïW¾vu¯}¬TÿXÂ&u°…EìN›XÆ’t±…¬AYÊÒs²•Ål69ÉÎvÖ³ŸmhE;ZÒ–Ö´§EmjU»ZÖ¶Öµ¯…mle;[ÚÖÖ¶·Å­kͺ¢ôÖ·¿np…;\â׸ÇEnr•»\æ6׹υnt¥;]êV׺×Ånv¡ËV«fÖ»IíæwÅ»ÓðŽ×¼$-ïyÕkÐô®×½ôlï{å›ÍøÎ׾Ȭï}õ»Kïh׿ÿp€<`ØÀFp‚¥+/7ØÁ†p„%|nq»Ä‡N®|òñæz¡¿-þ\pë—sÚ®¹]wîš¾þ7}̶º\ép•£¯¬»s÷„×·…Þ\¾ÚÑ·¹H€:wxñ˜Ý&à€¶Vž{Õ%ˆ]rÓ!¸ qj™Gu F¡[íM(@…Z(!s>˜!|^×^ˆ(Vˆ¢\£Ùdýí÷€9Á¸o7Afáu+š×#‰–˜âƒ!‚8äŽó9È܇6¹#ˆ>Id’< ¡UÂÕ"iûÙ#Ž:¹žid’i`–ôM)dƒSv8¡šHJ·d‘q:yäJ)%håŠY¾Õâ‹Jí&äõé!–F¦ç¦º¨œ$žxç›WÂÇä…tb¨d¦zJ*j[ƒîW¨m3â$fck>Z'’þ­B*+ ižWiž—Ú蟞ii•®®)(Où!Þª—è«?î «¢Q‚ú*–Ò꧆¼âÙ,µ°Fë*®ZÞx¨w`"kÓªEéXd}ÁJ{ §*b«)¼œ +)‡ºâK¥‚&òÉ²Ë¢¸^e®£«Ùl ãeŸgßõð–ÅÅšNç¨,g wlŸËÈ÷eöׯ¯y¬rƒGLWÄ[š¼ÊG©»òÍ8‡³Ì<)<L@-ôÐD-ÏéÒŒôÒL7íôÓPåsÔTWmõÕX#šõÖ\wí5cŽ-vK|möÙ`+»3ÚC•ÍöÛpK­¶M PwÜRã­÷þÞçÎ]Mv?ÅwOnn8ÚaÓýà‡‡Ùøã^'þ÷â‚{ ÀNdž¹ãw޵äθå—㤹§«êùêUƒ.zå] ûM©£¾yެçþ´ë”Té;É.¼NÀç$<ð·Û”|M¾ëî¼É¼Þ¼O³÷t|ñ`Óõ5-o»êχŸYô£5<õÇÛ¤ýöÜ£N»÷Ó‹/c~‡ÞûïÕÿÄýúì·¯¼÷°›Ÿ“6ž³¼.~ÙÞùðw9þõϵÃÝ'ضúxÕ[ P˜?ž\/}” G8³*Nzä =˜@ ¦°ƒ¶ ÀNHÂ>Å‚÷3žÿ6¨¾ôyP…þB¡¡ GH¾öÐ…æ{ K§ÁžkˆPì› '‡BÂ0‰V¼¢ÿ'CÎEqˆED Ÿ†Ä~Ša|[[sF0â°Šh[#øÚHÂ4®Nˆt Ÿ=‡Ç<:tTa]ý˜;Љo„¼£²ÂÂÈF:2‘œZÜIÉJZò’˜Ì¤X˜§4¾É䃠 ¥(GIÊRšò”¨L¥*WÉÊTŽG’p“IfIËZÚò–¸Ì¥.wÉË^úò—À ¦0‡I̼²“{“e1—ÉÌf:ó™ÐŒæ,9žÆ)SšØÌ¦6·ÉÍ[Rsmo»f7ÇIÎrš3—ß´‰p²ÎX€– f<ÏIÏzÚcþÙÌpnÒÎp¾s–óôe@ïIЂ’35Yg?ºÏ„ ý|hC—¦Lât8µÄh,jÐŽzTš}¨H:Ò‘îó¤$-)Ï®9Ï€¶ 0ý¨LgZÌB4¥ê$éMKQ™±4¦ªPiJԢⓓÕ\(O‰£S&‡i?ÝhràéR£Zõª´´iNwjÒ¦ªªÿ ªXqùR¬š•¨ZU'WwÊÖœR4¬ekYzÖº4­n•¨B»ºÔžú®-ÕèE©j×Â4¤‡§a‹UÄN±Œ,Zó‰L½AV²˜õ¨cwÙÌzöž›õdX?KZÐR¶š‰½ˆjWËÚÖºöµ 9þ-8Ù6¶ÚÚö¶¸ Rg ÉÞš –¾ nä*‹7M÷¸ÈM®r§"[È}²•Юt§KÝêZWv¡MæhKË]sfײÛí®x¹ùÝâ†w¼èis×Ùôº—™6}*cüêVúîŸK¢«.õû^ôâõ«H³ïOËß]¸¿Ýýo_ùQ¦:t¯"m(SªÔ‰ÞЖtåè@§Š`÷*x­^UªDâ”B”«Î(u¦ —ÛV»úÕ°Þ­pg=IâÒúÖWËë^ûú×W‘5{aMìbh¶&oqÍÇUsvÙÌv®³= íh+;Ù‰­¶µ;ídj{ÛÔÆ6·Á=¿À)ú,qÖ ¥¡fn½Ù'ë&7ÕÌ­O~3ñΫ¼#gv>øÌj­ðJñ-g®º{ß_£÷ÆzzâËØÂã#¸ž¯Œð®)<©þƲƓ<ð*O\Èú®xÖþ.ŽîŒ‹ÏéÎwº$.dyÊ"o]¿í­ñ‡ædi·¾ýjæ˜|æYn0ÍqìS–cYè*÷yÑ“î,ǸÎ5zžUªÐ¤+lݶ췯Îoq?›ë#¹´Á>ös—ìÙöz¸Ñžv³›ím×5âìºÛýî—Ìú½Í÷¾û$j‡»àå.xŸþ·xO¼âŸ½×úº¼ä'OùPŠq›µd²H[»Só 6‰cŸð̃~±‹SçS/ÚÓ—–õÉBh~Í{Ë »þ¬°×˜c­žëðÚÇ·ÿhj¤·œÁ †ø_k?V—:øš]Ûèi–|2[ç9÷}óyþ }™Žgö“Ð=Îó›Oûrå~÷£p OÑão¹ÁåÏû ¢?¨qþúˉZ—‡ŸúCÇqæ·R÷÷gê·‡µ~õ~ €×‡fÈ|„µ}˜€¶z ¸s(5uÇVødMV¦u—w6í%‚F5|ÿ§‚Ÿ‡‚vÅ‚ è\¦ç‚3ƒ(ƒ4XWÀ7È^3˜ƒåJŽK©V„Fx„HˆCø6ׄNxlWxhGzR¸oThqŒ—…Z˜wháyþTy`†by,x_e8j?„öÔ*ˆ‡yH¼%|~N±$7æhþ~Xƒ€X‡âVùŠö‹ùX=Y”À¾…´Ç”äu¥ÈtÆèqê¶;Ûe€ÙT`ú'M\)Pû5T×ȈۘŽX™–o…amM^IOaÙKæee‰”õ€–—ƉÌpr³e¶a=–~TÅfø·f‚¹f(UUÅ}ö{•a\˜å”ÍÈtӏнøp©x€9W]F™ùš,š¥©~Ù˜„™š,Æ–Nöš_9•G‰˜9t×ç™ùqÕx€£¹š¨ ‚ØeÀI¬ÙšÆÉeĉœõ´ŒŸH 'òEah6dwæÇ8œ„é›rþÅaªÙ›ŒÙbaÉÇ™šöšmYœm¹œTÉ`—y–¹ ŽrÄx_ØÙ›¦©_Ýù›Ç‰ÊÉŸúIVC…ž±¹‹ë)gçX›A×™†Šxm& Æ9š‚9žÿégÀ žúée5XéIOúqΙTÆ8aDF¢UÇŽ ç—ïø  8˜Ù©a*æ¢Í‡QqyžÏ§š° ™„å|é÷|kX Í)”9rKYLúLG dzŒ•甤Ì¥že™Ó¤µVORJLYšYTz IÙR)›t×Bz‡aªŒ©JVJ„Ù¦nj„1 ‘h#’tZ§€w2C™’à&“z:k|Ú§Áõ§€Ú[`‚:¨‰T¨†êGˆš¨t´¨ŒzFŽú¨Q©’êFyZ©¾E©˜ZGrº©Â¥©žIª„:ª¤z¨¦zªŠšªªÚ¨¬Úªúª°:©²:«–ú’¸š«ºŠw7Ù«¾ú«À¬²;unixODBC-2.2.14-p2/doc/UserManual/Figure3.gif0100644000076400007640000001345107363332160017020 0ustar nicknickGIF87aØY÷PH¨PTPPX`Pl¨P¨`d`ppp€l¨€€€€¨€ø   ¨ø¨°ÀÀÀÀÀüøÈÌàøüØøüø»9„Pôÿ@@¿|¸dþ5ôÿ@¿|”'`õˆÿ¿@Ìøö/ÿ¿x„Höl>ÿ ¿@´¬ô\õ6ÿ@¿Ìÿ!ö 7ÿ|¸H`5>{6`‘ @øD/| þ@|øA`/„8lö7 ÿaÀƒ…ôÿBj@ø66/‘@\D„ø l/ @ ,Aööÿÿ¿¿é@Œ…7@@¸À57ôÿ¿@¬t6õjÿ¿\ø/„„ƒll @@@ÌøHö/>ÿ¿ØøDü/¸\5>@˜B6­÷ÿ¿!øf@/œ\ÌGöô ÿÿ¿¿6…q@|<÷7_ÿÜÐõ#ÿ@¿ƒ±à„Üölôÿ ÿ¿@¿ø=ü/e@xøÐ÷/\|\(÷>úÿÿ¿¿ÜÐ÷#ÿ@¿0c |f‚øÐ/#(úÿ¿(øL/÷ÿ¿nø¤öÿ¿…ÿ¿@#Ø(6ú|,”öõÿÿ¿¿'ˆ@„4„9ölÿ ¿@ '0ˆ @@„ø”l/õH>Dvæa~*iä‘Tõfh¢9^qPVÈ@…TâGà~)¢–X:‰ä—`"¨äk³•›—ÇM%ŽWe雎\ùãŽ&†içÐy¥rhG^Tj妜?¸åœ>։碌¢Æ" ”( VîY¨¡‰Yèˆ6êé§™¹Gv –jê©u5ÀYg‘*Šê«þ°Æz•¨o'뭸ު盹öê«©»þ*ì°ŸKì±È~)ÀªÉ6ëlŠÕ¡4@SÔVkíµØf«í¶E1À™kSMûì¸äâ&*¸R‰[îºìf¦¤k®©Ûî¼ôm¼QÉ[ï¾üêõ®P¥o¿ÜÖ¹RÅ‹®Á 7<Ö»ø¼°ÃWœÕ¿‡;±ÅwmÂénÜñÈCœn¾"3,ϵ߆-“,³mg²W}êçrg0Ïì3Íß‚Œ2ÎV…xeZNÝ¡‡G³lž«?GM×½'KL4c-ëˆVÒ›f³–^K-ö] œò›­sÌeq½öÚjký¶Úc×]׿Q)|µþoY¿ÌÖs‡-·ÜÚm8[&ç;´sE‡­–Ûƒ;N7‘9nùW5›½7Ïp¿†4ç† îyà_n:Yç}3ã€ÃY9X~ëì¦ë£Ïýúé¸[unÄ£v{îÀ»•¹ÆÎ}XŸý¯ü‚A«¾øj¿//}Y‰üüôØãù±Í×gïý—x; ÷÷ä#¹{Õ½—¯~‚Ûk¾þû ¦î>üô¯'?ñõç?’õïÿÿ  HÀð€©ÈÀ:ðŒ È? Xð‚Ì 7ÈÁzðƒ ¡GHšð„(L¡ WȺð…0Œ¡ %PÁÚð†8Ì¡wÈÃúð‡þ@|a ƒHÄ"ñˆHL¢—øC2ñ‰PŒ¢§HÅ*ªPTÀ d@Ø(>fŠ]¼`]8F ”1‡ŽÉà5žñ„iL!pTøÆÖÑŠ-Ä¢Û(Â;1Œ~ a éÈG ²„qŒ#ïxÆ5r±„Œ¤!!‰HJÂðx<áÍhÉb²‡eüäEYÉ=^R9>d$$»ØFR²Ð•j\e'9ËÂ2“ ÜäY9F^Rr¾äc( ùÅIšiôe,{éÈI2““ƒ¦3 Mb¶2‘×䤋©Lcns›ÔÔæ(eiƆsŽà§7?(Íg‚ó—ÔDæ;£yMkBs™òþä&9§ùÍ~öМɢ?Ó)Nlú™ÂÌf?å©NmòÒ¡ -è>M©Nƒz’œÒ”(AúЊÖÓ›uç:c¹GRf¤ (;:ÍÚÓ£0(jјÔ¥(¥h(Ó†vt¤ í$M1JTˆúT¡ëlä>EÙN¡.Õ’uêQ§:S’´¤Ÿ<©UµºR‘FÔ¨AåêJ©Ò Ž3§ßku Õ¢†UŸg•è›êÌ‘³˜ ­&\ûøT}¢s—}ý"]ßÏYÖ¯Tê^íZ˸2vª.Ul8«šÖÀÖ”¢Ý¢Zq¨˜¸¨u+Zg*Ò­"Õ´yµjjA{QÕS•”}þ­hÁ*[Ô:V‹«íYµÊTE¶¶fõc K[޳´½åêZ‹þö²XÕéPY*[êÆÔ¸î4)uq:Úä"5™O­+3ËêÝrb’·ÛÝ,e#šÝ—¶÷±M/Y7jØÂšõž>äiK+ûR”vT¸m-ìwázNÄV«ýåë0ëHÀb¼T½gfåê[7“ƒèÔ«,ša ÕÂ>ifé‰_ª ÖººÝo:•›B=ŽŒe1.g<ÊÊØŠ7Fccg¨ßÖ.¹)¦±a³þš×Ìæ6'1Ín޳œçLç.@Ë®­³ž÷ æ*s¹Ç¬å³ -d?oY̆&´¢­ÃDC9Ëž'xçŠJ>iø®“Öl¥7MéNkÚÓ'u¦CýéR“úÔ£N5¦W]OS«ºÕ¨fõ¥aýêYÛÚҸ洓ç é|™ÑÀv]dDYØÈN6‰=d8ZÙÐŽv ™-䑸ZÚØÎ¶¶Whm€mûÛà7Åiq›ûÜÙ&÷µÑÍîv[ÝÞv·¼ç½gx–ÞøÎ·šíýk_yÆêÕ7»©Mc~_õ‘=¢r.ðsàxNxŠ­c2¼áâ~8.ñg癟Õå/>þñ™ÒÃó´ÇxSŽGŽ—ûã¿*Bý›Tëzµ­5¯«ÄUnn–ã¸ã¹yy‰ûÓâ èäå¹Ã)Îf—¯{çyFzh)ícIýâJ×¶Ï«èôxÃ\µ({hŸ v©–7ëíÞ:•žU÷Ê·²¾¯Mmž^¦£}Ûj#Û™ÞL¼J]Å€yà! õ»g;ïRìú½ ÏøÆÑàŽ¼äsùÉ[þò-¬<æ7Ïùj¾ó }?xÑ›¾ßt&½ÝOÏúi¯þ̪o½ì‘üz3w{ñAŸ½îO©èØïþ÷6,=}üâÛ±öe&¾ñ—/ÉA+ŸùÐ/%¡Ÿýê#|ú{·¾öiþÙ{ oÿûéö>øÇ¯lÅ“ÿüÒþ<ú׿hõ³ÿý|¦þñ‘ßdúÃ_áö³üßeáß_úΗ}7äü÷8–_¶¤%`öHFL`•M –OŠ•{¨D¸D h[3WxõvQeTìõQs‡€XqØ÷r¸ZèÅ}º‚0(Uw‚‰g‚]¶†bXwXEƒFxÀåq4xD¨D8Èd-x}1çƒ>wN(„CøG6ÈeGhb)õuÒ‚¸…´„ØU„QˆzsV…VR?xl}Wa"È…vuÖtZaˆS¸eîÇ{qx‡<4-*|sˆ‡~¸A·×h}ø‡„hAuXˆþˆ(E‡˜ˆŒ¨øbntc»ÆWñ%‡ÿ†‡`ˆDUxK’X_”Xur؈™xD›X{Èd.ˆŠ?6ˆÛ7ŠFTŠ%&xCw^fr,5Y€õL¶hHÅe`P…®XD¥Hw@µ`P[×MJ%sWx]MøU¿8„ÁHD°ø„ ÈpÈØZIøXjÅ„e5›Ž÷ˆ‰õaih[ Ø\Twv-å…#æfa(Ž?TAx[Øè‰¨µ,8[Þ‰ˆH>dÆuÐHv95^øµŒY8vâņÈ%“'‘9f'¹“ä(C6”ŒV””w”*©”K)”3”9QÈ”P9€R‰Kd8süYÙt[™I)v=…•aɇݷ‡òèð……iÙfhiCeib—r9–xÔ•ÍØ ux)–kùt` „„¾˜‚™‚„Ù|Šé“<©„Ù“‘ “™“•y™“™™š©˜@Ù™á6—?é” )o¢)CŸYšx§—V”šªyx¬YE®ùšÒvš14›´ m¶ C¸™›É¶›/Ô›¾)lÀéBÂ9œÀVœ™GšÈ nÊÉBœÙœ:Òi“ÔY0yØþÙˆÚ¹‰ØÞYˆzؘá–(tåY›±IEÇ™žtöœ+Ôžî)gð©B—k¢&køéjú©k±Fký™Ÿ: ·æŸµ¶ŸÿY ª üI z   Ê ‰)gãéu+8ŸŠVŸ)tžp©¡ºžSä¡ ¢‚Æ¡(ž&:„*º¢'Ø¢.j€0£÷7£4ú~6z£-qÆ‘éz"jB“ˆDX7Aúqñ‰º€ßvŸáU艔HmIF¤U:C€©–Q—tFÖ¥mÉhNŠpø¡Ž”Z*FQ´X/ù¥¶O?j¦Ÿˆ¢8¦/8¦dÚ£¸X‹$÷‘‰‘ÏæwH‚%é‘þM5‚‰Ô‹—xt­]¼XtÇ¥†jX§|:‹nʤÉVy5[ozvÐÈ7—¡Üet÷ƒÄrPúŒö‚PšŽ ©…¢:q†zYnhZ:ˆslšz39«$f™oi—楀Ƀ󥪬¥«=h§ÿux*©ÄšŽÝ(vÃ¥R˜ÆŽï–«\è¨Qú¨ïˆ^븩ÌX¬fW[ͺ­n¨äJªCz–¶*®vª¨[j… †Ž –ch­t ×®½ºsÚ•d4vã ­þ8`;’¨®Ãª¯2õ¬ H­"V©ô*gtŠVYÚ[q·¯ï•sòÈ`n7ª·¸…o'aOj˜?U•yHIù­[ަúþUÓe—옔rºœ*ˆ§¬tik³¹axr—‹=˨#é‘mh–" ¯×J°´Øo>Š­jª“z´eȧû´—:“—Gl3D[;d9:oSv¥Ø&¶Œw¡¸ÇyU–®°™¨g¶:ª“$ú¶,ùµr ~t[·Û'Ÿx«}n›­{û¢Ìù·8xö š †ë ª¸ š¸ ¡»¸{¸;¡Ž{¹’‹¹‘»¹–›¹žË¹ˆë„Ë–]+¸Ú6ºYº¦‹m¨‹¡»ºà׺g »a(»´Kˆ¶{»~˜»º{‡¼Û»µ‹µÀ{¿ûºFƶRH¦ÃeÅ{«‘X¢4™`Ë[fÍ«µ¿þ”¦Ð5½cV½™…ÙûNhú_‚ªb„jŽ5w¨n¨ºîɽ©x²í:TkXª²CKŒªš¥Ú{Dìë‚Á®õÛ°÷h¬¯š¬Æ›¿8´¿×׿bú¿„%ÀNèW"UIjÀF„À(½Å°lÀû„ÎKÁ>dÁ]e•¥ ¿ä¬ã4.ä8Ç)ã(þâJmIÞäÈfâP¾hR>å„VåV.hXžå{¶å\^g^þåsö»]ƒ’ED.h\ÒTvÂô—¯!>Åh9Ô!,áuÙâGb[ZþïHKöõk †M~rwÐÜ«‘®êÛ"}]êhÌ@Fç~ÑMŒ²ëú¿26­“J\î Þ.ç;vʨ*Ú¨$ÝV§¯’5ÖÎÔöºèÙì´×Íè ë¿›ÞÞq^¸l.Ýۊα•Ü®Â;w:·ád®áªª¤]þêTW9r„-µÂ>Ñb¾äíàæÔÞfÖ^Ž£~í™”ížTcÜÞíÕ¬êîhúîUï´þêFïö.Ëã~à kBÕïðn¯š~—OðRäé=,Ì ¯ðþ>íæjêhÈïÿÒ¶¾î) ªñúûï6  …Ùñ_"DÞ¾ïlTòLtòÚ*A,¿€eþò:ó4K6óx;unixODBC-2.2.14-p2/doc/UserManual/Figure4.gif0100644000076400007640000000645107363332160017023 0ustar nicknickGIF87a¹[÷PX`ppp€€€   ¨°ÀÀÀÀÀüøÈÌàøüØøüø¿H>…@üð686»X„Põôÿÿ@¿¿|dþôÿ@¿|„'`lˆ @@Ìøøö//ÿ¿xøHö/>´\ô\>6@̘!ö­7ÿ¿|H`>{ø6`/‘ @1öÿ¿| þ@|ø.`/„8lö7 ÿ@¿aÀƒ…ôÿ@@¿Bj@ø66/‘@\1„ø l/ @ ,.ööÿÿ¿¿é@Œ…7@@¸À57ôÿ¿@¬t6õjÿ¿\ø/„„ƒll @@@ÌøHØø1ü/¸\5>@˜/6­÷ÿ¿!ø4@/œ\ÌGöô ÿÿ¿¿6…q@|<÷7_ÿÜÐõÿ@¿ƒ±à„Üölôÿ ÿ¿@¿ø=ü/exøÐ÷/\|\(÷>úÿÿ¿¿ÜÐ÷ÿøc/|H4‚>„Ð8„(lú ÿ@¿Ê(“úÿRL÷ÿ¿)n9H>ÿ¿#8(öúÿÿ¿¿|0Ô @@þ8„ Ô9ö8ÿ¿ H>„ lö`µDa'øƒˆ/,¹[þH° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª\ɲ¥Ë—0cÊœISb›8sêÜɳ§ÏŸ@ƒ J´¨Ñ£H“*]Ê´©Ó§P£JJµªÕ«X³J¨µ«×¯`ÊK¶¬Ù³hÓªÅÊu­Û·pãÊK·®Ý»xs¶Í  ¯ß¿ò L¸°áÈÞ{€Ç#¬¸²å˘3kÞœ—qÇB‹=™³éÓ¨S«^ͺ€gЀû*( T€·}ÆîË”÷Pß­ƒ N¼xÙ×8pàïlÊ?(È]À¶Pà_±ßν»÷ï=‘þ+ý<¨ôé¶§_‡þÙoãÀîãûæMúß÷àóëßÏß´øÝåé¤À€ @€HÝOÀÍ_løµ'¡|NÈ^f¨á†nýGm9 âˆ"h₺ÙGY}+¶ˆ_}â#‡4ÖhãT!'™dVgÛ`àëÉX…:ha„Gj‡ã“PF)åM¯feh=î4$(öÔà…_2ù`’c.9å™h¦ÙŸgííæ$O?âd]PašIæ‹eÎ8£š|öégkl0ÀRsÊY¤‘JЉçm¶™åŸF*ial*7饘fªiPú榠†*j”l¶⨨¦ª*†¥Æ¸ê«þ°Æ*\«²Öj뭜ъ뮼öÚ¾+ì°rµ…P5%«ì²Ì6ëì³ÐF+-LTò„,±Øf«íVÀºfm·Û†+î¸@‹¸×’«îºã‹îMé²+ï¼Áš€NñÒ«ï¾±š[-¼àò+ðÀ¡º‹Ó½äKð Cj/¾7,ñÄSúë-Àg¬1ŽËñoG~ÖØU÷18òÆ(§üÔÃ9)l²nV±÷èÉ*×l3R£ñË:­ˆèS=úì |?ŒÝ§7'=pÇ |O>‹LóRA3yrÔRÏwµÒ\3ÌòÁ;§èÞÖR—MõNXG6ÍXwí¶À9ƒMT–j—ÜÚl“m_þÞ®¾í7»L#ì2Ìxg-UÕe«Í÷Þ|ýíøº_;M'Ôd›}¶ŒFê½8æ†?îy¸qKÝl#”Ý"‡©"ã‰Ïüùë¼.z^®Ãn;ÜÝ‹°ÜëAˆ•›ôÝ.¼Ä¡'ö]µ¯¼º²¿üóÐs[íî³GoýõC?8öÜw¯Wîï:ïýøä»–{Ó-_þúÊ[œ>ûðGï>ïñ×/|[ä¯ÿþü÷ïÿÿ  HÀð€L ÈÀ:ðŒ 'HÁ Zð‚Ì 7(Aüqðƒ ¡GHšð„(L¡ WÈ â/0Œ¡ gHÃÚð†8Ì¡wÈÃúð‡þ@ ¢‡HÄ"ñˆHL¢—ÈÄ&:ñ‰PŒ¢‘øÂ)ZñŠXÌ¢·ÈÅ.zñ‹` £ÇØÄ*’ñŒhL£×ÈÆ6ºñpŒ£ãHÇ:ÚñŽxÌ£÷ÈGÎ0:ì ÿ²FAÆÐHDdE¿Ì4@ÉH(:²‡•Äa&xI!Ɔˆ›µÄËEu˜ Í^>×0–›Þ4pÅzÐA›4Óqmp¬ÍšäœîÃÂþ4³Ý¼× ר¢¿´iy±gŸBÙÈ6é+)}k;o›ÛϾvEšívë™Ù×Ý,…ßE‰/üáO4ø·ÁØì/üãiì¸.þ)^O¿7 6ù‡ñ}EŸåúö¸ÊgþE‚—“äV´8ÂqNLoÓ|ÛgtùχNôë¼èHOºÒá(ô¥;=Á}ºÔ§Nu9*t©§<º}>FŒ÷›åÈ$ê†õËͪ›ýìhÿ¢ŸÍ]s܉^ϯ‹Ù™a±³¹ìiÏ»Þ÷Îĵ7™ãäÍ/Üok›Oâu]3ÞùÎøÆ;~‡k/,Zí.XXï5å·«ÝEŒõãò[ÆÏFíŒ=z4£»Þ¥^d ÿøÖ»Þñ‘Ÿõi‡}eS+¿†Fq%UíöQó™÷½6®R] j3û>æ‡dýë—Ï|³ÇÞËQî½{Û¼ßn[ß¿Å'u•Sþ?á:CŸÚÁ ¼²q©üæ›ÿüH>ˆ‡=ã÷V ¶D‡~ˆ‚8ˆˆ„xˆˆ˜ˆ|gˆŠØˆŽøˆéÇ…8‰”X‰4;unixODBC-2.2.14-p2/doc/UserManual/Figure6.gif0100644000076400007640000002724407363332160017030 0ustar nicknickGIF87a˜ü÷€ø€üüø@@PX`ppppt€€€€€€€lø    ´È¨°À¸¸¼¸ÀÀÀÀÀÈÌàøøøø¨Xø¼¸øÐøÜ¨øüøüÀøüø@@Ìøøö//ÿ¿xøHö/>´\ô\>6@̘!ö­7ÿ¿|H`>{ø6`/‘ @Döÿ¿| þ@|øA`/„8lö7 ÿ@¿aÀƒ…ôÿ@@¿Bj@ø66/‘@\D„ø l/ @ ,Aööÿÿ¿¿é@Œ…7@@¸À57ôÿ¿@¬t6õjÿ¿\ø/„„ƒll @@@ÌøHØøDü/¸\5>@˜B6­÷ÿ¿!øf@/œ\ÌGöô ÿÿ¿¿6…q@|<÷7_ÿÜ0õ%ÿ@¿ƒ±à„Üölôÿ ÿ¿@¿ø=ü/exøÐ÷/\|\(÷>úÿÿ¿¿Ü0÷%ÿ@¿øc/|Hf‚>°08%„(lú ÿ@¿Ê(“úÿRL÷ÿ¿)n49H>ÿ¿#8(öúÿÿ¿¿|0Ô @@*„ Œ9ö7ÿ¿ H>„ lö`µDa'øƒˆ/,˜üþ+H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ€Ž CŠI²¤É“(SŠ<𱄗0cÊœI³¦Í›8sêÜɳ§ÏŸ@ƒ J´¨Ñ£H²˜´©Ó§P£JJµªÕ«/—ºÄʵ«×¯`ÊKS+Ù³hÓª]˫ٚ4ÈÕ ­Ý»xóêµúVfܹrÞK¸°áÃd= ¨©xf_˜ÓmÐ`°MÁ˜qZ†[7æf¯˜;ûÍ<34âÓ¨¿*^,sµã–~%Ï¥LY4MËŸKÛÖ=,îÝ¿{CȺ¸q§®a&—ù‚äÁhS¾¹ù·õΦ_’~]{ÝêÛ¡þc'-ž³pâw_Ï~hòåÌa§ YzåË¢Ës÷Î?÷üú‰÷Ý€ü 蟀èÜmêµçàƒ;­_|LÍG×gÒ5ØŸémØáæ pîÜvÂ× z¶èâL«±VÓc`£»eˆß‡¡—yß w i ö8$ˆúñÆ ‡L¾èä“1ÞÔÜ6z¦£yúx䑙ȥ'’¸$–"jøä™Jˆ€Œ¯U•8†&uZb¸e©§‰`Þ昞•ø'š„BøÞš3Êœ7FW(vYgyyâ¤ޏàhÙu—ev…†Š|f¥è¢Œâ8Ýq,Šêê«þ8•ZjsÚ¥º*j›Âªë®45Ö+›¦ºY•f*¯È&ë­¥)ëì³®2 í´Ô*mµØfûàµÚvëíiÜ~+î¸wõÕã¹è¦«îºì¶ëî»ðÆ+ï¼ò`ï½øæëALöÆäÁ¿,ðÀlðÁ'¬ð 7ìðÃ|LæFlñÅg¬ñÆ p@ ‡,²ÈûR\òK§¬òÊ,·Ìp¿Án5œË4×lóÍx“tñ’<±ñøu*üðOå>sê‹ÿ»õ¼CïYñY÷½o÷ÉóTlçÚ%½áÏ¿ùõÎûUþö<÷œ/¾¢ƒÏ<\· âûæ[Ž´Ý»«Þú°³8ÏðO;›ßüêç˜ðídEêKß{r¾ÌO¼Þ'¨3„}ì{ ¼ƒÂ“AòM°,þÃÚá X @ì Á¾Bæ8P'dßþN¸“ Úî2þ<ßåFCÉ…ð‡ësŸƒØ?Š ‰ùcbã†8£o~7l\ (A)Úć@1!eXEÑ™LlâÛ¢ ½ØÃ>‘O!# ͘•©Á1,T ÷ÈÇ>úñ€ ¤ IÈBÎOŽŽ±âãö@tÝ‘(ç3¤$'IÉJZò’D$sYG4>Ò+>,˜ÐpFÊRšr`šä'ƒfÇOv%”å)gIKš¥’b«š']é7p†@-‡ILƒÝ2+¹l%/¯Kå1¬Œ*¦4‡yÌãÑ‘•»\fUš)0YŒ2©æ4ÇYÊjq‘€Ó&3}Y8åé±`´ñ@8Q‰™€õÈž¡þX>É9Ns&3›ê” 7½)1xÆS˜ÑØÝþµÐ…æL¡ö„¨DùYL^S—ÊÁ¤F7ÊÑŽzTNüeÀ„vO‚þË>£ÒD%êЇº”¡0¥(E- 4Œ"ó£8Í©Nw:ȶ³› Œ×&Á)¦}iLz·–ÊTš4àf9.šùu# êÝæwÒxLœNmª>µ*T¤>ušQEçTgé¿n¹ŒX-(RMê¢ 0+]êX•*Ö³ö“Šs¬©2_IWi²E„C«î€:W¢Ú`x5«^“ÊTÉú•š€MäEË{=µ­gA¬P;½¬:Ó±”ñ€T+™¤"µ²fmþ¨k/kÊ´v’‘_9î@;ѦHJW]ìH߉ÚÈF.ô,+Y™ºO…Ö“¶³´-6q JÞžE·‰âtBZ§F̸²®x!&]›f±³Ö% v{«Ýß夻;îxçÛ°òr¶—mY¯X|k$î·´ô ð)í Ð’è3bÄ¥nvè.R0½`íx*5£ÿzWÀ¶ef7¹Ù?ÏzúûÉz5'óD¿añ­wJôE ¯¬°Æ0©«ÄopY¼%ñv?ä^‰»VMà&|b« ÆknŒÉ9ãtb)‰7~p—¸DsñÊï ²WDèÈ9eHv®`(@æç.ªVeþ‡i (Þ%™ naC\åk¹+NNà{d…5´Ìe>3šãWFÁzX€|óñ Ø:ð$ËMB¡ZTé²|™ca ™)NS@©‚¦e“Ï eɽvž²‰•ˆ½ôuÅÖn«lx9áblIVè¦?M0×Ì{ 5ÇF}?[Ä9¾`«« éUK:-”®4­ÿ÷ӌѕ®Þõ®=ðiÙæUØ,#6ÞŽ"ÎZ•ª^£‡ <-íùÎ\‰6/}1’2Ÿš&3·=à_çU¬JëëKÍð ‚ÛžiÆåš\ÝüÂ+ò.r­\ïœ)פÙÖ¶Pyím–öÕÛ ÿøÁþšpd.œÔëtø¤?Jo‹‘4Ÿ\Íø®7þÚ½‚œ¥8·,¸Å X‹ÅçÕõhË#öò…b¼G›Þw¿;>Ù|ŸÌ9É X©”O´6¨±­í}ºæ”hÁ-V©úŠÞ¥ÿüÊúžzÕ»a¡:Ü–o‹·þõc=îwϰØOüö+=¾ÏûŒéÞaÊõó…;lã7Õ»÷D~ê›_KßS;®¤/þSþ__â¼ñÔO~îŸOOçJߘ޿™õ±fíË”ûd3ùmßÐç*Y«É ¸þéÓz†ßÿû÷}7€ß×\Bu€ÏWV÷WJë÷vÙ÷0öuî—{™wN·åD–7€ ¸H€ˆJ V€çbp(~ˆ€b–8€%˜~)Ó€£§1Â~§7Hušµy˜‚æ·‚'H€*¸0È‚.8ø>„¶×xAø„&ˆ32Xm˜†|º–t8¨1ð‡ô‡‚#h‚Qx0JØ/X~Oˆo$økæW†ghJSˆ}4ˆ|Ú†…Yˆ1[ˆ⇂C(€Dˆ„dh„fȆBøädžJè†þ‰G…õÆxè—oÈs1ÑgL}†«WÿÄyIx„L¨‡dØ1~Xˆ€è„ù4†õW"…£xJohkwZù'ss'p!H‰“w¹F{³å2[h€ö—€§u È‡P·Š–§‡Ëå„ò·†«¸€¤ÔŠçr['w7‡ ˜‹OÇ…•G‹ÿ惿}Syz•€h(f˜xrHS‡‘nЃÀdf\òx.t(„z7Y!§ vøømöètyM÷qçȃ¦¢ŽÊwpí˜}%¥/9CP6"‹û¦Œis9Ç Vv!È|xwd—‘)U,c‰¶qr‘Y‰þ‘|rö×tÝO‡’¨—s;Iv¾x‡&éz*©u-ÅuÄâx€[Å‘)rÁ6Pù”7•`·‹§ƒf锼7”³woö4‡ž–”JÙ ’MéZ{Çte¹–T•M5’jµ•\‰{^¹ˆ ”dì¢o˸‹ÊU„g ~yx€'8vÃWŽ$yjhŽX©fZY’ui—‰‡Zg‹áèŒO™@™Rw—qhLb9‹DÈ™Wy?8]=HšŸç™•y™ìâgª©Pry›žÇš_i›5³™ºyf¸ùн©a©péŽÁI[¿)ÒG}Ç©O³‰šµÙœ¡–œD‡|p×iœšþùœæE—Ò雓銟I„؉™ÒÉ›ßI_Ô 15˜3åé߉žé9^ë¹0¸&†ïÉɇ‹äež:§—:9`ÜI59Ÿ1VŸ sm® Ùlü V¡ûøŸ¢6 ña K†  StBÅu›Ö ÿyw÷ƒ\øP”ç €Ù„ ~bg–*Z¢ÿ(†ª‰š’áÕ©¢ñ( Z–ýÉ“NY‹y(¤h¤=I{3šš5`êA\ÈUé’ ªŸ'Ê“ ™™L¹¢¹wI¤y’KMªž7ª°ht-)‘°€#*€ÑŽjY“8i‹^ú–ÇŠD8¦ÞY¦ôy¦øRþFI% ºŸ~’\ú–z§yZ•ðY‹Iæ§ ¨*zЍœ`y…sxÀWüȨØ=É– z‘Ø¢¨J|òi©õ¤sŸ‚y.žz¿&Œ% }÷ç…Ù‘Àö«c·˜0 ²9œ&Wœ®:_°j|¡YfhZ—­š¬ã´¬vجœö¬\­Ò*MÔ*‰í¨Úº­ÄÔ­âš2áZ®´D®}æªçŠ®¬(¨Ò„dØê~íê® ¯Å$¯ÃüÚ¯ü ­”:¯öÚ2êÚ~–é –ú™­;°2U°Uh™ 00À¯+lõê°6±x)¥µ 0±Hg±‚i…ë8S «±äıšjþZøä¦"k   K²q:š'ËO«².òÕY”ï0›33K³»°ºäø¢*ú‹e¬šG’˳ã³ìù¢&EfC þz´¦ªwNù¨¥ŠV)KµÅdµÁ×…òƒ/²;‡úù¯’*¶[*“Okš™È¤f[}øÊVX{0Vz. ¦¨ú¥vZ§wKDyK¦{›®}{Jöæ²Aš5K¸t›¥7YQeÛ¸Ž‹©”IJ Z0q˵¤·H{ª—[¸aK¶P{šÝY©œû®ž+ž¥$«ûÚi¸ëi¸KyÀú‘½º´mHL;»Uû¸µfk0"”ÃK¼ƒ¶-  ê²­»¸þê¼Rh¼´ÔžÁÙ¼Ø1Л£–ê½ßû0á{µìº¹å»±Úë·۽껾4s¾iû¾þê¯[½è»òÛ³í ¹b0 ·S+häÛ¿ C¿£¯ÿ’¼ãµ «¿ÈŠÀ5£Àʈ0å¶]ÁI ›9+©µ¿¬2 ¥°è\[+³Fk³ |釨š+ÁR;Âóû¿7¹r%À °µE[³§ pK»9yŒ.:ĤЄZ(Â4¼1%«+0ZË"Ûµ,Ì‚p9¤pFú‘„K^J¼ÄÓÄïséLÀr+ªª›¥«»ª6™ƒx»¿ Æ#Æ¢ôÄ¢›.ƒ —ɸÆk Œþm£’øÅtl1vw@+º”[±XüÆ~ü¨iYpWšÄ2<—ü[ÈÏkÃ6º3ºžÌµH«Æ©[ª´(GŒ¥vHȘl¾š\3¶+À¹Ë׊¤)zÄû¬(šw¸JÉq<Á«\¼³‹£îk0L0ËKJs¬2üËpÈN,†¯‰3_›¸…6ÃÌÆ­Œ3Ü+¼ÄŠY•L›×{ͬÌÉ,¾àªÊâœ0Î LéûÍÐÎéÜ{Ù|Ã|žèϳÎwl¿÷+·Ì{ÏøL0úw;ÀÚvº¹Ì¿<Ð'<¡Å¢,œÐÐÃÐkë±¥Á#ûÔ%y“¸d ½ÊÍÉ(,Å9£Â>ìþ»§ Â1Ò˜<ÒÓ¸¯;lÒÐܤI¡-=Ñ]ÇóÜ2E—ÃÅSܯ7m˜’ÕÅ;íί[Î` Ó É¶ÿrÆ Ê0šÓ]èÔÊÔªÕ4 Õ¸z,¢¥l·;ÇÓ=ÝÌ?Í28]ØÇ‹Ç<Ö¢¼á$ª¶¤ºàŠ+Ç"~0îMټȡQ)ÞØß6Í€ýáMãùáãIãˆ]ºF>ß ~àJ©ÑÅÞñlÝyyâ‹­»¼K˜‰yß4©ªþâ¾ äNâùŠ0ÀýÀùýÝNžÎÄ}’ ýÏû͸^þ/iÞÎ>ÞÕo>0q>¾g.Îw~ÎþmÏ@¾ç\Ú›àMÁ€ž™¿=æY8è\è³eл†ÐÁç×ÌèõÜÛ]‡Š^ÝBnm×­4ÙíxíŸ8[æ©Üç!ãâMã‚QÞ+\à:íÁô•éòûß´3-²òíêjÙ²eß§¸”|Øã\>Úuç›>{Ï•µNÓ¾Ë@ºTmœ8Ýä¦NêØ‹×É^ÆTýèV­‚£ÈêÍs.ØÅnì`>ÌžÇè²ÇÎÇ?:§{Híã®Ùå.Þé>¹p}ã´¼ïÓÞ‘Â+é̜ꬭ×GÊ}=ŠV<¶î^׿ÐÇÞ±e|»S¾»‡¹†¼¾”õ=yÖîœÕ^î#.{ ¸–mœA þÒ /Ò?äÒ›.SòK=ïüý放›.c'ÿÒ)ßš|ón.ó9Ÿ›­}ówýóÀ9ªðÛñ¯ÖçnؽÝÀ¿¿<ïç¨NôÑû”޾iŽéB¯ÚToÎM±—žè[ÿÚKoJ‡íé¾ÑN½ñ¥õ§.âoÛ%³æ Ýæ*`²¾¾3>ððëu?ßzʧWÎöƒŒôÿßOÔ9ÓìÌø¥ï®Ôg•÷åKëJã±ÛŽõÝîIÊâ%ùß‹ør´(þî‘—àx?öÃÝõ/Ólãš_·ýnæ†_ïªoŸ}â{mð?ŠàÿêÛ‡úË]öµ{Ý ,˱¼–~uÿû³_ì3þßÀ#ÿÁÝÜÀÞµ¿Àj¾.Ò?ýãåù×~ý ³Í-__/?ìÓôJòf/ÛÍ_ç3oxðÿòÕOèà¿ú— Šó¿ÿü/õ¿èáÂ@T¨@€† >„Qâć&XèÁFŽbRäH’%MžD™RåÉ „Y°¥@‚c¤˜SçNž=}þTèP†h4ˆP!Q¦/fdÈ€ÂTª,\™UëV®]ÌÔä»´ùšÛP¹ýžë¬Ã¼®@Oœí@Ý,ÛŽA¼ÌÛL¶Ïôªjª«’{±Aà2¼°Á}üðà û¯ QD2I¶TOÀË|ƒêÁ³®"Iªú:´ÈóÓ1Hý†DjD#KT²L3ƒb2A'!ƒ²!)óª‘*ä´ÌþPC:³„¯N/Óµ°ÊšìLAÍ)ÍÝ´{ÐÁÎòàÆFÅC ñã1K;÷L­Oêþ<’PO?õÀP‘3ࢀ‚TWUUÕøê›ëJù¸Ü2OLÿÒTL@sµWAEUPÐ…ôšHU.oEV°\‹ÜU1_ŸUØ5 ô°$û’ÅW—#’S2¡·@ivÇlÏÝjYoÍ ·ÝÇ]y…ܶ5?aûÖ]}kƒÚD÷Eë«z[Û_vF²~Ÿý7á¡~‰`];u¸â%ÿ\1Xƒ*×]ˆ¹ “YŠ-&¹©…}mø.¿:x‘äí-غƒK¦y¨“{M¢øb¹ãg_þ–Xä|k&º§›-ÕT•¡ê€¾cuÔ9ê$žnâ¡‹Æš¢£ý7å{þHê‹ÄF‘jÿÖ 4kµµÆ¸I”ó4oé¦ß»ìùÂn*¨ë¶Íl…žymÁÚúL3ú–;hši¾Ãvò%<#ŸÕò»[ƒÓ¼óPÛVóí»K]YqÆš€lñ,¯rº/g+óÑæÕóÎ 7³ME;›`&@¡Ô]'~V½%—µåÚd¿WfÎm_÷2u[g€÷`ø æ^ì¬ãé~½øSûVwóÚ¡ôC?íú¢R?òEå·œõð)Ÿ6æc&1pô±–ž’’–™»0ŽqÛóËþTf®÷hÈu{SžþÊç¼óý€ê•ËLg@Øýl‚ý{ž‰À}aätDÛŸÕü'Bš‘`tÙÇ´B’Ì…5$— ›%¶ƒÃZÎ^¨Ã‘õÐb7˜KHÄ«1aHÜ—õ•BÀ…ЉOüaÝ%E1‘†WÜõÅE~ŠŠ´s+&F p'z‹•ø–³@Š”&'g4_ÕˆE¸„Žhí»£ðìÓºùéÄg‡ô¢÷è.62,Õ[ö¢æ#¾aÇ”ÜYþ¼×:þ ¬jU¬à"õÕÈ·A-g ™›$…g¿É=2?øk¥&Ç÷:Ë%2”¢l)q7ÒÑÇ€Áþhþy¥ïÙ|›¤ßm©G\22‹E#OËfºέiÁ¦1gÉJBÊï~Ç\&›™Ëgþñ‘‰3 ã¸Êù3"î”eOõ=¿„S‹ãL’.AHÓ, ×ìÞ+¿¹Ma6°xd==y¶<ŠŸÐÒ'ûÜxøó€–|‰Y¹LÊQu̱çCÉÙÇõA³'Y6õ÷Æm†T¤àЍèNzO¢”Kž Ø'ÑèЗ‚*¦»K ‰G 2³§>-gÖÈ.¢‚ð–G%ÔO÷‰B—B©$Í IkÖÔ*Òªg’*û¨ºÐ¿í”¦_ÍNX=µTpqu‡gE«mÔJ(¶ÞÍSn-b\Í4þ×éM4íæ;S-ŒTU¯`M*ÍøÉáUR|³¤ 2ñÚÄÃ"‰¯<ç_ë4LZòZÉ4¨iE¼Z’UsEåie-›Ø’E3Ju\§ ÙIKóm%<%gXÕæ“µ$s-^zù‘_>›Æ ¨m•KÏäJ–·½EÑe“äZ7°iê\§J‘+5Ýn÷]ßd¿]IIäùMgþ[•~ӻݽm6Iû‘ç’W\¿µØbícÑ_¶—¶îoýâ `YâdÍsªQí{_¬±µ~µýÛ£ÇAPyRî19ä\Óή¡p]p[Ì;½™¦Ääë0‚»úÔogĘõ s˜bþþ­XÁ-v1~;Öœ2µ'Æ1Z^<]¸Æo 2ƒ'ã6µÕÕƒ4V¡W“Ì/·¶È0‹2‹§l *÷ÊA3ë–¹3äó~Y§sŽ ä©þdo3îqYÑœæ´va”"Ûi7C2Å{õ¥³ÂìœÄˆ(1#Í[mOZSpB”7ôcÈL à.Dˆ‡žä†éYÆWêY£œ5}æHSyÍZÕÑ)c«Êì±’›CE^¬—Ë\QÇù´ Nm©o3è(Žv¸+îCŽ`±½·›Ú,& uM—IˆzÓT'vÞÀ>ØÈïµr¤ìe_ìÔæt:ÓÉ^yêÖ›×è€ñÆínþ«¥Ù *ô;+º^ÿ 8ÝËÅm¾å;Ov·[ȼ#„ûiÀ kZÛŸ¤§?«îöÛßLywÈˆÒ C†¦â•òÃÿým¥º™ÍBuåI®q¡DœÒä’±ÈG=g’‹àw6³qýñ–7ÄäΊ“¹ƒq-×Üf/'4Pt¾žCÚç?çxsÞ«¢çúè%z¯…Îô‘?}'7‡÷ÔAÕtšûë-ê ž'ž,ºÏn®ºÕ õ1†=Þ@$ ãðĦ@áºÚ7¾d?vœ'èíD †Ìì‡/;'½—Élc;ízïÛ·èvS žð˜{æ5Ÿùð¾:–ž¯µ‘³ltÈóþä눢|}†;øÂo^€ýÜ©½oæ&{å?.=QNŸ2Rww¼æ²Ó}ö.`Azû™çé|/)¸wøêJDøÃ/~âi_ítçÝùh’|»zÿöŸóÚG¾¾ jïÿ'»çMïîçcøn’-,ómìt÷Oþ¶q²¡ÓŽöë?Ó ¿p @ªÓ?$+@£9@pIÀ­{¼þû¿Úˆ@3š@÷«ÀñX: \À¼j@ÿ{ÀÑ: ü@Ê AˆØÀÙ¸À»ÊÀï[Á'é@´5ýÔ‰d“tÁ/´¹t¤¿›¿†°€#´€™z³Çz£t>|Œñƒˆ†±€ Pþ8B»ƒ,?sÂ܃BÇ¿¹ B`ˆ+DÂ3DBÈbaCNÊ.,½/lŒ0”&‰°2ô€+ÔÃ=ÔC5Ô7<™5ˆCƠî;,C>TØ‹€+4—Dƒ¥ÚzC̸A,Dº8Äꃈ;ÜÃáKB,ÜÂkC.ðÄA|ˆLl‹0L/ˆøDPÌÃ$<7RܾSDÅ L:­š>òó‰EY|,xzµð±Å[üœ\”>;̬IÔ°W10,{4þÃD!”©ºPÀT14ÆT´F ú ÌŽb¼EUd‹$rDEs\ t„3ћƮ«9vT w8„áNV#ÀßøôÜÁbbòÂáeÜPr‰˜…âM혶LæÍ/¸M”x]zP: 9&ÜV!æÆÖáµáÙ¤ßþ Þ;m MC¸g<^O•¹!îVQýRÕE¿d_èmPé…Ðñ(´Ëì¥âµb LѰ¬Ú>ØÎeÚa’±Ôu/4ÆM5®˜•mcp_˜…ß’}ÆR¬ß.†®/þKòl%ÿ-(K>6T¶ÐMæ@ØíÙ»@`tSÓîfUe‡)É@­£AQ޲0h¤Æ[f&fDbyÛâÆÈæ>Ýf$á7’âÕ´åÞrâb¾WhÍd§ç,ç¿}çrŒç(þìf gK½g0ÌgÇ4ÖäuÜÃíç9üg˜=ç)¶ã¦´çfN¼½¿l%búHgÕZç¤W-ö`Ë­çu,hC »ÎâråkgŒeSå­b‡†9bæcP†X8Þè³3;”þÔÆãQ¾€¤#Ùu3jì´j©KÜ'¾ˆcLîsZ¼^hôè½n;Ò% žàsó̬%j8rëúh?K•™æâ¼ÖQÄž<ïLhFkþvëU$: m…ísä1jIê×¥aíÖþÁ×Θ‰VÙ±J€Þöíßöm\]é÷ó?ô@·—3—ÉîVó‹âÏ” -ò‚­ãGÅQA—ôI§ôJ·ôK—tBßÇ«8NåhÓ¢Ž:ÇôQ'õR7õS/ MoHÂeÆO·µPß)T—õY§õZ¿sUGóÒ^âàþu[ö`vKÇu™4î õ_öegöf·ób÷ÉæŽ˜dWvg·ökvh‡Ji§ jul÷pŸumÿÊæÞj¯vqW÷uŸtr?è'{nÁî†þb÷z·w@w÷yžÜÄn_§oÔº÷€ø[gòµêîm*7¹^BpV¨~?îoøˆø|ïkvŽD3·Q´¸†Ïr€—øø,š—‘'ytñ zù”g÷*ó–wù—‡ù˜—y ôRù›w–¿ðçùž÷ùŸú ú¡/’>·yœGzk§‰¯‰ùfY$ú¨—ú©Gn†púš¤×zfïvÍÇnŒf°§ú²7ûžwˆë>°þó!•;unixODBC-2.2.14-p2/doc/UserManual/My.sql0100644000076400007640000000003107363332160016121 0ustar nicknickselect * from tbSysInfo unixODBC-2.2.14-p2/doc/UserManual/StarOfficeDataGrid.gif0100644000076400007640000001271007363332160021136 0ustar nicknickGIF87a¦©÷€øx4 4x<(PP\\8d ||x H4 8X\8hphhHpppx|x€€€€ˆˆpˆˆ”€˜˜€    ¤¨°À°ˆ°(ˆÀÀÀÈÌàð,Øøüøü8øüø´\ôl>6@̘,ö­7ÿ¿|H`>{ø6`/¡ @‰öÿ¿| @|ø†`/„@|ö7 ÿ@¿aÀ“•ôÿ@@¿Bj@ø66/¡@\‰„ø |/ @ ,†ööÿÿ¿¿éHœ•7@@¸À57ôÿ¿@¬t6õjÿ¿\ø/„„ƒ|| À@@ÌøHö/>ÿ¿Øø‰ /¸\5>@˜‡6­÷ÿ¿!øf@/œ\ÌGöô ÿÿ¿¿6•q@|<÷7_ÿÜõ!ÿ@¿ޱà„Üö|ôÿ ÿ¿@¿ø= /exøÐ÷/\|\(÷>úÿÿ¿¿Ü÷!ÿ@¿„c|| „|øFDa'ø“˜/,¦©þGH° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(3~Xɲ¥Ë—0cÊœI³¦Í›8sêÜɳ§ÏŸ@ƒ J´(ÎF“*]Ê´©Ó§P£J )Õ«X³jÝʵ«×£-ˆýJ¶¬Ù³hÓbµºR¬—,¨K·®Ý»_Ù~pÛÒ‚„¸x L¸°M½|WZ8q⯄›*¸”L€eË,1ç¼ Àå啜;ó ý’3ÌТ¥jn‰ÚsgͰSEMº´ì«uÖ–™ÛuÔØ›o÷þ‰xì‡ÅŒ8¶Yáå‘+§Ž“:îé·Gg-zøêáM½þoçîÛinð™…¯iýôzôIÛ³WO´ø[äŒKˆ¡fsç‘9']z×Åfç½ö™ib'oÝe÷‚Rè`„×¥'_†¾!h!‡¦eßL ²ö™ˆ¸^y žâ‹ jx¡Œ61#w¶ˆ"Šö(š}4–ß œ @. ÉXœÐd“ÏAHŸŽ¤•È!•Ê·Wr©"y´™¥‡XÚÖ!™eòØåMVb#šðYgо9¦˜ä­i"Ž;î¸ …*ºxãœGc0À€d ß.u é¤L:ii”$æx&v{^YayqN)žbF(Û§k¢i"©}¢J¨nþ§nGè«®qš'—j (®º—go³ŽIç®|²däÇ€xpBv‘E™¤LV[œ¬Þªã¯7Ê*¨ª—m±®šªª—Ün¬¶8‚×f e¶Æâ­ ¦/u» "ºé¶ø'ž}Ú«†+ÙG‚¢ ˜°¬¢Ïú×´ÑeÊkºïb 0¿k/¿Û6èÇiv:1¾ o8ŸÈåÓ‰ž‚¬nÉÿ뱯i®0z,XhXb… À Š €ðÌE ¦fRŒêÄôÞÙª¨N?˜q·)Wî¦nÖ¼âʱŽL&­I“¬´°OkÍnvâù¯ÌfgŸ‘ ðEO6_Î~Ykþ×ýî»ïª¶þ1Œ€Óøò‡{šcƒý'²Î¬2^ãß2çíÚ, Îâ×½r®v¬>nß²n!œÀ ¦úê>Èúë`±ä–X È ûî¼'Ýûï‡ñ,€œ>  |À7ÏzÎÎG_°ð`@ XïÀºKïý÷à ¦Wøä—o>^㟯þúìo•~ûðÇ/¿QV‰`ÿýøç¯ÿþü÷ïÿÿ  HÀð€L ÈÀ:ð `ý"HÁ Zð‚Ì 7ÈÁzü GHšð„(L!C@ÜÏ…„¡dØ@ªp†1  I¸Ãúð‡þd!þ8óÂ""04û“¡u8D#R6ìa{¸DJ±†MìßÈÅ.ÞOˆNLb·ˆCý‘1‹ö;ãÕhÆ#ŠÑ€l< ·G/Úñ„`Lcõ˜FË01‰—1"[ˆF%ú‘ù«c‡hÃC"2StbqèÈ>VÒ‘Tüã#/YÄJÞñ“x\ ÿvXÅIþ/“ ã) ™ÊEš2’Y,¥ 8ÉZ°–³t¥*ý7ÇVºò–  ¦ ó8CHêò˜-4&2_¹ÊE–—Ï„#)KD2Ñ…Ød¥/™KnZ‰Ë”¤0Ç)Bb’Rƒ$äÃùÇ^Ó˜ÙÌ&-§)O>2ŠÔþt';£9Ëxâð'9ºAs®Ó›šÔ&2aéÎLúsža¬'?w©Å|*š µhB*Pgô£4h"séÑŠî“åe#}¹Ð„NÔ›+ÕdLÙ‰Rg2³™öìèMAÊÓŠô¢žT©2ýhÊ jq¦Êl©ÍØÈ†•—ª„fmŠTˆnRŸéì©VHÌ­zõ«.«Xƒ(ÊD¢fg… mIK(fp­I-!\a9Öº °«vÍ«^÷ÊW¼òõ¯€ ,Aý*ØÂö°*$,bËØÆ^Ð*ˆ¬d'KÙÊZö²˜Í¬f7ËÙÎzö³  ­hGKÚÒšö´¨M­jWËY«(éµ°þ­lgKÛÚÚö¶¸Í­nwËÛÞúö·À ®p‡KÜâW±ŽM®r—K@ä2÷¹Ð…®s£×êZ÷ºØÍ®v·ËÝîz÷»à ¯xÇK^¸ž@°ÓÕ!k×ËÞöº÷½ð¯|EpÞÀ¦×~C%ŒËßþú÷¿°€{ËÄúö¾ô½ c̸ß;øÁް„%LßÚbÀ…¶£eˆàgqfÁ/lð„GLâ›øÄJ¢//¬â;b ÂCz1-ñZÙûyœi±e’“äÖÇCry`!ÃÖÈFrlwœ +Ù¸OÖm”};eß¶Ø,ÎpX (c¾ø”µ_—§x®Š8?2¾qþVÐ`# ¹Ê¯E²œ‰ à*ÃÙ¿oVp÷<äÛ¢&ÈQöqhv«ä;ÏVЦ-œ¯Ü¿,Ñ­ø‹¬—é»aŒ™—(sYõ·ßˆÀÓ þ2g.=Ã6/·sæó³Š¬h ¿YÕ«î3¡Ok>»YÊq¦2kMkÙ2šŽŽb }?É®˜Ò—s 3<’:Öâ~ýê&W[Ö»®5¢•Äd3¹Û7ε·o n=¯zÇ×6÷µ‰\hk#úÛ€vr·Ÿ|k[s»Çåž÷íá=ƒ›Ý÷¶6¾¿ î»ÕÒö°³ŠåJ7Ì™µ´–Él8»¶L–ôM-k'÷¹ÞØæ5¼þÞä’ÇzÝnö¸ÉU~òtÓ™å o÷®c®jy«Öë>ùÇÅò—³\ÛwùËóse#ü×¼ €Ò—>l/'ûášóÄ_Xñ\ԟκ§£]‡xæ;Ïv¶S=t‘—]ç`ï¸Úƒ^ó²÷\ìo'ùÚÙŽíœÃîfO{ÜÉ>wU3:©Án!Ó™ÎÆˆ☕ú(p_\ë/‡=Íâ§½åæ†5¯óŽv¹W{ÐuŸ{žG¾ïë›ì2ç|çÝMïËÝÖüÎ7ÍÃÎyÔßÜôD×ò/øÁ7=€‰ŸºÄ£¾_-*éê‘Ï:×+ÿõÚ‹]ó|}½…Þú¶»öÞyöCþpÕÿ|ó<·þØŸý³w>îž}îWœp*Ýè ¯,ˆ÷·_â †ùQúã±ÎÿÉÝòÎ'}!}Ô§~¯·yBw~x×wˆsxy?÷yxv¨·röF˜€×†tœÖ~îihYóGç|Å7Jùgq›i'À·|Äq¨oØ} 8{ÚFƒñ†ƒ &hâ6p6Ho™ç}ñ&p¸hÐÇoFn¢—g;8€JnN(… vÅæ:DlbÖ`Çfiòf˜F)¸É'y–Ay1\ è`©Ç†6ˆboèj?Ø_aiX¸eÄ…À·…’Å_ÆKc¸‚ÅÖ‚eøi~Ôuþi‡xaÿ¦ˆŽ¨yV‡W(‰d…œ†_1F‰—±tdè‚.È|9öˆ¢8ФXŠ)ÖYwØEf‰ûƒ|žy Xj¦8‹´X‹®¦]”xC°u@÷Y3]À(X¬Væ´]úc‹È˜ŒÊXbè%ˆÁøŒÐèXÔX[5Ö˜Ú(L%_ÞøàŽâ8ŽäXŽæ(YµŒê¸ŽìØŽî[é([϶ôX\Àfú¸?„7u‚[%üXýƒ–†_ÊæUÙS iùE+¡‡‘– 9ŒÁô ‘þx‰ý³tä{ð@€e9Fð—@^7ˆÙ’öƒi¶þô·t¹?#i?JA%ùpoõBZhl"¨eiIZ˜?5æ’v… 9™“ä”ä<¹AO•‡}øS—o4YøóZHYWi”Àv“"5i“dÉ@³#•œv×E] Ô‡$˜Dqf•0&iGù•b“ i‘ú#’•i©@l9—ÆwdpÉ@aÖ–€hy8‚Åç•zIŒ9‚Êöl`–Ŧ™˜Qi’§T—Y˜RN燤¦‘ï&heÉt6f"è…+9™^¥”bù—ƒ •%´“‡×BAÖV ·• öš,H—ܶš¬I‚\Y ›²ÙS´Y‘>ô–SšÏ¢A›ecB™•)þg›scW‚CÙœõœÅö‘ 4˜>IFö?á9DÉ1F [ɘf¤fÕ‰“8‰ž^i‘ ž')žv–ÐÉ?ƒypÙ–q–…¶bÃèdtag9 åi…¨)šN‰›ƒ˜œ”ªUþ(”ÿ3’7yOþ#¢>YL¼ÙcÀ× qõMuäš”ˆšÛé{»é[h™:X•y^<*¡Z jä”ÌÇfÉT•FÙ ïi@,F¤V)i¬žé4x­ÉŸõ%œ9ÊSþø‡2ù£ii¤÷’ïô›õyŸ :E-Z¤^z¤ŠW¦©ŸÐÆ•ó‡£WJN©¥jV¤i”LŠp z¦ôyACz§|Øžþ,’”_Å&¨sêEYš%H])¹xx A„Ê@ä§ûƒ¨ìùŸqY©‹Ê¨;ªb/ÆbŠúIžš‘œÚ@rú© Ô¨•Wª.–ª^tª¬š\u*C°ªa²ªŠ»Z«†•¥4”«³Ú«@D«¾ÊXþhCÂz¬Ìj«¡º{Í­ÙHžbV^Öz­Øš­Úº­ÜÚ­Þú­àŠ­ÔʧçX®æz®èš®êº®ÍªôÇfüuaï8¯hfhôz¯(¯Çç®h¬ÀçcÍ*¯ÒJN±¨‚0Ÿ-¡Äú® ‘KE™WKž£ ¯ô°±{± ±yZXªÿh±”Ú±»@[² kX)Ëþ;Ä— K²„±'TT‡ID„M·tI˜„©D³€e³†ÄM9û±v²‹£ë¯ì·²XÄRç4U­$U)´Eµ%U-K°/+²ýê´W¶(KRÖµ$µS$dµ|%KÓ´MF[WH«‡1ɧb‹pu«@õDJXÅH8›N[—&+Xy;R„kS%Xq«´t˱w Ÿ;EµQ[¸U¸5¸m»P%X‰+| ˸Ñ)¹:¥MX{Bj{µ [U—X› l2ë@¥ËCL¥³M•µ<;»“Û¸ ¤·CkM5uX‰›Y­ ¸¸K¯[;P›[«²K¹Ú˜¦zµºïÊ´ì鼟þZ¼[¬]›´=ª§íÅfì¾ò¾â[¾æ ŽÛ+·} ¡áÚ¾îû¾ð¿ò;¿ôk­K·Æ¥¯øêŽ0¶¿þkŠýËz…Ô‹eöú¿¤À¼Àp¨À0[¥Á«˜ÌÀލÀ|ÁæÀüZžË«Ry8z@¨f6wdCeÀUÂ&c±‡ÂsˆÁ.l[̽H×ÁG½úújvw€®wb>˜s)¼v>ìƒýöÂD\[1¬¾1[©iÕhw÷v9gð6oS8ÄC<ÂçÖzÑ÷Ãå~B ~EüŹ·¯2,–4¼xKÜìÖÅÓgrÚ‡Ã÷ÆÛ'Ä=¼oßz¨ÅöénP¬g Æ |Äþ«ZÆ€d vˆoçvƒ5Ø}j,r|<…‹ĉÜÀ@ÜÆ:ìÇ~ Èàya~$ȱ©Õšk }?øÈhv¤áî]™ý½àžá÷úà †áþáíÈá‰áÄ â&¾Ž"¾q~â,^‹)b+Þâ2NŠ/.Ôä=ã8^Š5þÔ7žã>îˆ;ßkôãD‡ANâcZäJ>bGãKþä;unixODBC-2.2.14-p2/doc/UserManual/index.html0100644000076400007640000004455310601020343017013 0ustar nicknick

unixODBC


USER MANUAL



Welcome to the unixODBC User Manual.  This manual is targeted toward people who will be using unixODBC to access data sources from tools and applications which have been developed by others. This manual compliments the Administrator Manual and the Programmer Manual, each of which is geared for a more technical audience.

Getting Started

At this point unixODBC has been installed by your System Administrator. Your System Administrator should have installed and registered at least one ODBC Driver (we will assume that the ODBC Text File Driver has been installed). Your System Administrator accomplished this by following the directions laid out in the Administrator Manual.

You will need an account on the UNIX/Linux machine; this is also provided by your System Administrator. In fact, if you run into problems at any point in this manual then you should refer to your System Administrator to ensure that all required software is installed, accounts given and privileges granted. You may also want to talk to your Database Administrator (DBA) to ensure that you have access to your database and to resolve any questions about which driver to use and what options to set.

UNIX users can be given a wide variety of methods to access their account resources and these access methods usually fall into one of two categories.

1. shell account (telnet and terminal sessions)
2. graphical desktop

If you are limited to a shell account then you will not be able to use the ODBCConfig and the DataManager tools.

We are now ready to start using the unixODBC tools. The first thing you should do is verify that you have a working System DSN. If you do not; then you should create a User DSN. These tasks can be accomplished using the ODBCConfig tool.

Using ODBCConfig

The ODBCConfig tool is designed to allow you to easily setup a Data Source (DSN). DSN's act as an access point for getting to your data. In many cases; creating a DSN is as simple as picking a Driver to use, selecting a Server, and entering a Name for the DSN. In fact; DSN stands for Data Source Name.

You should find using the ODBCConfig tool to be quite intuitive because of the simple Graphical User Interface (see Figure 1) but you must understand a few terms before getting started.
 


Figure 1

User DSN

These are your personal Data Sources. You are able to; Add new ones, Remove existing ones, and Configure existing ones. User DSN information is stored in a secret location where only you can access them. Keeping your User DSN's separate from other User DSN's allows you a great deal of flexibility and control over creating and working with Data Sources which are only important to you.

System DSN

These are created by the System Administrator. They act very much like the User DSN's but with three important differences.

1. ONLY the System Administrator can; Add, Remove and Configure System DSN's.
2. System DSN's will be used only if the DSN does not exist as a User DSN. In other words; your User DSN has precedence over the System DSN.
3. Everyone, logged into the ODBC enabled computer, shares the same list of System DSN's.

Drivers

Drivers contain the special code required to talk to the specific type of database you will work with. The Drivers often come from the vendor of the database but may also be found in the unixODBC package. Your System Administrator is the only user who can install and register a Driver. You will select a Driver to use when adding a new DSN.

Add a DSN

You will want to ensure that you have at least one working DSN. Here is a quick step-by-step guide to creating your first User DSN. We will not actually use it yet because that will involve using other tools and we have not talked about them yet.

1. Execute ODBCConfig

This can be done in a variety of ways. If you know that you have an icon or menu item for ODBCConfig on your desktop then execute it using one of these methods. If you do not; then start a shell and enter the command ODBCConfig. You should see a window popup (see Figure 1).

2. Add

Click on the User DSN tab to ensure that you are working with User DSNs. Click on the Add button. Select a Driver from the list. If the list is empty then contact your System Administrator; only the System Administrator can add Drivers. For this example we will try to use the Text File Driver. Select the Text File Driver if you have it available.

3. Edit Options

You should be presented with a list of DSN options which you can edit.  Figure 2 shows the options for the Text File Driver but you may have a different set of options if you selected a different driver. Common options are; Name (a unique name must be entered). Description, Trace and TraceFile.
 
 


Figure 2

Enter a unique name, enter a comment, turn Trace off and click Ok to save it. You may click on Configure, at the main window, to come back to these options at any time in the future. Notice that the Database in Figure-2 is /home/pharvey/test.db. You should ensure that this points to something like; /home/YourLoginID/test.db where you replace YourLoginID with your ID. The test.db file should not already exist (for the purposes of this excercise); it will be created for you. This is how to create a new database using the ODBC Text File Driver.

4. Your Done

Notice that you now have your new DSN listed in the main form. This means that you can try to use it in any tool or application which uses ODBC DSNs for data access. This includes many applications such as Word Processors and Spread Sheets. You may want to test your DSN using the DataManager.

Summary

ODBCConfig is a useful tool for PowerUsers but it is simple enough for almost any user to use. ODBCConfig exposes the most important reason for using ODBC to access your data; the ability for you or your System Administrator to change the Data Source for your tools and applications. Please take some time to get familiar with ODBCConfig and your Driver options, perhaps sit with someone who is a bit more technical and talk about it for one or two minutes. You will be rewarded.

Using DataManager

The DataManager is a great, graphical, tool for exploring your Data Sources. It allows you to explore you Data Sources in a similar manner to exploring your file system. The DataManager ( see Figure 6 ) is split into two views. On the left hand side you have a Tree View'. The Tree View is where you can drill down to the information that interests you. On the right hand side you have a Detail View. The Detail View shows any details that may be available for the selected item in the Tree View.

Just like ODBCConfig, you can execute the DataManager in a variety of ways. One way is to go to a shell and enter the command DataManager. This should bring up a window that looks similar to Figure 6.
 


Figure 6

Next; expand the nodes to drill down to the information that interests you. You will be asked to login if you try to drill past a Data Source. If this happens, enter the login ID and Password provided by your Database Administrator or System Administrator. You will know that you are logged in when the little computer screen changes from Red to Green.

One of the interesting Detail Views occurs when you select a Data Source item in the Tree View when you are logged into it (the little computer screen is Green). The Detail View is an SQL editor. This is only useful if you know the SQL command language but for those that do... it can be very handy.

Summary

The DataManager tool is a good way to test a DSN and then to see what resources are available inside the Data Source. It is also very easy to use.
 

Using isql

This is a command line tool. This means that you can use it even if you are not working on a Graphical Desktop (for example; in a telnet session). This tool is designed for more advanced uses of unixODBC. You can use isql to test a connection but it is designed to be used by those experienced with the Structured Query Language (SQL). You probably will not want to use this tool if you are unfamiliar with SQL.

isql allows you to;

1. connect to your Data Source (using a DSN)
2. send SQL commands to the Data Source
3. receive results from the Data Source

This tool can act in batch mode or interactive mode. Figure 3 shows a simple, interactive, session.
 
 


Figure 3

Figure 4 shows an example of isql being used in batch mode. Notice that it is being told to run a similar query as above but this time it is coming from a file ( My.sql ).
 
 


Figure 4

The example, in Figure 4, is also formatting the results into an HTML table and is sending them to a new file ( My.html ). Figure 5 shows the resulting html table.
 

vcCompanyName

vcCompanyStreet

vcCompanyCity

vcCompanyProvince

vcCompanyPostalCode

XYZ Company

XYZ Street




Another Company





CodeByDesign





Figure 5

Summary

isql is a powerful tool for working SQL to access your Data Source but it is more for the advanced user.

StarOffice 5

StarOffice is an application similar in goals to MS Office. A free version, for non-commercial use, can be downloaded from StarDivisions web site. Figure 7 shows a PostgreSQL table being browsed in StarOffice. StarOffice can use ODBC data but it can be tricky to get going. Here are some things to note about using StarOffice with unixODBC. Make sure that unixODBC is installed on your machine before trying to use StarOffice ODBC on UNIX.
 


Figure 7

Q. StarOffice disappears when I try to load a list of ODBC DSNs and I get an error in my terminal window about some library file missing?

A. If you have StarOffice 5.0 you may want to try adding this to your soffice start script export LD_PRELOAD=/usr/lib/libodbc.so  Your soffice start script can be found in Office50/bin/sofficeand can be edited with any text editor. If you are not sure of where libodbc.so is or where soffice is then you may want to use the UNIX find command.

However with the release of StarOffice 5.1 and beyond all you need to do is to add the path to the libodbc.so to either /etc/ld.so.conf or to your LD_LIBRARY_PATH environment variable.

Q. Do all ODBC drivers work with StarOffice?

A. No. StarOffice is very demanding upon an ODBC driver. StarOffice needs many ODBC features in order to accept a driver. Two drivers which are known to work are; 1. PostgreSQL and 2. MySQL. People are actively working on other drivers.

Summary

StarOffice is a rising 'star' in the UNIX world. You can combine StarOffice with unixODBC to get at your data. With StarOffice and unixODBC you can pull your data into a Spreadsheet, Word Processor or even create Web forms based upon your data.

Conclusion

unixODBC comes with a variety of useful and powerful tools to allow you to configure you ODBC access and to work with your ODBC data. Familiarity with these tools is a great start to using your ODBC in applications such as word processors, spreadsheets and even applications developed at your company of employ. I hope you enjoy them! Please email comments and/or suggestions to me, Peter Harvey.



 
 

unixODBC-2.2.14-p2/doc/UserManual/unixODBC.gif0100644000076400007640000000153207363332160017124 0ustar nicknickGIF89a ÂÀÀÀøøÐløÿÿÿÿÿÿÿÿÿ!ÿ NETSCAPE2.0!þMade with GIMP!ù , ¬ºÜþ†Ig¼ŠŽÍ·ÅÍÔŠ$Y}R¦±¶/LÜwµ€[«¸ Œ×óýJBËøCÅ’¹]óCF‹5ÖÎÕÀO.Ï«"îªÐ1Ê3{„…cÁJyゼ>ov[ñ{z}!vJ{ƒ[‡ˆ|fDbŽr+Œ;•‰…W”›‰žZ=¡ˆ’p`¦¨Ÿ„¬‰†u«±aŠnµ›1& gº¢¸¾ÃäÇ !ù , ­ºÌñ0´IÝ8ÆZ/ÎÐ J\ã}™¨Ždy¢B°®À¨<«u‡ç;šï÷yy”tM”˘®ÙR@‘¦ÓAì²Áê5'–Ëq‘3µÔöñ-}Ñ/˜÷‰þ.«&siX€_f‚Vc`BiP^••Y€”7–—2…š” ¦¦I§«¨{i¬°ž…V±¬®&µ­v_¹¡»‰¹š¿‰¥§Ã’oÈÌ !ù , ­ºÜÑ0JÞ¼² Q+ÆÝ&nÝGUD0®¤°ÊÎÞÀé¬s®ƒ§²ÝªFùÅ‚BQ€2“â(Cêz·iÇÚY²ÚïBsU€Ë±×<ÚÖç_šoÏÇÛ-‡iÏä€%q8[‰‚\m…ˆŠ€ƒ)‘‹lv5˜.„…’—ž’xv¥˜œ¡)©‘ F¤®D‡²´¥¶–[®£¾»À¹£w&y%&ËÌ !ù , µÈI«½xºïYöDiš^X‘ä颛*µo]Æagï~é¼â ò†3 ±†—'20 ¹F×€€µª>Qœ‘` Ò ÎèOoå»ËN´¼êœjÝoóüÜœáÿ1T{}ux ‚s„~†8‰Š"†dzƒ‘’Ž{|p…—D™^p’[] š£¤¥Ÿ§^ªy¦ ©ªMƒw´¶Š¯„§¸‹¿™Á‡‹IŗȬ¡Æœ2#mdÐ2l#Ö;unixODBC-2.2.14-p2/doc/lst/0040755000076400007640000000000011150523346013547 5ustar nicknickunixODBC-2.2.14-p2/doc/lst/Makefile.am0100644000076400007640000000103207363332161015600 0ustar nicknickEXTRA_DIST = \ InternalStructure.gif \ InternalStructure.html \ InternalStructure.vsd \ InternalStructure2.gif \ InternalStructure2.html \ InternalStructure3.gif \ InternalStructure3.html \ InternalStructure4.gif \ InternalStructure4.html \ InternalStructure5.gif \ InternalStructure5.html \ InternalStructure6.gif \ InternalStructure6.html \ InternalStructure7.gif \ InternalStructure7.html \ InternalStructure8.gif \ InternalStructure8.html \ InternalStructure9.gif \ InternalStructure9.html \ back.gif \ next.gif unixODBC-2.2.14-p2/doc/lst/Makefile.in0100644000076400007640000002463611111035251015612 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = doc/lst DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = \ InternalStructure.gif \ InternalStructure.html \ InternalStructure.vsd \ InternalStructure2.gif \ InternalStructure2.html \ InternalStructure3.gif \ InternalStructure3.html \ InternalStructure4.gif \ InternalStructure4.html \ InternalStructure5.gif \ InternalStructure5.html \ InternalStructure6.gif \ InternalStructure6.html \ InternalStructure7.gif \ InternalStructure7.html \ InternalStructure8.gif \ InternalStructure8.html \ InternalStructure9.gif \ InternalStructure9.html \ back.gif \ next.gif all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/lst/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/lst/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) 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-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .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-exec install-exec-am \ install-info install-info-am install-man 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-info-am # 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: unixODBC-2.2.14-p2/doc/lst/InternalStructure.gif0100755000076400007640000000445007363332160017741 0ustar nicknickGIF89aÏü÷ÿ@€ÿ @ € ÿ@@@@€@ÿ``@`€`ÿ€€@€€€ÿ  @ € ÿÀÀ@À€Àÿÿÿ@ÿ€ÿÿ @ € ÿ @ € ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿ@@@@€@ÿ@ @ @@ €@ ÿ@@@@@@@€@@ÿ@`@`@@`€@`ÿ@€@€@@€€@€ÿ@ @ @@ €@ ÿ@À@À@@À€@Àÿ@ÿ@ÿ@@ÿ€@ÿÿ``@`€`ÿ` ` @` €` ÿ`@`@@`@€`@ÿ````@``€``ÿ`€`€@`€€`€ÿ` ` @` €` ÿ`À`À@`À€`Àÿ`ÿ`ÿ@`ÿ€`ÿÿ€€@€€€ÿ€ € @€ €€ ÿ€@€@@€@€€@ÿ€`€`@€`€€`ÿ€€€€@€€€€€ÿ€ € @€ €€ ÿ€À€À@€À€€Àÿ€ÿ€ÿ@€ÿ€€ÿÿ  @ € ÿ    @  €  ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿÀÀ@À€ÀÿÀ À @À €À ÿÀ@À@@À@€À@ÿÀ`À`@À`€À`ÿÀ€À€@À€€À€ÿÀ À @À €À ÿÀÀÀÀ@ÀÀ€ÀÀÿÀÿÀÿ@Àÿ€Àÿÿÿÿ@ÿ€ÿÿÿ ÿ @ÿ €ÿ ÿÿ@ÿ@@ÿ@€ÿ@ÿÿ`ÿ`@ÿ`€ÿ`ÿÿ€ÿ€@ÿ€€ÿ€ÿÿ ÿ @ÿ €ÿ ÿÿÀÿÀ@ÿÀ€ÿÀÿÿÿÿÿ@ÿÿ€ÿÿÿ!ùÿ,Ïü@þÿ H° Áƒ*\Ȱ¡Ã‡#JœHQ €‹3jÜ8ð"Ž CŠ´ˆq¤É“$?¢\ɡǖ03¾ŒIåÌšUâ,xs§O™% Ít¨Q‡=Wª\š³)Í™“*ujͪD£Zõ‰ukË® £õ,Ù“f#ŠM{¶­[‰kãÊ»ö­Ý»lÕŽ5ÈÔåÝ¿#o þUgÝ”€o¥Ë¸q^ÅÊL¹2O±–3{}ü³æÏ=74Û÷ NШýX¸#fĨcstL{®ìÛ0'ãÞ-ù5ïße÷š>ü4ðã|‰5Î×bBæÈñ®vN˜zßë°£kOY»»òíà/þO^ãøòè³vFú=ýgÑ IS7í¾íàêø±ç·Þ¾¾eïBç߀ŠÁ'›ä!˜Z*šƒÛA8‘o\18 „™G xõI×…þö؇†È„bx”Š•±ÈVº7"{ÆH™‹„½¦ŸaÖõˆŸ¹M·_ްíh"∤ft-iã‘NfbFÙ"”ñéè#Cêg¥I÷]·TIFRùe’Xžy mjÊhf›R¾éTXi¹އíØÑ–>Ú¹žuúiŸ’‚¾Õd¡àŠèfý•F§œ‹VihZv¹§¥CF —¢ÅiêiE†*ê¨Þ©Ihb§Þ–ê_«ÆÖª]þ¯¢Ù!§ÚÅê–­LÒ§©ºÂõãO¸îz'OBû_¯W"+¢²~ÍÙÜSºùª—MMúgQÎjínX‘˜ž±ŒÊ™mtà.å¸Ü2 ™‚ÞâV®U*²ùžºêÊ𤿫o¾ î+ï§TY(0½o:)¤ï¬^`•–fœ£ùmëé}—n›”Ä _Ëe™zæˆqÆ"ú1ÈÀŽL²¡ž|ì¡*¯œrË.à «¿ÑÊSZ\>jóU Z›0È"CÕçÃóñ·³k9÷I#±Gƒ)$Ç|zÜt&»DðÔVuÉ0n-Ë^ßÚnØ3_Mv–4£{v¿>föÔlåõsÆA“94ÓDÙ4þÅJ»÷Ú…uÅüi 8Òiw}8No/ÎöÜŽ#^säCMNùŠo¸Ú—£=Ú¯ eðŒ~w8³yÞíTÞ¢×*$á”þmzèOuëo®øì¼÷º¯;¯ÂO3ñÚ"ï¦áä6Ž2óÈáθóóBŸ¬òßRŸ«õ7j/löÜ/þºÞ¯œü™Òó<~ºë£ZþõÀ‚~çûÝ·ú¥\cÏ8þ’ê_^úgàÍèR€î³ÿä·@–XnCÓzÝ‹(¹—ˆ‚˜rMѾ² .ïf…Ó¥–ªï|âÙÝÿˆ9*q.z,ìÍ›^(>>J…Ç1¡M46àèP)þX¢¡¬>x:®i„b«š·ÈA&Ð^„øBÖC)¢'^ÿ2Ís¯êâŸÆ2ŠêqÃû]é²45z.> ì”uÆÆ5ΑŒk#ïw8‘UéG†ÁHaœø$Ô5l>t™Æ¸ ð]¬ƒ§‘ ɾBì t£à0Õ1J¢¯v¼] æÇ;â1x¦ LST - Doubly Linked List
LST
Doubly Linked List

LST - Doubly Linked List

Description

This diagram depicts a single, doubly linked, list with 4 items. The actual data being stored in each item is pointed to by pData. Doubly Linked lists are great for storing  things in memory. LST makes working with a linked list very easy. The following pages will describe more advanced features of LST such as cursors.

Related Functions

lstOpen, lstClose, lstAppend, lstFirst, lstEOL, lstNext, lstGet


[Next]

Page 1 of 9

unixODBC-2.2.14-p2/doc/lst/InternalStructure.vsd0100755000076400007640000000000611055554411017757 0ustar nicknickÐÏࡱunixODBC-2.2.14-p2/doc/lst/InternalStructure2.gif0100755000076400007640000000161011055554411020014 0ustar nicknickGIF89a¯÷÷ÿ@€ÿ @ € ÿ@@@@€@ÿ``@`€`ÿ€€@€€€ÿ  @ € ÿÀÀ@À€Àÿÿÿ@ÿ€ÿÿ @ € ÿ @ € ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿ@@@@€@ÿ@ @ @@ €@ ÿ@@@@@@@€@@ÿ@`@`@@`€@`ÿ@€@€@@€€@€ÿ@ @ @@ €@ ÿ@À@À@@À€@Àÿ@ÿ@ÿ@@ÿ€@ÿÿ``@`€`ÿ` ` @` €` ÿ`@`@@`@€`@ÿ````@``€``ÿ`€`€@`€€`€ÿ` ` @` €` ÿ`À`À@`À€`Àÿ`ÿ`ÿ@`ÿ€`ÿÿ€€@€€€ÿ€ € @€ €€ ÿ€@€@@€@€€@ÿ€`€`@€`€€`ÿ€€€€@€€€€€ÿ€ € @€ €€ ÿ€À€À@€À€€Àÿ€ÿ€ÿ@€ÿ€€ÿÿ  @ € ÿ    @  €  ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿÀÀ@À€ÀÿÀ À @À €À ÿÀ@À@@À@€À@ÿÀ`À`@À`€À`ÿÀ€À€@À€€À€ÿÀ À @À €À ÿÀÀÀÀ@ÀÀ€ÀÀÿÀÿÀÿ@Àÿ€Àÿÿÿÿ@ÿ€ÿÿÿ ÿ @ÿ €ÿ ÿÿ@ÿ@@ÿ@€ÿ@ÿÿ`ÿ`@ÿ`€ÿ`ÿÿ€ÿ€@ÿ€€ÿ€ÿÿ ÿ @ÿ €ÿ ÿÿÀÿÀ@ÿÀ€ÿÀÿÿÿÿÿ@ÿÿ€ÿÿÿ!ùÿ,¯÷@þÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱã? =Š ÀÈ“(E6HÉòâÊ–0=–ŒIÓáÌš8s|©³çNŸ@Þ šs(Ñ£y"¥©téQ£NYBJbÓª'¯b-unixODBC-2.2.14-p2/doc/lst/InternalStructure2.html0100755000076400007640000000340007363332161020215 0ustar nicknick LST - Cursor - Add B
LST
Cursor
Add B

LST - Cursor - Add B


Description

This diagram depicts a cursor (B) which is based upon the root list (A). The cursor was created with a call to lstOpenCursor(). This cursor contains a subset of items from the base list because a filter function was provided. Cursors can be manipulated using the same functions as a normal list and they are closed with a simple call to lstClose().

The pData in cursor items refer directly to the corresponding item in the root list. Reference counters are increased in the base list (A) and in each item. This prevents underlying data from being deleted while a derived cursor is still in use.

Related Functions

lstOpenCursor


[Back][Next]

Page 2 of 9

unixODBC-2.2.14-p2/doc/lst/InternalStructure3.gif0100755000076400007640000000242011055554411020015 0ustar nicknickGIF89a‡÷÷ÿ@€ÿ @ € ÿ@@@@€@ÿ``@`€`ÿ€€@€€€ÿ  @ € ÿÀÀ@À€Àÿÿÿ@ÿ€ÿÿ @ € ÿ @ € ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿ@@@@€@ÿ@ @ @@ €@ ÿ@@@@@@@€@@ÿ@`@`@@`€@`ÿ@€@€@@€€@€ÿ@ @ @@ €@ ÿ@À@À@@À€@Àÿ@ÿ@ÿ@@ÿ€@ÿÿ``@`€`ÿ` ` @` €` ÿ`@`@@`@€`@ÿ````@``€``ÿ`€`€@`€€`€ÿ` ` @` €` ÿ`À`À@`À€`Àÿ`ÿ`ÿ@`ÿ€`ÿÿ€€@€€€ÿ€ € @€ €€ ÿ€@€@@€@€€@ÿ€`€`@€`€€`ÿ€€€€@€€€€€ÿ€ € @€ €€ ÿ€À€À@€À€€Àÿ€ÿ€ÿ@€ÿ€€ÿÿ  @ € ÿ    @  €  ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿÀÀ@À€ÀÿÀ À @À €À ÿÀ@À@@À@€À@ÿÀ`À`@À`€À`ÿÀ€À€@À€€À€ÿÀ À @À €À ÿÀÀÀÀ@ÀÀ€ÀÀÿÀÿÀÿ@Àÿ€Àÿÿÿÿ@ÿ€ÿÿÿ ÿ @ÿ €ÿ ÿÿ@ÿ@@ÿ@€ÿ@ÿÿ`ÿ`@ÿ`€ÿ`ÿÿ€ÿ€@ÿ€€ÿ€ÿÿ ÿ @ÿ €ÿ ÿÿÀÿÀ@ÿÀ€ÿÀÿÿÿÿÿ@ÿÿ€ÿÿÿ!ùÿ,‡÷@þÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠi€I’()š²¥Ë ^Êds¦M5oê˜s§Ï‰+Ú *´(ÄžF["MÊÔàÒ¦#ŸBeJtªÈªV§JÍÊq+ן^¿f +vèÉ™Xe¦-+”,È•,uºeûr®Ç¸ñÊ´KåÚUõþƒ{–äß¾o cå[²°`ÅJÛl@9'ãÆxŽ,Ùçá΃n]—4Æ¥—MWL­š êÖ† gÌ,eÜÛm×ÞÍû®ìÜpaãäH{°ñãzu#Ï+Ò.káNGǽü¸õæŸCÏû{»ÂÏGþ{¨]uyç%§'}~}_ðã¹ ^¨X|üƒîÕ7§?¿~1Uv߀Á—ÛC¨`Bsu§ þ×Ð|Fx_‚ah¡…¢·á‡®HŸcÌÕvQ‹ bbÓñFÝ‹½}VŸ}+šW"Œƒ¡èbˆUÖa"Þ¸cu8Â$l3&©¤’,Îx$büuæã“rQiå€K^Yš•SjI“—`R¹$…aÔe™=ªè?¢éævcnGVq µù&LjF5¡ƒ ÞéçŸ&& ÕvªÑ”lzøQX•˜£mg¥¥¡”zgDº¨cuŠ>Xh¥õ„ã¨CunixODBC-2.2.14-p2/doc/lst/InternalStructure3.html0100755000076400007640000000357307363332161020231 0ustar nicknick LST - Cursor On Cursor - Add C
LST
Cursor On Cursor
Add C

LST - Cursor On Cursor - Add C

Description

This diagram depicts a cursor (C) which is based upon another cursor (B). It shows how a list can be incrementally reduced using calls to lstOpenCursor() with a filter function.

Notice that the item (C1) is a direct reference to the root list (A) even though the cursor is based upon (B).

Symantics

(B) and (C) are cursors.

(C) is based upon (B).

(B) is the base list for (C).

(A) is the root list for (B) and (C).

(A) is the base list for (B).

Related Functions

lstOpenCursor()


[Back][Next]

Page 3 of 9

unixODBC-2.2.14-p2/doc/lst/InternalStructure4.gif0100755000076400007640000000167411055554411020030 0ustar nicknickGIF89aŒ&÷ÿ@€ÿ @ € ÿ@@@@€@ÿ``@`€`ÿ€€@€€€ÿ  @ € ÿÀÀ@À€Àÿÿÿ@ÿ€ÿÿ @ € ÿ @ € ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿ@@@@€@ÿ@ @ @@ €@ ÿ@@@@@@@€@@ÿ@`@`@@`€@`ÿ@€@€@@€€@€ÿ@ @ @@ €@ ÿ@À@À@@À€@Àÿ@ÿ@ÿ@@ÿ€@ÿÿ``@`€`ÿ` ` @` €` ÿ`@`@@`@€`@ÿ````@``€``ÿ`€`€@`€€`€ÿ` ` @` €` ÿ`À`À@`À€`Àÿ`ÿ`ÿ@`ÿ€`ÿÿ€€@€€€ÿ€ € @€ €€ ÿ€@€@@€@€€@ÿ€`€`@€`€€`ÿ€€€€@€€€€€ÿ€ € @€ €€ ÿ€À€À@€À€€Àÿ€ÿ€ÿ@€ÿ€€ÿÿ  @ € ÿ    @  €  ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿÀÀ@À€ÀÿÀ À @À €À ÿÀ@À@@À@€À@ÿÀ`À`@À`€À`ÿÀ€À€@À€€À€ÿÀ À @À €À ÿÀÀÀÀ@ÀÀ€ÀÀÿÀÿÀÿ@Àÿ€Àÿÿÿÿ@ÿ€ÿÿÿ ÿ @ÿ €ÿ ÿÿ@ÿ@@ÿ@€ÿ@ÿÿ`ÿ`@ÿ`€ÿ`ÿÿ€ÿ€@ÿ€€ÿ€ÿÿ ÿ @ÿ €ÿ ÿÿÀÿÀ@ÿÀ€ÿÀÿÿÿÿÿ@ÿÿ€ÿÿÿ!ùÿ,Œ&@þÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠy±É“M¢\ÉòŸÊ–0¾ŒI³ãÌš8oâÜ™Q'Ï–> mt(É¢F“Dªô#Ó¦P]Ò ôiÔªSR­iõ*Ï®ˆ›Ó«Y‚`ÏNL«h[lߢŒ+—!ݺsñrTyW/Å:ûú]*Pð`ˆ€ unixODBC-2.2.14-p2/doc/lst/InternalStructure4.html0100755000076400007640000000341007363332161020220 0ustar nicknick LST - Cursor On Cursor - Add C2
LST
Cursor On Cursor
Add C2


LST - Cursor On Cursor - Add C2

Description

This diagram depicts what happens when a new item (C2) is appended to a cursor list (C) using lstAppend().

Notice that the item is appended to the root list and a reference item is added to the cursor list. No intermediate lists are affected.

A call to lstGet on (C) while the current item is (C2) would return the pData in (A5).

Related Functions

lstAppend, lstInsert, lstGet


[Back][Next]

Page 4 of 9

unixODBC-2.2.14-p2/doc/lst/InternalStructure5.gif0100755000076400007640000000237011055554411020023 0ustar nicknickGIF89a‰V÷ÿ@€ÿ @ € ÿ@@@@€@ÿ``@`€`ÿ€€@€€€ÿ  @ € ÿÀÀ@À€Àÿÿÿ@ÿ€ÿÿ @ € ÿ @ € ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿ@@@@€@ÿ@ @ @@ €@ ÿ@@@@@@@€@@ÿ@`@`@@`€@`ÿ@€@€@@€€@€ÿ@ @ @@ €@ ÿ@À@À@@À€@Àÿ@ÿ@ÿ@@ÿ€@ÿÿ``@`€`ÿ` ` @` €` ÿ`@`@@`@€`@ÿ````@``€``ÿ`€`€@`€€`€ÿ` ` @` €` ÿ`À`À@`À€`Àÿ`ÿ`ÿ@`ÿ€`ÿÿ€€@€€€ÿ€ € @€ €€ ÿ€@€@@€@€€@ÿ€`€`@€`€€`ÿ€€€€@€€€€€ÿ€ € @€ €€ ÿ€À€À@€À€€Àÿ€ÿ€ÿ@€ÿ€€ÿÿ  @ € ÿ    @  €  ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿÀÀ@À€ÀÿÀ À @À €À ÿÀ@À@@À@€À@ÿÀ`À`@À`€À`ÿÀ€À€@À€€À€ÿÀ À @À €À ÿÀÀÀÀ@ÀÀ€ÀÀÿÀÿÀÿ@Àÿ€Àÿÿÿÿ@ÿ€ÿÿÿ ÿ @ÿ €ÿ ÿÿ@ÿ@@ÿ@€ÿ@ÿÿ`ÿ`@ÿ`€ÿ`ÿÿ€ÿ€@ÿ€€ÿ€ÿÿ ÿ @ÿ €ÿ ÿÿÀÿÀ@ÿÀ€ÿÀÿÿÿÿÿ@ÿÿ€ÿÿÿ!ùÿ,‰V@þÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI±É“M¢\ÉR Ê–0¾ŒI³ãÌš8oâÜyQ'O–> utèÈ¢F“Dªô#Ó¦MŸ‚ðS*Ô¡V=R¸5fÖ«;¿v@–lM±`s¦=ºv-Ú¶ßÂE)w.úvIâÍ{På^¾%uþ<Ðï`Âq Für1â”»þ3;™+Wªe/¤,Ù¦BÇ:–ÌÙòdÌœ»–ùthÅ#Uo¥¬ùôl½w_ãÖ]r¢ëÇ¿çÖ ž—8\¼Æí&O»x9TçW]C:ý¹Óê<±'5Þ@;LïXéþ‚gË»wOÖåÓoÌÚY´ú÷è¶ÿ ¿þyùÇÛ7:³ó툂u·ß€ ½äŸiÊÔ~®d`Aÿ%ˆ_ƒéÚ‚2ŸxfH݆†xׂ W¢ˆÛ‘È ‡+Vˆâ‹ž…x"ŒµÈ†2ªh#<ˆc°‰ÕŒßéhä‘Hþ(¤zRÍçÞ’)y\CNÒe[$*¸CeÑ–Û•.n!‚‰)¶£}DÒ%&AæGPš`ö ›d–IeœÌ˜‘”xZħ1xfŸoêIè¡9 úÞŸvéåYŠunixODBC-2.2.14-p2/doc/lst/InternalStructure5.html0100755000076400007640000000311007363332161020216 0ustar nicknick LST - Cursor On Cursor - Add B3
LST
Cursor On Cursor
Add B3


LST - Cursor On Cursor - Add B3

Description

This diagram depicts what happens when a new item (B3) is added to cursor list (B) which is also a base list (for C).

Notice that the addition of a new item in a base list has no immediate affect on the derived list (C).

Related Functions

lstAppend, lstInsert


[Back][Next]

Page 5 of 9

unixODBC-2.2.14-p2/doc/lst/InternalStructure6.gif0100755000076400007640000000221511055554411020022 0ustar nicknickGIF89aˆQ÷ÿ@€ÿ @ € ÿ@@@@€@ÿ``@`€`ÿ€€@€€€ÿ  @ € ÿÀÀ@À€Àÿÿÿ@ÿ€ÿÿ @ € ÿ @ € ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿ@@@@€@ÿ@ @ @@ €@ ÿ@@@@@@@€@@ÿ@`@`@@`€@`ÿ@€@€@@€€@€ÿ@ @ @@ €@ ÿ@À@À@@À€@Àÿ@ÿ@ÿ@@ÿ€@ÿÿ``@`€`ÿ` ` @` €` ÿ`@`@@`@€`@ÿ````@``€``ÿ`€`€@`€€`€ÿ` ` @` €` ÿ`À`À@`À€`Àÿ`ÿ`ÿ@`ÿ€`ÿÿ€€@€€€ÿ€ € @€ €€ ÿ€@€@@€@€€@ÿ€`€`@€`€€`ÿ€€€€@€€€€€ÿ€ € @€ €€ ÿ€À€À@€À€€Àÿ€ÿ€ÿ@€ÿ€€ÿÿ  @ € ÿ    @  €  ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿÀÀ@À€ÀÿÀ À @À €À ÿÀ@À@@À@€À@ÿÀ`À`@À`€À`ÿÀ€À€@À€€À€ÿÀ À @À €À ÿÀÀÀÀ@ÀÀ€ÀÀÿÀÿÀÿ@Àÿ€Àÿÿÿÿ@ÿ€ÿÿÿ ÿ @ÿ €ÿ ÿÿ@ÿ@@ÿ@€ÿ@ÿÿ`ÿ`@ÿ`€ÿ`ÿÿ€ÿ€@ÿ€€ÿ€ÿÿ ÿ @ÿ €ÿ ÿÿÀÿÀ@ÿÀ€ÿÀÿÿÿÿÿ@ÿÿ€ÿÿÿ!ùÿ,ˆQ@þÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠ9±É“M¢\ÉR Ê–0¾ŒI³ãÌš8oâÜiQ'O–> utèÈ¢F“Dªô#Ó¦JŸ‚ðS*Ô¡V=R¸5fÖ«;¿v@–lM±`Ϧ=ºv-Ú¶ßÂE)w.úvÙæå¨ïÞ”:ýþ%ØWð`ˆk|iXqJŽ]ÿ™•Ì•+Õ²–NŽlSacÇw!Ü\YòåÍ]Iƒ|úôÁÖSoœÙôl’¬]‹„÷-oÅ¿çÖ Þ[÷ããÆ)oûy9XçiyC7:ý¹ÓêU“K\Þ»Zíˆéþz_9>êEâåÁ_ÍÊyazõv¿¶÷ ¿¾rˆóeÚßZsÁÛÖ"4g(SwïH×hÿ•¦ Cù9¸Wp°1há…!yÇ`ƒ„^ˆ$zö!ˆ% XbReaÆß‡+:ãŒ=…¨"цc€unixODBC-2.2.14-p2/doc/lst/InternalStructure6.html0100755000076400007640000000375007363332161020231 0ustar nicknick LST - Cursor On Cursor - Del B2
LST
Cursor On Cursor
Del B2


LST - Cursor On Cursor - Del B2

Description

This diagram depicts what happens when an item (B2) is deleted.

Notice that the reference item (B2) is removed immediatly. This causes the reference counter in (A4) to be reduced. A delete flag is set in (A4) because there are still references to it and deletion is delayed until all references are removed. (C) and (C1) are oblivious to the delete.

Navigation is affected by (A4) being flagged for delete. Navigation functions such as; lstFirst and lstNext will skip (hide) any items which are flagged for delete. This prevents deleted items from getting more references.

Related Functions

lstDelete


[Back][Next]

Page 6 of 9

unixODBC-2.2.14-p2/doc/lst/InternalStructure7.gif0100755000076400007640000000232111055554411020021 0ustar nicknickGIF89aˆ“÷ÿ@€ÿ @ € ÿ@@@@€@ÿ``@`€`ÿ€€@€€€ÿ  @ € ÿÀÀ@À€Àÿÿÿ@ÿ€ÿÿ @ € ÿ @ € ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿ@@@@€@ÿ@ @ @@ €@ ÿ@@@@@@@€@@ÿ@`@`@@`€@`ÿ@€@€@@€€@€ÿ@ @ @@ €@ ÿ@À@À@@À€@Àÿ@ÿ@ÿ@@ÿ€@ÿÿ``@`€`ÿ` ` @` €` ÿ`@`@@`@€`@ÿ````@``€``ÿ`€`€@`€€`€ÿ` ` @` €` ÿ`À`À@`À€`Àÿ`ÿ`ÿ@`ÿ€`ÿÿ€€@€€€ÿ€ € @€ €€ ÿ€@€@@€@€€@ÿ€`€`@€`€€`ÿ€€€€@€€€€€ÿ€ € @€ €€ ÿ€À€À@€À€€Àÿ€ÿ€ÿ@€ÿ€€ÿÿ  @ € ÿ    @  €  ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿÀÀ@À€ÀÿÀ À @À €À ÿÀ@À@@À@€À@ÿÀ`À`@À`€À`ÿÀ€À€@À€€À€ÿÀ À @À €À ÿÀÀÀÀ@ÀÀ€ÀÀÿÀÿÀÿ@Àÿ€Àÿÿÿÿ@ÿ€ÿÿÿ ÿ @ÿ €ÿ ÿÿ@ÿ@@ÿ@€ÿ@ÿÿ`ÿ`@ÿ`€ÿ`ÿÿ€ÿ€@ÿ€€ÿ€ÿÿ ÿ @ÿ €ÿ ÿÿÀÿÀ@ÿÀ€ÿÀÿÿÿÿÿ@ÿÿ€ÿÿÿ!ùÿ,ˆ“@þÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠ9±É“M¢\ÉR Ê–0¾ŒI³ãÌš8oâÜiQ'O–> utèÈ¢F“Dªô#Ó¦JŸ‚ðS*Ô¡V=R¸5fÖ«;¿v@–lM±`Ϧ=ºv-Ú¶ßÂE)w.úvÙæå¨ï^›7öõ˜bY„ »˜XqJŽ]ÿ™•Ì•+Õ²–NŽ X¦cº n®,ùò殣A>müÙòaÖQoœ¹ôl’«[‹„½÷-oÇ¿íÖ Þô0çÄçâM.\7EÖÌÁFOû{:Iã ­Kwª½ªó’»»þ«ýQ{ñ±Ç%/Ñorôì·;<®~ü¼_é{©þ>uˆú!dŸIÍÄÙmåtÞ€b%ZA&(à‚õ× [f`}mxá_ÄñFᇽ—‘… ŽH¢wª­è"D ª—Œ/#s(¶c»ñè#_5ž÷cváŽ/Þ(äL6yÔ’N.eQŽQ¶¥W!1Xe– yx–ŸÑH^VÆy¹eNb2&%CT xæwBHunixODBC-2.2.14-p2/doc/lst/InternalStructure7.html0100755000076400007640000000324507363332161020231 0ustar nicknick LST - Cursor On Cursor - Add D
LST
Cursor On Cursor
Add D


LST - Cursor On Cursor - Add D

Description

This diagram depicts the creation of a new cursor list (D)... the second one based on the root list (A).

Reference counts are increased in (A), (A2), and (A6).

The filter function for (D) was never presented with (A4) as it is flagged for deletion.

Related Functions

lstOpenCursor


[Back][Next]

Page 7 of 9

unixODBC-2.2.14-p2/doc/lst/InternalStructure8.gif0100755000076400007640000000341511055554411020027 0ustar nicknickGIF89aˆ“÷ÿ@€ÿ @ € ÿ@@@@€@ÿ``@`€`ÿ€€@€€€ÿ  @ € ÿÀÀ@À€Àÿÿÿ@ÿ€ÿÿ @ € ÿ @ € ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿ@@@@€@ÿ@ @ @@ €@ ÿ@@@@@@@€@@ÿ@`@`@@`€@`ÿ@€@€@@€€@€ÿ@ @ @@ €@ ÿ@À@À@@À€@Àÿ@ÿ@ÿ@@ÿ€@ÿÿ``@`€`ÿ` ` @` €` ÿ`@`@@`@€`@ÿ````@``€``ÿ`€`€@`€€`€ÿ` ` @` €` ÿ`À`À@`À€`Àÿ`ÿ`ÿ@`ÿ€`ÿÿ€€@€€€ÿ€ € @€ €€ ÿ€@€@@€@€€@ÿ€`€`@€`€€`ÿ€€€€@€€€€€ÿ€ € @€ €€ ÿ€À€À@€À€€Àÿ€ÿ€ÿ@€ÿ€€ÿÿ  @ € ÿ    @  €  ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿÀÀ@À€ÀÿÀ À @À €À ÿÀ@À@@À@€À@ÿÀ`À`@À`€À`ÿÀ€À€@À€€À€ÿÀ À @À €À ÿÀÀÀÀ@ÀÀ€ÀÀÿÀÿÀÿ@Àÿ€Àÿÿÿÿ@ÿ€ÿÿÿ ÿ @ÿ €ÿ ÿÿ@ÿ@@ÿ@€ÿ@ÿÿ`ÿ`@ÿ`€ÿ`ÿÿ€ÿ€@ÿ€€ÿ€ÿÿ ÿ @ÿ €ÿ ÿÿÀÿÀ@ÿÀ€ÿÀÿÿÿÿÿ@ÿÿ€ÿÿÿ!ùÿ,ˆ“@þÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠ9±É“M¢\Éò¸—-c&| N¦Í*oê˜s§O‹=¶ *´hCšFY"MÊT!Ѧ"ŸB*ujǪV.Íúq+צX¿b +v'Ù²%Ñ6õªö"Û¶fár<+w%]ŒòP0¯_¾'ïÖÛ ðÀ·ýîíû0Iă£Î)Ø¢bŽ17¶ùgå΃~m2i…lGŸv8Ùðj‰DU¿†(û cÀ|qc&˜{÷¿Û!ÏÖž]дDà¿“+ÏÜ{ùâ®0{$rÝΕkN›øXï¬þ‚h||y†Ó³bM?8½ëñ ÙË•?°5|ç½çO;Yí]úpZ÷¸Ñ]™¡gà‚ÒA”àB:Å Q>(á„ Fø†¢Å!‡× uiØ'ƒ¶õ¡ʹ!w™ˆÜo)"y'O‰2ŠP‘4vêÛ£6ºç•7=%ª¦‘úåsªÈc“þ¨ÆšÒ©fJ­²B¨*I»æê«“½þÊ¢ž¸ÒlQÅ «,NÉIœ6›£´WÙºìµðY;"ž ]zá³Þi«h Ÿr‹í¹.›’x/²$.aC’)’'îU)nô«.ºüz¶oZ¬òèév¦ŽèÚ¿Lr*°«ÙÁÚïÃ""‘Ä:ú!µ_Q ñÆÄi ,Ʊa<«ÈqÌnºˆ’ Õ»õ}¦2J,û$çËñÖÜžÇÆVs|4ËŒ3Aûm·PÐÊâ:©L ÿ¬©ÒÁËô¨ýM^tÝÒ;©b*æÛòÓTÙ|ëÎýr]¨a=¯EõÀhFµÉsÆØ˜¥¶[vÄsÏ·©ØeѤ÷þÞ|7À÷ß{›¬$GqWTø”ßb‹7¿ªm·à£ ”‹C>ù‹•3›ù²uó hd›[>®Ž¯Úíåw¦æÐŽ.ú›Û'¯V Š5ܶþ:Wvç”ê»—%²Â=2ì#¨ÁûjhòÌTvèÍSÞnôÔ·WõÑ;ŠýöðJV:÷œƒ/>˜ë‘+tâã |úçÎü½¹ Ijû½Gjù>û×ã/¾ö <£ñåZŸþ¶5@3ñ¯€,TÕsÀ:Ѐ ô"HAT °Q÷« 8A"5pƒ aTô}P„(La€¦§ÂºpIË{¡ gHÃunixODBC-2.2.14-p2/doc/lst/InternalStructure8.html0100755000076400007640000000320407363332161020225 0ustar nicknick LST - Cursor On Cursor - Del B
LST
Cursor On Cursor
Del B


LST - Cursor On Cursor - Del B

Description

This diagram depicts the closing of list (B) using the lstClose function.

Notice that no lists or items are actually removed. The reference counter in (B) is decremented but it is not actually closed because its reference count is still greater than zero. It is, in effect, flagged for deletion.

Related Functions

lstClose


[Back][Next]

Page 8 of 9

unixODBC-2.2.14-p2/doc/lst/InternalStructure9.gif0100755000076400007640000000155311055554411020031 0ustar nicknickGIF89a¨Æ÷ÿ@€ÿ @ € ÿ@@@@€@ÿ``@`€`ÿ€€@€€€ÿ  @ € ÿÀÀ@À€Àÿÿÿ@ÿ€ÿÿ @ € ÿ @ € ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿ@@@@€@ÿ@ @ @@ €@ ÿ@@@@@@@€@@ÿ@`@`@@`€@`ÿ@€@€@@€€@€ÿ@ @ @@ €@ ÿ@À@À@@À€@Àÿ@ÿ@ÿ@@ÿ€@ÿÿ``@`€`ÿ` ` @` €` ÿ`@`@@`@€`@ÿ````@``€``ÿ`€`€@`€€`€ÿ` ` @` €` ÿ`À`À@`À€`Àÿ`ÿ`ÿ@`ÿ€`ÿÿ€€@€€€ÿ€ € @€ €€ ÿ€@€@@€@€€@ÿ€`€`@€`€€`ÿ€€€€@€€€€€ÿ€ € @€ €€ ÿ€À€À@€À€€Àÿ€ÿ€ÿ@€ÿ€€ÿÿ  @ € ÿ    @  €  ÿ @ @@ @€ @ÿ ` `@ `€ `ÿ € €@ €€ €ÿ    @  €  ÿ À À@ À€ Àÿ ÿ ÿ@ ÿ€ ÿÿÀÀ@À€ÀÿÀ À @À €À ÿÀ@À@@À@€À@ÿÀ`À`@À`€À`ÿÀ€À€@À€€À€ÿÀ À @À €À ÿÀÀÀÀ@ÀÀ€ÀÀÿÀÿÀÿ@Àÿ€Àÿÿÿÿ@ÿ€ÿÿÿ ÿ @ÿ €ÿ ÿÿ@ÿ@@ÿ@€ÿ@ÿÿ`ÿ`@ÿ`€ÿ`ÿÿ€ÿ€@ÿ€€ÿ€ÿÿ ÿ @ÿ €ÿ ÿÿÀÿÀ@ÿÀ€ÿÀÿÿÿÿÿ@ÿÿ€ÿÿÿ!ùÿ,¨Æ@þÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠIr"€“%SJ< @¥Ë”àb¾œ©0&8š8?6ÈÉsàΞ@ƒunixODBC-2.2.14-p2/doc/lst/InternalStructure9.html0100755000076400007640000000277507363332161020242 0ustar nicknick LST - Cursor On Cursor - Del C
LST
Cursor On Cursor
Del C

LST - Cursor On Cursor - Del C

Description

This diagram depicts the state Before a call to close list (C) and After it has been called.

Notice that lstClose on list (C) detected that list (B) could be closed. Item (A4) was removed because it was flagged for delete and had no more references to it.

Related Functions

lstClose


[Back]

Page 9 of 9

unixODBC-2.2.14-p2/doc/lst/back.gif0100755000076400007640000000030407363332161015137 0ustar nicknickGIF87a ¢ÿÿÿÀÀÀ€€€ÀÀÀ, 8´Üþp)@«½8ƒ°´ÿ›ÐmAižhz "A©p\²£l£´KÞwþò¨®õrÝŒ¨´ KM_ö4E™NdêZ£jU\ª Kä˜y—–­­Æä° ç½··;Ø=ó÷+Xyxtƒu&RqrŒ‰‚‹gŠ‹0“”)–—…~š›!, ¡¢£¤B¤§¨¢ ­® ;unixODBC-2.2.14-p2/doc/lst/next.gif0100755000076400007640000000031007363332161015212 0ustar nicknickGIF87a ¢ÿÿÿÀÀÀ€€€ÀÀÀ, “8´Üþp)@«½8ƒ°´ÿ›ÐmAižhz "A©p\²£l£´KÞwþž ^Ê·+ŒBu45yK`ê)‹:aT•Ë®Z¿«ÍØr„Y3¹«ϰšž¹™¶z»&…é¿|b(8w}&„C†‚‰Z‹H0joBfIŠ—Ž™š…œ{.e,¤¥¦§¨A¨«¬¦ ±² ;unixODBC-2.2.14-p2/ODBCConfig/0040755000076400007640000000000011150523346014035 5ustar nicknickunixODBC-2.2.14-p2/ODBCConfig/README0100644000076400007640000000327207363332156014726 0ustar nicknick*************************************************************** * This code is GPL. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | ODBCConfig | +-------------------------------------------------------------+ README Description: The ODBC Config program is a graphical program used to make configuration of ODBC Data Sources extremely easy. It has been designed to be User compatible with the Microsoft ODBC Administrator. ODBCConfig works best when Drivers are installed with Driver Config functionality ( see DRVConfig/.. ). The driver config comes in the form of a shared lib which ODBC Config will dynamically load as required. The naming convention for this lib *S.so. ODBC Config will call a drivers config lib if it exists. ODBC Config determines the name of the driver setup from the odbcinst lib which, in turn, gets it from a Setup entry in /etc/odbcinst.ini. Flags: http://www.qnet.com/~moonbase/miniflag/ +-------------------------------------------------------------+ | Peter Harvey | | www.unixODBC.org | | www.troll.no | | 25.APR.99 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/ODBCConfig/Makefile.am0100644000076400007640000000071711110567506016075 0ustar nicknickif QT bin_PROGRAMS = ODBCConfig INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) \ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" -DDEFLIB_PATH=\"@libdir@\" $(LTDLINCL) ODBCConfig_LDADD = \ $(QT_LDFLAGS) \ $(QT_LIBS) \ ../odbcinst/libodbcinst.la \ ../extras/libodbcextraslc.la \ ../DriverManager/libodbc.la ODBCConfig_DEPENDANCIES = ../odbcinst/libodbcinst.la ../extras/libodbcextraslc.la ../DriverManager/libodbc.la ODBCConfig_SOURCES = \ main.cpp endif unixODBC-2.2.14-p2/ODBCConfig/Makefile.in0100644000076400007640000004004711111035241016071 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ @QT_TRUE@bin_PROGRAMS = ODBCConfig$(EXEEXT) subdir = ODBCConfig DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ INSTALL ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__ODBCConfig_SOURCES_DIST = main.cpp @QT_TRUE@am_ODBCConfig_OBJECTS = main.$(OBJEXT) ODBCConfig_OBJECTS = $(am_ODBCConfig_OBJECTS) am__DEPENDENCIES_1 = @QT_TRUE@ODBCConfig_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @QT_TRUE@ $(am__DEPENDENCIES_1) ../odbcinst/libodbcinst.la \ @QT_TRUE@ ../extras/libodbcextraslc.la \ @QT_TRUE@ ../DriverManager/libodbc.la DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(ODBCConfig_SOURCES) DIST_SOURCES = $(am__ODBCConfig_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @QT_TRUE@INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) \ @QT_TRUE@ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" -DDEFLIB_PATH=\"@libdir@\" $(LTDLINCL) @QT_TRUE@ODBCConfig_LDADD = \ @QT_TRUE@ $(QT_LDFLAGS) \ @QT_TRUE@ $(QT_LIBS) \ @QT_TRUE@ ../odbcinst/libodbcinst.la \ @QT_TRUE@ ../extras/libodbcextraslc.la \ @QT_TRUE@ ../DriverManager/libodbc.la @QT_TRUE@ODBCConfig_DEPENDANCIES = ../odbcinst/libodbcinst.la ../extras/libodbcextraslc.la ../DriverManager/libodbc.la @QT_TRUE@ODBCConfig_SOURCES = \ @QT_TRUE@ main.cpp all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ODBCConfig/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu ODBCConfig/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done ODBCConfig$(EXEEXT): $(ODBCConfig_OBJECTS) $(ODBCConfig_DEPENDENCIES) @rm -f ODBCConfig$(EXEEXT) $(CXXLINK) $(ODBCConfig_LDFLAGS) $(ODBCConfig_OBJECTS) $(ODBCConfig_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) installdirs: for dir in "$(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) 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-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: 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-info-am .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-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ 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-info-am # 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: unixODBC-2.2.14-p2/ODBCConfig/INSTALL0100644000076400007640000000211307405437452015072 0ustar nicknick+-------------------------------------------------------------+ | unixODBC | | ODBCConfig | +-------------------------------------------------------------+ INSTALL --------------------------------------------------------------- Requirements: Qt v3 must be installed on your system. Older versions may work also. libodbcinstQ.so must be in the lib path. GNU auto-tools: The most common way to build this is to use the GNU auto-tools (see the unixODBC INSTALL file). Keep in mind that configure may not pickup existing Qt installations. In such cases this program will not get built. You can often correct this by telling configure where the Qt stuff is (see configure --help). qmake: see the unixODBC README.qmake file +-------------------------------------------------------------+ | Peter Harvey | | 28.OCT.01 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/ODBCConfig/main.cpp0100644000076400007640000000311011110571005015444 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 31.JAN.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include #include #ifdef QT_V4LAYOUT #include #include #else #include #include #endif int main( int argc, char **argv ) { QApplication::setDesktopSettingsAware( true ); // try to use desktop colors QApplication oApplication( argc, argv ); int nReturn; ODBCINSTWND odbcinstwnd; #ifdef QT_V4LAYOUT strcpy( odbcinstwnd.szUI, "odbcinstQ4" ); #else strcpy( odbcinstwnd.szUI, "odbcinstQ" ); #endif odbcinstwnd.hWnd = qApp->desktop(); nReturn = SQLManageDataSources( (HWND)(&odbcinstwnd) ); if ( !nReturn ) { for ( WORD nError = 1; nError < 10; nError++ ) { DWORD nErrorCode; char szErrorMsg[SQL_MAX_MESSAGE_LENGTH]; RETCODE nRetCode = SQLInstallerError( nError, &nErrorCode, szErrorMsg, SQL_MAX_MESSAGE_LENGTH, NULL ); if ( !SQL_SUCCEEDED( nRetCode ) ) { QMessageBox::critical( 0, "ODBCConfig", "failed: no more errors to report" ); break; } QMessageBox::critical( 0, "ODBCConfig", szErrorMsg ); } } return nReturn; } unixODBC-2.2.14-p2/DataManager/0040755000076400007640000000000011150523456014346 5ustar nicknickunixODBC-2.2.14-p2/DataManager/README0100644000076400007640000000300407363332141015220 0ustar nicknick*************************************************************** * This code is GPL. * * * * Peter Harvey 21.FEB.99 pharvey@codebydesign.com * *************************************************************** +-------------------------------------------------------------+ | unixODBC | | DataManager | +-------------------------------------------------------------+ README Description: This program can be used to browse/explore ODBC Data Sources. It is based upon the Qt ( www.troll.no ) class library. You MUST have the Qt developement libs installed ( please visit www.troll.no ). One can; - drill down a data source - edit and submit SQL (when an active Data Source is selected) One will be able to; - configure ODBC in the tree view - add and remove drivers - use unixODBC ODBC extensions to work at the server level - use unixODBC ODBC extensions to easily start/stop servers, create/backup/drop databases etc Enjoy! +-------------------------------------------------------------+ | Peter Harvey | | http://www.unixODBC.org | | pharvey@codebydesign.com | | 30.MAR.99 | +-------------------------------------------------------------+ unixODBC-2.2.14-p2/DataManager/Makefile.am0100644000076400007640000000504110723054672016403 0ustar nicknickif QT if QT4 else bin_PROGRAMS = DataManager INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) DataManager_LDADD = \ $(QT_LDFLAGS) \ $(QT_LIBS) \ ../ini/libinilc.la \ ../odbcinst/libodbcinst.la \ ../DriverManager/libodbc.la DataManager_DEPENDANCIES = \ ../odbcinst/libodbcinst.la \ ../DriverManager/libodbc.la DataManager_SOURCES = \ classCanvas.cpp \ classColumn.cpp \ classDataManager.cpp \ classDataSource.cpp \ classDataSources.cpp \ classDriver.cpp \ classDrivers.cpp \ classISQL.cpp \ classIndex.cpp \ classIndexs.cpp \ classLogin.cpp \ classNode.cpp \ classODBC.cpp \ classPrimaryKeys.cpp \ classSpecialColumns.cpp \ classTable.cpp \ classTables.cpp \ classConnectionFrame.cpp \ classBrowseFrame.cpp \ classBrowse.cpp \ main.cpp \ mclassDataManager.cpp \ mclassCanvas.cpp \ mclassLogin.cpp \ mclassISQL.cpp \ mclassConnectionFrame.cpp \ mclassBrowseFrame.cpp \ mclassBrowse.cpp mclassDataManager.cpp: @srcdir@/classDataManager.h @MOC@ @srcdir@/classDataManager.h -o mclassDataManager.cpp mclassCanvas.cpp: @srcdir@/classCanvas.h @MOC@ @srcdir@/classCanvas.h -o mclassCanvas.cpp mclassLogin.cpp: @srcdir@/classLogin.h @MOC@ @srcdir@/classLogin.h -o mclassLogin.cpp mclassISQL.cpp: @srcdir@/classISQL.h @MOC@ @srcdir@/classISQL.h -o mclassISQL.cpp mclassConnectionFrame.cpp: @srcdir@/classConnectionFrame.h @MOC@ @srcdir@/classConnectionFrame.h -o mclassConnectionFrame.cpp mclassBrowseFrame.cpp: @srcdir@/classBrowseFrame.h @MOC@ @srcdir@/classBrowseFrame.h -o mclassBrowseFrame.cpp mclassBrowse.cpp: @srcdir@/classBrowse.h @MOC@ @srcdir@/classBrowse.h -o mclassBrowse.cpp CLEANFILES = \ mclassDataManager.cpp \ mclassCanvas.cpp \ mclassLogin.cpp \ mclassISQL.cpp \ mclassConnectionFrame.cpp \ mclassBrowseFrame.cpp \ mclassBrowse.cpp endif endif EXTRA_DIST = \ classCanvas.h \ classColumn.h \ classDataManager.h \ classDataManager4.h \ classDataSource.h \ classDataSources.h \ classDriver.h \ classDrivers.h \ classConnectionFrame.h \ classBrowseFrame.h \ classBrowse.h \ classISQL.h \ classIndex.h \ classIndexs.h \ classLogin.h \ classNode.h \ classODBC.h \ classPrimaryKeys.h \ classSpecialColumns.h \ classTable.h \ classTables.h \ LinuxODBC.xpm \ column.xpm \ computergreen.xpm \ computerred.xpm \ datasourceoff.xpm \ datasourceon.xpm \ datasourcessystem.xpm \ datasourcesuser.xpm \ driver.xpm \ drivers.xpm \ exec.xpm \ id.xpm \ keygold.xpm \ keyred.xpm \ keysilver.xpm \ keysilver2.xpm \ new.xpm \ open.xpm \ run.xpm \ save.xpm \ table.xpm \ tables.xpm \ ODBC.xpm unixODBC-2.2.14-p2/DataManager/Makefile.in0100644000076400007640000005571011111035222016402 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ @QT4_FALSE@@QT_TRUE@bin_PROGRAMS = DataManager$(EXEEXT) subdir = DataManager DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__DataManager_SOURCES_DIST = classCanvas.cpp classColumn.cpp \ classDataManager.cpp classDataSource.cpp classDataSources.cpp \ classDriver.cpp classDrivers.cpp classISQL.cpp classIndex.cpp \ classIndexs.cpp classLogin.cpp classNode.cpp classODBC.cpp \ classPrimaryKeys.cpp classSpecialColumns.cpp classTable.cpp \ classTables.cpp classConnectionFrame.cpp classBrowseFrame.cpp \ classBrowse.cpp main.cpp mclassDataManager.cpp \ mclassCanvas.cpp mclassLogin.cpp mclassISQL.cpp \ mclassConnectionFrame.cpp mclassBrowseFrame.cpp \ mclassBrowse.cpp @QT4_FALSE@@QT_TRUE@am_DataManager_OBJECTS = classCanvas.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classColumn.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classDataManager.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classDataSource.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classDataSources.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classDriver.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classDrivers.$(OBJEXT) classISQL.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classIndex.$(OBJEXT) classIndexs.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classLogin.$(OBJEXT) classNode.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classODBC.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classPrimaryKeys.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classSpecialColumns.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classTable.$(OBJEXT) classTables.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classConnectionFrame.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classBrowseFrame.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classBrowse.$(OBJEXT) main.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ mclassDataManager.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ mclassCanvas.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ mclassLogin.$(OBJEXT) mclassISQL.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ mclassConnectionFrame.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ mclassBrowseFrame.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ mclassBrowse.$(OBJEXT) DataManager_OBJECTS = $(am_DataManager_OBJECTS) am__DEPENDENCIES_1 = @QT4_FALSE@@QT_TRUE@DataManager_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @QT4_FALSE@@QT_TRUE@ $(am__DEPENDENCIES_1) ../ini/libinilc.la \ @QT4_FALSE@@QT_TRUE@ ../odbcinst/libodbcinst.la \ @QT4_FALSE@@QT_TRUE@ ../DriverManager/libodbc.la DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(DataManager_SOURCES) DIST_SOURCES = $(am__DataManager_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @QT4_FALSE@@QT_TRUE@INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) @QT4_FALSE@@QT_TRUE@DataManager_LDADD = \ @QT4_FALSE@@QT_TRUE@ $(QT_LDFLAGS) \ @QT4_FALSE@@QT_TRUE@ $(QT_LIBS) \ @QT4_FALSE@@QT_TRUE@ ../ini/libinilc.la \ @QT4_FALSE@@QT_TRUE@ ../odbcinst/libodbcinst.la \ @QT4_FALSE@@QT_TRUE@ ../DriverManager/libodbc.la @QT4_FALSE@@QT_TRUE@DataManager_DEPENDANCIES = \ @QT4_FALSE@@QT_TRUE@ ../odbcinst/libodbcinst.la \ @QT4_FALSE@@QT_TRUE@ ../DriverManager/libodbc.la @QT4_FALSE@@QT_TRUE@DataManager_SOURCES = \ @QT4_FALSE@@QT_TRUE@ classCanvas.cpp \ @QT4_FALSE@@QT_TRUE@ classColumn.cpp \ @QT4_FALSE@@QT_TRUE@ classDataManager.cpp \ @QT4_FALSE@@QT_TRUE@ classDataSource.cpp \ @QT4_FALSE@@QT_TRUE@ classDataSources.cpp \ @QT4_FALSE@@QT_TRUE@ classDriver.cpp \ @QT4_FALSE@@QT_TRUE@ classDrivers.cpp \ @QT4_FALSE@@QT_TRUE@ classISQL.cpp \ @QT4_FALSE@@QT_TRUE@ classIndex.cpp \ @QT4_FALSE@@QT_TRUE@ classIndexs.cpp \ @QT4_FALSE@@QT_TRUE@ classLogin.cpp \ @QT4_FALSE@@QT_TRUE@ classNode.cpp \ @QT4_FALSE@@QT_TRUE@ classODBC.cpp \ @QT4_FALSE@@QT_TRUE@ classPrimaryKeys.cpp \ @QT4_FALSE@@QT_TRUE@ classSpecialColumns.cpp \ @QT4_FALSE@@QT_TRUE@ classTable.cpp \ @QT4_FALSE@@QT_TRUE@ classTables.cpp \ @QT4_FALSE@@QT_TRUE@ classConnectionFrame.cpp \ @QT4_FALSE@@QT_TRUE@ classBrowseFrame.cpp \ @QT4_FALSE@@QT_TRUE@ classBrowse.cpp \ @QT4_FALSE@@QT_TRUE@ main.cpp \ @QT4_FALSE@@QT_TRUE@ mclassDataManager.cpp \ @QT4_FALSE@@QT_TRUE@ mclassCanvas.cpp \ @QT4_FALSE@@QT_TRUE@ mclassLogin.cpp \ @QT4_FALSE@@QT_TRUE@ mclassISQL.cpp \ @QT4_FALSE@@QT_TRUE@ mclassConnectionFrame.cpp \ @QT4_FALSE@@QT_TRUE@ mclassBrowseFrame.cpp \ @QT4_FALSE@@QT_TRUE@ mclassBrowse.cpp @QT4_FALSE@@QT_TRUE@CLEANFILES = \ @QT4_FALSE@@QT_TRUE@ mclassDataManager.cpp \ @QT4_FALSE@@QT_TRUE@ mclassCanvas.cpp \ @QT4_FALSE@@QT_TRUE@ mclassLogin.cpp \ @QT4_FALSE@@QT_TRUE@ mclassISQL.cpp \ @QT4_FALSE@@QT_TRUE@ mclassConnectionFrame.cpp \ @QT4_FALSE@@QT_TRUE@ mclassBrowseFrame.cpp \ @QT4_FALSE@@QT_TRUE@ mclassBrowse.cpp EXTRA_DIST = \ classCanvas.h \ classColumn.h \ classDataManager.h \ classDataManager4.h \ classDataSource.h \ classDataSources.h \ classDriver.h \ classDrivers.h \ classConnectionFrame.h \ classBrowseFrame.h \ classBrowse.h \ classISQL.h \ classIndex.h \ classIndexs.h \ classLogin.h \ classNode.h \ classODBC.h \ classPrimaryKeys.h \ classSpecialColumns.h \ classTable.h \ classTables.h \ LinuxODBC.xpm \ column.xpm \ computergreen.xpm \ computerred.xpm \ datasourceoff.xpm \ datasourceon.xpm \ datasourcessystem.xpm \ datasourcesuser.xpm \ driver.xpm \ drivers.xpm \ exec.xpm \ id.xpm \ keygold.xpm \ keyred.xpm \ keysilver.xpm \ keysilver2.xpm \ new.xpm \ open.xpm \ run.xpm \ save.xpm \ table.xpm \ tables.xpm \ ODBC.xpm all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DataManager/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DataManager/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done DataManager$(EXEEXT): $(DataManager_OBJECTS) $(DataManager_DEPENDENCIES) @rm -f DataManager$(EXEEXT) $(CXXLINK) $(DataManager_LDFLAGS) $(DataManager_OBJECTS) $(DataManager_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classBrowse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classBrowseFrame.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classCanvas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classColumn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classConnectionFrame.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classDataManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classDataSource.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classDataSources.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classDriver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classDrivers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classISQL.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classIndex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classIndexs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classLogin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classNode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classODBC.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classPrimaryKeys.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classSpecialColumns.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classTable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classTables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassBrowse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassBrowseFrame.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassCanvas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassConnectionFrame.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassDataManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassISQL.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassLogin.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) installdirs: for dir in "$(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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: 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-info-am .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-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ 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-info-am @QT4_FALSE@@QT_TRUE@mclassDataManager.cpp: @srcdir@/classDataManager.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classDataManager.h -o mclassDataManager.cpp @QT4_FALSE@@QT_TRUE@mclassCanvas.cpp: @srcdir@/classCanvas.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classCanvas.h -o mclassCanvas.cpp @QT4_FALSE@@QT_TRUE@mclassLogin.cpp: @srcdir@/classLogin.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classLogin.h -o mclassLogin.cpp @QT4_FALSE@@QT_TRUE@mclassISQL.cpp: @srcdir@/classISQL.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classISQL.h -o mclassISQL.cpp @QT4_FALSE@@QT_TRUE@mclassConnectionFrame.cpp: @srcdir@/classConnectionFrame.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classConnectionFrame.h -o mclassConnectionFrame.cpp @QT4_FALSE@@QT_TRUE@mclassBrowseFrame.cpp: @srcdir@/classBrowseFrame.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classBrowseFrame.h -o mclassBrowseFrame.cpp @QT4_FALSE@@QT_TRUE@mclassBrowse.cpp: @srcdir@/classBrowse.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classBrowse.h -o mclassBrowse.cpp # 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: unixODBC-2.2.14-p2/DataManager/classCanvas.cpp0100644000076400007640000000121007363332141017302 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classCanvas.h" classCanvas::classCanvas( QWidget *pParent, const char *pszName ) : QLabel( pParent, pszName ) { } classCanvas::~classCanvas() { } void classCanvas::resizeEvent( QResizeEvent *p ) { changedSize( p->size().width(), p->size().height() ); } unixODBC-2.2.14-p2/DataManager/classColumn.cpp0100644000076400007640000000456110564052112017332 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classColumn.h" #include "column.xpm" #ifdef QT_V4LAYOUT classColumn::classColumn( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszName, char *pszType, char *pszDesc ) #else classColumn::classColumn( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszName, char *pszType, char *pszDesc ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszName, pszType, pszDesc ); } #ifdef QT_V4LAYOUT classColumn::classColumn( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszName, char *pszType, char *pszDesc ) #else classColumn::classColumn( QListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszName, char *pszType, char *pszDesc ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszName, pszType, pszDesc ); } #ifdef QT_V4LAYOUT classColumn::classColumn( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszName, char *pszType, char *pszDesc ) #else classColumn::classColumn( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszName, char *pszType, char *pszDesc ) #endif : classNode( pParent, pAfter, pCanvas ) { Init( hDbc, pszName, pszType, pszDesc ); } classColumn::~classColumn() { } void classColumn::Init( SQLHDBC hDbc, char *pszName, char *pszType, char *pszDesc ) { this->hDbc = hDbc; this->qsName = pszName; setText( 0, qsName ); setText( 1, pszType ); setText( 2, pszDesc ); setPixmap( 0, QPixmap( column_xpm ) ); } void classColumn::setOpen( bool o ) { if ( o && !childCount() ) { setExpandable( FALSE ); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( o ); #else QListViewItem::setOpen( o ); #endif } void classColumn::setup() { setExpandable( FALSE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } #ifdef QT_V4LAYOUT void classColumn::selectionChanged( Q3ListViewItem *p ) #else void classColumn::selectionChanged( QListViewItem *p ) #endif { if ( p == this ) { } } unixODBC-2.2.14-p2/DataManager/classDataManager.cpp0100644000076400007640000002034510564052115020242 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifdef QT_V4LAYOUT #include "classDataManager4.h" #else #include "classDataManager.h" #endif #include "ODBC.xpm" classDataManager::classDataManager( QWidget *pParent, const char *pszName ) : QWidget( pParent, pszName ) //, 503808 ) { setCaption( "DataManager " VERSION ); setIcon( QPixmap( xpmODBC ) ); splSplitter = new QSplitter( this, "splSplitter" ); #ifdef QT_V4LAYOUT lvwBrowser = new Q3ListView( splSplitter, "lvwBrowser" ); #else lvwBrowser = new QListView( splSplitter, "lvwBrowser" ); #endif lvwBrowser->setMinimumSize( 50, 50 ); lvwBrowser->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT connect( lvwBrowser, SIGNAL(rightButtonClicked(Q3ListViewItem*,const QPoint&,int)), SLOT(ItemMenu(Q3ListViewItem*,const QPoint&,int)) ); connect( lvwBrowser, SIGNAL(selectionChanged(Q3ListViewItem*)), SLOT(ItemChanged(Q3ListViewItem*)) ); #else connect( lvwBrowser, SIGNAL(rightButtonClicked(QListViewItem*,const QPoint&,int)), SLOT(ItemMenu(QListViewItem*,const QPoint&,int)) ); connect( lvwBrowser, SIGNAL(selectionChanged(QListViewItem*)), SLOT(ItemChanged(QListViewItem*)) ); #endif #ifdef QT_V4LAYOUT lvwBrowser->setFocusPolicy( Qt::TabFocus ); lvwBrowser->setBackgroundMode( Qt::PaletteBackground ); #else lvwBrowser->setFocusPolicy( QWidget::TabFocus ); lvwBrowser->setBackgroundMode( QWidget::PaletteBackground ); #endif lvwBrowser->setFrameStyle( 17 ); #ifdef QT_V4LAYOUT lvwBrowser->setResizePolicy( Q3ScrollView::Manual ); lvwBrowser->setVScrollBarMode( Q3ScrollView::Auto ); lvwBrowser->setHScrollBarMode( Q3ScrollView::Auto ); #else lvwBrowser->setResizePolicy( QScrollView::Manual ); lvwBrowser->setVScrollBarMode( QScrollView::Auto ); lvwBrowser->setHScrollBarMode( QScrollView::Auto ); #endif lvwBrowser->setTreeStepSize( 20 ); lvwBrowser->setMultiSelection( FALSE ); lvwBrowser->setAllColumnsShowFocus( TRUE ); lvwBrowser->setItemMargin( 1 ); lvwBrowser->setRootIsDecorated( TRUE ); lvwBrowser->addColumn( "Object", -1 ); #ifdef QT_V4LAYOUT lvwBrowser->setColumnWidthMode( 0, Q3ListView::Maximum ); #else lvwBrowser->setColumnWidthMode( 0, QListView::Maximum ); #endif lvwBrowser->setColumnAlignment( 0, 1 ); lvwBrowser->addColumn( "Type", -1 ); #ifdef QT_V4LAYOUT lvwBrowser->setColumnWidthMode( 1, Q3ListView::Maximum ); #else lvwBrowser->setColumnWidthMode( 1, QListView::Maximum ); #endif lvwBrowser->setColumnAlignment( 1, 1 ); lvwBrowser->addColumn( "Description", -1 ); #ifdef QT_V4LAYOUT lvwBrowser->setColumnWidthMode( 2, Q3ListView::Maximum ); #else lvwBrowser->setColumnWidthMode( 2, QListView::Maximum ); #endif lvwBrowser->setColumnAlignment( 2, 1 ); lvwBrowser->setSorting( -1, 0 ); #ifdef QT_V4LAYOUT lvwBrowser->setSelectionMode( Q3ListView::Single ); #else lvwBrowser->setSelectionMode( QListView::Single ); #endif pCanvas = new classCanvas( splSplitter, "fraProperties" ); LoadState(); setMinimumSize( 0, 0 ); setMaximumSize( 32767, 32767 ); pODBC = new classODBC( lvwBrowser, pCanvas ); } classDataManager::~classDataManager() { SaveState(); } #ifdef QT_V4LAYOUT void classDataManager::ItemMenu(Q3ListViewItem *pItem, const QPoint &, int ) #else void classDataManager::ItemMenu(QListViewItem *pItem, const QPoint &, int ) #endif { if ( pItem == 0 ) return; lvwBrowser->setSelected( pItem, TRUE ); } #ifdef QT_V4LAYOUT void classDataManager::ItemChanged(Q3ListViewItem *pItem ) #else void classDataManager::ItemChanged(QListViewItem *pItem ) #endif { QString qsType; if ( pItem == 0 ) return; lvwBrowser->setSelected( pItem, TRUE ); pODBC->selectionChanged( pItem ); } void classDataManager::Exit() { exit( 0 ); } void classDataManager::About() { } void classDataManager::resizeEvent( QResizeEvent * ) { int marg = 1; int w = width() - marg * 2; int h = height() - marg * 2; splSplitter->setGeometry( marg, marg, w, h ); } void classDataManager::LoadState() { HINI hIni; char szObject[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; char szINI[ODBC_FILENAME_MAX+1]; sprintf( szINI, "%s/%s", QDir::homeDirPath().ascii(), ".DataManager/DataManager.ini" ); if ( iniOpen( &hIni, szINI, "#;", '[', ']', '=', TRUE ) != INI_ERROR ) { iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { szObject[0] = '\0'; szPropertyName[0] = '\0'; szPropertyValue[0] = '\0'; iniObject( hIni, szObject ); iniPropertyFirst( hIni ); if ( strcmp( szObject, "GEOMETRY" ) == 0 ) { int nX = x(); int nY = y(); int nW = width(); int nH = height(); int nCell1 = 0; int nCell2 = 0; while ( iniPropertyEOL( hIni ) == FALSE ) { iniProperty( hIni, szPropertyName ); if ( strncmp( szPropertyName, "X", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nX = atoi( szPropertyValue ); } if ( strncmp( szPropertyName, "Y", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nY = atoi( szPropertyValue ); } if ( strncmp( szPropertyName, "W", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nW = atoi( szPropertyValue ); } if ( strncmp( szPropertyName, "H", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nH = atoi( szPropertyValue ); } if ( strncmp( szPropertyName, "W_CELL1", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nCell1 = atoi( szPropertyValue ); } if ( strncmp( szPropertyName, "W_CELL2", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nCell2 = atoi( szPropertyValue ); } iniPropertyNext( hIni ); } resize( nW, nH ); move( nX, nY ); if ( nCell1 && nCell2 ) { #ifdef QT_V4LAYOUT Q3ValueList list; #else QValueList list; #endif list.append( nCell1 ); list.append( nCell2 ); splSplitter->setSizes( list ); } } iniObjectNext( hIni ); } } else { QMessageBox::warning( this, "DataManager", "Could not open ~/.DataManager/DataManager.ini.\nYou may not have a home dir." ); } } void classDataManager::SaveState() { HINI hIni; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; char szINI[ODBC_FILENAME_MAX+1]; sprintf( szINI, "%s/%s", QDir::homeDirPath().ascii(), ".DataManager/DataManager.ini" ); if ( iniOpen( &hIni, szINI, "#;", '[', ']', '=', TRUE ) != INI_ERROR ) { // REMOVE OBJECT iniObjectSeekSure( hIni, "GEOMETRY" ); iniObjectDelete( hIni ); // ADD OBJECT iniObjectSeekSure( hIni, "GEOMETRY" ); sprintf( szPropertyValue, "%d", pos().x() ); iniPropertyInsert( hIni, "X", szPropertyValue ); sprintf( szPropertyValue, "%d", pos().y() ); iniPropertyInsert( hIni, "Y", szPropertyValue ); sprintf( szPropertyValue, "%d", size().width() ); iniPropertyInsert( hIni, "W", szPropertyValue ); sprintf( szPropertyValue, "%d", size().height() ); iniPropertyInsert( hIni, "H", szPropertyValue ); sprintf( szPropertyValue, "%d", splSplitter->sizes().first() ); iniPropertyInsert( hIni, "W_CELL1", szPropertyValue ); sprintf( szPropertyValue, "%d", splSplitter->sizes().last() ); iniPropertyInsert( hIni, "W_CELL2", szPropertyValue ); iniCommit( hIni ); } } unixODBC-2.2.14-p2/DataManager/classDataSource.cpp0100644000076400007640000001233010564052115020123 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classDataSource.h" #include "computergreen.xpm" #include "computerred.xpm" #ifdef QT_V4LAYOUT classDataSource::classDataSource( Q3ListView *pParent, classCanvas *pCanvas, int nDataSourceType, char *pszDataSourceName, SQLHENV hEnv ) #else classDataSource::classDataSource( QListView *pParent, classCanvas *pCanvas, int nDataSourceType, char *pszDataSourceName, SQLHENV hEnv ) #endif : classNode( pParent, pCanvas ) { Init( nDataSourceType, pszDataSourceName, hEnv ); } #ifdef QT_V4LAYOUT classDataSource::classDataSource( Q3ListViewItem *pParent, classCanvas *pCanvas, int nDataSourceType, char *pszDataSourceName, SQLHENV hEnv ) #else classDataSource::classDataSource( QListViewItem *pParent, classCanvas *pCanvas, int nDataSourceType, char *pszDataSourceName, SQLHENV hEnv ) #endif : classNode( pParent, pCanvas ) { Init( nDataSourceType, pszDataSourceName, hEnv ); } #ifdef QT_V4LAYOUT classDataSource::classDataSource( Q3ListViewItem *pParent,Q3ListViewItem *pAfter, classCanvas *pCanvas, int nDataSourceType, char *pszDataSourceName, SQLHENV hEnv ) #else classDataSource::classDataSource( QListViewItem *pParent,QListViewItem *pAfter, classCanvas *pCanvas, int nDataSourceType, char *pszDataSourceName, SQLHENV hEnv ) #endif : classNode( pParent, pAfter, pCanvas ) { Init( nDataSourceType, pszDataSourceName, hEnv ); } classDataSource::~classDataSource() { if ( pConnectionFrame ) delete pConnectionFrame; if ((void*) hDbc != 0 ) { if ( bLoggedIn ) SQLDisconnect( hDbc ); SQLFreeConnect( hDbc ); } } void classDataSource::Init( int nDataSourceType, char *pszDataSourceName, SQLHENV hEnv ) { char szResults[9600]; char szDescription[INI_MAX_PROPERTY_VALUE+1]; char szDriver[INI_MAX_PROPERTY_VALUE+1]; QString qsDescription; if ( nDataSourceType == classDataSource::System ) this->nDataSourceType = nDataSourceType; else this->nDataSourceType = classDataSource::User; qsDataSourceName = ""; if ( pszDataSourceName != 0 ) qsDataSourceName = pszDataSourceName; this->pCanvas = pCanvas; bLoggedIn = FALSE; this->hEnv = hEnv; hDbc = (SQLHDBC)0; setPixmap( 0, QPixmap( computerred_xpm ) ); // CREATE AN ODBC CONNECTION if ( SQLAllocConnect( hEnv, &hDbc ) != SQL_SUCCESS ) { QMessageBox::critical( (QWidget *)this, "Data Manager", "Call to the ODBC Driver Manager failed" ); return; } szResults[0] = '\0'; szDescription[0] = '\0'; szDriver[0] = '\0'; if ( nDataSourceType == User ) SQLSetConfigMode( ODBC_USER_DSN ); else SQLSetConfigMode( ODBC_SYSTEM_DSN ); if ( SQLGetPrivateProfileString((char*) qsDataSourceName.ascii(), "Description", "", szResults, 9600, 0 ) > 0 ) iniElement( szResults, '\0', '\0', 0, szDescription, INI_MAX_PROPERTY_VALUE ); if ( SQLGetPrivateProfileString((char*) qsDataSourceName.ascii(), "Driver", "", szResults, 9600, 0 ) > 0 ) iniElement( szResults, '\0', '\0', 0, szDriver, INI_MAX_PROPERTY_VALUE ); SQLSetConfigMode( ODBC_BOTH_DSN ); qsDescription.sprintf( "%s [%s]", szDescription, szDriver ); setText( 0, qsDataSourceName ); setText( 1, "" ); setText( 2, qsDescription ); pTables = 0; pConnectionFrame = 0; } void classDataSource::setOpen( bool bOpen ) { listView()->setSelected( listView()->selectedItem(), false ); if ( bOpen && !bLoggedIn ) { // try to connect if ( hDbc ) { classLogin *pLogin = new classLogin( pCanvas, hDbc, (char*)qsDataSourceName.ascii(), nDataSourceType ); if ( pLogin->exec() ) { bLoggedIn = true; setPixmap( 0, QPixmap( computergreen_xpm ) ); pTables = new classTables( this, pCanvas, hDbc ); #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } else { delete pLogin; return; } delete pLogin; } } else if ( !bOpen && bLoggedIn ) { // disconnect delete pTables; pTables = 0; delete pConnectionFrame; pConnectionFrame = 0; SQLDisconnect( hDbc ); setPixmap( 0, QPixmap( computerred_xpm ) ); bLoggedIn = false; #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } } void classDataSource::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } #ifdef QT_V4LAYOUT void classDataSource::selectionChanged( Q3ListViewItem *p ) #else void classDataSource::selectionChanged( QListViewItem *p ) #endif { if ( pTables ) pTables->selectionChanged( p ); if ( p == this ) { if ( bLoggedIn ) { if ( pConnectionFrame ) pConnectionFrame->show(); else { pConnectionFrame = new classConnectionFrame( hDbc, qsDataSourceName, pCanvas ); pConnectionFrame->show(); } } } else if ( pConnectionFrame ) pConnectionFrame->hide(); } unixODBC-2.2.14-p2/DataManager/classDataSources.cpp0100644000076400007640000000762710564052115020323 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classDataSources.h" #include "datasourcesuser.xpm" #include "datasourcessystem.xpm" #ifdef QT_V4LAYOUT classDataSources::classDataSources( Q3ListView *pParent, classCanvas *pCanvas, int nDataSourceType, SQLHENV hEnv ) #else classDataSources::classDataSources( QListView *pParent, classCanvas *pCanvas, int nDataSourceType, SQLHENV hEnv ) #endif : classNode( pParent, pCanvas ) { Init( nDataSourceType, hEnv ); } #ifdef QT_V4LAYOUT classDataSources::classDataSources( Q3ListViewItem *pParent, classCanvas *pCanvas, int nDataSourceType, SQLHENV hEnv ) #else classDataSources::classDataSources( QListViewItem *pParent, classCanvas *pCanvas, int nDataSourceType, SQLHENV hEnv ) #endif : classNode( pParent, pCanvas ) { Init( nDataSourceType, hEnv ); } #ifdef QT_V4LAYOUT classDataSources::classDataSources( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, int nDataSourceType, SQLHENV hEnv ) #else classDataSources::classDataSources( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, int nDataSourceType, SQLHENV hEnv ) #endif : classNode( pParent, pAfter, pCanvas ) { Init( nDataSourceType, hEnv ); } classDataSources::~classDataSources() { listDataSources.clear(); } void classDataSources::Init( int nDataSourceType, SQLHENV hEnv ) { switch ( nDataSourceType ) { case classDataSources::System : this->nDataSourceType = nDataSourceType; setText( 0, "System Data Sources" ); setText( 1, "" ); setText( 2, "" ); setPixmap( 0, QPixmap( datasourcessystem_xpm ) ); break; default: this->nDataSourceType = classDataSources::User; setText( 0, "User Data Sources" ); setText( 1, "" ); setText( 2, "" ); setPixmap( 0, QPixmap( datasourcesuser_xpm ) ); } this->pCanvas = pCanvas; this->hEnv = hEnv; #ifndef QT_V4LAYOUT listDataSources.setAutoDelete( TRUE ); #endif } void classDataSources::setOpen( bool bOpen ) { int nElement; char szResults[9600]; char szObjectName[INI_MAX_OBJECT_NAME+1]; memset( szResults, 0, sizeof(szResults) ); // Results buffer must be cleared classDataSource *pLastDataSource = NULL; if ( bOpen ) { memset( szResults, 0, sizeof(szResults) ); if ( nDataSourceType == User ) SQLSetConfigMode( ODBC_USER_DSN ); else SQLSetConfigMode( ODBC_SYSTEM_DSN ); if ( SQLGetPrivateProfileString( 0, 0, 0, szResults, 9600, 0 ) > 0 ) { for ( nElement = 0; iniElement( szResults, '\0', '\0', nElement, szObjectName, INI_MAX_OBJECT_NAME ) == INI_SUCCESS; nElement++ ) { listDataSources.append( pLastDataSource = new classDataSource( this, pLastDataSource, pCanvas, nDataSourceType, szObjectName, hEnv )); } } else { //SQLInstallerError( 1, &nError, szError, FILENAME_MAX, 0 ); //if ( cVerbose == 0 ) printf( "[odbcinst] SQLGetPrivateProfileString failed with %s.\n", szError ); //return; } SQLSetConfigMode( ODBC_BOTH_DSN ); } else { listDataSources.clear(); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } void classDataSources::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } #ifdef QT_V4LAYOUT void classDataSources::selectionChanged( Q3ListViewItem *p ) #else void classDataSources::selectionChanged( QListViewItem *p ) #endif { classDataSource *pDataSource; for ( pDataSource = listDataSources.first(); pDataSource != 0; pDataSource = listDataSources.next() ) pDataSource->selectionChanged( p ); if ( p == this ) { } } unixODBC-2.2.14-p2/DataManager/classDriver.cpp0100644000076400007640000000625610564052115017336 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classDriver.h" #include "driver.xpm" #ifdef QT_V4LAYOUT classDriver::classDriver( Q3ListView *pParent, classCanvas *pCanvas, char *pszDriverName, SQLHENV hEnv ) #else classDriver::classDriver( QListView *pParent, classCanvas *pCanvas, char *pszDriverName, SQLHENV hEnv ) #endif : classNode( pParent, pCanvas ) { Init( pszDriverName, hEnv ); } #ifdef QT_V4LAYOUT classDriver::classDriver( Q3ListViewItem *pParent, classCanvas *pCanvas, char *pszDriverName, SQLHENV hEnv ) #else classDriver::classDriver( QListViewItem *pParent, classCanvas *pCanvas, char *pszDriverName, SQLHENV hEnv ) #endif : classNode( pParent, pCanvas ) { Init( pszDriverName, hEnv ); } #ifdef QT_V4LAYOUT classDriver::classDriver( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, char *pszDriverName, SQLHENV hEnv ) #else classDriver::classDriver( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, char *pszDriverName, SQLHENV hEnv ) #endif : classNode( pParent, pAfter, pCanvas ) { Init( pszDriverName, hEnv ); } classDriver::~classDriver() { } /******************************************************* * Init ******************************************************* * Call the odbcinst to get Driver description. * * NOTE: This should be done via the Driver Manager by * calling SQLDrivers() but the iODBC Driver Manager * does not, at this time, adequately support this call. *******************************************************/ void classDriver::Init( char *pszDriverName, SQLHENV hEnv ) { char szResults[1024]; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; qsDriverName = ""; if ( pszDriverName != 0 ) qsDriverName = pszDriverName; this->pCanvas = pCanvas; this->hEnv = hEnv; setPixmap( 0, QPixmap( driver_xpm ) ); szResults[0] = '\0'; szPropertyValue[0] = '\0'; if ( SQLGetPrivateProfileString((char*) qsDriverName.ascii(), "Description", "", szResults, sizeof(szResults), "odbcinst" ) > 0 ) iniElement( szResults, '\0', '\0', 0, szPropertyValue, INI_MAX_PROPERTY_VALUE ); else { //SQLInstallerError( 1, &nError, szError, FILENAME_MAX, 0 ); //if ( cVerbose == 0 ) printf( "[odbcinst] SQLGetPrivateProfileString failed with %s.\n", szError ); //return; } setText( 0, qsDriverName ); setText( 1, "" ); setText( 2, szPropertyValue ); } void classDriver::setOpen( bool o ) { if ( o && !childCount() ) { setExpandable( FALSE ); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( o ); #else QListViewItem::setOpen( o ); #endif } void classDriver::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } #ifdef QT_V4LAYOUT void classDriver::selectionChanged( Q3ListViewItem *p ) #else void classDriver::selectionChanged( QListViewItem *p ) #endif { if ( p == this ) { } } unixODBC-2.2.14-p2/DataManager/classDrivers.cpp0100644000076400007640000000723410564052115017516 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classDrivers.h" #include "drivers.xpm" #ifdef QT_V4LAYOUT classDrivers::classDrivers( Q3ListView *pParent, classCanvas *pCanvas, SQLHENV hEnv ) #else classDrivers::classDrivers( QListView *pParent, classCanvas *pCanvas, SQLHENV hEnv ) #endif : classNode( pParent, pCanvas ) { Init( hEnv ); } #ifdef QT_V4LAYOUT classDrivers::classDrivers( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHENV hEnv ) #else classDrivers::classDrivers( QListViewItem *pParent, classCanvas *pCanvas, SQLHENV hEnv ) #endif : classNode( pParent, pCanvas ) { Init( hEnv ); } #ifdef QT_V4LAYOUT classDrivers::classDrivers( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hEnv ) #else classDrivers::classDrivers( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hEnv ) #endif : classNode( pParent, pAfter, pCanvas ) { Init( hEnv ); } classDrivers::~classDrivers() { listDrivers.clear(); } void classDrivers::Init( SQLHENV hEnv ) { this->pCanvas = pCanvas; this->hEnv = hEnv; listDrivers.setAutoDelete( TRUE ); setText( 0, "Drivers" ); setText( 1, "" ); setText( 2, "" ); setPixmap( 0, QPixmap( drivers_xpm ) ); } /******************************************************* * setOpen ******************************************************* * * *******************************************************/ void classDrivers::setOpen( bool o ) { SQLRETURN nReturn; SQLCHAR szDriverDesc[1024]; /******************************** * METHOD 1 - Using Driver Manager ********************************/ if ( o && !childCount() ) { nReturn = SQLDrivers( hEnv, SQL_FETCH_FIRST, szDriverDesc, sizeof(szDriverDesc)-1, 0, 0, -1, 0 ); while ( nReturn == SQL_SUCCESS ) { listDrivers.append( new classDriver( this, pCanvas, (char*)szDriverDesc, hEnv ) ); nReturn = SQLDrivers( hEnv, SQL_FETCH_NEXT, szDriverDesc, sizeof(szDriverDesc)-1, 0, 0, -1, 0 ); } } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( o ); #else QListViewItem::setOpen( o ); #endif /******************************** * METHOD 2 - Using odbcinst ********************************/ /* int nElement; char szResults[9600]; char szObjectName[INI_MAX_OBJECT_NAME+1]; if ( o && !childCount() ) { // ADD CHILD NODES; only classDataSources knows what they may be szResults[0] = '\0'; if ( SQLGetInstalledDrivers( szResults, 9600, 0 ) == TRUE ) { for ( nElement = 0; iniElement( szResults, '\0', '\0', nElement, szObjectName, INI_MAX_OBJECT_NAME ) == INI_SUCCESS; nElement++ ) { listDrivers.append( new classDriver( this, pCanvas, szObjectName, hEnv ) ); } } else { //SQLInstallerError( 1, &nError, szError, FILENAME_MAX, 0 ); //if ( cVerbose == 0 ) printf( "[odbcinst] SQLGetPrivateProfileString failed with %s.\n", szError ); //return; } } QListViewItem::setOpen( o ); */ } void classDrivers::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } #ifdef QT_V4LAYOUT void classDrivers::selectionChanged( Q3ListViewItem *p ) #else void classDrivers::selectionChanged( QListViewItem *p ) #endif { classDriver *pDriver; for ( pDriver = listDrivers.first(); pDriver != 0; pDriver = listDrivers.next() ) pDriver->selectionChanged( p ); if ( p == this ) { } } unixODBC-2.2.14-p2/DataManager/classISQL.cpp0100644000076400007640000003542110564052115016647 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classISQL.h" #define MAX_COLUMN_WIDTH 300 /* see szColumn */ classISQL::classISQL( SQLHDBC hDbc, QString qsDataSource, QWidget *parent, const char *name ) : QWidget( parent, name ) { QString qsCaption; QFont qf( "Fixed", 12 ); qf.setFixedPitch( TRUE ); this->hDbc = hDbc; this->qsDataSource = qsDataSource.stripWhiteSpace(); qsSQLFileName = ""; qsResultsFileName = ""; qsCaption.sprintf( "ISQL %s", (const char *)qsDataSource ); setCaption( qsCaption ); #ifdef QT_V4LAYOUT txtSQL = new Q3MultiLineEdit( this, "txtSQL" ); txtSQL->setFocusPolicy( Qt::StrongFocus ); txtSQL->setBackgroundMode( Qt::PaletteBase ); #else txtSQL = new QMultiLineEdit( this, "txtSQL" ); txtSQL->setFocusPolicy( QWidget::StrongFocus ); txtSQL->setBackgroundMode( QWidget::PaletteBase ); #endif txtSQL->insertLine( "" ); txtSQL->setReadOnly( FALSE ); txtSQL->setOverwriteMode( FALSE ); txtSQL->setFont( qf ); pTabBar = new QTabBar( this ); pTabBar->setGeometry( 0, 0, 150, 20 ); #ifdef QT_V4LAYOUT pTabBar->addTab( QString( "SQL" )); pTabBar->addTab( QString("Results")); #else QTab *pTab = new QTab( "SQL" ); pTabBar->addTab( pTab ); pTab = new QTab( "Results" ); pTabBar->addTab( pTab ); #endif connect( pTabBar, SIGNAL(selected(int)), SLOT(ChangeTextType(int)) ); #ifdef QT_V4LAYOUT txtResults = new Q3MultiLineEdit( this, "txtResults" ); txtResults->setFocusPolicy( Qt::StrongFocus ); txtResults->setBackgroundMode( Qt::PaletteBase ); #else txtResults = new QMultiLineEdit( this, "txtResults" ); txtResults->setFocusPolicy( QWidget::StrongFocus ); txtResults->setBackgroundMode( QWidget::PaletteBase ); #endif txtResults->insertLine( "" ); txtResults->setReadOnly( FALSE ); txtResults->setOverwriteMode( FALSE ); txtResults->setFont( qf ); listSQL.append( QString("") ); nSQL = 1; #ifdef QT_V4LAYOUT pSliderRecentSQL = new QSlider( Qt::Vertical, this ); #else pSliderRecentSQL = new QSlider( QSlider::Vertical, this ); #endif pSliderRecentSQL->setTickmarks( QSlider::Left ); pSliderRecentSQL->setTickInterval( 1 ); pSliderRecentSQL->setLineStep( 1 ); pSliderRecentSQL->setPageStep( 1 ); pSliderRecentSQL->setMinValue( nSQL ); pSliderRecentSQL->setMaxValue( nSQL ); pSliderRecentSQL->setValue( nSQL ); connect( pSliderRecentSQL, SIGNAL(valueChanged(int)), SLOT(gotoHistoryItem(int)) ); resize( 590,400 ); setMinimumSize( 50, 50 ); setMaximumSize( 32767, 32767 ); // SETUP MAIN MENU txtResults->hide(); resize( parent->width(), parent->height() ); } classISQL::~classISQL() { } void classISQL::ExecSQL() { SQLHSTMT hStmt; QString qsHorizSep; SQLLEN nRowsAffected; SWORD nColumns; int iRC = 0; /* TIM - return error messages if provided */ char szState[10]; char szBuf[700]; char szErrString[800]; SQLRETURN retcode; // CREATE A STATEMENT iRC = SQLAllocStmt( hDbc, &hStmt ); if ( SQL_SUCCESS != iRC ) QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed: SQLAllocStmt " ); if ( SQL_SUCCESS != (iRC=SQLPrepare(hStmt, (SQLCHAR*)(txtSQL->text().ascii()), SQL_NTS)) ) { retcode = SQLError(SQL_NULL_HENV, hDbc, hStmt, (SQLCHAR*)szState, NULL, (SQLCHAR*)szBuf, 700, NULL); if ( retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO ) QMessageBox::critical( (QWidget *)this, "Data Manager", szBuf); else QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed: SQLPrepare " ); } // EXECUTE iRC = SQLExecute( hStmt ); if ( iRC != SQL_SUCCESS ) { retcode = SQLError( 0, 0, hStmt, (SQLCHAR*)szState, NULL, (SQLCHAR*)szBuf, 700, NULL); if ( retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO ) QMessageBox::critical( (QWidget *)this, "Data Manager", szBuf); else QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed: SQLExecute " ); } if ( iRC != SQL_SUCCESS && iRC != SQL_SUCCESS_WITH_INFO ) return; // UPDATE HISTORY appendHistoryItem(); // GET NUMBER OF ROWS AFFECTED // Wait until we know the exact number. SQLRowCount is not supported by all drivers and should not // be used. // nRowsAffected = -1; // if ( (iRC = SQLRowCount( hStmt, &nRowsAffected )) != SQL_SUCCESS ) // nRowsAffected = -1; // GET NUMBER OF COLUMNS RETURNED if ( (iRC = SQLNumResultCols( hStmt, &nColumns )) != SQL_SUCCESS ) nColumns = -1; txtResults->setAutoUpdate( FALSE ); txtResults->clear(); // GET A RESULTS HEADER (column headers) getResultsHeader( hStmt, nColumns, &qsHorizSep ); // GET A RESULTS BODY (data) nRowsAffected = getResultsBody( hStmt, nColumns ); // FREE STATEMENT iRC = SQLFreeStmt( hStmt, SQL_DROP ); if ( SQL_SUCCESS != iRC ) QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed: SQLFreeStmt " ); pTabBar->setCurrentTab( 1 ); txtResults->show(); txtSQL->hide(); txtResults->append( qsHorizSep ); qsHorizSep.sprintf( "\n\n%d rows affected", nRowsAffected ); txtResults->append( qsHorizSep ); txtResults->setAutoUpdate( TRUE ); txtResults->repaint(); } int classISQL::getResultsHeader( SQLHSTMT hStmt, SWORD nColumns, QString *pqsHorizSep ) { QString qsColumnHeader = ""; QString qsColumn = ""; QString qsColumnName = ""; int nCol; SQLLEN nMaxLength = 10; SQLCHAR szColumnName[101] = ""; *pqsHorizSep = ""; for ( nCol = 1; nCol <= nColumns; nCol++ ) { int nWidth; SQLColAttribute( hStmt, nCol, SQL_DESC_DISPLAY_SIZE, 0, 0, 0, &nMaxLength ); SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), 0, 0 ); qsColumnName = (const char *)szColumnName; nWidth = max( nMaxLength, qsColumnName.length() ); nWidth = min( nWidth, MAX_COLUMN_WIDTH ); qsColumn.fill( '-', nWidth ); qsColumn += "-"; *pqsHorizSep += ( "+" + qsColumn ); qsColumn.sprintf( "| %-*s", nWidth, szColumnName ); qsColumnHeader += qsColumn; } *pqsHorizSep += "+\n"; qsColumnHeader += "|\n"; txtResults->append( *pqsHorizSep ); txtResults->append( qsColumnHeader ); txtResults->append( *pqsHorizSep ); return qsColumnHeader.length(); } int classISQL::getResultsBody( SQLHSTMT hStmt, SWORD nColumns ) { QString qsLine; QString qsColumn; QString qsColumnName = ""; int iRC = 0; SQLUSMALLINT nCol = 0; SQLLEN nIndicator; char szColumn[MAX_COLUMN_WIDTH+1]; int nRow = 0; SQLLEN nMaxLength = 10; SQLCHAR szColumnName[101]; // PROCESS ALL ROWS while ( SQL_SUCCESS == (iRC=SQLFetch(hStmt)) || SQL_SUCCESS_WITH_INFO == iRC ) { int nWidth; nRow++; qsLine = ""; // PROCESS ALL COLUMNS for ( nCol = 1; nCol <= nColumns; nCol++ ) { SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), 0, 0 ); SQLColAttribute( hStmt, nCol, SQL_DESC_DISPLAY_SIZE, 0, 0, 0, &nMaxLength ); qsColumnName = (const char *)szColumnName; iRC = SQLGetData( hStmt, nCol, SQL_C_CHAR, (SQLPOINTER)szColumn, sizeof(szColumn), &nIndicator ); /* * this is to handle a broken driver not null terminated * truncated strings */ szColumn[MAX_COLUMN_WIDTH] = '\0'; nWidth = max( nMaxLength, qsColumnName.length() ); nWidth = min( nWidth, MAX_COLUMN_WIDTH ); if ( iRC == SQL_SUCCESS && nIndicator != SQL_NULL_DATA ) qsColumn.sprintf( "| %-*s", nWidth, szColumn ); else // Print a dash to represent NULL data as opposed to real blanks qsColumn.sprintf( "| %-*s", nWidth, "-" ); qsLine += qsColumn; } qsLine += "|\n"; txtResults->append( qsLine ); } return nRow ; } void classISQL::ChangeTextType( int nTab ) { if ( nTab == 0 ) { pSliderRecentSQL->show(); txtSQL->show(); txtResults->hide(); } else { pSliderRecentSQL->hide(); txtSQL->hide(); txtResults->show(); } } void classISQL::gotoHistoryItem( int nValue ) { #ifdef QT_V4LAYOUT Q3ValueList::Iterator it; #else QValueList::Iterator it; #endif // SAVE ANY CHANGES it = listSQL.at( nSQL ); (*it) = txtSQL->text(); // MOVE nSQL = nValue; it = listSQL.at( nSQL ); txtSQL->setText( (*it) ); // Lets keep it simple for now, previous sql can be executed again but not edited, force // the user to copy and paste to last sql for editing. Remember; its important to maintain // a history of executed statements, unchanged, so that the user can audit self. QPalette oPalette = txtResults->palette(); if ( nSQL == pSliderRecentSQL->maxValue() ) { txtSQL->setReadOnly( false ); txtSQL->setPalette( oPalette ); } else { txtSQL->setReadOnly( true ); oPalette.setColor( QColorGroup::Text, txtResults->backgroundColor() ); oPalette.setColor( QColorGroup::Base, txtResults->foregroundColor() ); txtSQL->setPalette( oPalette ); } } void classISQL::appendHistoryItem() { #ifdef QT_V4LAYOUT Q3ValueList::Iterator it; #else QValueList::Iterator it; #endif // SAVE ANY CHANGES it = listSQL.at( nSQL ); (*it) = txtSQL->text(); // ADD AS LAST & MOVE TO LAST listSQL.append( txtSQL->text() ); pSliderRecentSQL->setMaxValue( pSliderRecentSQL->maxValue() + 1 ); pSliderRecentSQL->setValue( pSliderRecentSQL->maxValue() ); } void classISQL::NewSQL() { pSliderRecentSQL->setValue( pSliderRecentSQL->maxValue() ); txtSQL->clear(); setCaption( qsDataSource ); qsSQLFileName = ""; qsResultsFileName = ""; setTextType( 0 ); } /* * there seems to be two of these, and they are different!!! * this seems to be the same as appendHistoryItem() */ /* void classISQL::OpenSQL() { #ifdef QT_V4LAYOUT Q3ValueList::Iterator it; #else QValueList::Iterator it; #endif // SAVE ANY CHANGES it = listSQL.at( nSQL ); (*it) = txtSQL->text(); // ADD AS LAST & MOVE TO LAST listSQL.append( txtSQL->text() ); pSliderRecentSQL->setMaxValue( pSliderRecentSQL->maxValue() + 1 ); pSliderRecentSQL->setValue( pSliderRecentSQL->maxValue() ); } */ void classISQL::OpenSQL() { #ifdef QT_V4LAYOUT Q3MultiLineEdit *txt; #else QMultiLineEdit *txt; #endif #ifdef QT_V4LAYOUT if ( pTabBar->currentIndex() == 0 ) #else if ( pTabBar->currentTab() == 0 ) #endif { pSliderRecentSQL->setValue( pSliderRecentSQL->maxValue() ); txt = txtSQL; } else txt = txtResults; // LET USER PICK A FILE QString qsFile = QFileDialog::getOpenFileName(); if ( qsFile.isNull() ) return; // TRY TO LOAD THE FILE QFile hFile( qsFile ); if ( !hFile.open( IO_ReadOnly ) ) return; txt->setAutoUpdate( FALSE ); txt->clear(); #ifdef QT_V4LAYOUT Q3TextStream t( &hFile ); #else QTextStream t( &hFile ); #endif while ( !t.eof() ) { QString s = t.readLine(); txt->append( s ); } hFile.close(); txt->setAutoUpdate( TRUE ); txt->repaint(); #ifdef QT_V4LAYOUT if ( pTabBar->currentIndex() == 0 ) #else if ( pTabBar->currentTab() == 0 ) #endif qsSQLFileName = qsFile; else qsResultsFileName = qsFile; setTextType( 0 ); } void classISQL::SaveSQL() { #ifdef QT_V4LAYOUT Q3MultiLineEdit *txt; #else QMultiLineEdit *txt; #endif QString qsFileName; #ifdef QT_V4LAYOUT if ( pTabBar->currentIndex() == 0 ) #else if ( pTabBar->currentTab() == 0 ) #endif { txt = txtSQL; qsFileName = qsSQLFileName; } else { txt = txtResults; qsFileName = qsResultsFileName; } if ( qsFileName == "" ) { SaveAsSQL(); return; } // TRY TO SAVE THE FILE QFile hFile( qsFileName ); if ( !hFile.open( IO_WriteOnly ) ) return; hFile.writeBlock( txt->text(), txt->text().length() ); hFile.close(); } void classISQL::SaveAsSQL() { #ifdef QT_V4LAYOUT Q3MultiLineEdit *txt; #else QMultiLineEdit *txt; #endif QString qsFileName; #ifdef QT_V4LAYOUT if ( pTabBar->currentIndex() == 0 ) #else if ( pTabBar->currentTab() == 0 ) #endif { txt = txtSQL; qsFileName = qsSQLFileName; } else { txt = txtResults; qsFileName = qsResultsFileName; } // LET USER PICK A FILE QString qsFile = QFileDialog::getSaveFileName( qsFileName ); if ( qsFile.isNull() ) return; // TRY TO SAVE THE FILE QFile hFile( qsFile ); if ( !hFile.open( IO_WriteOnly ) ) return; hFile.writeBlock( txt->text(), txt->text().length() ); hFile.close(); #ifdef QT_V4LAYOUT if ( pTabBar->currentIndex() == 0 ) #else if ( pTabBar->currentTab() == 0 ) #endif { qsSQLFileName = qsFile; } else { qsResultsFileName = qsFile; } } void classISQL::setTextType( int nIndex ) { pTabBar->setCurrentTab( nIndex ); if ( nIndex == 0 ) { txtResults->hide(); pSliderRecentSQL->show(); txtSQL->show(); } else { pSliderRecentSQL->hide(); txtSQL->hide(); txtResults->show(); } } void classISQL::resizeEvent( QResizeEvent *p ) { int nMarg = 0; int nYOffset = pTabBar->height(); int nW = 0; int nH = 0; resize( p->size() ); nW = p->size().width() - nMarg * 2; nH = p->size().height() - nMarg * 2; pSliderRecentSQL->setGeometry( nMarg, nYOffset, 20, nH - nYOffset ); txtSQL->setGeometry( nMarg + pSliderRecentSQL->width(), nYOffset + nMarg, nW - pSliderRecentSQL->width(), nH - nYOffset ); txtResults->setGeometry( nMarg, nYOffset + nMarg, nW, nH - nYOffset ); } unixODBC-2.2.14-p2/DataManager/classIndex.cpp0100644000076400007640000001045410564052115017145 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classIndex.h" #include "keysilver2.xpm" #ifdef QT_V4LAYOUT classIndex::classIndex( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszTable, char *pszIndex, char *pszDesc ) #else classIndex::classIndex( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszTable, char *pszIndex, char *pszDesc ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszTable, pszIndex, pszDesc ); } #ifdef QT_V4LAYOUT classIndex::classIndex( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable, char *pszIndex, char *pszDesc ) #else classIndex::classIndex( QListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable, char *pszIndex, char *pszDesc ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszTable, pszIndex, pszDesc ); } #ifdef QT_V4LAYOUT classIndex::classIndex( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable, char *pszIndex, char *pszDesc ) #else classIndex::classIndex( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable, char *pszIndex, char *pszDesc ) #endif : classNode( pParent, pAfter, pCanvas ) { Init( hDbc, pszTable, pszIndex, pszDesc ); } classIndex::~classIndex() { listColumns.clear(); } void classIndex::Init( SQLHDBC hDbc, char *pszTable, char *pszIndex, char *pszDesc ) { this->hDbc = hDbc; this->qsTable = pszTable; this->qsIndex = pszIndex; setText( 0, qsIndex ); setText( 1, "" ); setText( 2, pszDesc ); sortChildItems( 1, FALSE ); listColumns.setAutoDelete( TRUE ); setPixmap( 0, QPixmap( keysilver2_xpm ) ); } void classIndex::setOpen( bool o ) { if ( o && !childCount() ) { LoadColumns(); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( o ); #else QListViewItem::setOpen( o ); #endif } void classIndex::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } #ifdef QT_V4LAYOUT void classIndex::selectionChanged( Q3ListViewItem *p ) #else void classIndex::selectionChanged( QListViewItem *p ) #endif { if ( p == this ) { } } void classIndex::LoadColumns() { SQLHSTMT hstmt; SQLRETURN nReturn = -1; SQLCHAR szTableName[101] = ""; SQLCHAR szIndexName[101] = ""; SQLCHAR szColumnName[101] = ""; QString qsError; SQLLEN nIndicator = 0; if ( qsTable == "" || qsIndex == "" ) return; // CREATE A STATEMENT nReturn = SQLAllocStmt( hDbc, &hstmt ); if ( nReturn != SQL_SUCCESS ) { QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLAllocStmt" ); return; } // EXECUTE OUR SQL/CALL #ifdef QT_V4LAYOUT strcpy( (char *)szTableName, qsTable.ascii() ); #else strcpy( (char *)szTableName, qsTable.data() ); #endif if ( SQL_SUCCESS != (nReturn=SQLStatistics( hstmt, 0, 0, 0, 0, szTableName, SQL_NTS, 0, 0 )) ) { QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLStatistics" ); return; } // GET RESULTS nReturn = SQLFetch( hstmt ); while ( nReturn == SQL_SUCCESS || nReturn == SQL_SUCCESS_WITH_INFO ) { nReturn = SQLGetData( hstmt, 6, SQL_C_CHAR, &szIndexName[0], sizeof(szIndexName), &nIndicator ); if ( nReturn != SQL_SUCCESS || nIndicator == SQL_NULL_DATA ) strcpy( (char *)szIndexName, "Unknown" ); nReturn = SQLGetData( hstmt, 9, SQL_C_CHAR, &szColumnName[0], sizeof(szColumnName), &nIndicator ); if ( nReturn != SQL_SUCCESS || nIndicator == SQL_NULL_DATA ) strcpy( (char *)szColumnName, "Unknown" ); #ifdef QT_V4LAYOUT if ( strcmp( (const char*)szIndexName, qsIndex.ascii() ) == 0 ) #else if ( strcmp( (const char*)szIndexName, qsIndex.data() ) == 0 ) #endif { listColumns.append( new classColumn( this, pCanvas, hDbc, (char *)szColumnName ) ); } nReturn = SQLFetch( hstmt ); } // FREE STATEMENT nReturn = SQLFreeStmt( hstmt, SQL_DROP ); if ( nReturn != SQL_SUCCESS ) QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLFreeStmt" ); } unixODBC-2.2.14-p2/DataManager/classIndexs.cpp0100644000076400007640000001026710564052115017332 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classIndexs.h" #include "keysilver2.xpm" #ifdef QT_V4LAYOUT classIndexs::classIndexs( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszTable ) #else classIndexs::classIndexs( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszTable ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszTable ); } #ifdef QT_V4LAYOUT classIndexs::classIndexs( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #else classIndexs::classIndexs( QListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszTable ); } #ifdef QT_V4LAYOUT classIndexs::classIndexs( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #else classIndexs::classIndexs( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #endif : classNode( pParent, pAfter, pCanvas ) { Init( hDbc, pszTable ); } classIndexs::~classIndexs() { listIndexs.clear(); } void classIndexs::Init( SQLHDBC hDbc, char *pszTable ) { this->hDbc = hDbc; this->qsTable = pszTable; setText( 0, "Indexs" ); setText( 1, "" ); setText( 2, "" ); listIndexs.setAutoDelete( TRUE ); this->setPixmap( 0, QPixmap( keysilver2_xpm ) ); } void classIndexs::setOpen( bool o ) { if ( o && !childCount() ) { LoadIndexs(); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( o ); #else QListViewItem::setOpen( o ); #endif } void classIndexs::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } void classIndexs::LoadIndexs() { SQLHSTMT hstmt; SQLRETURN nReturn = -1; SQLCHAR szTableName[101] = ""; SQLCHAR szIndexName[101] = ""; SQLCHAR szPrevIndexName[101] = ""; int bUnique = 0; SQLCHAR szDesc[101] = ""; QString qsError; SQLLEN nIndicator = 0; // CREATE A STATEMENT nReturn = SQLAllocStmt( hDbc, &hstmt ); if ( nReturn != SQL_SUCCESS ) { QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLAllocStmt" ); return; } // EXECUTE OUR SQL/CALL #ifdef QT_V4LAYOUT strcpy( (char *)szTableName, qsTable.ascii() ); #else strcpy( (char *)szTableName, qsTable.data() ); #endif if ( SQL_SUCCESS != (nReturn=SQLStatistics( hstmt, 0, 0, 0, 0, szTableName, SQL_NTS, 0, 0 )) ) { QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLStatistics" ); return; } // GET RESULTS nReturn = SQLFetch( hstmt ); while ( nReturn == SQL_SUCCESS || nReturn == SQL_SUCCESS_WITH_INFO ) { nReturn = SQLGetData( hstmt, 4, SQL_C_LONG, &bUnique, sizeof(bUnique), &nIndicator ); if ( nReturn != SQL_SUCCESS || nIndicator == SQL_NULL_DATA || !bUnique ) strcpy( (char *)szDesc, "" ); else strcpy( (char *)szDesc, "UNIQUE" ); nReturn = SQLGetData( hstmt, 6, SQL_C_CHAR, &szIndexName[0], sizeof(szIndexName), &nIndicator ); if ( nReturn != SQL_SUCCESS || nIndicator == SQL_NULL_DATA ) strcpy( (char *)szIndexName, "Unknown" ); if ( strcmp( (const char*)szIndexName, (const char*)szPrevIndexName ) != 0 ) { listIndexs.append( new classIndex( this, pCanvas, hDbc, (char *)szTableName, (char *)szIndexName, (char *)szDesc ) ); strcpy( (char*)szPrevIndexName, (char*)szIndexName ); } nReturn = SQLFetch( hstmt ); } // FREE STATEMENT nReturn = SQLFreeStmt( hstmt, SQL_DROP ); if ( nReturn != SQL_SUCCESS ) QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLFreeStmt" ); } #ifdef QT_V4LAYOUT void classIndexs::selectionChanged( Q3ListViewItem *p ) #else void classIndexs::selectionChanged( QListViewItem *p ) #endif { classIndex *pIndex; for ( pIndex = listIndexs.first(); pIndex != 0; pIndex = listIndexs.next() ) pIndex->selectionChanged( p ); if ( p == this ) { } } unixODBC-2.2.14-p2/DataManager/classLogin.cpp0100644000076400007640000000612710564052115017150 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classLogin.h" classLogin::classLogin( QWidget *pParent, SQLHDBC hDbc, char *pszDataSource, int nDataSourceType ) : QDialog( pParent, "classLogin", TRUE ) { QLabel *lblUID; QLabel *lblPWD; QPushButton *pbOk; QPushButton *pbCancel; if ( nDataSourceType == classLogin::System ) nDataSourceType = classLogin::System; else nDataSourceType = classLogin::User; qsDataSourceName = pszDataSource; this->hDbc = hDbc; setCaption( "Login - " + qsDataSourceName ); lblUID = new QLabel( "ID:", this ); lblPWD = new QLabel( "PWD:", this ); txtUID = new QLineEdit( this ); txtPWD = new QLineEdit( this ); pbOk = new QPushButton( "&Ok", this ); pbCancel = new QPushButton( "&Cancel", this ); lblUID->setGeometry( 5, 10, 30, 25 ); lblPWD->setGeometry( 5, 40, 30, 25 ); txtUID->setGeometry( 35, 10, 200, 25 ); txtPWD->setGeometry( 35, 40, 200, 25 ); pbOk->setGeometry( 35, 70, 100, 25 ); pbCancel->setGeometry( 135, 70, 100, 25 ); txtUID->setText( ((struct passwd *)getpwuid(getuid()))->pw_name ); txtPWD->setEchoMode( QLineEdit::Password ); connect( pbOk, SIGNAL(clicked()), this, SLOT(pbOk_Clicked()) ); connect( pbCancel, SIGNAL(clicked()), this, SLOT(pbCancel_Clicked()) ); pbOk->setDefault( TRUE ); txtPWD->setFocus(); } classLogin::~classLogin() { } void classLogin::pbOk_Clicked() { SQLCHAR szDSN[101]; SQLCHAR szUID[101]; SQLCHAR szPWD[101]; SQLRETURN nReturn; /* OK - Try to login */ #ifdef QT_V4LAYOUT strncpy( (char *)szDSN, qsDataSourceName.ascii(), 100 ); #else strncpy( (char *)szDSN, qsDataSourceName.data(), 100 ); #endif strncpy( (char *)szUID, txtUID->text(), 100 ); strncpy( (char *)szPWD, txtPWD->text(), 100 ); nReturn = SQLConnect( hDbc, szDSN, SQL_NTS, szUID, SQL_NTS, szPWD, SQL_NTS ); if ( nReturn != SQL_SUCCESS && nReturn != SQL_SUCCESS_WITH_INFO ) { /* TIM - return error messages if provided */ char szState[10]; char szBuf[700]; char szErrString[800]; SQLRETURN retcode; retcode = SQLError(SQL_NULL_HENV, hDbc, SQL_NULL_HSTMT, (SQLCHAR*)szState, NULL, (SQLCHAR*)szBuf, 700, NULL); if (retcode == SQL_SUCCESS) QMessageBox::warning( this, "Data Manager", szBuf); else /* END TIM */ QMessageBox::warning( this, "Data Manager", "Login failed\n\nThis may be for one of these reasons;\n1. invalid ID and Password\n2. invalid Data Source config\n3. improper installation" ); return; } /* Logged in so */ accept(); } void classLogin::pbCancel_Clicked() { reject(); } unixODBC-2.2.14-p2/DataManager/classNode.cpp0100644000076400007640000000352510564052115016764 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classNode.h" #ifdef QT_V4LAYOUT classNode::classNode( Q3ListView *pParent, classCanvas *pCanvas ) : Q3ListViewItem( pParent ) #else classNode::classNode( QListView *pParent, classCanvas *pCanvas ) : QListViewItem( pParent ) #endif { Init( pCanvas); } #ifdef QT_V4LAYOUT classNode::classNode( Q3ListViewItem *pParent, classCanvas *pCanvas ) : Q3ListViewItem( pParent ) #else classNode::classNode( QListViewItem *pParent, classCanvas *pCanvas ) : QListViewItem( pParent ) #endif { Init( pCanvas ); } #ifdef QT_V4LAYOUT classNode::classNode( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas ) : Q3ListViewItem( pParent, pAfter ) #else classNode::classNode( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas ) : QListViewItem( pParent, pAfter ) #endif { Init( pCanvas ); } classNode::~classNode() { } void classNode::Init( classCanvas *pCanvas ) { this->pCanvas = pCanvas; setText( 0, "Object" ); setText( 1, "Type" ); setText( 2, "Description" ); } void classNode::setOpen( bool o ) { if ( o && !childCount() ) { } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( o ); #else QListViewItem::setOpen( o ); #endif } void classNode::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } #ifdef QT_V4LAYOUT void classNode::selectionChanged ( Q3ListViewItem * ) #else void classNode::selectionChanged ( QListViewItem * ) #endif { } unixODBC-2.2.14-p2/DataManager/classODBC.cpp0100644000076400007640000000453410564052115016607 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classODBC.h" #include "ODBC.xpm" #ifdef QT_V4LAYOUT classODBC::classODBC( Q3ListView *pParent, classCanvas *pCanvas ) #else classODBC::classODBC( QListView *pParent, classCanvas *pCanvas ) #endif : classNode( pParent, pCanvas ) { Init(); } #ifdef QT_V4LAYOUT classODBC::classODBC( Q3ListViewItem *pParent, classCanvas *pCanvas ) #else classODBC::classODBC( QListViewItem *pParent, classCanvas *pCanvas ) #endif : classNode( pParent, pCanvas ) { Init(); } classODBC::~classODBC() { if (( void * ) hEnv != 0 ) { SQLFreeEnv( hEnv ); } } void classODBC::Init() { hEnv = 0; this->pCanvas = pCanvas; pDrivers = 0; pDataSourcesUser = 0; pDataSourcesSystem = 0; setPixmap( 0, QPixmap(xpmODBC) ); setText( 0, "ODBC" ); setText( 1, "" ); setText( 2, "Open Database Connectivity" ); } void classODBC::setOpen( bool o ) { if ( o && !childCount() ) { // CREATE AN ODBC ENVIRONMENT if ( SQLAllocEnv( &hEnv ) != SQL_SUCCESS ) { QMessageBox::critical( pCanvas, "Data Manager", "Call to the ODBC Driver Manager failed" ); return; } // ADD CHILD NODES; only classODBC knows what they may be pDrivers = new classDrivers( this, pCanvas, hEnv ); pDataSourcesSystem = new classDataSources( this, pDrivers, pCanvas, classDataSources::System, hEnv ); pDataSourcesUser = new classDataSources( this, pDataSourcesSystem, pCanvas, classDataSources::User, hEnv ); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( o ); #else QListViewItem::setOpen( o ); #endif } void classODBC::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } #ifdef QT_V4LAYOUT void classODBC::selectionChanged( Q3ListViewItem *p ) #else void classODBC::selectionChanged( QListViewItem *p ) #endif { if ( pDrivers ) pDrivers->selectionChanged( p ); if ( pDataSourcesUser ) pDataSourcesUser->selectionChanged( p ); if ( pDataSourcesSystem ) pDataSourcesSystem->selectionChanged( p ); if ( p == this ) { } } unixODBC-2.2.14-p2/DataManager/classPrimaryKeys.cpp0100644000076400007640000000434010564052115020352 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classPrimaryKeys.h" #include "keyred.xpm" #ifdef QT_V4LAYOUT classPrimaryKeys::classPrimaryKeys( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszTable ) #else classPrimaryKeys::classPrimaryKeys( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszTable ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszTable ); } #ifdef QT_V4LAYOUT classPrimaryKeys::classPrimaryKeys( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #else classPrimaryKeys::classPrimaryKeys( QListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszTable ); } #ifdef QT_V4LAYOUT classPrimaryKeys::classPrimaryKeys( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #else classPrimaryKeys::classPrimaryKeys( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #endif : classNode( pParent, pAfter, pCanvas ) { Init( hDbc, pszTable ); } classPrimaryKeys::~classPrimaryKeys() { } void classPrimaryKeys::Init( SQLHDBC hDbc, char *pszTable ) { this->hDbc = hDbc; this->qsTable = pszTable; setText( 0, "PrimaryKeys" ); setText( 1, "" ); setText( 2, "" ); this->setPixmap( 0, QPixmap( keyred_xpm ) ); } void classPrimaryKeys::setOpen( bool o ) { if ( o && !childCount() ) { LoadColumns(); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( o ); #else QListViewItem::setOpen( o ); #endif } void classPrimaryKeys::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } void classPrimaryKeys::LoadColumns() { } #ifdef QT_V4LAYOUT void classPrimaryKeys::selectionChanged( Q3ListViewItem * ) #else void classPrimaryKeys::selectionChanged( QListViewItem * ) #endif { } unixODBC-2.2.14-p2/DataManager/classSpecialColumns.cpp0100644000076400007640000000753410564052115021024 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classSpecialColumns.h" #include "id.xpm" #ifdef QT_V4LAYOUT classSpecialColumns::classSpecialColumns( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszTable ) #else classSpecialColumns::classSpecialColumns( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszTable ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszTable ); } #ifdef QT_V4LAYOUT classSpecialColumns::classSpecialColumns( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #else classSpecialColumns::classSpecialColumns( QListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszTable ); } #ifdef QT_V4LAYOUT classSpecialColumns::classSpecialColumns( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #else classSpecialColumns::classSpecialColumns( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszTable ) #endif : classNode( pParent, pAfter, pCanvas ) { Init( hDbc, pszTable ); } classSpecialColumns::~classSpecialColumns() { listColumns.clear(); } void classSpecialColumns::Init( SQLHDBC hDbc, char *pszTable ) { this->hDbc = hDbc; this->qsTable = pszTable; setText( 0, "SpecialColumns" ); setText( 1, "" ); setText( 2, "" ); sortChildItems( 1, FALSE ); listColumns.setAutoDelete( TRUE ); this->setPixmap( 0, QPixmap( id_xpm ) ); } void classSpecialColumns::setOpen( bool o ) { if ( o && !childCount() ) { LoadColumns(); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( o ); #else QListViewItem::setOpen( o ); #endif } void classSpecialColumns::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } void classSpecialColumns::LoadColumns() { SQLHSTMT hstmt; SQLRETURN nReturn = -1; SQLCHAR szTableName[101] = ""; SQLCHAR szColumnName[101] = ""; QString qsError; // CREATE A STATEMENT nReturn = SQLAllocStmt( hDbc, &hstmt ); if ( nReturn != SQL_SUCCESS ) { QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLAllocStmt" ); return; } // EXECUTE OUR SQL/CALL #ifdef QT_V4LAYOUT strcpy( (char *)szTableName, qsTable.ascii() ); #else strcpy( (char *)szTableName, qsTable.data() ); #endif if ( SQL_SUCCESS != (nReturn=SQLSpecialColumns( hstmt, SQL_BEST_ROWID, 0, 0, 0, 0, szTableName, SQL_NTS, SQL_SCOPE_SESSION, SQL_NULLABLE )) ) { QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLSpecialColumns" ); return; } // GET RESULTS nReturn = SQLFetch( hstmt ); while ( nReturn == SQL_SUCCESS || nReturn == SQL_SUCCESS_WITH_INFO ) { nReturn = SQLGetData( hstmt, 2, SQL_C_CHAR, &szColumnName[0], sizeof(szColumnName), 0 ); if ( nReturn != SQL_SUCCESS ) strcpy( (char *)szColumnName, "Unknown" ); listColumns.append( new classColumn( this, pCanvas, hDbc, (char *)szColumnName ) ); nReturn = SQLFetch( hstmt ); } // FREE STATEMENT nReturn = SQLFreeStmt( hstmt, SQL_DROP ); if ( nReturn != SQL_SUCCESS ) QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLFreeStmt" ); } #ifdef QT_V4LAYOUT void classSpecialColumns::selectionChanged( Q3ListViewItem *p ) #else void classSpecialColumns::selectionChanged( QListViewItem *p ) #endif { classColumn *pColumn; for ( pColumn = listColumns.first(); pColumn != 0; pColumn = listColumns.next() ) pColumn->selectionChanged( p ); if ( p == this ) { } } unixODBC-2.2.14-p2/DataManager/classTable.cpp0100644000076400007640000001242610564052115017126 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classTable.h" #include "table.xpm" #ifdef QT_V4LAYOUT classTable::classTable( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszName, char *pszType, char *pszDescription ) #else classTable::classTable( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc, char *pszName, char *pszType, char *pszDescription ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszName, pszType, pszDescription ); } #ifdef QT_V4LAYOUT classTable::classTable( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszName, char *pszType, char *pszDescription ) #else classTable::classTable( QListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc, char *pszName, char *pszType, char *pszDescription ) #endif : classNode( pParent, pCanvas ) { Init( hDbc, pszName, pszType, pszDescription ); } #ifdef QT_V4LAYOUT classTable::classTable( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszName, char *pszType, char *pszDescription ) #else classTable::classTable( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, char *pszName, char *pszType, char *pszDescription ) #endif : classNode( pParent, pAfter, pCanvas ) { Init( hDbc, pszName, pszType, pszDescription ); } classTable::~classTable() { Fini(); } void classTable::Init( SQLHDBC hDbc, char *pszName, char *pszType, char *pszDescription ) { this->hDbc = hDbc; this->qsName = pszName; setText( 0, qsName ); setText( 1, pszType ); setText( 2, pszDescription ); sortChildItems( 1, FALSE ); listColumns.setAutoDelete( TRUE ); pPrimaryKeys = 0; pIndexs = 0; pSpecialColumns = 0; pBrowse = 0; this->setPixmap( 0, QPixmap( table_xpm ) ); } void classTable::Fini() { listColumns.clear(); if ( pPrimaryKeys ) delete pPrimaryKeys; if ( pIndexs ) delete pIndexs; if ( pSpecialColumns ) delete pSpecialColumns; if ( pBrowse ) delete pBrowse; pPrimaryKeys = 0; pIndexs = 0; pSpecialColumns = 0; pBrowse = 0; } void classTable::setOpen( bool bOpen ) { #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif listView()->setSelected( listView()->selectedItem(), false ); if ( bOpen ) { LoadColumns(); pPrimaryKeys = new classPrimaryKeys( this, pCanvas, hDbc, (char *)qsName.data() ); pIndexs = new classIndexs( this, pCanvas, hDbc, (char *)qsName.data() ); pSpecialColumns = new classSpecialColumns( this, pCanvas, hDbc, (char *)qsName.data() ); // listView()->setSelected( listView()->selectedItem(), false ); // setSelected( true ); } else { Fini(); } } void classTable::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } void classTable::LoadColumns() { SQLHSTMT hstmt; SQLRETURN nReturn = -1; SQLCHAR szTableName[101] = ""; SQLCHAR szColumnName[101] = ""; SQLCHAR szColumnType[101] = ""; SQLCHAR szDescription[301] = ""; QString qsError; classColumn *pColumn = NULL; // CREATE A STATEMENT nReturn = SQLAllocStmt( hDbc, &hstmt ); if ( nReturn != SQL_SUCCESS ) { QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLAllocStmt" ); return; } // EXECUTE OUR SQL/CALL #ifdef QT_V4LAYOUT strcpy( (char *)szTableName, qsName.ascii() ); #else strcpy( (char *)szTableName, qsName.data() ); #endif if ( SQL_SUCCESS != (nReturn=SQLColumns( hstmt, 0, 0, 0, 0, szTableName, SQL_NTS, 0, 0 )) ) { QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLColumns" ); return; } // GET RESULTS nReturn = SQLFetch( hstmt ); while ( nReturn == SQL_SUCCESS || nReturn == SQL_SUCCESS_WITH_INFO ) { szDescription[0] = '\0'; nReturn = SQLGetData( hstmt, SQLColumns_COLUMN_NAME, SQL_C_CHAR, &szColumnName[0], sizeof(szColumnName), 0 ); if ( nReturn != SQL_SUCCESS ) strcpy( (char *)szColumnName, "Unknown" ); nReturn = SQLGetData( hstmt, SQLColumns_TYPE_NAME, SQL_C_CHAR, &szColumnType[0], sizeof(szColumnType), 0 ); listColumns.append( pColumn = new classColumn( this, pColumn, pCanvas, hDbc, (char *)szColumnName, (char*)szColumnType, (char*)szDescription ) ); nReturn = SQLFetch( hstmt ); } // FREE STATEMENT nReturn = SQLFreeStmt( hstmt, SQL_DROP ); if ( nReturn != SQL_SUCCESS ) QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLFreeStmt" ); } #ifdef QT_V4LAYOUT void classTable::selectionChanged( Q3ListViewItem *p ) #else void classTable::selectionChanged( QListViewItem *p ) #endif { classColumn *pColumn; for ( pColumn = listColumns.first(); pColumn != 0; pColumn = listColumns.next() ) pColumn->selectionChanged( p ); if ( p == this ) { if ( !pBrowse ) pBrowse = new classBrowseFrame( hDbc, qsName, pCanvas ); pBrowse->show(); } else { if ( pBrowse ) pBrowse->hide(); } } unixODBC-2.2.14-p2/DataManager/classTables.cpp0100644000076400007640000001003610564052115017304 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classTables.h" #include "tables.xpm" #ifdef QT_V4LAYOUT classTables::classTables( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc ) #else classTables::classTables( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc ) #endif : classNode( pParent, pCanvas ) { Init( hDbc ); } #ifdef QT_V4LAYOUT classTables::classTables( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc ) #else classTables::classTables( QListViewItem *pParent, classCanvas *pCanvas, SQLHENV hDbc ) #endif : classNode( pParent, pCanvas ) { Init( hDbc ); } #ifdef QT_V4LAYOUT classTables::classTables( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc ) #else classTables::classTables( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc ) #endif : classNode( pParent, pAfter, pCanvas ) { Init( hDbc ); } classTables::~classTables() { listTables.clear(); } void classTables::Init( SQLHDBC hDbc ) { this->hDbc = hDbc; setText( 0, "Tables" ); setText( 1, "" ); setText( 2, "" ); listTables.setAutoDelete( TRUE ); this->setPixmap( 0, QPixmap( tables_xpm ) ); } void classTables::setOpen( bool bOpen ) { #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif listView()->setSelected( listView()->selectedItem(), false ); if ( bOpen ) { LoadTables(); // setSelected( true ); } else listTables.clear(); } void classTables::setup() { setExpandable( TRUE ); #ifdef QT_V4LAYOUT Q3ListViewItem::setup(); #else QListViewItem::setup(); #endif } void classTables::LoadTables() { SQLHSTMT hstmt; SQLRETURN nReturn = -1; SQLCHAR szTableName[101] = ""; SQLCHAR szTableType[101] = ""; SQLCHAR szTableRemarks[301] = ""; QString qsError; SQLLEN nIndicatorName; SQLLEN nIndicatorType; SQLLEN nIndicatorRemarks; classTable *pTable = NULL; // CREATE A STATEMENT nReturn = SQLAllocStmt( hDbc, &hstmt ); if ( nReturn != SQL_SUCCESS ) { QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLAllocStmt" ); return; } // EXECUTE OUR SQL/CALL if ( SQL_SUCCESS != (nReturn=SQLTables( hstmt, 0, 0, 0, 0, 0, 0, 0, 0 )) ) { QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLTables" ); return; } SQLBindCol( hstmt, SQLTables_TABLE_NAME, SQL_C_CHAR, szTableName, sizeof(szTableName), &nIndicatorName ); SQLBindCol( hstmt, SQLTables_TABLE_TYPE, SQL_C_CHAR, szTableType, sizeof(szTableType), &nIndicatorType ); SQLBindCol( hstmt, SQLTables_REMARKS, SQL_C_CHAR, szTableRemarks, sizeof(szTableRemarks), &nIndicatorRemarks ); // GET RESULTS nReturn = SQLFetch( hstmt ); while ( nReturn == SQL_SUCCESS || nReturn == SQL_SUCCESS_WITH_INFO ) { if ( nIndicatorName == SQL_NULL_DATA ) listTables.append( pTable = new classTable( this, pTable, pCanvas, hDbc, "Unknown" ) ); else listTables.append( pTable = new classTable( this, pTable, pCanvas, hDbc, (char *)szTableName, (char*)szTableType, (char*)szTableRemarks ) ); szTableName[0] = '\0'; szTableType[0] = '\0'; szTableRemarks[0] = '\0'; nReturn = SQLFetch( hstmt ); } // FREE STATEMENT nReturn = SQLFreeStmt( hstmt, SQL_DROP ); if ( nReturn != SQL_SUCCESS ) QMessageBox::warning( pCanvas, "Data Manager", "Failed to SQLFreeStmt" ); } #ifdef QT_V4LAYOUT void classTables::selectionChanged( Q3ListViewItem *p ) #else void classTables::selectionChanged( QListViewItem *p ) #endif { classTable *pTable; for ( pTable = listTables.first(); pTable != 0; pTable = listTables.next() ) pTable->selectionChanged( p ); if ( p == this ) { } } unixODBC-2.2.14-p2/DataManager/classConnectionFrame.cpp0100644000076400007640000001255710564052114021155 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classConnectionFrame.h" #include "run.xpm" #include "new.xpm" #include "open.xpm" #include "save.xpm" classConnectionFrame::classConnectionFrame( SQLHDBC hDbc, QString qsDataSource, QWidget *parent, const char *name ) #ifdef QT_V4LAYOUT : Q3MainWindow( parent, name, 0 ) #else : QMainWindow( parent, name, 0 ) #endif { QString qsCaption; qsCaption.sprintf( "Connected to %s", (const char *)qsDataSource ); setCaption( qsCaption ); // CLIENT AREA isql = new classISQL( hDbc, qsDataSource, this ); setCentralWidget( isql ); // SETUP MAIN MENU menubarMain = new QMenuBar( this ); menubarMain->setFrameStyle( QFrame::NoFrame ); #ifdef QT_V4LAYOUT Q3PopupMenu *pFile = new Q3PopupMenu(); #else QPopupMenu *pFile = new QPopupMenu(); #endif #ifdef QT_V4LAYOUT pFile->insertItem( QPixmap( new_xpm ), tr("&New"), this, SLOT(New()), Qt::CTRL+Qt::Key_N ); pFile->insertItem( QPixmap( open_xpm ), tr("&Open"), this, SLOT(Open()), Qt::CTRL+Qt::Key_O ); pFile->insertItem( QPixmap( save_xpm ), tr("&Save"), this, SLOT(Save()), Qt::CTRL+Qt::Key_S ); pFile->insertItem( tr("Save &As"), this, SLOT(SaveAs()), Qt::CTRL+Qt::Key_A ); pFile->insertItem( QPixmap( run_xpm ), tr("&Run"), this, SLOT(Exec()), Qt::CTRL+Qt::Key_R ); #else pFile->insertItem( QPixmap( new_xpm ), tr("&New"), this, SLOT(New()), CTRL+Key_N ); pFile->insertItem( QPixmap( open_xpm ), tr("&Open"), this, SLOT(Open()), CTRL+Key_O ); pFile->insertItem( QPixmap( save_xpm ), tr("&Save"), this, SLOT(Save()), CTRL+Key_S ); pFile->insertItem( tr("Save &As"), this, SLOT(SaveAs()), CTRL+Key_A ); pFile->insertItem( QPixmap( run_xpm ), tr("&Run"), this, SLOT(Exec()), CTRL+Key_R ); #endif menubarMain->insertItem( tr("&File"), pFile ); #ifdef QT_V4LAYOUT pView = new Q3PopupMenu(); #else pView = new QPopupMenu(); #endif nView = nViewGUI = pView->insertItem( tr("GUI Table"), this, SLOT(setViewGUI()) ); nViewText = pView->insertItem( tr("Text Table"), this, SLOT(setViewText()) ); nViewTextDelimited = pView->insertItem( tr("Text Delimited"), this, SLOT(setViewTextDelimited()) ); nViewHTML = pView->insertItem( tr("HTML Table"), this, SLOT(setViewHTML()) ); nViewHTMLSource = pView->insertItem( tr("HTML Source"), this, SLOT(setViewHTMLSource()) ); pView->setItemChecked( nView, true ); menubarMain->insertItem( tr("&View"), pView ); menubarMain->setSeparator( QMenuBar::InWindowsStyle ); // SETUP TOOLBAR #ifdef QT_V4LAYOUT toolbarMain = new Q3ToolBar( this ); addToolBar( toolbarMain, tr( "ToolBar" ), Qt::Top, FALSE ); #else toolbarMain = new QToolBar( this ); addToolBar( toolbarMain, tr( "ToolBar" ), Top, FALSE ); #endif QToolButton *toolbutton = new QToolButton( QPixmap( new_xpm ), QString(tr("New")), QString(""), this, SLOT(New()), toolbarMain ); toolbutton = new QToolButton( QPixmap( open_xpm ), QString(tr("Open")), QString(""), this, SLOT(Open()), toolbarMain ); toolbutton = new QToolButton( QPixmap( save_xpm ), QString(tr("Save")), QString(""), this, SLOT(Save()), toolbarMain ); toolbutton = new QToolButton( QPixmap( run_xpm ), QString(tr("Run")), QString(""), this, SLOT(Exec()), toolbarMain ); QWhatsThis::whatsThisButton ( toolbarMain ); // STATUS BAR // statusbarMain = new QStatusBar( this ); // RESIZE #ifdef QT_V4LAYOUT connect( parent, SIGNAL(changedSize(int,int)), SLOT(Resize(int,int)) ); #else connect( parent, SIGNAL(changedSize(int,int)), SLOT(resize(int,int)) ); #endif resize( parent->size() ); setMinimumSize( 50, 50 ); setMaximumSize( 32767, 32767 ); } classConnectionFrame::~classConnectionFrame() { } void classConnectionFrame::resizeEvent( QResizeEvent *p ) { resize( p->size() ); } void classConnectionFrame::New() // CLEAR QUERY AND DATA { isql->NewSQL(); } void classConnectionFrame::Open() // CLEAR QUERY AND DATA { isql->OpenSQL(); } void classConnectionFrame::Save() // DATA { isql->SaveSQL(); } void classConnectionFrame::SaveAs() // DATA { isql->SaveAsSQL(); } void classConnectionFrame::Exec() // RUN QUERY { isql->ExecSQL(); } void classConnectionFrame::setViewHTML() { pView->setItemChecked( nView, false ); nView = nViewHTML; pView->setItemChecked( nView, true ); } void classConnectionFrame::setViewHTMLSource() { pView->setItemChecked( nView, false ); nView = nViewHTMLSource; pView->setItemChecked( nView, true ); } void classConnectionFrame::setViewGUI() { pView->setItemChecked( nView, false ); nView = nViewGUI; pView->setItemChecked( nView, true ); } void classConnectionFrame::setViewText() { pView->setItemChecked( nView, false ); nView = nViewText; pView->setItemChecked( nView, true ); } void classConnectionFrame::setViewTextDelimited() { pView->setItemChecked( nView, false ); nView = nViewTextDelimited; pView->setItemChecked( nView, true ); } void classConnectionFrame::Resize( int x, int y ) { resize( x, y ); } unixODBC-2.2.14-p2/DataManager/classBrowseFrame.cpp0100644000076400007640000000704110564052112020305 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classBrowseFrame.h" #include "run.xpm" #include "new.xpm" #include "open.xpm" #include "save.xpm" classBrowseFrame::classBrowseFrame( SQLHDBC hDbc, QString qsTable, QWidget *parent, const char *name ) #ifdef QT_V4LAYOUT : Q3MainWindow( parent, name, 0 ) #else : QMainWindow( parent, name, 0 ) #endif { QString qsCaption; this->hDbc = hDbc; this->qsTable = qsTable; qsCaption.sprintf( "Browse %s", (const char *)qsTable ); setCaption( qsCaption ); // CLIENT AREA browse = new classBrowse( hDbc, qsTable, this ); setCentralWidget( browse ); // SETUP MAIN MENU menubarMain = new QMenuBar( this ); menubarMain->setFrameStyle( QFrame::NoFrame ); #ifdef QT_V4LAYOUT Q3PopupMenu *pFile = new Q3PopupMenu(); #else QPopupMenu *pFile = new QPopupMenu(); #endif pFile->insertItem( QPixmap( new_xpm ), tr("Clear"), this, SLOT(Clear()) ); #ifdef QT_V4LAYOUT pFile->insertItem( QPixmap( save_xpm ), tr("&Save"), this, SLOT(Save()), Qt::CTRL+Qt::Key_S ); pFile->insertItem( tr("Save &As"), this, SLOT(SaveAs()), Qt::CTRL+Qt::Key_A ); #else pFile->insertItem( QPixmap( save_xpm ), tr("&Save"), this, SLOT(Save()), CTRL+Key_S ); pFile->insertItem( tr("Save &As"), this, SLOT(SaveAs()), CTRL+Key_A ); #endif menubarMain->insertItem( tr("&File"), pFile ); #ifdef QT_V4LAYOUT Q3PopupMenu *pEdit = new Q3PopupMenu(); #else QPopupMenu *pEdit = new QPopupMenu(); #endif pEdit->insertItem( tr("Se&lect All Columns"), browse, SLOT(SelectAllColumns()) ); pEdit->insertItem( tr("&Unselect All Columns"), browse, SLOT(UnSelectAllColumns()) ); menubarMain->insertItem( tr("&Edit"), pEdit ); menubarMain->setSeparator( QMenuBar::InWindowsStyle ); // SETUP TOOLBAR #ifdef QT_V4LAYOUT toolbarMain = new Q3ToolBar( this ); addToolBar( toolbarMain, tr( "ToolBar" ), Qt::Top, FALSE ); #else toolbarMain = new QToolBar( this ); addToolBar( toolbarMain, tr( "ToolBar" ), Top, FALSE ); #endif QToolButton *toolbutton = new QToolButton( QPixmap( new_xpm ), QString(tr("Clear")), QString(""), this, SLOT(Clear()), toolbarMain ); toolbutton = new QToolButton( QPixmap( save_xpm ), QString(tr("Save")), QString(""), this, SLOT(Save()), toolbarMain ); toolbutton = new QToolButton( QPixmap( run_xpm ), QString(tr("Run")), QString(""), this, SLOT(Exec()), toolbarMain ); QWhatsThis::whatsThisButton ( toolbarMain ); // RESIZE #ifdef QT_V4LAYOUT connect( parent, SIGNAL(changedSize(int,int)), SLOT(Resize(int,int)) ); #else connect( parent, SIGNAL(changedSize(int,int)), SLOT(resize(int,int)) ); #endif resize( parent->size() ); setMinimumSize( 50, 50 ); setMaximumSize( 32767, 32767 ); } classBrowseFrame::~classBrowseFrame() { } void classBrowseFrame::resizeEvent( QResizeEvent *p ) { resize( p->size() ); } void classBrowseFrame::Clear() // CLEAR QUERY AND DATA { browse->Clear(); } void classBrowseFrame::Save() // DATA { browse->Save(); } void classBrowseFrame::SaveAs() // DATA { browse->SaveAs(); } void classBrowseFrame::Exec() // RUN QUERY { browse->Exec(); } void classBrowseFrame::Resize( int x, int y ) { resize( x, y ); } unixODBC-2.2.14-p2/DataManager/classBrowse.cpp0100644000076400007640000003771510564052112017345 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classBrowse.h" char *szHelpQuery = \ "Use this area to quickly specify a simple data filter.\n\n" \ "1. Leave the Expression cells blank to get all data in the table or enter filter Expression(s) to limit the amount of data returned. Expression examples; \n='MyText'\n>23\n" \ "2. Enter Y in the Show cells to get data in that column.\n" \ "3. Control-Click and drag column headers to rearrange the column order.\n" \ "4. Click the Run button to get your results."; char *szHelpData = \ "This area contains the results from your Query. You can;\n" \ "1. Browse the data.\n" \ "2. Export the data in a variety of formats.\n\n" \ "Editing the data is not availible right *now*. Consider using the isql window (click on the Data Source) for this."; classBrowse::classBrowse( SQLHDBC hDbc, QString qsTable, QWidget *parent, const char *name ) : QWidget( parent, name, 0 ) { qsDataFileName = ""; this->hDbc = hDbc; this->qsTable = qsTable; layoutMain = new QVBoxLayout( this ); #ifdef QT_V4LAYOUT tableQuery = new Q3Table( 1, 1, this ); #else tableQuery = new QTable( 1, 1, this ); #endif tableQuery->setColumnMovingEnabled ( TRUE ); tableQuery->setMinimumSize( 100, 100 ); #ifdef QT_V4LAYOUT tableData = new Q3Table( 1, 1, this ); #else tableData = new QTable( 1, 1, this ); #endif tableData->setColumnMovingEnabled ( TRUE ); labelFilter = new QLabel( "FILTER", this ); #ifdef QT_V4LAYOUT labelFilter->setPalette( QPalette( QColor(Qt::lightGray) ) ); labelFilter->setAlignment( Qt::AlignCenter ); #else labelFilter->setPalette( QPalette( QColor(lightGray) ) ); labelFilter->setAlignment( AlignCenter ); #endif layoutMain->addWidget( labelFilter ); layoutMain->addWidget( tableQuery ); labelResults = new QLabel( "RESULTS", this ); #ifdef QT_V4LAYOUT labelResults->setPalette( QPalette( QColor(Qt::lightGray) ) ); labelResults->setAlignment( Qt::AlignCenter ); #else labelResults->setPalette( QPalette( QColor(lightGray) ) ); labelResults->setAlignment( AlignCenter ); #endif layoutMain->addWidget( labelResults ); layoutMain->addWidget( tableData, 10 ); InitQuery(); setMinimumSize( 50, 50 ); setMaximumSize( 32767, 32767 ); QWhatsThis::add( tableQuery, szHelpQuery ); QWhatsThis::add( tableData, szHelpData ); } classBrowse::~classBrowse() { } void classBrowse::resizeEvent( QResizeEvent *p ) { resize( p->size() ); } void classBrowse::Clear() // CLEAR QUERY AND DATA { ClearCells( tableData ); InitQuery(); } bool classBrowse::Save() // DATA { QString qsLabel; if ( qsDataFileName == "" ) return SaveAs(); // TRY TO SAVE THE FILE QFile hFile( qsDataFileName ); if ( !hFile.open( IO_WriteOnly ) ) return FALSE; WriteHTML( &hFile, TRUE ); hFile.close(); qsLabel = "RESULTS ("; qsLabel += qsDataFileName; qsLabel += ")"; labelResults->setText( qsLabel ); return TRUE; } bool classBrowse::SaveAs() // DATA { QString qsLabel; // LET USER PICK A FILE QString qsFile = QFileDialog::getSaveFileName( qsDataFileName ); if ( qsFile.isNull() ) return FALSE; // TRY TO SAVE THE FILE QFile hFile( qsFile ); if ( !hFile.open( IO_WriteOnly ) ) return FALSE; WriteHTML( &hFile, TRUE ); hFile.close(); qsDataFileName = qsFile; qsLabel = "RESULTS ("; qsLabel += qsDataFileName; qsLabel += ")"; labelResults->setText( qsLabel ); return TRUE; } void classBrowse::InitQuery() { SQLHSTMT hstmt; SQLRETURN nReturn = -1; SQLCHAR szTableName[101] = ""; SQLCHAR szColumnName[101] = ""; SQLCHAR szColumnType[101] = ""; QString qsError; SQLLEN nCols = 0; SQLINTEGER nCol = 0; #ifdef QT_V4LAYOUT Q3Header *headerQuery; Q3Header *headerData; #else QHeader *headerQuery; QHeader *headerData; #endif // CREATE A STATEMENT nReturn = SQLAllocStmt( hDbc, &hstmt ); if ( nReturn != SQL_SUCCESS ) { QMessageBox::warning( this, "Table browser", "Failed to SQLAllocStmt" ); return; } // EXECUTE OUR SQL/CALL #ifdef QT_V4LAYOUT strcpy( (char *)szTableName, qsTable.ascii() ); #else strcpy( (char *)szTableName, qsTable.data() ); #endif if ( SQL_SUCCESS != (nReturn=SQLColumns( hstmt, 0, 0, 0, 0, szTableName, SQL_NTS, 0, 0 )) ) { QMessageBox::warning( this, "Table browser", "Failed to SQLColumns" ); return; } // PREPARE THE TABLES nCol = 0; // not all drivers can do this nCols = 0; SQLRowCount( hstmt, &nCols ); if ( nCols <= 0 ) { // work out the number of colums we need nCols = 0 ; while ( SQL_SUCCEEDED( SQLFetch( hstmt ))) nCols ++; SQLFreeStmt( hstmt, SQL_CLOSE ); // repeat the SQLTables call if ( SQL_SUCCESS != (nReturn=SQLColumns( hstmt, 0, 0, 0, 0, szTableName, SQL_NTS, 0, 0 )) ) { QMessageBox::warning( this, "Table browser", "Failed to SQLColumns" ); return; } } tableQuery->setNumCols( nCols ); tableQuery->setNumRows( 2 ); tableData->setNumCols( nCols ); tableData->setNumRows( 0 ); headerQuery = tableQuery->verticalHeader(); headerQuery->setLabel( 0, QString( tr("Expression") ) ); headerQuery->setLabel( 1, QString( tr("Show") ) ); headerQuery = tableQuery->horizontalHeader(); headerData = tableData->horizontalHeader(); // GET RESULTS nReturn = SQLFetch( hstmt ); while ( (nReturn == SQL_SUCCESS || nReturn == SQL_SUCCESS_WITH_INFO) && nCol < nCols ) { nReturn = SQLGetData( hstmt, SQLColumns_COLUMN_NAME, SQL_C_CHAR, &szColumnName[0], sizeof(szColumnName), 0 ); if ( nReturn != SQL_SUCCESS ) strcpy( (char *)szColumnName, "Unknown" ); headerQuery->setLabel( nCol, QString((char*)szColumnName) ); headerData->setLabel( nCol, QString((char*)szColumnName) ); nReturn = SQLGetData( hstmt, SQLColumns_TYPE_NAME, SQL_C_CHAR, &szColumnType[0], sizeof(szColumnType), 0 ); nReturn = SQLFetch( hstmt ); nCol++; } // FREE STATEMENT nReturn = SQLFreeStmt( hstmt, SQL_DROP ); if ( nReturn != SQL_SUCCESS ) QMessageBox::warning( this, "Table browser", "Failed to SQLFreeStmt" ); SelectAllColumns(); } void classBrowse::Exec() // RUN QUERY { SQLHSTMT hStmt; SQLLEN nRows; SWORD nColumns; char szState[10]; char szBuf[700]; char szErrString[800]; SQLRETURN nRetVal; SQLCHAR szSQL[32000]; //printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); if ( !CreateSQL() ) return; ClearCells( tableData ); // QMessageBox::information( (QWidget *)this, "Table browse", qsSQL ); // CREATE A STATEMENT nRetVal = SQLAllocStmt( hDbc, &hStmt ); if( SQL_SUCCESS != nRetVal ) { QMessageBox::critical( (QWidget *)this, "Table browse", "Failed: SQLAllocStmt " ); return; } strcpy( (char*)szSQL, qsSQL ); if( SQL_SUCCESS != (nRetVal=SQLPrepare(hStmt, szSQL, SQL_NTS)) ) { nRetVal = SQLError(SQL_NULL_HENV, hDbc, hStmt, (SQLCHAR*)szState, NULL, (SQLCHAR*)szBuf, 700, NULL ); if (nRetVal == SQL_SUCCESS) QMessageBox::critical( (QWidget *)this, "Table browse", szBuf); else QMessageBox::critical( (QWidget *)this, "Table browse", "Failed: SQLPrepare " ); SQLFreeStmt( hStmt, SQL_DROP ); QMessageBox::information( (QWidget *)this, "Table browse", qsSQL ); return; } // EXECUTE if( SQL_SUCCESS != (nRetVal=SQLExecute(hStmt)) ) { nRetVal = SQLError(SQL_NULL_HENV, hDbc, hStmt, (SQLCHAR*)szState, NULL, (SQLCHAR*)szBuf, 700, NULL ); if (nRetVal == SQL_SUCCESS) QMessageBox::critical( (QWidget *)this, "Table browse", szBuf); else QMessageBox::critical( (QWidget *)this, "Table browse", "Failed: SQLExecute " ); SQLFreeStmt( hStmt, SQL_DROP ); return; } // GET NUMBER OF ROWS AFFECTED if ( (nRetVal = SQLRowCount( hStmt, &nRows )) != SQL_SUCCESS ) nRows = 0; // Default Values if ( nRows == SQL_NO_ROW_NUMBER ) nRows = 10000; // give a resonable number back // Note this code could be changed to use a ListView and therefore would not need to // know the result set size upfront.... // GET NUMBER OF COLUMNS RETURNED if ( (nRetVal = SQLNumResultCols( hStmt, &nColumns )) != SQL_SUCCESS ) nColumns = 0; //printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); if ( nRows > 0 ) tableData->setNumRows( nRows ); tableData->setNumCols( nColumns ); //printf( "[PAH][%s][%d] nColumns=%d nRows=%d\n", __FILE__, __LINE__, nColumns, nRows ); //printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); // GET A RESULTS HEADER (column headers) ExecHeader( hStmt, nColumns ); // GET A RESULTS BODY (data) nRows = ExecBody( hStmt, nColumns ); // Show the correct number of rows to make the gui look correct if ( nRows > 0 ) tableData->setNumRows( nRows ); // FREE STATEMENT nRetVal = SQLFreeStmt( hStmt, SQL_DROP ); if( SQL_SUCCESS != nRetVal ) QMessageBox::critical( (QWidget *)this, "Table browse", "Failed: SQLFreeStmt " ); //printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); } void classBrowse::ExecHeader( SQLHSTMT hStmt, SWORD nColumns ) { int nCol; SQLCHAR szColumnName[101] = ""; #ifdef QT_V4LAYOUT Q3Header *header; #else QHeader *header; #endif //printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); header = tableData->horizontalHeader(); for( nCol = 0; nCol < nColumns; nCol++ ) { SQLColAttribute( hStmt, nCol+1, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), 0, 0 ); header->setLabel( nCol, QString( (char*)szColumnName ) ); } //printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); } int classBrowse::ExecBody( SQLHSTMT hStmt, SWORD nColumns ) { int nRetVal = 0; SQLUSMALLINT nCol = 0; SQLLEN nIndicator; char szColumn[300]; int nRow = 0; //printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); // PROCESS ALL ROWS while( SQL_SUCCESS == (nRetVal=SQLFetch(hStmt)) || SQL_SUCCESS_WITH_INFO == nRetVal ) { nRow++; // PROCESS ALL COLUMNS for( nCol = 1; nCol <= nColumns; nCol++ ) { nRetVal = SQLGetData( hStmt, nCol, SQL_C_CHAR, (SQLPOINTER)szColumn, sizeof(szColumn)-1, &nIndicator ); if ( nRetVal == SQL_SUCCESS && nIndicator != SQL_NULL_DATA ) tableData->setText( nRow-1, nCol-1, QString( szColumn ) ); else // Print a dash to represent NULL data as opposed to real blanks tableData->setText( nRow-1, nCol-1, QString( "-" ) ); } } //printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); return nRow ; // return the actual number of rows in the result set } bool classBrowse::CreateSQL() { int nCol = 0; int nCols = tableQuery->numCols(); #ifdef QT_V4LAYOUT Q3Header *header = tableQuery->horizontalHeader(); #else QHeader *header = tableQuery->horizontalHeader(); #endif QString qsColumns = ""; QString qsWhereExpressions = ""; QString qsAnd = ""; QString qsWhere = " \nWHERE "; QString qsComma = ""; QString qsColumn = ""; QString qsExpression = ""; QString qsShow = ""; //printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); for ( nCol=0; nCollabel( nCol ); qsColumn.prepend('"').append('"') ; // Quote column name in case it matches SQL keyword qsExpression = tableQuery->text( QUERY_ROW_EXPRESSION, nCol ); qsShow = tableQuery->text( QUERY_ROW_SHOW, nCol ); #ifdef QT_V4LAYOUT if ( !qsShow.isNull() && qsShow != "" ) #else if ( qsShow && qsShow != "" ) #endif { qsColumns += qsComma; qsColumns += qsColumn; qsComma = ", "; } #ifdef QT_V4LAYOUT if ( !qsExpression.isNull() && qsExpression != "" ) #else if ( qsExpression && qsExpression != "" ) #endif { qsWhereExpressions += qsWhere; qsWhereExpressions += qsAnd; qsWhereExpressions += qsColumn; qsWhereExpressions += " "; qsWhereExpressions += qsExpression; qsAnd = " \nAND "; qsWhere = ""; } } if ( qsColumns == "" ) { QMessageBox::warning( (QWidget *)this, "Table browse", "No columns to show. Please specify which columns you want to show." ); return FALSE; } qsSQL = "SELECT \n"; qsSQL += qsColumns; qsSQL += "\nFROM "; qsSQL += qsTable; qsSQL += qsWhereExpressions; // ORDER BY is not need here and could cause some queries to fail because of to many columns or // the total byte size of the columns is to large. // The columns will be ordered by the order they appear after the select. // If the GUI is changed to allow different orders, some form of order by would be needed then. // // qsSQL += " ORDER BY "; // qsSQL += qsColumns; //printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); return TRUE; } void classBrowse::SelectAllColumns() { int nCol = 0; int nCols = tableQuery->numCols(); #ifdef QT_V4LAYOUT Q3Header *header; #else QHeader *header; #endif header = tableQuery->horizontalHeader(); for ( nCol=0; nColsetText( QUERY_ROW_SHOW, nCol, "Y" ); } } void classBrowse::UnSelectAllColumns() { int nCol = 0; int nCols = tableQuery->numCols(); #ifdef QT_V4LAYOUT Q3Header *header; #else QHeader *header; #endif header = tableQuery->horizontalHeader(); for ( nCol=0; nColsetText( QUERY_ROW_SHOW, nCol, "" ); } } void classBrowse::WriteHTML( QFile *hFile, bool bPage ) { int nCol = 0; int nCols = tableData->numCols(); int nRow = 0; int nRows = tableData->numRows(); #ifdef QT_V4LAYOUT Q3Header *header; #else QHeader *header; #endif header = tableData->horizontalHeader(); if ( bPage ) hFile->writeBlock( "", sizeof("")-1 ); hFile->writeBlock( "", sizeof("
")-1 ); // HEADER hFile->writeBlock( "\n", sizeof("\n")-1 ); for ( nCol=0; nColwriteBlock( "", sizeof("")-1 ); } hFile->writeBlock( "", sizeof("")-1 ); // BODY for ( nRow=0; nRowwriteBlock( "\n", sizeof("\n")-1 ); for ( nCol=0; nColwriteBlock( "\n", sizeof("")-1 ); } hFile->writeBlock( "", sizeof("")-1 ); } hFile->writeBlock( "\n
", sizeof("")-1 ); hFile->writeBlock( header->label( nCol ), header->label( nCol ).length() ); hFile->writeBlock( "
", sizeof("\n")-1 ); hFile->writeBlock( tableData->text( nRow, nCol ), tableData->text( nRow, nCol ).length() ); hFile->writeBlock( "
", sizeof("\n")-1 ); if ( bPage ) hFile->writeBlock( "", sizeof("")-1 ); } #ifdef QT_V4LAYOUT void classBrowse::ClearCells( Q3Table *table ) #else void classBrowse::ClearCells( QTable *table ) #endif { int nCol = 0; int nCols = table->numCols(); int nRow = 0; int nRows = table->numRows(); for ( nRow=0; nRowclearCell( nRow, nCol ); } } } unixODBC-2.2.14-p2/DataManager/main.cpp0100644000076400007640000000202110564052115015763 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifdef QT_V4LAYOUT #include #include #else #include #include #endif #include #ifdef QT_V4LAYOUT #include "classDataManager4.h" #else #include "classDataManager.h" #endif int main( int argc, char **argv ) { QApplication oApplication( argc, argv ); // create application object classDataManager oMain; QDir::home().mkdir( ".DataManager" ); oApplication.connect( &oApplication, SIGNAL(lastWindowClosed()), &oApplication, SLOT(quit()) ); oMain.show(); // show widget return oApplication.exec(); // run event loop } unixODBC-2.2.14-p2/DataManager/classCanvas.h0100644000076400007640000000312110564052112016744 0ustar nicknick/************************************************** * classCanvas ************************************************** * * PURPOSE * * This is *THE* parent canvas for *ALL* property widgets. I * use a QLabel instead of a QVBoxLayout because I want to * stack many custom widgets on this (and hide/show them) and * I am concerned that QVBoxLayout will have a problem with this. * I did not even try QVBoxLayout because, in anycase, we need * a real widget (not a list item) to allow node processing * to create popup dialogs, such as the login (they need a * widget based parent). * *************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classCanvas_included #define classCanvas_included #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #endif class classCanvas : public QLabel { Q_OBJECT public: classCanvas( QWidget *pParent = 0, const char *pszName = 0 ); ~classCanvas(); void resizeEvent( QResizeEvent * ); signals: void changedSize( int nW, int nH ); }; #endif unixODBC-2.2.14-p2/DataManager/classColumn.h0100644000076400007640000000361510564052112016776 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classColumn_included #define classColumn_included #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include #include "classNode.h" class classColumn: public classNode { public: #ifdef QT_V4LAYOUT classColumn( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDesc = 0 ); classColumn( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDesc = 0 ); classColumn( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDesc = 0 ); #else classColumn( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDesc = 0 ); classColumn( QListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDesc = 0 ); classColumn( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDesc = 0 ); #endif ~classColumn(); void setOpen( bool ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged ( Q3ListViewItem * ); #else void selectionChanged ( QListViewItem * ); #endif private: SQLHDBC hDbc; QString qsName; void Init( SQLHDBC hDbc, char *pszName, char *pszType, char *pszDesc ); }; #endif unixODBC-2.2.14-p2/DataManager/classDataManager.h0100644000076400007640000000230210564052115017700 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDataManager_included #define classDataManager_included #include #include #include #include #include #include #include #include #include #include "classCanvas.h" #include "classODBC.h" class classDataManager : public QWidget { Q_OBJECT public: classDataManager( QWidget *pParent = 0, const char *pszName = 0 ); ~classDataManager(); void resizeEvent( QResizeEvent * ); public slots: void ItemMenu( QListViewItem*,const QPoint&,int); void ItemChanged(QListViewItem*); protected slots: void Exit(); void About(); protected: QSplitter *splSplitter; LView *lvwBrowser; classCanvas *pCanvas; classODBC *pODBC; private: void LoadState(); void SaveState(); }; #endif unixODBC-2.2.14-p2/DataManager/classDataManager4.h0100644000076400007640000000230110564052115017763 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDataManager_included #define classDataManager_included #include #include #include #include #include #include #include #include #include "classCanvas.h" #include "classODBC.h" class classDataManager : public QWidget { Q_OBJECT public: classDataManager( QWidget *pParent = 0, const char *pszName = 0 ); ~classDataManager(); void resizeEvent( QResizeEvent * ); public slots: void ItemMenu( Q3ListViewItem*,const QPoint&,int); void ItemChanged( Q3ListViewItem*); protected slots: void Exit(); void About(); protected: QSplitter *splSplitter; LView *lvwBrowser; classCanvas *pCanvas; classODBC *pODBC; private: void LoadState(); void SaveState(); }; #endif unixODBC-2.2.14-p2/DataManager/classDataSource.h0100644000076400007640000000450210564052115017572 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDataSource_included #define classDataSource_included #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include #include #include #include "classNode.h" #include "classLogin.h" #include "classTables.h" #include "classConnectionFrame.h" class classDataSource: public classNode { public: #ifdef QT_V4LAYOUT classDataSource( Q3ListView *pParent, classCanvas *pCanvas, int nDataSourceType = User, char *pszDataSourceName = 0, SQLHENV hEnv = 0 ); classDataSource( Q3ListViewItem *pParent, classCanvas *pCanvas, int nDataSourceType = User, char *pszDataSourceName = 0, SQLHENV hEnv = 0 ); classDataSource( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, int nDataSourceType = User, char *pszDataSourceName = 0, SQLHENV hEnv = 0 ); #else classDataSource( QListView *pParent, classCanvas *pCanvas, int nDataSourceType = User, char *pszDataSourceName = 0, SQLHENV hEnv = 0 ); classDataSource( QListViewItem *pParent, classCanvas *pCanvas, int nDataSourceType = User, char *pszDataSourceName = 0, SQLHENV hEnv = 0 ); classDataSource( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, int nDataSourceType = User, char *pszDataSourceName = 0, SQLHENV hEnv = 0 ); #endif ~classDataSource(); enum DataSourceTypes { User, System }; void setOpen( bool bOpen ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged ( Q3ListViewItem * ); #else void selectionChanged ( QListViewItem * ); #endif private: classTables * pTables; classConnectionFrame * pConnectionFrame; bool bLoggedIn; QString qsDataSourceName; int nDataSourceType; SQLHENV hEnv; SQLHDBC hDbc; void Init( int nDataSourceType, char *pszDataSourceName, SQLHENV hEnv ); }; #endif unixODBC-2.2.14-p2/DataManager/classDataSources.h0100644000076400007640000000366610564052115017767 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDataSources_included #define classDataSources_included #ifdef QT_V4LAYOUT #include #include #else #include #include #endif #include #include #include #include "classNode.h" #include "classDataSource.h" class classDataSources: public classNode { public: #ifdef QT_V4LAYOUT classDataSources( Q3ListView *pParent, classCanvas *pCanvas, int nDataSourceType = User, SQLHENV hEnv = 0 ); classDataSources( Q3ListViewItem *pParent, classCanvas *pCanvas, int nDataSourceType = User, SQLHENV hEnv = 0 ); classDataSources( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, int nDataSourceType = User, SQLHENV hEnv = 0 ); #else classDataSources( QListView *pParent, classCanvas *pCanvas, int nDataSourceType = User, SQLHENV hEnv = 0 ); classDataSources( QListViewItem *pParent, classCanvas *pCanvas, int nDataSourceType = User, SQLHENV hEnv = 0 ); classDataSources( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, int nDataSourceType = User, SQLHENV hEnv = 0 ); #endif ~classDataSources(); enum DataSourceTypes { User, System }; void setOpen( bool bOpen ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged( Q3ListViewItem * ); #else void selectionChanged( QListViewItem * ); #endif private: #ifdef QT_V4LAYOUT Q3PtrList listDataSources; #else QList listDataSources; #endif int nDataSourceType; SQLHENV hEnv; void Init( int nDataSourceType, SQLHENV hEnv ); }; #endif unixODBC-2.2.14-p2/DataManager/classDriver.h0100644000076400007640000000320110564052115016766 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDriver_included #define classDriver_included #ifdef QT_V4LAYOUT #include #else #include #endif #include #include #include #include "classNode.h" class classDriver: public classNode { public: #ifdef QT_V4LAYOUT classDriver( Q3ListView *pParent, classCanvas *pCanvas, char *pszDriverName = 0, SQLHENV hEnv = 0 ); classDriver( Q3ListViewItem *pParent, classCanvas *pCanvas, char *pszDriverName = 0, SQLHENV hEnv = 0 ); classDriver( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, char *pszDriverName = 0, SQLHENV hEnv = 0 ); #else classDriver( QListView *pParent, classCanvas *pCanvas, char *pszDriverName = 0, SQLHENV hEnv = 0 ); classDriver( QListViewItem *pParent, classCanvas *pCanvas, char *pszDriverName = 0, SQLHENV hEnv = 0 ); classDriver( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, char *pszDriverName = 0, SQLHENV hEnv = 0 ); #endif ~classDriver(); void setOpen( bool ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged ( Q3ListViewItem * ); #else void selectionChanged ( QListViewItem * ); #endif private: QString qsDriverName; SQLHENV hEnv; void Init( char *pszDriverName, SQLHENV hEnv ); }; #endif unixODBC-2.2.14-p2/DataManager/classDrivers.h0100644000076400007640000000310610564052115017155 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDrivers_included #define classDrivers_included #include #include #include #ifdef QT_V4LAYOUT #include #else #include #endif #include "classNode.h" #include "classDriver.h" class classDrivers: public classNode { public: #ifdef QT_V4LAYOUT classDrivers( Q3ListView *pParent, classCanvas *pCanvas, SQLHENV hEnv = 0 ); classDrivers( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHENV hEnv = 0 ); classDrivers( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hEnv = 0 ); #else classDrivers( QListView *pParent, classCanvas *pCanvas, SQLHENV hEnv = 0 ); classDrivers( QListViewItem *pParent, classCanvas *pCanvas, SQLHENV hEnv = 0 ); classDrivers( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hEnv = 0 ); #endif ~classDrivers(); void setOpen( bool ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged ( Q3ListViewItem * ); #else void selectionChanged ( QListViewItem * ); #endif private: #ifdef QT_V4LAYOUT Q3PtrList listDrivers; #else QList listDrivers; #endif SQLHENV hEnv; void Init( SQLHENV hEnv ); }; #endif unixODBC-2.2.14-p2/DataManager/classConnectionFrame.h0100644000076400007640000000456510564052115020623 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classConnectionFrame_included #define classConnectionFrame_included #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #include #include #endif #include #include "classISQL.h" #ifdef QT_V4LAYOUT #define LView Q3ListView #define LViewItem Q3ListViewItem #define MWindow Q3MainWindow #define TBar Q3ToolBar #define PMenu Q3PopupMenu #else #define LView QListView #define LViewItem QListViewItem #define MWindow QMainWindow #define TBar QToolBar #define PMenu QPopupMenu #endif class classConnectionFrame : public MWindow { Q_OBJECT public: classConnectionFrame( SQLHDBC hDbc, QString qsDataSource, QWidget* parent = 0, const char* name = 0 ); ~classConnectionFrame(); void resizeEvent( QResizeEvent * ); public slots: void New(); // CLEAR QUERY AND DATA void Open(); void Save(); // DATA void SaveAs(); // DATA void Exec(); // RUN QUERY void setViewHTML(); void setViewHTMLSource(); void setViewGUI(); void setViewText(); void setViewTextDelimited(); void Resize(int,int); protected: QMenuBar * menubarMain; TBar * toolbarMain; PMenu * pView; QStatusBar * statusbarMain; classISQL * isql; int nViewHTML; int nViewHTMLSource; int nViewGUI; int nViewText; int nViewTextDelimited; int nView; }; #endif unixODBC-2.2.14-p2/DataManager/classBrowseFrame.h0100644000076400007640000000362710564052112017760 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classBrowseFrame_included #define classBrowseFrame_included #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #include #endif #include #include "classBrowse.h" #ifdef QT_V4LAYOUT #define LView Q3ListView #define LViewItem Q3ListViewItem #define MWindow Q3MainWindow #define TBar Q3ToolBar #define PMenu Q3PopupMenu #else #define LView QListView #define LViewItem QListViewItem #define MWindow QMainWindow #define TBar QToolBar #define PMenu QPopupMenu #endif class classBrowseFrame : public MWindow { Q_OBJECT public: classBrowseFrame( SQLHDBC hDbc, QString qsTable, QWidget* parent = 0, const char* name = 0 ); ~classBrowseFrame(); void resizeEvent( QResizeEvent * ); public slots: void Clear(); // CLEAR QUERY AND DATA void Save(); // DATA void SaveAs(); // DATA void Exec(); // RUN QUERY void Resize(int,int); protected: QMenuBar *menubarMain; TBar *toolbarMain; classBrowse *browse; SQLHDBC hDbc; QString qsTable; }; #endif unixODBC-2.2.14-p2/DataManager/classBrowse.h0100644000076400007640000000422110564052112016774 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classBrowse_included #define classBrowse_included #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #include #endif #include #define QUERY_ROW_EXPRESSION 0 #define QUERY_ROW_SHOW 1 class classBrowse : public QWidget { Q_OBJECT public: classBrowse( SQLHDBC hDbc, QString qsTable, QWidget* parent = 0, const char* name = 0 ); ~classBrowse(); QString qsDataFileName; void resizeEvent( QResizeEvent * ); public slots: void Clear(); // CLEAR QUERY AND DATA bool Save(); // SAVE DATA bool SaveAs(); // SAVE DATA AS void Exec(); // RUN QUERY void SelectAllColumns(); void UnSelectAllColumns(); void WriteHTML( QFile *hFile, bool bPage ); protected: QVBoxLayout *layoutMain; #ifdef QT_V4LAYOUT Q3Table *tableQuery; Q3Table *tableData; #else QTable *tableQuery; QTable *tableData; #endif SQLHDBC hDbc; QString qsTable; QString qsSQL; QLabel *labelFilter; QLabel *labelResults; void InitQuery(); void ExecHeader( SQLHSTMT hStmt, SWORD nColumns ); int ExecBody( SQLHSTMT hStmt, SWORD nColumns ); bool CreateSQL(); #ifdef QT_V4LAYOUT void ClearCells( Q3Table *table ); #else void ClearCells( QTable *table ); #endif }; #endif unixODBC-2.2.14-p2/DataManager/classISQL.h0100644000076400007640000000513510564052115016313 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classISQL_included #define classISQL_included #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #if (QT_VERSION>=300) #else #include #endif #include #include #include #include #include #include #include #include #include #include #include #endif #include #ifndef max #define max( a, b ) (((a) > (b)) ? (a) : (b)) #endif #ifndef min #define min( a, b ) (((a) > (b)) ? (b) : (a)) #endif class classISQL : public QWidget { Q_OBJECT public: classISQL( SQLHDBC hDbc, QString qsDataSource, QWidget* parent = 0, const char* name = 0 ); ~classISQL(); void resizeEvent( QResizeEvent * ); public slots: void ExecSQL(); void NewSQL(); void OpenSQL(); void SaveSQL(); void SaveAsSQL(); protected slots: void ChangeTextType( int nTab ); void gotoHistoryItem( int nValue ); protected: QTabBar * pTabBar; QSlider * pSliderRecentSQL; #ifdef QT_V4LAYOUT Q3MultiLineEdit * txtSQL; Q3MultiLineEdit * txtResults; #else QMultiLineEdit * txtSQL; QMultiLineEdit * txtResults; #endif SQLHDBC hDbc; QString qsDataSource; QString qsResultsFileName; QString qsSQLFileName; #ifdef QT_V4LAYOUT Q3ValueList listSQL; #else QValueList listSQL; #endif int nSQL; private: int getResultsHeader( SQLHSTMT hStmt, SWORD nColumns, QString *pqsHorizSep ); int getResultsBody( SQLHSTMT hStmt, SWORD nColumns ); void setTextType( int nIndex ); void appendHistoryItem(); }; #endif unixODBC-2.2.14-p2/DataManager/classIndex.h0100644000076400007640000000414210564052115016607 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classIndex_included #define classIndex_included #ifdef QT_V4LAYOUT #include #include #include #include #else #include #include #include #include #endif #include #include "classNode.h" #include "classColumn.h" class classIndex: public classNode { public: #ifdef QT_V4LAYOUT classIndex( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); classIndex( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); classIndex( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); #else classIndex( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); classIndex( QListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); classIndex( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); #endif ~classIndex(); void setOpen( bool ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged( Q3ListViewItem * ); #else void selectionChanged( QListViewItem * ); #endif private: SQLHDBC hDbc; QString qsTable; QString qsIndex; #ifdef QT_V4LAYOUT Q3PtrList listColumns; #else QList listColumns; #endif void Init( SQLHDBC hDbc, char *pszTable, char *pszIndex, char *pszDesc ); void LoadColumns(); }; #endif unixODBC-2.2.14-p2/DataManager/classIndexs.h0100644000076400007640000000344710564052115017001 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classIndexs_included #define classIndexs_included #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include #include "classNode.h" #include "classIndex.h" class classIndexs: public classNode { public: #ifdef QT_V4LAYOUT classIndexs( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classIndexs( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classIndexs( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); #else classIndexs( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classIndexs( QListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classIndexs( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); #endif ~classIndexs(); void setOpen( bool ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged( Q3ListViewItem * ); #else void selectionChanged( QListViewItem * ); #endif private: #ifdef QT_V4LAYOUT Q3PtrList listIndexs; #else QList listIndexs; #endif SQLHDBC hDbc; QString qsTable; void Init( SQLHDBC hDbc, char *pszTable ); void LoadIndexs(); }; #endif unixODBC-2.2.14-p2/DataManager/classLogin.h0100644000076400007640000000235410564052115016613 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classLogin_included #define classLogin_included #include #include #include #ifdef QT_V4LAYOUT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include class classLogin: public QDialog { Q_OBJECT public: classLogin( QWidget *pParent, SQLHDBC hDbc, char *pszDataSource, int nDataSourceType = classLogin::User ); ~classLogin(); enum DataSourceTypes { User, System }; private slots: void pbOk_Clicked(); void pbCancel_Clicked(); private: SQLHDBC hDbc; int nDataSourceType; QString qsDataSourceName; QLineEdit *txtUID; QLineEdit *txtPWD; }; #endif unixODBC-2.2.14-p2/DataManager/classNode.h0100644000076400007640000000271010564052115016424 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classNode_included #define classNode_included #ifdef QT_V4LAYOUT #include #include #else #include #include #endif #include "classCanvas.h" #ifdef QT_V4LAYOUT class classNode: public Q3ListViewItem #else class classNode: public QListViewItem #endif { public: #ifdef QT_V4LAYOUT classNode( Q3ListView *pParent, classCanvas *pCanvas ); classNode( Q3ListViewItem *pParent, classCanvas *pCanvas ); classNode( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas ); #else classNode( QListView *pParent, classCanvas *pCanvas ); classNode( QListViewItem *pParent, classCanvas *pCanvas ); classNode( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas ); #endif ~classNode(); virtual void Init( classCanvas *pCanvas ); virtual void setOpen( bool ); virtual void setup(); #ifdef QT_V4LAYOUT virtual void selectionChanged ( Q3ListViewItem * ); #else virtual void selectionChanged ( QListViewItem * ); #endif protected: classCanvas *pCanvas; }; #endif unixODBC-2.2.14-p2/DataManager/classODBC.h0100644000076400007640000000240510564052115016247 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classODBC_included #define classODBC_included #ifdef QT_V4LAYOUT #include #else #include #endif #include #include "classNode.h" #include "classDrivers.h" #include "classDataSources.h" class classODBC: public classNode { public: #ifdef QT_V4LAYOUT classODBC( Q3ListView *pParent, classCanvas *pCanvas ); classODBC( Q3ListViewItem *pParent, classCanvas *pCanvas ); #else classODBC( QListView *pParent, classCanvas *pCanvas ); classODBC( QListViewItem *pParent, classCanvas *pCanvas ); #endif ~classODBC(); void setOpen( bool ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged ( Q3ListViewItem * ); #else void selectionChanged ( QListViewItem * ); #endif private: SQLHENV hEnv; classDrivers *pDrivers; classDataSources *pDataSourcesUser; classDataSources *pDataSourcesSystem; void Init(); }; #endif unixODBC-2.2.14-p2/DataManager/classPrimaryKeys.h0100644000076400007640000000332510564052115020021 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classPrimaryKeys_included #define classPrimaryKeys_included #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include #include "classNode.h" class classPrimaryKeys: public classNode { public: #ifdef QT_V4LAYOUT classPrimaryKeys( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classPrimaryKeys( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classPrimaryKeys( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); #else classPrimaryKeys( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classPrimaryKeys( QListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classPrimaryKeys( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); #endif ~classPrimaryKeys(); void setOpen( bool ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged( Q3ListViewItem * ); #else void selectionChanged( QListViewItem * ); #endif private: SQLHDBC hDbc; QString qsTable; void Init( SQLHDBC hDbc, char *pszTable ); void LoadColumns(); }; #endif unixODBC-2.2.14-p2/DataManager/classSpecialColumns.h0100644000076400007640000000357310564052115020470 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classSpecialColumns_included #define classSpecialColumns_included #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include #include "classNode.h" #include "classColumn.h" class classSpecialColumns: public classNode { public: #ifdef QT_V4LAYOUT classSpecialColumns( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classSpecialColumns( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classSpecialColumns( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); #else classSpecialColumns( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classSpecialColumns( QListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); classSpecialColumns( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0 ); #endif ~classSpecialColumns(); void setOpen( bool ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged( Q3ListViewItem * ); #else void selectionChanged( QListViewItem * ); #endif private: #ifdef QT_V4LAYOUT Q3PtrList listColumns; #else QList listColumns; #endif SQLHDBC hDbc; QString qsTable; void Init( SQLHDBC hDbc, char *pszTable ); void LoadColumns(); }; #endif unixODBC-2.2.14-p2/DataManager/classTable.h0100644000076400007640000000465610564052115016601 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classTable_included #define classTable_included #include #ifdef QT_V4LAYOUT #include #include #include #include #else #include #include #include #include #endif #include #include "classNode.h" #include "classColumn.h" #include "classPrimaryKeys.h" #include "classSpecialColumns.h" #include "classIndexs.h" #include "classBrowseFrame.h" class classTable: public classNode { public: #ifdef QT_V4LAYOUT classTable( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDescription = 0 ); classTable( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDescription = 0 ); classTable( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDescription = 0 ); #else classTable( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDescription = 0 ); classTable( QListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDescription = 0 ); classTable( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszName = 0, char *pszType = 0, char *pszDescription = 0 ); #endif ~classTable(); void setOpen( bool bOpen ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged( Q3ListViewItem * ); #else void selectionChanged( QListViewItem * ); #endif private: #ifdef QT_V4LAYOUT Q3PtrList listColumns; #else QList listColumns; #endif classPrimaryKeys *pPrimaryKeys; classSpecialColumns *pSpecialColumns; classIndexs *pIndexs; SQLHDBC hDbc; QString qsName; classBrowseFrame *pBrowse; void Init( SQLHDBC hDbc, char *pszName, char *pszType, char *pszDescription ); void Fini(); void LoadColumns(); }; #endif unixODBC-2.2.14-p2/DataManager/classTables.h0100644000076400007640000000323610564052115016755 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classTables_included #define classTables_included #include #include #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include "classNode.h" #include "classTable.h" class classTables: public classNode { public: #ifdef QT_V4LAYOUT classTables( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0 ); classTables( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0 ); classTables( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0 ); #else classTables( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0 ); classTables( QListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0 ); classTables( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0 ); #endif ~classTables(); void setOpen( bool bOpen ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged( Q3ListViewItem * ); #else void selectionChanged( QListViewItem * ); #endif private: #ifdef QT_V4LAYOUT Q3PtrList listTables; #else QList listTables; #endif SQLHDBC hDbc; void Init( SQLHDBC hDbc ); void LoadTables(); }; #endif unixODBC-2.2.14-p2/DataManager/LinuxODBC.xpm0100644000076400007640000000244007363332141016620 0ustar nicknick/* XPM */ static const char * LinuxODBC_xpm[] = { "32 32 5 1", " c None", ". c #000000000000", "X c #FFFFD34C1861", "o c #96586DB6FFFF", "O c #00000000FFFF", " ", " ........ ", " ...XXXXXXXX.. ", " ..XXXXXXXXXXXXX... ", " ..XXXXXXXXXXXXX...... ", " ..XXXXXXXXXXXXXX.o..... ", " ..XXXXXXXXXXXXXXX.ooooo.... ", " . .XXXXXXXXXXXXXXXX.oooooooo.. ", " ..XXXXXXXXXXXXXXXX.oooooooo.. ", " .XXXXXXXXXXXXX..XX.ooooooooo. ", " .XXXXXXXXXX... ...ooooooooo. ", "..XXXXXXXXX.. .oooooooooo. ", "...XXXXXXXX. .ooooooooooo. ", "...XXXXXXXX.. ....oooooooo. ", "...XXXX...... .oooooooo. ", ".O......... .oooooooo. ", ".OOOOOOOOO. .oooooooo. ", ".OOOOOOOOO. ..oooooooo. ", " .OOOOOOOOO. .ooooooooo. ", " .OOOOOOOOO.. . ..ooooooooo. ", " .OOOOOOOOOO... .....oooooooo. ", " .OOOOOOOOOOOO.OO...oooooooo. ", " .OOOOOOOOOOOOOOOO..ooooooo.. ", " .OOOOOOOOOOOOOOOO..oooooo. ", " ..OOOOOOOOOOOOOOOO..oooo. ", " ..OOOOOOOOOOOOOOOO.ooo. ", " ..OOOOOOOOOOOOOO.ooo. ", " ..OOOOOOOOOOO.o... ", " ...OOOOOOO... ", " ....OO.. ", " .. ", " . "}; unixODBC-2.2.14-p2/DataManager/column.xpm0100644000076400007640000000110407363332142016363 0ustar nicknick/* XPM */ static const char *column_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 7 1", /* colors */ ". c #000000", "# c #c0c0c0", "a c #ffffff", "b c #808080", "c c #ffa858", "d c #ffdca8", "e c None", /* pixels */ "eeeeeeeee..eeeee", "eeeeeeeee.#..eee", "eeee...ee.a##..e", "eee.dd.ee.a#a##.", "ee.dd.....#b###.", "..ddddddcd.a#b#.", ".dddd......##a#.", ".ddddcc.e.a#b##.", ".dddddd.e.a#a##.", "..cccc.ee.#b###.", "ee.....ee.aa#b#.", "eeeeeeeee.b##a#.", "eeeeeeeee..#b##.", "eeeeeeeeeee..##.", "eeeeeeeeeeeee...", "eeeeeeeeeeeeeee." }; unixODBC-2.2.14-p2/DataManager/computergreen.xpm0100644000076400007640000000113207363332142017746 0ustar nicknick/* XPM */ static const char *computergreen_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 8 1", /* colors */ ". c #000000", "# c #008000", "a c #808000", "b c #808080", "c c #c0c0c0", "d c #00ff00", "e c #ffff00", "f c none", /* pixels */ ".fffffffffffffff", ".fffffbbbbbbbbff", ".ffffbcccccccb.f", ".fffbffffffcbb.f", ".faabf.....cbb.f", "..aebf.d##bcbb.f", "bbaebf.###bcbb.f", "ccaebf.bbbbcbb.f", "ffaabfccccccb.bb", "ffffb........bc.", "fffbccccccccbcb.", "fffb.b.b.b.b.bb.", "ffb.c.c.c.c.c..f", "fbffffffffffc.ff", "f............fff", "ffffffffffffffff" }; unixODBC-2.2.14-p2/DataManager/computerred.xpm0100644000076400007640000000113007363332142017416 0ustar nicknick/* XPM */ static const char *computerred_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 8 1", /* colors */ ". c #000000", "# c #800000", "a c #808000", "b c #808080", "c c #c0c0c0", "d c #ff0000", "e c #ffff00", "f c none", /* pixels */ ".fffffffffffffff", ".fffffbbbbbbbbff", ".ffffbcccccccb.f", ".fffbffffffcbb.f", ".faabf.....cbb.f", "..aebf.d##bcbb.f", "bbaebf.###bcbb.f", "ccaebf.bbbbcbb.f", "ffaabfccccccb.bb", "ffffb........bc.", "fffbccccccccbcb.", "fffb.b.b.b.b.bb.", "ffb.c.c.c.c.c..f", "fbffffffffffc.ff", "f............fff", "ffffffffffffffff" }; unixODBC-2.2.14-p2/DataManager/datasourceoff.xpm0100644000076400007640000000113207363332142017714 0ustar nicknick/* XPM */ static const char *datasourceoff_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 8 1", /* colors */ ". c #000000", "# c #800000", "a c #808000", "b c #808080", "c c #c0c0c0", "d c #ff0000", "e c #ffff00", "f c none", /* pixels */ ".fffffffffffffff", ".fffffbbbbbbbbff", ".ffffbcccccccb.f", ".fffbffffffcbb.f", ".faabf.....cbb.f", "..aebf.d##bcbb.f", "bbaebf.###bcbb.f", "ccaebf.bbbbcbb.f", "ffaabfccccccb.bb", "ffffb........bc.", "fffbccccccccbcb.", "fffb.b.b.b.b.bb.", "ffb.c.c.c.c.c..f", "fbffffffffffc.ff", "f............fff", "ffffffffffffffff" }; unixODBC-2.2.14-p2/DataManager/datasourceon.xpm0100644000076400007640000000113107363332142017555 0ustar nicknick/* XPM */ static const char *datasourceon_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 8 1", /* colors */ ". c #000000", "# c #008000", "a c #808000", "b c #808080", "c c #c0c0c0", "d c #00ff00", "e c #ffff00", "f c none", /* pixels */ ".fffffffffffffff", ".fffffbbbbbbbbff", ".ffffbcccccccb.f", ".fffbffffffcbb.f", ".faabf.....cbb.f", "..aebf.d##bcbb.f", "bbaebf.###bcbb.f", "ccaebf.bbbbcbb.f", "ffaabfccccccb.bb", "ffffb........bc.", "fffbccccccccbcb.", "fffb.b.b.b.b.bb.", "ffb.c.c.c.c.c..f", "fbffffffffffc.ff", "f............fff", "ffffffffffffffff" }; unixODBC-2.2.14-p2/DataManager/datasourcessystem.xpm0100644000076400007640000000102207363332142020647 0ustar nicknick/* XPM */ static const char * datasourcessystem_xpm[] = { "16 16 7 1", " c None", ". c #000000000000", "X c #FFFFFFFFFFFF", "o c #C71BC30BC71B", "O c #000000008617", "+ c #0000FFFFFFFF", "@ c #00000000FFFF", " .XXX.oo", " ...ooo.o", " .XXX.oooo", " .oooooooo", " ......oooX", " .....ooooooo..", " .oooo.ooooooo..", " .oOOO......oooX", " .oO+@@.oooooXoX", " .oO+@@.ooo.ooXo", " .o@@@@....ooo.o", " .ooooooo.ooo.oX", " ............ooX", ". .....", ".oooooooooo.. ", "............. "}; unixODBC-2.2.14-p2/DataManager/datasourcesuser.xpm0100644000076400007640000000114507363332142020307 0ustar nicknick/* XPM */ static const char * datasourcesuser_xpm[] = { "16 16 11 1", " c None", ". c #000000000000", "X c #FFFFFFFF0000", "o c #FFFFFFFFFFFF", "O c #861782078617", "+ c #C71BC30BC71B", "@ c #000000008617", "# c #0000FFFFFFFF", "$ c #00000000FFFF", "% c #861782070000", "& c #FFFF0000FFFF", " ..... ", " .XXXXX. ", " .XXX.... ", " .XXX.ooo. ", " .XXX.oO.. ", " ....XX.ooooo. ", " .++++XX.ooo+. ", " .+@@@XX.oooo. ", " .+@#$XX.oO.. ", " .+@#$$%X.o.. ", " .+$$$$$XX.o.. ", " .++++++++&&o. ", " ..........&&&. ", ".++++++++++.. ", ".++++++++++.. ", "............. "}; unixODBC-2.2.14-p2/DataManager/driver.xpm0100644000076400007640000000110407363332142016361 0ustar nicknick/* XPM */ static const char *driver_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 7 1", /* colors */ ". c #000000", "# c #008080", "a c #beffff", "b c #00c0c0", "c c #585858", "d c #00c0c0", "e c None", /* pixels */ "eeeeeeeeeeeeeeee", "eeeee......eeeee", "ee...acbaca...ee", "e.bacbcaacacaa.e", "e.bbbaabbaabaa.e", "e...abbaabba...e", ".bbbbba..aabbaa.", ".##.dbb..bba.bb.", ".#.#bbbbbbabb.b.", "..a#bbbbbbbbb#..", "e.a#.b.bb.#.b#.e", "e.a.a#.bb.##.#.e", "e...a#.##.##...e", "eee.a#.bb.##.eee", "eee....bb....eee", "eeeeee....eeeeee" }; unixODBC-2.2.14-p2/DataManager/drivers.xpm0100644000076400007640000000106607363332142016553 0ustar nicknick/* XPM */ static const char *drivers_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 6 1", /* colors */ ". c #000000", "# c #c0c0c0", "a c #ffffff", "b c #a0a0a4", "c c #c0c0c0", "d c None", /* pixels */ "dddddd....dddddd", "ddd....##c...ddd", "ddd.aaa.#c.cc.dd", "d....###.c.ca.dd", "d.aaa.ccccacb.dd", "d.###ccccccaca.d", "......cccacabb.d", ".cc#cccc..acac.d", ".cc#cccc..acaa.d", "......cccacabb.d", "d.####cacacaaa.d", "d.###.ccacacb.dd", "d....ccc.c.aa.dd", "ddd.###.ca.aa.dd", "ddd....cca...ddd", "dddddd....dddddd" }; unixODBC-2.2.14-p2/DataManager/exec.xpm0100644000076400007640000000147207363332142016022 0ustar nicknick/* XPM */ static const char *exec[] = { /* width height num_colors chars_per_pixel */ " 22 22 7 1", /* colors */ ". c #000000", "# c #ffffff", "a c #585858", "b c #400000", "c c #a0a0a4", "d c #c0c0c0", "e c None", /* pixels */ "eeeeeeeeeeeeeeeeeeeeee", "eeeeeeeeeeeeeeeeeeeeee", "eeeeeeeeeeeeeeeeeeeeee", "eeeeeee...##.e..eeeeee", "eeeeee.##a##a.##eeeeee", "eeed#.#########a.##.ee", "ee.###.############aee", "ee.cad#d#########addee", "ee.cc#d##########dddee", ".dddd#d##.cd.########.", ".....dddd.cd.d###.....", ".ccc.dddd#d##d####ddd.", ".cc.dd.dddddd#d.#d..d.", ".c.dd.cddddd#d#..#d#d.", "e.#.cc.dddddddd#dd...e", "e.#cc.ddd.dd..dd.dd..e", "e.#ccddd..dd.cddd.d..e", "e.#cc.b.c.dd.c.d..d..e", "ee..e#dcc.dd..c.c...ee", "eeeee#dc..dd.ec.c.eeee", "eeeee#d.e.dd.e..c.eeee", "eeeee..ee.dd.ee..eeeee" }; unixODBC-2.2.14-p2/DataManager/id.xpm0100644000076400007640000000067007363332142015471 0ustar nicknick/* XPM */ static const char * id_xpm[] = { "16 16 3 1", " c #FFFFFFFFFFFF", ". c #A699B6DACF3C", "X c #000000000000", " ", " .............. ", " .XXXXXXXXXXXX. ", " . XX X. ", " .X XXXX XXX . ", " .X XXXX XXXX . ", " .X XXXX XXXX . ", " .X XXXX XXXX . ", " .X XXXX XXXX . ", " .X XXXX XXXX . ", " .X XXXX XXX . ", " . XX X. ", " .XXXXXXXXXXXX. ", " .XXXXXXXXXXXX. ", " .............. ", " "}; unixODBC-2.2.14-p2/DataManager/keygold.xpm0100644000076400007640000000136407363332142016534 0ustar nicknick/* XPM */ static const char *keygold_xpm[] = { /* width height num_colors chars_per_pixel */ " 32 15 4 1", /* colors */ ". c #000000", "# c #7f7f7f", "a c #ffff00", "b c None", /* pixels */ "bbbbb.....bbbbbbbbbbbbbbbbbbbbbb", "bbb..#a#a#..bbbbbbbbbbbbbbbbbbbb", "bb.a#a#a#a#a.bbbbbbbbbbbbbbbbbbb", "b.a#a#a#a#a#a.bb..bbbbbbbbbbbbbb", "b.#a#a#a#a#a#.b.a.bbbbbbbbbbbbbb", ".#a...a#a#a#a#..a..............b", ".a.###.a#a#a#a#a#aaaaaaaaaaaaaa.", ".#.bbb.#a#a#a#a#a#a#a#a#a#a#a#a.", ".a.bbb.a#a#a#a#a#a#a#a#a#a#a#a.b", ".#a...a#a#a#a#................bb", "b.#a#a#a#a#a#.b.#..####...##.bbb", "b.a#a#a#a#a#a.bb..b....bbb..bbbb", "bb.a#a#a#a#a.bbbbbbbbbbbbbbbbbbb", "bb#..#a#a#..#bbbbbbbbbbbbbbbbbbb", "bbbbb.....bbbbbbbbbbbbbbbbbbbbbb" }; unixODBC-2.2.14-p2/DataManager/keyred.xpm0100644000076400007640000000106607363332142016360 0ustar nicknick/* XPM */ static const char *keyred_xpm[] = { /* width height num_colors chars_per_pixel */ " 20 14 5 1", /* colors */ ". c #800000", "# c #be0000", "a c #ff0000", "b c #ffbebe", "c c None", /* pixels */ "cccccccccccccccccccc", "cccccccccccccccccccc", "cccccccccccccccccccc", "cccaaaaccccccccccccc", "ccab..aacccccccccccc", "cca.cc..aaaaaaaaaacc", "cca.cc............cc", "cca.cc.......###..cc", "cca.....ccccc#ac.acc", "ccc....cccccc#ac.acc", "ccccccccccccc#ac.acc", "cccccccccccccccccccc", "cccccccccccccccccccc", "cccccccccccccccccccc" }; unixODBC-2.2.14-p2/DataManager/keysilver.xpm0100644000076400007640000000134707363332142017114 0ustar nicknick/* XPM */ static const char *keysilver_xpm[] = { /* width height num_colors chars_per_pixel */ " 31 15 4 1", /* colors */ ". c #000000", "# c #7f7f7f", "a c #bfbfbf", "b c None", /* pixels */ "bbbbb.....bbbbbbbbbbbbbbbbbbbbb", "bbb..babab..bbbbbbbbbbbbbbbbbbb", "bb.ababababa.bbbbbbbbbbbbbbbbbb", "b.abababababa.bb..bbbbbbbbbbbbb", "#.bababababab.b.b.bbbbbbbbbbbbb", ".ba...abababaa..a..............", ".a.###.ababaaaaaaababababababa.", ".b.bbb.bababaaaaaaaaaaaaaaaaaa.", ".a.bbb.ababaaaaaaaaaaaaaaaaaa.b", ".ba...abababaa...............bb", "#.bababababaa.#.#..####...#.bbb", "#.abababababa.##..#....##..bbbb", "##.ababababa.bb##b####bb##bbbbb", "b##..babab..bbbbbbbbbbbbbbbbbbb", "bb###.....#bbbbbbbbbbbbbbbbbbbb" }; unixODBC-2.2.14-p2/DataManager/keysilver2.xpm0100644000076400007640000000107207363332142017171 0ustar nicknick/* XPM */ static const char *keysilver2_xpm[] = { /* width height num_colors chars_per_pixel */ " 20 14 5 1", /* colors */ ". c #bfbfbf", "# c #be0000", "a c #008000", "b c #ffbebe", "c c None", /* pixels */ "cccccccccccccccccccc", "cccccccccccccccccccc", "cccccccccccccccccccc", "cccaaaaccccccccccccc", "ccab..aacccccccccccc", "cca.cc..aaaaaaaaaacc", "cca.cc............cc", "cca.cc.......###..cc", "cca.....ccccc#ac.acc", "ccc....cccccc#ac.acc", "ccccccccccccc#ac.acc", "cccccccccccccccccccc", "cccccccccccccccccccc", "cccccccccccccccccccc" }; unixODBC-2.2.14-p2/DataManager/new.xpm0100644000076400007640000000100507363332142015657 0ustar nicknick/* XPM */ static const char *new_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 3 1", /* colors */ ". c #000000", "# c None", "a c #ffffff", /* pixels */ "################", "##........######", "##.aaaaaa..#####", "##.aaaaaa.a.####", "##.aaaaaa....###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##...........###", "################", "################" }; unixODBC-2.2.14-p2/DataManager/open.xpm0100644000076400007640000000104407363332142016032 0ustar nicknick/* XPM */ static const char *open_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 5 1", /* colors */ ". c #000000", "# c #808000", "a c None", "b c #ffff00", "c c #ffffff", /* pixels */ "aaaaaaaaaaaaaaaa", "aaaaaaaaa...aaaa", "aaaaaaaa.aaa.a.a", "aaaaaaaaaaaaa..a", "a...aaaaaaaa...a", ".bcb.......aaaaa", ".cbcbcbcbc.aaaaa", ".bcbcbcbcb.aaaaa", ".cbcb...........", ".bcb.#########.a", ".cb.#########.aa", ".b.#########.aaa", "..#########.aaaa", "...........aaaaa", "aaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaa" }; unixODBC-2.2.14-p2/DataManager/run.xpm0100644000076400007640000000071607363332142015702 0ustar nicknick/* XPM */ static const char *run_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 14 2 1", /* colors */ ". c None", "# c #000000", /* pixels */ "................", ".........##.....", "........###.....", ".........#......", ".....#####......", "....#..####..#..", ".......###.##...", "...#..###.......", "..#######.......", "....###.##......", "........##......", "........##......", ".........##.....", "................" }; unixODBC-2.2.14-p2/DataManager/save.xpm0100644000076400007640000000070607363332142016033 0ustar nicknick/* XPM */ static const char * save_xpm[] = { "16 16 4 1", " c None", ". c #000000000000", "X c #861782070000", "o c #C71BC30BC71B", " ", " .............. ", " .X.oooooooo.o. ", " .X.oooooooo... ", " .X.oooooooo.X. ", " .X.oooooooo.X. ", " .X.oooooooo.X. ", " .X.oooooooo.X. ", " .XX........XX. ", " .XXXXXXXXXXXX. ", " .XX.........X. ", " .XX......oo.X. ", " .XX......oo.X. ", " .XX......oo.X. ", " ............. ", " "}; unixODBC-2.2.14-p2/DataManager/table.xpm0100644000076400007640000000106407363332142016162 0ustar nicknick/* XPM */ static const char *table_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 6 1", /* colors */ ". c #000000", "# c #ffffff", "a c #808000", "b c #c0c000", "c c #ffffc0", "d c None", /* pixels */ "dddddddddddddddd", "dddddddddddddddd", "dddddddddddddddd", "dddddddd...ddddd", "ddddddd.###..ddd", "dddddd.##b###..d", "ddddd.##b######.", "dddd.#c###b###b.", "ddd.ccc######b.d", "dd.cc#cc##c#b.dd", "d.ccccc#c##b.ddd", "d..accccc#b.dddd", "ddd..acccb.ddddd", "ddddd..ab.dddddd", "ddddddd..ddddddd", "dddddddddddddddd" }; unixODBC-2.2.14-p2/DataManager/tables.xpm0100644000076400007640000000110407363332142016340 0ustar nicknick/* XPM */ static const char *tables_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 7 1", /* colors */ ". c #000000", "# c #ffffff", "a c #000000", "b c #404000", "c c #c0c000", "d c #ffffc0", "e c None", /* pixels */ "eeeeeeeeeeeeeeee", "eeeeeeeee.eeeeee", "eeeeee.e.d..eeee", "eeeee.#.###d..ee", "eeee.#.###d###.e", "eee.#.##d..##.ee", "ee.#.d##.##..eee", "e.d.dd#.###d#..e", ".d.ddd.#c######.", ".ccbc.#c##c###.e", "e..c.#c##cd##.ee", "eee.dc#dc###aeee", "ee.ddddcd#d.eeee", "eee..ddddd.eeeee", "eeeee..dd.eeeeee", "eeeeeee..eeeeeee" }; unixODBC-2.2.14-p2/DataManager/ODBC.xpm0100644000076400007640000000436707453237406015622 0ustar nicknick/* XPM */ static const char *xpmODBC[]={ "16 16 104 2", "Qt c None", ".# c #000000", "#q c #004600", "#i c #005501", "#a c #006501", "#x c #013800", "#p c #013d01", "#h c #014d01", "#r c #014e01", "## c #015c01", "#j c #015e01", "#k c #016701", ".3 c #016c01", "#b c #016e01", ".4 c #017501", "#c c #017701", ".U c #017b01", ".5 c #017e01", ".V c #018401", ".K c #018c01", ".W c #018e01", ".L c #019501", ".M c #019d01", ".z c #01a402", ".A c #01ac02", ".p c #01bb01", ".E c #01cc01", ".g c #01cf01", ".s c #01d102", ".6 c #028701", ".X c #029702", ".N c #02a601", ".O c #02ae02", ".o c #02b302", ".B c #02b502", ".C c #02bd01", ".q c #02c302", ".D c #02c502", ".f c #02c801", ".r c #02ca02", ".h c #02d602", ".t c #02d802", ".i c #02dc02", ".a c #02e002", ".j c #02e102", ".b c #02e502", ".c c #02ea02", ".d c #103030", ".e c #113636", ".k c #143d3d", ".l c #164343", ".m c #18494a", ".u c #194b4b", ".n c #1a5050", ".v c #1a5152", ".w c #1d5858", ".F c #1d595b", ".x c #1f5e5e", ".G c #1f5f60", ".y c #216565", ".H c #226768", ".I c #246d6e", ".P c #256f6f", ".J c #267374", ".Q c #277676", ".R c #297c7d", ".S c #2b8283", ".Z c #2b8485", ".T c #2d898a", ".0 c #2d8a8c", ".1 c #309193", ".7 c #309394", ".2 c #329799", ".8 c #32999b", ".9 c #35a0a1", "#d c #35a1a3", "#. c #36a6a7", "#e c #37a7a9", "#f c #39adaf", "#l c #39afb0", "#g c #3bb3b4", "#m c #3bb5b6", "#n c #3db9bb", "#t c #3ebbbd", "#o c #3fbfc1", "#u c #3fc0c2", "#v c #41c6c7", "#w c #42cbcc", "#F c #43ccce", "#K c #440000", "#G c #45d1d2", "#J c #48dadc", "#I c #5b0000", "#E c #730000", "#D c #8b0000", "#L c #8c0000", "#C c #a40000", "#B c #bb0000", "#A c #d00000", "#s c #e30000", "#z c #e40000", "#y c #f30000", "#H c #ff0000", ".Y c #ffffff", "QtQtQtQtQt.#.#.#.#.#.#QtQtQtQtQt", "QtQtQt.#.#.a.b.c.#.d.e.#.#QtQtQt", "QtQt.#.f.g.h.i.j.#.k.l.m.n.#QtQt", "Qt.#.o.p.q.r.s.t.#.u.v.w.x.y.#Qt", "Qt.#.z.A.B.C.D.E.#.F.G.H.I.J.#Qt", ".#.K.L.M.N.O.#.#.#.#.P.Q.R.S.T.#", ".#.U.V.W.X.#QtQtQtQt.#.Z.0.1.2.#", ".#.3.4.5.6.#QtQtQtQt.#.7.8.9#..#", ".####a#b#c.#QtQtQtQt.##d#e#f#g.#", ".##h#i#j#k.#QtQtQtQt.##l#m#n#o.#", ".##p#q#r.##s.#.#.#.#.##t#u#v#w.#", "Qt.##x.##y#z#A#B#C#D#E.##F#G.#Qt", "Qt.#.##H#y#s#A#B#C#D#E#I.##J.#Qt", "QtQt.##H#y#s#A#B#C#D#E#I#K.#QtQt", "QtQtQt.#.##s#A#B#C#L#E.#.#QtQtQt", "QtQtQtQtQt.#.#.#.#.#.#QtQtQtQtQt"}; unixODBC-2.2.14-p2/DataManagerII/0040755000076400007640000000000011150523465014570 5ustar nicknickunixODBC-2.2.14-p2/DataManagerII/README0100644000076400007640000000033007506352142015443 0ustar nicknickThis dir contains a enhanced version of the DataManager code started by Peter and added to by Mark Vanderwiel, but because its very different, we have made a new branch of the code to avoid breaking existing builds unixODBC-2.2.14-p2/DataManagerII/Makefile.am0100644000076400007640000000502710723054722016625 0ustar nicknickif QT if QT4 else bin_PROGRAMS = DataManagerII INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) DataManagerII_LDADD = \ $(QT_LDFLAGS) \ $(QT_LIBS) \ ../ini/libinilc.la \ ../odbcinst/libodbcinst.la \ ../DriverManager/libodbc.la DataManagerII_DEPENDANCIES = \ ../odbcinst/libodbcinst.la \ ../DriverManager/libodbc.la DataManagerII_SOURCES = \ classBrowse.cpp \ classBrowseFrame.cpp \ classCanvas.cpp \ classColumn.cpp \ classConnectionFrame.cpp \ classDataManager.cpp \ classDataSource.cpp \ classDataSources.cpp \ classDriver.cpp \ classDrivers.cpp \ classISQL.cpp \ classIndexs.cpp \ classLogin.cpp \ classNode.cpp \ classODBC.cpp \ classPrimaryKeys.cpp \ classSpecialColumns.cpp \ classTable.cpp \ classTables.cpp \ main.cpp \ mclassDataManager.cpp \ mclassCanvas.cpp \ mclassLogin.cpp \ mclassISQL.cpp \ mclassConnectionFrame.cpp \ mclassBrowseFrame.cpp \ mclassBrowse.cpp mclassDataManager.cpp: @srcdir@/classDataManager.h @MOC@ @srcdir@/classDataManager.h -o mclassDataManager.cpp mclassCanvas.cpp: @srcdir@/classCanvas.h @MOC@ @srcdir@/classCanvas.h -o mclassCanvas.cpp mclassLogin.cpp: @srcdir@/classLogin.h @MOC@ @srcdir@/classLogin.h -o mclassLogin.cpp mclassISQL.cpp: @srcdir@/classISQL.h @MOC@ @srcdir@/classISQL.h -o mclassISQL.cpp mclassConnectionFrame.cpp: @srcdir@/classConnectionFrame.h @MOC@ @srcdir@/classConnectionFrame.h -o mclassConnectionFrame.cpp mclassBrowseFrame.cpp: @srcdir@/classBrowseFrame.h @MOC@ @srcdir@/classBrowseFrame.h -o mclassBrowseFrame.cpp mclassBrowse.cpp: @srcdir@/classBrowse.h @MOC@ @srcdir@/classBrowse.h -o mclassBrowse.cpp CLEANFILES = \ mclassBrowseFrame.cpp \ mclassDataManager.cpp \ mclassCanvas.cpp \ mclassISQL.cpp \ mclassBrowse.cpp \ mclassConnectionFrame.cpp \ mclassLogin.cpp endif endif EXTRA_DIST = \ classCanvas.h \ classColumn.h \ classDataManager.h \ classDataManager4.h \ classDataSource.h \ classDataSources.h \ classDriver.h \ classDrivers.h \ classConnectionFrame.h \ classBrowseFrame.h \ classBrowse.h \ classISQL.h \ classIndex.h \ classIndexs.h \ classLogin.h \ classNode.h \ classODBC.h \ classPrimaryKeys.h \ classSpecialColumns.h \ classTable.h \ classTables.h \ LinuxODBC.xpm \ column.xpm \ computergreen.xpm \ computerred.xpm \ datasourceoff.xpm \ datasourceon.xpm \ datasourcessystem.xpm \ datasourcesuser.xpm \ driver.xpm \ drivers.xpm \ exec.xpm \ id.xpm \ keygold.xpm \ keyred.xpm \ keysilver.xpm \ keysilver2.xpm \ new.xpm \ open.xpm \ run.xpm \ save.xpm \ table.xpm \ tables.xpm \ ODBC.xpm unixODBC-2.2.14-p2/DataManagerII/Makefile.in0100644000076400007640000005554011111035223016626 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ @QT4_FALSE@@QT_TRUE@bin_PROGRAMS = DataManagerII$(EXEEXT) subdir = DataManagerII DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__DataManagerII_SOURCES_DIST = classBrowse.cpp classBrowseFrame.cpp \ classCanvas.cpp classColumn.cpp classConnectionFrame.cpp \ classDataManager.cpp classDataSource.cpp classDataSources.cpp \ classDriver.cpp classDrivers.cpp classISQL.cpp classIndexs.cpp \ classLogin.cpp classNode.cpp classODBC.cpp \ classPrimaryKeys.cpp classSpecialColumns.cpp classTable.cpp \ classTables.cpp main.cpp mclassDataManager.cpp \ mclassCanvas.cpp mclassLogin.cpp mclassISQL.cpp \ mclassConnectionFrame.cpp mclassBrowseFrame.cpp \ mclassBrowse.cpp @QT4_FALSE@@QT_TRUE@am_DataManagerII_OBJECTS = classBrowse.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classBrowseFrame.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classCanvas.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classColumn.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classConnectionFrame.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classDataManager.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classDataSource.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classDataSources.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classDriver.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classDrivers.$(OBJEXT) classISQL.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classIndexs.$(OBJEXT) classLogin.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classNode.$(OBJEXT) classODBC.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classPrimaryKeys.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classSpecialColumns.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ classTable.$(OBJEXT) classTables.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ main.$(OBJEXT) mclassDataManager.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ mclassCanvas.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ mclassLogin.$(OBJEXT) mclassISQL.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ mclassConnectionFrame.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ mclassBrowseFrame.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ mclassBrowse.$(OBJEXT) DataManagerII_OBJECTS = $(am_DataManagerII_OBJECTS) am__DEPENDENCIES_1 = @QT4_FALSE@@QT_TRUE@DataManagerII_DEPENDENCIES = \ @QT4_FALSE@@QT_TRUE@ $(am__DEPENDENCIES_1) \ @QT4_FALSE@@QT_TRUE@ $(am__DEPENDENCIES_1) ../ini/libinilc.la \ @QT4_FALSE@@QT_TRUE@ ../odbcinst/libodbcinst.la \ @QT4_FALSE@@QT_TRUE@ ../DriverManager/libodbc.la DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(DataManagerII_SOURCES) DIST_SOURCES = $(am__DataManagerII_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @QT4_FALSE@@QT_TRUE@INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) @QT4_FALSE@@QT_TRUE@DataManagerII_LDADD = \ @QT4_FALSE@@QT_TRUE@ $(QT_LDFLAGS) \ @QT4_FALSE@@QT_TRUE@ $(QT_LIBS) \ @QT4_FALSE@@QT_TRUE@ ../ini/libinilc.la \ @QT4_FALSE@@QT_TRUE@ ../odbcinst/libodbcinst.la \ @QT4_FALSE@@QT_TRUE@ ../DriverManager/libodbc.la @QT4_FALSE@@QT_TRUE@DataManagerII_DEPENDANCIES = \ @QT4_FALSE@@QT_TRUE@ ../odbcinst/libodbcinst.la \ @QT4_FALSE@@QT_TRUE@ ../DriverManager/libodbc.la @QT4_FALSE@@QT_TRUE@DataManagerII_SOURCES = \ @QT4_FALSE@@QT_TRUE@ classBrowse.cpp \ @QT4_FALSE@@QT_TRUE@ classBrowseFrame.cpp \ @QT4_FALSE@@QT_TRUE@ classCanvas.cpp \ @QT4_FALSE@@QT_TRUE@ classColumn.cpp \ @QT4_FALSE@@QT_TRUE@ classConnectionFrame.cpp \ @QT4_FALSE@@QT_TRUE@ classDataManager.cpp \ @QT4_FALSE@@QT_TRUE@ classDataSource.cpp \ @QT4_FALSE@@QT_TRUE@ classDataSources.cpp \ @QT4_FALSE@@QT_TRUE@ classDriver.cpp \ @QT4_FALSE@@QT_TRUE@ classDrivers.cpp \ @QT4_FALSE@@QT_TRUE@ classISQL.cpp \ @QT4_FALSE@@QT_TRUE@ classIndexs.cpp \ @QT4_FALSE@@QT_TRUE@ classLogin.cpp \ @QT4_FALSE@@QT_TRUE@ classNode.cpp \ @QT4_FALSE@@QT_TRUE@ classODBC.cpp \ @QT4_FALSE@@QT_TRUE@ classPrimaryKeys.cpp \ @QT4_FALSE@@QT_TRUE@ classSpecialColumns.cpp \ @QT4_FALSE@@QT_TRUE@ classTable.cpp \ @QT4_FALSE@@QT_TRUE@ classTables.cpp \ @QT4_FALSE@@QT_TRUE@ main.cpp \ @QT4_FALSE@@QT_TRUE@ mclassDataManager.cpp \ @QT4_FALSE@@QT_TRUE@ mclassCanvas.cpp \ @QT4_FALSE@@QT_TRUE@ mclassLogin.cpp \ @QT4_FALSE@@QT_TRUE@ mclassISQL.cpp \ @QT4_FALSE@@QT_TRUE@ mclassConnectionFrame.cpp \ @QT4_FALSE@@QT_TRUE@ mclassBrowseFrame.cpp \ @QT4_FALSE@@QT_TRUE@ mclassBrowse.cpp @QT4_FALSE@@QT_TRUE@CLEANFILES = \ @QT4_FALSE@@QT_TRUE@ mclassBrowseFrame.cpp \ @QT4_FALSE@@QT_TRUE@ mclassDataManager.cpp \ @QT4_FALSE@@QT_TRUE@ mclassCanvas.cpp \ @QT4_FALSE@@QT_TRUE@ mclassISQL.cpp \ @QT4_FALSE@@QT_TRUE@ mclassBrowse.cpp \ @QT4_FALSE@@QT_TRUE@ mclassConnectionFrame.cpp \ @QT4_FALSE@@QT_TRUE@ mclassLogin.cpp EXTRA_DIST = \ classCanvas.h \ classColumn.h \ classDataManager.h \ classDataManager4.h \ classDataSource.h \ classDataSources.h \ classDriver.h \ classDrivers.h \ classConnectionFrame.h \ classBrowseFrame.h \ classBrowse.h \ classISQL.h \ classIndex.h \ classIndexs.h \ classLogin.h \ classNode.h \ classODBC.h \ classPrimaryKeys.h \ classSpecialColumns.h \ classTable.h \ classTables.h \ LinuxODBC.xpm \ column.xpm \ computergreen.xpm \ computerred.xpm \ datasourceoff.xpm \ datasourceon.xpm \ datasourcessystem.xpm \ datasourcesuser.xpm \ driver.xpm \ drivers.xpm \ exec.xpm \ id.xpm \ keygold.xpm \ keyred.xpm \ keysilver.xpm \ keysilver2.xpm \ new.xpm \ open.xpm \ run.xpm \ save.xpm \ table.xpm \ tables.xpm \ ODBC.xpm all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu DataManagerII/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu DataManagerII/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done DataManagerII$(EXEEXT): $(DataManagerII_OBJECTS) $(DataManagerII_DEPENDENCIES) @rm -f DataManagerII$(EXEEXT) $(CXXLINK) $(DataManagerII_LDFLAGS) $(DataManagerII_OBJECTS) $(DataManagerII_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classBrowse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classBrowseFrame.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classCanvas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classColumn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classConnectionFrame.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classDataManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classDataSource.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classDataSources.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classDriver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classDrivers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classISQL.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classIndexs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classLogin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classNode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classODBC.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classPrimaryKeys.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classSpecialColumns.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classTable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classTables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassBrowse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassBrowseFrame.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassCanvas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassConnectionFrame.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassDataManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassISQL.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mclassLogin.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) installdirs: for dir in "$(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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: 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-info-am .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-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ 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-info-am @QT4_FALSE@@QT_TRUE@mclassDataManager.cpp: @srcdir@/classDataManager.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classDataManager.h -o mclassDataManager.cpp @QT4_FALSE@@QT_TRUE@mclassCanvas.cpp: @srcdir@/classCanvas.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classCanvas.h -o mclassCanvas.cpp @QT4_FALSE@@QT_TRUE@mclassLogin.cpp: @srcdir@/classLogin.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classLogin.h -o mclassLogin.cpp @QT4_FALSE@@QT_TRUE@mclassISQL.cpp: @srcdir@/classISQL.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classISQL.h -o mclassISQL.cpp @QT4_FALSE@@QT_TRUE@mclassConnectionFrame.cpp: @srcdir@/classConnectionFrame.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classConnectionFrame.h -o mclassConnectionFrame.cpp @QT4_FALSE@@QT_TRUE@mclassBrowseFrame.cpp: @srcdir@/classBrowseFrame.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classBrowseFrame.h -o mclassBrowseFrame.cpp @QT4_FALSE@@QT_TRUE@mclassBrowse.cpp: @srcdir@/classBrowse.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/classBrowse.h -o mclassBrowse.cpp # 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: unixODBC-2.2.14-p2/DataManagerII/classBrowse.cpp0100644000076400007640000005727310564052115017573 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classBrowse.h" #include "classODBC.h" #ifdef QT_V4LAYOUT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include "LinuxODBC.xpm" #define MAX_ROWS_IN_TABLE 25000 // give a resonable number back // WhatsThis help strings char *szHelpQuery = \ "Use this area to quickly specify a simple data filter.\n\n" \ "1. Leave the Expression cells blank to get all data in the table or enter filter Expression(s) to limit the amount of data returned. Expression examples; \n='MyText'\n>23\n" \ "2. Enter (Y)es in the Show cells to get data in that column.\n" \ "3. Enter (A)scending or (D)escending in the Sort cells to get sorted column data.\n"\ "4. Control-Click and drag column headers to rearrange the column order.\n" \ "5. Click the Run button to get your results.\n" \ "NOTE: The max number of rows returned is 25000 and \n" \ "the max column size is 1024." ; char *szHelpData = \ "This area contains the results from your Query. You can:\n\n" \ "1. Browse the data.\n" \ "2. Export the data in HTML format\n" \ "3. Delete rows of existing data\n" \ "4. Insert new rows of data\n" \ "5. Add a blank row for inserting later\n" \ "6. Copy an existing row for inserting later\n\n" \ "NOTE: The insert and delete operations are performed with\n" \ "the current columns shown in the result table\n" ; char *szHelpStatus2 = \ "This area contains status messages.\n" ; classBrowse::classBrowse( SQLHDBC hDbc, const QString& qsTable, const QString& qsLibrary, QWidget *parent, const char *name ) : QWidget( parent, name, 0 ) , hDbc( hDbc ) , qsTable( qsTable ) , qsLibrary( qsLibrary ) , bAutoRefresh( true ) { // VERTICAL LAYOUT QVBoxLayout *layoutMain = new QVBoxLayout( this ); // FILTER LABEL labelFilter = new QLabel( "FILTER" , this ); #ifdef QT_V4LAYOUT labelFilter->setPalette( QPalette( QColor(Qt::lightGray) ) ); labelFilter->setAlignment( Qt::AlignCenter ); #else labelFilter->setPalette( QPalette( QColor(lightGray) ) ); labelFilter->setAlignment( AlignCenter ); #endif // FILTER TABLE #ifdef QT_V4LAYOUT tableQuery = new Q3Table( 3, 1, this ); #else tableQuery = new QTable( 3, 1, this ); #endif tableQuery->setColumnMovingEnabled ( TRUE ); tableQuery->setMinimumSize( 78, 105 ); tableQuery->setLeftMargin( 84 ) ; #ifdef QT_V4LAYOUT Q3Header * headerQuery = tableQuery->verticalHeader(); #else QHeader * headerQuery = tableQuery->verticalHeader(); #endif headerQuery->setLabel( 0, QString( tr("Expression") )); headerQuery->setLabel( 1, QString( tr("Show" ) )); headerQuery->setLabel( 2, QString( tr("Sort" ) )); // DATA LABEL labelResults = new QLabel( "RESULTS", this ); #ifdef QT_V4LAYOUT labelResults->setPalette( QPalette( QColor(Qt::lightGray) ) ); labelResults->setAlignment( Qt::AlignCenter ); #else labelResults->setPalette( QPalette( QColor(lightGray) ) ); labelResults->setAlignment( AlignCenter ); #endif // DATA TABLE tableData = new myQTable( 0, 0, this ); tableData->setSorting( TRUE ) ; tableData->setLeftMargin( 60 ) ; // STATUS LABEL QLabel *labelStatus = new QLabel( "STATUS", this ); #ifdef QT_V4LAYOUT labelStatus->setAlignment( Qt::AlignCenter ); #else labelStatus->setAlignment( AlignCenter ); #endif // STATUS LISTBOX #ifdef QT_V4LAYOUT listStatus = new Q3ListBox( this ); listStatus->setSelectionMode( Q3ListBox::NoSelection ); #else listStatus = new QListBox( this ); listStatus->setSelectionMode( QListBox::NoSelection ); #endif // LAYOUT layoutMain->addWidget( labelFilter ); layoutMain->addWidget( tableQuery ); layoutMain->addWidget( labelResults ); layoutMain->addWidget( tableData, 6 ); layoutMain->addWidget( labelStatus ); layoutMain->addWidget( listStatus, 2); InitQuery(); setMinimumSize( 50, 50 ); setMaximumSize( 32767, 32767 ); QWhatsThis::add( tableQuery, szHelpQuery ); QWhatsThis::add( labelFilter, szHelpQuery ); QWhatsThis::add( tableData, szHelpData ); QWhatsThis::add( labelResults, szHelpData ); QWhatsThis::add( labelStatus, szHelpStatus2 ); QWhatsThis::add( listStatus, szHelpStatus2 ); } void classBrowse::addStatus( const QString &statusMsg ) { if ( listStatus->count() == 300 ) listStatus->removeItem( 0 ) ; listStatus->insertItem( statusMsg ) ; listStatus->setBottomItem( listStatus->count()-1 ) ; } int classBrowse::GetSelectedRows( QString & qsRowsSelected, ListRows & listRows ) { listRows.clear() ; qsRowsSelected = "" ; int nRows = tableData->numRows(); // Build a nice string to confirm the delete for (int r = 0 ; r < nRows ; r++ ) { if ( tableData->isRowSelected( r, TRUE ) ) { listRows += r ; qsRowsSelected += QString::number(r+1) + "," ; } } qsRowsSelected.remove( qsRowsSelected.length() - 1, 1 ) ; // cleanup last comma return listRows.count() ; } void classBrowse::AutoRefresh( bool b ) { bAutoRefresh = b ; } bool classBrowse::OkWithUser( const QString &shortDesc, const QString &qsQuestion ) { QMessageBox qBox("DataManager - classBrowse - " + shortDesc, // caption qsQuestion, // text QMessageBox::Information, // icon QMessageBox::Yes, // button 1 QMessageBox::No | QMessageBox::Escape | QMessageBox::Default, // button 2 QMessageBox::NoButton ) ; // button 3 qBox.setIconPixmap( QPixmap( LinuxODBC_xpm ) ); return QMessageBox::Yes == qBox.exec() ; } int classBrowse::RowAction( const QString &shortDesc, const QString &sql, const ListRows &listRows, SQLRETURN &nReturn ) { CursorScoper s(this) ; nReturn = SQL_SUCCESS ; int nRowsAffected = 0 ; int nCols = tableData->numCols(); addStatus( QString().sprintf("%s: SQL=%s", shortDesc.upper().ascii(), sql.ascii() ) ) ; // LOOP THROUGH THE ROWS ListRows::ConstIterator it ; for (it = listRows.begin(); it != listRows.end() && SQL_SUCCEEDED(nReturn) ; it++ ) { int nRow = *it ; addStatus( QString().sprintf("%s: row %d in progress...", shortDesc.upper().ascii(), nRow+1) ) ; // CREATE A STATEMENT StatementScoper stmt( hDbc ) ; if ( !stmt() ) return 0 ; // PREPARE if (!SQL_SUCCEEDED(nReturn=SQLPrepare( stmt(), (SQLCHAR*)sql.ascii(), SQL_NTS ) ) ) my_msgBox( "classBrowse", "SQLPrepare", nReturn, NULL, NULL, stmt(), sql ) ; // BIND PARAMETERS // TODO might need to add call to SQLDescribeCols to get the host data type for the Bind call. // most drivers ignore this unneeded field. QString *parmValues = new QString[ nCols ]; for (int nCol = 0; nCol < nCols ; nCol++ ) { parmValues[nCol] = tableData->text(nRow, nCol) ; if (!SQL_SUCCEEDED(nReturn=SQLBindParameter( stmt(), nCol+1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, parmValues[nCol].length(), 0, (void*)parmValues[nCol].ascii(), 0, 0 ) ) ) my_msgBox( "classBrowse", "SQLBindParameter", nReturn, NULL, NULL, stmt(), sql ) ; } // EXECUTE if (!SQL_SUCCEEDED(nReturn=SQLExecute( stmt() ) ) ) my_msgBox( "classBrowse", "SQLExecute", nReturn, NULL, NULL, stmt(), sql ) ; // GET NUMBER OF ROWS AFFECTED SQLLEN nRows = 0 ; if (!SQL_SUCCEEDED(SQLRowCount( stmt(), &nRows ) ) ) nRows = 0 ; // DO WE NEED TO FETCH THE DATA TO COUNT THE ROWS? if ( nRows == SQL_NO_ROW_NUMBER ) for ( nRows = 0 ; SQL_SUCCEEDED(SQLFetch(stmt())); nRows++ ) ; nRowsAffected += nRows; } if (SQL_SUCCEEDED(nReturn)) addStatus( QString().sprintf("%s: %d row(s) completed", shortDesc.upper().ascii(), nRowsAffected) ) ; else addStatus( QString().sprintf("%s: %d row(s), ERROR rc=%d, %d row(s) affected", shortDesc.upper().ascii(), listRows.count(), nReturn, nRowsAffected) ) ; return nRowsAffected ; } bool classBrowse::CheckRowsAffected(const QString &shortDesc, const ListRows &listRows ) { // Build SQL statement with parameter markers // SELECT COL1, COL2 FROM LIBRARY.TABLE WHERE COL1=? AND COL2=? QString sql("SELECT "); int nCols = tableData->numCols(); for (int nCol = 0; nCol < nCols ; nCol++ ) sql += tableData->horizontalHeader()->label(nCol) + (nCol != nCols-1 ? ", " : " ") ; sql += "FROM "; if (!qsLibrary.isEmpty()) sql += qsLibrary + "." ; sql += qsTable + " WHERE "; for (int nCol = 0; nCol < nCols ; nCol++ ) sql += tableData->horizontalHeader()->label(nCol) + "=?" + (nCol != nCols-1 ? " AND " : " ") ; // LOOP THROUGH THE ROWS SQLRETURN nReturn ; ListRows::ConstIterator it ; for (it = listRows.begin(); it != listRows.end(); it++ ) { ListRows singleRow ; singleRow += *it ; int nRowsAffected = RowAction( "check", sql, singleRow, nReturn ) ; // Did an error occur? if (!SQL_SUCCEEDED(nReturn) ) return FALSE ; // Found a possible dup row, give the user at least one warning if ( nRowsAffected > 1 ) return OkWithUser( shortDesc, QString().sprintf("WARNING! For row %d, the affected row count (%d) is greated then 1.\n", *it+1, nRowsAffected ) + "This usually means there are rows with duplicate data in them.\n" "ALL DUPLICATE ROWS WILL BE AFFECTED.\n\n" "Do you REALLY want to continue?" ) ; } return TRUE ; } void classBrowse::DeleteRows() { QString qsRowsSelected ; ListRows listRows ; // No work to do? if (0 == GetSelectedRows( qsRowsSelected, listRows )) return ; // Confirm delete with user if (!OkWithUser( "table row delete", QString().sprintf("Do you want to delete the following %d row(s)?\nROWS: ", listRows.count()) + qsRowsSelected )) return ; // Double check the action to be sure user knows about duplicates that might be affected if (!CheckRowsAffected("table row delete", listRows )) return ; // Build SQL statement with parameter markers // DELETE FROM LIBRARY.TABLE WHERE COL1=? AND COL2=? QString sql("DELETE FROM "); if (!qsLibrary.isEmpty()) sql += qsLibrary + "." ; sql += qsTable + " WHERE "; int nCols = tableData->numCols(); for (int nCol = 0; nCol < nCols ; nCol++ ) sql += tableData->horizontalHeader()->label(nCol) + "=?" + (nCol != nCols-1 ? " AND " : " ") ; // Execute the statement SQLRETURN nReturn ; RowAction( "delete", sql, listRows, nReturn ) ; if ( SQL_SUCCEEDED(nReturn) && bAutoRefresh ) Exec() ; } void classBrowse::InsertRows() { QString qsRowsSelected ; ListRows listRows ; // No work to do? if (0 == GetSelectedRows( qsRowsSelected, listRows )) return ; // Confirm delete with user if (!OkWithUser( "table row insert", QString().sprintf("Do you want to insert the following %d row(s)?\nROWS: ", listRows.count()) + qsRowsSelected )) return ; // Build SQL statement with parameter markers // INSERT INTO LIBRARY.TABLE ( COL1, COL2 ) VALUES( ?, ? ) QString sql("INSERT INTO "); if (!qsLibrary.isEmpty()) sql += qsLibrary + "." ; sql += qsTable + " ( "; int nCols = tableData->numCols(); for (int nCol = 0; nCol < nCols ; nCol++ ) sql += tableData->horizontalHeader()->label(nCol) + (nCol != nCols-1 ? ", " : " ") ; sql += ") VALUES ( "; for (int nCol = 0; nCol < nCols ; nCol++ ) sql += QString( "?" ) + (nCol != nCols-1 ? ", " : " ") ; sql += ") "; // Execute the statement SQLRETURN nReturn ; RowAction( "insert", sql, listRows, nReturn ) ; if ( SQL_SUCCEEDED(nReturn) && bAutoRefresh ) Exec() ; } int classBrowse::AddRow() { // Add the Row int nRows = tableData->numRows(); tableData->setNumRows(nRows+1); tableData->verticalHeader()->setLabel( nRows, QString().sprintf("*%d", nRows+1) ) ; // Scroll down to the new row tableData->ensureCellVisible( nRows, 0 ) ; addStatus( QString().sprintf("ADD: row %d added", nRows+1) ) ; return nRows ; } int classBrowse::CopyRow() { QString qsRowsSelected ; ListRows listRows ; // No work to do? if (1 != GetSelectedRows( qsRowsSelected, listRows )) return 0 ; // Add a new row int nRows = AddRow(); // Copy the contents of the selected row int nCols = tableData->numCols(); for (int nCol = 0; nCol < nCols ; nCol++ ) tableData->setText( nRows, nCol, tableData->text( *listRows.begin(), nCol) ) ; // Scroll down to the new copy tableData->ensureCellVisible( nRows, 0 ) ; addStatus( QString().sprintf("COPY: row %d copied to new row %d", *listRows.begin()+1, nRows+1) ) ; return nRows ; } void classBrowse::resizeEvent( QResizeEvent *p ) { resize( p->size() ); } void classBrowse::Clear() // CLEAR QUERY AND DATA { ClearCells( tableData ); InitQuery(); } bool classBrowse::Save() // DATA { labelResults->setText("RESULTS" ); if ( qsDataFileName.isEmpty() ) return SaveAs(); // TRY TO SAVE THE FILE QFile hFile( qsDataFileName ); if ( !hFile.open( IO_WriteOnly ) ) { my_msgBox( "classBrowse", "QFile.open", hFile.status(), NULL, NULL, NULL, qsDataFileName ) ; return FALSE; } WriteHTML( &hFile, TRUE ); hFile.close(); labelResults->setText( QString().sprintf("RESULTS (%s)", qsDataFileName.ascii() ) ); addStatus( QString().sprintf("SAVE: results saved as %s", qsDataFileName.ascii() ) ) ; return TRUE; } bool classBrowse::SaveAs() // DATA { // LET USER PICK A FILE QString fileName = QFileDialog::getSaveFileName( qsDataFileName ); if ( fileName.isEmpty() ) return FALSE; else { qsDataFileName = fileName ; return Save(); } } bool classBrowse::SaveSQL() // SAVE QUERY { labelFilter->setText( "FILTER (%s)" ); QString fileName = QFileDialog::getSaveFileName( qsSQLFileName ); if (fileName.isEmpty()) return FALSE; // TRY TO SAVE THE FILE QFile hFile( fileName ); if ( !hFile.open( IO_WriteOnly ) ) { my_msgBox( "classBrowse", "QFile.open", hFile.status(), NULL, NULL, NULL, fileName ) ; return FALSE; } QString qsSQL; CreateSQL( qsSQL ) ; hFile.writeBlock( qsSQL.ascii(), qsSQL.length() ) ; hFile.close(); qsSQLFileName = fileName ; labelFilter->setText( QString().sprintf("FILTER (%s)", qsSQLFileName.ascii() ) ); addStatus( QString().sprintf("SAVE SQL: sql filter saved as %s", qsSQLFileName.ascii() ) ) ; return TRUE; } void classBrowse::InitQuery() { SQLRETURN nReturn ; SQLCHAR szColumnName[MAX_COLUMN_WIDTH]; SQLLEN nCols = 0; int nCol = 0; #ifdef QT_V4LAYOUT Q3Header *headerQuery = tableQuery->horizontalHeader(); #else QHeader *headerQuery = tableQuery->horizontalHeader(); #endif // CREATE A STATEMENT StatementScoper stmt( hDbc ) ; if ( !stmt() ) return ; // EXECUTE if (!SQL_SUCCEEDED(nReturn=SQLColumns( stmt(), 0, 0, (SQLCHAR*)qsLibrary.ascii(), SQL_NTS, (SQLCHAR*)qsTable.ascii(), SQL_NTS, 0, 0 ) ) ) return my_msgBox( "classBrowse", "SQLColumns", nReturn, NULL, NULL, stmt() ) ; // GET NUMBER OF COLUMNS AFFECTED if (!SQL_SUCCEEDED(SQLRowCount( stmt(), &nCols ) ) ) nCols = 0; // Default Value, since some drivers do not handle RowCount up front for performance reasons if ( nCols == SQL_NO_ROW_NUMBER ) nCols = 1000; // give a resonable number back tableQuery->setNumCols( nCols ); // GET RESULTS while ( SQL_SUCCEEDED(SQLFetch( stmt() ) ) && nCol < nCols ) { if (!SQL_SUCCEEDED(SQLGetData( stmt(), SQLColumns_COLUMN_NAME, SQL_C_CHAR, &szColumnName[0], sizeof(szColumnName), 0 ) ) ) strcpy( (char *)szColumnName, "Unknown" ); headerQuery->setLabel( nCol, QString((char*)szColumnName).stripWhiteSpace() ); nCol++; } // Show the correct number of columns to make the gui look correct tableQuery->setNumCols( nCol ); SelectAllColumns(); } void classBrowse::Exec() // RUN QUERY { CursorScoper s(this) ; SQLLEN nRows; SWORD nColumns; SQLRETURN nReturn; QString qsSQL ; if (!CreateSQL( qsSQL ) ) return ; ClearCells( tableData ); // CREATE A STATEMENT StatementScoper stmt( hDbc ) ; if ( !stmt() ) return ; // PREPATE if (!SQL_SUCCEEDED(nReturn=SQLPrepare(stmt(), (SQLCHAR*)qsSQL.ascii(), SQL_NTS) ) ) return my_msgBox( "classBrowse", "SQLPrepare", nReturn, NULL, NULL, stmt(), qsSQL ) ; // EXECUTE addStatus( QString().sprintf( "RUN: filter sql=%s", qsSQL.ascii() ) ) ; if(!SQL_SUCCEEDED(nReturn=SQLExecute(stmt()) ) ) return my_msgBox( "classBrowse", "SQLExecute", nReturn, NULL, NULL, stmt(), qsSQL ) ; // GET NUMBER OF ROWS AFFECTED if (!SQL_SUCCEEDED(SQLRowCount( stmt(), &nRows ) ) ) nRows = 0; // Default Value, since some drivers do not handle RowCount up front for performance reasons if ( nRows == SQL_NO_ROW_NUMBER ) nRows = MAX_ROWS_IN_TABLE; // give a resonable number back tableData->setNumRows( nRows ); // GET NUMBER OF COLUMNS RETURNED if (!SQL_SUCCEEDED(SQLNumResultCols( stmt(), &nColumns ) ) ) nColumns = 0; tableData->setNumCols( nColumns ); // GET A RESULTS HEADER (column headers) ExecHeader( stmt(), nColumns ); // GET A RESULTS BODY (data) nRows = ExecBody( stmt(), nColumns ); // Show the correct number of rows to make the gui look correct tableData->setNumRows( nRows ); // Update the status addStatus( QString().sprintf( "RUN: %d rows and %d columns affected", nRows, nColumns ) ) ; } void classBrowse::ExecHeader( SQLHSTMT hStmt, SWORD nColumns ) { for( int nCol = 0; nCol < nColumns; nCol++ ) { SQLCHAR szColumnName[MAX_COLUMN_WIDTH]; szColumnName[0] = 0; SQLColAttribute( hStmt, nCol+1, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), 0, 0 ); tableData->horizontalHeader()->setLabel( nCol, QString( (char*)szColumnName ).stripWhiteSpace() ); } } int classBrowse::ExecBody( SQLHSTMT hStmt, SWORD nColumns ) { int nRow = 0; // PROCESS ALL ROWS while( SQL_SUCCEEDED(SQLFetch(hStmt) ) && nRow < MAX_ROWS_IN_TABLE ) { nRow++; // PROCESS ALL COLUMNS for( int nCol = 1; nCol <= nColumns; nCol++ ) { SQLLEN nIndicator; char szData[MAX_COLUMN_WIDTH]; szData[0] = 0 ; SQLRETURN nReturn = SQLGetData( hStmt, nCol, SQL_C_CHAR, (SQLPOINTER)szData, sizeof(szData), &nIndicator ); if ( SQL_SUCCEEDED(nReturn) && nIndicator != SQL_NULL_DATA ) tableData->setText( nRow-1, nCol-1, QString( szData ).stripWhiteSpace() ); else tableData->setText( nRow-1, nCol-1, " " ); tableData->verticalHeader()->setLabel( nRow-1, QString::number( nRow ) ) ; } } return nRow ; // return the actual number of rows in the result set } QString classBrowse::GetColumnQuote( SQLHDBC hDbc ) { SQLCHAR quoteChar[20]; SQLSMALLINT len; QString q; SQLGetInfo( hDbc, SQL_IDENTIFIER_QUOTE_CHAR, quoteChar, sizeof( quoteChar ), &len ); if ( len == 0 ) { q = ""; return q; } else { q = (char*)quoteChar; return q; } } bool classBrowse::CreateSQL( QString& qsSQL ) { int nCols = tableQuery->numCols(); QString qsColumns ; QString qsWhereExpressions ; QString qsAnd ; QString qsComma1 ; QString qsComma2 ; QString qsSorts ; QString quote = GetColumnQuote( hDbc ); for (int nCol=0; nColhorizontalHeader()->label( nCol ); qsColumn.prepend(quote).append(quote) ; // Quote column name in case it matches SQL keyword QString qsExpression = tableQuery->text( QUERY_ROW_EXPRESSION, nCol ); QString qsShow = tableQuery->text( QUERY_ROW_SHOW, nCol ).upper(); QString qsSort = tableQuery->text( QUERY_ROW_SORT, nCol ).upper(); if ( qsShow.startsWith("Y") ) { qsColumns += qsComma1; qsColumns += qsColumn; qsComma1 = ", "; } if ( !qsSort.isEmpty() ) { qsSorts += qsComma2; qsSorts += qsColumn; qsSorts += qsSort.startsWith("D") ? " DESC " : " ASC " ; qsComma2 = ", "; } if ( !qsExpression.isEmpty() ) { qsWhereExpressions += qsAnd; qsWhereExpressions += qsColumn; qsWhereExpressions += " "; qsWhereExpressions += qsExpression; qsAnd = " AND "; } } if ( qsColumns.isEmpty() ) { QMessageBox::warning( (QWidget *)this, "Table browse", "No columns to show. Please specify which columns you want to show." ); return false; } qsSQL = "SELECT "; qsSQL += qsColumns; qsSQL += " FROM "; if (!qsLibrary.isEmpty()) qsSQL += qsLibrary + "." ; qsSQL += qsTable; if (!qsWhereExpressions.isEmpty()) qsSQL += " WHERE " + qsWhereExpressions; if (!qsSorts.isEmpty() ) qsSQL += " ORDER BY " + qsSorts; return true; } void classBrowse::ChangeAllColumns( int row, const char * text ) { int nCol = 0; int nCols = tableQuery->numCols(); #ifdef QT_V4LAYOUT Q3Header *header; #else QHeader *header; #endif header = tableQuery->horizontalHeader(); for ( nCol=0; nColsetText( row, nCol, text ); } void classBrowse::SelectAllColumns() { ChangeAllColumns( QUERY_ROW_SHOW, "YES" ) ; } void classBrowse::UnSelectAllColumns() { ChangeAllColumns( QUERY_ROW_SHOW, "" ) ; } void classBrowse::UnSortAllColumns() { ChangeAllColumns( QUERY_ROW_SORT, "" ) ; } void classBrowse::UnExprAllColumns() { ChangeAllColumns( QUERY_ROW_EXPRESSION, "" ) ; } void classBrowse::WriteHTML( QFile *hFile, bool bPage ) { int nCol = 0; int nCols = tableData->numCols(); int nRow = 0; int nRows = tableData->numRows(); #ifdef QT_V4LAYOUT Q3Header *header; #else QHeader *header; #endif header = tableData->horizontalHeader(); if ( bPage ) hFile->writeBlock( "", sizeof("")-1 ); hFile->writeBlock( "", sizeof("
")-1 ); // HEADER hFile->writeBlock( "\n", sizeof("\n")-1 ); for ( nCol=0; nColwriteBlock( "", sizeof("")-1 ); } hFile->writeBlock( "", sizeof("")-1 ); // BODY for ( nRow=0; nRowwriteBlock( "\n", sizeof("\n")-1 ); for ( nCol=0; nColwriteBlock( "\n", sizeof("")-1 ); } hFile->writeBlock( "", sizeof("")-1 ); } hFile->writeBlock( "\n
", sizeof("")-1 ); hFile->writeBlock( header->label( nCol ), header->label( nCol ).length() ); hFile->writeBlock( "
", sizeof("\n")-1 ); hFile->writeBlock( tableData->text( nRow, nCol ), tableData->text( nRow, nCol ).length() ); hFile->writeBlock( "
", sizeof("\n")-1 ); if ( bPage ) hFile->writeBlock( "", sizeof("")-1 ); } #ifdef QT_V4LAYOUT void classBrowse::ClearCells( Q3Table *table ) #else void classBrowse::ClearCells( QTable *table ) #endif { int nCol = 0; int nCols = table->numCols(); int nRow = 0; int nRows = table->numRows(); for ( nRow=0; nRowclearCell( nRow, nCol ); } } } unixODBC-2.2.14-p2/DataManagerII/classBrowseFrame.cpp0100644000076400007640000001171210564052115020532 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classBrowseFrame.h" #include "classBrowse.h" #ifdef QT_V4LAYOUT #include #include #include #include #include #else #include #include #include #include #include #endif #include "run.xpm" #include "new.xpm" #include "open.xpm" #include "save.xpm" classBrowseFrame::classBrowseFrame( SQLHDBC hDbc, const QString &qsTable, const QString &qsLibrary, QWidget *parent, const char *name ) #ifdef QT_V4LAYOUT : Q3MainWindow( parent, name, 0 ) #else : QMainWindow( parent, name, 0 ) #endif { // CLIENT AREA browse = new classBrowse( hDbc, qsTable, qsLibrary, this ); setCentralWidget( browse ); // SETUP MAIN MENU QMenuBar *menubarMain = new QMenuBar( this ); #ifdef QT_V4LAYOUT Q3PopupMenu *pFile = new Q3PopupMenu(); pFile->insertItem( QPixmap( new_xpm ), tr("&Clear" ), browse, SLOT(Clear() ), Qt::CTRL+Qt::Key_C ); pFile->insertItem( QPixmap( save_xpm ), tr("&Save" ), browse, SLOT(Save() ), Qt::CTRL+Qt::Key_S ); pFile->insertItem( QPixmap( save_xpm ), tr("Save &As" ), browse, SLOT(SaveAs() ), Qt::CTRL+Qt::Key_A ); pFile->insertItem( QPixmap( save_xpm ), tr("Save S&QL"), browse, SLOT(SaveSQL()), Qt::CTRL+Qt::Key_Q ); #else QPopupMenu *pFile = new QPopupMenu(); pFile->insertItem( QPixmap( new_xpm ), tr("&Clear" ), browse, SLOT(Clear() ), CTRL+Key_C ); pFile->insertItem( QPixmap( save_xpm ), tr("&Save" ), browse, SLOT(Save() ), CTRL+Key_S ); pFile->insertItem( QPixmap( save_xpm ), tr("Save &As" ), browse, SLOT(SaveAs() ), CTRL+Key_A ); pFile->insertItem( QPixmap( save_xpm ), tr("Save S&QL"), browse, SLOT(SaveSQL()), CTRL+Key_Q ); #endif menubarMain->insertItem( tr("&File"), pFile ); #ifdef QT_V4LAYOUT Q3PopupMenu *pEdit = new Q3PopupMenu(); #else QPopupMenu *pEdit = new QPopupMenu(); #endif pEdit->insertItem( tr("Select All Columns"), browse, SLOT(SelectAllColumns() ) ); pEdit->insertItem( tr("Unselect All Columns"), browse, SLOT(UnSelectAllColumns()) ); pEdit->insertItem( tr("Clear All Column Sorting"), browse, SLOT(UnSortAllColumns() ) ); pEdit->insertItem( tr("Clear All Column Expressions"), browse, SLOT(UnExprAllColumns() ) ); menubarMain->insertItem( tr("&Filter"), pEdit ); #ifdef QT_V4LAYOUT pResults = new Q3PopupMenu(); #else pResults = new QPopupMenu(); #endif pResults->insertItem( tr("Delete Selected Rows"), browse, SLOT(DeleteRows() ) ); pResults->insertItem( tr("Insert Selected Rows"), browse, SLOT(InsertRows() ) ); pResults->insertSeparator(); pResults->insertItem( tr("Add blank row for inserting"), browse, SLOT(AddRow() ) ); pResults->insertItem( tr("Copy selected row for inserting"), browse, SLOT(CopyRow() ) ); pResults->insertSeparator(); nAutoRefresh = pResults->insertItem( tr("Auto refresh after Delete/Insert"), this, SLOT(autoRefresh() ) ); pResults->setItemChecked( nAutoRefresh , true ); menubarMain->insertItem( tr("&Results"), pResults ); QString t ; t.sprintf(" [%s.%s] ", qsLibrary.ascii(), qsTable.ascii() ) ; menubarMain->insertItem( t ); menubarMain->setSeparator( QMenuBar::InWindowsStyle ); // SETUP TOOLBAR #ifdef QT_V4LAYOUT Q3ToolBar *toolbarMain = new Q3ToolBar( this ); addToolBar( toolbarMain, tr( "ToolBar" ), Qt::Top, FALSE ); #else QToolBar *toolbarMain = new QToolBar( this ); addToolBar( toolbarMain, tr( "ToolBar" ), Top, FALSE ); #endif new QToolButton( QPixmap( new_xpm ), QString(tr("Clear")), "", browse, SLOT(Clear()), toolbarMain ); new QToolButton( QPixmap( save_xpm ), QString(tr("Save") ), "", browse, SLOT(Save() ), toolbarMain ); new QToolButton( QPixmap( run_xpm ), QString(tr("Run") ), "", browse, SLOT(Exec() ), toolbarMain ); QWhatsThis::whatsThisButton( toolbarMain ); // RESIZE #ifdef QT_V4LAYOUT connect( parent, SIGNAL(changedSize(int,int)), SLOT(Resize(int,int)) ); #else connect( parent, SIGNAL(changedSize(int,int)), SLOT(resize(int,int)) ); #endif resize( parent->size() ); setMinimumSize( 50, 50 ); setMaximumSize( 32767, 32767 ); } void classBrowseFrame::resizeEvent( QResizeEvent *p ) { resize( p->size() ); } void classBrowseFrame::autoRefresh() { pResults->setItemChecked( nAutoRefresh, !pResults->isItemChecked( nAutoRefresh ) ) ; browse->AutoRefresh( pResults->isItemChecked( nAutoRefresh ) ) ; } void classBrowseFrame::Resize( int x, int y ) { resize( x, y ); } unixODBC-2.2.14-p2/DataManagerII/classCanvas.cpp0100644000076400007640000000116307506352142017535 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classCanvas.h" classCanvas::classCanvas( QWidget *pParent, const char *pszName ) : QLabel( pParent, pszName ) { } void classCanvas::resizeEvent( QResizeEvent *p ) { changedSize( p->size().width(), p->size().height() ); } unixODBC-2.2.14-p2/DataManagerII/classColumn.cpp0100644000076400007640000000214310564052115017551 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classColumn.h" #ifdef QT_V4LAYOUT #include #else #include #endif #include "column.xpm" #ifdef QT_V4LAYOUT classColumn::classColumn( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszName, const char *pszType, const char *pszDesc ) : classNode( pParent, pAfter, pCanvas ) #else classColumn::classColumn( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszName, const char *pszType, const char *pszDesc ) : classNode( pParent, pAfter, pCanvas ) #endif { setText( 0, pszName ); setText( 1, pszType ); setText( 2, pszDesc ); setPixmap( 0, QPixmap( column_xpm ) ); setExpandable( FALSE ); } unixODBC-2.2.14-p2/DataManagerII/classConnectionFrame.cpp0100644000076400007640000001131310564052116021366 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classConnectionFrame.h" #ifdef QT_V4LAYOUT #include #include #include #include #else #include #include #include #include #endif #include "run.xpm" #include "new.xpm" #include "open.xpm" #include "save.xpm" classConnectionFrame::classConnectionFrame( SQLHDBC hDbc, QString qsDataSource, QWidget *parent, const char *name ) #ifdef QT_V4LAYOUT : Q3MainWindow( parent, name, 0 ) #else : QMainWindow( parent, name, 0 ) #endif { // CLIENT AREA isql = new classISQL( hDbc, qsDataSource, this ); setCentralWidget( isql ); // SETUP MAIN MENU QMenuBar *menubarMain = new QMenuBar( this ); // FILE MENU #ifdef QT_V4LAYOUT Q3PopupMenu *pFile = new Q3PopupMenu(); pFile->insertItem( QPixmap( new_xpm ), tr("&New" ) , isql, SLOT(NewSQL() ), Qt::CTRL+Qt::Key_N ); pFile->insertItem( QPixmap( open_xpm ), tr("&Open") , isql, SLOT(OpenSQL() ), Qt::CTRL+Qt::Key_O ); pFile->insertItem( QPixmap( save_xpm ), tr("&Save") , isql, SLOT(SaveSQL() ), Qt::CTRL+Qt::Key_S ); pFile->insertItem( QPixmap( save_xpm ), tr("Save &As"), isql, SLOT(SaveAsSQL()), Qt::CTRL+Qt::Key_A ); pFile->insertItem( QPixmap( run_xpm ), tr("&Run") , this, SLOT(Exec() ), Qt::CTRL+Qt::Key_R ); #else QPopupMenu *pFile = new QPopupMenu(); pFile->insertItem( QPixmap( new_xpm ), tr("&New" ) , isql, SLOT(NewSQL() ), CTRL+Key_N ); pFile->insertItem( QPixmap( open_xpm ), tr("&Open") , isql, SLOT(OpenSQL() ), CTRL+Key_O ); pFile->insertItem( QPixmap( save_xpm ), tr("&Save") , isql, SLOT(SaveSQL() ), CTRL+Key_S ); pFile->insertItem( QPixmap( save_xpm ), tr("Save &As"), isql, SLOT(SaveAsSQL()), CTRL+Key_A ); pFile->insertItem( QPixmap( run_xpm ), tr("&Run") , this, SLOT(Exec() ), CTRL+Key_R ); #endif menubarMain->insertItem( tr("&File"), pFile ); // VIEW MENU #ifdef QT_V4LAYOUT pView = new Q3PopupMenu(); #else pView = new QPopupMenu(); #endif pView->insertItem( tr("Text Table"), this, SLOT(setViewText() ), 0, classISQL::Text ); pView->insertItem( tr("Text Delimited"), this, SLOT(setViewTextDelimited()), 0, classISQL::TextDelimited ); pView->insertItem( tr("HTML Source"), this, SLOT(setViewHTMLSource() ), 0, classISQL::HTMLSource ); pView->setItemChecked( view=classISQL::Text, true ); menubarMain->insertItem( tr("&View"), pView ); // DUMMY DESCRIPTION MENU QString ds ; ds.sprintf(" [%s] ", qsDataSource.ascii() ) ; menubarMain->insertItem( ds ); // SETUP TOOLBAR #ifdef QT_V4LAYOUT Q3ToolBar *toolbarMain = new Q3ToolBar( this ); addToolBar( toolbarMain, tr( "ToolBar" ), Qt::Top, FALSE ); #else QToolBar *toolbarMain = new QToolBar( this ); addToolBar( toolbarMain, tr( "ToolBar" ), Top, FALSE ); #endif new QToolButton( QPixmap( new_xpm ), QString(tr("New" )), "", isql, SLOT(NewSQL() ), toolbarMain ); new QToolButton( QPixmap( open_xpm ), QString(tr("Open")), "", isql, SLOT(OpenSQL()), toolbarMain ); new QToolButton( QPixmap( save_xpm ), QString(tr("Save")), "", isql, SLOT(SaveSQL()), toolbarMain ); new QToolButton( QPixmap( run_xpm ), QString(tr("Run" )), "", this, SLOT(Exec() ), toolbarMain ); QWhatsThis::whatsThisButton ( toolbarMain ); // RESIZE #ifdef QT_V4LAYOUT connect( parent, SIGNAL(changedSize(int,int)), SLOT(Resize(int,int)) ); #else connect( parent, SIGNAL(changedSize(int,int)), SLOT(resize(int,int)) ); #endif resize( parent->size() ); setMinimumSize( 50, 50 ); setMaximumSize( 32767, 32767 ); } void classConnectionFrame::resizeEvent( QResizeEvent *p ) { resize( p->size() ); } void classConnectionFrame::Exec() { isql->ExecSQL( view ) ; } void classConnectionFrame::setViewHTMLSource() { pView->setItemChecked( view, false ); view = classISQL::HTMLSource; pView->setItemChecked( view, true ); } void classConnectionFrame::setViewText() { pView->setItemChecked( view, false ); view = classISQL::Text; pView->setItemChecked( view, true ); } void classConnectionFrame::setViewTextDelimited() { pView->setItemChecked( view, false ); view = classISQL::TextDelimited; pView->setItemChecked( view, true ); } void classConnectionFrame::Resize( int x, int y ) { resize( x, y ); } unixODBC-2.2.14-p2/DataManagerII/classDataManager.cpp0100644000076400007640000002116510564052116020466 0ustar nicknick/************************************************** * * TODO's (Look for TODO in the source) * * - Use SQLGetInfo * + to determine the library seperator (. or /) * - Use SQLSetStmtAttr * + to set SQL_ATTR_METADATA_ID TRUE * in the cases where wild cards * are not wanted (SQLColumns, SQLTables, ...) * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifdef QT_V4LAYOUT #include "classDataManager4.h" #else #include "classDataManager.h" #endif #include #include #ifdef QT_V4LAYOUT #include #include #include #else #include #include #endif #include "LinuxODBC.xpm" classDataManager::classDataManager( QWidget *pParent, const char *pszName ) : QWidget( pParent, pszName ) //, 503808 ) { setCaption( "DataManagerII " VERSION ); setIcon( QPixmap( LinuxODBC_xpm ) ); splSplitter = new QSplitter( this, "splSplitter" ); #ifdef QT_V4LAYOUT lvwBrowser = new Q3ListView( splSplitter, "lvwBrowser" ); #else lvwBrowser = new QListView( splSplitter, "lvwBrowser" ); #endif lvwBrowser->setMinimumSize( 50, 50 ); lvwBrowser->setMaximumSize( 32767, 32767 ); #ifdef QT_V4LAYOUT connect( lvwBrowser, SIGNAL(rightButtonClicked(Q3ListViewItem*,const QPoint&,int)), SLOT(ItemMenu(Q3ListViewItem*,const QPoint&,int)) ); connect( lvwBrowser, SIGNAL(selectionChanged(Q3ListViewItem*)), SLOT(ItemChanged(Q3ListViewItem*)) ); #else connect( lvwBrowser, SIGNAL(rightButtonClicked(QListViewItem*,const QPoint&,int)), SLOT(ItemMenu(QListViewItem*,const QPoint&,int)) ); connect( lvwBrowser, SIGNAL(selectionChanged(QListViewItem*)), SLOT(ItemChanged(QListViewItem*)) ); #endif #ifdef QT_V4LAYOUT lvwBrowser->setFocusPolicy( Qt::TabFocus ); lvwBrowser->setBackgroundMode( Qt::PaletteBackground ); #else lvwBrowser->setFocusPolicy( QWidget::TabFocus ); lvwBrowser->setBackgroundMode( QWidget::PaletteBackground ); #endif lvwBrowser->setFrameStyle( 17 ); #ifdef QT_V4LAYOUT lvwBrowser->setResizePolicy( Q3ScrollView::Manual ); lvwBrowser->setVScrollBarMode( Q3ScrollView::Auto ); lvwBrowser->setHScrollBarMode( Q3ScrollView::Auto ); #else lvwBrowser->setResizePolicy( QScrollView::Manual ); lvwBrowser->setVScrollBarMode( QScrollView::Auto ); lvwBrowser->setHScrollBarMode( QScrollView::Auto ); #endif lvwBrowser->setTreeStepSize( 20 ); lvwBrowser->setMultiSelection( FALSE ); lvwBrowser->setAllColumnsShowFocus( TRUE ); lvwBrowser->setItemMargin( 1 ); lvwBrowser->setRootIsDecorated( TRUE ); lvwBrowser->addColumn( "Object", -1 ); #ifdef QT_V4LAYOUT lvwBrowser->setColumnWidthMode( 0, Q3ListView::Maximum ); #else lvwBrowser->setColumnWidthMode( 0, QListView::Maximum ); #endif lvwBrowser->setColumnAlignment( 0, 1 ); lvwBrowser->addColumn( "Type", -1 ); #ifdef QT_V4LAYOUT lvwBrowser->setColumnWidthMode( 1, Q3ListView::Maximum ); #else lvwBrowser->setColumnWidthMode( 1, QListView::Maximum ); #endif lvwBrowser->setColumnAlignment( 1, 1 ); lvwBrowser->addColumn( "Description", -1 ); #ifdef QT_V4LAYOUT lvwBrowser->setColumnWidthMode( 2, Q3ListView::Maximum ); #else lvwBrowser->setColumnWidthMode( 2, QListView::Maximum ); #endif lvwBrowser->setColumnAlignment( 2, 1 ); lvwBrowser->setSorting( -1, 0 ); #ifdef QT_V4LAYOUT lvwBrowser->setSelectionMode( Q3ListView::Single ); #else lvwBrowser->setSelectionMode( QListView::Single ); #endif pCanvas = new classCanvas( splSplitter, "fraProperties" ); LoadState(); setMinimumSize( 0, 0 ); setMaximumSize( 32767, 32767 ); pODBC = new classODBC( lvwBrowser, pCanvas ); pODBC->setOpen( TRUE ) ; } classDataManager::~classDataManager() { SaveState(); } #ifdef QT_V4LAYOUT void classDataManager::ItemMenu(Q3ListViewItem *pItem, const QPoint &, int ) #else void classDataManager::ItemMenu(QListViewItem *pItem, const QPoint &, int ) #endif { if ( pItem == 0 ) return; lvwBrowser->setSelected( pItem, TRUE ); } #ifdef QT_V4LAYOUT void classDataManager::ItemChanged(Q3ListViewItem *pItem ) #else void classDataManager::ItemChanged(QListViewItem *pItem ) #endif { QString qsType; if ( pItem == 0 ) return; lvwBrowser->setSelected( pItem, TRUE ); pODBC->selectionChanged( pItem ); } void classDataManager::Exit() { exit( 0 ); } void classDataManager::About() { QMessageBox::information( this, "DataManager", "DataManager " VERSION ); } void classDataManager::resizeEvent( QResizeEvent * ) { int marg = 1; int w = width() - marg * 2; int h = height() - marg * 2; splSplitter->setGeometry( marg, marg, w, h ); } void classDataManager::LoadState() { HINI hIni; char szObject[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; char szINI[ODBC_FILENAME_MAX+1]; sprintf( szINI, "%s/%s", QDir::homeDirPath().ascii(), ".DataManager/DataManager.ini" ); // Fall out if the file does not exist if ( !QFile::exists( szINI ) ) return ; if ( iniOpen( &hIni, szINI, "#;", '[', ']', '=', TRUE ) != INI_ERROR ) { iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { szObject[0] = '\0'; szPropertyName[0] = '\0'; szPropertyValue[0] = '\0'; iniObject( hIni, szObject ); iniPropertyFirst( hIni ); if ( strcmp( szObject, "GEOMETRY" ) == 0 ) { int nX = x(); int nY = y(); int nW = width(); int nH = height(); int nCell1 = 0; int nCell2 = 0; while ( iniPropertyEOL( hIni ) == FALSE ) { iniProperty( hIni, szPropertyName ); if ( strncmp( szPropertyName, "X", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nX = atoi( szPropertyValue ); } if ( strncmp( szPropertyName, "Y", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nY = atoi( szPropertyValue ); } if ( strncmp( szPropertyName, "W", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nW = atoi( szPropertyValue ); } if ( strncmp( szPropertyName, "H", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nH = atoi( szPropertyValue ); } if ( strncmp( szPropertyName, "W_CELL1", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nCell1 = atoi( szPropertyValue ); } if ( strncmp( szPropertyName, "W_CELL2", INI_MAX_PROPERTY_NAME ) == 0 ) { iniValue( hIni, szPropertyValue ); nCell2 = atoi( szPropertyValue ); } iniPropertyNext( hIni ); } resize( nW, nH ); move( nX, nY ); if ( nCell1 && nCell2 ) { #ifdef QT_V4LAYOUT Q3ValueList list; #else QValueList list; #endif list.append( nCell1 ); list.append( nCell2 ); splSplitter->setSizes( list ); } } iniObjectNext( hIni ); } iniClose( hIni ); } else { QMessageBox::warning( this, "DataManager", "Could not open ~/.DataManager/DataManager.ini.\nYou may not have a home dir." ); } } void classDataManager::SaveState() { HINI hIni; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; char szINI[ODBC_FILENAME_MAX+1]; sprintf( szINI, "%s/%s", QDir::homeDirPath().ascii(), ".DataManager/DataManager.ini" ); if ( iniOpen( &hIni, szINI, "#;", '[', ']', '=', TRUE ) != INI_ERROR ) { // REMOVE OBJECT iniObjectSeekSure( hIni, "GEOMETRY" ); iniObjectDelete( hIni ); // ADD OBJECT iniObjectSeekSure( hIni, "GEOMETRY" ); sprintf( szPropertyValue, "%d", pos().x() ); iniPropertyInsert( hIni, "X", szPropertyValue ); sprintf( szPropertyValue, "%d", pos().y() ); iniPropertyInsert( hIni, "Y", szPropertyValue ); sprintf( szPropertyValue, "%d", size().width() ); iniPropertyInsert( hIni, "W", szPropertyValue ); sprintf( szPropertyValue, "%d", size().height() ); iniPropertyInsert( hIni, "H", szPropertyValue ); sprintf( szPropertyValue, "%d", splSplitter->sizes().first() ); iniPropertyInsert( hIni, "W_CELL1", szPropertyValue ); sprintf( szPropertyValue, "%d", splSplitter->sizes().last() ); iniPropertyInsert( hIni, "W_CELL2", szPropertyValue ); iniCommit( hIni ); iniClose( hIni ); } } unixODBC-2.2.14-p2/DataManagerII/classDataSource.cpp0100644000076400007640000001162510564052116020354 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classDataSource.h" #include "classLogin.h" #ifdef QT_V4LAYOUT #include "Qt/qpixmap.h" #else #include "qpixmap.h" #endif #include #include #include "computergreen.xpm" #include "computerred.xpm" #ifdef QT_V4LAYOUT classDataSource::classDataSource( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, classODBC::DSType dataSourceType, const char *pszDataSourceName ) #else classDataSource::classDataSource( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, classODBC::DSType dataSourceType, const char *pszDataSourceName ) #endif : classNode( pParent, pAfter, pCanvas ), env(), dbc( env(), "classDataSource" ), pConnectionFrame( NULL ) { listLibraries.setAutoDelete( TRUE ); char szResults[9600]; char szDescription[INI_MAX_PROPERTY_VALUE+1]; char szDriver[INI_MAX_PROPERTY_VALUE+1]; QString qsDescription; if ( pszDataSourceName != 0 ) qsDataSourceName = pszDataSourceName; setPixmap( 0, QPixmap( computerred_xpm ) ); setExpandable( TRUE ); szResults[0] = '\0'; szDescription[0] = '\0'; szDriver[0] = '\0'; if ( dataSourceType == classODBC::User ) SQLSetConfigMode( ODBC_USER_DSN ); else SQLSetConfigMode( ODBC_SYSTEM_DSN ); if ( SQLGetPrivateProfileString((char*) qsDataSourceName.ascii(), "Description", "", szResults, sizeof(szResults), 0 ) > 0 ) iniElement( szResults, '\0', '\0', 0, szDescription, INI_MAX_PROPERTY_VALUE ); if ( SQLGetPrivateProfileString((char*) qsDataSourceName.ascii(), "Driver", "", szResults, sizeof(szResults), 0 ) > 0 ) iniElement( szResults, '\0', '\0', 0, szDriver, INI_MAX_PROPERTY_VALUE ); SQLSetConfigMode( ODBC_BOTH_DSN ); qsDescription.sprintf( "%s [%s]", szDescription, szDriver ); setText( 0, qsDataSourceName ); setText( 1, "DATASOURCE " ); setText( 2, qsDescription ); } classDataSource::~classDataSource() { delete pConnectionFrame ; pConnectionFrame = NULL ; } void classDataSource::setOpen( bool bOpen ) { if ( bOpen && !dbc.active() ) // Always refresh { classLogin login( pCanvas, dbc, qsDataSourceName ); if ( login.exec() ) { setPixmap( 0, QPixmap( computergreen_xpm ) ); LoadLibraries(); if ( !pConnectionFrame ) pConnectionFrame = new classConnectionFrame( dbc(), qsDataSourceName, pCanvas ); pConnectionFrame->show(); } } else if ( !bOpen && dbc.active() ) { listLibraries.clear(); delete pConnectionFrame; pConnectionFrame = NULL; // disconnect dbc.disconnect() ; setPixmap( 0, QPixmap( computerred_xpm ) ); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } void classDataSource::LoadLibraries() { CursorScoper s(listView()) ; SQLRETURN nReturn ; SQLCHAR szLibraryName[MAX_COLUMN_WIDTH]; SQLLEN nIndicatorName; classTables *pLibrary = NULL; // CREATE A STATEMENT StatementScoper stmt( dbc() ) ; if ( !stmt() ) return ; // EXECUTE OUR SQL/CALL if (!SQL_SUCCEEDED(nReturn=SQLTables( stmt(), (SQLCHAR*)"", SQL_NTS, (SQLCHAR*)"%", SQL_NTS, (SQLCHAR*)"", SQL_NTS, 0, 0 ) ) ) return my_msgBox( "classDataSource", "SQLTables", nReturn, NULL, NULL, stmt() ) ; SQLBindCol( stmt(), SQLTables_TABLE_SCHEM, SQL_C_CHAR, szLibraryName, sizeof(szLibraryName), &nIndicatorName ); // GET RESULTS int first = 1; SQLCHAR last_name[ MAX_COLUMN_WIDTH ]; while ( SQL_SUCCEEDED(SQLFetch( stmt() ) ) ) { if ( nIndicatorName != SQL_NULL_DATA ) { // remove duplicate rows with driver such as Postgres if ( first ) { first = 0; strcpy((char *) last_name,(char *) szLibraryName ); } else { if ( strcmp((char *) last_name,(char *) szLibraryName ) == 0 ) { continue; } else { strcpy((char *) last_name,(char *) szLibraryName ); } } listLibraries.append( pLibrary = new classTables( this, pLibrary, pCanvas, dbc(), QString((char*)szLibraryName).stripWhiteSpace() ) ); } } } #ifdef QT_V4LAYOUT void classDataSource::selectionChanged( Q3ListViewItem *p ) #else void classDataSource::selectionChanged( QListViewItem *p ) #endif { for ( classTables *pLibrary = listLibraries.first(); pLibrary != 0; pLibrary = listLibraries.next() ) pLibrary->selectionChanged( p ); if ( dbc.active() ) { if ( p == this || p->parent() == this ) // Allow any library also pConnectionFrame->show(); else pConnectionFrame->hide(); } } unixODBC-2.2.14-p2/DataManagerII/classDataSources.cpp0100644000076400007640000000530210564052116020532 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classDataSources.h" #ifdef QT_V4LAYOUT #include "Qt/qpixmap.h" #else #include "qpixmap.h" #endif #include #include #include "datasourcesuser.xpm" #include "datasourcessystem.xpm" #ifdef QT_V4LAYOUT classDataSources::classDataSources( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, classODBC::DSType dataSourceType ) #else classDataSources::classDataSources( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, classODBC::DSType dataSourceType ) #endif : classNode( pParent, pAfter, pCanvas ), dataSourceType( dataSourceType ) { switch ( dataSourceType ) { case classODBC::System : setText( 0, "System Data Sources" ); setText( 1, "" ); setText( 2, "" ); setPixmap( 0, QPixmap( datasourcessystem_xpm ) ); break; default: setText( 0, "User Data Sources" ); setText( 1, "" ); setText( 2, "" ); setPixmap( 0, QPixmap( datasourcesuser_xpm ) ); } pCanvas = pCanvas; listDataSources.setAutoDelete( TRUE ); setExpandable( TRUE ); } void classDataSources::setOpen( bool bOpen ) { if ( bOpen && !childCount() ) // Load only once { char szResults[9600]; char szObjectName[INI_MAX_OBJECT_NAME+1]; memset( szResults, 0, sizeof(szResults) ); // Results buffer must be cleared classDataSource *pDataSource = NULL ; if ( dataSourceType == classODBC::User ) SQLSetConfigMode( ODBC_USER_DSN ); else SQLSetConfigMode( ODBC_SYSTEM_DSN ); if ( SQLGetPrivateProfileString( 0, 0, 0, szResults, sizeof(szResults), 0 ) > 0 ) { for ( int nElement = 0; iniElement( szResults, '\0', '\0', nElement, szObjectName, INI_MAX_OBJECT_NAME ) == INI_SUCCESS; nElement++ ) listDataSources.append( pDataSource = new classDataSource( this, pDataSource, pCanvas, dataSourceType, szObjectName ) ); } SQLSetConfigMode( ODBC_BOTH_DSN ); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } #ifdef QT_V4LAYOUT void classDataSources::selectionChanged( Q3ListViewItem *p ) #else void classDataSources::selectionChanged( QListViewItem *p ) #endif { classDataSource *pDataSource; for ( pDataSource = listDataSources.first(); pDataSource != 0; pDataSource = listDataSources.next() ) pDataSource->selectionChanged( p ); } unixODBC-2.2.14-p2/DataManagerII/classDriver.cpp0100644000076400007640000000264310564052116017555 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classDriver.h" #ifdef QT_V4LAYOUT #include #else #include #endif #include #include #include "driver.xpm" #ifdef QT_V4LAYOUT classDriver::classDriver( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, const char *pszDriverName ) #else classDriver::classDriver( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, const char *pszDriverName ) #endif : classNode( pParent, pAfter, pCanvas ) { char szResults[9600] ; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1] ; szResults[0] = 0 ; szPropertyValue[0] = 0 ; if ( pszDriverName != 0 ) qsDriverName = pszDriverName; setPixmap( 0, QPixmap( driver_xpm ) ); setExpandable( FALSE ); if ( SQLGetPrivateProfileString((char*) qsDriverName.ascii(), "Description", "", szResults, sizeof(szResults), "odbcinst" ) > 0 ) iniElement( szResults, 0, 0, 0, szPropertyValue, INI_MAX_PROPERTY_VALUE ); setText( 0, qsDriverName ); setText( 1, "DRIVER " ); setText( 2, szPropertyValue ); } unixODBC-2.2.14-p2/DataManagerII/classDrivers.cpp0100644000076400007640000000457110564052116017742 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classDrivers.h" #include "classODBC.h" #ifdef QT_V4LAYOUT #include #else #include #endif #include #include "drivers.xpm" #ifdef QT_V4LAYOUT classDrivers::classDrivers( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas ) #else classDrivers::classDrivers( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas ) #endif : classNode( pParent, pAfter, pCanvas ) { listDrivers.setAutoDelete( TRUE ); setText( 0, "Drivers" ); setText( 1, "" ); setText( 2, "" ); setPixmap( 0, QPixmap( drivers_xpm ) ); setExpandable( TRUE ); } void classDrivers::setOpen( bool bOpen ) { SQLRETURN nReturn; SQLCHAR szDriverDesc[1024]; classDriver *pDriver = NULL ; /******************************** * METHOD 1 - Using Driver Manager ********************************/ if ( bOpen && !childCount() ) // Load only once { EnvironmentScoper env; nReturn = SQLDrivers( env(), SQL_FETCH_FIRST, szDriverDesc, sizeof(szDriverDesc)-1, 0, 0, -1, 0 ); while ( nReturn == SQL_SUCCESS ) { listDrivers.append( pDriver = new classDriver( this, pDriver, pCanvas, (char*)szDriverDesc ) ); nReturn = SQLDrivers( env(), SQL_FETCH_NEXT, szDriverDesc, sizeof(szDriverDesc)-1, 0, 0, -1, 0 ); } } /******************************** * METHOD 2 - Using odbcinst ********************************/ /* int nElement; char szResults[9600]; char szObjectName[INI_MAX_OBJECT_NAME+1]; if ( bOpen && !childCount() ) { // ADD CHILD NODES; only classDataSources knows what they may be szResults[0] = '\0'; if ( SQLGetInstalledDrivers( szResults, 9600, 0 ) == TRUE ) { for ( nElement = 0; iniElement( szResults, '\0', '\0', nElement, szObjectName, INI_MAX_OBJECT_NAME ) == INI_SUCCESS; nElement++ ) listDrivers.append( new classDriver( this, pCanvas, szObjectName, hEnv ) ); } } */ #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } unixODBC-2.2.14-p2/DataManagerII/classISQL.cpp0100644000076400007640000004457610611162276017107 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classISQL.h" #include "classODBC.h" #include #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif char *szHelpSQL = \ "Use this area to type SQL statements for your query.\n" \ "For example: SELECT * FROM TABLE1\n" "You can cut/paste and save/load text in this area\n" ; char *szHelpSQLSlider = \ "Use this slider to quickly access recent SQL statements.\n" ; char *szHelpResults = \ "This area contains the output from your recent SQL query.\n" \ "You can cut/paste and save/load data in this area.\n" \ "NOTE: The max column size is 1024." ; char *szHelpStatus = \ "This area contains status messages.\n" ; classISQL::classISQL( SQLHDBC hDbc, QString qsDataSource, QWidget *parent, const char *name ) : QWidget( parent, name ), hDbc( hDbc ), qsDataSource( qsDataSource.stripWhiteSpace() ), nSQL( 1 ) { QVBoxLayout *layoutMain = new QVBoxLayout( this ); // SET FONT QFont qf( "Fixed", 12 ); qf.setFixedPitch( TRUE ); // TAB BAR pTabBar = new QTabBar( this ); pTabBar->setGeometry( 0, 0, 150, 20 ); #ifdef QT_V4LAYOUT pTabBar->addTab( QString( "SQL" ) ) ; pTabBar->addTab( QString( "Results" ) ) ; #else pTabBar->addTab( new QTab( "SQL" ) ) ; pTabBar->addTab( new QTab( "Results" ) ) ; #endif connect( pTabBar, SIGNAL(selected(int)), SLOT(ChangeTextType(int)) ); // SQL ENTRY GUI #ifdef QT_V4LAYOUT txtSQL = new Q3MultiLineEdit( this, "txtSQL" ); txtSQL->setFocusPolicy( Qt::StrongFocus ); txtSQL->setBackgroundMode( Qt::PaletteBase ); #else txtSQL = new QMultiLineEdit( this, "txtSQL" ); txtSQL->setFocusPolicy( QWidget::StrongFocus ); txtSQL->setBackgroundMode( QWidget::PaletteBase ); #endif txtSQL->insertLine( "" ); txtSQL->setReadOnly( FALSE ); txtSQL->setOverwriteMode( FALSE ); txtSQL->setFont( qf ); // SQL DATA RESULTS GUI #ifdef QT_V4LAYOUT txtResults = new Q3MultiLineEdit( this, "txtResults" ); txtResults->setFocusPolicy( Qt::StrongFocus ); txtResults->setBackgroundMode( Qt::PaletteBase ); #else txtResults = new QMultiLineEdit( this, "txtResults" ); txtResults->setFocusPolicy( QWidget::StrongFocus ); txtResults->setBackgroundMode( QWidget::PaletteBase ); #endif txtResults->insertLine( "" ); txtResults->setReadOnly( FALSE ); txtResults->setOverwriteMode( FALSE ); txtResults->setFont( qf ); txtResults->hide(); // QUICK ACCESS SLIDER #ifdef QT_V4LAYOUT pSliderRecentSQL = new QSlider( Qt::Horizontal, this ); #else pSliderRecentSQL = new QSlider( QSlider::Horizontal, this ); #endif pSliderRecentSQL->setTickmarks( QSlider::Left ); pSliderRecentSQL->setTickInterval( 1 ); pSliderRecentSQL->setLineStep( 1 ); pSliderRecentSQL->setPageStep( 1 ); pSliderRecentSQL->setMinValue( nSQL ); pSliderRecentSQL->setMaxValue( nSQL ); pSliderRecentSQL->setValue( nSQL ); connect( pSliderRecentSQL, SIGNAL(valueChanged(int)), SLOT(gotoHistoryItem(int)) ); listSQL.append( "" ); // STATUS LABEL QLabel *labelStatus = new QLabel( "STATUS", this ); #ifdef QT_V4LAYOUT labelStatus->setAlignment( Qt::AlignCenter ); #else labelStatus->setAlignment( AlignCenter ); #endif // STATUS LISTBOX #ifdef QT_V4LAYOUT listStatus = new Q3ListBox( this ); listStatus->setSelectionMode( Q3ListBox::NoSelection ); #else listStatus = new QListBox( this ); listStatus->setSelectionMode( QListBox::NoSelection ); #endif // HELP TIPS QWhatsThis::add( txtSQL , szHelpSQL ); QWhatsThis::add( pSliderRecentSQL , szHelpSQLSlider ); QWhatsThis::add( txtResults , szHelpResults ); QWhatsThis::add( labelStatus , szHelpStatus ); QWhatsThis::add( listStatus , szHelpStatus ); // LAYOUT GUI layoutMain->addWidget( pTabBar ); layoutMain->addWidget( txtSQL, 6 ); layoutMain->addWidget( txtResults, 6 ); layoutMain->addWidget( pSliderRecentSQL ); layoutMain->addWidget( labelStatus ); layoutMain->addWidget( listStatus, 2 ); // SETUP SIZE setMinimumSize( 50, 50 ); setMaximumSize( 32767, 32767 ); resize( parent->size() ); } void classISQL::addStatus( const QString &statusMsg ) { if ( listStatus->count() == 300 ) listStatus->removeItem( 0 ) ; listStatus->insertItem( statusMsg ) ; listStatus->setBottomItem( listStatus->count()-1 ) ; } void classISQL::ExecSQL(View view) { CursorScoper s(this) ; QString qsHorizSep; SQLLEN nRowsAffected; SWORD nColumns; SQLRETURN nReturn; txtResults->clear(); addStatus( QString().sprintf( "RUN: view=%s sql=%s", view == Text ? "Text" : view == TextDelimited ? "TextDelimited" : "HTML", txtSQL->text().simplifyWhiteSpace().ascii() ) ) ; // CREATE A STATEMENT StatementScoper stmt( hDbc ) ; if ( !stmt() ) return ; // PREPARE if (!SQL_SUCCEEDED(nReturn=SQLPrepare(stmt(), (SQLCHAR*)txtSQL->text().simplifyWhiteSpace().ascii(), SQL_NTS) ) ) return my_msgBox( "classISQL", "SQLPrepare", nReturn, NULL, NULL, stmt(), txtSQL->text() ) ; // EXECUTE if (!SQL_SUCCEEDED(nReturn=SQLExecute( stmt() ) ) ) return my_msgBox( "classISQL", "SQLExecute", nReturn, NULL, NULL, stmt(), txtSQL->text() ) ; // UPDATE HISTORY appendHistoryItem(); // GET NUMBER OF COLUMNS RETURNED if (!SQL_SUCCEEDED(SQLNumResultCols( stmt(), &nColumns ) ) ) nColumns = 0; txtResults->setAutoUpdate( FALSE ); switch ( view ) { case Text: { QString qsHorizSep; #ifdef QT_V4LAYOUT Q3MemArray colWidths(nColumns) ; #else QArray colWidths(nColumns) ; #endif // GET A RESULTS HEADER (column headers) getResultsHeader( stmt(), nColumns, qsHorizSep, colWidths ); // GET A RESULTS BODY (data) nRowsAffected = getResultsBody( stmt(), nColumns, qsHorizSep, colWidths ); } break ; case TextDelimited: { int nCol ; QString qsLine ; #ifdef QT_V4LAYOUT Q3MemArray colChar(nColumns) ; #else QArray colChar(nColumns) ; #endif // Get Column Names for ( nCol = 1; nCol <= nColumns; nCol++ ) { SQLCHAR szColumnName[MAX_COLUMN_WIDTH]; if (SQL_SUCCEEDED(SQLColAttribute( stmt(), nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), 0, 0 ) ) ) qsLine += QString("\"") + QString((const char *)szColumnName).stripWhiteSpace() + "\"," ; else qsLine += "\"ERR\"," ; // Determine if this column needs to have quotes around it SQLLEN nConciseType = 0 ; colChar[nCol-1] = false ; if (SQL_SUCCEEDED(SQLColAttribute( stmt(), nCol, SQL_DESC_CONCISE_TYPE, 0, 0, 0, &nConciseType ) ) ) { switch (nConciseType) { case SQL_CHAR: // =1 case SQL_VARCHAR: // =12 case SQL_LONGVARCHAR: // =-1 case SQL_WCHAR: // =-8 case SQL_WVARCHAR: // =-9 case SQL_WLONGVARCHAR: // =-10 colChar[nCol-1] = true ; break ; default: break; } } } txtResults->insertLine( qsLine ); // Get Data int nRow = 0; while ( SQL_SUCCEEDED(SQLFetch(stmt() ) ) ) { nRow++; qsLine = ""; // Process all columns for ( nCol = 1; nCol <= nColumns; nCol++ ) { char szData[MAX_COLUMN_WIDTH]; memset(szData, 0, sizeof(szData) ) ; // Handle broken drivers that don't properly null terminate SQLLEN nIndicator = 0; if (SQL_SUCCEEDED(SQLGetData( stmt(), nCol, SQL_C_CHAR, (SQLPOINTER)szData, sizeof(szData), &nIndicator ) ) ) qsLine += QString().sprintf("%s%s%s,", colChar[nCol-1] ? "\"" : "" , nIndicator != SQL_NULL_DATA ? QString(szData).stripWhiteSpace().ascii() : "", colChar[nCol-1] ? "\"" : "" ) ; else qsLine += QString("\"ERR\",") ; } txtResults->insertLine( qsLine ); } nRowsAffected = nRow ; } break ; case HTMLSource: { int nCol ; txtResults->insertLine( "" ) ; txtResults->insertLine( "" ) ; txtResults->insertLine( "" ) ; txtResults->insertLine( QString().sprintf("", txtSQL->text().ascii() ) ) ; // Get Column Names txtResults->insertLine( " " ); SQLCHAR szColumnName[MAX_COLUMN_WIDTH] ; for ( nCol = 1; nCol <= nColumns; nCol++ ) { if (SQL_SUCCEEDED(SQLColAttribute( stmt(), nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), 0, 0 ) ) ) txtResults->insertLine( QString().sprintf(" ", QString((const char *)szColumnName).stripWhiteSpace().ascii() ) ) ; else txtResults->insertLine( " " ) ; } txtResults->insertLine( " " ); // Get Data int nRow = 0; while ( SQL_SUCCEEDED(SQLFetch(stmt() ) ) ) { nRow++; txtResults->insertLine( " " ); // Process all columns for ( nCol = 1; nCol <= nColumns; nCol++ ) { char szData[MAX_COLUMN_WIDTH] ; SQLLEN nIndicator = 0; memset(szData, 0, sizeof(szData) ) ; // Handle broken drivers that don't properly null terminate if (SQL_SUCCEEDED(SQLGetData( stmt(), nCol, SQL_C_CHAR, (SQLPOINTER)szData, sizeof(szData), &nIndicator ) ) ) txtResults->insertLine( QString().sprintf(" ", nIndicator != SQL_NULL_DATA ? QString((const char *)szData).stripWhiteSpace().ascii() : "" ) ) ; else txtResults->insertLine( " " ) ; } txtResults->insertLine( " " ); } txtResults->insertLine( "
%s
%sERR
%sERR
" ) ; txtResults->insertLine( "" ) ; txtResults->insertLine( "" ) ; nRowsAffected = nRow ; } break ; } // UPDATE THE GUI pTabBar->setCurrentTab( 1 ); txtResults->show(); txtSQL->hide(); txtResults->setAutoUpdate( TRUE ); txtResults->repaint(); addStatus( QString().sprintf( "RUN: %d rows and %d columns affected", nRowsAffected, nColumns ) ) ; } #ifdef QT_V4LAYOUT void classISQL::getResultsHeader( SQLHSTMT hStmt, SWORD nColumns, QString &qsHorizSep, Q3MemArray &colWidths ) #else void classISQL::getResultsHeader( SQLHSTMT hStmt, SWORD nColumns, QString &qsHorizSep, QArray &colWidths ) #endif { QString qsColumnHeader; QString qsFill ; qsFill.fill('-', MAX_COLUMN_WIDTH); for ( int nCol = 1; nCol <= nColumns; nCol++ ) { SQLLEN nMaxLength; SQLCHAR szColumnName[MAX_COLUMN_WIDTH]; szColumnName[0] = 0; // Grab the column name and display size SQLColAttribute( hStmt, nCol, SQL_DESC_DISPLAY_SIZE, 0, 0, 0, &nMaxLength ); SQLColAttribute( hStmt, nCol, SQL_DESC_LABEL, szColumnName, sizeof(szColumnName), 0, 0 ) ; QString qsColumnName( QString((const char *)szColumnName).stripWhiteSpace() ) ; // Calc the column width int nWidth = max( nMaxLength, qsColumnName.length() ) ; nWidth = min( nWidth, MAX_COLUMN_WIDTH ); // Buld the formatted column qsHorizSep += QString().sprintf( "+%-*.*s-" , nWidth, nWidth, qsFill.ascii() ) ; qsColumnHeader += QString().sprintf( "| %-*.*s" , nWidth, nWidth, qsColumnName.ascii() ) ; colWidths[nCol-1] = nWidth ; } qsHorizSep += "+"; qsColumnHeader += "|"; txtResults->insertLine( qsHorizSep ); txtResults->insertLine( qsColumnHeader ); txtResults->insertLine( qsHorizSep ); } #ifdef QT_V4LAYOUT int classISQL::getResultsBody( SQLHSTMT hStmt, SWORD nColumns, const QString &qsHorizSep, const Q3MemArray &colWidths ) #else int classISQL::getResultsBody( SQLHSTMT hStmt, SWORD nColumns, const QString &qsHorizSep, const QArray &colWidths ) #endif { int nRow = 0; // PROCESS ALL ROWS while ( SQL_SUCCEEDED(SQLFetch(hStmt) ) ) { nRow++; QString qsLine; // PROCESS ALL COLUMNS for ( int nCol = 1; nCol <= nColumns; nCol++ ) { SQLLEN nIndicator; char szData[MAX_COLUMN_WIDTH]; szData[0] = 0; SQLRETURN nReturn = SQLGetData( hStmt, nCol, SQL_C_CHAR, (SQLPOINTER)szData, sizeof(szData), &nIndicator ); // Grab the column data if ( SQL_SUCCEEDED(nReturn) && nIndicator != SQL_NULL_DATA ) qsLine += QString().sprintf( "| %-*.*s", colWidths[nCol-1], colWidths[nCol-1], szData ); else qsLine += QString().sprintf( "| %-*.*s", colWidths[nCol-1], colWidths[nCol-1], " " ); } txtResults->insertLine( qsLine + "|" ); } txtResults->insertLine( qsHorizSep ); return nRow ; } void classISQL::ChangeTextType( int nTab ) { if ( nTab == 0 ) { pSliderRecentSQL->show(); txtSQL->show(); txtResults->hide(); } else { pSliderRecentSQL->hide(); txtSQL->hide(); txtResults->show(); } } void classISQL::gotoHistoryItem( int nValue ) { #ifdef QT_V4LAYOUT Q3ValueList::Iterator it; #else QValueList::Iterator it; #endif return; // SAVE ANY CHANGES it = listSQL.at( nSQL ); (*it) = txtSQL->text(); // MOVE nSQL = nValue; it = listSQL.at( nSQL ); txtSQL->setText( (*it) ); // Lets keep it simple for now, previous sql can be executed again but not edited, force // the user to copy and paste to last sql for editing. Remember; its important to maintain // a history of executed statements, unchanged, so that the user can audit self. QPalette oPalette = txtResults->palette(); if ( nSQL == pSliderRecentSQL->maxValue() ) { txtSQL->setReadOnly( false ); txtSQL->setPalette( oPalette ); } else { txtSQL->setReadOnly( true ); oPalette.setColor( QColorGroup::Text, txtResults->backgroundColor() ); oPalette.setColor( QColorGroup::Base, txtResults->foregroundColor() ); txtSQL->setPalette( oPalette ); } } void classISQL::appendHistoryItem() { #ifdef QT_V4LAYOUT Q3ValueList::Iterator it; #else QValueList::Iterator it; #endif return; // SAVE ANY CHANGES it = listSQL.at( nSQL ); (*it) = txtSQL->text(); // ADD AS LAST & MOVE TO LAST listSQL.append( txtSQL->text() ); pSliderRecentSQL->setMaxValue( pSliderRecentSQL->maxValue() + 1 ); pSliderRecentSQL->setValue( pSliderRecentSQL->maxValue() ); } void classISQL::NewSQL() { pSliderRecentSQL->setValue( pSliderRecentSQL->maxValue() ); txtSQL->clear(); qsSQLFileName = ""; pTabBar->setCurrentTab( 0 ) ; addStatus( "NEW: sql text cleared" ) ; } void classISQL::OpenSQL() { #ifdef QT_V4LAYOUT Q3MultiLineEdit *txt; #else QMultiLineEdit *txt; #endif #ifdef QT_V4LAYOUT if ( pTabBar->currentIndex() == 0 ) #else if ( pTabBar->currentTab() == 0 ) #endif { pSliderRecentSQL->setValue( pSliderRecentSQL->maxValue() ); txt = txtSQL; } else txt = txtResults; // LET USER PICK A FILE QString qsFile = QFileDialog::getOpenFileName(); if ( qsFile.isNull() ) return; // TRY TO LOAD THE FILE QFile hFile( qsFile ); if ( !hFile.open( IO_ReadOnly ) ) return my_msgBox( "classISQL", "QFile.open", hFile.status(), NULL, NULL, NULL, qsFile ) ; txt->setAutoUpdate( FALSE ); txt->clear(); QTextStream t( &hFile ); #ifdef QT_V4LAYOUT while ( !t.atEnd() ) #else while ( !t.eof() ) #endif txt->append( t.readLine() ) ; hFile.close(); txt->setAutoUpdate( TRUE ); txt->repaint(); #ifdef QT_V4LAYOUT if ( pTabBar->currentIndex() == 0 ) #else if ( pTabBar->currentTab() == 0 ) #endif qsSQLFileName = qsFile; else qsResultsFileName = qsFile; addStatus( QString().sprintf( "OPEN: file %s opened", qsFile.ascii() ) ) ; } void classISQL::SaveSQL() { #ifdef QT_V4LAYOUT Q3MultiLineEdit *txt = pTabBar->currentIndex() ? txtResults : txtSQL ; const QString &qsFileName = pTabBar->currentIndex() ? qsResultsFileName : qsSQLFileName ; #else QMultiLineEdit *txt = pTabBar->currentTab() ? txtResults : txtSQL ; const QString &qsFileName = pTabBar->currentTab() ? qsResultsFileName : qsSQLFileName ; #endif if ( qsFileName.isEmpty() ) return SaveAsSQL(); // TRY TO SAVE THE FILE QFile hFile( qsFileName ); if ( !hFile.open( IO_WriteOnly ) ) return my_msgBox( "classISQL", "QFile.open", hFile.status(), NULL, NULL, NULL, qsFileName ) ; hFile.writeBlock( txt->text(), txt->text().length() ); hFile.close(); addStatus( QString().sprintf( "SAVE: file %s saved", qsFileName.ascii() ) ) ; } void classISQL::SaveAsSQL() { #ifdef QT_V4LAYOUT Q3MultiLineEdit *txt = pTabBar->currentIndex() ? txtResults : txtSQL ; const QString &qsFileName = pTabBar->currentIndex() ? qsResultsFileName : qsSQLFileName ; #else QMultiLineEdit *txt = pTabBar->currentTab() ? txtResults : txtSQL ; const QString &qsFileName = pTabBar->currentTab() ? qsResultsFileName : qsSQLFileName ; #endif // LET USER PICK A FILE QString qsFile = QFileDialog::getSaveFileName( qsFileName ); if ( qsFile.isNull() ) return; // TRY TO SAVE THE FILE QFile hFile( qsFile ); if ( !hFile.open( IO_WriteOnly ) ) return my_msgBox( "classISQL", "QFile.open", hFile.status(), NULL, NULL, NULL, qsFile ) ; hFile.writeBlock( txt->text(), txt->text().length() ); hFile.close(); // SAVE THE NEW FILE NAME #ifdef QT_V4LAYOUT if ( pTabBar->currentIndex() == 0 ) #else if ( pTabBar->currentTab() == 0 ) #endif qsSQLFileName = qsFile; else qsResultsFileName = qsFile; addStatus( QString().sprintf( "SAVE SQL: file %s saved", qsFile.ascii() ) ) ; } unixODBC-2.2.14-p2/DataManagerII/classIndexs.cpp0100644000076400007640000000606410564052116017555 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classIndexs.h" #include "classODBC.h" // my_msgBox #ifdef QT_V4LAYOUT #include #else #include #endif #include "keysilver2.xpm" #ifdef QT_V4LAYOUT classIndexs::classIndexs( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *pszTable, const char *pszLibrary ) #else classIndexs::classIndexs( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *pszTable, const char *pszLibrary ) #endif : classNode( pParent, pAfter, pCanvas ), hDbc( hDbc ), qsTable( pszTable ), qsLibrary( pszLibrary ) { setText( 0, "Indexs" ); setText( 1, "" ); setText( 2, "" ); listIndexs.setAutoDelete( TRUE ); setPixmap( 0, QPixmap( keysilver2_xpm ) ); setExpandable( TRUE ); } void classIndexs::setOpen( bool bOpen ) { if ( bOpen ) // Always refresh LoadIndexs(); else listIndexs.clear() ; #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } void classIndexs::LoadIndexs() { CursorScoper s(listView()) ; SQLRETURN nReturn ; SQLCHAR szIndexName[MAX_COLUMN_WIDTH]; SQLCHAR szColumnName[MAX_COLUMN_WIDTH]; SQLCHAR szUnique[MAX_COLUMN_WIDTH]; int bUnique; SQLLEN nIndicator; QString qsDesc ; classColumn *pColumn = NULL ; // CREATE A STATEMENT StatementScoper stmt( hDbc ) ; if ( !stmt() ) return ; // EXECUTE OUR SQL/CALL if ( !SQL_SUCCEEDED(nReturn=SQLStatistics( stmt(), 0, 0, (SQLCHAR*)qsLibrary.ascii(), SQL_NTS, (SQLCHAR*)qsTable.ascii(), SQL_NTS, 0, 0 ) ) ) return my_msgBox( "classIndexs", "SQLStatistics", nReturn, NULL, NULL, stmt() ) ; // GET RESULTS while ( SQL_SUCCEEDED( SQLFetch( stmt() ) ) ) { nReturn = SQLGetData( stmt(), 9, SQL_C_CHAR, &szColumnName[0], sizeof(szColumnName), &nIndicator ); if ( !SQL_SUCCEEDED(nReturn) || nIndicator == SQL_NULL_DATA ) strcpy( (char *)szColumnName, "Unknown" ); nReturn = SQLGetData( stmt(), 4, SQL_C_LONG, &bUnique, sizeof(bUnique), &nIndicator ); if ( !SQL_SUCCEEDED(nReturn) || nIndicator == SQL_NULL_DATA || !bUnique ) strcpy( (char *)szUnique, "NON-UNIQUE" ); else strcpy( (char *)szUnique, "UNIQUE" ); nReturn = SQLGetData( stmt(), 6, SQL_C_CHAR, &szIndexName[0], sizeof(szIndexName), &nIndicator ); if ( !SQL_SUCCEEDED(nReturn) || nIndicator == SQL_NULL_DATA ) strcpy( (char *)szIndexName, "Unknown" ); qsDesc.sprintf("Column=%s %s", QString((char*)szColumnName).stripWhiteSpace().ascii(), (char*)szUnique ) ; listIndexs.append( pColumn = new classColumn( this, pColumn, pCanvas, hDbc, QString((char*)szIndexName).stripWhiteSpace(), "INDEX", qsDesc ) ); } } unixODBC-2.2.14-p2/DataManagerII/classLogin.cpp0100644000076400007640000000416610564052116017374 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classLogin.h" #ifdef QT_V4LAYOUT #include #include #else #include #include #endif #include #include #include #include "LinuxODBC.xpm" #include classLogin::classLogin( QWidget *pParent, ConnectionScoper &dbc, const QString &dataSource ) : QDialog( pParent, "classLogin", TRUE ) , dbc( dbc ) , qsDataSourceName( dataSource ) { QLabel *lblUID; QLabel *lblPWD; QPushButton *pbOk; QPushButton *pbCancel; setCaption( "Login - " + qsDataSourceName ); setIcon( QPixmap( LinuxODBC_xpm ) ); lblUID = new QLabel( "ID:", this ); lblPWD = new QLabel( "PWD:", this ); txtUID = new QLineEdit( "", this ); txtPWD = new QLineEdit( "", this ); pbOk = new QPushButton( "&Ok", this ); pbCancel = new QPushButton( "&Cancel", this ); lblUID->setGeometry( 5, 10, 30, 25 ); lblPWD->setGeometry( 5, 40, 30, 25 ); txtUID->setGeometry( 35, 10, 200, 25 ); txtPWD->setGeometry( 35, 40, 200, 25 ); pbOk->setGeometry( 35, 70, 100, 25 ); pbCancel->setGeometry( 135, 70, 100, 25 ); txtUID->setText( ((struct passwd *)getpwuid(getuid()))->pw_name ); txtPWD->setEchoMode( QLineEdit::Password ); connect( pbOk, SIGNAL(clicked()), this, SLOT(pbOk_Clicked()) ); connect( pbCancel, SIGNAL(clicked()), this, SLOT(pbCancel_Clicked()) ); pbOk->setDefault( TRUE ); txtPWD->setFocus(); } void classLogin::pbOk_Clicked() { if ( dbc.connect( qsDataSourceName, txtUID->text(), txtPWD->text() ) ) { // Clear security values txtUID->setText( "") ; txtPWD->setText( "") ; accept(); } } void classLogin::pbCancel_Clicked() { reject(); } unixODBC-2.2.14-p2/DataManagerII/classNode.cpp0100644000076400007640000000214710564052116017206 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classNode.h" #include "classCanvas.h" #ifdef QT_V4LAYOUT #include #else #include #endif #ifdef QT_V4LAYOUT classNode::classNode( Q3ListView *pParent, classCanvas *pCanvas ) : pCanvas( pCanvas) , Q3ListViewItem( pParent ) #else classNode::classNode( QListView *pParent, classCanvas *pCanvas ) : pCanvas( pCanvas) , QListViewItem( pParent ) #endif { } #ifdef QT_V4LAYOUT classNode::classNode( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas ) : pCanvas( pCanvas) , Q3ListViewItem( pParent, pAfter ) #else classNode::classNode( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas ) : pCanvas( pCanvas) , QListViewItem( pParent, pAfter ) #endif { } unixODBC-2.2.14-p2/DataManagerII/classODBC.cpp0100644000076400007640000000670610564052116017035 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classODBC.h" #ifdef QT_V4LAYOUT #include #else #include #endif #include #include #include "ODBC.xpm" // *********************************** // Common Utilities // *********************************** void my_msgBox( const QString & className, const QString & actionName, SQLRETURN rc, SQLHENV hEnv, SQLHDBC hDbc, SQLHSTMT hStmt, const QString & moreInfo, QMessageBox::Icon icon ) { QString caption = "DataManager - " + className + " - " + actionName ; QString text = actionName ; if ( rc ) text += " failed, rc=" + QString::number(rc) ; if ( hEnv || hDbc || hStmt ) { char szState[SQL_SQLSTATE_SIZE+1] ; szState[0] = 0 ; char szBuf[SQL_MAX_MESSAGE_LENGTH+1] ; szBuf[0] = 0 ; SQLINTEGER sqlCode = 0; SQLSMALLINT length = 0 ; int nRec = 0 ; while (SQL_SUCCEEDED(SQLGetDiagRec( hStmt ? SQL_HANDLE_STMT : hDbc ? SQL_HANDLE_DBC : SQL_HANDLE_ENV, hStmt ? hStmt : hDbc ? hDbc : hEnv, ++nRec, (SQLCHAR*)szState, &sqlCode, (SQLCHAR*)szBuf, sizeof(szBuf), &length) ) ) text += QString().sprintf("\n[%d] SQLSTATE:%s SQLCODE:%d %s", nRec, szState, sqlCode, szBuf) ; } if ( !moreInfo.isEmpty() ) text += "\n\nInfo:" + moreInfo ; QMessageBox(caption, text, icon, QMessageBox::Ok | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, QMessageBox::NoButton ).exec() ; } // *********************************** // *********************************** #ifdef QT_V4LAYOUT classODBC::classODBC( Q3ListView *pParent, classCanvas *pCanvas ) #else classODBC::classODBC( QListView *pParent, classCanvas *pCanvas ) #endif : classNode( pParent, pCanvas ) , pDrivers ( NULL ) , pDataSourcesUser( NULL ) , pDataSourcesSystem( NULL ) { setPixmap( 0, QPixmap(xpmODBC) ); setText( 0, "ODBC" ); setText( 1, "" ); setText( 2, "Open Database Connectivity" ); setExpandable( TRUE ); } void classODBC::setOpen( bool bOpen ) { if ( bOpen && !childCount() ) // Only create item once { // ADD CHILD NODES; only classODBC knows what they may be pDrivers = new classDrivers ( this, NULL, pCanvas ); pDataSourcesSystem = new classDataSources( this, pDrivers, pCanvas, System ); pDataSourcesUser = new classDataSources( this, pDataSourcesSystem, pCanvas, User ); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } #ifdef QT_V4LAYOUT void classODBC::selectionChanged( Q3ListViewItem *p ) #else void classODBC::selectionChanged( QListViewItem *p ) #endif { if ( pDataSourcesUser ) pDataSourcesUser->selectionChanged( p ); if ( pDataSourcesSystem ) pDataSourcesSystem->selectionChanged( p ); } unixODBC-2.2.14-p2/DataManagerII/classPrimaryKeys.cpp0100644000076400007640000000507310564052116020601 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classPrimaryKeys.h" #include "classODBC.h" #ifdef QT_V4LAYOUT #include #else #include #endif #include "keyred.xpm" #ifdef QT_V4LAYOUT classPrimaryKeys::classPrimaryKeys( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *pszTable, const char *pszLibrary ) #else classPrimaryKeys::classPrimaryKeys( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *pszTable, const char *pszLibrary ) #endif : classNode( pParent, pAfter, pCanvas ) , hDbc( hDbc ), qsTable( pszTable ), qsLibrary( pszLibrary ) { setText( 0, "PrimaryKeys" ); setText( 1, "" ); setText( 2, "" ); listColumns.setAutoDelete( TRUE ); setPixmap( 0, QPixmap( keyred_xpm ) ); setExpandable( TRUE ); } void classPrimaryKeys::setOpen( bool bOpen ) { if ( bOpen ) // Always refresh LoadColumns(); else listColumns.clear() ; #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } void classPrimaryKeys::LoadColumns() { CursorScoper s(listView()) ; SQLRETURN nReturn ; SQLCHAR szColumnName[MAX_COLUMN_WIDTH]; SQLCHAR szKeyName[MAX_COLUMN_WIDTH]; QString qsDesc ; classColumn *pColumn = NULL ; // CREATE A STATEMENT StatementScoper stmt( hDbc ) ; if ( !stmt() ) return ; // EXECUTE OUR SQL/CALL if (!SQL_SUCCEEDED(nReturn=SQLPrimaryKeys( stmt(), 0, 0, (SQLCHAR*)qsLibrary.ascii(), SQL_NTS, (SQLCHAR*)qsTable.ascii(), SQL_NTS ) ) ) return my_msgBox( "classPrimaryKeys", "SQLPrimaryKeys", nReturn, NULL, NULL, stmt() ) ; // GET RESULTS while (SQL_SUCCEEDED(SQLFetch( stmt() ) ) ) { if (!SQL_SUCCEEDED(SQLGetData( stmt(), 4, SQL_C_CHAR, &szColumnName[0], sizeof(szColumnName), 0 ) ) ) strcpy( (char *)szColumnName, "Unknown" ); if (!SQL_SUCCEEDED(SQLGetData( stmt(), 6, SQL_C_CHAR, &szKeyName[0], sizeof(szKeyName), 0 ) ) ) strcpy( (char *)szKeyName, "Unknown" ); qsDesc.sprintf("Desc=%s", QString((char*)szKeyName).stripWhiteSpace().ascii() ) ; listColumns.append( pColumn = new classColumn( this, pColumn, pCanvas, hDbc, QString((char*)szColumnName).stripWhiteSpace(), "KEY", qsDesc ) ); } } unixODBC-2.2.14-p2/DataManagerII/classSpecialColumns.cpp0100644000076400007640000000566710564052116021254 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classSpecialColumns.h" #include "classODBC.h" #ifdef QT_V4LAYOUT #include #else #include #endif #include "id.xpm" #ifdef QT_V4LAYOUT classSpecialColumns::classSpecialColumns( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *pszTable, const char *pszLibrary ) #else classSpecialColumns::classSpecialColumns( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *pszTable, const char *pszLibrary ) #endif : classNode( pParent, pAfter, pCanvas ) , hDbc( hDbc ), qsTable( pszTable ), qsLibrary( pszLibrary ) { setText( 0, "SpecialColumns" ); setText( 1, "" ); setText( 2, "" ); listColumns.setAutoDelete( TRUE ); setPixmap( 0, QPixmap( id_xpm ) ); setExpandable( TRUE ); } void classSpecialColumns::setOpen( bool bOpen ) { if ( bOpen ) // Always refresh LoadColumns(); else listColumns.clear() ; #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } void classSpecialColumns::LoadColumns() { CursorScoper s(listView()) ; SQLRETURN nReturn ; SQLCHAR szColumnName[MAX_COLUMN_WIDTH]; SQLCHAR szColumnType[MAX_COLUMN_WIDTH]; SQLCHAR szColumnSize[MAX_COLUMN_WIDTH]; SQLCHAR szRemarks [MAX_COLUMN_WIDTH]; QString qsDesc ; classColumn *pColumn = NULL ; // CREATE A STATEMENT StatementScoper stmt( hDbc ) ; if ( !stmt() ) return ; // EXECUTE OUR SQL/CALL if (!SQL_SUCCEEDED(nReturn=SQLSpecialColumns( stmt(), SQL_BEST_ROWID, 0, 0, (SQLCHAR*)qsLibrary.ascii(), SQL_NTS, (SQLCHAR*)qsTable.ascii(), SQL_NTS, SQL_SCOPE_SESSION, SQL_NULLABLE ) ) ) return my_msgBox( "classSpecialColumns", "SQLSpecialColumns", nReturn, NULL, NULL, stmt() ) ; // GET RESULTS while (SQL_SUCCEEDED(SQLFetch( stmt() ) ) ) { if (!SQL_SUCCEEDED(SQLGetData( stmt(), 2, SQL_C_CHAR, &szColumnName[0], sizeof(szColumnName), 0 ) ) ) strcpy( (char *)szColumnName, "Unknown" ); if (!SQL_SUCCEEDED(SQLGetData( stmt(), 4, SQL_C_CHAR, &szColumnType[0], sizeof(szColumnType), 0 ) ) ) strcpy( (char *)szColumnType, "Unknown" ); if (!SQL_SUCCEEDED(SQLGetData( stmt(), 5, SQL_C_CHAR, &szColumnSize[0], sizeof(szColumnSize), 0 ) ) ) strcpy( (char *)szColumnSize, "Unknown" ); qsDesc.sprintf("Len=%s", QString((char*)szColumnSize).stripWhiteSpace().ascii() ) ; listColumns.append( pColumn = new classColumn( this, pColumn, pCanvas, hDbc, QString((char*)szColumnName).stripWhiteSpace(), QString((char*)szColumnType).stripWhiteSpace(), qsDesc ) ) ; } } unixODBC-2.2.14-p2/DataManagerII/classTable.cpp0100644000076400007640000001125510564052116017350 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classTable.h" #include "classODBC.h" #ifdef QT_V4LAYOUT #include #else #include #endif #include "table.xpm" #ifdef QT_V4LAYOUT classTable::classTable( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *pszTable, const char *pszType, const char *pszDescription, const char* pszLibrary ) #else classTable::classTable( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *pszTable, const char *pszType, const char *pszDescription, const char* pszLibrary ) #endif : classNode( pParent, pAfter, pCanvas ), hDbc( hDbc ), qsTable( pszTable ), qsLibrary( pszLibrary ), pPrimaryKeys( NULL ), pIndexs( NULL ), pSpecialColumns( NULL ), pBrowse( NULL ) { setText( 0, pszTable ); setText( 1, pszType ); setText( 2, pszDescription ); listColumns.setAutoDelete( TRUE ); setPixmap( 0, QPixmap( table_xpm ) ); setExpandable( TRUE ); } classTable::~classTable() { Fini(); } void classTable::Fini() { listColumns.clear(); delete pPrimaryKeys; delete pIndexs; delete pSpecialColumns; delete pBrowse; pPrimaryKeys = NULL ; pIndexs = NULL ; pSpecialColumns = NULL ; pBrowse = NULL ; } void classTable::setOpen( bool bOpen ) { if ( bOpen ) // Always refresh { LoadColumns(); pSpecialColumns = new classSpecialColumns( this, NULL, pCanvas, hDbc, qsTable, qsLibrary ); pPrimaryKeys = new classPrimaryKeys( this, pSpecialColumns, pCanvas, hDbc, qsTable, qsLibrary ); pIndexs = new classIndexs( this, pPrimaryKeys, pCanvas, hDbc, qsTable, qsLibrary ); selectionChanged( this ) ; } else { Fini(); } #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } void classTable::LoadColumns() { CursorScoper s(listView()) ; SQLRETURN nReturn ; SQLCHAR szColumnName[MAX_COLUMN_WIDTH]; SQLCHAR szColumnType[MAX_COLUMN_WIDTH]; SQLCHAR szColumnSize[MAX_COLUMN_WIDTH]; SQLCHAR szRemarks [MAX_COLUMN_WIDTH]; classColumn *pColumn = NULL; QString qsDesc ; // CREATE A STATEMENT StatementScoper stmt( hDbc ) ; if ( !stmt() ) return ; // EXECUTE OUR SQL/CALL if (!SQL_SUCCEEDED(nReturn=SQLColumns( stmt(), 0, 0, (SQLCHAR*)qsLibrary.ascii(), SQL_NTS, (SQLCHAR*)qsTable.ascii(), SQL_NTS, 0, 0 ) ) ) return my_msgBox( "classTable", "SQLColumns", nReturn, NULL, NULL, stmt() ) ; // GET RESULTS while (SQL_SUCCEEDED(SQLFetch( stmt() ) ) ) { if (!SQL_SUCCEEDED(SQLGetData( stmt(), SQLColumns_COLUMN_NAME, SQL_C_CHAR, &szColumnName[0], sizeof(szColumnName), 0 ) ) ) strcpy( (char *)szColumnName, "Unknown" ); if (!SQL_SUCCEEDED(SQLGetData( stmt(), SQLColumns_TYPE_NAME, SQL_C_CHAR, &szColumnType[0], sizeof(szColumnType), 0 ) ) ) strcpy( (char *)szColumnType, "Unknown" ); if (!SQL_SUCCEEDED(SQLGetData( stmt(), SQLColumns_COLUMN_SIZE, SQL_C_CHAR, &szColumnSize[0], sizeof(szColumnSize), 0 ) ) ) strcpy( (char *)szColumnSize, "Unknown" ); if (!SQL_SUCCEEDED(SQLGetData( stmt(), SQLColumns_REMARKS, SQL_C_CHAR, &szRemarks[0], sizeof(szRemarks), 0 ) ) ) strcpy( (char *)szRemarks, "Unknown" ); qsDesc.sprintf("Len=%s Desc=%s", QString((char*)szColumnSize).stripWhiteSpace().ascii(), QString((char*)szRemarks).stripWhiteSpace().ascii() ) ; listColumns.append( pColumn = new classColumn( this, pColumn, pCanvas, hDbc, QString((char*)szColumnName).stripWhiteSpace(), QString((char*)szColumnType).stripWhiteSpace(), QString(qsDesc).stripWhiteSpace() ) ) ; } } #ifdef QT_V4LAYOUT void classTable::selectionChanged( Q3ListViewItem *p ) #else void classTable::selectionChanged( QListViewItem *p ) #endif { // Determine if the selected item is a child of this table using the y coord, is there a better way? #ifdef QT_V4LAYOUT Q3ListViewItem *n = nextSibling() ; #else QListViewItem *n = nextSibling() ; #endif int siblingPos = n ? n->itemPos() : 999999 ; int selectPos = p ? p->itemPos() : 0 ; int thisPos = itemPos() ; if ( thisPos <= selectPos && selectPos < siblingPos ) { if ( !pBrowse ) pBrowse = new classBrowseFrame( hDbc, qsTable, qsLibrary, pCanvas ); pBrowse->show(); } else { if ( pBrowse ) pBrowse->hide(); } } unixODBC-2.2.14-p2/DataManagerII/classTables.cpp0100644000076400007640000000572210564052116017535 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #include "classTables.h" #include "classODBC.h" #include "tables.xpm" #ifdef QT_V4LAYOUT classTables::classTables( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *szLibrary ) #else classTables::classTables( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *szLibrary ) #endif : classNode( pParent, pAfter, pCanvas ) , hDbc( hDbc ) , qsLibrary( szLibrary ) { setText( 0, qsLibrary.isEmpty() ? "Tables" : (const char*)qsLibrary ); setText( 1, "LIBRARY " ); setText( 2, "" ); listTables.setAutoDelete( TRUE ); setPixmap( 0, QPixmap( tables_xpm ) ); setExpandable( TRUE ); } void classTables::setOpen( bool bOpen ) { if ( bOpen ) LoadTables(); else listTables.clear(); #ifdef QT_V4LAYOUT Q3ListViewItem::setOpen( bOpen ); #else QListViewItem::setOpen( bOpen ); #endif } void classTables::LoadTables() { CursorScoper s(listView()) ; SQLRETURN nReturn ; SQLCHAR szTableName[MAX_COLUMN_WIDTH]; SQLCHAR szTableType[MAX_COLUMN_WIDTH]; SQLCHAR szTableRemarks[MAX_COLUMN_WIDTH]; SQLLEN nIndicatorName; SQLLEN nIndicatorType; SQLLEN nIndicatorRemarks; classTable *pTable = NULL; // CREATE A STATEMENT StatementScoper stmt( hDbc ) ; if ( !stmt() ) return ; // EXECUTE OUR SQL/CALL if (!SQL_SUCCEEDED(nReturn=SQLTables( stmt(), 0, 0, (SQLCHAR*)qsLibrary.ascii(), SQL_NTS, 0, 0, 0, 0 ) ) ) return my_msgBox( "classTables", "SQLTables", nReturn, NULL, NULL, stmt() ) ; SQLBindCol( stmt(), SQLTables_TABLE_NAME, SQL_C_CHAR, szTableName, sizeof(szTableName), &nIndicatorName ); SQLBindCol( stmt(), SQLTables_TABLE_TYPE, SQL_C_CHAR, szTableType, sizeof(szTableType), &nIndicatorType ); SQLBindCol( stmt(), SQLTables_REMARKS, SQL_C_CHAR, szTableRemarks, sizeof(szTableRemarks), &nIndicatorRemarks ); // GET RESULTS while ( SQL_SUCCEEDED(SQLFetch( stmt() ) ) ) { if ( nIndicatorName == SQL_NULL_DATA ) listTables.append( pTable = new classTable( this, pTable, pCanvas, hDbc, "Unknown" ) ); else listTables.append( pTable = new classTable( this, pTable, pCanvas, hDbc, QString((char*)szTableName).stripWhiteSpace(), QString((char*)szTableType).stripWhiteSpace(), QString((char*)szTableRemarks).stripWhiteSpace(), qsLibrary ) ); } } #ifdef QT_V4LAYOUT void classTables::selectionChanged( Q3ListViewItem *p ) #else void classTables::selectionChanged( QListViewItem *p ) #endif { for ( classTable *pTable = listTables.first(); pTable != 0; pTable = listTables.next() ) pTable->selectionChanged( p ); } unixODBC-2.2.14-p2/DataManagerII/main.cpp0100644000076400007640000000206510564052116016216 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifdef QT_V4LAYOUT #include #include #else #include #include #endif #ifdef QT_V4LAYOUT #include "classDataManager4.h" #else #include "classDataManager.h" #endif int main( int argc, char **argv ) { QApplication oApplication( argc, argv ); // create application object classDataManager oMain; QDir::home().mkdir( ".DataManager" ); oApplication.connect( &oApplication, SIGNAL(lastWindowClosed()), &oApplication, SLOT(quit()) ); oMain.show(); // show widget return oApplication.exec(); // run event loop } unixODBC-2.2.14-p2/DataManagerII/classCanvas.h0100644000076400007640000000252110564052115017174 0ustar nicknick/************************************************** * classCanvas ************************************************** * * PURPOSE * * This is *THE* parent canvas for *ALL* property widgets. I * use a QLabel instead of a QVBoxLayout because I want to * stack many custom widgets on this (and hide/show them) and * I am concerned that QVBoxLayout will have a problem with this. * I did not even try QVBoxLayout because, in anycase, we need * a real widget (not a list item) to allow node processing * to create popup dialogs, such as the login (they need a * widget based parent). * *************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classCanvas_included #define classCanvas_included #ifdef QT_V4LAYOUT #include #include #include #else #include #include #endif class classCanvas : public QLabel { Q_OBJECT public: classCanvas( QWidget *pParent = 0, const char *pszName = 0 ); ~classCanvas() {} void resizeEvent( QResizeEvent * ); signals: void changedSize( int nW, int nH ); }; #endif unixODBC-2.2.14-p2/DataManagerII/classColumn.h0100644000076400007640000000204410564052116017217 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classColumn_included #define classColumn_included #include "classNode.h" #include "classCanvas.h" #ifdef QT_V4LAYOUT #include #else #include #endif #include class classColumn: public classNode { public: #ifdef QT_V4LAYOUT classColumn( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszName = 0, const char *pszType = 0, const char *pszDesc = 0 ); #else classColumn( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszName = 0, const char *pszType = 0, const char *pszDesc = 0 ); #endif ~classColumn() {} }; #endif unixODBC-2.2.14-p2/DataManagerII/classDataManager.h0100644000076400007640000000213110564052116020123 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDataManager_included #define classDataManager_included #include "classCanvas.h" #include "classODBC.h" #include #include #include class classDataManager : public QWidget { Q_OBJECT public: classDataManager( QWidget *pParent = 0, const char *pszName = 0 ); ~classDataManager(); void resizeEvent( QResizeEvent * ); public slots: void ItemMenu(QListViewItem*,const QPoint&,int); void ItemChanged(QListViewItem*); protected slots: void Exit(); void About(); protected: QSplitter *splSplitter; QListView *lvwBrowser; classCanvas *pCanvas; classODBC *pODBC; private: void LoadState(); void SaveState(); }; #endif unixODBC-2.2.14-p2/DataManagerII/classDataManager4.h0100644000076400007640000000214610564052116020215 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDataManager_included #define classDataManager_included #include "classCanvas.h" #include "classODBC.h" #include #include #include class classDataManager : public QWidget { Q_OBJECT public: classDataManager( QWidget *pParent = 0, const char *pszName = 0 ); ~classDataManager(); void resizeEvent( QResizeEvent * ); public slots: void ItemMenu( Q3ListViewItem*,const QPoint&,int); void ItemChanged(Q3ListViewItem*); protected slots: void Exit(); void About(); protected: QSplitter *splSplitter; Q3ListView *lvwBrowser; classCanvas *pCanvas; classODBC *pODBC; private: void LoadState(); void SaveState(); }; #endif unixODBC-2.2.14-p2/DataManagerII/classDataSource.h0100644000076400007640000000320110564052116020010 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDataSource_included #define classDataSource_included #include "classCanvas.h" #include "classTables.h" #include "classConnectionFrame.h" #include "classODBC.h" #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include class classDataSource: public classNode { public: #ifdef QT_V4LAYOUT classDataSource( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, classODBC::DSType dataSourceType, const char *pszDataSourceName = 0 ); #else classDataSource( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, classODBC::DSType dataSourceType, const char *pszDataSourceName = 0 ); #endif ~classDataSource(); void setOpen( bool bOpen ); #ifdef QT_V4LAYOUT void selectionChanged ( Q3ListViewItem * ); #else void selectionChanged ( QListViewItem * ); #endif void LoadLibraries(); private: #ifdef QT_V4LAYOUT Q3PtrList listLibraries; #else QList listLibraries; #endif classConnectionFrame * pConnectionFrame; QString qsDataSourceName; EnvironmentScoper env; ConnectionScoper dbc; }; #endif unixODBC-2.2.14-p2/DataManagerII/classDataSources.h0100644000076400007640000000261410564052116020202 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDataSources_included #define classDataSources_included #include "classNode.h" #include "classCanvas.h" #include "classDataSource.h" #include "classODBC.h" #ifdef QT_V4LAYOUT #include #include #else #include #include #endif #include class classDataSources: public classNode { public: #ifdef QT_V4LAYOUT classDataSources( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, classODBC::DSType dataSourceType ); #else classDataSources( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, classODBC::DSType dataSourceType ); #endif ~classDataSources() {} void setOpen( bool bOpen ); #ifdef QT_V4LAYOUT void selectionChanged( Q3ListViewItem * ); #else void selectionChanged( QListViewItem * ); #endif private: #ifdef QT_V4LAYOUT Q3PtrList listDataSources; #else QList listDataSources; #endif classODBC::DSType dataSourceType; void Init(); }; #endif unixODBC-2.2.14-p2/DataManagerII/classDriver.h0100644000076400007640000000200210564052116017207 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDriver_included #define classDriver_included #include "classCanvas.h" #include "classNode.h" #ifdef QT_V4LAYOUT #include #include #else #include #include #endif #include class classDriver: public classNode { public: #ifdef QT_V4LAYOUT classDriver( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, const char *pszDriverName = 0 ); #else classDriver( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, const char *pszDriverName = 0 ); #endif ~classDriver() {} private: QString qsDriverName; }; #endif unixODBC-2.2.14-p2/DataManagerII/classDrivers.h0100644000076400007640000000206710564052116017405 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classDrivers_included #define classDrivers_included #include "classCanvas.h" #include "classDriver.h" #ifdef QT_V4LAYOUT #include #include #else #include #include #endif #include class classDrivers: public classNode { public: #ifdef QT_V4LAYOUT classDrivers( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas ); #else classDrivers( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas ); #endif ~classDrivers() {} void setOpen( bool ); private: #ifdef QT_V4LAYOUT Q3PtrList listDrivers; #else QList listDrivers; #endif }; #endif unixODBC-2.2.14-p2/DataManagerII/classConnectionFrame.h0100644000076400007640000000267010564052116021041 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classConnectionFrame_included #define classConnectionFrame_included #include "classISQL.h" #ifdef QT_V4LAYOUT #include #include #include #include #else #include #include #include #endif #include #ifdef QT_V4LAYOUT #define LView Q3ListView #define LViewItem Q3ListViewItem #define MWindow Q3MainWindow #define PMenu Q3PopupMenu #else #define LView QListView #define LViewItem QListViewItem #define MWindow QMainWindow #define PMenu QPopupMenu #endif class classConnectionFrame : public MWindow { Q_OBJECT public: classConnectionFrame( SQLHDBC hDbc, QString qsDataSource, QWidget* parent = 0, const char* name = 0 ); ~classConnectionFrame() {} void resizeEvent( QResizeEvent * ); public slots: void Exec(); void setViewHTMLSource(); void setViewText(); void setViewTextDelimited(); void Resize(int,int); protected: PMenu * pView; classISQL * isql; classISQL::View view; }; #endif unixODBC-2.2.14-p2/DataManagerII/classBrowseFrame.h0100644000076400007640000000265110564052115020201 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classBrowseFrame_included #define classBrowseFrame_included #include "classBrowse.h" #ifdef QT_V4LAYOUT #include #include #include #include #include #else #include #include #include #include #endif #include #ifdef QT_V4LAYOUT #define LView Q3ListView #define LViewItem Q3ListViewItem #define MWindow Q3MainWindow #define PMenu Q3PopupMenu #else #define LView QListView #define LViewItem QListViewItem #define MWindow QMainWindow #define PMenu QPopupMenu #endif class classBrowseFrame : public MWindow { Q_OBJECT public: classBrowseFrame( SQLHDBC hDbc, const QString &qsTable, const QString &qsLibrary, QWidget* parent = 0, const char* name = 0 ); ~classBrowseFrame() {} void resizeEvent( QResizeEvent * ); public slots: void autoRefresh(); void Resize(int,int); protected: classBrowse *browse; PMenu *pResults; int nAutoRefresh; }; #endif unixODBC-2.2.14-p2/DataManagerII/classBrowse.h0100644000076400007640000000702010564052115017221 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 30.NOV.00 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classBrowse_included #define classBrowse_included #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #endif #include // Typesdefs #ifdef QT_V4LAYOUT typedef Q3ValueList ListRows ; #else typedef QValueList ListRows ; #endif // QTable subclass that will sort columns with whole row support #ifdef QT_V4LAYOUT class myQTable : public Q3Table { public: myQTable( int r, int c, QWidget * w = 0, const char * n = 0 ) : Q3Table( r, c, w, n ) {} ; void sortColumn( int c, bool s, bool w) { Q3Table::sortColumn( c, s, TRUE ) ; } }; #else class myQTable : public QTable { public: myQTable( int r, int c, QWidget * w = 0, const char * n = 0 ) : QTable( r, c, w, n ) {} ; void sortColumn( int c, bool s, bool w) { QTable::sortColumn( c, s, TRUE ) ; } }; #endif #define QUERY_ROW_EXPRESSION 0 #define QUERY_ROW_SHOW 1 #define QUERY_ROW_SORT 2 class classBrowse : public QWidget { Q_OBJECT public: classBrowse( SQLHDBC hDbc, const QString &qsTable, const QString &qsLibrary, QWidget* parent = 0, const char* name = 0 ); ~classBrowse() {}; QString qsDataFileName; QString qsSQLFileName; void resizeEvent( QResizeEvent * ); public slots: void Clear(); // CLEAR QUERY AND DATA bool Save(); // SAVE DATA bool SaveAs(); // SAVE DATA AS bool SaveSQL(); // SAVE QUERY void Exec(); // RUN QUERY void SelectAllColumns(); void UnSelectAllColumns(); void UnSortAllColumns(); void UnExprAllColumns(); void DeleteRows(); void InsertRows(); int AddRow(); int CopyRow(); void AutoRefresh( bool ); void WriteHTML( QFile *hFile, bool bPage ); protected: #ifdef QT_V4LAYOUT Q3Table *tableQuery; Q3Table *tableData; Q3ListBox *listStatus; #else QTable *tableQuery; QTable *tableData; QListBox *listStatus; #endif QLabel *labelFilter; QLabel *labelResults; SQLHDBC hDbc; QString qsLibrary; QString qsTable; bool bAutoRefresh; void InitQuery(); void ExecHeader( SQLHSTMT hStmt, SWORD nColumns ); int ExecBody( SQLHSTMT hStmt, SWORD nColumns ); bool CreateSQL(QString & qsSQL ); #ifdef QT_V4LAYOUT void ClearCells( Q3Table *table ); #else void ClearCells( QTable *table ); #endif void ChangeAllColumns( int row, const char * text ); int GetSelectedRows( QString &qsRowsSelected, ListRows &listRows ) ; bool OkWithUser( const QString &shortDesc, const QString &qsQuestion ) ; int RowAction( const QString &shortDesc, const QString &sql, const ListRows &listRows, SQLRETURN &nReturn ) ; bool CheckRowsAffected(const QString &shortDesc, const ListRows &listRows ) ; void addStatus( const QString &statusMsg ) ; QString GetColumnQuote( SQLHDBC hDbc ); }; #endif unixODBC-2.2.14-p2/DataManagerII/classISQL.h0100644000076400007640000000560610564052116016541 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classISQL_included #define classISQL_included #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #if (QT_VERSION>=300) #else #include #endif #include #include #include #include #include #include #include #include #include #endif #include #ifndef max #define max( a, b ) (((a) > (b)) ? (a) : (b)) #endif #ifndef min #define min( a, b ) (((a) > (b)) ? (b) : (a)) #endif class classISQL : public QWidget { Q_OBJECT public: classISQL( SQLHDBC hDbc, QString qsDataSource, QWidget* parent = 0, const char* name = 0 ); ~classISQL() {} enum View { Text=1, TextDelimited=2, HTMLSource=3 } ; public slots: void ExecSQL( View ); void NewSQL(); void OpenSQL(); void SaveSQL(); void SaveAsSQL(); protected slots: void ChangeTextType( int nTab ); void gotoHistoryItem( int nValue ); protected: QTabBar * pTabBar; QSlider * pSliderRecentSQL; #ifdef QT_V4LAYOUT Q3MultiLineEdit * txtSQL; Q3MultiLineEdit * txtResults; Q3ListBox * listStatus; Q3ValueList listSQL; #else QMultiLineEdit * txtSQL; QMultiLineEdit * txtResults; QListBox * listStatus; QValueList listSQL; #endif SQLHDBC hDbc; QString qsDataSource; QString qsResultsFileName; QString qsSQLFileName; int nSQL; private: #ifdef QT_V4LAYOUT void getResultsHeader( SQLHSTMT hStmt, SWORD nColumns, QString &qsHorizSep, Q3MemArray &colWidths ); int getResultsBody( SQLHSTMT hStmt, SWORD nColumns, const QString &qsHorizSep, const Q3MemArray &colWidths ); #else void getResultsHeader( SQLHSTMT hStmt, SWORD nColumns, QString &qsHorizSep, QArray &colWidths ); int getResultsBody( SQLHSTMT hStmt, SWORD nColumns, const QString &qsHorizSep, const QArray &colWidths ); #endif void appendHistoryItem(); void addStatus( const QString &statusMsg ) ; }; #endif unixODBC-2.2.14-p2/DataManagerII/classIndex.h0100644000076400007640000000414210564052116017032 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classIndex_included #define classIndex_included #ifdef QT_V4LAYOUT #include #include #include #include #else #include #include #include #include #endif #include #include "classNode.h" #include "classColumn.h" class classIndex: public classNode { public: #ifdef QT_V4LAYOUT classIndex( Q3ListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); classIndex( Q3ListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); classIndex( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); #else classIndex( QListView *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); classIndex( QListViewItem *pParent, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); classIndex( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc = 0, char *pszTable = 0, char *pszIndex = 0, char *pszDesc = 0 ); #endif ~classIndex(); void setOpen( bool ); void setup(); #ifdef QT_V4LAYOUT void selectionChanged( Q3ListViewItem * ); #else void selectionChanged( QListViewItem * ); #endif private: SQLHDBC hDbc; QString qsTable; QString qsIndex; #ifdef QT_V4LAYOUT Q3PtrList listColumns; #else QList listColumns; #endif void Init( SQLHDBC hDbc, char *pszTable, char *pszIndex, char *pszDesc ); void LoadColumns(); }; #endif unixODBC-2.2.14-p2/DataManagerII/classIndexs.h0100644000076400007640000000250410564052116017215 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classIndexs_included #define classIndexs_included #include "classCanvas.h" #include "classIndex.h" #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include class classIndexs: public classNode { public: #ifdef QT_V4LAYOUT classIndexs( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszTable = 0, const char *pszLibrary = 0 ); #else classIndexs( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszTable = 0, const char *pszLibrary = 0 ); #endif ~classIndexs() {} void setOpen( bool ); private: #ifdef QT_V4LAYOUT Q3PtrList listIndexs; #else QList listIndexs; #endif SQLHDBC hDbc; QString qsLibrary; QString qsTable; void LoadIndexs(); }; #endif unixODBC-2.2.14-p2/DataManagerII/classLogin.h0100644000076400007640000000201410564052116017027 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classLogin_included #define classLogin_included class ConnectionScoper ; #ifdef QT_V4LAYOUT #include #include #include #include #else #include #include #include #include #endif #include class classLogin: public QDialog { Q_OBJECT public: classLogin( QWidget *pParent, ConnectionScoper &dbc, const QString &dataSource ); ~classLogin() {} private slots: void pbOk_Clicked(); void pbCancel_Clicked(); private: ConnectionScoper &dbc; QString qsDataSourceName; QLineEdit *txtUID; QLineEdit *txtPWD; }; #endif unixODBC-2.2.14-p2/DataManagerII/classNode.h0100644000076400007640000000217710564052116016656 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classNode_included #define classNode_included #include "classCanvas.h" #ifdef QT_V4LAYOUT #include #else #include #endif #ifdef QT_V4LAYOUT class classNode: public Q3ListViewItem { public: classNode( Q3ListView *pParent, classCanvas *pCanvas ); classNode( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas ); ~classNode() {} protected: classCanvas *pCanvas; }; #else class classNode: public QListViewItem { public: classNode( QListView *pParent, classCanvas *pCanvas ); classNode( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas ); ~classNode() {} protected: classCanvas *pCanvas; }; #endif #endif unixODBC-2.2.14-p2/DataManagerII/classODBC.h0100644000076400007640000001202610564052116016472 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classODBC_included #define classODBC_included #include "classNode.h" #include "classCanvas.h" class classDrivers ; class classDataSources ; #ifdef QT_V4LAYOUT #include #include #include #include #include #else #include #include #include #include #include #endif #include #define MAX_COLUMN_WIDTH 1024 // ****************************** // Common Utility Classes // ****************************** // Use to display ODBC error messages void my_msgBox( const QString & className, const QString & actionName, SQLRETURN rc = 0, SQLHENV hEnv = NULL, SQLHDBC hDbc = NULL, SQLHSTMT hStmt = NULL, const QString & moreInfo = "", QMessageBox::Icon icon = QMessageBox::Critical ) ; // Cursor scoper class class CursorScoper: public QWidget { public: CursorScoper( QWidget * w ) : w_(w) #ifdef QT_V4LAYOUT { w_->setCursor(Qt::waitCursor) ; } #else { w_->setCursor(waitCursor) ; } #endif ~CursorScoper() { w_->unsetCursor() ; } private: QWidget *w_ ; } ; // SQL ENV scoper class class EnvironmentScoper { public: EnvironmentScoper( const QString & className = "" ) : hEnv_( NULL ) , className_( className ) { SQLRETURN nReturn ; if (!SQL_SUCCEEDED(nReturn=SQLAllocEnv( &hEnv_ ) ) ) my_msgBox( className_, "SQLAllocEnv", nReturn ) ; } HENV operator()() const { return hEnv_ ; } ~EnvironmentScoper() { SQLRETURN nReturn ; if (hEnv_) if (!SQL_SUCCEEDED(nReturn=SQLFreeEnv( hEnv_ ) ) ) my_msgBox( className_, "SQLFreeEnv", nReturn ) ; hEnv_ = NULL ; } private: HENV hEnv_ ; QString className_ ; } ; // SQL DBC scoper class class ConnectionScoper { public: ConnectionScoper( HENV hEnv, const QString & className = "" ) : hDbc_( NULL ) , className_( className ), active_( false ) { SQLRETURN nReturn ; if (!SQL_SUCCEEDED(nReturn=SQLAllocConnect( hEnv, &hDbc_ ) ) ) my_msgBox( className_, "SQLAllocConnect", nReturn, hEnv ) ; } HDBC operator()() const { return hDbc_ ; } bool connect( const QString & dataSourceName, const QString & uid, const QString & pwd ) { SQLRETURN nReturn ; if (!active_ && !SQL_SUCCEEDED(nReturn=SQLConnect( hDbc_, (SQLCHAR*)dataSourceName.ascii(), SQL_NTS, (SQLCHAR*)uid.ascii(), SQL_NTS, (SQLCHAR*)pwd.ascii(), SQL_NTS ) ) ) my_msgBox( className_, "SQLConnect", nReturn, NULL, hDbc_, NULL, dataSourceName ) ; else active_ = true ; return active_ ; } void disconnect() { SQLRETURN nReturn ; if (active_ && !SQL_SUCCEEDED(nReturn=SQLDisconnect( hDbc_ ) ) ) my_msgBox( className_, "SQLDisconnect", nReturn, NULL, hDbc_ ) ; active_ = false ; } bool active() const { return active_ ; } ~ConnectionScoper() { SQLRETURN nReturn ; if (hDbc_) { if (active_ && !SQL_SUCCEEDED(nReturn=SQLDisconnect( hDbc_ ) ) ) my_msgBox( className_, "SQLDisconnect", nReturn, NULL, hDbc_ ) ; if (!SQL_SUCCEEDED(nReturn=SQLFreeConnect( hDbc_ ) ) ) my_msgBox( className_, "SQLFreeConnect", nReturn, NULL, hDbc_ ) ; hDbc_ = NULL ; active_ = false ; } } private: HDBC hDbc_ ; bool active_ ; QString className_ ; } ; // Statement scoper class class StatementScoper { public: StatementScoper( HDBC hDbc, const QString & className = "" ) : hStmt_( NULL ) , className_( className ) { SQLRETURN nReturn ; if (!SQL_SUCCEEDED(nReturn=SQLAllocStmt( hDbc, &hStmt_ ) ) ) my_msgBox( className_, "SQLAllocStmt", nReturn, NULL, hDbc ) ; } HSTMT operator()() const { return hStmt_ ; } ~StatementScoper() { SQLRETURN nReturn ; if (hStmt_) if (!SQL_SUCCEEDED(nReturn=SQLFreeStmt( hStmt_, SQL_DROP ) ) ) my_msgBox( className_, "SQLFreeStmt", nReturn, NULL, NULL, hStmt_ ) ; hStmt_ = NULL ; } private: HSTMT hStmt_ ; QString className_ ; } ; // ****************************** // ****************************** class classODBC: public classNode { public: enum DSType { User, System }; #ifdef QT_V4LAYOUT classODBC( Q3ListView *pParent, classCanvas *pCanvas ); #else classODBC( QListView *pParent, classCanvas *pCanvas ); #endif ~classODBC() {} void setOpen( bool ); #ifdef QT_V4LAYOUT void selectionChanged ( Q3ListViewItem * ); #else void selectionChanged ( QListViewItem * ); #endif private: classDrivers *pDrivers; classDataSources *pDataSourcesUser; classDataSources *pDataSourcesSystem; }; #endif unixODBC-2.2.14-p2/DataManagerII/classPrimaryKeys.h0100644000076400007640000000255310564052116020246 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classPrimaryKeys_included #define classPrimaryKeys_included #include "classCanvas.h" #include "classColumn.h" #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include class classPrimaryKeys: public classNode { public: #ifdef QT_V4LAYOUT classPrimaryKeys( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszTable = 0, const char *pszLibrary = 0 ); #else classPrimaryKeys( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszTable = 0, const char *pszLibrary = 0 ); #endif ~classPrimaryKeys() {} void setOpen( bool ); private: #ifdef QT_V4LAYOUT Q3PtrList listColumns; #else QList listColumns; #endif SQLHDBC hDbc; QString qsLibrary; QString qsTable; void LoadColumns(); }; #endif unixODBC-2.2.14-p2/DataManagerII/classSpecialColumns.h0100644000076400007640000000257510564052116020714 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classSpecialColumns_included #define classSpecialColumns_included #include "classCanvas.h" #include "classColumn.h" #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include class classSpecialColumns: public classNode { public: #ifdef QT_V4LAYOUT classSpecialColumns( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszTable = 0, const char *pszLibrary = 0 ); #else classSpecialColumns( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszTable = 0, const char *pszLibrary = 0 ); #endif ~classSpecialColumns() {} void setOpen( bool ); private: #ifdef QT_V4LAYOUT Q3PtrList listColumns; #else QList listColumns; #endif SQLHDBC hDbc; QString qsLibrary; QString qsTable; void LoadColumns(); }; #endif unixODBC-2.2.14-p2/DataManagerII/classTable.h0100644000076400007640000000350710564052116017016 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classTable_included #define classTable_included #include "classCanvas.h" #include "classColumn.h" #include "classPrimaryKeys.h" #include "classSpecialColumns.h" #include "classIndexs.h" #include "classBrowseFrame.h" #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include class classTable: public classNode { public: #ifdef QT_V4LAYOUT classTable( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszName, const char *pszType = 0, const char *pszDescription = 0, const char *pszLibraryName = 0 ); #else classTable( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char *pszName, const char *pszType = 0, const char *pszDescription = 0, const char *pszLibraryName = 0 ); #endif ~classTable(); void setOpen( bool bOpen ); #ifdef QT_V4LAYOUT void selectionChanged( Q3ListViewItem * ); #else void selectionChanged( QListViewItem * ); #endif private: #ifdef QT_V4LAYOUT Q3PtrList listColumns; #else QList listColumns; #endif classPrimaryKeys *pPrimaryKeys; classSpecialColumns *pSpecialColumns; classIndexs *pIndexs; classBrowseFrame *pBrowse; SQLHDBC hDbc; QString qsLibrary; QString qsTable; void Fini(); void LoadColumns(); }; #endif unixODBC-2.2.14-p2/DataManagerII/classTables.h0100644000076400007640000000260610564052116017200 0ustar nicknick/************************************************** * * ************************************************** * This code was created by Peter Harvey @ CodeByDesign. * Released under GPL 18.FEB.99 * * Contributions from... * ----------------------------------------------- * Peter Harvey - pharvey@codebydesign.com **************************************************/ #ifndef classTables_included #define classTables_included #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include "classNode.h" #include "classCanvas.h" #include "classTable.h" #include class classTables: public classNode { public: #ifdef QT_V4LAYOUT classTables( Q3ListViewItem *pParent, Q3ListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char * szLibrary = 0 ); #else classTables( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHDBC hDbc, const char * szLibrary = 0 ); #endif ~classTables() {} void setOpen( bool bOpen ); #ifdef QT_V4LAYOUT void selectionChanged( Q3ListViewItem * ); #else void selectionChanged( QListViewItem * ); #endif private: #ifdef QT_V4LAYOUT Q3PtrList listTables; #else QList listTables; #endif SQLHDBC hDbc; QString qsLibrary; void LoadTables(); }; #endif unixODBC-2.2.14-p2/DataManagerII/LinuxODBC.xpm0100644000076400007640000000244007506352141017043 0ustar nicknick/* XPM */ static const char * LinuxODBC_xpm[] = { "32 32 5 1", " c None", ". c #000000000000", "X c #FFFFD34C1861", "o c #96586DB6FFFF", "O c #00000000FFFF", " ", " ........ ", " ...XXXXXXXX.. ", " ..XXXXXXXXXXXXX... ", " ..XXXXXXXXXXXXX...... ", " ..XXXXXXXXXXXXXX.o..... ", " ..XXXXXXXXXXXXXXX.ooooo.... ", " . .XXXXXXXXXXXXXXXX.oooooooo.. ", " ..XXXXXXXXXXXXXXXX.oooooooo.. ", " .XXXXXXXXXXXXX..XX.ooooooooo. ", " .XXXXXXXXXX... ...ooooooooo. ", "..XXXXXXXXX.. .oooooooooo. ", "...XXXXXXXX. .ooooooooooo. ", "...XXXXXXXX.. ....oooooooo. ", "...XXXX...... .oooooooo. ", ".O......... .oooooooo. ", ".OOOOOOOOO. .oooooooo. ", ".OOOOOOOOO. ..oooooooo. ", " .OOOOOOOOO. .ooooooooo. ", " .OOOOOOOOO.. . ..ooooooooo. ", " .OOOOOOOOOO... .....oooooooo. ", " .OOOOOOOOOOOO.OO...oooooooo. ", " .OOOOOOOOOOOOOOOO..ooooooo.. ", " .OOOOOOOOOOOOOOOO..oooooo. ", " ..OOOOOOOOOOOOOOOO..oooo. ", " ..OOOOOOOOOOOOOOOO.ooo. ", " ..OOOOOOOOOOOOOO.ooo. ", " ..OOOOOOOOOOO.o... ", " ...OOOOOOO... ", " ....OO.. ", " .. ", " . "}; unixODBC-2.2.14-p2/DataManagerII/column.xpm0100644000076400007640000000110407506352142016606 0ustar nicknick/* XPM */ static const char *column_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 7 1", /* colors */ ". c #000000", "# c #c0c0c0", "a c #ffffff", "b c #808080", "c c #ffa858", "d c #ffdca8", "e c None", /* pixels */ "eeeeeeeee..eeeee", "eeeeeeeee.#..eee", "eeee...ee.a##..e", "eee.dd.ee.a#a##.", "ee.dd.....#b###.", "..ddddddcd.a#b#.", ".dddd......##a#.", ".ddddcc.e.a#b##.", ".dddddd.e.a#a##.", "..cccc.ee.#b###.", "ee.....ee.aa#b#.", "eeeeeeeee.b##a#.", "eeeeeeeee..#b##.", "eeeeeeeeeee..##.", "eeeeeeeeeeeee...", "eeeeeeeeeeeeeee." }; unixODBC-2.2.14-p2/DataManagerII/computergreen.xpm0100644000076400007640000000113207506352142020171 0ustar nicknick/* XPM */ static const char *computergreen_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 8 1", /* colors */ ". c #000000", "# c #008000", "a c #808000", "b c #808080", "c c #c0c0c0", "d c #00ff00", "e c #ffff00", "f c none", /* pixels */ ".fffffffffffffff", ".fffffbbbbbbbbff", ".ffffbcccccccb.f", ".fffbffffffcbb.f", ".faabf.....cbb.f", "..aebf.d##bcbb.f", "bbaebf.###bcbb.f", "ccaebf.bbbbcbb.f", "ffaabfccccccb.bb", "ffffb........bc.", "fffbccccccccbcb.", "fffb.b.b.b.b.bb.", "ffb.c.c.c.c.c..f", "fbffffffffffc.ff", "f............fff", "ffffffffffffffff" }; unixODBC-2.2.14-p2/DataManagerII/computerred.xpm0100644000076400007640000000113007506352142017641 0ustar nicknick/* XPM */ static const char *computerred_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 8 1", /* colors */ ". c #000000", "# c #800000", "a c #808000", "b c #808080", "c c #c0c0c0", "d c #ff0000", "e c #ffff00", "f c none", /* pixels */ ".fffffffffffffff", ".fffffbbbbbbbbff", ".ffffbcccccccb.f", ".fffbffffffcbb.f", ".faabf.....cbb.f", "..aebf.d##bcbb.f", "bbaebf.###bcbb.f", "ccaebf.bbbbcbb.f", "ffaabfccccccb.bb", "ffffb........bc.", "fffbccccccccbcb.", "fffb.b.b.b.b.bb.", "ffb.c.c.c.c.c..f", "fbffffffffffc.ff", "f............fff", "ffffffffffffffff" }; unixODBC-2.2.14-p2/DataManagerII/datasourceoff.xpm0100644000076400007640000000113207506352142020137 0ustar nicknick/* XPM */ static const char *datasourceoff_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 8 1", /* colors */ ". c #000000", "# c #800000", "a c #808000", "b c #808080", "c c #c0c0c0", "d c #ff0000", "e c #ffff00", "f c none", /* pixels */ ".fffffffffffffff", ".fffffbbbbbbbbff", ".ffffbcccccccb.f", ".fffbffffffcbb.f", ".faabf.....cbb.f", "..aebf.d##bcbb.f", "bbaebf.###bcbb.f", "ccaebf.bbbbcbb.f", "ffaabfccccccb.bb", "ffffb........bc.", "fffbccccccccbcb.", "fffb.b.b.b.b.bb.", "ffb.c.c.c.c.c..f", "fbffffffffffc.ff", "f............fff", "ffffffffffffffff" }; unixODBC-2.2.14-p2/DataManagerII/datasourceon.xpm0100644000076400007640000000113107506352142020000 0ustar nicknick/* XPM */ static const char *datasourceon_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 8 1", /* colors */ ". c #000000", "# c #008000", "a c #808000", "b c #808080", "c c #c0c0c0", "d c #00ff00", "e c #ffff00", "f c none", /* pixels */ ".fffffffffffffff", ".fffffbbbbbbbbff", ".ffffbcccccccb.f", ".fffbffffffcbb.f", ".faabf.....cbb.f", "..aebf.d##bcbb.f", "bbaebf.###bcbb.f", "ccaebf.bbbbcbb.f", "ffaabfccccccb.bb", "ffffb........bc.", "fffbccccccccbcb.", "fffb.b.b.b.b.bb.", "ffb.c.c.c.c.c..f", "fbffffffffffc.ff", "f............fff", "ffffffffffffffff" }; unixODBC-2.2.14-p2/DataManagerII/datasourcessystem.xpm0100644000076400007640000000102207506352142021072 0ustar nicknick/* XPM */ static const char * datasourcessystem_xpm[] = { "16 16 7 1", " c None", ". c #000000000000", "X c #FFFFFFFFFFFF", "o c #C71BC30BC71B", "O c #000000008617", "+ c #0000FFFFFFFF", "@ c #00000000FFFF", " .XXX.oo", " ...ooo.o", " .XXX.oooo", " .oooooooo", " ......oooX", " .....ooooooo..", " .oooo.ooooooo..", " .oOOO......oooX", " .oO+@@.oooooXoX", " .oO+@@.ooo.ooXo", " .o@@@@....ooo.o", " .ooooooo.ooo.oX", " ............ooX", ". .....", ".oooooooooo.. ", "............. "}; unixODBC-2.2.14-p2/DataManagerII/datasourcesuser.xpm0100644000076400007640000000114507506352142020532 0ustar nicknick/* XPM */ static const char * datasourcesuser_xpm[] = { "16 16 11 1", " c None", ". c #000000000000", "X c #FFFFFFFF0000", "o c #FFFFFFFFFFFF", "O c #861782078617", "+ c #C71BC30BC71B", "@ c #000000008617", "# c #0000FFFFFFFF", "$ c #00000000FFFF", "% c #861782070000", "& c #FFFF0000FFFF", " ..... ", " .XXXXX. ", " .XXX.... ", " .XXX.ooo. ", " .XXX.oO.. ", " ....XX.ooooo. ", " .++++XX.ooo+. ", " .+@@@XX.oooo. ", " .+@#$XX.oO.. ", " .+@#$$%X.o.. ", " .+$$$$$XX.o.. ", " .++++++++&&o. ", " ..........&&&. ", ".++++++++++.. ", ".++++++++++.. ", "............. "}; unixODBC-2.2.14-p2/DataManagerII/driver.xpm0100644000076400007640000000110407506352142016604 0ustar nicknick/* XPM */ static const char *driver_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 7 1", /* colors */ ". c #000000", "# c #008080", "a c #beffff", "b c #00c0c0", "c c #585858", "d c #00c0c0", "e c None", /* pixels */ "eeeeeeeeeeeeeeee", "eeeee......eeeee", "ee...acbaca...ee", "e.bacbcaacacaa.e", "e.bbbaabbaabaa.e", "e...abbaabba...e", ".bbbbba..aabbaa.", ".##.dbb..bba.bb.", ".#.#bbbbbbabb.b.", "..a#bbbbbbbbb#..", "e.a#.b.bb.#.b#.e", "e.a.a#.bb.##.#.e", "e...a#.##.##...e", "eee.a#.bb.##.eee", "eee....bb....eee", "eeeeee....eeeeee" }; unixODBC-2.2.14-p2/DataManagerII/drivers.xpm0100644000076400007640000000106607506352142016776 0ustar nicknick/* XPM */ static const char *drivers_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 6 1", /* colors */ ". c #000000", "# c #c0c0c0", "a c #ffffff", "b c #a0a0a4", "c c #c0c0c0", "d c None", /* pixels */ "dddddd....dddddd", "ddd....##c...ddd", "ddd.aaa.#c.cc.dd", "d....###.c.ca.dd", "d.aaa.ccccacb.dd", "d.###ccccccaca.d", "......cccacabb.d", ".cc#cccc..acac.d", ".cc#cccc..acaa.d", "......cccacabb.d", "d.####cacacaaa.d", "d.###.ccacacb.dd", "d....ccc.c.aa.dd", "ddd.###.ca.aa.dd", "ddd....cca...ddd", "dddddd....dddddd" }; unixODBC-2.2.14-p2/DataManagerII/exec.xpm0100644000076400007640000000147207506352142016245 0ustar nicknick/* XPM */ static const char *exec[] = { /* width height num_colors chars_per_pixel */ " 22 22 7 1", /* colors */ ". c #000000", "# c #ffffff", "a c #585858", "b c #400000", "c c #a0a0a4", "d c #c0c0c0", "e c None", /* pixels */ "eeeeeeeeeeeeeeeeeeeeee", "eeeeeeeeeeeeeeeeeeeeee", "eeeeeeeeeeeeeeeeeeeeee", "eeeeeee...##.e..eeeeee", "eeeeee.##a##a.##eeeeee", "eeed#.#########a.##.ee", "ee.###.############aee", "ee.cad#d#########addee", "ee.cc#d##########dddee", ".dddd#d##.cd.########.", ".....dddd.cd.d###.....", ".ccc.dddd#d##d####ddd.", ".cc.dd.dddddd#d.#d..d.", ".c.dd.cddddd#d#..#d#d.", "e.#.cc.dddddddd#dd...e", "e.#cc.ddd.dd..dd.dd..e", "e.#ccddd..dd.cddd.d..e", "e.#cc.b.c.dd.c.d..d..e", "ee..e#dcc.dd..c.c...ee", "eeeee#dc..dd.ec.c.eeee", "eeeee#d.e.dd.e..c.eeee", "eeeee..ee.dd.ee..eeeee" }; unixODBC-2.2.14-p2/DataManagerII/id.xpm0100644000076400007640000000067007506352142015714 0ustar nicknick/* XPM */ static const char * id_xpm[] = { "16 16 3 1", " c #FFFFFFFFFFFF", ". c #A699B6DACF3C", "X c #000000000000", " ", " .............. ", " .XXXXXXXXXXXX. ", " . XX X. ", " .X XXXX XXX . ", " .X XXXX XXXX . ", " .X XXXX XXXX . ", " .X XXXX XXXX . ", " .X XXXX XXXX . ", " .X XXXX XXXX . ", " .X XXXX XXX . ", " . XX X. ", " .XXXXXXXXXXXX. ", " .XXXXXXXXXXXX. ", " .............. ", " "}; unixODBC-2.2.14-p2/DataManagerII/keygold.xpm0100644000076400007640000000136407506352142016757 0ustar nicknick/* XPM */ static const char *keygold_xpm[] = { /* width height num_colors chars_per_pixel */ " 32 15 4 1", /* colors */ ". c #000000", "# c #7f7f7f", "a c #ffff00", "b c None", /* pixels */ "bbbbb.....bbbbbbbbbbbbbbbbbbbbbb", "bbb..#a#a#..bbbbbbbbbbbbbbbbbbbb", "bb.a#a#a#a#a.bbbbbbbbbbbbbbbbbbb", "b.a#a#a#a#a#a.bb..bbbbbbbbbbbbbb", "b.#a#a#a#a#a#.b.a.bbbbbbbbbbbbbb", ".#a...a#a#a#a#..a..............b", ".a.###.a#a#a#a#a#aaaaaaaaaaaaaa.", ".#.bbb.#a#a#a#a#a#a#a#a#a#a#a#a.", ".a.bbb.a#a#a#a#a#a#a#a#a#a#a#a.b", ".#a...a#a#a#a#................bb", "b.#a#a#a#a#a#.b.#..####...##.bbb", "b.a#a#a#a#a#a.bb..b....bbb..bbbb", "bb.a#a#a#a#a.bbbbbbbbbbbbbbbbbbb", "bb#..#a#a#..#bbbbbbbbbbbbbbbbbbb", "bbbbb.....bbbbbbbbbbbbbbbbbbbbbb" }; unixODBC-2.2.14-p2/DataManagerII/keyred.xpm0100644000076400007640000000106607506352142016603 0ustar nicknick/* XPM */ static const char *keyred_xpm[] = { /* width height num_colors chars_per_pixel */ " 20 14 5 1", /* colors */ ". c #800000", "# c #be0000", "a c #ff0000", "b c #ffbebe", "c c None", /* pixels */ "cccccccccccccccccccc", "cccccccccccccccccccc", "cccccccccccccccccccc", "cccaaaaccccccccccccc", "ccab..aacccccccccccc", "cca.cc..aaaaaaaaaacc", "cca.cc............cc", "cca.cc.......###..cc", "cca.....ccccc#ac.acc", "ccc....cccccc#ac.acc", "ccccccccccccc#ac.acc", "cccccccccccccccccccc", "cccccccccccccccccccc", "cccccccccccccccccccc" }; unixODBC-2.2.14-p2/DataManagerII/keysilver.xpm0100644000076400007640000000134707506352142017337 0ustar nicknick/* XPM */ static const char *keysilver_xpm[] = { /* width height num_colors chars_per_pixel */ " 31 15 4 1", /* colors */ ". c #000000", "# c #7f7f7f", "a c #bfbfbf", "b c None", /* pixels */ "bbbbb.....bbbbbbbbbbbbbbbbbbbbb", "bbb..babab..bbbbbbbbbbbbbbbbbbb", "bb.ababababa.bbbbbbbbbbbbbbbbbb", "b.abababababa.bb..bbbbbbbbbbbbb", "#.bababababab.b.b.bbbbbbbbbbbbb", ".ba...abababaa..a..............", ".a.###.ababaaaaaaababababababa.", ".b.bbb.bababaaaaaaaaaaaaaaaaaa.", ".a.bbb.ababaaaaaaaaaaaaaaaaaa.b", ".ba...abababaa...............bb", "#.bababababaa.#.#..####...#.bbb", "#.abababababa.##..#....##..bbbb", "##.ababababa.bb##b####bb##bbbbb", "b##..babab..bbbbbbbbbbbbbbbbbbb", "bb###.....#bbbbbbbbbbbbbbbbbbbb" }; unixODBC-2.2.14-p2/DataManagerII/keysilver2.xpm0100644000076400007640000000107207506352142017414 0ustar nicknick/* XPM */ static const char *keysilver2_xpm[] = { /* width height num_colors chars_per_pixel */ " 20 14 5 1", /* colors */ ". c #bfbfbf", "# c #be0000", "a c #008000", "b c #ffbebe", "c c None", /* pixels */ "cccccccccccccccccccc", "cccccccccccccccccccc", "cccccccccccccccccccc", "cccaaaaccccccccccccc", "ccab..aacccccccccccc", "cca.cc..aaaaaaaaaacc", "cca.cc............cc", "cca.cc.......###..cc", "cca.....ccccc#ac.acc", "ccc....cccccc#ac.acc", "ccccccccccccc#ac.acc", "cccccccccccccccccccc", "cccccccccccccccccccc", "cccccccccccccccccccc" }; unixODBC-2.2.14-p2/DataManagerII/new.xpm0100644000076400007640000000100507506352142016102 0ustar nicknick/* XPM */ static const char *new_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 3 1", /* colors */ ". c #000000", "# c None", "a c #ffffff", /* pixels */ "################", "##........######", "##.aaaaaa..#####", "##.aaaaaa.a.####", "##.aaaaaa....###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##.aaaaaaaaa.###", "##...........###", "################", "################" }; unixODBC-2.2.14-p2/DataManagerII/open.xpm0100644000076400007640000000104407506352142016255 0ustar nicknick/* XPM */ static const char *open_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 5 1", /* colors */ ". c #000000", "# c #808000", "a c None", "b c #ffff00", "c c #ffffff", /* pixels */ "aaaaaaaaaaaaaaaa", "aaaaaaaaa...aaaa", "aaaaaaaa.aaa.a.a", "aaaaaaaaaaaaa..a", "a...aaaaaaaa...a", ".bcb.......aaaaa", ".cbcbcbcbc.aaaaa", ".bcbcbcbcb.aaaaa", ".cbcb...........", ".bcb.#########.a", ".cb.#########.aa", ".b.#########.aaa", "..#########.aaaa", "...........aaaaa", "aaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaa" }; unixODBC-2.2.14-p2/DataManagerII/run.xpm0100644000076400007640000000071607506352142016125 0ustar nicknick/* XPM */ static const char *run_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 14 2 1", /* colors */ ". c None", "# c #000000", /* pixels */ "................", ".........##.....", "........###.....", ".........#......", ".....#####......", "....#..####..#..", ".......###.##...", "...#..###.......", "..#######.......", "....###.##......", "........##......", "........##......", ".........##.....", "................" }; unixODBC-2.2.14-p2/DataManagerII/save.xpm0100644000076400007640000000070607506352142016256 0ustar nicknick/* XPM */ static const char * save_xpm[] = { "16 16 4 1", " c None", ". c #000000000000", "X c #861782070000", "o c #C71BC30BC71B", " ", " .............. ", " .X.oooooooo.o. ", " .X.oooooooo... ", " .X.oooooooo.X. ", " .X.oooooooo.X. ", " .X.oooooooo.X. ", " .X.oooooooo.X. ", " .XX........XX. ", " .XXXXXXXXXXXX. ", " .XX.........X. ", " .XX......oo.X. ", " .XX......oo.X. ", " .XX......oo.X. ", " ............. ", " "}; unixODBC-2.2.14-p2/DataManagerII/table.xpm0100644000076400007640000000106407506352142016405 0ustar nicknick/* XPM */ static const char *table_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 6 1", /* colors */ ". c #000000", "# c #ffffff", "a c #808000", "b c #c0c000", "c c #ffffc0", "d c None", /* pixels */ "dddddddddddddddd", "dddddddddddddddd", "dddddddddddddddd", "dddddddd...ddddd", "ddddddd.###..ddd", "dddddd.##b###..d", "ddddd.##b######.", "dddd.#c###b###b.", "ddd.ccc######b.d", "dd.cc#cc##c#b.dd", "d.ccccc#c##b.ddd", "d..accccc#b.dddd", "ddd..acccb.ddddd", "ddddd..ab.dddddd", "ddddddd..ddddddd", "dddddddddddddddd" }; unixODBC-2.2.14-p2/DataManagerII/tables.xpm0100644000076400007640000000110407506352142016563 0ustar nicknick/* XPM */ static const char *tables_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 7 1", /* colors */ ". c #000000", "# c #ffffff", "a c #000000", "b c #404000", "c c #c0c000", "d c #ffffc0", "e c None", /* pixels */ "eeeeeeeeeeeeeeee", "eeeeeeeee.eeeeee", "eeeeee.e.d..eeee", "eeeee.#.###d..ee", "eeee.#.###d###.e", "eee.#.##d..##.ee", "ee.#.d##.##..eee", "e.d.dd#.###d#..e", ".d.ddd.#c######.", ".ccbc.#c##c###.e", "e..c.#c##cd##.ee", "eee.dc#dc###aeee", "ee.ddddcd#d.eeee", "eee..ddddd.eeeee", "eeeee..dd.eeeeee", "eeeeeee..eeeeeee" }; unixODBC-2.2.14-p2/DataManagerII/ODBC.xpm0100644000076400007640000000436707506352142016036 0ustar nicknick/* XPM */ static const char *xpmODBC[]={ "16 16 104 2", "Qt c None", ".# c #000000", "#q c #004600", "#i c #005501", "#a c #006501", "#x c #013800", "#p c #013d01", "#h c #014d01", "#r c #014e01", "## c #015c01", "#j c #015e01", "#k c #016701", ".3 c #016c01", "#b c #016e01", ".4 c #017501", "#c c #017701", ".U c #017b01", ".5 c #017e01", ".V c #018401", ".K c #018c01", ".W c #018e01", ".L c #019501", ".M c #019d01", ".z c #01a402", ".A c #01ac02", ".p c #01bb01", ".E c #01cc01", ".g c #01cf01", ".s c #01d102", ".6 c #028701", ".X c #029702", ".N c #02a601", ".O c #02ae02", ".o c #02b302", ".B c #02b502", ".C c #02bd01", ".q c #02c302", ".D c #02c502", ".f c #02c801", ".r c #02ca02", ".h c #02d602", ".t c #02d802", ".i c #02dc02", ".a c #02e002", ".j c #02e102", ".b c #02e502", ".c c #02ea02", ".d c #103030", ".e c #113636", ".k c #143d3d", ".l c #164343", ".m c #18494a", ".u c #194b4b", ".n c #1a5050", ".v c #1a5152", ".w c #1d5858", ".F c #1d595b", ".x c #1f5e5e", ".G c #1f5f60", ".y c #216565", ".H c #226768", ".I c #246d6e", ".P c #256f6f", ".J c #267374", ".Q c #277676", ".R c #297c7d", ".S c #2b8283", ".Z c #2b8485", ".T c #2d898a", ".0 c #2d8a8c", ".1 c #309193", ".7 c #309394", ".2 c #329799", ".8 c #32999b", ".9 c #35a0a1", "#d c #35a1a3", "#. c #36a6a7", "#e c #37a7a9", "#f c #39adaf", "#l c #39afb0", "#g c #3bb3b4", "#m c #3bb5b6", "#n c #3db9bb", "#t c #3ebbbd", "#o c #3fbfc1", "#u c #3fc0c2", "#v c #41c6c7", "#w c #42cbcc", "#F c #43ccce", "#K c #440000", "#G c #45d1d2", "#J c #48dadc", "#I c #5b0000", "#E c #730000", "#D c #8b0000", "#L c #8c0000", "#C c #a40000", "#B c #bb0000", "#A c #d00000", "#s c #e30000", "#z c #e40000", "#y c #f30000", "#H c #ff0000", ".Y c #ffffff", "QtQtQtQtQt.#.#.#.#.#.#QtQtQtQtQt", "QtQtQt.#.#.a.b.c.#.d.e.#.#QtQtQt", "QtQt.#.f.g.h.i.j.#.k.l.m.n.#QtQt", "Qt.#.o.p.q.r.s.t.#.u.v.w.x.y.#Qt", "Qt.#.z.A.B.C.D.E.#.F.G.H.I.J.#Qt", ".#.K.L.M.N.O.#.#.#.#.P.Q.R.S.T.#", ".#.U.V.W.X.#QtQtQtQt.#.Z.0.1.2.#", ".#.3.4.5.6.#QtQtQtQt.#.7.8.9#..#", ".####a#b#c.#QtQtQtQt.##d#e#f#g.#", ".##h#i#j#k.#QtQtQtQt.##l#m#n#o.#", ".##p#q#r.##s.#.#.#.#.##t#u#v#w.#", "Qt.##x.##y#z#A#B#C#D#E.##F#G.#Qt", "Qt.#.##H#y#s#A#B#C#D#E#I.##J.#Qt", "QtQt.##H#y#s#A#B#C#D#E#I#K.#QtQt", "QtQtQt.#.##s#A#B#C#L#E.#.#QtQtQt", "QtQtQtQtQt.#.#.#.#.#.#QtQtQtQtQt"}; unixODBC-2.2.14-p2/odbctest/0040755000076400007640000000000011150523514014004 5ustar nicknickunixODBC-2.2.14-p2/odbctest/Makefile.am0100644000076400007640000000343110723056401016037 0ustar nicknickif QT if QT4 else bin_PROGRAMS = odbctest INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) -DSYSTEM_FILE_PATH=\"@sysconfdir@\" $(LTDLINCL) odbctest_LDADD = \ $(QT_LDFLAGS) \ $(QT_LIBS) \ ../ini/libinilc.la \ ../odbcinst/libodbcinst.la \ ../DriverManager/libodbc.la \ $(LIBLTDL) $(LIBADD_DL) odbctest_DEPENDANCIES = ../odbcinst/libodbcinst.la ../DriverManager/libodbc.la odbctest_SOURCES = \ tools.cpp \ stmt.cpp \ results.cpp \ open.cpp \ odbctest.cpp \ installer.cpp \ env.cpp \ edit.cpp \ desc.cpp \ diag.cpp \ conn.cpp \ catalog.cpp \ attr.cpp \ moc_results.cpp \ moc_stmt.cpp \ moc_odbctest.cpp \ moc_desc.cpp \ moc_diag.cpp \ moc_env.cpp \ moc_catalog.cpp \ moc_conn.cpp \ moc_attr.cpp \ moc_tools.cpp moc_results.cpp: @srcdir@/results.h @MOC@ @srcdir@/results.h -o moc_results.cpp moc_stmt.cpp: @srcdir@/stmt.h @MOC@ @srcdir@/stmt.h -o moc_stmt.cpp moc_odbctest.cpp: @srcdir@/odbctest.h @MOC@ @srcdir@/odbctest.h -o moc_odbctest.cpp moc_desc.cpp: @srcdir@/desc.h @MOC@ @srcdir@/desc.h -o moc_desc.cpp moc_diag.cpp: @srcdir@/diag.h @MOC@ @srcdir@/diag.h -o moc_diag.cpp moc_env.cpp: @srcdir@/env.h @MOC@ @srcdir@/env.h -o moc_env.cpp moc_catalog.cpp: @srcdir@/catalog.h @MOC@ @srcdir@/catalog.h -o moc_catalog.cpp moc_conn.cpp: @srcdir@/conn.h @MOC@ @srcdir@/conn.h -o moc_conn.cpp moc_attr.cpp: @srcdir@/attr.h @MOC@ @srcdir@/attr.h -o moc_attr.cpp moc_tools.cpp: @srcdir@/tools.h @MOC@ @srcdir@/tools.h -o moc_tools.cpp CLEANFILES = \ moc_attr.cpp \ moc_conn.cpp \ moc_diag.cpp \ moc_odbctest.cpp \ moc_stmt.cpp \ moc_catalog.cpp \ moc_desc.cpp \ moc_env.cpp \ moc_results.cpp \ moc_tools.cpp endif endif EXTRA_DIST = \ results.h \ stmt.h \ odbctest.h \ desc.h \ diag.h \ env.h \ catalog.h \ conn.h \ attr.h \ tools.h \ tools4.h unixODBC-2.2.14-p2/odbctest/Makefile.in0100644000076400007640000005207611111035267016060 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ @QT4_FALSE@@QT_TRUE@bin_PROGRAMS = odbctest$(EXEEXT) subdir = odbctest DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__odbctest_SOURCES_DIST = tools.cpp stmt.cpp results.cpp open.cpp \ odbctest.cpp installer.cpp env.cpp edit.cpp desc.cpp diag.cpp \ conn.cpp catalog.cpp attr.cpp moc_results.cpp moc_stmt.cpp \ moc_odbctest.cpp moc_desc.cpp moc_diag.cpp moc_env.cpp \ moc_catalog.cpp moc_conn.cpp moc_attr.cpp moc_tools.cpp @QT4_FALSE@@QT_TRUE@am_odbctest_OBJECTS = tools.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ stmt.$(OBJEXT) results.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ open.$(OBJEXT) odbctest.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ installer.$(OBJEXT) env.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ edit.$(OBJEXT) desc.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ diag.$(OBJEXT) conn.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ catalog.$(OBJEXT) attr.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ moc_results.$(OBJEXT) moc_stmt.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ moc_odbctest.$(OBJEXT) moc_desc.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ moc_diag.$(OBJEXT) moc_env.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ moc_catalog.$(OBJEXT) moc_conn.$(OBJEXT) \ @QT4_FALSE@@QT_TRUE@ moc_attr.$(OBJEXT) moc_tools.$(OBJEXT) odbctest_OBJECTS = $(am_odbctest_OBJECTS) am__DEPENDENCIES_1 = @QT4_FALSE@@QT_TRUE@odbctest_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @QT4_FALSE@@QT_TRUE@ $(am__DEPENDENCIES_1) ../ini/libinilc.la \ @QT4_FALSE@@QT_TRUE@ ../odbcinst/libodbcinst.la \ @QT4_FALSE@@QT_TRUE@ ../DriverManager/libodbc.la \ @QT4_FALSE@@QT_TRUE@ $(am__DEPENDENCIES_1) \ @QT4_FALSE@@QT_TRUE@ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(odbctest_SOURCES) DIST_SOURCES = $(am__odbctest_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @QT4_FALSE@@QT_TRUE@INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) -DSYSTEM_FILE_PATH=\"@sysconfdir@\" $(LTDLINCL) @QT4_FALSE@@QT_TRUE@odbctest_LDADD = \ @QT4_FALSE@@QT_TRUE@ $(QT_LDFLAGS) \ @QT4_FALSE@@QT_TRUE@ $(QT_LIBS) \ @QT4_FALSE@@QT_TRUE@ ../ini/libinilc.la \ @QT4_FALSE@@QT_TRUE@ ../odbcinst/libodbcinst.la \ @QT4_FALSE@@QT_TRUE@ ../DriverManager/libodbc.la \ @QT4_FALSE@@QT_TRUE@ $(LIBLTDL) $(LIBADD_DL) @QT4_FALSE@@QT_TRUE@odbctest_DEPENDANCIES = ../odbcinst/libodbcinst.la ../DriverManager/libodbc.la @QT4_FALSE@@QT_TRUE@odbctest_SOURCES = \ @QT4_FALSE@@QT_TRUE@ tools.cpp \ @QT4_FALSE@@QT_TRUE@ stmt.cpp \ @QT4_FALSE@@QT_TRUE@ results.cpp \ @QT4_FALSE@@QT_TRUE@ open.cpp \ @QT4_FALSE@@QT_TRUE@ odbctest.cpp \ @QT4_FALSE@@QT_TRUE@ installer.cpp \ @QT4_FALSE@@QT_TRUE@ env.cpp \ @QT4_FALSE@@QT_TRUE@ edit.cpp \ @QT4_FALSE@@QT_TRUE@ desc.cpp \ @QT4_FALSE@@QT_TRUE@ diag.cpp \ @QT4_FALSE@@QT_TRUE@ conn.cpp \ @QT4_FALSE@@QT_TRUE@ catalog.cpp \ @QT4_FALSE@@QT_TRUE@ attr.cpp \ @QT4_FALSE@@QT_TRUE@ moc_results.cpp \ @QT4_FALSE@@QT_TRUE@ moc_stmt.cpp \ @QT4_FALSE@@QT_TRUE@ moc_odbctest.cpp \ @QT4_FALSE@@QT_TRUE@ moc_desc.cpp \ @QT4_FALSE@@QT_TRUE@ moc_diag.cpp \ @QT4_FALSE@@QT_TRUE@ moc_env.cpp \ @QT4_FALSE@@QT_TRUE@ moc_catalog.cpp \ @QT4_FALSE@@QT_TRUE@ moc_conn.cpp \ @QT4_FALSE@@QT_TRUE@ moc_attr.cpp \ @QT4_FALSE@@QT_TRUE@ moc_tools.cpp @QT4_FALSE@@QT_TRUE@CLEANFILES = \ @QT4_FALSE@@QT_TRUE@ moc_attr.cpp \ @QT4_FALSE@@QT_TRUE@ moc_conn.cpp \ @QT4_FALSE@@QT_TRUE@ moc_diag.cpp \ @QT4_FALSE@@QT_TRUE@ moc_odbctest.cpp \ @QT4_FALSE@@QT_TRUE@ moc_stmt.cpp \ @QT4_FALSE@@QT_TRUE@ moc_catalog.cpp \ @QT4_FALSE@@QT_TRUE@ moc_desc.cpp \ @QT4_FALSE@@QT_TRUE@ moc_env.cpp \ @QT4_FALSE@@QT_TRUE@ moc_results.cpp \ @QT4_FALSE@@QT_TRUE@ moc_tools.cpp EXTRA_DIST = \ results.h \ stmt.h \ odbctest.h \ desc.h \ diag.h \ env.h \ catalog.h \ conn.h \ attr.h \ tools.h \ tools4.h all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu odbctest/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu odbctest/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done odbctest$(EXEEXT): $(odbctest_OBJECTS) $(odbctest_DEPENDENCIES) @rm -f odbctest$(EXEEXT) $(CXXLINK) $(odbctest_LDFLAGS) $(odbctest_OBJECTS) $(odbctest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/catalog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/desc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/env.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/installer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_attr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_catalog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_conn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_desc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_diag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_env.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_odbctest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_results.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_stmt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odbctest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/results.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stmt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tools.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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) installdirs: for dir in "$(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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: 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-info-am .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-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ 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-info-am @QT4_FALSE@@QT_TRUE@moc_results.cpp: @srcdir@/results.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/results.h -o moc_results.cpp @QT4_FALSE@@QT_TRUE@moc_stmt.cpp: @srcdir@/stmt.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/stmt.h -o moc_stmt.cpp @QT4_FALSE@@QT_TRUE@moc_odbctest.cpp: @srcdir@/odbctest.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/odbctest.h -o moc_odbctest.cpp @QT4_FALSE@@QT_TRUE@moc_desc.cpp: @srcdir@/desc.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/desc.h -o moc_desc.cpp @QT4_FALSE@@QT_TRUE@moc_diag.cpp: @srcdir@/diag.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/diag.h -o moc_diag.cpp @QT4_FALSE@@QT_TRUE@moc_env.cpp: @srcdir@/env.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/env.h -o moc_env.cpp @QT4_FALSE@@QT_TRUE@moc_catalog.cpp: @srcdir@/catalog.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/catalog.h -o moc_catalog.cpp @QT4_FALSE@@QT_TRUE@moc_conn.cpp: @srcdir@/conn.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/conn.h -o moc_conn.cpp @QT4_FALSE@@QT_TRUE@moc_attr.cpp: @srcdir@/attr.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/attr.h -o moc_attr.cpp @QT4_FALSE@@QT_TRUE@moc_tools.cpp: @srcdir@/tools.h @QT4_FALSE@@QT_TRUE@ @MOC@ @srcdir@/tools.h -o moc_tools.cpp # 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: unixODBC-2.2.14-p2/odbctest/tools.cpp0100644000076400007640000017675110564052121015665 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: tools.cpp,v 1.8 2007/02/12 11:49:37 lurcher Exp $ * * $Log: tools.cpp,v $ * Revision 1.8 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.7 2005/04/05 09:11:32 lurcher * The config string being passed into ConfigDsn was wrong, removed semicolon, and added terminating double null * * Revision 1.6 2003/12/01 16:37:17 lurcher * * Fix a bug in SQLWritePrivateProfileString * * Revision 1.5 2003/11/13 15:12:54 lurcher * * small change to ODBCConfig to have the password field in the driver * properties hide the password * Make both # and ; comments in ini files * * Revision 1.4 2003/09/29 08:56:10 lurcher * * Fix warning dialogs * Check for headers before using them * * Revision 1.3 2002/01/21 18:00:51 lurcher * * Assorted fixed and changes, mainly UNICODE/bug fixes * * Revision 1.2 2001/12/04 16:46:19 lurcher * * Allow the Unix Domain Socket to be set from the ini file (DSN) * Make the DataManager browser work with drivers that don't support * SQLRowCount * Make the directory selection from odbctest work simplier * * Revision 1.1.1.1 2001/10/17 16:40:31 lurcher * * First upload to SourceForge * * Revision 1.11 2001/10/01 17:24:53 nick * * Assorted fixes * * Revision 1.10 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.9 2001/05/09 11:56:47 nick * * Add support for libtool 1.4 * * Revision 1.8 2001/04/17 16:29:39 nick * * More checks and autotest fixes * * Revision 1.7 2001/04/17 12:57:11 nick * * Extra for AutoTest * * Revision 1.6 2001/04/16 22:35:10 nick * * More tweeks to the AutoTest code * * Revision 1.5 2001/04/16 15:41:24 nick * * Fix some problems calling non existing error funcs * * Revision 1.4 2001/04/14 19:00:34 nick * * Add support for ODBC Test handles, and catch a few problems with * empty Gator.ini * * Revision 1.3 2001/04/14 10:42:03 nick * * Extra work on the autotest feature of odbctest * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.1 2000/05/04 17:04:48 ngorham * * Initial commit * * **********************************************************************/ #include #include #include #include #include #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #endif #include "autotest.h" #ifdef QT_V4LAYOUT #include "tools4.h" #else #include "tools.h" #endif #include "odbctest.h" #include "ini.h" #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #define setqbit(lpa, pos) \ (lpa[((pos) / CQBITS)] |= (1 << ((pos) - (CQBITS * ((pos) / CQBITS))))) #define SETBIT(p1,p2) setqbit(p1,(p2)-1) class prop { public: prop( const char *sname = "", const char *svalue = "" ) { _name = sname; _value = svalue; } const char *name( void ) { return _name; } const char *value( void ) { return _value; } private: QString _name, _value; }; class section { public: section( const char *sname = "" ) { name = sname; entries.clear(); } void append( prop *ent ) { entries.append( ent ); } const char *get_section( void ) { return name; } prop *first( void ) { return entries.first(); } prop *next( void ) { return entries.next(); } void remove( prop *p ) { entries.remove( p ); } void clear( void ) { entries.clear(); } private: QString name; #ifdef QT_V4LAYOUT Q3PtrList entries; #else QList entries; #endif }; #ifdef QT_V4LAYOUT Q3PtrList
ini_list; #else QList
ini_list; #endif // // time func // const char *get_time_str( void ) { static char str[ 128 ]; time_t tim; struct tm *tm; tim = time( NULL ); tm = localtime( &tim ); sprintf( str, "%02d:%02d:%02d", tm -> tm_hour, tm -> tm_min, tm -> tm_sec ); return str; } // // callback function // static OdbcTest *static_odbctest; static void post_to_odbctest( lpSERVERINFO lps ) { lps -> szBuff[ lps -> cBuff ] = '\0'; if ( lps -> fScreen ) { static_odbctest -> out_win -> insertLineLimited( lps -> szBuff ); } if ( lps -> fLog ) { FILE *fp = fopen( lps -> szLogFile, "a+" ); if ( fp ) { fputs( lps -> szBuff, fp ); fputs( "\n", fp ); fclose( fp ); } } lps -> cBuff = 0; } static void print_to_odbctest( lpSERVERINFO lps, char *str, int log ) { static_odbctest -> out_win -> insertLineLimited( str ); if ( log && lps -> fLog ) { FILE *fp = fopen( lps -> szLogFile, "a+" ); if ( fp ) { fputs( str, fp ); fputs( "\n", fp ); fclose( fp ); } } } static int show_message_box( int style, const char *title, const char *msg ) { int button0, button1, button2; button0 = QMessageBox::NoButton; button1 = QMessageBox::NoButton; button2 = QMessageBox::NoButton; switch ( style & (MB_OK | MB_ABORTRETRYIGNORE | MB_OKCANCEL | MB_RETRYCANCEL | MB_YESNO | MB_YESNOCANCEL) ) { case MB_ABORTRETRYIGNORE: button0 = QMessageBox::Abort; button1 = QMessageBox::Retry; button2 = QMessageBox::Ignore; break; case MB_OKCANCEL: button0 = QMessageBox::Ok; button1 = QMessageBox::Cancel; break; case MB_RETRYCANCEL: button0 = QMessageBox::Retry; button1 = QMessageBox::Cancel; break; case MB_YESNO: button0 = QMessageBox::Yes; button1 = QMessageBox::No; break; case MB_YESNOCANCEL: button0 = QMessageBox::Yes; button1 = QMessageBox::No; button2 = QMessageBox::Cancel; break; default: button0 = QMessageBox::Ok; break; } switch ( style & (MB_DEFBUTTON1 | MB_DEFBUTTON2 | MB_DEFBUTTON3 ) ) { case MB_DEFBUTTON1: default: button0 |= QMessageBox::Default; break; case MB_DEFBUTTON2: button1 |= QMessageBox::Default; break; case MB_DEFBUTTON3: button2 |= QMessageBox::Default; break; } QMessageBox::Icon icon = QMessageBox::NoIcon ; switch ( style & (MB_ICONINFORMATION | MB_ICONQUESTION | MB_ICONSTOP ) ) { case MB_ICONINFORMATION : icon = QMessageBox::Information; break; case MB_ICONQUESTION: icon = QMessageBox::Warning; break; case MB_ICONSTOP: icon = QMessageBox::Critical; break; default: icon = QMessageBox::NoIcon; break; } QMessageBox mb( title, msg, icon, button0, button1, button2 ); return mb.exec(); } extern "C" { static int callback_function( lpSERVERINFO lps, BOOL fForce, BOOL fMsgBox, UINT style, LPTSTR szTitle, const char *msg ) { if ( fMsgBox ) { return show_message_box( style, szTitle, msg ); } else { int line_out = 0; /* * copy from msg to szBuff, looking for \n */ while( *msg ) { if ( *msg == '\n' ) { post_to_odbctest( lps ); } else if ( isprint( *msg )) { if ( lps -> cBuff < sizeof( lps -> szBuff ) - 1 ) { lps -> szBuff[ lps -> cBuff ] = *msg; lps -> cBuff ++; } } msg ++; } if ( fForce && lps -> cBuff > 0 ) { post_to_odbctest( lps ); } } return 0; } } // // Find a section // section *find_section( const char *txt ) { for ( section *ent = ini_list.first(); ent != 0; ent = ini_list.next()) { if ( strcmp( ent -> get_section(), txt ) == 0 ) { return ent; } } return NULL; } // // Put information back into ini file // void replace_ini_list( OdbcTest *parent ) { HINI hIni; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; char szINI[ODBC_FILENAME_MAX+1]; sprintf( szINI, "%s/%s", SYSTEM_FILE_PATH, "Gator.ini" ); if ( iniOpen( &hIni, szINI, "#;", '[', ']', '=', TRUE ) != INI_ERROR ) { for ( section *ent = ini_list.first(); ent != 0; ent = ini_list.next()) { iniObjectSeekSure( hIni, (char*)ent -> get_section()); iniObjectDelete( hIni ); iniObjectSeekSure( hIni, (char*)ent -> get_section()); for ( prop *prop = ent->first(); prop != 0; prop = ent -> next()) { iniPropertyInsert( hIni, (char*)prop -> name(), (char*)prop -> value()); } iniCommit( hIni ); } } else { char msg[ 256 ]; sprintf( msg, "Unable to open INI file (%s)", szINI ); QMessageBox::critical( parent, "OdbcTest", msg ); } ini_list.clear(); } void remove_section( OdbcTest *parent, section *section ) { HINI hIni; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; char szINI[ODBC_FILENAME_MAX+1]; sprintf( szINI, "%s/%s", SYSTEM_FILE_PATH, "Gator.ini" ); if ( iniOpen( &hIni, szINI, "#;", '[', ']', '=', TRUE ) != INI_ERROR ) { iniObjectSeekSure( hIni, (char*)section -> get_section()); iniObjectDelete( hIni ); iniCommit( hIni ); } else { char msg[ 256 ]; sprintf( msg, "Unable to open INI file (%s)", szINI ); QMessageBox::critical( parent, "OdbcTest", msg ); } } // // extract the information from the ini file // void init_ini_list( OdbcTest *parent ) { HINI hIni; char szObject[INI_MAX_OBJECT_NAME+1]; char szPropertyName[INI_MAX_PROPERTY_NAME+1]; char szPropertyValue[INI_MAX_PROPERTY_VALUE+1]; char szINI[ODBC_FILENAME_MAX+1]; ini_list.clear(); sprintf( szINI, "%s/%s", SYSTEM_FILE_PATH, "Gator.ini" ); if ( iniOpen( &hIni, szINI, "#;", '[', ']', '=', TRUE ) != INI_ERROR ) { iniObjectFirst( hIni ); while ( iniObjectEOL( hIni ) == FALSE ) { szObject[0] = '\0'; szPropertyName[0] = '\0'; szPropertyValue[0] = '\0'; iniObject( hIni, szObject ); iniPropertyFirst( hIni ); section *s = new section( szObject ); ini_list.append( s ); while ( iniPropertyEOL( hIni ) == FALSE ) { iniProperty( hIni, szPropertyName ); iniValue( hIni, szPropertyValue ); prop *p = new prop( szPropertyName, szPropertyValue ); s -> append( p ); iniPropertyNext( hIni ); } iniObjectNext( hIni ); } } else { FILE *fp; // // empty list // sprintf( szINI, "%s/%s", SYSTEM_FILE_PATH, "Gator.ini" ); fp = fopen( szINI, "w+" ); if ( fp ) { // // Create the sections // fprintf( fp, "[SQL_DRIVERS]\n\n[GROUPS]\n\n" ); fclose( fp ); } else { char msg[ 256 ]; sprintf( msg, "Unable to open INI file (%s)", szINI ); QMessageBox::critical( parent, "OdbcTest", msg ); } } // // if empty create base groups // section *s = find_section( "SQL_DRIVERS" ); if ( !s ) { section *s = new section( "SQL_DRIVERS" ); ini_list.append( s ); } s = find_section( "GROUPS" ); if ( !s ) { section *s = new section( "GROUPS" ); ini_list.append( s ); } s = find_section( "Auto Tests" ); if ( !s ) { section *s = new section( "Auto Tests" ); ini_list.append( s ); } } void fill_dsn_list( OdbcTest *parent, QComboBox *box ) { SQLHANDLE henv; SQLRETURN ret; SQLCHAR dsn_txt[ 128 ]; box -> clear(); /* * allocate a handle if required */ ret = SQLAllocEnv( &henv ); if ( !SQL_SUCCEEDED( ret )) { parent -> out_win -> insertLineLimited( "SQLAllocHandle fails allocating a environment handle" ); return; } ret = SQLDataSources( henv, SQL_FETCH_FIRST, dsn_txt, sizeof( dsn_txt ), NULL, NULL, 0, NULL ); while ( SQL_SUCCEEDED( ret )) { box -> insertItem(( char * ) dsn_txt ); ret = SQLDataSources( henv, SQL_FETCH_NEXT, dsn_txt, sizeof( dsn_txt ), NULL, NULL, 0, NULL ); } /* * remove the temp henv */ SQLFreeEnv( henv ); } void set_dsn_list( QComboBox *box, const char *str ) { int index; QString qstr; for ( index = 0; index < box->count(); index ++ ) { qstr = box->text( index ); if ( qstr == str ) { box->setCurrentItem( index ); break; } } } void dNewSource::Ok() { QString name = source -> text(); prop *p; // // check if its allready there // // section *s = find_section( "SQL_DRIVERS" ); if ( s ) { for ( p = s->first(); p != 0; p = s -> next()) { if ( strcmp( p -> name(), name ) == 0 ) { char msg[ 128 ]; sprintf( msg, "Source (%s) already defined", name.ascii()); QMessageBox::critical( this, "OdbcTest", msg ); return; } } p = new prop( name.ascii(), "Installed" ); s -> append( p ); parent_test -> test_source -> insertItem( p -> name()); parent_test -> Activated( p -> name()); } } dNewSource::dNewSource( OdbcTest *parent, QString name, dManageTest *ptest ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; parent_test = ptest; cancel = new QPushButton( "Close", this ); cancel->setGeometry( 200,50, 70,25 ); ok = new QPushButton( "Ok", this ); ok->setGeometry( 110,50, 70,25 ); source = new QLineEdit( this, "Test Source" ); source -> setGeometry( 100, 20, 250, 20 ); source -> setMaxLength( 128 ); l_dsn = new QLabel( "Test Source:", this ); l_dsn -> setGeometry( 10, 20, 90, 20 ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); } dNewSource::~dNewSource() { delete cancel; delete ok; delete source; delete l_dsn; } void dManageTest::Activated( const QString &str ) { section *s = find_section( str ); if ( s ) { for ( prop *prop = s->first(); prop != 0; prop = s -> next()) { if ( strcmp( prop -> name(), "SERVER0" ) == 0 ) { set_dsn_list( dsn, prop->value()); } else if ( strcmp( prop -> name(), "LOGIN0" ) == 0 ) { uid -> setText( prop -> value()); } else if ( strcmp( prop -> name(), "PASSWORD0" ) == 0 ) { pwd -> setText( prop -> value()); } else if ( strcmp( prop -> name(), "KEYWORDS" ) == 0 ) { kw -> setText( prop -> value()); } } } else { uid -> clear(); pwd -> clear(); kw -> clear(); } } void dManageTest::Activated( int val ) { if ( test_source -> count() > 0 ) { Activated( test_source -> text( val )); } } void dManageTest::Ok() { // // find driver name // QString driver = test_source -> currentText(); if ( driver.isNull() ) { return; } // // Get section // section *s = find_section( driver.ascii()); if ( s ) { // // remove all its entries // s -> clear(); } else { s = new section( driver.ascii()); ini_list.append( s ); } // // Add the entries // prop *p = new prop( "SERVER0", dsn -> currentText()); s -> append( p ); p = new prop( "LOGIN0", uid -> text()); s -> append( p ); p = new prop( "PASSWORD0", pwd -> text()); s -> append( p ); p = new prop( "KEYWORDS", kw -> text()); s -> append( p ); } void dManageTest::NewSource() { dNewSource *dlg = new dNewSource( this -> odbctest, "New Test Sources", this ); dlg -> exec(); delete dlg; // // fill up combo box // test_source -> clear(); section *s = find_section( "SQL_DRIVERS" ); int last = 0; if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { test_source -> insertItem( p -> name()); last ++; } } Activated( last - 1 ); test_source -> setCurrentItem( last - 1 ); } void dManageTest::DelSource() { if ( test_source -> count() == 0 ) { return; } QString driver = test_source -> currentText(); char msg [128]; sprintf( msg, "Delete the test source %s ?", driver.ascii()); if ( QMessageBox::information( this, "OdbcTest", msg, "&Delete", "&Cancel", 0, 0, 1 ) == 0 ) { // // Remove it from the SQL_DRIVERS section // section *s = find_section( "SQL_DRIVERS" ); if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { if ( strcmp( p -> name(), driver.ascii()) == 0 ) { s -> remove( p ); break; } } } // // remove the section // s = find_section( driver.ascii()); if ( s ) { ini_list.removeRef( s ); remove_section( odbctest, s ); } // // fill up combo box // test_source -> clear(); s = find_section( "SQL_DRIVERS" ); if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { test_source -> insertItem( p -> name()); } } Activated( 0 ); test_source -> setCurrentItem( 0 ); } } dManageTest::dManageTest( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; init_ini_list( parent ); close = new QPushButton( "Close", this ); close->setGeometry( 270,80, 70,25 ); nw = new QPushButton( "New", this ); nw->setGeometry( 270,110, 70,25 ); del = new QPushButton( "Delete", this ); del->setGeometry( 270,140, 70,25 ); test_source = new QComboBox( FALSE, this, "test Source" ); test_source -> setGeometry( 100, 20, 250, 20 ); l_ts = new QLabel( "Test Source:", this ); l_ts -> setGeometry( 10, 20, 80, 20 ); #ifdef QT_V4LAYOUT param = new Q3ButtonGroup( "Connect Parameters", this ); #else param = new QButtonGroup( "Connect Parameters", this ); #endif param -> setGeometry( 10, 60, 240, 125 ); dsn = new QComboBox( FALSE, this, "dsn" ); dsn -> setGeometry( 80, 90, 150, 20 ); l_dsn = new QLabel( "DSN:", this ); l_dsn -> setGeometry( 20, 90, 60, 20 ); uid = new QLineEdit( this, "uid" ); uid -> setGeometry( 80, 120, 150, 20 ); uid -> setMaxLength( 128 ); l_uid = new QLabel( "UID:", this ); l_uid -> setGeometry( 20, 120, 60, 20 ); pwd = new QLineEdit( this, "pwd" ); pwd -> setGeometry( 80, 150, 150, 20 ); pwd -> setMaxLength( 128 ); l_pwd = new QLabel( "PWD:", this ); l_pwd -> setGeometry( 20, 150, 60, 20 ); kw = new QLineEdit( this, "Keywords" ); kw -> setGeometry( 80, 200, 250, 20 ); kw -> setMaxLength( 128 ); l_kw = new QLabel( "Keywords:", this ); l_kw -> setGeometry( 10, 200, 60, 20 ); connect( close, SIGNAL(clicked()), SLOT(Ok()) ); connect( close, SIGNAL(clicked()), SLOT(accept()) ); connect( nw, SIGNAL(clicked()), SLOT(NewSource()) ); connect( del, SIGNAL(clicked()), SLOT(DelSource()) ); // // fill up combo box // section *s = find_section( "SQL_DRIVERS" ); if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { test_source -> insertItem( p -> name()); } } // // fill the list of DSN's // fill_dsn_list( odbctest, dsn ); // // set up other fields // Activated( 0 ); connect( test_source, SIGNAL(activated(const QString &)), this, SLOT( Activated(const QString &))); } dManageTest::~dManageTest() { replace_ini_list( odbctest ); delete close; delete nw; delete del; delete test_source; delete dsn; delete l_dsn; delete l_ts; delete pwd; delete l_pwd; delete kw; delete l_kw; delete param; } void dManageAutoTest::Ok() { } void dManageAutoTest::SetPath( QString &qs ) { SetPath( qs.ascii()); } void dManageAutoTest::SetPath( const char *path ) { s_from -> setText( path ); // // extract any libs from the path // lib_list -> clear(); QDir q_d( path ); if ( q_d.exists()) { q_d.setFilter( QDir::Files | QDir::Hidden ); for ( int i=0; i < q_d.count(); i++ ) { lib_list -> insertItem( q_d[i] ); } } } void dManageAutoTest::Add() { int index = lib_list -> currentItem(); if ( index >= 0 ) { #ifdef QT_V4LAYOUT Q3ListBoxItem *lbi = lib_list -> item( index ); #else QListBoxItem *lbi = lib_list -> item( index ); #endif const char *name = lbi -> text(); QDir q_d( s_from->text()); QString path = q_d.filePath ( lbi->text()); /* * initialize libtool */ lt_dlinit(); lt_dlhandle handle = lt_dlopen( path.ascii()); if ( !handle ) { char msg[ 256 ]; sprintf( msg, "Unable to open file %s", lt_dlerror()); QMessageBox::critical( odbctest, "OdbcTest", msg ); } else { // // Try and extract the symbols // void *pfAutoTestDesc, *pfAutoTestFunc; BOOL (*pfAutoTestName)(LPSTR,UINT*); pfAutoTestName = (BOOL(*)(LPSTR,UINT*))lt_dlsym( handle, "AutoTestName" ); pfAutoTestDesc = lt_dlsym( handle, "AutoTestDesc" ); pfAutoTestFunc = lt_dlsym( handle, "AutoTestFunc" ); if ( !pfAutoTestName && !pfAutoTestDesc && !pfAutoTestFunc ) { char msg[ 256 ]; sprintf( msg, "Could not find one or more of AutoTestName, AutoTestDesc, or AutoTestFunc in auto test\n%s", path.ascii()); QMessageBox::critical( odbctest, "OdbcTest", msg ); lt_dlclose( handle ); return; } char test_name[ AUTO_MAX_TEST_NAME + 1 ]; UINT count; if ( pfAutoTestName ) { // // get the test name // if ( !pfAutoTestName( test_name, &count )) { char msg[ 256 ]; sprintf( msg, "AutoTestName returned FALSE in %s", path.ascii()); QMessageBox::critical( odbctest, "OdbcTest", msg ); lt_dlclose( handle ); return; } } else { char msg[ 256 ]; sprintf( msg, "AutoTestName not exported from %s", path.ascii()); QMessageBox::critical( odbctest, "OdbcTest", msg ); lt_dlclose( handle ); return; } // // if we are here, we can add it // // section *s = find_section( test_name ); if ( s ) { char msg[ 256 ]; sprintf( msg, "Auto test '%s'already installed", test_name ); QMessageBox::information( odbctest, "OdbcTest", msg ); lt_dlclose( handle ); return; } char number[ 64 ]; s = find_section( "Auto Tests" ); sprintf( number, "%d", count ); prop *p = new prop( test_name, number ); s -> append( p ); s = new section( test_name ); ini_list.append( s ); p = new prop( "DLL", path.ascii()); s -> append( p ); lt_dlclose( handle ); s = find_section( "Auto Tests" ); test_list -> clear(); if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { test_list -> insertItem( p -> name()); } } test_list -> setCurrentItem( 0 ); ListSelect( test_name ); } } } void dManageAutoTest::From() { #ifdef QT_V4LAYOUT Q3FileDialog *dlg = new Q3FileDialog( this, "fred", TRUE ); dlg -> setMode( Q3FileDialog::Directory ); #else QFileDialog *dlg = new QFileDialog( this, "fred", TRUE ); dlg -> setMode( QFileDialog::Directory ); #endif if ( dlg -> exec() == QDialog::Accepted ) { QString result = dlg -> selectedFile(); SetPath( result ); } delete dlg; } void dManageAutoTest::ListSelect( const QString &name ) { section *s = find_section( name.ascii()); if ( s ) { s_name -> setText( name.ascii()); s_lib -> setText( "" ); for ( prop *prop = s->first(); prop != 0; prop = s -> next()) { if ( strcmp( prop -> name(), "DLL" ) == 0 ) { s_lib -> setText( prop->value()); } } } else { s_name -> setText( "" ); s_lib -> setText( "" ); } } void dManageAutoTest::Remove() { int index = test_list -> currentItem(); if ( index >= 0 ) { QString autotest = test_list->text(index); // // remove it from the Auto Test section // section *s = find_section( "Auto Tests" ); if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { if ( strcmp( p -> name(), autotest.ascii()) == 0 ) { s -> remove( p ); break; } } } // // remove the section // s = find_section( autotest ); if ( s ) { ini_list.removeRef( s ); remove_section( odbctest, s ); } // // update combo box // s = find_section( "Auto Tests" ); s_name -> setText( "" ); s_lib -> setText( "" ); test_list -> clear(); if ( s ) { prop *p; int first = 1; for ( p = s -> first(); p != 0; p = s -> next()) { test_list -> insertItem( p -> name()); if ( first ) { ListSelect( p -> name()); first = 0; } } } test_list -> setCurrentItem( 0 ); } } dManageAutoTest::dManageAutoTest( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; init_ini_list( parent ); from = new QPushButton( "From", this ); from->setGeometry( 10,18, 70,25 ); s_from = new QLabel( "Path", this ); s_from -> setGeometry( 100, 20, 300, 20 ); add = new QPushButton( "Add >", this ); add->setGeometry( 180,90, 70,25 ); remove = new QPushButton( "< Remove", this ); remove->setGeometry( 180,130, 70,25 ); close = new QPushButton( "Close", this ); close->setGeometry( 180,200, 70,25 ); #ifdef QT_V4LAYOUT lib_list = new Q3ListBox( this, "Lib List" ); #else lib_list = new QListBox( this, "Lib List" ); #endif lib_list -> setGeometry( 10, 80, 150, 160 ); #ifdef QT_V4LAYOUT test_list = new Q3ListBox( this, "Test List" ); #else test_list = new QListBox( this, "Test List" ); #endif test_list -> setGeometry( 270, 80, 250, 160 ); l_avail = new QLabel( "Available Test Libs:", this ); l_avail -> setGeometry( 10, 55, 200, 20 ); l_lib = new QLabel( "Installed Auto Tests:", this ); l_lib -> setGeometry( 270, 55, 200, 20 ); l_name = new QLabel( "Name:", this ); l_name -> setGeometry( 10, 255, 200, 20 ); l_so = new QLabel( "Lib:", this ); l_so -> setGeometry( 10, 280, 200, 20 ); s_name = new QLabel( "NAME", this ); s_name -> setGeometry( 70, 255, 200, 20 ); s_lib = new QLabel( "LIB", this ); s_lib -> setGeometry( 70, 280, 300, 20 ); connect( close, SIGNAL(clicked()), SLOT(Ok()) ); connect( close, SIGNAL(clicked()), SLOT(accept()) ); connect( from, SIGNAL(clicked()), SLOT(From()) ); connect( add, SIGNAL(clicked()), SLOT(Add()) ); connect( remove, SIGNAL(clicked()), SLOT(Remove()) ); // // fill up combo box // section *s = find_section( "Auto Tests" ); if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { test_list -> insertItem( p -> name()); } } // // Setup the path, initially to the current directory // getcwd( curr_dir, sizeof( curr_dir )); SetPath( curr_dir ); connect( test_list, SIGNAL(highlighted( const QString &)), SLOT(ListSelect(const QString &)) ); test_list -> setCurrentItem( 0 ); } dManageAutoTest::~dManageAutoTest() { replace_ini_list( odbctest ); delete close; delete add; delete remove; delete from; delete s_from; delete lib_list; delete test_list; delete l_avail; delete l_lib; delete l_name; delete l_so; delete s_name; delete s_lib; } void dNewGroup::Ok() { QString name = source -> text(); prop *p; // // check if its allready there // // section *s = find_section( "GROUPS" ); if ( s ) { for ( p = s->first(); p != 0; p = s -> next()) { if ( strcmp( p -> name(), name ) == 0 ) { char msg[ 128 ]; sprintf( msg, "Group (%s) already defined", name.ascii()); QMessageBox::critical( this, "OdbcTest", msg ); return; } } p = new prop( name.ascii(), "Installed" ); s -> append( p ); s = new section( name ); ini_list.append( s ); parent_test -> group -> insertItem( p -> name()); parent_test->group->setCurrentItem( parent_test->group->count() - 1 ); parent_test -> Activated( p -> name()); } } dNewGroup::dNewGroup( OdbcTest *parent, QString name, dManageTestGroup *ptest ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; parent_test = ptest; cancel = new QPushButton( "Close", this ); cancel->setGeometry( 200,50, 70,25 ); ok = new QPushButton( "Ok", this ); ok->setGeometry( 110,50, 70,25 ); source = new QLineEdit( this, "Test Group" ); source -> setGeometry( 100, 20, 250, 20 ); source -> setMaxLength( 128 ); l_dsn = new QLabel( "Test Group:", this ); l_dsn -> setGeometry( 10, 20, 90, 20 ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); } dNewGroup::~dNewGroup() { delete cancel; delete ok; delete source; delete l_dsn; } void dManageTestGroup::Ok() { } // // for a given test, look at each entry in the auto test section, see if it // is in the group section, if so it goes in the selected, else the installed list // void dManageTestGroup::update_test_lists( void ) { section *s = find_section( "Auto Tests" ); QString current_text = group->currentText(); section *s_group = find_section( current_text ); auto_list->clear(); sauto_list->clear(); if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { prop *atprop; int found = 0; for ( atprop = s_group -> first(); atprop != 0; atprop = s_group -> next()) { if ( strcmp( atprop -> name(), p -> name()) == 0 ) { found = 1; break; } } if ( found ) { sauto_list->insertItem( p->name()); } else { auto_list->insertItem( p->name()); } } } } void dManageTestGroup::Activated( const QString &str ) { update_test_lists(); } void dManageTestGroup::Activated( int val ) { if ( group -> count() > 0 ) Activated( group -> text( val )); } void dManageTestGroup::Add() { int index = auto_list -> currentItem(); QString current_text = group->currentText(); if ( index >= 0 ) { #ifdef QT_V4LAYOUT Q3ListBoxItem *lbi = auto_list -> item( index ); #else QListBoxItem *lbi = auto_list -> item( index ); #endif section *s = find_section( current_text ); prop *p = new prop( lbi -> text(), "Installed" ); s -> append( p ); update_test_lists(); } } void dManageTestGroup::Remove() { int index = sauto_list -> currentItem(); QString current_group = group->currentText(); if ( index >= 0 ) { #ifdef QT_V4LAYOUT Q3ListBoxItem *lbi = sauto_list -> item( index ); #else QListBoxItem *lbi = sauto_list -> item( index ); #endif section *s = find_section( current_group ); prop *p; // // find element // for ( p = s->first(); p != 0; p = s -> next()) { if ( strcmp( p -> name(), lbi -> text()) == 0 ) { s -> remove( p ); break; } } update_test_lists(); } } void dManageTestGroup::New() { dNewGroup *dlg = new dNewGroup( this -> odbctest, "New Test Group", this ); dlg -> exec(); delete dlg; } void dManageTestGroup::Delete() { if ( group -> count() == 0 ) { return; } QString grp = group -> currentText(); char msg [128]; sprintf( msg, "Delete the test group %s ?", grp.ascii()); if ( QMessageBox::information( this, "OdbcTest", msg, "&Delete", "&Cancel", 0, 0, 1 ) == 0 ) { // // Remove it from the GROUPS section // section *s = find_section( "GROUPS" ); if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { if ( strcmp( p -> name(), grp.ascii()) == 0 ) { s -> remove( p ); break; } } } // // remove the section // s = find_section( grp.ascii()); if ( s ) { ini_list.removeRef( s ); remove_section( odbctest, s ); } // // fill up combo box // group -> clear(); s = find_section( "GROUPS" ); if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { group -> insertItem( p -> name()); } } group -> setCurrentItem( 0 ); Activated( 0 ); } } dManageTestGroup::dManageTestGroup( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; init_ini_list( parent ); nw = new QPushButton( "New", this ); nw->setGeometry( 300,15, 70,25 ); del = new QPushButton( "Delete", this ); del->setGeometry( 380,15, 70,25 ); add = new QPushButton( "Add >", this ); add->setGeometry( 280,90, 70,25 ); remove = new QPushButton( "< Remove", this ); remove->setGeometry( 280,130, 70,25 ); close = new QPushButton( "Close", this ); close->setGeometry( 280,200, 70,25 ); group = new QComboBox( FALSE, this, "group" ); group -> setGeometry( 100, 15, 180, 20 ); l_group = new QLabel( "Test Group:", this ); l_group -> setGeometry( 10, 15, 60, 20 ); l_auto = new QLabel( "Installed Auto Tests:", this ); l_auto -> setGeometry( 10, 60, 160, 20 ); l_sauto = new QLabel( "Selected Auto Tests:", this ); l_sauto -> setGeometry( 370, 60, 160, 20 ); #ifdef QT_V4LAYOUT auto_list = new Q3ListBox( this, "Auto List" ); #else auto_list = new QListBox( this, "Auto List" ); #endif auto_list -> setGeometry( 10, 80, 250, 160 ); #ifdef QT_V4LAYOUT sauto_list = new Q3ListBox( this, "Selected Auto List" ); #else sauto_list = new QListBox( this, "Selected Auto List" ); #endif sauto_list -> setGeometry( 370, 80, 250, 160 ); connect( close, SIGNAL(clicked()), SLOT(Ok()) ); connect( close, SIGNAL(clicked()), SLOT(accept()) ); connect( add, SIGNAL(clicked()), SLOT(Add()) ); connect( remove, SIGNAL(clicked()), SLOT(Remove()) ); connect( nw, SIGNAL(clicked()), SLOT(New()) ); connect( del, SIGNAL(clicked()), SLOT(Delete()) ); // // fill up combo box // section *s = find_section( "GROUPS" ); if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { group -> insertItem( p -> name()); } } Activated( 0 ); connect( group, SIGNAL(activated(const QString &)), this, SLOT( Activated(const QString &))); } dManageTestGroup::~dManageTestGroup() { replace_ini_list( odbctest ); delete close; delete add; delete remove; delete nw; delete del; delete group; delete l_group; delete l_auto; delete l_sauto; delete auto_list; delete sauto_list; } #ifdef QT_V4LAYOUT MYQListViewItem::MYQListViewItem( Q3ListView * parent, MYQListViewItem *after, QString label1, QString label2 ) :Q3ListViewItem( parent, after, label1, label2 ) #else MYQListViewItem::MYQListViewItem( QListView * parent, MYQListViewItem *after, QString label1, QString label2 ) :QListViewItem( parent, after, label1, label2 ) #endif { test_index = 0; test_group = label1; test_name = QString::null; test_name = QString::null; } #ifdef QT_V4LAYOUT MYQListViewItem::MYQListViewItem( MYQListViewItem * parent, QString label1, QString label2, int index, QString _test_name ) :Q3ListViewItem( parent, label1, label2 ) #else MYQListViewItem::MYQListViewItem( MYQListViewItem * parent, QString label1, QString label2, int index, QString _test_name ) :QListViewItem( parent, label1, label2 ) #endif { test_index = index; test_source = _test_name; test_name = label1; } #ifdef QT_V4LAYOUT MYQListViewItem::MYQListViewItem( MYQListViewItem * parent, MYQListViewItem *after, QString label1, QString label2, int index, QString _test_name ) :Q3ListViewItem( parent, after, label1, label2 ) #else MYQListViewItem::MYQListViewItem( MYQListViewItem * parent, MYQListViewItem *after, QString label1, QString label2, int index, QString _test_name ) :QListViewItem( parent, after, label1, label2 ) #endif { test_index = index; test_source = _test_name; test_name = label1; } MYQListViewItem* MYQListViewItem::firstChild() { #ifdef QT_V4LAYOUT return (MYQListViewItem*) Q3ListViewItem::firstChild(); #else return (MYQListViewItem*) QListViewItem::firstChild(); #endif } MYQListViewItem * MYQListViewItem::parent() { #ifdef QT_V4LAYOUT return (MYQListViewItem*) Q3ListViewItem::parent(); #else return (MYQListViewItem*) QListViewItem::parent(); #endif } MYQListViewItem * MYQListViewItem::nextSibling() { #ifdef QT_V4LAYOUT return (MYQListViewItem*) Q3ListViewItem::nextSibling(); #else return (MYQListViewItem*) QListViewItem::nextSibling(); #endif } void MYQListViewItem::set_down( BOOL state ) { if ( firstChild() ) { firstChild()->set_down( state ); } if ( nextSibling()) { nextSibling()->set_down( state ); } setSelected( state ); repaint(); } void MYQListViewItem::activate() { int state = !isSelected(); if ( state ) { MYQListViewItem *p = this; while ((p = p->parent())) { p -> setSelected( state ); p -> repaint(); } } if ( firstChild() ) { firstChild()->set_down( state ); } } void dRunAutoTests::Ok() { // // use each selected source with all selected tests // int i; QString group_name; SERVERINFO server_info; char msg[ 1024 ]; // // set up callback, handle // static_odbctest = odbctest; for ( i = 0; i < sources -> count(); i ++ ) { if ( sources -> isSelected( i )) { MYQListViewItem *group; QString src = sources -> text( i ); // walk tree group = (MYQListViewItem *) tests -> firstChild(); while( group ) { if ( group -> isSelected()) { sprintf( msg, "Now executing Group %s on source %s", group->group().ascii(), src.ascii()); print_to_odbctest( &server_info, msg, 0 ); section *src_section; if ( strcmp( src.ascii(), "ODBC Test Handles" ) == 0 ) { src_section = NULL; server_info.henv = odbctest->get_handle( SQL_HANDLE_ENV ); server_info.hdbc = odbctest->get_handle( SQL_HANDLE_DBC ); server_info.hstmt = odbctest->get_handle( SQL_HANDLE_STMT ); } else { src_section = find_section( src ); server_info.henv = NULL; server_info.hdbc = NULL; server_info.hstmt = NULL; } server_info.szSource[ 0 ] = '\0'; server_info.szValidServer0[ 0 ] = '\0'; server_info.szValidLogin0[ 0 ] = '\0'; server_info.szValidPassword0[ 0 ] = '\0'; server_info.szKeywords[ 0 ] = '\0'; server_info.cErrors = 0; if ( b_debug -> isChecked()) server_info.fDebug = 1; else server_info.fDebug = 0; if ( b_isolate -> isChecked()) server_info.fIsolate = 1; else server_info.fIsolate = 0; if ( b_screen -> isChecked()) server_info.fScreen = 1; else server_info.fScreen = 0; server_info.vCursorLib = cursor_state; if ( b_log_file -> isChecked()) { strcpy( server_info.szLogFile, l_log->text()); server_info.fLog = 1; } else { server_info.szLogFile[ 0 ] = '\0'; server_info.fLog = 0; } server_info.hLoadedInst = NULL; if ( src_section ) { for ( prop *prop = src_section->first(); prop != 0; prop = src_section -> next()) { if ( strcmp( prop -> name(), "SERVER0" ) == 0 ) { strcpy( server_info.szValidServer0, prop -> value()); } else if ( strcmp( prop -> name(), "LOGIN0" ) == 0 ) { strcpy( server_info.szValidLogin0, prop -> value()); } else if ( strcmp( prop -> name(), "PASSWORD0" ) == 0 ) { strcpy( server_info.szValidPassword0, prop -> value()); } else if ( strcmp( prop -> name(), "KEYWORDS" ) == 0 ) { strcpy( server_info.szKeywords, prop -> value()); } } } strcpy( server_info.szSource, src.ascii()); server_info.cBuff = 0; sprintf( msg, "Keywords: %s", server_info.szKeywords ); print_to_odbctest( &server_info, msg, 0 ); MYQListViewItem *sect = group -> firstChild(); while( sect ) { if ( sect -> isSelected()) { sprintf( msg, "Now Executing Auto Test: %s", sect->name().ascii()); print_to_odbctest( &server_info, msg, 1 ); sprintf( msg, "Source: %s", src.ascii()); print_to_odbctest( &server_info, msg, 1 ); sprintf( msg, "Time started %s", get_time_str()); print_to_odbctest( &server_info, msg, 1 ); // run tests // open driver section *s = find_section( sect->name()); /* * initialize libtool */ lt_dlinit(); if ( s ) { for ( prop *prop = s->first(); prop != 0; prop = s -> next()) { if ( strcmp( prop -> name(), "DLL" ) == 0 ) { lt_dlhandle handle = lt_dlopen( prop -> value()); // // open the lib // if ( handle ) { void (*pfAutoTestFunc)(lpSERVERINFO); BOOL (*pfAutoTestName)(LPSTR,UINT*); pfAutoTestFunc = (void(*)(lpSERVERINFO))lt_dlsym( handle, "AutoTestFunc" ); pfAutoTestName = (BOOL(*)(LPSTR,UINT*))lt_dlsym( handle, "AutoTestName" ); if ( !pfAutoTestFunc ) { sprintf( msg, "Can't Find AutoTestFunc in %s", prop -> value()); print_to_odbctest( &server_info, msg, 1 ); } else if ( !pfAutoTestName ) { sprintf( msg, "Can't Find AutoTestName in %s", prop -> value()); print_to_odbctest( &server_info, msg, 1 ); } else { char test_name[ AUTO_MAX_TEST_NAME + 1 ]; UINT count; if ( !pfAutoTestName( test_name, &count )) { sprintf( msg, "AutoTestName returns FALSE" ); print_to_odbctest( &server_info, msg, 1 ); } else { int size; size = count / (sizeof(unsigned int)*8); size ++; server_info.rglMask = (UINT FAR *)calloc( sizeof(unsigned int), size ); server_info.hwnd = (void*)callback_function; // now we are ready if ( b_isolate -> isChecked()) { MYQListViewItem *test = sect -> firstChild(); while( test ) { if ( test -> isSelected()) { SETBIT(server_info.rglMask, test->index()); pfAutoTestFunc(&server_info); } test = test -> nextSibling(); } } else { MYQListViewItem *test = sect -> firstChild(); memset( server_info.rglMask, 0, sizeof(unsigned int) * size ); while( test ) { if ( test -> isSelected()) { SETBIT(server_info.rglMask, test->index()); } test = test -> nextSibling(); } pfAutoTestFunc(&server_info); } sprintf( msg, "Error Count: %d", server_info.cErrors); print_to_odbctest( &server_info, msg, 1 ); free( server_info.rglMask ); } } lt_dlclose( handle ); } else { sprintf( msg, "Can't open %s", prop -> value()); print_to_odbctest( &server_info, msg, 1 ); } } } } sprintf( msg, "Time finished %s", get_time_str()); print_to_odbctest( &server_info, msg, 1 ); } sect = sect -> nextSibling(); } } group = group -> nextSibling(); } } } } void dRunAutoTests::Log() { #ifdef QT_V4LAYOUT Q3FileDialog *dlg = new Q3FileDialog( this, "fred", TRUE ); dlg -> setMode( Q3FileDialog::AnyFile ); #else QFileDialog *dlg = new QFileDialog( this, "fred", TRUE ); dlg -> setMode( QFileDialog::AnyFile ); #endif dlg -> setSelection( l_log -> text()); if ( dlg -> exec() == QDialog::Accepted ) { QString result = dlg -> selectedFile(); l_log -> setText( result ); } delete dlg; } void dRunAutoTests::LogChanged( int state ) { if ( state ) { log_file -> setEnabled( TRUE ); l_log -> setEnabled( TRUE ); } else { log_file -> setEnabled( FALSE ); l_log -> setEnabled( FALSE ); } } void dRunAutoTests::CursorChanged( int state ) { if ( state == 0 ) { cursor_state = SQL_CUR_USE_DRIVER; } else if ( state == 1 ) { cursor_state = SQL_CUR_USE_IF_NEEDED; } else if ( state == 1 ) { cursor_state = SQL_CUR_USE_ODBC; } } void dRunAutoTests::add_auto_test( const char * test_name, MYQListViewItem *top, MYQListViewItem **item ) { section *s = find_section( test_name ); if ( s ) { for ( prop *prop = s->first(); prop != 0; prop = s -> next()) { if ( strcmp( prop -> name(), "DLL" ) == 0 ) { /* * initialize libtool */ lt_dlinit(); // // open the lib // lt_dlhandle handle = lt_dlopen( prop -> value()); if ( handle ) { void *pfAutoTestFunc; BOOL (*pfAutoTestName)(LPSTR,UINT*); BOOL (*pfAutoTestDesc)(UWORD,LPSTR,LPSTR); pfAutoTestName = (BOOL(*)(LPSTR,UINT*))lt_dlsym( handle, "AutoTestName" ); pfAutoTestDesc = (BOOL(*)(UWORD,LPSTR,LPSTR))lt_dlsym( handle, "AutoTestDesc" ); pfAutoTestFunc = lt_dlsym( handle, "AutoTestFunc" ); if ( !pfAutoTestName || !pfAutoTestDesc || !pfAutoTestFunc ) { lt_dlclose( handle ); return; } char test_name[ AUTO_MAX_TEST_NAME + 1 ]; char func_name[ AUTO_MAX_TESTCASE_NAME + 1 ]; char test_desc[ AUTO_MAX_TESTDESC_NAME + 1 ]; UINT count; // // get the test name // if ( !pfAutoTestName( test_name, &count )) { lt_dlclose( handle ); return; } *item = new MYQListViewItem( top, *item, test_name ); MYQListViewItem *after = NULL; for ( int i = 1; i <= count; i ++ ) { if( pfAutoTestDesc( i, func_name, test_desc )) { if ( after ) { MYQListViewItem *test = new MYQListViewItem( *item, after, func_name, test_desc, i, test_name ); after = test; } else { MYQListViewItem *test = new MYQListViewItem( *item, func_name, test_desc, i, test_name ); after = test; } } } lt_dlclose( handle ); } } } } } void dRunAutoTests::TestsChanged() { int i, ok1 = 0, ok2 = 0; MYQListViewItem *group; for ( i = 0; i < sources -> count(); i ++ ) { if ( sources -> isSelected( i )) { ok1 = 1; break; } } group = (MYQListViewItem*) tests -> firstChild(); while( group ) { if ( group -> isSelected()) { ok2 = 1; break; } group = group -> nextSibling(); } if ( ok1 && ok2 ) { ok -> setEnabled( TRUE ); } else { ok -> setEnabled( FALSE ); } } dRunAutoTests::dRunAutoTests( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; init_ini_list( parent ); l_tests = new QLabel( "Auto Tests:", this ); l_tests -> setGeometry( 10, 15, 60, 20 ); #ifdef QT_V4LAYOUT tests = new Q3ListView( this, "auto tests" ); #else tests = new QListView( this, "auto tests" ); #endif tests -> setGeometry( 10, 40, 300, 150 ); tests -> addColumn( "Tests", -1 ); tests -> setRootIsDecorated( TRUE ); tests -> setMultiSelection( TRUE ); tests -> setSorting( -1 ); tests -> header()->hide(); l_sources = new QLabel( "Test Sources:", this ); l_sources -> setGeometry( 320, 15, 80, 20 ); #ifdef QT_V4LAYOUT sources = new Q3ListBox( this, "Test Sources" ); sources -> setSelectionMode( Q3ListBox::Multi ); #else sources = new QListBox( this, "Test Sources" ); sources -> setSelectionMode( QListBox::Multi ); #endif sources -> setGeometry( 320, 40, 150, 220 ); #ifdef QT_V4LAYOUT output = new Q3ButtonGroup( "Output", this ); #else output = new QButtonGroup( "Output", this ); #endif output -> setGeometry( 10, 200, 90, 80 ); b_log_file = new QCheckBox( "Log File", output, "Log File" ); b_log_file -> setGeometry( 10, 20, 70, 20 ); b_screen = new QCheckBox( "Screen", output, "Screen" ); b_screen -> setGeometry( 10, 50, 70, 20 ); b_screen -> setChecked( TRUE ); #ifdef QT_V4LAYOUT options = new Q3ButtonGroup( "Options", this ); #else options = new QButtonGroup( "Options", this ); #endif options -> setGeometry( 110, 200, 200, 80 ); b_debug = new QCheckBox( "Debug", options, "Debug" ); b_debug -> setGeometry( 10, 20, 80, 20 ); b_isolate = new QCheckBox( "Isolate tests", options, "Isolate" ); b_isolate -> setGeometry( 10, 50, 100, 20 ); b_cursor = new QCheckBox( "Cursor Library", options, "Cursor Library" ); b_cursor -> setGeometry( 90, 20, 100, 20 ); b_cursor -> setTristate( TRUE ); run_list = new QPushButton( "Run List...", this ); run_list -> setGeometry( 10, 290, 70, 25 ); run_list -> setEnabled( FALSE ); rlist = new QComboBox( FALSE, this, "Run List" ); rlist -> setGeometry( 100, 290, 150, 20 ); rlist -> insertItem( "", 0 ); rlist -> setEnabled( FALSE ); ok = new QPushButton( "Ok", this ); ok -> setGeometry( 320, 290, 70, 25 ); ok -> setEnabled( FALSE ); cancel = new QPushButton( "Cancel", this ); cancel -> setGeometry( 400, 290, 70, 25 ); log_file = new QPushButton( "Log File...", this ); log_file -> setGeometry( 10, 320, 70, 25 ); log_file -> setEnabled( FALSE ); l_log = new QLabel( "auto.log", this ); l_log -> setGeometry( 89, 320, 380, 20 ); l_log -> setEnabled( FALSE ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( log_file, SIGNAL(clicked()), SLOT(Log()) ); connect( b_log_file, SIGNAL(stateChanged(int)), SLOT(LogChanged(int))); cursor_state = SQL_CUR_USE_DRIVER; connect( b_cursor, SIGNAL(stateChanged(int)), SLOT(CursorChanged(int))); connect( sources, SIGNAL(selectionChanged()), SLOT(TestsChanged())); connect( tests, SIGNAL(selectionChanged()), SLOT(TestsChanged())); // // Fill test sources // section *s = find_section( "SQL_DRIVERS" ); if ( s ) { prop *p; for ( p = s -> first(); p != 0; p = s -> next()) { sources -> insertItem( p -> name()); } } sources -> insertItem( "ODBC Test Handles" ); MYQListViewItem *top = NULL; MYQListViewItem *last_test = NULL; // // fill auto tests // s = find_section( "Auto Tests" ); if ( s ) { prop *p; top = new MYQListViewItem( tests, top, "All" ); last_test = NULL ; for ( p = s -> first(); p != 0; p = s -> next()) { add_auto_test( p -> name(), top, &last_test ); } } // // fill individual tests // s = find_section( "GROUPS" ); if ( s ) { prop *p, *p1; for ( p = s -> first(); p != 0; p = s -> next()) { section *s1 = find_section( p -> name() ); if ( s1 ) { top = new MYQListViewItem( tests, top, p -> name()); last_test = NULL ; for ( p1 = s1-> first(); p1 != 0; p1 = s1-> next()) { add_auto_test( p1 -> name(), top, &last_test ); } } } } } dRunAutoTests::~dRunAutoTests() { replace_ini_list( odbctest ); delete l_tests; delete tests; delete l_sources; delete sources; delete output; delete options; delete run_list; delete rlist; delete ok; delete cancel; delete log_file; delete l_log; } void OdbcTest::options() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::trace() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::manage_test() { dManageTest *dlg = new dManageTest( this, "Manage Test Sources" ); dlg -> exec(); delete dlg; } void OdbcTest::manage_auto_test() { dManageAutoTest *dlg = new dManageAutoTest( this, "Manage Auto Test" ); dlg -> exec(); delete dlg; } void OdbcTest::manage_test_groups() { dManageTestGroup *dlg = new dManageTestGroup( this, "Manage Test Groups" ); dlg -> exec(); delete dlg; } void OdbcTest::run_auto_tests() { dRunAutoTests *dlg = new dRunAutoTests( this, "Run Auto Tests" ); dlg -> exec(); delete dlg; } unixODBC-2.2.14-p2/odbctest/stmt.cpp0100644000076400007640000017414610564253475015527 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: stmt.cpp,v 1.6 2007/02/13 06:14:21 peteralexharvey Exp $ * * $Log: stmt.cpp,v $ * Revision 1.6 2007/02/13 06:14:21 peteralexharvey * caught a missed SQLULEN * * Revision 1.5 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.4 2002/05/29 10:22:58 lurcher * * Changes and tidy's * * Revision 1.3 2001/12/20 17:26:26 lurcher * * More warnings removed * * Revision 1.2 2001/12/20 12:30:44 lurcher * * Fix 64 problem in odbctest and 7.1 Postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:31 lurcher * * First upload to SourceForge * * Revision 1.5 2001/10/02 16:32:52 nick * * Alter unicode TCHAR defs * * Revision 1.4 2001/07/20 09:42:59 nick * * Replace char[] with QString to avoid buffer overrun * * Revision 1.3 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.2 2000/12/17 10:51:33 nick * * Add include for sqlucode.h * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.8 2000/06/23 16:23:24 ngorham * * Couple of small changes * * Revision 1.7 2000/06/15 09:31:04 ngorham * * Add some fixes and porting options after 1.8.9 has been released * * Revision 1.6 2000/06/13 12:30:29 ngorham * * Enough there for the first release I think * * Revision 1.5 2000/06/09 17:04:22 ngorham * * More, and More * * Revision 1.4 2000/06/07 15:10:23 ngorham * * More additions * * Revision 1.3 2000/06/07 08:29:48 ngorham * * More additions * * Revision 1.2 2001/05/31 10:26:27 ngorham * * Fix a few minor typo's * * Revision 1.1 2000/05/04 17:04:48 ngorham * * Initial commit * * **********************************************************************/ #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include #include #include #include #include "stmt.h" #include "odbctest.h" static attr_value io_type_option[] = { { "SQL_PARAM_INPUT", SQL_PARAM_INPUT, "2.0" }, { "SQL_PARAM_INPUT_OUTPUT", SQL_PARAM_INPUT_OUTPUT, "2.0" }, { "SQL_PARAM_INPUT", SQL_PARAM_OUTPUT, "2.0" }, { NULL } }; static attr_value value_type_option[] = { { "SQL_C_CHAR", SQL_C_CHAR, "1.0" }, { "SQL_C_BINARY", SQL_C_BINARY, "1.0" }, { "SQL_C_BIT", SQL_C_BIT, "1.0" }, { "SQL_C_BOOKMARK", SQL_C_BOOKMARK, "2.0" }, { "SQL_C_DATE", SQL_C_DATE, "1.0" }, { "SQL_C_DOUBLE", SQL_C_DOUBLE, "1.0" }, { "SQL_C_FLOAT", SQL_C_FLOAT, "1.0" }, { "SQL_C_GUID", SQL_C_GUID, "1.0" }, { "SQL_C_INTERVAL_DAY", SQL_C_INTERVAL_DAY, "3.0" }, { "SQL_C_INTERVAL_DAY_TO_HOUR", SQL_C_INTERVAL_DAY_TO_HOUR, "3.0" }, { "SQL_C_INTERVAL_DAY_TO_MINUTE", SQL_C_INTERVAL_DAY_TO_MINUTE, "3.0" }, { "SQL_C_INTERVAL_DAY_TO_SECOND", SQL_C_INTERVAL_DAY_TO_SECOND, "3.0" }, { "SQL_C_INTERVAL_HOUR", SQL_C_INTERVAL_HOUR, "3.0" }, { "SQL_C_INTERVAL_HOUR_TO_MINUTE", SQL_C_INTERVAL_HOUR_TO_MINUTE, "3.0" }, { "SQL_C_INTERVAL_HOUR_TO_SECOND", SQL_C_INTERVAL_HOUR_TO_SECOND, "3.0" }, { "SQL_C_INTERVAL_MINUTE", SQL_C_INTERVAL_MINUTE, "3.0" }, { "SQL_C_INTERVAL_MINUTE_TO_SECOND", SQL_C_INTERVAL_MINUTE_TO_SECOND, "3.0" }, { "SQL_C_INTERVAL_SECOND", SQL_C_INTERVAL_SECOND, "3.0" }, { "SQL_C_INTERVAL_YEAR", SQL_C_INTERVAL_YEAR, "3.0" }, { "SQL_C_INTERVAL_MONTH", SQL_C_INTERVAL_MONTH, "3.0" }, { "SQL_C_INTERVAL_YEAR_TO_MONTH", SQL_C_INTERVAL_YEAR_TO_MONTH, "3.0" }, { "SQL_C_LONG", SQL_C_LONG, "2.0" }, { "SQL_C_NUMERIC", SQL_C_NUMERIC, "3.0" }, { "SQL_C_SBIGINT", SQL_C_SBIGINT, "3.0" }, { "SQL_C_SLONG", SQL_C_SLONG, "2.0" }, { "SQL_C_SHORT", SQL_C_SHORT, "2.0" }, { "SQL_C_SSHORT", SQL_C_SSHORT, "2.0" }, { "SQL_C_STINYINT", SQL_C_STINYINT, "2.0" }, { "SQL_C_TIME", SQL_C_TIME, "1.0" }, { "SQL_C_TIMESTAMP", SQL_C_TIMESTAMP, "1.0" }, { "SQL_C_TINYINT", SQL_C_TINYINT, "1.0" }, { "SQL_C_TYPE_DATE", SQL_C_TYPE_DATE, "3.0" }, { "SQL_C_TYPE_TIME", SQL_C_TYPE_TIME, "3.0" }, { "SQL_C_TYPE_TIMESTAMP", SQL_C_TYPE_TIMESTAMP, "3.0" }, { "SQL_C_UBIGINT", SQL_C_UBIGINT, "2.0" }, { "SQL_C_USHORT", SQL_C_USHORT, "2.0" }, { "SQL_C_UTINYINT", SQL_C_UTINYINT, "2.0" }, { "SQL_C_VARBOOKMARK", SQL_C_VARBOOKMARK, "3.0" }, { "SQL_C_WCHAR", SQL_C_WCHAR, "3.0" }, { "SQL_ARD_TYPE", SQL_ARD_TYPE, "3.0" }, { "SQL_C_DEFAULT", SQL_C_DEFAULT, "1.0" }, { NULL } }; static attr_value param_type_option[] = { { "SQL_CHAR", SQL_CHAR, "1.0" }, { "SQL_BIGINT", SQL_BIGINT, "1.0" }, { "SQL_BINARY", SQL_BINARY, "1.0" }, { "SQL_BIT", SQL_BIT, "1.0" }, { "SQL_DATE", SQL_DATE, "1.0" }, { "SQL_DECIMAL", SQL_DECIMAL, "1.0" }, { "SQL_DEFAULT", SQL_DECIMAL, "3.0" }, { "SQL_DOUBLE", SQL_DOUBLE, "1.0" }, { "SQL_FLOAT", SQL_FLOAT, "1.0" }, { "SQL_GUID", SQL_GUID, "1.0" }, { "SQL_INTEGER", SQL_INTEGER, "1.0" }, { "SQL_INTERVAL_DAY", SQL_INTERVAL_DAY, "3.0" }, { "SQL_INTERVAL_DAY_TO_HOUR", SQL_INTERVAL_DAY_TO_HOUR, "3.0" }, { "SQL_INTERVAL_DAY_TO_MINUTE", SQL_INTERVAL_DAY_TO_MINUTE, "3.0" }, { "SQL_INTERVAL_DAY_TO_SECOND", SQL_INTERVAL_DAY_TO_SECOND, "3.0" }, { "SQL_INTERVAL_HOUR", SQL_INTERVAL_HOUR, "3.0" }, { "SQL_INTERVAL_HOUR_TO_MINUTE", SQL_INTERVAL_HOUR_TO_MINUTE, "3.0" }, { "SQL_INTERVAL_HOUR_TO_SECOND", SQL_INTERVAL_HOUR_TO_SECOND, "3.0" }, { "SQL_INTERVAL_MINUTE", SQL_INTERVAL_MINUTE, "3.0" }, { "SQL_INTERVAL_MINUTE_TO_SECOND", SQL_INTERVAL_MINUTE_TO_SECOND, "3.0" }, { "SQL_INTERVAL_SECOND", SQL_INTERVAL_SECOND, "3.0" }, { "SQL_INTERVAL_YEAR", SQL_INTERVAL_YEAR, "3.0" }, { "SQL_INTERVAL_MONTH", SQL_INTERVAL_MONTH, "3.0" }, { "SQL_INTERVAL_YEAR_TO_MONTH", SQL_INTERVAL_YEAR_TO_MONTH, "3.0" }, { "SQL_LONGVARCHAR", SQL_LONGVARCHAR, "1.0" }, { "SQL_LONGVARBINARY", SQL_LONGVARBINARY, "1.0" }, { "SQL_NUMERIC", SQL_NUMERIC, "1.0" }, { "SQL_REAL", SQL_REAL, "1.0" }, { "SQL_SMALLINT", SQL_SMALLINT, "1.0" }, { "SQL_TINYINT", SQL_TINYINT, "1.0" }, { "SQL_TIME", SQL_TIME, "1.0" }, { "SQL_TIMESTAMP", SQL_TIMESTAMP, "1.0" }, { "SQL_TYPE_DATE", SQL_TYPE_DATE, "3.0" }, { "SQL_TYPE_TIME", SQL_TYPE_TIME, "3.0" }, { "SQL_TYPE_TIMESTAMP", SQL_TYPE_TIMESTAMP, "3.0" }, { "SQL_VARBINARY", SQL_VARBINARY, "1.0" }, { "SQL_VARCHAR", SQL_VARCHAR, "1.0" }, { "SQL_WCHAR", SQL_WCHAR, "3.0" }, { "SQL_WLONGVARCHAR", SQL_WLONGVARCHAR, "3.0" }, { "SQL_WVARCHAR", SQL_WVARCHAR, "3.0" }, { NULL } }; static attr_value free_stmt_option[] = { { "SQL_CLOSE", SQL_CLOSE }, { "SQL_DROP", SQL_DROP }, { "SQL_UNBIND", SQL_UNBIND }, { "SQL_RESET_PARAMS", SQL_RESET_PARAMS }, { NULL } }; static attr_value sql_data_types[] = { { "SQL_CHAR", SQL_CHAR, "1.0" }, { "SQL_VARCHAR", SQL_VARCHAR, "1.0" }, { "SQL_LONGVARCHAR", SQL_LONGVARCHAR, "1.0" }, { "SQL_BINARY", SQL_BINARY, "1.0" }, { "SQL_VARBINARY", SQL_VARBINARY, "1.0" }, { "SQL_LONGVARBINARY", SQL_LONGVARBINARY, "1.0" }, { "SQL_TINYINT", SQL_TINYINT, "1.0" }, { "SQL_SMALLINT", SQL_SMALLINT, "1.0" }, { "SQL_INTEGER", SQL_INTEGER, "1.0" }, { "SQL_BIGINT", SQL_BIGINT, "1.0" }, { "SQL_FLOAT", SQL_FLOAT, "1.0" }, { "SQL_DOUBLE", SQL_DOUBLE, "1.0" }, { "SQL_REAL", SQL_REAL, "1.0" }, { "SQL_NUMERIC", SQL_NUMERIC, "1.0" }, { "SQL_DATETIME", SQL_DATETIME, "1.0" }, { "SQL_DATE", SQL_DATE, "1.0" }, { "SQL_TIME", SQL_TIME, "1.0" }, { "SQL_TIMESTAMP", SQL_TIMESTAMP, "1.0" }, { "SQL_INTERVAL_DAY", SQL_INTERVAL_DAY, "3.0" }, { "SQL_INTERVAL_DAY_TO_HOUR", SQL_INTERVAL_DAY_TO_HOUR, "3.0" }, { "SQL_INTERVAL_DAY_TO_MINUTE", SQL_INTERVAL_DAY_TO_MINUTE, "3.0" }, { "SQL_INTERVAL_DAY_TO_SECOND", SQL_INTERVAL_DAY_TO_SECOND, "3.0" }, { "SQL_INTERVAL_HOUR", SQL_INTERVAL_HOUR, "3.0" }, { "SQL_INTERVAL_HOUR_TO_MINUTE", SQL_INTERVAL_HOUR_TO_MINUTE, "3.0" }, { "SQL_INTERVAL_HOUR_TO_SECOND", SQL_INTERVAL_HOUR_TO_SECOND, "3.0" }, { "SQL_INTERVAL_MINUTE_TO_SECOND", SQL_INTERVAL_MINUTE_TO_SECOND, "3.0" }, { "SQL_INTERVAL_MONTH", SQL_INTERVAL_MONTH, "3.0" }, { "SQL_INTERVAL_MINUTE", SQL_INTERVAL_MINUTE, "3.0" }, { "SQL_INTERVAL_SECOND", SQL_INTERVAL_SECOND, "3.0" }, { "SQL_INTERVAL_YEAR", SQL_INTERVAL_YEAR, "3.0" }, { "SQL_INTERVAL_YEAR_TO_MONTH", SQL_INTERVAL_YEAR_TO_MONTH, "3.0" }, { "SQL_GUID", SQL_GUID, "3.0" }, { NULL } }; void dPrepare::Ok() { const char *sql, *lname; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLINTEGER n_len; if ( hand ) in_handle = hand -> getHandle(); sql = str -> currentText(); odbctest -> out_win -> insertLineLimited( "SQLPrepare():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sql, "" ) == 0 ) { sql = NULL; odbctest -> out_win -> insertLineLimited( " Text: " ); } else if ( strcmp( sql, "" ) == 0 ) { sql = ""; odbctest -> out_win -> insertLineLimited( " Text: " ); } else if ( strcmp( sql, "" ) == 0 ) { QString *s = new QString( odbctest->in_win->text()); if ( s -> isEmpty()) sql = ""; else if ( s -> isNull()) sql = NULL; else sql = s->latin1(); txt.sprintf( " Text: %s", sql ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Text: %s", sql ); odbctest -> out_win -> insertLineLimited( txt ); } lname = name_len -> currentText(); if ( strncmp( lname, "SQL_NTS", 7 ) == 0 ) { n_len = SQL_NTS; txt.sprintf( " Statement Len: SQL_NTS=-3" ); } else { n_len = atoi( lname ); txt.sprintf( " Statement Len: %d", n_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLPrepare( in_handle, (SQLCHAR*) sql, n_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dPrepare::dPrepare( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 190,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 270,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 350,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); str = new QComboBox( TRUE, this, "Input Text" ); str -> setGeometry( 130, 80, 290, 20 ); str -> insertItem( "", 0 ); str -> insertItem( "", 1 ); str -> insertItem( "", 2 ); name_len = new QComboBox( TRUE, this, "name len" ); name_len -> setGeometry( 130, 110, 150, 20 ); l_name_len = new QLabel( "Statement Length:", this ); l_name_len -> setGeometry( 10, 110, 110, 20 ); name_len -> insertItem( "SQL_NTS=-3", 0 ); name_len -> insertItem( "0", 1 ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); l_str = new QLabel( "SQL Text:", this ); l_str -> setGeometry( 10, 80, 70, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dPrepare::~dPrepare() { delete ok; delete cancel; delete help; delete handles; delete str; delete l_handle; delete l_str; delete name_len; delete l_name_len; } void dExecute::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLExecute():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLExecute( in_handle ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dExecute::dExecute( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 90,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 170,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 250,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 190, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dExecute::~dExecute() { delete ok; delete cancel; delete help; delete handles; delete l_handle; } void dExecDirect::Ok() { const char *sql, *lname; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLINTEGER n_len; if ( hand ) in_handle = hand -> getHandle(); sql = str -> currentText(); odbctest -> out_win -> insertLineLimited( "SQLExecDirect():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sql, "" ) == 0 ) { sql = NULL; odbctest -> out_win -> insertLineLimited( " Text: " ); } else if ( strcmp( sql, "" ) == 0 ) { sql = ""; odbctest -> out_win -> insertLineLimited( " Text: " ); } else if ( strcmp( sql, "" ) == 0 ) { QString *s = new QString( odbctest->in_win->text()); if ( s -> isEmpty()) sql = ""; else if ( s -> isNull()) sql = NULL; else sql = s->latin1(); txt.sprintf( " Text: %s", sql ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Text: %s", sql ); odbctest -> out_win -> insertLineLimited( txt ); } lname = name_len -> currentText(); if ( strncmp( lname, "SQL_NTS", 7 ) == 0 ) { n_len = SQL_NTS; txt.sprintf( " Statement Len: SQL_NTS=-3" ); } else { n_len = atoi( lname ); txt.sprintf( " Statement Len: %d", n_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLExecDirect( in_handle, (SQLCHAR*) sql, n_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dExecDirect::dExecDirect( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 190,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 270,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 350,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); str = new QComboBox( TRUE, this, "Input Text" ); str -> setGeometry( 130, 80, 290, 20 ); str -> insertItem( "", 0 ); str -> insertItem( "", 1 ); str -> insertItem( "", 2 ); name_len = new QComboBox( TRUE, this, "name len" ); name_len -> setGeometry( 130, 110, 150, 20 ); l_name_len = new QLabel( "Statement Length:", this ); l_name_len -> setGeometry( 10, 110, 110, 20 ); name_len -> insertItem( "SQL_NTS=-3", 0 ); name_len -> insertItem( "0", 1 ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); l_str = new QLabel( "SQL Text:", this ); l_str -> setGeometry( 10, 80, 70, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dExecDirect::~dExecDirect() { delete ok; delete cancel; delete help; delete handles; delete str; delete l_handle; delete l_str; delete name_len; delete l_name_len; } void dNumParams::Valid() { if ( valid -> isOn() ) valid -> setText( "ParamCountPtr: SQL_NULL_POINTER" ); else valid -> setText( "ParamCountPtr: VALID" ); } void dNumParams::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT num_params; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLNumParam:" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( valid -> isOn() ) txt.sprintf( " ParamCountPtr: " ); else txt.sprintf( " ParamCountPtr: %p", &num_params ); odbctest -> out_win -> insertLineLimited( txt ); num_params = -9999; SQLRETURN ret = SQLNumParams( in_handle, valid -> isOn() ? NULL : &num_params ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( num_params == -9999 ) { txt.sprintf( " *ParamCountPtr: " ); } else { txt.sprintf( " *ParamCountPtr: %d", num_params ); } odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dNumParams::dNumParams( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 100,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 180,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 260,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); valid = new QCheckBox( "ParamCountPtr: VALID", this ); valid -> setGeometry( 10, 80, 300, 15 ); connect( valid, SIGNAL( clicked()), this, SLOT( Valid())); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dNumParams::~dNumParams() { delete ok; delete cancel; delete help; delete handles; delete valid; } void dCancel::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT num_cols; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLCancel():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLCancel( in_handle ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dCancel::dCancel( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 100,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 180,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 260,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dCancel::~dCancel() { delete ok; delete cancel; delete help; delete handles; } void dCloseCursor::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT num_cols; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLCloseCursor():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLCloseCursor( in_handle ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dCloseCursor::dCloseCursor( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 100,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 180,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 260,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dCloseCursor::~dCloseCursor() { delete ok; delete cancel; delete help; delete handles; } void dGetCursorName::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT b_len; SQLCHAR *buf; SQLSMALLINT name_length, *name_length_ptr; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetCursorName():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); b_len = atoi( buffer_len -> text().ascii()); if ( b_len < 1 ) { b_len = 0; } if ( cursor_valid -> isOn()) { buf = NULL; } else if ( b_len < 300 ) { buf = new SQLCHAR[ 300 ]; } else { buf = new SQLCHAR[ b_len ]; } if ( buf ) { txt.sprintf( " CursorName: %p", buf ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " CursorName: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } txt.sprintf( " Buffer Length: %d", b_len ); odbctest -> out_win -> insertLineLimited( txt ); name_length = -9999; if ( name_valid -> isOn()) { name_length_ptr = NULL; } else { name_length_ptr = &name_length; } if ( name_length_ptr ) { txt.sprintf( " NameLengthPtr: %p", name_length_ptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " NameLengthPtr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } SQLRETURN ret = SQLGetCursorName( in_handle, buf, b_len, name_length_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { if ( buf ) { txt.sprintf( " *CursorName: \"%s\"", buf ); odbctest -> out_win -> insertLineLimited( txt ); } if ( name_length == -9999 ) { txt.sprintf( " *NameLengthPtr: " ); } else { txt.sprintf( " *NameLengthPtr: %d", name_length ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( buf ) delete buf; odbctest -> out_win -> insertLineLimited( "" ); } void dGetCursorName::NameValid() { if ( name_valid -> isOn() ) name_valid -> setText( "NameLengthPtr: SQL_NULL_POINTER" ); else name_valid -> setText( "NameLengthPtr: VALID" ); } void dGetCursorName::CursorValid() { if ( cursor_valid -> isOn() ) cursor_valid -> setText( "CursorName: SQL_NULL_POINTER" ); else cursor_valid -> setText( "CursorName: VALID" ); } dGetCursorName::dGetCursorName( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 190,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 270,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 350,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); cursor_valid = new QCheckBox( "CursorName: VALID", this ); cursor_valid -> setGeometry( 10, 80, 300, 15 ); name_valid = new QCheckBox( "NameLengthPtr: VALID", this ); name_valid -> setGeometry( 10, 110, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 350, 80, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Len:", this ); l_buffer_len -> setGeometry( 270, 80, 60, 20 ); connect( cursor_valid, SIGNAL( clicked()), this, SLOT( CursorValid())); connect( name_valid, SIGNAL( clicked()), this, SLOT( NameValid())); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dGetCursorName::~dGetCursorName() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete l_buffer_len; delete buffer_len; delete name_valid; delete cursor_valid; } void dFreeStmt::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLUSMALLINT option_val; int index; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLFreeStmt():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); index = option -> currentItem(); option_val = free_stmt_option[ index ].value; txt.sprintf( " Option: %s=%d", free_stmt_option[ index ].text, free_stmt_option[ index ].value ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLFreeStmt( in_handle, option_val ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret ) && free_stmt_option[ index ].value == SQL_DROP ) { odbctest->listHandle.remove( hand ); } odbctest -> out_win -> insertLineLimited( "" ); } dFreeStmt::dFreeStmt( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 100,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 180,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 260,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); option = new QComboBox( FALSE, this, "Option" ); option -> setGeometry( 130, 80, 200, 20 ); parent->fill_list_box( free_stmt_option, option ); l_option = new QLabel( "Option:", this ); l_option -> setGeometry( 10, 80, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dFreeStmt::~dFreeStmt() { delete ok; delete cancel; delete help; delete handles; delete option; delete l_handle; delete l_option; } void dSetCursorName::Ok() { const char *sql, *lname; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT clen; SQLINTEGER n_len; if ( hand ) in_handle = hand -> getHandle(); sql = str -> currentText(); odbctest -> out_win -> insertLineLimited( "SQLSetCursorName():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sql, "" ) == 0 ) { sql = NULL; odbctest -> out_win -> insertLineLimited( " CursorName: " ); } else if ( strcmp( sql, "" ) == 0 ) { sql = ""; odbctest -> out_win -> insertLineLimited( " CursorName: " ); } else if ( strcmp( sql, "" ) == 0 ) { QString *s = new QString( odbctest->in_win->text()); if ( s -> isEmpty()) sql = ""; else if ( s -> isNull()) sql = NULL; else sql = s->latin1(); txt.sprintf( " CursorName: %s", sql ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " CursorName: %s", sql ); odbctest -> out_win -> insertLineLimited( txt ); } lname = name_len -> currentText(); if ( strncmp( lname, "SQL_NTS", 7 ) == 0 ) { n_len = SQL_NTS; txt.sprintf( " Statement Len: SQL_NTS=-3" ); } else { n_len = atoi( lname ); txt.sprintf( " Statement Len: %d", n_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLSetCursorName( in_handle, (SQLCHAR*) sql, n_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dSetCursorName::dSetCursorName( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 190,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 270,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 350,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); str = new QComboBox( TRUE, this, "CursorName" ); str -> setGeometry( 130, 80, 290, 20 ); str -> insertItem( "", 0 ); str -> insertItem( "", 1 ); str -> insertItem( "", 2 ); name_len = new QComboBox( TRUE, this, "name len" ); name_len -> setGeometry( 130, 110, 150, 20 ); l_name_len = new QLabel( "CursorName Length:", this ); l_name_len -> setGeometry( 10, 110, 110, 20 ); name_len -> insertItem( "SQL_NTS=-3", 0 ); name_len -> insertItem( "0", 1 ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); l_str = new QLabel( "SQL Text:", this ); l_str -> setGeometry( 10, 80, 70, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dSetCursorName::~dSetCursorName() { delete ok; delete cancel; delete help; delete handles; delete str; delete l_handle; delete l_str; delete name_len; delete l_name_len; } const char *dDescribeParam::data_type_to_str( int type ) { int index = 0; struct attr_value *data_type = sql_data_types; while( TRUE ) { if ( !data_type -> text ) break; if ( data_type -> value == type ) break; data_type ++; }; if ( data_type -> text ) return data_type -> text; else return NULL; } void dDescribeParam::type_clkd() { if ( type_valid -> isOn() ) type_valid -> setText( "DataTypePtr: SQL_NULL_PTR" ); else type_valid -> setText( "DataTypePtr: VALID" ); } void dDescribeParam::size_clkd() { if ( size_valid -> isOn() ) size_valid -> setText( "ParameterSizePtr: SQL_NULL_PTR" ); else size_valid -> setText( "ParameterSizePtr: VALID" ); } void dDescribeParam::digit_clkd() { if ( digit_valid -> isOn() ) digit_valid -> setText( "DecimalDigitsPtr: SQL_NULL_PTR" ); else digit_valid -> setText( "DecimalDigitsPtr: VALID" ); } void dDescribeParam::null_clkd() { if ( null_valid -> isOn() ) null_valid -> setText( "NullablePtr: SQL_NULL_PTR" ); else null_valid -> setText( "NullablePtr: VALID" ); } void dDescribeParam::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLUSMALLINT parameter_number; SQLSMALLINT *data_type_ptr, data_type; SQLULEN *param_size_ptr, param_size; SQLSMALLINT *decimal_digits_ptr, decimal_digits; SQLSMALLINT *nullable_ptr, nullable; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLDescribeParam():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); parameter_number = atoi( param_num -> text().ascii()); txt.sprintf( " Parameter Number: %d", parameter_number ); odbctest -> out_win -> insertLineLimited( txt ); if ( type_valid -> isOn() ) { data_type_ptr = NULL; txt.sprintf( " DataTypePtr: " ); } else { data_type_ptr = &data_type; txt.sprintf( " DataTypePtr: %p", data_type_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); data_type = -9999; if ( size_valid -> isOn() ) { param_size_ptr = NULL; txt.sprintf( " ParameterSizePtr: " ); } else { param_size_ptr = ¶m_size; txt.sprintf( " ParameterSizePtr: %p", param_size_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); param_size = 9999; if ( digit_valid -> isOn() ) { decimal_digits_ptr = NULL; txt.sprintf( " DecimalDigitsPtr: " ); } else { decimal_digits_ptr = &decimal_digits; txt.sprintf( " DecimalDigitsPtr: %p", decimal_digits ); } odbctest -> out_win -> insertLineLimited( txt ); decimal_digits = -9999; if ( null_valid -> isOn() ) { nullable_ptr = NULL; txt.sprintf( " NullablePtr: " ); } else { nullable_ptr = &nullable; txt.sprintf( " NullablePtr: %p", nullable_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); nullable = -9999; SQLRETURN ret = SQLDescribeParam( in_handle, parameter_number, data_type_ptr, param_size_ptr, decimal_digits_ptr, nullable_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( SQL_SUCCEEDED( ret )) { if ( data_type_ptr ) { if ( data_type == -9999 ) { txt.sprintf( " *DataTypePtr: " ); } else { const char *str = data_type_to_str( data_type ); if ( str ) txt.sprintf( " *DataTypePtr: %s (%d)", str, data_type ); else txt.sprintf( " *DataTypePtr: %d", data_type ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( param_size_ptr ) { if ( param_size == 9999 ) { txt.sprintf( " *ParamSizePtr: " ); } else { txt.sprintf( " *ParamSizePtr: %d", param_size ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( decimal_digits_ptr ) { if ( decimal_digits == 9999 ) { txt.sprintf( " *DecimalDigitsPtr: " ); } else { txt.sprintf( " *DecimalDigits: %d", decimal_digits ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( nullable_ptr ) { if ( nullable == -9999 ) { txt.sprintf( " *NullablePtr: " ); } else { txt.sprintf( " *NullablePtr: %d", nullable ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); } dDescribeParam::dDescribeParam( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); param_num = new QLineEdit( this, "Param Num" ); param_num -> setGeometry( 130, 80, 70, 20 ); param_num -> setMaxLength( 6 ); param_num -> setText( "1" ); l_param_num = new QLabel( "ParameterNumber:", this ); l_param_num -> setGeometry( 10, 80, 120, 20 ); type_valid = new QCheckBox( "DataTypePtr: VALID", this ); type_valid -> setGeometry( 10, 110, 250, 15 ); size_valid = new QCheckBox( "ParameterSizePtr: VALID", this ); size_valid -> setGeometry( 10, 140, 250, 15 ); digit_valid = new QCheckBox( "DecimalDigits Ptr: VALID", this ); digit_valid -> setGeometry( 300, 110, 250, 15 ); null_valid = new QCheckBox( "NullablePtr: VALID", this ); null_valid -> setGeometry( 300, 140, 250, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( type_valid, SIGNAL( clicked()), this, SLOT( type_clkd())); connect( size_valid, SIGNAL( clicked()), this, SLOT( size_clkd())); connect( digit_valid, SIGNAL( clicked()), this, SLOT( digit_clkd())); connect( null_valid, SIGNAL( clicked()), this, SLOT( null_clkd())); } dDescribeParam::~dDescribeParam() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete param_num; delete l_param_num; delete type_valid; delete size_valid; delete digit_valid; delete null_valid; } void dParamData::value_clkd() { if ( value_valid -> isOn() ) value_valid -> setText( "ValuePtr: SQL_NULL_PTR" ); else value_valid -> setText( "ValuePtr: VALID" ); } void dParamData::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLPOINTER *value_ptr, value; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLParamData():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( value_valid -> isOn() ) { value_ptr = NULL; txt.sprintf( " ValuePtr: " ); } else { value_ptr = &value; txt.sprintf( " ValuePtr: %p", value_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLParamData( in_handle, value_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( SQL_SUCCEEDED( ret )) { if ( value_ptr ) { txt.sprintf( " *ValuePtr: %d", value ); odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); } dParamData::dParamData( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 100,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 180,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 260,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); value_valid = new QCheckBox( "ValuePtr: VALID", this ); value_valid -> setGeometry( 10, 80, 250, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( value_valid, SIGNAL( clicked()), this, SLOT( value_clkd())); } dParamData::~dParamData() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete value_valid; } void dParamOption::pirow_clkd() { if ( pirow_valid -> isOn() ) pirow_valid -> setText( "pirow: SQL_NULL_PTR" ); else pirow_valid -> setText( "pirow: VALID" ); } void dParamOption::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLULEN *pirow_ptr, pirow; SQLUINTEGER crow; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLParamOptions():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); crow = atoi( crow_num -> text().ascii()); txt.sprintf( " crow: %d", crow ); odbctest -> out_win -> insertLineLimited( txt ); if ( pirow_valid -> isOn() ) { pirow_ptr = NULL; txt.sprintf( " pirow: " ); } else { pirow_ptr = &pirow; txt.sprintf( " pirow: %p", pirow_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLParamOptions( in_handle, crow, pirow_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); } dParamOption::dParamOption( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 100,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 180,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 260,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); crow_num = new QLineEdit( this, "Crow Num" ); crow_num -> setGeometry( 130, 80, 70, 20 ); crow_num -> setMaxLength( 6 ); crow_num -> setText( "1" ); l_crow_num = new QLabel( "crow:", this ); l_crow_num -> setGeometry( 10, 80, 120, 20 ); pirow_valid = new QCheckBox( "pirow: VALID", this ); pirow_valid -> setGeometry( 10, 110, 250, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( pirow_valid, SIGNAL( clicked()), this, SLOT( pirow_clkd())); } dParamOption::~dParamOption() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete pirow_valid; delete crow_num; delete l_crow_num; } void dPutData::Ok() { const char *sql; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLPOINTER data_ptr_var; SQLINTEGER strlen_or_len; const char *data_str, *strlen_or_len_str; if ( hand ) in_handle = hand -> getHandle(); data_str = data_ptr -> currentText(); odbctest -> out_win -> insertLineLimited( "SQLPutData():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( data_str, "" ) == 0 ) { data_ptr_var = NULL; odbctest -> out_win -> insertLineLimited( " DataPtr: " ); } else if ( strcmp( data_str, "" ) == 0 ) { data_ptr_var = (SQLPOINTER) ""; odbctest -> out_win -> insertLineLimited( " DataPtr: " ); } else if ( strcmp( data_str, "" ) == 0 ) { QString *s = new QString( odbctest->in_win->text()); if ( s -> isEmpty()) data_ptr_var = (SQLPOINTER)""; else if ( s -> isNull()) data_ptr_var = NULL; else data_ptr_var = (SQLPOINTER) s->latin1(); txt.sprintf( " DataPtr: %s", data_ptr_var ); odbctest -> out_win -> insertLineLimited( txt ); } else { data_ptr_var = ( SQLPOINTER ) data_str; txt.sprintf( " DataPtr: %s", data_ptr_var ); odbctest -> out_win -> insertLineLimited( txt ); } strlen_or_len_str = str_len -> currentText(); if ( strncmp( strlen_or_len_str, "SQL_NTS", 7 ) == 0 ) { strlen_or_len = SQL_NTS; txt.sprintf( " StrLen_or_ind: SQL_NTS=-3" ); } else if ( strncmp( strlen_or_len_str, "SQL_NULL_DATA", 13 ) == 0 ) { strlen_or_len = SQL_NULL_DATA; txt.sprintf( " StrLen_or_ind: SQL_NULL_DATA=-1" ); } else if ( strncmp( strlen_or_len_str, "SQL_DEFAULT_PARAM", 17 ) == 0 ) { strlen_or_len = SQL_DEFAULT_PARAM; txt.sprintf( " StrLen_or_ind: SQL_DEFAULT_PARAM=-5" ); } else { strlen_or_len = atoi( strlen_or_len_str ); txt.sprintf( " StrLen_or_ind: %d", strlen_or_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLPutData( in_handle, data_ptr_var, strlen_or_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dPutData::dPutData( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 150,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 230,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 310,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); data_ptr = new QComboBox( TRUE, this, "data_ptr" ); data_ptr -> setGeometry( 130, 80, 250, 20 ); data_ptr -> insertItem( "", 0 ); data_ptr -> insertItem( "", 1 ); data_ptr -> insertItem( "", 2 ); str_len = new QComboBox( TRUE, this, "str len" ); str_len -> setGeometry( 130, 110, 200, 20 ); str_len -> insertItem( "SQL_NTS=-3", 0 ); str_len -> insertItem( "SQL_NULL_DATA=-1", 1 ); str_len -> insertItem( "SQL_DEFAULT_PARAM=-5", 2 ); str_len -> insertItem( "0", 3 ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); l_data_ptr = new QLabel( "DataPtr:", this ); l_data_ptr -> setGeometry( 10, 80, 70, 20 ); l_str_len = new QLabel( "StrLen_or_IndPtr:", this ); l_str_len -> setGeometry( 10, 110, 70, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dPutData::~dPutData() { delete ok; delete cancel; delete help; delete handles; delete data_ptr; delete l_handle; delete l_data_ptr; delete str_len; delete l_str_len; } void dBindParameter::Ok() { } dBindParameter::dBindParameter( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 450,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 530,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 610,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); param_num = new QLineEdit( this, "Param Num" ); param_num -> setGeometry( 130, 80, 70, 20 ); param_num -> setMaxLength( 6 ); param_num -> setText( "1" ); l_param_num = new QLabel( "ParameterNumber:", this ); l_param_num -> setGeometry( 10, 80, 120, 20 ); io_type = new QComboBox( FALSE, this, "io_type" ); io_type -> setGeometry( 420, 80, 250, 20 ); parent->fill_list_box( io_type_option, io_type ); l_io_type = new QLabel( "InputOutputType:", this ); l_io_type -> setGeometry( 320, 80, 100, 20 ); value_type = new QComboBox( FALSE, this, "value_type" ); value_type -> setGeometry( 130, 110, 360, 20 ); parent->fill_list_box( value_type_option, value_type ); l_value_type = new QLabel( "ValueType:", this ); l_value_type -> setGeometry( 10, 110, 100, 20 ); column_size = new QLineEdit( this, "column_size" ); column_size -> setGeometry( 600, 110, 70, 20 ); column_size -> setMaxLength( 6 ); column_size -> setText( "0" ); l_column_size = new QLabel( "ColumnSize:", this ); l_column_size -> setGeometry( 500, 110, 100, 20 ); param_type = new QComboBox( FALSE, this, "param_type" ); param_type -> setGeometry( 130, 140, 360, 20 ); parent->fill_list_box( param_type_option, param_type ); l_param_type = new QLabel( "ParameterType:", this ); l_param_type -> setGeometry( 10, 140, 100, 20 ); decimal_digits = new QLineEdit( this, "decimal_digits" ); decimal_digits -> setGeometry( 600, 140, 70, 20 ); decimal_digits -> setMaxLength( 6 ); decimal_digits -> setText( "0" ); l_decimal_digits = new QLabel( "DecimalDigits:", this ); l_decimal_digits -> setGeometry( 500, 140, 100, 20 ); param_value = new QComboBox( FALSE, this, "param_value" ); param_value -> setGeometry( 130, 170, 360, 20 ); param_value -> insertItem( "", 0 ); param_value -> insertItem( "", 1 ); l_param_value = new QLabel( "ParameterValuePtr:", this ); l_param_value -> setGeometry( 10, 170, 120, 20 ); buffer_length = new QLineEdit( this, "buffer_length" ); buffer_length -> setGeometry( 600, 170, 70, 20 ); buffer_length -> setMaxLength( 6 ); buffer_length -> setText( "0" ); l_buffer_length = new QLabel( "BufferLength:", this ); l_buffer_length -> setGeometry( 500, 170, 100, 20 ); strlen_or_ind = new QComboBox( TRUE, this, "strlen_or_ind" ); strlen_or_ind -> setGeometry( 130, 200, 360, 20 ); strlen_or_ind -> insertItem( "SQL_NTS=-3", 0 ); strlen_or_ind -> insertItem( "SQL_NULL_DATA=-1", 1 ); strlen_or_ind -> insertItem( "SQL_DATA_AT_EXEC=-2", 2 ); strlen_or_ind -> insertItem( "SQL_DEFAULT_PARAM=-5", 3 ); strlen_or_ind -> insertItem( "", 4 ); strlen_or_ind -> insertItem( "0", 5 ); l_strlen_or_ind = new QLabel( "StrLen_or_IndPtr:", this ); l_strlen_or_ind -> setGeometry( 10, 200, 100, 20 ); len_data_at_exec = new QCheckBox( "SQL_LEN_DATA_AT_EXEC", this ); len_data_at_exec -> setGeometry( 500, 200, 190, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dBindParameter::~dBindParameter() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete io_type; delete l_io_type; delete param_num; delete l_param_num; delete value_type; delete l_value_type; delete column_size; delete l_column_size; delete param_type; delete l_param_type; delete decimal_digits; delete l_decimal_digits; delete param_value; delete l_param_value; delete buffer_length; delete l_buffer_length; delete strlen_or_ind; delete l_strlen_or_ind; delete len_data_at_exec; } void dBindParam::Ok() { } dBindParam::dBindParam( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 450,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 530,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 610,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); param_num = new QLineEdit( this, "Param Num" ); param_num -> setGeometry( 130, 80, 70, 20 ); param_num -> setMaxLength( 6 ); param_num -> setText( "1" ); l_param_num = new QLabel( "ParameterNumber:", this ); l_param_num -> setGeometry( 10, 80, 120, 20 ); value_type = new QComboBox( FALSE, this, "value_type" ); value_type -> setGeometry( 130, 110, 360, 20 ); parent->fill_list_box( value_type_option, value_type ); l_value_type = new QLabel( "ValueType:", this ); l_value_type -> setGeometry( 10, 110, 100, 20 ); column_size = new QLineEdit( this, "column_size" ); column_size -> setGeometry( 600, 110, 70, 20 ); column_size -> setMaxLength( 6 ); column_size -> setText( "0" ); l_column_size = new QLabel( "ColumnSize:", this ); l_column_size -> setGeometry( 500, 110, 100, 20 ); param_type = new QComboBox( FALSE, this, "param_type" ); param_type -> setGeometry( 130, 140, 360, 20 ); parent->fill_list_box( param_type_option, param_type ); l_param_type = new QLabel( "ParameterType:", this ); l_param_type -> setGeometry( 10, 140, 100, 20 ); decimal_digits = new QLineEdit( this, "decimal_digits" ); decimal_digits -> setGeometry( 600, 140, 70, 20 ); decimal_digits -> setMaxLength( 6 ); decimal_digits -> setText( "0" ); l_decimal_digits = new QLabel( "DecimalDigits:", this ); l_decimal_digits -> setGeometry( 500, 140, 100, 20 ); param_value = new QComboBox( FALSE, this, "param_value" ); param_value -> setGeometry( 130, 170, 360, 20 ); param_value -> insertItem( "", 0 ); param_value -> insertItem( "", 1 ); l_param_value = new QLabel( "ParameterValuePtr:", this ); l_param_value -> setGeometry( 10, 170, 120, 20 ); strlen_or_ind = new QComboBox( TRUE, this, "strlen_or_ind" ); strlen_or_ind -> setGeometry( 130, 200, 360, 20 ); strlen_or_ind -> insertItem( "SQL_NTS=-3", 0 ); strlen_or_ind -> insertItem( "SQL_NULL_DATA=-1", 1 ); strlen_or_ind -> insertItem( "SQL_DATA_AT_EXEC=-2", 2 ); strlen_or_ind -> insertItem( "SQL_DEFAULT_PARAM=-5", 3 ); strlen_or_ind -> insertItem( "", 4 ); strlen_or_ind -> insertItem( "0", 5 ); l_strlen_or_ind = new QLabel( "StrLen_or_IndPtr:", this ); l_strlen_or_ind -> setGeometry( 10, 200, 100, 20 ); len_data_at_exec = new QCheckBox( "SQL_LEN_DATA_AT_EXEC", this ); len_data_at_exec -> setGeometry( 500, 200, 190, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dBindParam::~dBindParam() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete param_num; delete l_param_num; delete value_type; delete l_value_type; delete column_size; delete l_column_size; delete param_type; delete l_param_type; delete decimal_digits; delete l_decimal_digits; delete param_value; delete l_param_value; delete strlen_or_ind; delete l_strlen_or_ind; delete len_data_at_exec; } void dAllocStmt::handle_clkd() { if ( handle_valid -> isOn() ) handle_valid -> setText( "phstmt: SQL_NULL_POINTER" ); else handle_valid -> setText( "phstmt: VALID" ); } void dAllocStmt::Ok() { SQLHSTMT hstmt, *hstmt_ptr; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); SQLHANDLE in_handle; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLAllocStmt():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Connection Handle: %p", in_handle ); else txt.sprintf( " Connection Handle: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); if ( handle_valid -> isOn()) { hstmt_ptr = NULL; txt.sprintf( " phstmt: SQL_NULL_HANDLE" ); } else { hstmt_ptr = &hstmt; txt.sprintf( " phstmt: %p", hstmt_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLAllocStmt( in_handle, hstmt_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret ) && hstmt_ptr ) { txt.sprintf( " *phstmt: %p", hstmt ); odbctest -> out_win -> insertLineLimited( txt ); odbctest->listHandle.append( new Handle( SQL_HANDLE_STMT, hstmt, odbctest->listHandle )); } odbctest -> out_win -> insertLineLimited( "" ); } dAllocStmt::dAllocStmt( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 90,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 170,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 250,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); l_handles = new QLabel( "Handle:", this ); l_handles -> setGeometry( 10, 50, 80, 20 ); handle_valid = new QCheckBox( "phstmt: VALID", this ); handle_valid -> setGeometry( 10, 80, 300, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( handle_valid, SIGNAL( clicked()), this, SLOT( handle_clkd())); } dAllocStmt::~dAllocStmt() { delete ok; delete cancel; delete help; delete handle_valid; delete handles; delete l_handles; } void OdbcTest::sqlbindparameter() { dBindParameter *dlg = new dBindParameter( this, "SQLBindParameter" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlcancel() { dCancel *dlg = new dCancel( this, "SQLCancel" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlclosecursor() { dCloseCursor *dlg = new dCloseCursor( this, "SQLCloseCursor" ); dlg -> exec(); delete dlg; } void OdbcTest::sqldescribeparam() { dDescribeParam *dlg = new dDescribeParam( this, "SQLDescribeParam" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlexecute() { dExecute *dlg = new dExecute( this, "SQLExecute" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlexecdirect() { dExecDirect *dlg = new dExecDirect( this, "SQLExecDirect" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlfreestmt() { dFreeStmt *dlg = new dFreeStmt( this, "SQLFreeStmt" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetcursorname() { dGetCursorName *dlg = new dGetCursorName( this, "SQLGetCursorName" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlnumparams() { dNumParams *dlg = new dNumParams( this, "SQLNumParams" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlparamdata() { dParamData *dlg = new dParamData( this, "SQLParamData" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlparamoptions() { dParamOption *dlg = new dParamOption( this, "SQLParamOptions" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlprepare() { dPrepare *dlg = new dPrepare( this, "SQLPrepare" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlputdata() { dPutData *dlg = new dPutData( this, "SQLPutData" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlsetcursorname() { dSetCursorName *dlg = new dSetCursorName( this, "SQLSetCursorName" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlallocstmt() { dAllocStmt *dlg = new dAllocStmt( this, "SQLAllocStmt" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlbindparam() { dBindParam *dlg = new dBindParam( this, "SQLBindParam" ); dlg -> exec(); delete dlg; } void OdbcTest::fillparam() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::showparam() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::showcursorsettings() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } unixODBC-2.2.14-p2/odbctest/results.cpp0100644000076400007640000023417211150521462016217 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: results.cpp,v 1.9 2007/04/17 15:16:17 lurcher Exp $ * * $Log: results.cpp,v $ * Revision 1.9 2007/04/17 15:16:17 lurcher * SQLLEN change in C++ code * * Revision 1.8 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.7 2005/02/01 10:24:24 lurcher * Cope if SHLIBEXT is not set * * Revision 1.6 2004/11/22 17:02:49 lurcher * Fix unicode/ansi conversion in the SQLGet functions * * Revision 1.5 2004/10/07 10:10:07 lurcher * * Fix some warnings * * Revision 1.4 2001/12/20 17:26:26 lurcher * * More warnings removed * * Revision 1.3 2001/12/20 12:30:44 lurcher * * Fix 64 problem in odbctest and 7.1 Postgres driver * * Revision 1.2 2001/12/13 13:00:34 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:31 lurcher * * First upload to SourceForge * * Revision 1.6 2001/07/20 09:42:58 nick * * Replace char[] with QString to avoid buffer overrun * * Revision 1.5 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.4 2001/05/04 15:32:54 nick * * Some makefile tweeks * * Revision 1.3 2000/12/17 10:51:33 nick * * Add include for sqlucode.h * * Revision 1.2 2000/11/02 11:24:02 nick * * using the wrong array for SQLColAttributes * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.9 2000/06/27 09:19:44 ngorham * * SQLExtendedFetch was using the wrong orentation value * * Revision 1.8 2000/06/13 12:30:27 ngorham * * Enough there for the first release I think * * Revision 1.7 2000/06/12 18:46:20 ngorham * * More changes * * Revision 1.6 2000/06/09 17:04:21 ngorham * * More, and More * * Revision 1.5 2000/06/08 17:14:08 ngorham * * And more * * Revision 1.4 2000/06/07 17:00:16 ngorham * * Another update * * Revision 1.3 2000/06/07 15:10:22 ngorham * * More additions * * Revision 1.2 2001/05/31 10:26:27 ngorham * * Fix a few minor typo's * * Revision 1.1 2000/05/04 17:04:48 ngorham * * Initial commit * * **********************************************************************/ #include #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #endif #include #include #include #include #include "results.h" #include "odbctest.h" static attr_value data_types[] = { { "SQL_C_CHAR", SQL_C_CHAR, "1.0" }, { "SQL_C_BINARY", SQL_C_BINARY, "1.0" }, { "SQL_C_BIT", SQL_C_BIT, "1.0" }, { "SQL_C_BOOKMARK", SQL_C_BOOKMARK, "2.0" }, { "SQL_C_DATE", SQL_C_DATE, "1.0" }, { "SQL_C_DOUBLE", SQL_C_DOUBLE, "1.0" }, { "SQL_C_FLOAT", SQL_C_FLOAT, "1.0" }, { "SQL_C_GUID", SQL_C_GUID, "1.0" }, { "SQL_C_INTERVAL_DAY", SQL_C_INTERVAL_DAY, "3.0" }, { "SQL_C_INTERVAL_DAY_TO_HOUR", SQL_C_INTERVAL_DAY_TO_HOUR, "3.0" }, { "SQL_C_INTERVAL_DAY_TO_MINUTE", SQL_C_INTERVAL_DAY_TO_MINUTE, "3.0" }, { "SQL_C_INTERVAL_DAY_TO_SECOND", SQL_C_INTERVAL_DAY_TO_SECOND, "3.0" }, { "SQL_C_INTERVAL_HOUR", SQL_C_INTERVAL_HOUR, "3.0" }, { "SQL_C_INTERVAL_HOUR_TO_MINUTE", SQL_C_INTERVAL_HOUR_TO_MINUTE, "3.0" }, { "SQL_C_INTERVAL_HOUR_TO_SECOND", SQL_C_INTERVAL_HOUR_TO_SECOND, "3.0" }, { "SQL_C_INTERVAL_MINUTE_TO_SECOND", SQL_C_INTERVAL_MINUTE_TO_SECOND, "3.0" }, { "SQL_C_INTERVAL_MONTH", SQL_C_INTERVAL_MONTH, "3.0" }, { "SQL_C_INTERVAL_MINUTE", SQL_C_INTERVAL_MINUTE, "3.0" }, { "SQL_C_INTERVAL_SECOND", SQL_C_INTERVAL_SECOND, "3.0" }, { "SQL_C_INTERVAL_YEAR", SQL_C_INTERVAL_YEAR, "3.0" }, { "SQL_C_INTERVAL_YEAR_TO_MONTH", SQL_C_INTERVAL_YEAR_TO_MONTH, "3.0" }, { "SQL_C_LONG", SQL_C_LONG, "2.0" }, { "SQL_C_NUMERIC", SQL_C_NUMERIC, "3.0" }, { "SQL_C_SBIGINT", SQL_C_SBIGINT, "3.0" }, { "SQL_C_SLONG", SQL_C_SLONG, "2.0" }, { "SQL_C_SSHORT", SQL_C_SSHORT, "2.0" }, { "SQL_C_STINYINT", SQL_C_STINYINT, "2.0" }, { "SQL_C_TIME", SQL_C_TIME, "1.0" }, { "SQL_C_TIMESTAMP", SQL_C_TIMESTAMP, "1.0" }, { "SQL_C_TINYINT", SQL_C_TINYINT, "1.0" }, { "SQL_C_TYPE_DATE", SQL_C_TYPE_DATE, "3.0" }, { "SQL_C_TYPE_TIME", SQL_C_TYPE_TIME, "3.0" }, { "SQL_C_TYPE_TIMESTAMP", SQL_C_TYPE_TIMESTAMP, "3.0" }, { "SQL_C_UBIGINT", SQL_C_UBIGINT, "3.0" }, { "SQL_C_ULONG", SQL_C_ULONG, "2.0" }, { "SQL_C_USHORT", SQL_C_USHORT, "2.0" }, { "SQL_C_UTINYINT", SQL_C_UTINYINT, "2.0" }, { "SQL_C_VARBOOKMARK", SQL_C_VARBOOKMARK, "3.0" }, { "SQL_C_WCHAR", SQL_C_WCHAR, "3.0" }, { "SQL_ARD_TYPE", SQL_ARD_TYPE, "3.0" }, { "SQL_C_DEFAULT", SQL_C_DEFAULT, "3.0" }, { NULL } }; static attr_value sql_data_types[] = { { "SQL_CHAR", SQL_CHAR, "1.0" }, { "SQL_VARCHAR", SQL_VARCHAR, "1.0" }, { "SQL_LONGVARCHAR", SQL_LONGVARCHAR, "1.0" }, { "SQL_BINARY", SQL_BINARY, "1.0" }, { "SQL_VARBINARY", SQL_VARBINARY, "1.0" }, { "SQL_LONGVARBINARY", SQL_LONGVARBINARY, "1.0" }, { "SQL_TINYINT", SQL_TINYINT, "1.0" }, { "SQL_SMALLINT", SQL_SMALLINT, "1.0" }, { "SQL_INTEGER", SQL_INTEGER, "1.0" }, { "SQL_BIGINT", SQL_BIGINT, "1.0" }, { "SQL_FLOAT", SQL_FLOAT, "1.0" }, { "SQL_DOUBLE", SQL_DOUBLE, "1.0" }, { "SQL_REAL", SQL_REAL, "1.0" }, { "SQL_NUMERIC", SQL_NUMERIC, "1.0" }, { "SQL_DATETIME", SQL_DATETIME, "1.0" }, { "SQL_DATE", SQL_DATE, "1.0" }, { "SQL_TIME", SQL_TIME, "1.0" }, { "SQL_TIMESTAMP", SQL_TIMESTAMP, "1.0" }, { "SQL_INTERVAL_DAY", SQL_INTERVAL_DAY, "3.0" }, { "SQL_INTERVAL_DAY_TO_HOUR", SQL_INTERVAL_DAY_TO_HOUR, "3.0" }, { "SQL_INTERVAL_DAY_TO_MINUTE", SQL_INTERVAL_DAY_TO_MINUTE, "3.0" }, { "SQL_INTERVAL_DAY_TO_SECOND", SQL_INTERVAL_DAY_TO_SECOND, "3.0" }, { "SQL_INTERVAL_HOUR", SQL_INTERVAL_HOUR, "3.0" }, { "SQL_INTERVAL_HOUR_TO_MINUTE", SQL_INTERVAL_HOUR_TO_MINUTE, "3.0" }, { "SQL_INTERVAL_HOUR_TO_SECOND", SQL_INTERVAL_HOUR_TO_SECOND, "3.0" }, { "SQL_INTERVAL_MINUTE_TO_SECOND", SQL_INTERVAL_MINUTE_TO_SECOND, "3.0" }, { "SQL_INTERVAL_MONTH", SQL_INTERVAL_MONTH, "3.0" }, { "SQL_INTERVAL_MINUTE", SQL_INTERVAL_MINUTE, "3.0" }, { "SQL_INTERVAL_SECOND", SQL_INTERVAL_SECOND, "3.0" }, { "SQL_INTERVAL_YEAR", SQL_INTERVAL_YEAR, "3.0" }, { "SQL_INTERVAL_YEAR_TO_MONTH", SQL_INTERVAL_YEAR_TO_MONTH, "3.0" }, { "SQL_GUID", SQL_GUID, "3.0" }, { NULL } }; static attr_options field_ident_struct[] = { { "SQL_DESC_AUTO_UNIQUE_VALUE", SQL_DESC_AUTO_UNIQUE_VALUE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DESC_BASE_COLUMN_NAME", SQL_DESC_BASE_COLUMN_NAME, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DESC_BASE_TABLE_NAME", SQL_DESC_BASE_TABLE_NAME, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DESC_CASE_SENSITIVE", SQL_DESC_CASE_SENSITIVE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DESC_CATALOG_NAME", SQL_DESC_CATALOG_NAME, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_DESC_CONCISE_TYPE", SQL_DESC_CONCISE_TYPE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DESC_COUNT", SQL_DESC_COUNT, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DESC_DISPLAY_SIZE", SQL_DESC_DISPLAY_SIZE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DESC_FIXED_PREC_SCALE", SQL_DESC_FIXED_PREC_SCALE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DESC_LABEL", SQL_DESC_LABEL, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_DESC_LENGTH", SQL_DESC_LENGTH, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DESC_LITERAL_PREFIX", SQL_DESC_LITERAL_PREFIX, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DESC_LITERAL_SUFFIX", SQL_DESC_LITERAL_SUFFIX, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DESC_LOCAL_TYPE_NAME", SQL_DESC_LOCAL_TYPE_NAME, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DESC_NAME", SQL_DESC_NAME, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DESC_NULLABLE", SQL_DESC_NULLABLE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DESC_NUM_PREC_RADIX", SQL_DESC_NUM_PREC_RADIX, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DESC_OCTET_LENGTH", SQL_DESC_OCTET_LENGTH, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DESC_PRECISION", SQL_DESC_PRECISION, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DESC_SCALE", SQL_DESC_SCALE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DESC_SCHEMA_NAME", SQL_DESC_SCHEMA_NAME, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_DESC_SEARCHABLE", SQL_DESC_SEARCHABLE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DESC_TABLE_NAME", SQL_DESC_TABLE_NAME, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_DESC_TYPE", SQL_DESC_TYPE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DESC_TYPE_NAME", SQL_DESC_TYPE_NAME, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_DESC_UNNAMED", SQL_DESC_UNNAMED, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DESC_UNSIGNED", SQL_DESC_UNSIGNED, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DESC_UPDATABLE", SQL_DESC_UPDATABLE, { { NULL } }, "1.0", SQL_INTEGER }, { NULL } }; static attr_options ca_field_ident_struct[] = { { "SQL_COLUMN_AUTO_INCREMENT", SQL_COLUMN_AUTO_INCREMENT, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_CASE_SENSITIVE", SQL_COLUMN_CASE_SENSITIVE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_COUNT", SQL_COLUMN_COUNT, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_DISPLAY_SIZE", SQL_COLUMN_DISPLAY_SIZE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_LABEL", SQL_COLUMN_LABEL, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_COLUMN_LENGTH", SQL_COLUMN_LENGTH, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_MONEY", SQL_COLUMN_MONEY, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_NAME", SQL_COLUMN_NAME, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_COLUMN_NULLABLE", SQL_COLUMN_NULLABLE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_OWNER_NAME", SQL_COLUMN_OWNER_NAME, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_COLUMN_PRECISION", SQL_COLUMN_PRECISION, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_QUALIFIER_NAME", SQL_COLUMN_QUALIFIER_NAME, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_COLUMN_SCALE", SQL_COLUMN_SCALE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_SEARCHABLE", SQL_COLUMN_SEARCHABLE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_TABLE_NAME", SQL_COLUMN_TABLE_NAME, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_COLUMN_TYPE", SQL_COLUMN_TYPE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_TYPE_NAME", SQL_COLUMN_TYPE_NAME, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_COLUMN_UNSIGNED", SQL_COLUMN_UNSIGNED, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_COLUMN_UPDATABLE", SQL_COLUMN_UPDATABLE, { { NULL } }, "1.0", SQL_INTEGER }, { NULL } }; static attr_value fetch_scroll_orentation[] = { { "SQL_FETCH_NEXT", SQL_FETCH_NEXT, "1.0" }, { "SQL_FETCH_PRIOR", SQL_FETCH_PRIOR, "1.0" }, { "SQL_FETCH_RELATIVE", SQL_FETCH_RELATIVE, "1.0" }, { "SQL_FETCH_ABSOLUTE", SQL_FETCH_ABSOLUTE, "1.0" }, { "SQL_FETCH_FIRST", SQL_FETCH_FIRST, "1.0" }, { "SQL_FETCH_LAST", SQL_FETCH_LAST, "1.0" }, { "SQL_FETCH_BOOKMARK", SQL_FETCH_BOOKMARK, "1.0" }, { NULL } }; static attr_value set_scroll_cur_operation[] = { { "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY, "1.0" }, { "SQL_CONCUR_LOCK", SQL_CONCUR_LOCK, "1.0" }, { "SQL_CONCUR_ROWVER", SQL_CONCUR_ROWVER, "1.0" }, { "SQL_CONCUR_VALUES", SQL_CONCUR_VALUES, "1.0" }, { NULL } }; static attr_value set_scroll_ks_values[] = { { "SQL_SCROLL_FORWARD_ONLY", SQL_SCROLL_FORWARD_ONLY, "1.0" }, { "SQL_SCROLL_KEYSET_DRIVEN", SQL_SCROLL_KEYSET_DRIVEN, "1.0" }, { "SQL_SCROLL_DYNAMIC", SQL_SCROLL_DYNAMIC, "1.0" }, { "SQL_SCROLL_STATIC", SQL_SCROLL_STATIC, "1.0" }, { NULL } }; static attr_value bulk_operation[] = { { "SQL_ADD", SQL_ADD, "3.0" }, { "SQL_UPDATE_BY_BOOKMARK", SQL_UPDATE_BY_BOOKMARK, "3.0" }, { "SQL_DELETE_BY_BOOKMARK", SQL_DELETE_BY_BOOKMARK, "3.0" }, { "SQL_FETCH_BY_BOOKMARK", SQL_FETCH_BY_BOOKMARK, "3.0" }, { NULL } }; static attr_value set_pos_operation[] = { { "SQL_POSITION", SQL_POSITION }, { "SQL_REFRESH", SQL_REFRESH }, { "SQL_UPDATE", SQL_UPDATE }, { "SQL_DELETE", SQL_DELETE }, { NULL } }; static attr_value set_pos_lock_type[] = { { "SQL_LOCK_NO_CHANGE", SQL_LOCK_NO_CHANGE }, { "SQL_LOCK_EXCLUSIVE", SQL_LOCK_EXCLUSIVE }, { "SQL_LOCK_UNLOCK", SQL_LOCK_UNLOCK }, { NULL } }; void dNumResultCols::out_handle_ptr_clkd() { if ( valid -> isOn() ) valid -> setText( "ColumnCountPtr: SQL_NULL_HANDLE" ); else valid -> setText( "ColumnCountPtr: VALID" ); } void dNumResultCols::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT num_cols; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLNumResultCols():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( valid -> isOn() ) txt.sprintf( " ColumnCountPtr: ." ); else txt.sprintf( " ColumnCountPtr: %p", &num_cols ); odbctest -> out_win -> insertLineLimited( txt ); num_cols = -9999; SQLRETURN ret = SQLNumResultCols( in_handle, valid -> isOn() ? NULL : &num_cols ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( num_cols == -9999 ) { txt.sprintf( " *ColumnCountPtr: " ); } else { txt.sprintf( " *ColumnCountPtr: %d", num_cols ); } odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dNumResultCols::dNumResultCols( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 100,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 180,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 260,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); valid = new QCheckBox( "ColumnCountPtr: VALID", this ); valid -> setGeometry( 10, 80, 300, 15 ); connect( valid, SIGNAL( clicked()), this, SLOT( out_handle_ptr_clkd())); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dNumResultCols::~dNumResultCols() { delete ok; delete cancel; delete help; delete handles; delete valid; } void dFetch::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT num_cols; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLFetch():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLFetch( in_handle ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dFetch::dFetch( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 100,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 180,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 260,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dFetch::~dFetch() { delete ok; delete cancel; delete help; delete handles; } void dGetData::target_clkd() { if ( target_valid -> isOn() ) target_valid -> setText( "TargetValuePtr: SQL_NULL_POINTER" ); else target_valid -> setText( "TargetValuePtr: VALID" ); } void dGetData::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "StrLen_or_IndValuePtr: SQL_NULL_POINTER" ); else strlen_valid -> setText( "StrLen_or_IndValuePtr: VALID" ); } void dGetData::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); int index; SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT column_number; SQLINTEGER b_len, data_type; SQLLEN *strlen_ptr, strlen_or_ind; char *buf = NULL; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetData():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); column_number = atoi( column_num -> text().ascii()); txt.sprintf( " Column Number: %d", column_number ); odbctest -> out_win -> insertLineLimited( txt ); index = type -> currentItem(); data_type = data_types[ index ].value; txt.sprintf( " Target Type: %s=%d (%s)", data_types[ index ].text, data_types[ index ].value, data_types[ index ].version ); odbctest -> out_win -> insertLineLimited( txt ); b_len = atoi( buffer_len -> text().ascii()); if ( b_len < 1 ) { b_len = 0; } if ( target_valid -> isOn()) { buf = NULL; } else if ( b_len < 300 ) { buf = new char[ 300 ]; } else { buf = new char[ b_len ]; } if ( buf ) { txt.sprintf( " Target Value Ptr: %p", buf ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Target Value Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } txt.sprintf( " Buffer Length: %d", b_len ); odbctest -> out_win -> insertLineLimited( txt ); strlen_or_ind = -999999; if ( strlen_valid -> isOn()) { strlen_ptr = NULL; } else { strlen_ptr = &strlen_or_ind; } if ( strlen_ptr ) { txt.sprintf( " Strlen_or_Ind Ptr: %p", strlen_ptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Strlen_or_Ind Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } SQLRETURN ret = SQLGetData( in_handle, column_number, data_type, buf, b_len, strlen_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( SQL_SUCCEEDED( ret ) && strlen_ptr ) { if ( strlen_or_ind == -999999 ) { txt.sprintf( " *Strlen_or_Ind Ptr: " ); } else { txt.sprintf( " *Strlen_or_Ind Ptr: %d", strlen_or_ind ); } odbctest -> out_win -> insertLineLimited( txt ); } /* * display the result */ if ( SQL_SUCCEEDED( ret ) && (( strlen_ptr && strlen_or_ind >= 0 ) || !strlen_ptr )) { switch ( data_type ) { case SQL_C_CHAR: if ( strlen( buf ) > 64 ) { buf[ 64 ] = '\0'; txt.sprintf( " *Target Value Ptr: \"%s...\"", buf ); } else { txt.sprintf( " *Target Value Ptr: \"%s\"", buf ); } break; case SQL_C_BIT: { unsigned char bit; memcpy( &bit, buf, sizeof( bit )); txt.sprintf( " *Target Value Ptr: %d", bit ); break; } case SQL_C_DATE: case SQL_C_TYPE_DATE: { SQL_DATE_STRUCT dt; memcpy( &dt, buf, sizeof( dt )); txt.sprintf( " *Target Value Ptr: %04d-%02d-%02d", dt.year, dt.month, dt.day ); break; } case SQL_C_DOUBLE: { double val; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr: %f", val ); break; } case SQL_C_FLOAT: { float val; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr: %f", val ); break; } case SQL_C_INTERVAL_DAY: case SQL_C_INTERVAL_DAY_TO_HOUR: case SQL_C_INTERVAL_DAY_TO_MINUTE: case SQL_C_INTERVAL_DAY_TO_SECOND: case SQL_C_INTERVAL_HOUR: case SQL_C_INTERVAL_HOUR_TO_MINUTE: case SQL_C_INTERVAL_HOUR_TO_SECOND: case SQL_C_INTERVAL_MINUTE_TO_SECOND: case SQL_C_INTERVAL_MINUTE: case SQL_C_INTERVAL_SECOND: { SQL_INTERVAL_STRUCT val; char str[ 128 ]; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr:\n" ); sprintf( str, " interval.interval_type: %d (%s)\n", val.interval_type, odbctest -> int_type_as_string( val.interval_type )); txt += str; sprintf( str, " interval.sign: %d\n", val.interval_sign); txt += str; sprintf( str, " interval.intval.day_second.day: %d\n", val.intval.day_second.day); txt += str; sprintf( str, " interval.intval.day_second.hour: %d\n", val.intval.day_second.hour); txt += str; sprintf( str, " interval.intval.day_second.minute: %d\n", val.intval.day_second.minute); txt += str; sprintf( str, " interval.intval.day_second.second: %d\n", val.intval.day_second.second); txt += str; sprintf( str, " interval.intval.day_second.fraction: %09d\n", val.intval.day_second.fraction); txt += str; break; } case SQL_C_INTERVAL_YEAR: case SQL_C_INTERVAL_YEAR_TO_MONTH: case SQL_C_INTERVAL_MONTH: { SQL_INTERVAL_STRUCT val; char str[ 128 ]; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr:\n" ); sprintf( str, " interval.interval_type: %d (%s)\n", val.interval_type, odbctest -> int_type_as_string( val.interval_type )); txt += str; sprintf( str, " interval.sign: %d\n", val.interval_sign); txt += str; sprintf( str, " interval.intval.year_month.year: %d\n", val.intval.year_month.year); txt += str; sprintf( str, " interval.intval.year_month.month: %d\n", val.intval.year_month.month); txt += str; break; } case SQL_C_LONG: { long val; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr: %d (0x%x)", val, val ); break; } case SQL_C_NUMERIC: { break; } case SQL_C_SBIGINT: { break; } case SQL_C_SLONG: { long val; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr: %d (0x%x)", val, val ); break; } case SQL_C_SSHORT: { short val; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr: %d (0x%x)", val, val ); break; } case SQL_C_STINYINT: { char val; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr: %d (0x%x)", val, val ); break; } case SQL_C_TIME: case SQL_C_TYPE_TIME: { SQL_TIME_STRUCT dt; memcpy( &dt, buf, sizeof( dt )); txt.sprintf( " *Target Value Ptr: %02d:%02d:%02d", dt.hour, dt.minute, dt.second ); break; } case SQL_C_TIMESTAMP: case SQL_C_TYPE_TIMESTAMP: { SQL_TIMESTAMP_STRUCT dt; memcpy( &dt, buf, sizeof( dt )); txt.sprintf( " *Target Value Ptr: %04d-%02d%02d %02d:%02d:%02d.%0d", dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.fraction ); break; } case SQL_C_TINYINT: { char val; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr: %d (0x%x)", val, val ); break; } case SQL_C_UBIGINT: { break; } case SQL_C_ULONG: { unsigned long val; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr: %lu (0x%lx)", val, val ); break; } case SQL_C_USHORT: { unsigned short val; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr: %u (0x%x)", val, val ); break; } case SQL_C_UTINYINT: { unsigned char val; memcpy( &val, buf, sizeof( val )); txt.sprintf( " *Target Value Ptr: %u (0x%x)", val, val ); break; } case SQL_C_BINARY: case SQL_C_GUID: case SQL_C_WCHAR: case SQL_ARD_TYPE: case SQL_C_DEFAULT: default: txt.sprintf( " *Target Value Ptr: 0x" ); if ( strlen_ptr ) { if ( strlen_or_ind > 32 ) { for ( int i = 0; i < 32; i ++ ) { char tmp[ 3 ]; sprintf( tmp, "%X", buf[ i ] ); txt += tmp; } } else { for ( int i = 0; i < strlen_or_ind; i ++ ) { char tmp[ 3 ]; sprintf( tmp, "%X", buf[ i ] ); txt += tmp; } } } else { if ( b_len > 32 ) { for ( int i = 0; i < 32; i ++ ) { char tmp[ 3 ]; sprintf( tmp, "%X", buf[ i ] ); txt += tmp; } } else { for ( int i = 0; i < b_len; i ++ ) { char tmp[ 3 ]; sprintf( tmp, "%X", buf[ i ] ); txt += tmp; } } } break; } odbctest -> out_win -> insertLineLimited( txt ); } if ( buf ) delete buf; odbctest -> out_win -> insertLineLimited( "" ); } dGetData::dGetData( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); column_num = new QLineEdit( this, "Column Num" ); column_num -> setGeometry( 130, 80, 70, 20 ); column_num -> setMaxLength( 6 ); column_num -> setText( "1" ); l_column_num = new QLabel( "Column Number:", this ); l_column_num -> setGeometry( 10, 80, 120, 20 ); type = new QComboBox( FALSE, this, "Data Type" ); type -> setGeometry( 130, 110, 340, 20 ); parent->fill_list_box( data_types, type ); l_type = new QLabel( "Target Type:", this ); l_type -> setGeometry( 10, 110, 120, 20 ); target_valid = new QCheckBox( "TargetValuePtr: VALID", this ); target_valid -> setGeometry( 10, 140, 300, 15 ); strlen_valid = new QCheckBox( "StrLen_or_IndValuePtr: VALID", this ); strlen_valid -> setGeometry( 10, 170, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 400, 140, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Len:", this ); l_buffer_len -> setGeometry( 320, 140, 60, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( target_valid, SIGNAL( clicked()), this, SLOT( target_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); } dGetData::~dGetData() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete column_num; delete l_column_num; delete type; delete l_type; delete target_valid; delete strlen_valid; delete buffer_len; delete l_buffer_len; } void dDescribeCol::name_clkd() { if ( name_valid -> isOn() ) name_valid -> setText( "Column Name Ptr: SQL_NULL_PTR" ); else name_valid -> setText( "Column Name Ptr: VALID" ); } void dDescribeCol::type_clkd() { if ( type_valid -> isOn() ) type_valid -> setText( "Name Length Ptr: SQL_NULL_PTR" ); else type_valid -> setText( "Name Length Ptr: VALID" ); } void dDescribeCol::size_clkd() { if ( size_valid -> isOn() ) size_valid -> setText( "Column Size Ptr: SQL_NULL_PTR" ); else size_valid -> setText( "Column Size Ptr: VALID" ); } void dDescribeCol::digit_clkd() { if ( digit_valid -> isOn() ) digit_valid -> setText( "Decimal Digits Ptr: SQL_NULL_PTR" ); else digit_valid -> setText( "Decimal Digits Ptr: VALID" ); } void dDescribeCol::null_clkd() { if ( null_valid -> isOn() ) null_valid -> setText( "Nullable Ptr: SQL_NULL_PTR" ); else null_valid -> setText( "Nullable Ptr: VALID" ); } const char *dDescribeCol::data_type_to_str( int type ) { int index = 0; struct attr_value *data_type = sql_data_types; while( TRUE ) { if ( !data_type -> text ) break; if ( data_type -> value == type ) break; data_type ++; }; if ( data_type -> text ) return data_type -> text; else return NULL; } void dDescribeCol::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT column_number; SQLSMALLINT buffer_length; SQLCHAR *column_name; SQLSMALLINT *name_length_ptr, name_length; SQLSMALLINT *data_type_ptr, data_type; SQLULEN *column_size_ptr, column_size; SQLSMALLINT *decimal_digit_ptr, decimal_digit; SQLSMALLINT *nullable_ptr, nullable; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLDescribeCol():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); column_number = atoi( column_num -> text().ascii()); txt.sprintf( " Column Number: %d", column_number ); odbctest -> out_win -> insertLineLimited( txt ); buffer_length = atoi( column_len -> text().ascii()); if ( name_valid -> isOn()) { column_name = NULL; } else if ( buffer_length < 300 ) { column_name = new SQLCHAR[ 300 ]; } else { column_name = new SQLCHAR[ buffer_length ]; } if ( column_name ) { txt.sprintf( " Column Name Ptr: %p", column_name ); odbctest -> out_win -> insertLineLimited( txt ); txt.sprintf( " Column Name Length: %d", buffer_length ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Column Name Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } if ( name_valid -> isOn() ) { name_length_ptr = NULL; txt.sprintf( " Name Length Ptr: " ); } else { name_length_ptr = &name_length; txt.sprintf( " Name Length Ptr: %p", name_length_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); name_length = -9999; if ( type_valid -> isOn() ) { data_type_ptr = NULL; txt.sprintf( " Data Type Ptr: " ); } else { data_type_ptr = &data_type; txt.sprintf( " Data Type Ptr: %p", data_type_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); data_type = -9999; if ( name_valid -> isOn() ) { column_size_ptr = NULL; txt.sprintf( " Column Size Ptr: " ); } else { column_size_ptr = &column_size; txt.sprintf( " Column Size Ptr: %p", column_size_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); column_size = 9999; if ( digit_valid -> isOn() ) { decimal_digit_ptr = NULL; txt.sprintf( " Decimal Digits Ptr: " ); } else { decimal_digit_ptr = &decimal_digit; txt.sprintf( " Decimal Digits Ptr: %p", decimal_digit_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); decimal_digit = -9999; if ( null_valid -> isOn() ) { nullable_ptr = NULL; txt.sprintf( " Nullable Ptr: " ); } else { nullable_ptr = &nullable; txt.sprintf( " Nullable Ptr: %p", nullable_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); nullable = -9999; SQLRETURN ret = SQLDescribeCol( in_handle, column_number, column_name, buffer_length, name_length_ptr, data_type_ptr, column_size_ptr, decimal_digit_ptr, nullable_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( SQL_SUCCEEDED( ret )) { if ( column_name ) { txt.sprintf( " Column Name: %s", column_name ); odbctest -> out_win -> insertLineLimited( txt ); } if ( name_length_ptr ) { if ( name_length == -9999 ) { txt.sprintf( " *Name Length Ptr: " ); } else { txt.sprintf( " *Name Length Ptr: %d", name_length ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( data_type_ptr ) { if ( data_type == -9999 ) { txt.sprintf( " *Data Type Ptr: " ); } else { const char *str = data_type_to_str( data_type ); if ( str ) txt.sprintf( " *Data Type Ptr: %s (%d)", str, data_type ); else txt.sprintf( " *Data Type Ptr: %d", data_type ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( column_size_ptr ) { if ( column_size == 9999 ) { txt.sprintf( " *Column Size Ptr: " ); } else { txt.sprintf( " *Column Size Ptr: %d", column_size ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( decimal_digit_ptr ) { if ( decimal_digit == -9999 ) { txt.sprintf( " *Decimal Digits Ptr: " ); } else { txt.sprintf( " *Decimal Digits Ptr: %d", decimal_digit ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( nullable_ptr ) { if ( nullable == -9999 ) { txt.sprintf( " *Nullable Ptr: " ); } else { txt.sprintf( " *Nullable Ptr: %d", nullable ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); } dDescribeCol::dDescribeCol( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); column_num = new QLineEdit( this, "Column Num" ); column_num -> setGeometry( 130, 80, 70, 20 ); column_num -> setMaxLength( 6 ); column_num -> setText( "1" ); l_column_num = new QLabel( "Column Number:", this ); l_column_num -> setGeometry( 10, 80, 120, 20 ); column_len = new QLineEdit( this, "Buffer Len" ); column_len -> setGeometry( 400, 110, 70, 20 ); column_len -> setMaxLength( 6 ); column_len -> setText( "300" ); l_column_len = new QLabel( "Column Buffer Len:", this ); l_column_len -> setGeometry( 280, 110, 110, 20 ); name_valid = new QCheckBox( "Column Name Ptr: VALID", this ); name_valid -> setGeometry( 10, 110, 250, 15 ); type_valid = new QCheckBox( "Name Length Ptr: VALID", this ); type_valid -> setGeometry( 10, 140, 250, 15 ); size_valid = new QCheckBox( "Column Size Ptr: VALID", this ); size_valid -> setGeometry( 10, 170, 250, 15 ); digit_valid = new QCheckBox( "Decimal Digits Ptr: VALID", this ); digit_valid -> setGeometry( 10, 200, 250, 15 ); null_valid = new QCheckBox( "Nullable Ptr: VALID", this ); null_valid -> setGeometry( 10, 230, 250, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( name_valid, SIGNAL( clicked()), this, SLOT( name_clkd())); connect( type_valid, SIGNAL( clicked()), this, SLOT( type_clkd())); connect( size_valid, SIGNAL( clicked()), this, SLOT( size_clkd())); connect( digit_valid, SIGNAL( clicked()), this, SLOT( digit_clkd())); connect( null_valid, SIGNAL( clicked()), this, SLOT( null_clkd())); } dDescribeCol::~dDescribeCol() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete column_num; delete l_column_num; delete column_len; delete l_column_len; delete name_valid; delete type_valid; delete size_valid; delete digit_valid; delete null_valid; } void dRowCount::Valid() { if ( valid -> isOn() ) valid -> setText( "RowCountPtr: SQL_NULL_PTR" ); else valid -> setText( "RowCountPtr: VALID" ); } void dRowCount::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLLEN num_rows; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLRowCount():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_PTR" ); odbctest -> out_win -> insertLineLimited( txt ); if ( valid -> isOn() ) txt.sprintf( " RowCountPtr: out_win -> insertLineLimited( txt ); num_rows = -9999; SQLRETURN ret = SQLRowCount( in_handle, valid -> isOn() ? NULL : &num_rows ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( num_rows == -9999 ) { txt.sprintf( " *RowCountPtr: " ); } else { txt.sprintf( " *RowCountPtr: %d", num_rows ); } odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dRowCount::dRowCount( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 100,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 180,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 260,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); valid = new QCheckBox( "RowCountPtr: VALID", this ); valid -> setGeometry( 10, 80, 300, 15 ); connect( valid, SIGNAL( clicked()), this, SLOT( Valid())); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dRowCount::~dRowCount() { delete ok; delete cancel; delete help; delete handles; delete valid; } void dMoreResults::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT num_cols; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLMoreResults():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLMoreResults( in_handle ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dMoreResults::dMoreResults( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 100,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 180,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 260,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dMoreResults::~dMoreResults() { delete ok; delete cancel; delete help; delete handles; } void dSetPos::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLUSMALLINT row_num, op_val, lock_val; int index; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLSetPos():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); row_num = atoi( row_number -> text().ascii()); txt.sprintf( " Row Number: %d", row_num ); odbctest -> out_win -> insertLineLimited( txt ); index = operation -> currentItem(); op_val = set_pos_operation[ index ].value; txt.sprintf( " Operation: %s=%d", set_pos_operation[ index ].text, set_pos_operation[ index ].value ); odbctest -> out_win -> insertLineLimited( txt ); index = lock_type -> currentItem(); lock_val = set_pos_lock_type[ index ].value; txt.sprintf( " Lock Type: %s=%d", set_pos_lock_type[ index ].text, set_pos_lock_type[ index ].value ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLSetPos( in_handle, row_num, op_val, lock_val ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dSetPos::dSetPos( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 100,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 180,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 260,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); row_number = new QLineEdit( this, "Row Number" ); row_number -> setGeometry( 130, 80, 70, 20 ); row_number -> setMaxLength( 6 ); row_number -> setText( "1" ); l_row_number = new QLabel( "Row Number:", this ); l_row_number -> setGeometry( 10, 80, 120, 20 ); operation = new QComboBox( FALSE, this, "Operation" ); operation -> setGeometry( 130, 110, 200, 20 ); parent->fill_list_box( set_pos_operation, operation ); l_operation = new QLabel( "Operation:", this ); l_operation -> setGeometry( 10, 110, 120, 20 ); lock_type = new QComboBox( FALSE, this, "Operation" ); lock_type -> setGeometry( 130, 140, 200, 20 ); parent->fill_list_box( set_pos_lock_type, lock_type ); l_lock_type = new QLabel( "Lock Type:", this ); l_lock_type -> setGeometry( 10, 140, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dSetPos::~dSetPos() { delete ok; delete cancel; delete help; delete handles; delete operation; delete lock_type; delete l_handle; delete l_operation; delete l_lock_type; delete row_number; delete l_row_number; } void dBulkOperations::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLUSMALLINT op_val; int index; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLBulkOperations():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); index = operation -> currentItem(); op_val = bulk_operation[ index ].value; txt.sprintf( " Operation: %s=%d", bulk_operation[ index ].text, bulk_operation[ index ].value ); odbctest -> out_win -> insertLineLimited( txt ); index = operation -> currentItem(); op_val = bulk_operation[ index ].value; txt.sprintf( " Operation: %s=%d", bulk_operation[ index ].text, bulk_operation[ index ].value ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLBulkOperations( in_handle, op_val ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dBulkOperations::dBulkOperations( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 150,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 230,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 310,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); operation = new QComboBox( FALSE, this, "Operation" ); operation -> setGeometry( 130, 80, 250, 20 ); parent->fill_list_box( bulk_operation, operation ); l_operation = new QLabel( "Operation:", this ); l_operation -> setGeometry( 10, 80, 100, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dBulkOperations::~dBulkOperations() { delete ok; delete cancel; delete help; delete handles; delete operation; delete l_handle; delete l_operation; } void dColAttribute::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; int index; SQLUSMALLINT column_number; SQLUSMALLINT field_identifier; SQLPOINTER buf; SQLSMALLINT b_len, *b_len_ptr, b_len_value; SQLLEN *numeric_ptr, numeric_value; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLColAttribute():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); column_number = atoi( col_num -> text().ascii()); txt.sprintf( " Column Number: %d", column_number ); odbctest -> out_win -> insertLineLimited( txt ); field_identifier = field_ident_struct[ index = field_ident -> currentItem() ].attr; txt.sprintf( " Field Identifier: %s=%d", field_ident_struct[ index ].text, field_ident_struct[ index ].attr ); b_len = atoi( buffer_len -> text().ascii()); if ( b_len < 1 ) { b_len = 0; } if ( char_ptr_valid -> isOn()) { buf = NULL; } else if ( b_len < 300 ) { buf = malloc( 300 ); } else { buf = malloc( b_len ); } if ( buf ) { txt.sprintf( " CharacterAttributePtr: %p", buf ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " CharacterAttributePtr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } txt.sprintf( " Buffer Length: %d", b_len ); odbctest -> out_win -> insertLineLimited( txt ); if ( strlen_valid -> isOn()) { b_len_ptr = NULL; } else { b_len_ptr = &b_len_value; } if ( b_len_ptr ) { txt.sprintf( " StringLengthPtr: %p", b_len_ptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " StringLengthPtr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } b_len_value = -9999; if ( numeric_valid -> isOn()) { numeric_ptr = NULL; } else { numeric_ptr = &numeric_value; } if ( numeric_ptr ) { txt.sprintf( " NumericAttributePtr: %p", numeric_ptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " NumericAttributePtr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } numeric_value = -99999; SQLRETURN ret = SQLColAttribute( in_handle, column_number, field_identifier, buf, b_len, b_len_ptr, numeric_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { if ( field_ident_struct[ index ].data_type == SQL_CHAR ) { if ( b_len_ptr ) { if ( b_len_value != -9999 ) { txt.sprintf( " *StringLengthPtr: %d", b_len_value ); } else { txt.sprintf( " *StringLengthPtr: " ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( buf ) { txt.sprintf( " *CharacterAttributePtr: %s", buf ); odbctest -> out_win -> insertLineLimited( txt ); } } else { if ( numeric_ptr ) { txt.sprintf( " *NumericAttributePtr: %d", numeric_value ); odbctest -> out_win -> insertLineLimited( txt ); } } } odbctest -> out_win -> insertLineLimited( "" ); if ( buf ) free( buf ); } void dColAttribute::char_ptr_clkd() { if ( char_ptr_valid -> isOn() ) char_ptr_valid -> setText( "CharacterAttributePtr: SQL_NULL_HANDLE" ); else char_ptr_valid -> setText( "CharacterAttributePtr: VALID" ); } void dColAttribute::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "StringLengthPtr: SQL_NULL_HANDLE" ); else strlen_valid -> setText( "StringLengthPtr: VALID" ); } void dColAttribute::numeric_clkd() { if ( numeric_valid -> isOn() ) numeric_valid -> setText( "NumericAttributePtr: SQL_NULL_HANDLE" ); else numeric_valid -> setText( "NumericAttributePtr: VALID" ); } dColAttribute::dColAttribute( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 250,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 330,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 410,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handles = new QLabel( "Statement Handle:", this ); l_handles -> setGeometry( 10, 50, 120, 20 ); col_num = new QLineEdit( this, "Col Num" ); col_num -> setGeometry( 130, 80, 70, 20 ); col_num -> setMaxLength( 6 ); col_num -> setText( "1" ); l_col_num = new QLabel( "ColumnNumber:", this ); l_col_num -> setGeometry( 10, 80, 100, 20 ); field_ident = new QComboBox( FALSE, this, "field_ident" ); field_ident -> setGeometry( 130, 110, 350, 20 ); parent->fill_list_box( field_ident_struct, field_ident ); l_field_ident = new QLabel( "FieldIdentifier::", this ); l_field_ident -> setGeometry( 10, 110, 120, 20 ); char_ptr_valid = new QCheckBox( "CharacterAttributePtr: VALID", this ); char_ptr_valid -> setGeometry( 10, 140, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 400, 140, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "BufferLength:", this ); l_buffer_len -> setGeometry( 300, 140, 80, 20 ); strlen_valid = new QCheckBox( "StringLengthPtr: VALID", this ); strlen_valid -> setGeometry( 10, 170, 300, 15 ); numeric_valid = new QCheckBox( "NumericAttributePtr: VALID", this ); numeric_valid -> setGeometry( 10, 200, 300, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( char_ptr_valid, SIGNAL( clicked()), this, SLOT( char_ptr_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); connect( numeric_valid, SIGNAL( clicked()), this, SLOT( numeric_clkd())); } dColAttribute::~dColAttribute() { delete ok; delete cancel; delete help; delete handles; delete l_handles; delete col_num; delete l_col_num; delete field_ident; delete l_field_ident; delete char_ptr_valid; delete strlen_valid; delete numeric_valid; delete buffer_len; delete l_buffer_len; } void dColAttributes::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; int index; SQLUSMALLINT column_number; SQLUSMALLINT field_identifier; SQLPOINTER buf; SQLSMALLINT b_len, *b_len_ptr, b_len_value; SQLLEN *numeric_ptr, numeric_value; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLColAttributes():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); column_number = atoi( col_num -> text().ascii()); txt.sprintf( " icol: %d", column_number ); odbctest -> out_win -> insertLineLimited( txt ); field_identifier = ca_field_ident_struct[ index = field_ident -> currentItem() ].attr; txt.sprintf( " fDescType: %s=%d", ca_field_ident_struct[ index ].text, ca_field_ident_struct[ index ].attr ); b_len = atoi( buffer_len -> text().ascii()); if ( b_len < 1 ) { b_len = 0; } if ( char_ptr_valid -> isOn()) { buf = NULL; } else if ( b_len < 300 ) { buf = malloc( 300 ); } else { buf = malloc( b_len ); } if ( buf ) { txt.sprintf( " rgbDesc: %p", buf ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " rgbDesc: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } txt.sprintf( " cbDescMax: %d", b_len ); odbctest -> out_win -> insertLineLimited( txt ); if ( strlen_valid -> isOn()) { b_len_ptr = NULL; } else { b_len_ptr = &b_len_value; } if ( b_len_ptr ) { txt.sprintf( " pcbDesc: %p", b_len_ptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " pcbDesc: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } b_len_value = -9999; if ( numeric_valid -> isOn()) { numeric_ptr = NULL; } else { numeric_ptr = &numeric_value; } if ( numeric_ptr ) { txt.sprintf( " pfDesc: %p", numeric_ptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " pfDesc: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } numeric_value = -99999; SQLRETURN ret = SQLColAttributes( in_handle, column_number, field_identifier, buf, b_len, b_len_ptr, numeric_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { if ( ca_field_ident_struct[ index ].data_type == SQL_CHAR ) { if ( b_len_ptr ) { if ( b_len_value != -9999 ) { txt.sprintf( " *pcbDesc: %d", b_len_value ); } else { txt.sprintf( " *pcbDesc: " ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( buf ) { txt.sprintf( " *rgbDesc: %s", buf ); odbctest -> out_win -> insertLineLimited( txt ); } } else { if ( numeric_ptr ) { txt.sprintf( " *pfDesc: %d", numeric_value ); odbctest -> out_win -> insertLineLimited( txt ); } } } odbctest -> out_win -> insertLineLimited( "" ); if ( buf ) free( buf ); } void dColAttributes::char_ptr_clkd() { if ( char_ptr_valid -> isOn() ) char_ptr_valid -> setText( "rgbDesc: SQL_NULL_HANDLE" ); else char_ptr_valid -> setText( "rgbDesc: VALID" ); } void dColAttributes::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "pcbDesc: SQL_NULL_HANDLE" ); else strlen_valid -> setText( "pcbDesc: VALID" ); } void dColAttributes::numeric_clkd() { if ( numeric_valid -> isOn() ) numeric_valid -> setText( "pfDesc: SQL_NULL_HANDLE" ); else numeric_valid -> setText( "pfDesc: VALID" ); } dColAttributes::dColAttributes( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 250,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 330,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 410,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handles = new QLabel( "Statement Handle:", this ); l_handles -> setGeometry( 10, 50, 120, 20 ); col_num = new QLineEdit( this, "icol" ); col_num -> setGeometry( 130, 80, 70, 20 ); col_num -> setMaxLength( 6 ); col_num -> setText( "1" ); l_col_num = new QLabel( "icol:", this ); l_col_num -> setGeometry( 10, 80, 100, 20 ); field_ident = new QComboBox( FALSE, this, "field_ident" ); field_ident -> setGeometry( 130, 110, 350, 20 ); parent->fill_list_box( ca_field_ident_struct, field_ident ); l_field_ident = new QLabel( "fDescType:", this ); l_field_ident -> setGeometry( 10, 110, 120, 20 ); char_ptr_valid = new QCheckBox( "rgbDesc: VALID", this ); char_ptr_valid -> setGeometry( 10, 140, 300, 15 ); buffer_len = new QLineEdit( this, "cbDescMax" ); buffer_len -> setGeometry( 400, 140, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "cbDescMax:", this ); l_buffer_len -> setGeometry( 300, 140, 80, 20 ); strlen_valid = new QCheckBox( "pcbDesc: VALID", this ); strlen_valid -> setGeometry( 10, 170, 300, 15 ); numeric_valid = new QCheckBox( "pfDesc: VALID", this ); numeric_valid -> setGeometry( 10, 200, 300, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( char_ptr_valid, SIGNAL( clicked()), this, SLOT( char_ptr_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); connect( numeric_valid, SIGNAL( clicked()), this, SLOT( numeric_clkd())); } dColAttributes::~dColAttributes() { delete ok; delete cancel; delete help; delete handles; delete l_handles; delete col_num; delete l_col_num; delete field_ident; delete l_field_ident; delete char_ptr_valid; delete strlen_valid; delete numeric_valid; delete buffer_len; delete l_buffer_len; } void dFetchScroll::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT fetch_orentation; SQLINTEGER fetch_offset; int index; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLFetchScroll():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); index = orentation -> currentItem(); fetch_orentation = fetch_scroll_orentation[ index ].value; txt.sprintf( " FetchOrentation: %s=%d", fetch_scroll_orentation[ index ].text, fetch_scroll_orentation[ index ].value ); odbctest -> out_win -> insertLineLimited( txt ); fetch_offset = atoi( offset -> text().ascii()); txt.sprintf( " FetchOffset: %d", fetch_offset ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLFetchScroll( in_handle, fetch_orentation, fetch_offset ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dFetchScroll::dFetchScroll( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 200,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 280,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 360,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); orentation = new QComboBox( FALSE, this, "orentation" ); orentation -> setGeometry( 130, 80, 300, 20 ); parent->fill_list_box( fetch_scroll_orentation, orentation ); l_orentation = new QLabel( "FetchOffset:", this ); l_orentation -> setGeometry( 10, 80, 120, 20 ); offset = new QLineEdit( this, "Offset" ); offset -> setGeometry( 130, 110, 70, 20 ); offset -> setMaxLength( 6 ); offset -> setText( "1" ); l_offset = new QLabel( "FetchOffset:", this ); l_offset -> setGeometry( 10, 110, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dFetchScroll::~dFetchScroll() { delete ok; delete cancel; delete help; delete handles; delete orentation; delete offset; delete l_handle; delete l_orentation; delete l_offset; } void dExtendedFetch::count_ptr_clkd() { if ( count_ptr_valid -> isOn() ) count_ptr_valid -> setText( "RowCountPtr: SQL_NULL_HANDLE" ); else count_ptr_valid -> setText( "RowCountPtr: VALID" ); } void dExtendedFetch::status_ptr_clkd() { if ( status_ptr_valid -> isOn() ) status_ptr_valid -> setText( "RowStatusArray: SQL_NULL_HANDLE" ); else status_ptr_valid -> setText( "RowStatusArray: VALID" ); } void dExtendedFetch::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT fetch_orentation; SQLINTEGER fetch_offset; SQLULEN row_count, *row_count_ptr; SQLUSMALLINT *row_status_array; int index; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLExtendedFetch():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); index = orentation -> currentItem(); fetch_orentation = fetch_scroll_orentation[ index ].value; txt.sprintf( " FetchOrentation: %s=%d", fetch_scroll_orentation[ index ].text, fetch_scroll_orentation[ index ].value ); odbctest -> out_win -> insertLineLimited( txt ); fetch_offset = atoi( offset -> text().ascii()); txt.sprintf( " FetchOffset: %d", fetch_offset ); odbctest -> out_win -> insertLineLimited( txt ); if ( count_ptr_valid -> isOn()) { row_count_ptr = NULL; } else { row_count_ptr = &row_count; } if ( status_ptr_valid -> isOn()) { row_status_array = NULL; } else { if ( hand -> row_array_size > 1 ) { row_status_array = new SQLUSMALLINT[ hand -> row_array_size ]; } else { row_status_array = new SQLUSMALLINT[ 1 ]; } } SQLRETURN ret = SQLExtendedFetch( in_handle, fetch_orentation, fetch_offset, row_count_ptr, row_status_array ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { odbctest -> out_win -> insertLineLimited( " Out:" ); if ( row_count_ptr ) { txt.sprintf( " *RowCountPtr: %d", row_count); odbctest -> out_win -> insertLineLimited( txt ); } if ( row_status_array ) { if ( hand -> row_array_size > 1 ) { /* * we need to display the rowset here... */ } else { txt.sprintf( " *RowStatusArray: %d", row_status_array[ 0 ]); odbctest -> out_win -> insertLineLimited( txt ); } } } odbctest -> out_win -> insertLineLimited( "" ); if ( row_status_array ) { delete row_status_array; } } dExtendedFetch::dExtendedFetch( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 200,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 280,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 360,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); orentation = new QComboBox( FALSE, this, "orentation" ); orentation -> setGeometry( 130, 80, 300, 20 ); parent->fill_list_box( fetch_scroll_orentation, orentation ); l_orentation = new QLabel( "FetchOrentation:", this ); l_orentation -> setGeometry( 10, 80, 120, 20 ); offset = new QLineEdit( this, "FetchOffset" ); offset -> setGeometry( 130, 110, 70, 20 ); offset -> setMaxLength( 6 ); offset -> setText( "1" ); l_offset = new QLabel( "FetchOffset:", this ); l_offset -> setGeometry( 10, 110, 120, 20 ); count_ptr_valid = new QCheckBox( "RowCountPtr: VALID", this ); count_ptr_valid -> setGeometry( 10, 140, 300, 15 ); status_ptr_valid = new QCheckBox( "RowStatusArray: VALID", this ); status_ptr_valid -> setGeometry( 10, 170, 300, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( count_ptr_valid, SIGNAL( clicked()), this, SLOT( count_ptr_clkd())); connect( status_ptr_valid, SIGNAL( clicked()), this, SLOT( status_ptr_clkd())); } dExtendedFetch::~dExtendedFetch() { delete ok; delete cancel; delete help; delete handles; delete orentation; delete offset; delete l_handle; delete l_orentation; delete l_offset; delete count_ptr_valid; delete status_ptr_valid; } void dSetScrollOptions::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLUSMALLINT fConcurrency, crowRowset; SQLINTEGER crowKeyset; int index; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLSetScrollOptions():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); index = concurrency -> currentItem(); fConcurrency = set_scroll_cur_operation[ index ].value; txt.sprintf( " fConcurrency: %s=%d", set_scroll_cur_operation[ index ].text, set_scroll_cur_operation[ index ].value ); odbctest -> out_win -> insertLineLimited( txt ); index = keyset -> currentItem(); crowKeyset = set_scroll_ks_values[ index ].value; txt.sprintf( " crowKeyset: %s=%d", set_scroll_ks_values[ index ].text, set_scroll_ks_values[ index ].value ); odbctest -> out_win -> insertLineLimited( txt ); crowRowset = atoi( rowset -> text().ascii()); txt.sprintf( " crowRowset: %d", crowRowset ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLSetScrollOptions( in_handle, fConcurrency, crowKeyset, crowRowset ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { if ( crowRowset < 1 ) crowRowset = 1; hand -> row_array_size = crowRowset; } odbctest -> out_win -> insertLineLimited( "" ); } dSetScrollOptions::dSetScrollOptions( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 200,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 280,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 360,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); concurrency = new QComboBox( FALSE, this, "concurrency" ); concurrency -> setGeometry( 130, 80, 300, 20 ); parent->fill_list_box( set_scroll_cur_operation, concurrency ); l_concurrency = new QLabel( "fConcurrency:", this ); l_concurrency -> setGeometry( 10, 80, 120, 20 ); keyset = new QComboBox( FALSE, this, "Operation" ); keyset -> setGeometry( 130, 110, 300, 20 ); parent->fill_list_box( set_scroll_ks_values, keyset ); l_keyset = new QLabel( "crowKeyset:", this ); l_keyset -> setGeometry( 10, 110, 120, 20 ); rowset = new QLineEdit( this, "crowRowset" ); rowset -> setGeometry( 130, 140, 70, 20 ); rowset -> setMaxLength( 6 ); rowset -> setText( "1" ); l_rowset = new QLabel( "crowRowset:", this ); l_rowset -> setGeometry( 10, 140, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dSetScrollOptions::~dSetScrollOptions() { delete ok; delete cancel; delete help; delete handles; delete concurrency; delete keyset; delete l_handle; delete l_concurrency; delete l_keyset; delete rowset; delete l_rowset; } void OdbcTest::sqlbindcol() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlbulkoperations() { dBulkOperations *dlg = new dBulkOperations( this, "SQLBulkOperations" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlcolattribute() { dColAttribute *dlg = new dColAttribute( this, "SQLColAttribute" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlcolattributes() { dColAttributes *dlg = new dColAttributes( this, "SQLColAttributes" ); dlg -> exec(); delete dlg; } void OdbcTest::sqldescribecol() { dDescribeCol *dlg = new dDescribeCol( this, "SQLDescribeCol" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlextendedfetch() { dExtendedFetch *dlg = new dExtendedFetch( this, "SQLExtendedFetch" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlfetch() { dFetch *dlg = new dFetch( this, "SQLFetch" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlfetchscroll() { dFetchScroll *dlg = new dFetchScroll( this, "SQLFetchScroll" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetdata() { dGetData *dlg = new dGetData( this, "SQLGetData" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlmoreresults() { dMoreResults *dlg = new dMoreResults( this, "SQLMoreResults" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlnumresultscols() { dNumResultCols *dlg = new dNumResultCols( this, "SQLNumResultCols" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlrowcount() { dRowCount *dlg = new dRowCount( this, "SQLRowCount" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlsetpos() { dSetPos *dlg = new dSetPos( this, "SQLSetPos" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlsetscrolloptions() { dSetScrollOptions *dlg = new dSetScrollOptions( this, "SQLSetScrollOptions" ); dlg -> exec(); delete dlg; } void OdbcTest::bindcolall() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::describecolall() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::fetchall() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::getdatastmt( SQLHANDLE hstmt ) { SQLRETURN ret; SQLSMALLINT column_count; struct column_info { SQLCHAR column_name[ 128 ]; SQLSMALLINT data_type; SQLULEN column_size; SQLCHAR column_buffer[ 64 ]; SQLLEN str_len; }; int i; int line_count; if ( !hstmt ) { return; } /* * Get number of columns */ ret = SQLNumResultCols( hstmt, &column_count ); if ( !SQL_SUCCEEDED( ret )) { dumpError( SQL_HANDLE_STMT, hstmt ); out_win->insertLineLimited( "SQLNumResultCols() failed\n" ); return; } if ( column_count < 1 ) { out_win->insertLineLimited( "No result columns\n" ); return; } /* * get column names and types */ struct column_info *col_info = new struct column_info[ column_count ]; for ( i = 0; i < column_count; i ++ ) { ret = SQLDescribeCol( hstmt, i + 1, col_info[ i ].column_name, sizeof( col_info[ i ].column_name ), NULL, &col_info[ i ].data_type, &col_info[ i ].column_size, NULL, NULL ); if ( !SQL_SUCCEEDED( ret )) { dumpError( SQL_HANDLE_STMT, hstmt ); out_win->insertLineLimited( "SQLDescribeCol() failed\n" ); delete col_info; return; } } /* * output buffer */ char *line = new char[ column_count * ( sizeof( col_info[ i ].column_name ) + 1 )]; line[ 0 ] = '\0'; for ( i = 0; i < column_count; i ++ ) { if ( i > 0 ) strcat( line, ":" ); strcat( line, (char *)col_info[ i ].column_name ); } out_win -> insertLineLimited( line ); /* * get the data */ line_count = 0; while( SQL_SUCCEEDED( ret = SQLFetch( hstmt ))) { line_count ++; line[ 0 ] = '\0'; for ( i = 0; i < column_count; i ++ ) { ret = SQLGetData( hstmt, i + 1, SQL_C_CHAR, col_info[ i ].column_buffer, sizeof( col_info[ i ].column_buffer ), &col_info[ i ].str_len ); if ( !SQL_SUCCEEDED( ret )) { dumpError( SQL_HANDLE_STMT, hstmt ); out_win->insertLineLimited( "SQLGetData() failed\n" ); delete line; delete col_info; return; } if ( i > 0 ) strcat( line, ":" ); if ( col_info[ i ].str_len < 0 ) { strcat( line, "NULL" ); } else { strcat( line, (char*)col_info[ i ].column_buffer ); } } out_win->insertLineLimited( line ); } if ( ret != SQL_NO_DATA ) { dumpError( SQL_HANDLE_STMT, hstmt ); out_win->insertLineLimited( "SQLFetch() failed\n" ); delete line; delete col_info; return; } /* * Eat any trunc errors */ do { SQLINTEGER native; SQLCHAR sqlstate[ 6 ]; SQLCHAR msg[ SQL_MAX_MESSAGE_LENGTH ]; ret = SQLError( SQL_NULL_HENV, SQL_NULL_HDBC, hstmt, sqlstate, &native, msg, sizeof( msg ), NULL ); } while( SQL_SUCCEEDED( ret )); /* * close off the cursor */ ret = SQLCloseCursor( hstmt ); if ( !SQL_SUCCEEDED( ret )) { dumpError( SQL_HANDLE_STMT, hstmt ); out_win->insertLineLimited( "SQLCloseCursor() failed\n" ); delete line; delete col_info; return; } sprintf( line, "%d Line(s) Fetched\n", line_count ); out_win->insertLineLimited( line ); delete line; delete col_info; } void OdbcTest::getdataall() { /* * look for a statement handle */ Handle *hand; SQLHANDLE hstmt; int handle_count = 0; char txt[ 128 ]; for ( hand=listHandle.first(); hand != 0; hand=listHandle.next() ) { hand->toStr( txt ); if ( hand->getType() == SQL_HANDLE_STMT ) { handle_count ++; hstmt = hand->getHandle(); } } if ( handle_count == 0 ) { QMessageBox::about( this, "Get Data All", "No statement handles avalable" ); } else if ( handle_count == 1 ) { getdatastmt( hstmt ); } else { getdatastmt(); } } void OdbcTest::showboundcols() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::displayrowset() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } unixODBC-2.2.14-p2/odbctest/open.cpp0100644000076400007640000000357110564052121015453 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: open.cpp,v 1.2 2007/02/12 11:49:37 lurcher Exp $ * * $Log: open.cpp,v $ * Revision 1.2 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.1.1.1 2001/10/17 16:40:31 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.1 2000/05/04 17:04:48 ngorham * * Initial commit * * **********************************************************************/ #include "odbctest.h" #ifdef QT_V4LAYOUT #include #include #else #include #include #endif void OdbcTest::open() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::saveas() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::saveopt() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } unixODBC-2.2.14-p2/odbctest/odbctest.cpp0100644000076400007640000007533711017766550016346 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: odbctest.cpp,v 1.5 2008/05/30 12:04:56 lurcher Exp $ * * $Log: odbctest.cpp,v $ * Revision 1.5 2008/05/30 12:04:56 lurcher * Fix a couple of build problems and get ready for the next release * * Revision 1.4 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.3 2002/03/01 14:57:32 lurcher * * alter default size of odbctest * * Revision 1.2 2001/12/20 17:26:26 lurcher * * More warnings removed * * Revision 1.1.1.1 2001/10/17 16:40:31 lurcher * * First upload to SourceForge * * Revision 1.8 2001/06/05 01:04:40 nick * * More tweeks for QT 2 and 3 * * Revision 1.7 2001/06/04 15:24:49 nick * * Add port to MAC OSX and QT3 changes * * Revision 1.6 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.5 2001/04/17 16:29:39 nick * * More checks and autotest fixes * * Revision 1.4 2001/04/17 12:57:11 nick * * Extra for AutoTest * * Revision 1.3 2001/04/14 19:00:34 nick * * Add support for ODBC Test handles, and catch a few problems with * empty Gator.ini * * Revision 1.2 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.11 2000/06/23 16:23:23 ngorham * * Couple of small changes * * Revision 1.10 2000/06/21 08:59:43 ngorham * * More NEWS * * Revision 1.9 2000/06/15 09:31:04 ngorham * * Add some fixes and porting options after 1.8.9 has been released * * Revision 1.8 2000/06/13 12:30:26 ngorham * * Enough there for the first release I think * * Revision 1.7 2000/06/09 17:04:20 ngorham * * More, and More * * Revision 1.6 2000/06/08 17:14:08 ngorham * * And more * * Revision 1.5 2000/06/07 15:10:22 ngorham * * More additions * * Revision 1.4 2000/06/07 08:29:47 ngorham * * More additions * * Revision 1.3 2000/06/05 16:53:20 ngorham * * Next lot of updates * * Revision 1.2 2001/05/31 10:26:27 ngorham * * Fix a few minor typo's * * Revision 1.1 2000/05/04 17:04:48 ngorham * * Initial commit * * **********************************************************************/ #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #if (QT_VERSION>=300) #include #endif #endif #include #include #include "odbctest.h" #if (QT_VERSION<300) #ifdef QT_V4LAYOUT QTextEdit::QTextEdit (QWidget *parent, const char *name ) :Q3MultiLineEdit( parent, name ) { Q3MultiLineEdit::setMaxLines( 1 ); } #else QTextEdit::QTextEdit (QWidget *parent, const char *name ) :QMultiLineEdit( parent, name ) { QMultiLineEdit::setMaxLines( 1 ); } #endif void QTextEdit::maxLines( int n ) { #ifdef QT_V4LAYOUT Q3MultiLineEdit::setMaxLines( n ); #else QMultiLineEdit::setMaxLines( n ); #endif } void QTextEdit::setMaxLength( int x ) { #ifdef QT_V4LAYOUT Q3MultiLineEdit::setMaxLineLength( 1 ); #else QMultiLineEdit::setMaxLineLength( 1 ); #endif } void QTextEdit::append( const char *str ) { #ifdef QT_V4LAYOUT Q3MultiLineEdit::append( str ); #else QMultiLineEdit::append( str ); #endif setCursorPosition( numLines() + 1, 0 ); } #endif OutputWin::OutputWin( QWidget *parent , const char *name ) :QTextEdit( parent, name ) { #if (QT_VERSION<300) QTextEdit::maxLines( -1 ); #endif } void OutputWin::insertLineLimited( const char * str ) { QTextEdit::append( str ); } void OutputWin::setMaxLines( int i ) { max_lines = i; } char * Handle::toStr( char * str ) { switch( type ) { case SQL_HANDLE_ENV: sprintf( str, "henv: %p", handle ); break; case SQL_HANDLE_DBC: sprintf( str, "hdbc: %p", handle ); break; case SQL_HANDLE_STMT: sprintf( str, "hstmt: %p", handle ); break; case SQL_HANDLE_DESC: sprintf( str, "hdesc: %p \"%s\"", handle, description.latin1()); break; } return str; }; const char * OdbcTest::return_as_text( int ret ) { switch( ret ) { case SQL_SUCCESS: return "SQL_SUCCESS"; case SQL_SUCCESS_WITH_INFO: return "SQL_SUCCESS_WITH_INFO"; case SQL_ERROR: return "SQL_ERROR"; case SQL_INVALID_HANDLE: return "SQL_INVALID_HANDLE"; case SQL_STILL_EXECUTING: return "SQL_STILL_EXECUTING"; case SQL_NEED_DATA: return "SQL_NEED_DATA"; case SQL_NO_DATA: return "SQL_NO_DATA"; default: return "Unknown Return ?"; } } void OdbcTest::fill_list_box( attr_value *attr, QComboBox *lst ) { char txt[ 128 ]; for ( int i = 0; attr[ i ].text; i ++ ) { if ( strlen( attr[ i ].text ) > 0 ) { if ( attr[ i ].version ) { sprintf( txt, "%s=%d (%s)", attr[ i ].text, attr[ i ].value, attr[ i ].version ); } else { sprintf( txt, "%s=%d", attr[ i ].text, attr[ i ].value ); } } else { sprintf( txt, "%d", attr[ i ].value ); } lst -> insertItem( txt, i ); } } void OdbcTest::fill_list_box( attr_options *attr, QComboBox *lst ) { char txt[ 128 ]; for ( int i = 0; attr[ i ].text; i ++ ) { if ( strlen( attr[ i ].text ) > 0 ) { if ( attr[ i ].version ) { sprintf( txt, "%s=%d (%s)", attr[ i ].text, attr[ i ].attr, attr[ i ].version ); } else { sprintf( txt, "%s=%d", attr[ i ].text, attr[ i ].attr ); } } else { sprintf( txt, "%d", attr[ i ].attr ); } lst -> insertItem( txt, i ); } } SQLHANDLE OdbcTest::get_handle( int type ) { Handle *hand, *match = NULL; int i; char txt[ 128 ]; for ( hand=listHandle.first(), i = 0; hand != 0; hand=listHandle.next() ) { if ( hand->getType() == type ) { return hand->getHandle(); } } return SQL_NULL_HANDLE; } Handle * OdbcTest::fill_handle_list( int type, QComboBox *lst ) { Handle *hand, *match = NULL; int i; char txt[ 128 ]; for ( hand=listHandle.first(), i = 0; hand != 0; hand=listHandle.next() ) { hand->toStr( txt ); if ( type < 0 ) { lst->insertItem( txt, i ++ ); match = hand; } else if ( hand->getType() == type ) { lst->insertItem( txt, i ++ ); match = hand; } } lst->insertItem( "SQL_NULL_HANDLE", i ); return match; } Handle *OdbcTest::extract_handle_list( int type, QComboBox *lst ) { int index = lst -> currentItem(); Handle *hand; int i; for ( i = 0, hand=listHandle.first(); hand; hand=listHandle.next()) { if ( type < 0 || hand->getType() == type ) { if ( i == index ) { break; } i ++; } } return hand; } void OdbcTest::dumpError( int type, SQLHANDLE hnd ) { SQLRETURN ret; SQLINTEGER count, i; char handle[ 30 ]; switch( type ) { case SQL_HANDLE_ENV: sprintf( handle, "henv %p", hnd ); break; case SQL_HANDLE_DBC: sprintf( handle, "hdbc %p", hnd ); break; case SQL_HANDLE_STMT: sprintf( handle, "hstmt %p", hnd ); break; case SQL_HANDLE_DESC: sprintf( handle, "hdesc %p", hnd ); break; default: strcpy( handle, "unknown handle" ); break; } ret = SQLGetDiagField( type, hnd, 0, SQL_DIAG_NUMBER, &count, 0, NULL ); if ( !SQL_SUCCEEDED( ret )) { out_win->insertLineLimited( "SQLGetDiagField( SQL_DIAG_NUMBER ) failed" ); return; } for ( i = 1; i <= count; i ++ ) { SQLCHAR sqlstate[ 6 ]; SQLINTEGER native; SQLCHAR message_text[ SQL_MAX_MESSAGE_LENGTH ]; char txt[ SQL_MAX_MESSAGE_LENGTH + 50 ]; ret = SQLGetDiagRec( type, hnd, i, sqlstate, &native, message_text, sizeof( message_text ), NULL ); if ( !SQL_SUCCEEDED( ret )) { out_win->insertLineLimited( "SQLGetDiagRec() failed" ); return; } sprintf( txt, "Diag(%s):%s:%d:%s", handle, sqlstate, native, message_text ); out_win->insertLineLimited( txt ); } } OdbcTest::OdbcTest( QWidget *parent, const char *name ) #ifdef QT_V4LAYOUT : Q3MainWindow( parent, name ) #else : QMainWindow( parent, name ) #endif { #ifdef QT_V4LAYOUT Q3PopupMenu *file = new Q3PopupMenu( this ); #else QPopupMenu *file = new QPopupMenu( this ); #endif int id; #ifdef QT_V4LAYOUT file->insertItem( "E&xit", qApp, SLOT(quit()), Qt::CTRL+Qt::Key_Q ); #else file->insertItem( "E&xit", qApp, SLOT(quit()), CTRL+Key_Q ); #endif #ifdef QT_V4LAYOUT Q3PopupMenu* diag = new Q3PopupMenu( this ); #else QPopupMenu* diag = new QPopupMenu( this ); #endif diag->insertItem( "SQLGetDiag&Rec...", this, SLOT(sqlgetdiagrec()) ); diag->insertItem( "SQLGetDiag&Field...", this, SLOT(sqlgetdiagfield()) ); diag->insertItem( "SQL&Error...", this, SLOT(sqlerror()) ); diag->insertSeparator(); id = diag->insertItem( "Errors &All", this, SLOT(errorall()) ); diag->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* env = new Q3PopupMenu( this ); #else QPopupMenu* env = new QPopupMenu( this ); #endif env->insertItem( "SQL&AllocEnv...", this, SLOT(sqlallocenv()) ); env->insertItem( "SQL&AllocHandle...", this, SLOT(sqlallochandle()) ); env->insertItem( "SQLDataS&ources...", this, SLOT(sqldatasources()) ); env->insertItem( "S&QLDrivers...", this, SLOT(sqldrivers()) ); env->insertItem( "SQL&FreeEnv...", this, SLOT(sqlfreeenv()) ); env->insertItem( "SQLF&reeHandle...", this, SLOT(sqlfreehandle()) ); env->insertItem( "SQLE&ndTran...", this, SLOT(sqlendtran()) ); env->insertItem( "SQL&Transact...", this, SLOT(sqltransact()) ); env->insertSeparator(); id = env->insertItem( "Data &Sources All", this, SLOT(datasourcesall()) ); env->setItemEnabled( id, FALSE ); id = env->insertItem( "Dri&vers All", this, SLOT(driversall()) ); env->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* conn = new Q3PopupMenu( this ); #else QPopupMenu* conn = new QPopupMenu( this ); #endif conn->insertItem( "SQL&AllocConnect...", this, SLOT(sqlallocconnect()) ); conn->insertItem( "SQL&BrowseConnect...", this, SLOT(sqlbrowseconnect()) ); conn->insertItem( "SQL&Connect...", this, SLOT(sqlconnect()) ); conn->insertItem( "SQLD&riverConnect...", this, SLOT(sqldriverconnect()) ); conn->insertItem( "SQL&Disconnect...", this, SLOT(sqldisconnect()) ); conn->insertItem( "SQL&FreeConnect...", this, SLOT(sqlfreeconnect()) ); conn->insertItem( "S&QLGetFunctions...", this, SLOT(sqlgetfunctions()) ); conn->insertItem( "SQLGet&Info...", this, SLOT(sqlgetinfo()) ); conn->insertItem( "SQLN&ativeSQL...", this, SLOT(sqlnativesql()) ); conn->setItemEnabled( id, FALSE ); conn->insertSeparator(); #ifdef QT_V4LAYOUT conn->insertItem( "F&ull Connect...", this, SLOT(fullconnect()), Qt::CTRL+Qt::Key_F ); id = conn->insertItem( "Fu&ll Disconnect", this, SLOT(fulldisconnect()), Qt::CTRL+Qt::Key_D ); #else conn->insertItem( "F&ull Connect...", this, SLOT(fullconnect()), CTRL+Key_F ); id = conn->insertItem( "Fu&ll Disconnect", this, SLOT(fulldisconnect()), CTRL+Key_D ); #endif conn->setItemEnabled( id, FALSE ); conn->insertItem( "G&et Info All", this, SLOT(getinfoall()) ); id = conn->insertItem( "Get &Functions All", this, SLOT(getfunctionsall()) ); conn->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* desc = new Q3PopupMenu( this ); #else QPopupMenu* desc = new QPopupMenu( this ); #endif desc->insertItem( "SQLCop&yDesc...", this, SLOT(sqlcopydesc()) ); desc->insertItem( "SQLGetDesc&Field...", this, SLOT(sqlgetdescfield()) ); desc->insertItem( "SQLG&etDescRec...", this, SLOT(sqlgetdescrec()) ); id = desc->insertItem( "SQLSetDescF&ield...", this, SLOT(sqlsetdescfield()) ); desc->setItemEnabled( id, FALSE ); id = desc->insertItem( "SQLS&etDescRec...", this, SLOT(sqlsetdescrec()) ); desc->setItemEnabled( id, FALSE ); desc->insertSeparator(); id = desc->insertItem( "Get Descriptors All", this, SLOT(getdescriptorsall()) ); desc->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* stmt = new Q3PopupMenu( this ); #else QPopupMenu* stmt = new QPopupMenu( this ); #endif stmt->insertItem( "SQL&AllocStmt...", this, SLOT(sqlallocstmt()) ); id = stmt->insertItem( "S&QLBindParam...", this, SLOT(sqlbindparam()) ); stmt->setItemEnabled( id, FALSE ); id = stmt->insertItem( "SQL&BindParameter...", this, SLOT(sqlbindparameter()) ); stmt->setItemEnabled( id, FALSE ); stmt->insertItem( "SQL&Cancel...", this, SLOT(sqlcancel()) ); stmt->insertItem( "SQLCl&oseCursor...", this, SLOT(sqlclosecursor()) ); stmt->insertItem( "SQLDe&scribeParam...", this, SLOT(sqldescribeparam()) ); stmt->insertItem( "SQL&Execute...", this, SLOT(sqlexecute()) ); stmt->insertItem( "SQLExec&Direct...", this, SLOT(sqlexecdirect()) ); stmt->insertItem( "SQL&FreeStmt...", this, SLOT(sqlfreestmt()) ); stmt->insertItem( "SQL&GetCursorName...", this, SLOT(sqlgetcursorname()) ); stmt->insertItem( "SQL&NumParams...", this, SLOT(sqlnumparams()) ); stmt->insertItem( "SQLPara&mData...", this, SLOT(sqlparamdata()) ); stmt->insertItem( "SQLPa&ramOptions...", this, SLOT(sqlparamoptions()) ); stmt->insertItem( "SQL&Prepare...", this, SLOT(sqlprepare()) ); stmt->insertItem( "SQLP&utData...", this, SLOT(sqlputdata()) ); stmt->insertItem( "SQ&LSetCursorName...", this, SLOT(sqlsetcursorname()) ); stmt->insertSeparator(); id = stmt->insertItem( "F&ill Param...", this, SLOT(fillparam()) ); stmt->setItemEnabled( id, FALSE ); id = stmt->insertItem( "Sho&w Param...", this, SLOT(showparam()) ); stmt->setItemEnabled( id, FALSE ); id = stmt->insertItem( "S&how Cursor Settings...", this, SLOT(showcursorsettings()) ); stmt->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* attr = new Q3PopupMenu( this ); #else QPopupMenu* attr = new QPopupMenu( this ); #endif attr->insertItem( "SQLSet&StmtAttr...", this, SLOT(sqlsetstmtattr()) ); attr->insertItem( "SQLGetS&tmtAttr...", this, SLOT(sqlgetstmtattr()) ); attr->insertItem( "SQLSetStmt&Option...", this, SLOT(sqlsetstmtoption()) ); attr->insertItem( "SQLGetStmtOpt&ion...", this, SLOT(sqlgetstmtoption()) ); attr->insertSeparator(); attr->insertItem( "SQLSetConnect&Attr...", this, SLOT(sqlsetconnectattr()) ); attr->insertItem( "SQLGetC&onnectAttr...", this, SLOT(sqlgetconnectattr()) ); attr->insertItem( "SQLSetConnectO&ption...", this, SLOT(sqlsetconnectoption()) ); attr->insertItem( "SQLGetC&onnectOp&tion...", this, SLOT(sqlgetconnectoption()) ); attr->insertSeparator(); attr->insertItem( "SQLSet&EnvAttr...", this, SLOT(sqlsetenvattr()) ); attr->insertItem( "SQLGetE&nvAttr...", this, SLOT(sqlgetenvattr()) ); attr->insertSeparator(); id = attr->insertItem( "Set &Cursor Attributes...", this, SLOT(setcursoratributes()) ); attr->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* results = new Q3PopupMenu( this ); #else QPopupMenu* results = new QPopupMenu( this ); #endif id = results->insertItem( "SQL&BindCol...", this, SLOT(sqlbindcol()) ); results->setItemEnabled( id, FALSE ); results->insertItem( "SQLBul&kOperations...", this, SLOT(sqlbulkoperations()) ); results->insertItem( "S&QLColAttributes...", this, SLOT(sqlcolattributes()) ); results->insertItem( "SQLColAttribute...", this, SLOT(sqlcolattribute()) ); results->insertItem( "SQL&DescribeCol...", this, SLOT(sqldescribecol()) ); results->insertItem( "SQLE&xtendedFetch...", this, SLOT(sqlextendedfetch()) ); results->insertItem( "SQL&Fetch...", this, SLOT(sqlfetch()) ); results->insertItem( "SQLFetc&hScroll...", this, SLOT(sqlfetchscroll()) ); results->insertItem( "SQL&GetData...", this, SLOT(sqlgetdata()) ); results->insertItem( "SQL&MoreResults...", this, SLOT(sqlmoreresults()) ); results->insertItem( "SQL&NumResultsCols...", this, SLOT(sqlnumresultscols()) ); results->insertItem( "SQL&RowCount...", this, SLOT(sqlrowcount()) ); results->insertItem( "SQL&SetPos...", this, SLOT(sqlsetpos()) ); results->insertItem( "SQLS&etScrollOptions...", this, SLOT(sqlsetscrolloptions()) ); results->insertSeparator(); id = results->insertItem( "B&ind Col All", this, SLOT(bindcolall()) ); results->setItemEnabled( id, FALSE ); id = results->insertItem( "Describe C&ol All", this, SLOT(describecolall()) ); results->setItemEnabled( id, FALSE ); id = results->insertItem( "Fetch &All", this, SLOT(fetchall()) ); results->setItemEnabled( id, FALSE ); results->insertItem( "Get Data A&ll", this, SLOT(getdataall()) ); id = results->insertItem( "Sho&w Bound Cols", this, SLOT(showboundcols()) ); results->setItemEnabled( id, FALSE ); id = results->insertItem( "Display Rowset", this, SLOT(displayrowset()) ); results->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* catalog = new Q3PopupMenu( this ); #else QPopupMenu* catalog = new QPopupMenu( this ); #endif catalog->insertItem( "SQL&Columns...", this, SLOT(sqlcolumns()) ); catalog->insertItem( "SQL&ColumnPrivileges...", this, SLOT(sqlcolumnprivileges()) ); catalog->insertItem( "SQL&GetTypeInfo...", this, SLOT(sqlgettypeinfo()) ); catalog->insertItem( "SQL&ForeignKeys...", this, SLOT(sqlforeignkeys()) ); catalog->insertItem( "SQL&PrimaryKeys...", this, SLOT(sqlprimarykeys()) ); catalog->insertItem( "SQLP&rocedures...", this, SLOT(sqlprocedures()) ); catalog->insertItem( "SQLProc&edureColumns...", this, SLOT(sqlprocedurecolumns()) ); catalog->insertItem( "SQLSpecia&lColumns...", this, SLOT(sqlspecialcolumns()) ); catalog->insertItem( "SQL&Statistics...", this, SLOT(sqlstatistics()) ); catalog->insertItem( "SQL&Tables...", this, SLOT(sqltables()) ); catalog->insertItem( "SQLT&ablePrivileges...", this, SLOT(sqltableprivileges()) ); #ifdef QT_V4LAYOUT Q3PopupMenu* datasources = new Q3PopupMenu( this ); #else QPopupMenu* datasources = new QPopupMenu( this ); #endif datasources->insertItem( "SQL&ManageDataSources...", this, SLOT(sqlmanagedatasources()) ); datasources->insertItem( "SQL&RemoveDefaultDataSource...", this, SLOT(sqlremovedefaultdatasource()) ); datasources->insertItem( "SQL&ConfigDataSource...", this, SLOT(sqlconfigdatasource()) ); datasources->insertItem( "SQ&LCreatDataSource...", this, SLOT(sqlcreatedatasource()) ); datasources->insertItem( "SQL&ValidDSN...", this, SLOT(sqlvaliddsn()) ); datasources->insertItem( "SQLR&emoveDSNFromIni...", this, SLOT(sqlremovedsnfromini()) ); datasources->insertItem( "SQLWriteDSNTo&Ini...", this, SLOT(sqlwritedsntoini()) ); #ifdef QT_V4LAYOUT Q3PopupMenu* drivers = new Q3PopupMenu( this ); #else QPopupMenu* drivers = new QPopupMenu( this ); #endif id = drivers->insertItem( "SQLRemo&veDrivers...", this, SLOT(sqlremovedrivers()) ); drivers->setItemEnabled( id, FALSE ); id = drivers->insertItem( "S&QLConfigDrivers...", this, SLOT(sqlconfigdrivers()) ); drivers->setItemEnabled( id, FALSE ); id = drivers->insertItem( "SQLI&nstallDriver...", this, SLOT(sqlinstalldriver()) ); drivers->setItemEnabled( id, FALSE ); id = drivers->insertItem( "SQLI&nstallDriverEx...", this, SLOT(sqlinstalldriverex()) ); drivers->setItemEnabled( id, FALSE ); id = drivers->insertItem( "SQLGetInstalledDrivers...", this, SLOT(sqlgetinstalleddrivers()) ); drivers->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* drivermanager = new Q3PopupMenu( this ); #else QPopupMenu* drivermanager = new QPopupMenu( this ); #endif id = drivermanager->insertItem( "SQL&RemoveDriverManager...", this, SLOT(sqlremovedrivermanager()) ); drivermanager->setItemEnabled( id, FALSE ); id = drivermanager->insertItem( "SQL&InstallDriverManager...", this, SLOT(sqlinstalldrivermanager()) ); drivermanager->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* filedsn = new Q3PopupMenu( this ); #else QPopupMenu* filedsn = new QPopupMenu( this ); #endif id = filedsn->insertItem( "SQL&ReadFileDSN...", this, SLOT(sqlreadfiledsn()) ); filedsn->setItemEnabled( id, FALSE ); id = filedsn->insertItem( "SQL&WriteFileDSN...", this, SLOT(sqlwritefiledsn()) ); filedsn->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* profilestrings = new Q3PopupMenu( this ); #else QPopupMenu* profilestrings = new QPopupMenu( this ); #endif id = profilestrings->insertItem( "SQL&WritePrivateProfileString...", this, SLOT(sqlwriteprivateprofilestring()) ); profilestrings->setItemEnabled( id, FALSE ); id = profilestrings->insertItem( "SQL&GetPrivateProfileString...", this, SLOT(sqlgetprivateprofilestring()) ); profilestrings->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* translator = new Q3PopupMenu( this ); #else QPopupMenu* translator = new QPopupMenu( this ); #endif id = translator->insertItem( "SQL&InstallTranslator...", this, SLOT(sqlinstalltranslator()) ); translator->setItemEnabled( id, FALSE ); id = translator->insertItem( "SQLI&nstallTranslatorEx...", this, SLOT(sqlinstalltranslatorex()) ); translator->setItemEnabled( id, FALSE ); id = translator->insertItem( "SQL&RemoveTranslator...", this, SLOT(sqlremovetranslator()) ); translator->setItemEnabled( id, FALSE ); id = translator->insertItem( "SQL&GetTranslator...", this, SLOT(sqlgettranslator()) ); translator->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* configmode = new Q3PopupMenu( this ); #else QPopupMenu* configmode = new QPopupMenu( this ); #endif id = configmode->insertItem( "SQL&SetConfigMode...", this, SLOT(sqlsetconfigmode()) ); configmode->setItemEnabled( id, FALSE ); id = configmode->insertItem( "SQL&GetConfigMode...", this, SLOT(sqlgetconfigmode()) ); configmode->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* installer = new Q3PopupMenu( this ); #else QPopupMenu* installer = new QPopupMenu( this ); #endif id = installer->insertItem( "&Data Sources...", datasources ); installer->setItemEnabled( id, FALSE ); id = installer->insertItem( "Dri&vers...", drivers ); installer->setItemEnabled( id, FALSE ); id = installer->insertItem( "Driver&Manager...", drivermanager ); installer->setItemEnabled( id, FALSE ); id = installer->insertItem( "&File DSN...", filedsn ); installer->setItemEnabled( id, FALSE ); id = installer->insertItem( "&Profile Strings...", profilestrings ); installer->setItemEnabled( id, FALSE ); id = installer->insertItem( "&Translator...", translator ); installer->setItemEnabled( id, FALSE ); id = installer->insertItem( "C&onfig Mode...", configmode ); installer->setItemEnabled( id, FALSE ); #ifdef QT_V4LAYOUT Q3PopupMenu* tools = new Q3PopupMenu( this ); #else QPopupMenu* tools = new QPopupMenu( this ); #endif id = tools->insertItem( "&Options..", this, SLOT(options()) ); tools->setItemEnabled( id, FALSE ); id = tools->insertItem( "T&race..", this, SLOT(trace()) ); tools->setItemEnabled( id, FALSE ); tools->insertSeparator(); tools->insertItem( "Manage Test &Sources...", this, SLOT(manage_test()) ); tools->insertItem( "&Manage Auto Tests...", this, SLOT(manage_auto_test()) ); tools->insertItem( "&Manage Test &Groups...", this, SLOT(manage_test_groups()) ); tools->insertItem( "Run Auto &Tests...", this, SLOT(run_auto_tests()) ); #ifdef QT_V4LAYOUT Q3PopupMenu *help = new Q3PopupMenu( this ); #else QPopupMenu *help = new QPopupMenu( this ); #endif id = help->insertItem( "ODBC Test &Help", this, SLOT(testhelp()) ); help->setItemEnabled( id, FALSE ); id = help->insertItem( "API A&PI Help", this, SLOT(apihelp()) ); help->setItemEnabled( id, FALSE ); help->insertItem( "About ODBC Test...", this, SLOT(about()) ); menu = new QMenuBar( this ); menu->insertItem( "&File", file ); menu->insertItem( "Dia&g", diag ); menu->insertItem( "E&nv", env ); menu->insertItem( "&Conn", conn ); menu->insertItem( "&Desc", desc ); menu->insertItem( "&Stmt", stmt ); menu->insertItem( "&Attr", attr ); menu->insertItem( "&Results", results ); menu->insertItem( "Cata&log", catalog ); menu->insertItem( "&Installer", installer ); menu->insertItem( "&Tools", tools ); menu->insertSeparator(); menu->insertItem( "&Help", help ); menu->setSeparator( QMenuBar::InWindowsStyle ); this->setGeometry( 0, 0, 500, 250 ); #ifdef QT_V4LAYOUT split = new QSplitter( Qt::Vertical, this, "main" ); #else split = new QSplitter( QSplitter::Vertical, this, "main" ); #endif split -> setOpaqueResize( FALSE ); setCentralWidget( split ); #ifdef QT_V4LAYOUT in_win = new Q3MultiLineEdit( split ); #else in_win = new QMultiLineEdit( split ); #endif out_win = new OutputWin( split ); out_win -> setReadOnly( TRUE ); out_win -> setMaxLines( 1000 ); listHandle.setAutoDelete( TRUE ); } void OdbcTest::apihelp() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::testhelp() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::about() { QMessageBox::about( this, "ODBC Test", "This program is part of the unixODBC SDK.\n" "It can be used to test the ODBC API.\n" "Based on the ODBC test program supplied by Microsoft.\n" "Written by Nick Gorham." ); } void OdbcTest::resizeEvent( QResizeEvent * ) { // label->setGeometry( 20, rect().center().y()-20, width()-40, 40 ); } const char *OdbcTest::int_type_as_string( SQLINTERVAL itype ) { switch ( itype ) { case SQL_IS_YEAR: return "SQL_IS_YEAR"; case SQL_IS_MONTH: return "SQL_IS_MONTH"; case SQL_IS_DAY: return "SQL_IS_DAY"; case SQL_IS_HOUR: return "SQL_IS_HOUR"; case SQL_IS_MINUTE: return "SQL_IS_MINUTE"; case SQL_IS_SECOND: return "SQL_IS_SECOND"; case SQL_IS_YEAR_TO_MONTH: return "SQL_IS_YEAR_TO_MONTH"; case SQL_IS_DAY_TO_HOUR : return "SQL_IS_DAY_TO_HOUR"; case SQL_IS_DAY_TO_MINUTE: return "SQL_IS_DAY_TO_MINUTE"; case SQL_IS_DAY_TO_SECOND: return "SQL_IS_DAY_TO_SECOND"; case SQL_IS_HOUR_TO_MINUTE: return "SQL_IS_HOUR_TO_MINUTE"; case SQL_IS_HOUR_TO_SECOND: return "SQL_IS_HOUR_TO_SECOND"; case SQL_IS_MINUTE_TO_SECOND: return "SQL_IS_MINUTE_TO_SECOND"; } return "Unknown Type"; } int main( int argc, char ** argv ) { QApplication a( argc, argv ); OdbcTest m; a.setMainWidget( &m ); m.show(); return a.exec(); } Handle::Handle( int t, SQLHANDLE h, QString desc, SQLHANDLE stmt ) { type = t; handle = h; description = desc; stmt_handle = stmt; if ( stmt ) { implicit = 1; } else { implicit = 0; } handle_list = NULL; bookmark_ptr = new char[ 256 ]; param_bind_offset_ptr = ¶m_bind_offset; param_opt_ptr = ¶m_opt; param_status_ptr = ¶m_status; params_processed_ptr = ¶ms_processed; row_bind_offset_ptr = &row_bind_offset; row_operation_ptr = &row_operation; row_status_ptr = &row_status; rows_fetched_ptr = &rows_fetched; row_array_size = 0; param_array_size = 0; } #ifdef QT_V4LAYOUT Handle::Handle( int t, SQLHANDLE h, Q3PtrList &list ) #else Handle::Handle( int t, SQLHANDLE h, QList &list ) #endif { type = t; handle = h; implicit = 0; description = ""; stmt_handle = SQL_NULL_HANDLE; handle_list = &list; bookmark_ptr = new char[ 256 ]; param_bind_offset_ptr = ¶m_bind_offset; param_opt_ptr = ¶m_opt; param_status_ptr = ¶m_status; params_processed_ptr = ¶ms_processed; row_bind_offset_ptr = &row_bind_offset; row_operation_ptr = &row_operation; row_status_ptr = &row_status; rows_fetched_ptr = &rows_fetched; row_array_size = 0; param_array_size = 0; /* * extract any desc handles associated with a statement handle */ if ( type == SQL_HANDLE_STMT ) { SQLRETURN ret; SQLHANDLE desc; ret = SQLGetStmtAttr( h, SQL_ATTR_APP_PARAM_DESC, &desc, 0, NULL ); if ( SQL_SUCCEEDED( ret )) list.append( new Handle( SQL_HANDLE_DESC, desc, "Implicit APD", h )); ret = SQLGetStmtAttr( h, SQL_ATTR_APP_ROW_DESC, &desc, 0, NULL ); if ( SQL_SUCCEEDED( ret )) list.append( new Handle( SQL_HANDLE_DESC, desc, "Implicit ARD", h )); ret = SQLGetStmtAttr( h, SQL_ATTR_IMP_PARAM_DESC, &desc, 0, NULL ); if ( SQL_SUCCEEDED( ret )) list.append( new Handle( SQL_HANDLE_DESC, desc, "Implicit IPD", h )); ret = SQLGetStmtAttr( h, SQL_ATTR_IMP_ROW_DESC, &desc, 0, NULL ); if ( SQL_SUCCEEDED( ret )) list.append( new Handle( SQL_HANDLE_DESC, desc, "Implicit IRD", h )); } } Handle::Handle( Handle &e ) { type = e.type; handle = e.handle; implicit = 0; description = ""; stmt_handle = SQL_NULL_HANDLE; bookmark_ptr = new char[ 256 ]; param_bind_offset_ptr = ¶m_bind_offset; param_opt_ptr = ¶m_opt; param_status_ptr = ¶m_status; params_processed_ptr = ¶ms_processed; row_bind_offset_ptr = &row_bind_offset; row_operation_ptr = &row_operation; row_status_ptr = &row_status; rows_fetched_ptr = &rows_fetched; row_array_size = 0; param_array_size = 0; }; Handle::~Handle() { /* * remove the implicit descriptors if a stmt is removed */ if ( type == SQL_HANDLE_STMT ) { Handle *hand, *match = NULL; char txt[ 128 ]; int changed = 0; do { changed = 0; for ( hand=handle_list -> first(); hand != 0; hand=handle_list -> next() ) { if ( hand->getType() == SQL_HANDLE_DESC && hand->getStmtHandle() == handle ) { handle_list -> remove( hand ); changed = 1; break; } } } while( changed ); } } unixODBC-2.2.14-p2/odbctest/installer.cpp0100644000076400007640000001044610564052121016506 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * ********************************************************************** * * $Id: installer.cpp,v 1.2 2007/02/12 11:49:37 lurcher Exp $ * * $Log: installer.cpp,v $ * Revision 1.2 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.1.1.1 2001/10/17 16:40:31 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.2 2000/06/05 16:53:20 ngorham * * Next lot of updates * * Revision 1.1 2000/05/04 17:04:48 ngorham * * Initial commit * * **********************************************************************/ #include "odbctest.h" #ifdef QT_V4LAYOUT #include #include #else #include #include #endif void OdbcTest::sqlmanagedatasources() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlremovedefaultdatasource() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlconfigdatasource() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlcreatedatasource() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlvaliddsn() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlremovedsnfromini() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlwritedsntoini() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlremovedrivers() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlconfigdrivers() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlinstalldriver() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlinstalldriverex() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlgetinstalleddrivers() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlremovedrivermanager() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlinstalldrivermanager() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlreadfiledsn() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlwritefiledsn() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlwriteprivateprofilestring() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlgetprivateprofilestring() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlinstalltranslator() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlinstalltranslatorex() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlremovetranslator() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlgettranslator() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlsetconfigmode() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlgetconfigmode() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } unixODBC-2.2.14-p2/odbctest/env.cpp0100644000076400007640000010503210564052121015275 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * ********************************************************************** * * $Id: env.cpp,v 1.4 2007/02/12 11:49:37 lurcher Exp $ * * $Log: env.cpp,v $ * Revision 1.4 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.3 2004/06/21 10:01:17 lurcher * * Fix a couple of 64 bit issues * * Revision 1.2 2001/12/20 17:26:26 lurcher * * More warnings removed * * Revision 1.1.1.1 2001/10/17 16:40:31 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/20 09:42:58 nick * * Replace char[] with QString to avoid buffer overrun * * Revision 1.2 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.7 2000/06/23 16:23:22 ngorham * * Couple of small changes * * Revision 1.6 2000/06/16 14:09:28 ngorham * * Fix a couple of bugs in GetStmtOptions * * Revision 1.5 2000/06/13 12:30:25 ngorham * * Enough there for the first release I think * * Revision 1.4 2000/06/09 17:04:20 ngorham * * More, and More * * Revision 1.3 2000/06/05 16:53:20 ngorham * * Next lot of updates * * Revision 1.2 2001/05/31 10:26:27 ngorham * * Fix a few minor typo's * * Revision 1.1 2000/05/04 17:04:48 ngorham * * Initial commit * * **********************************************************************/ #include #include #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #endif #include #include #include "odbctest.h" #include "env.h" static attr_value handle_type_struct[] = { { "SQL_HANDLE_ENV", SQL_HANDLE_ENV }, { "SQL_HANDLE_DBC", SQL_HANDLE_DBC }, { NULL } }; static attr_value completion_type_struct[] = { { "SQL_COMMIT", SQL_COMMIT }, { "SQL_ROLLBACK", SQL_ROLLBACK }, { NULL } }; static attr_value data_sources_directions[] = { { "SQL_FETCH_NEXT", SQL_FETCH_NEXT }, { "SQL_FETCH_FIRST", SQL_FETCH_FIRST }, { "SQL_FETCH_FIRST_USER", SQL_FETCH_FIRST_USER }, { "SQL_FETCH_FIRST_SYSTEM", SQL_FETCH_FIRST_SYSTEM }, { NULL } }; static attr_value drivers_directions[] = { { "SQL_FETCH_NEXT", SQL_FETCH_NEXT }, { "SQL_FETCH_FIRST", SQL_FETCH_FIRST }, { NULL } }; void dAllocHandle::Ok() { SQLHANDLE out_handle, in_handle = SQL_NULL_HANDLE; SQLRETURN ret; SQLINTEGER type; const char *handle; switch( types -> currentItem()) { case 0: type = SQL_HANDLE_ENV; handle = "SQL_HANDLE_ENV=1"; break; case 1: type = SQL_HANDLE_DBC; handle = "SQL_HANDLE_DBC=2"; break; case 2: type = SQL_HANDLE_STMT; handle = "SQL_HANDLE_STMT=3"; break; case 3: type = SQL_HANDLE_DESC; handle = "SQL_HANDLE_DESC=4"; break; } /* * get input handle */ Handle *hand = odbctest->extract_handle_list( -1, handles ); if ( hand ) in_handle = hand -> getHandle(); /* * set output handle to something */ out_handle = 0; if ( valid -> isOn() ) ret = SQLAllocHandle( type, in_handle, SQL_NULL_HANDLE ); else ret = SQLAllocHandle( type, in_handle, &out_handle ); odbctest -> out_win -> insertLineLimited( "SQLAllocHandle():" ); odbctest -> out_win -> insertLineLimited( " In:" ); txt.sprintf( " Handle Type: %s", handle ); odbctest -> out_win -> insertLineLimited( txt ); if ( in_handle ) txt.sprintf( " InputHandle: %p", in_handle ); else txt.sprintf( " InputHandle: SQL_NULL_HANDLE" ); odbctest -> out_win -> insertLineLimited( txt ); if ( valid -> isOn() ) txt.sprintf( " OutputHandle: SQL_NULL_HANDLE" ); else txt.sprintf( " OutputHandle: %p", &out_handle ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( out_handle ) txt.sprintf( " *OutputHandle: %p", out_handle ); else txt.sprintf( " *OutputHandle: " ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); if ( SQL_SUCCEEDED( ret )) { odbctest->listHandle.append( new Handle( type, out_handle, odbctest->listHandle )); } } void dAllocHandle::out_handle_ptr_clkd() { if ( valid -> isOn() ) valid -> setText( "OutputHandlePtr: SQL_NULL_HANDLE" ); else valid -> setText( "OutputHandlePtr: VALID" ); } dAllocHandle::dAllocHandle( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 90,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 170,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 250,10, 70,25 ); handles = new QComboBox( FALSE, this, "Input Handle" ); handles -> setGeometry( 120, 80, 200, 20 ); odbctest->fill_handle_list( -1, handles ); types = new QComboBox( FALSE, this, "Handle Type" ); types -> setGeometry( 120, 50, 200, 20 ); types -> insertItem( "SQL_HANDLE_ENV=1 (3.0)", 0 ); types -> insertItem( "SQL_HANDLE_DBC=2 (3.0)", 1 ); types -> insertItem( "SQL_HANDLE_STMT=3 (3.0)", 2 ); types -> insertItem( "SQL_HANDLE_DESC=3 (3.0)", 3 ); valid = new QCheckBox( "OutputHandlePtr: VALID", this ); valid -> setGeometry( 10, 120, 200, 15 ); connect( valid, SIGNAL( clicked()), this, SLOT( out_handle_ptr_clkd())); l_handle = new QLabel( "InputHandle:", this ); l_handle -> setGeometry( 10, 80, 70, 20 ); l_types = new QLabel( "HandleType:", this ); l_types -> setGeometry( 10, 50, 70, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dAllocHandle::~dAllocHandle() { delete ok; delete cancel; delete help; delete types; delete handles; delete l_handle; delete l_types; delete valid; } void dFreeHandle::Ok() { SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLRETURN ret; SQLINTEGER type; const char *handle; switch( types -> currentItem()) { case 0: type = SQL_HANDLE_ENV; handle = "SQL_HANDLE_ENV=1"; break; case 1: type = SQL_HANDLE_DBC; handle = "SQL_HANDLE_DBC=2"; break; case 2: type = SQL_HANDLE_STMT; handle = "SQL_HANDLE_STMT=3"; break; case 3: type = SQL_HANDLE_DESC; handle = "SQL_HANDLE_DESC=4"; break; } /* * get input handle */ Handle *hand = odbctest->extract_handle_list( -1, handles ); if ( hand ) in_handle = hand -> getHandle(); ret = SQLFreeHandle( type, in_handle ); odbctest -> out_win -> insertLineLimited( "SQLFreeHandle():" ); odbctest -> out_win -> insertLineLimited( " In:" ); txt.sprintf( " Handle Type: %s", handle ); odbctest -> out_win -> insertLineLimited( txt ); if ( in_handle ) txt.sprintf( " InputHandle: %p", in_handle ); else txt.sprintf( " InputHandle: SQL_NULL_HANDLE" ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); if ( SQL_SUCCEEDED( ret )) { odbctest->listHandle.remove( hand ); } } dFreeHandle::dFreeHandle( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 90,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 170,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 250,10, 70,25 ); handles = new QComboBox( FALSE, this, "Input Handle" ); handles -> setGeometry( 120, 80, 200, 20 ); odbctest->fill_handle_list( -1, handles ); types = new QComboBox( FALSE, this, "Handle Type" ); types -> setGeometry( 120, 50, 200, 20 ); types -> insertItem( "SQL_HANDLE_ENV=1 (3.0)", 0 ); types -> insertItem( "SQL_HANDLE_DBC=2 (3.0)", 1 ); types -> insertItem( "SQL_HANDLE_STMT=3 (3.0)", 2 ); types -> insertItem( "SQL_HANDLE_DESC=3 (3.0)", 3 ); l_handle = new QLabel( "InputHandle:", this ); l_handle -> setGeometry( 10, 80, 70, 20 ); l_types = new QLabel( "HandleType:", this ); l_types -> setGeometry( 10, 50, 70, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dFreeHandle::~dFreeHandle() { delete ok; delete cancel; delete help; delete types; delete handles; delete l_handle; delete l_types; } void dDataSources::server_clkd() { if ( server_valid -> isOn() ) server_valid -> setText( "ServerName: SQL_NULL_POINTER" ); else server_valid -> setText( "ServerName: VALID" ); } void dDataSources::description_clkd() { if ( description_valid -> isOn() ) description_valid -> setText( "Description: SQL_NULL_POINTER" ); else description_valid -> setText( "Description: VALID" ); } void dDataSources::nlp1_clkd() { if ( nlp1_valid -> isOn() ) nlp1_valid -> setText( "NameLengthPtr1: SQL_NULL_POINTER" ); else nlp1_valid -> setText( "NameLengthPtr1: VALID" ); } void dDataSources::nlp2_clkd() { if ( nlp2_valid -> isOn() ) nlp2_valid -> setText( "NameLengthPtr2: SQL_NULL_POINTER" ); else nlp2_valid -> setText( "NameLengthPtr2: VALID" ); } void dDataSources::Ok() { Handle *env = odbctest->extract_handle_list( SQL_HANDLE_ENV, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLCHAR *server_name, *description; SQLSMALLINT bl1, bl2, *nlp1, *nlp2, nl1, nl2; SQLUSMALLINT direc; if ( env ) in_handle = env -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLDataSources():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Environment Handle: %p", in_handle ); else txt.sprintf( " Environment Handle: SQL_NULL_HENV" ); odbctest -> out_win -> insertLineLimited( txt ); direc = data_sources_directions[ direction -> currentItem() ].value; txt.sprintf( " Direction: %s=%d", data_sources_directions[ direction -> currentItem() ].text, data_sources_directions[ direction -> currentItem() ].value ); bl1 = atoi( server_len -> text().ascii()); if ( server_valid -> isOn() ) { server_name = NULL; txt.sprintf( " ServerName: " ); } else { if ( bl1 < 0 ) bl1 = 300; server_name = new SQLCHAR[ bl1 ]; txt.sprintf( " ServerName: %p", bl1 ); } odbctest -> out_win -> insertLineLimited( txt ); if ( nlp1_valid -> isOn() ) { nlp1 = NULL; txt.sprintf( " NameLengthPtr 1: " ); } else { nl1 = -9999; nlp1 = &nl1; txt.sprintf( " NameLengthPtr 1: %p", nlp1 ); } odbctest -> out_win -> insertLineLimited( txt ); bl2 = atoi( description_len -> text().ascii()); if ( description_valid -> isOn() ) { description = NULL; txt.sprintf( " Description: " ); } else { if ( bl1 < 0 ) bl1 = 300; description = new SQLCHAR[ bl1 ]; txt.sprintf( " Description: %p", bl1 ); } odbctest -> out_win -> insertLineLimited( txt ); if ( nlp2_valid -> isOn() ) { nlp2 = NULL; txt.sprintf( " NameLengthPtr 2: " ); } else { nl2 = -9999; nlp2 = &nl2; txt.sprintf( " NameLengthPtr 2: %p", nlp2 ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLDataSources( in_handle, direc, server_name, bl1, nlp1, description, bl2, nlp2 ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { odbctest -> out_win -> insertLineLimited( " Out:" ); if ( server_name ) { txt.sprintf( " ServerName: %s", server_name ); odbctest -> out_win -> insertLineLimited( txt ); } if ( nlp1 ) { if ( nl1 == 9999 ) { txt.sprintf( " *NameLengthPtr 1: " ); } else { txt.sprintf( " *NameLengthPtr 1: %d", nl1 ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( description ) { txt.sprintf( " Description: %s", description ); odbctest -> out_win -> insertLineLimited( txt ); } if ( nlp2 ) { if ( nl2 == 9999 ) { txt.sprintf( " *NameLengthPtr 2: " ); } else { txt.sprintf( " *NameLengthPtr 2: %d", nl2 ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); if ( server_name ) delete server_name; if ( description ) delete description; } dDataSources::dDataSources( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 190,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 270,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 350,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_ENV, handles ); l_handles = new QLabel( "Environment Handle:", this ); l_handles -> setGeometry( 10, 50, 120, 20 ); direction = new QComboBox( FALSE, this, "Direction" ); direction -> setGeometry( 130, 80, 200, 20 ); parent->fill_list_box( data_sources_directions, direction ); l_direction = new QLabel( "Direction:", this ); l_direction -> setGeometry( 10, 80, 120, 20 ); server_valid = new QCheckBox( "ServerName: VALID", this ); server_valid -> setGeometry( 10, 110, 300, 15 ); server_len = new QLineEdit( this, "ServerName" ); server_len -> setGeometry( 350, 110, 70, 20 ); server_len -> setMaxLength( 6 ); server_len -> setText( "300" ); l_server_len = new QLabel( "BufferLength 1:", this ); l_server_len -> setGeometry( 240, 110, 100, 20 ); nlp1_valid = new QCheckBox( "Name Length Ptr 1: VALID", this ); nlp1_valid -> setGeometry( 10, 140, 300, 15 ); description_valid = new QCheckBox( "Description: VALID", this ); description_valid -> setGeometry( 10, 170, 300, 15 ); description_len = new QLineEdit( this, "Description" ); description_len -> setGeometry( 350, 170, 70, 20 ); description_len -> setMaxLength( 6 ); description_len -> setText( "300" ); l_description_len = new QLabel( "BufferLength 2:", this ); l_description_len -> setGeometry( 240, 170, 100, 20 ); nlp2_valid = new QCheckBox( "Name Length Ptr 2: VALID", this ); nlp2_valid -> setGeometry( 10, 200, 300, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( server_valid, SIGNAL( clicked()), this, SLOT( server_clkd())); connect( nlp1_valid, SIGNAL( clicked()), this, SLOT( nlp1_clkd())); connect( description_valid, SIGNAL( clicked()), this, SLOT( description_clkd())); connect( nlp2_valid, SIGNAL( clicked()), this, SLOT( nlp2_clkd())); } dDataSources::~dDataSources() { delete ok; delete cancel; delete help; delete handles; delete l_handles; delete direction; delete l_direction; delete server_valid; delete server_len; delete l_server_len; delete nlp1_valid; delete description_valid; delete description_len; delete l_description_len; delete nlp2_valid; } void dDrivers::server_clkd() { if ( server_valid -> isOn() ) server_valid -> setText( "ServerName: SQL_NULL_POINTER" ); else server_valid -> setText( "ServerName: VALID" ); } void dDrivers::description_clkd() { if ( description_valid -> isOn() ) description_valid -> setText( "Description: SQL_NULL_POINTER" ); else description_valid -> setText( "Description: VALID" ); } void dDrivers::nlp1_clkd() { if ( nlp1_valid -> isOn() ) nlp1_valid -> setText( "NameLengthPtr1: SQL_NULL_POINTER" ); else nlp1_valid -> setText( "NameLengthPtr1: VALID" ); } void dDrivers::nlp2_clkd() { if ( nlp2_valid -> isOn() ) nlp2_valid -> setText( "NameLengthPtr2: SQL_NULL_POINTER" ); else nlp2_valid -> setText( "NameLengthPtr2: VALID" ); } void dDrivers::Ok() { Handle *env = odbctest->extract_handle_list( SQL_HANDLE_ENV, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLCHAR *server_name, *description; SQLSMALLINT bl1, bl2, *nlp1, *nlp2, nl1, nl2; SQLUSMALLINT direc; if ( env ) in_handle = env -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLDrivers():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Environment Handle: %p", in_handle ); else txt.sprintf( " Environment Handle: SQL_NULL_HENV" ); odbctest -> out_win -> insertLineLimited( txt ); direc = drivers_directions[ direction -> currentItem() ].value; txt.sprintf( " Direction: %s=%d", data_sources_directions[ direction -> currentItem() ].text, data_sources_directions[ direction -> currentItem() ].value ); bl1 = atoi( server_len -> text().ascii()); if ( server_valid -> isOn() ) { server_name = NULL; txt.sprintf( " ServerName: " ); } else { if ( bl1 < 0 ) bl1 = 300; server_name = new SQLCHAR[ bl1 ]; txt.sprintf( " ServerName: %p", bl1 ); } odbctest -> out_win -> insertLineLimited( txt ); if ( nlp1_valid -> isOn() ) { nlp1 = NULL; txt.sprintf( " NameLengthPtr 1: " ); } else { nl1 = -9999; nlp1 = &nl1; txt.sprintf( " NameLengthPtr 1: %p", nlp1 ); } odbctest -> out_win -> insertLineLimited( txt ); bl2 = atoi( description_len -> text().ascii()); if ( description_valid -> isOn() ) { description = NULL; txt.sprintf( " Description: " ); } else { if ( bl1 < 0 ) bl1 = 300; description = new SQLCHAR[ bl1 ]; txt.sprintf( " Description: %p", bl1 ); } odbctest -> out_win -> insertLineLimited( txt ); if ( nlp2_valid -> isOn() ) { nlp2 = NULL; txt.sprintf( " NameLengthPtr 2: " ); } else { nl2 = -9999; nlp2 = &nl2; txt.sprintf( " NameLengthPtr 2: %p", nlp2 ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLDrivers( in_handle, direc, server_name, bl1, nlp1, description, bl2, nlp2 ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { odbctest -> out_win -> insertLineLimited( " Out:" ); if ( server_name ) { txt.sprintf( " ServerName: %s", server_name ); odbctest -> out_win -> insertLineLimited( txt ); } if ( nlp1 ) { if ( nl1 == 9999 ) { txt.sprintf( " *NameLengthPtr 1: " ); } else { txt.sprintf( " *NameLengthPtr 1: %d", nl1 ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( description ) { txt.sprintf( " Description: %s", description ); odbctest -> out_win -> insertLineLimited( txt ); } if ( nlp2 ) { if ( nl2 == 9999 ) { txt.sprintf( " *NameLengthPtr 2: " ); } else { txt.sprintf( " *NameLengthPtr 2: %d", nl2 ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); if ( server_name ) delete server_name; if ( description ) delete description; } dDrivers::dDrivers( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 190,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 270,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 350,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_ENV, handles ); l_handles = new QLabel( "Environment Handle:", this ); l_handles -> setGeometry( 10, 50, 120, 20 ); direction = new QComboBox( FALSE, this, "Direction" ); direction -> setGeometry( 130, 80, 200, 20 ); parent->fill_list_box( drivers_directions, direction ); l_direction = new QLabel( "Direction:", this ); l_direction -> setGeometry( 10, 80, 120, 20 ); server_valid = new QCheckBox( "ServerName: VALID", this ); server_valid -> setGeometry( 10, 110, 300, 15 ); server_len = new QLineEdit( this, "ServerName" ); server_len -> setGeometry( 350, 110, 70, 20 ); server_len -> setMaxLength( 6 ); server_len -> setText( "300" ); l_server_len = new QLabel( "BufferLength 1:", this ); l_server_len -> setGeometry( 240, 110, 100, 20 ); nlp1_valid = new QCheckBox( "Name Length Ptr 1: VALID", this ); nlp1_valid -> setGeometry( 10, 140, 300, 15 ); description_valid = new QCheckBox( "Description: VALID", this ); description_valid -> setGeometry( 10, 170, 300, 15 ); description_len = new QLineEdit( this, "Description" ); description_len -> setGeometry( 350, 170, 70, 20 ); description_len -> setMaxLength( 6 ); description_len -> setText( "300" ); l_description_len = new QLabel( "BufferLength 2:", this ); l_description_len -> setGeometry( 240, 170, 100, 20 ); nlp2_valid = new QCheckBox( "Name Length Ptr 2: VALID", this ); nlp2_valid -> setGeometry( 10, 200, 300, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( server_valid, SIGNAL( clicked()), this, SLOT( server_clkd())); connect( nlp1_valid, SIGNAL( clicked()), this, SLOT( nlp1_clkd())); connect( description_valid, SIGNAL( clicked()), this, SLOT( description_clkd())); connect( nlp2_valid, SIGNAL( clicked()), this, SLOT( nlp2_clkd())); } dDrivers::~dDrivers() { delete ok; delete cancel; delete help; delete handles; delete l_handles; delete direction; delete l_direction; delete server_valid; delete server_len; delete l_server_len; delete nlp1_valid; delete description_valid; delete description_len; delete l_description_len; delete nlp2_valid; } void dEndTran::sel_handle( int index ) { int handle_t; handles -> clear(); handle_t = handle_type_struct[ handle_type -> currentItem() ].value; odbctest->fill_handle_list( handle_t, handles ); } void dEndTran::Ok() { int htype = handle_type_struct[ handle_type -> currentItem() ].value; Handle *hand = odbctest->extract_handle_list( htype, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT completion; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLEndTran():" ); odbctest -> out_win -> insertLineLimited( " In:" ); txt.sprintf( " Handle Type: %s", handle_type_struct[ handle_type -> currentItem() ].text ); odbctest -> out_win -> insertLineLimited( txt ); if ( in_handle ) txt.sprintf( " Handle: %p", in_handle ); else txt.sprintf( " Handle: SQL_NULL_HANDLE" ); odbctest -> out_win -> insertLineLimited( txt ); completion = completion_type_struct[ completion_type -> currentItem() ].value; SQLRETURN ret = SQLEndTran( htype, in_handle, completion ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dEndTran::dEndTran( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 110,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 190,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 270,10, 70,25 ); handle_type = new QComboBox( FALSE, this, "Handle" ); handle_type -> setGeometry( 130, 50, 200, 20 ); parent->fill_list_box( handle_type_struct, handle_type ); l_handle_type = new QLabel( "Handle Type:", this ); l_handle_type -> setGeometry( 10, 50, 120, 20 ); handles = new QComboBox( FALSE, this, "Handles" ); handles -> setGeometry( 130, 80, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_ENV, handles ); l_handles = new QLabel( "Handle:", this ); l_handles -> setGeometry( 10, 80, 120, 20 ); completion_type = new QComboBox( FALSE, this, "Handle" ); completion_type -> setGeometry( 130, 110, 200, 20 ); parent->fill_list_box( completion_type_struct, completion_type ); l_completion_type = new QLabel( "Completion Type:", this ); l_completion_type -> setGeometry( 10, 110, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( handle_type, SIGNAL(activated(int)), this, SLOT( sel_handle(int))); } dEndTran::~dEndTran() { delete ok; delete cancel; delete help; delete handles; delete l_handles; delete handle_type; delete l_handle_type; delete completion_type; delete l_completion_type; } void dAllocEnv::handle_clkd() { if ( handle_valid -> isOn() ) handle_valid -> setText( "phenv: SQL_NULL_POINTER" ); else handle_valid -> setText( "phenv: VALID" ); } void dAllocEnv::Ok() { SQLHENV henv, *henv_ptr; odbctest -> out_win -> insertLineLimited( "SQLAllocEnv():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( handle_valid -> isOn()) { henv_ptr = NULL; txt.sprintf( " phenv: SQL_NULL_HANDLE" ); } else { henv_ptr = &henv; txt.sprintf( " phenv: %p", henv_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLAllocEnv( henv_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret ) && henv_ptr ) { txt.sprintf( " *phenv: %p", henv ); odbctest -> out_win -> insertLineLimited( txt ); odbctest->listHandle.append( new Handle( SQL_HANDLE_ENV, henv ) ); } odbctest -> out_win -> insertLineLimited( "" ); } dAllocEnv::dAllocEnv( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 90,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 170,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 250,10, 70,25 ); handle_valid = new QCheckBox( "phenv: VALID", this ); handle_valid -> setGeometry( 10, 50, 300, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( handle_valid, SIGNAL( clicked()), this, SLOT( handle_clkd())); } dAllocEnv::~dAllocEnv() { delete ok; delete cancel; delete help; delete handle_valid; } void dFreeEnv::Ok() { Handle *env = odbctest->extract_handle_list( SQL_HANDLE_ENV, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( env ) in_handle = env -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLFreeEnv():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " henv: %p", in_handle ); else txt.sprintf( " henv: SQL_NULL_HENV" ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLFreeEnv( in_handle ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret ) && in_handle ) { odbctest->listHandle.remove( env ); } odbctest -> out_win -> insertLineLimited( "" ); } dFreeEnv::dFreeEnv( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 90,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 170,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 250,10, 70,25 ); handles = new QComboBox( FALSE, this, "henv" ); handles -> setGeometry( 120, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_ENV, handles ); l_handles = new QLabel( "henv:", this ); l_handles -> setGeometry( 10, 50, 100, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dFreeEnv::~dFreeEnv() { delete ok; delete cancel; delete help; delete handles; delete l_handles; } void dTransact::Ok() { Handle *ehand = odbctest->extract_handle_list( SQL_HANDLE_ENV, ehandles ); Handle *chand = odbctest->extract_handle_list( SQL_HANDLE_DBC, chandles ); SQLHANDLE ein_handle = SQL_NULL_HANDLE; SQLHANDLE cin_handle = SQL_NULL_HANDLE; SQLSMALLINT completion; if ( ehand ) ein_handle = ehand -> getHandle(); if ( chand ) cin_handle = chand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLTransact():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( ein_handle ) txt.sprintf( " henv: %p", ein_handle ); else txt.sprintf( " henv: SQL_NULL_HENV" ); odbctest -> out_win -> insertLineLimited( txt ); if ( cin_handle ) txt.sprintf( " hdbc: %p", cin_handle ); else txt.sprintf( " hdbc: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); completion = completion_type_struct[ completion_type -> currentItem() ].value; SQLRETURN ret = SQLTransact( ein_handle, cin_handle, completion ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dTransact::dTransact( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 110,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 190,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 270,10, 70,25 ); ehandles = new QComboBox( FALSE, this, "Handles" ); ehandles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_ENV, ehandles ); l_ehandles = new QLabel( "henv:", this ); l_ehandles -> setGeometry( 10, 50, 120, 20 ); chandles = new QComboBox( FALSE, this, "Handles" ); chandles -> setGeometry( 130, 80, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, chandles ); l_chandles = new QLabel( "hdbc:", this ); l_chandles -> setGeometry( 10, 80, 120, 20 ); completion_type = new QComboBox( FALSE, this, "Handle" ); completion_type -> setGeometry( 130, 110, 200, 20 ); parent->fill_list_box( completion_type_struct, completion_type ); l_completion_type = new QLabel( "fType Type:", this ); l_completion_type -> setGeometry( 10, 110, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dTransact::~dTransact() { delete ok; delete cancel; delete help; delete ehandles; delete l_ehandles; delete chandles; delete l_chandles; delete completion_type; delete l_completion_type; } void OdbcTest::sqlallochandle() { dAllocHandle *dlg = new dAllocHandle( this, "SQLAllocHandle" ); dlg -> exec(); delete dlg; } void OdbcTest::sqldatasources() { dDataSources *dlg = new dDataSources( this, "SQLDataSources" ); dlg -> exec(); delete dlg; } void OdbcTest::sqldrivers() { dDrivers *dlg = new dDrivers( this, "SQLDrivers" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlendtran() { dEndTran *dlg = new dEndTran( this, "SQLEndTran" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlfreehandle() { dFreeHandle *dlg = new dFreeHandle( this, "SQLFreeHandle" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlallocenv() { dAllocEnv *dlg = new dAllocEnv( this, "SQLAllocEnv" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlfreeenv() { dFreeEnv *dlg = new dFreeEnv( this, "SQLFreeEnv" ); dlg -> exec(); delete dlg; } void OdbcTest::sqltransact() { dTransact *dlg = new dTransact( this, "SQLTransact" ); dlg -> exec(); delete dlg; } void OdbcTest::datasourcesall() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::driversall() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } unixODBC-2.2.14-p2/odbctest/edit.cpp0100644000076400007640000000463410564052121015440 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * ********************************************************************** * * $Id: edit.cpp,v 1.2 2007/02/12 11:49:37 lurcher Exp $ * * $Log: edit.cpp,v $ * Revision 1.2 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.1.1.1 2001/10/17 16:40:30 lurcher * * First upload to SourceForge * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.2 2000/06/05 16:53:19 ngorham * * Next lot of updates * * Revision 1.1 2000/05/04 17:04:48 ngorham * * Initial commit * * **********************************************************************/ #include "odbctest.h" #ifdef QT_V4LAYOUT #include #include #else #include #include #endif void OdbcTest::undo() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::cut() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::copy() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::paste() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::del() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::clearow() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::selectall() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::wrap() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } unixODBC-2.2.14-p2/odbctest/desc.cpp0100644000076400007640000006223710564052121015434 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * ********************************************************************** * * $Id: desc.cpp,v 1.3 2007/02/12 11:49:37 lurcher Exp $ * * $Log: desc.cpp,v $ * Revision 1.3 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.2 2001/12/13 13:00:34 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:30 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/20 09:42:58 nick * * Replace char[] with QString to avoid buffer overrun * * Revision 1.3 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.2 2001/05/04 15:32:54 nick * * Some makefile tweeks * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.5 2000/06/13 12:30:25 ngorham * * Enough there for the first release I think * * Revision 1.4 2000/06/07 08:29:47 ngorham * * More additions * * Revision 1.3 2000/06/05 16:53:19 ngorham * * Next lot of updates * * Revision 1.2 2001/05/31 10:26:27 ngorham * * Fix a few minor typo's * * Revision 1.1 2000/05/04 17:04:47 ngorham * * Initial commit * * **********************************************************************/ #include #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include #include #include "odbctest.h" #include "desc.h" static attr_options field_ident_struct[] = { { "SQL_DESC_ALLOC_TYPE", SQL_DESC_ALLOC_TYPE, { { NULL } }, "3.0", SQL_IS_USMALLINT }, { "SQL_DESC_ARRAY_SIZE", SQL_DESC_ARRAY_SIZE, { { NULL } }, "3.0", SQL_IS_UINTEGER }, { "SQL_DESC_ARRAY_STATUS_PTR", SQL_DESC_ARRAY_STATUS_PTR, { { NULL } }, "3.0", SQL_IS_POINTER }, { "SQL_DESC_BIND_OFFSET_PTR", SQL_DESC_BIND_OFFSET_PTR, { { NULL } }, "3.0", SQL_IS_POINTER }, { "SQL_DESC_BIND_TYPE", SQL_DESC_BIND_TYPE, { { NULL } }, "3.0", SQL_IS_UINTEGER }, { "SQL_DESC_COUNT", SQL_DESC_COUNT, { { NULL } }, "3.0", SQL_IS_SMALLINT }, { "SQL_DESC_ROWS_PROCESSED_PTR", SQL_DESC_ROWS_PROCESSED_PTR, { { NULL } }, "3.0", SQL_IS_POINTER }, { "SQL_DESC_AUTO_UNIQUE_VALUE", SQL_DESC_AUTO_UNIQUE_VALUE, { { NULL } }, "3.0", SQL_IS_INTEGER }, { "SQL_DESC_BASE_COLUMN_NAME", SQL_DESC_BASE_COLUMN_NAME, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DESC_BASE_TABLE_NAME", SQL_DESC_BASE_TABLE_NAME, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DESC_CASE_SENSITIVE", SQL_DESC_CASE_SENSITIVE, { { NULL } }, "3.0", SQL_IS_INTEGER }, { "SQL_DESC_CATALOG_NAME", SQL_DESC_CATALOG_NAME, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DESC_CONCISE_TYPE", SQL_DESC_CONCISE_TYPE, { { NULL } }, "3.0", SQL_IS_SMALLINT }, { "SQL_DESC_DATA_PTR", SQL_DESC_DATA_PTR, { { NULL } }, "3.0", SQL_IS_POINTER }, { "SQL_DESC_DATETIME_INTERVAL_CODE", SQL_DESC_DATETIME_INTERVAL_CODE, { { NULL } }, "3.0", SQL_IS_SMALLINT }, { NULL } }; void dCopyDesc::Ok() { Handle *desc1 = odbctest->extract_handle_list( SQL_HANDLE_DESC, handle1 ); SQLHANDLE in_handle1 = SQL_NULL_HANDLE; Handle *desc2 = odbctest->extract_handle_list( SQL_HANDLE_DESC, handle2 ); SQLHANDLE in_handle2 = SQL_NULL_HANDLE; if ( desc1 ) in_handle1 = desc1 -> getHandle(); if ( desc2 ) in_handle2 = desc2 -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLCopyDesc():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle1 ) txt.sprintf( " Source Handle: %p", in_handle1 ); else txt.sprintf( " Source Handle: SQL_NULL_DESC" ); odbctest -> out_win -> insertLineLimited( txt ); if ( in_handle2 ) txt.sprintf( " Destination Handle: %p", in_handle2 ); else txt.sprintf( " Destination Handle: SQL_NULL_DESC" ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLCopyDesc( in_handle1, in_handle2 ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dCopyDesc::dCopyDesc( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 130,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 210,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 290,10, 70,25 ); handle1 = new QComboBox( FALSE, this, "Source Handle 1" ); handle1 -> setGeometry( 160, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DESC, handle1 ); l_handle1 = new QLabel( "Source Handle:", this ); l_handle1 -> setGeometry( 10, 50, 120, 20 ); handle2 = new QComboBox( FALSE, this, "Destination Handle 2" ); handle2 -> setGeometry( 160, 80, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DESC, handle2 ); l_handle2 = new QLabel( "Destination Handle:", this ); l_handle2 -> setGeometry( 10, 80, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dCopyDesc::~dCopyDesc() { delete ok; delete cancel; delete help; delete handle1; delete l_handle1; delete handle2; delete l_handle2; } void dGetDescField::ptr_clkd() { if ( ptr_valid -> isOn() ) ptr_valid -> setText( "ValuePtr: SQL_NULL_POINTER" ); else ptr_valid -> setText( "ValuePtr: VALID" ); } void dGetDescField::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "StringLengthPtr: SQL_NULL_POINTER" ); else strlen_valid -> setText( "StringLengthPtr: VALID" ); } void dGetDescField::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DESC, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT b_len, attribute; SQLINTEGER *strlen_ptr, strlen_val; SQLINTEGER rec_number; SQLPOINTER buf; SQLPOINTER pval; SQLINTEGER ival; SQLSMALLINT sval; SQLUINTEGER uival; SQLUSMALLINT usval; int buf_allocated = 0; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetDescField():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Handle: %p", in_handle ); else txt.sprintf( " Handle: SQL_NULL_HANDLE" ); odbctest -> out_win -> insertLineLimited( txt ); rec_number = atoi( rec_num -> text().ascii()); txt.sprintf( " RecNumber: %d", rec_number ); odbctest -> out_win -> insertLineLimited( txt ); attribute = field_ident_struct[ diag_info -> currentItem() ].attr; txt.sprintf( " FieldIdentifier: %s=%d", field_ident_struct[ diag_info -> currentItem() ].text, field_ident_struct[ diag_info -> currentItem() ].attr ); odbctest -> out_win -> insertLineLimited( txt ); b_len = atoi( buffer_len -> text().ascii()); if ( ptr_valid -> isOn() ) { buf = NULL; txt.sprintf( " ValuePtr: " ); } else if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_IS_POINTER ) { buf = &pval; } else if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_IS_INTEGER ) { buf = &ival; } else if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_IS_UINTEGER ) { buf = &uival; } else if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_IS_SMALLINT ) { buf = &sval; } else if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_IS_USMALLINT ) { buf = &usval; } else { if ( b_len < 0 ) b_len = 300; buf = malloc( b_len ); buf_allocated = 1; } if ( buf ) { txt.sprintf( " ValuePtr: %p", buf ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strlen_valid -> isOn() ) { txt.sprintf( " StringLengthPtr: " ); strlen_ptr = NULL; } else { strlen_ptr = &strlen_val; strlen_val = -9999; txt.sprintf( " StringLengthPtr: %p", strlen_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLGetDescField( in_handle, rec_number, attribute, buf, b_len, strlen_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { odbctest -> out_win -> insertLineLimited( " Out:" ); if ( buf ) { if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_CHAR ) { txt.sprintf( " ValuePtr: %s", buf ); } else if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_IS_POINTER ) { txt.sprintf( " ValuePtr: %p", pval ); } else if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_IS_INTEGER ) { txt.sprintf( " ValuePtr: %d", ival ); } else if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_IS_UINTEGER ) { txt.sprintf( " ValuePtr: %d", ival ); } else if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_IS_SMALLINT ) { txt.sprintf( " ValuePtr: %d", sval ); } else if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_IS_USMALLINT ) { txt.sprintf( " ValuePtr: %d", sval ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( strlen_ptr ) { if ( strlen_val == -9999 ) { txt.sprintf( " *StringLengthPtr: " ); } else { txt.sprintf( " *StringLengthPtr: %d", strlen_val ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); if ( buf && buf_allocated ) free( buf ); } dGetDescField::dGetDescField( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 250,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 330,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 410,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handles" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DESC, handles ); l_handles = new QLabel( "Handle:", this ); l_handles -> setGeometry( 10, 50, 120, 20 ); rec_num = new QLineEdit( this, "Rec Num" ); rec_num -> setGeometry( 130, 80, 70, 20 ); rec_num -> setMaxLength( 6 ); rec_num -> setText( "0" ); l_rec_num = new QLabel( "Rec Number:", this ); l_rec_num -> setGeometry( 10, 80, 100, 20 ); diag_info = new QComboBox( FALSE, this, "Info" ); diag_info -> setGeometry( 130, 110, 350, 20 ); parent->fill_list_box( field_ident_struct, diag_info ); l_diag_info = new QLabel( "Field Identifier:", this ); l_diag_info -> setGeometry( 10, 110, 120, 20 ); ptr_valid = new QCheckBox( "ValuePtr: VALID", this ); ptr_valid -> setGeometry( 10, 140, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 130, 170, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Length:", this ); l_buffer_len -> setGeometry( 10, 170, 100, 20 ); strlen_valid = new QCheckBox( "StringLengthPtr: VALID", this ); strlen_valid -> setGeometry( 10, 200, 300, 15 ); connect( ptr_valid, SIGNAL( clicked()), this, SLOT( ptr_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dGetDescField::~dGetDescField() { delete ok; delete cancel; delete help; delete handles; delete l_handles; delete ptr_valid; delete strlen_valid; delete buffer_len; delete l_buffer_len; delete rec_num; delete l_rec_num; delete l_diag_info; delete diag_info; } void dGetDescRec::name_clkd() { if ( name_valid -> isOn() ) name_valid -> setText( "Name: SQL_NULL_POINTER" ); else name_valid -> setText( "Name: VALID" ); } void dGetDescRec::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "StringLengthPtr: SQL_NULL_POINTER" ); else strlen_valid -> setText( "StringLengthPtr: VALID" ); } void dGetDescRec::type_clkd() { if ( type_valid -> isOn() ) type_valid -> setText( "TypePtr: SQL_NULL_POINTER" ); else type_valid -> setText( "TypePtr: VALID" ); } void dGetDescRec::sub_type_clkd() { if ( sub_type_valid -> isOn() ) sub_type_valid -> setText( "SubTypePtr: SQL_NULL_POINTER" ); else sub_type_valid -> setText( "SubTypePtr: VALID" ); } void dGetDescRec::length_clkd() { if ( length_valid -> isOn() ) length_valid -> setText( "LengthPtr: SQL_NULL_POINTER" ); else length_valid -> setText( "LengthPtr: VALID" ); } void dGetDescRec::precision_clkd() { if ( precision_valid -> isOn() ) precision_valid -> setText( "PrecisionPtr: SQL_NULL_POINTER" ); else precision_valid -> setText( "PrecisionPtr: VALID" ); } void dGetDescRec::scale_clkd() { if ( scale_valid -> isOn() ) scale_valid -> setText( "ScalePtr: SQL_NULL_POINTER" ); else scale_valid -> setText( "ScalePtr: VALID" ); } void dGetDescRec::nullable_clkd() { if ( nullable_valid -> isOn() ) nullable_valid -> setText( "NullablePtr: SQL_NULL_POINTER" ); else nullable_valid -> setText( "NullablePtr: VALID" ); } void dGetDescRec::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DESC, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT b_len; SQLSMALLINT *strlen_ptr, strlen_val; SQLSMALLINT rec_number; SQLSMALLINT *type_ptr, type_val; SQLSMALLINT *sub_type_ptr, sub_type_val; SQLLEN *length_ptr, length_val; SQLSMALLINT *precision_ptr, precision_val; SQLSMALLINT *scale_ptr, scale_val; SQLSMALLINT *nullable_ptr, nullable_val; SQLCHAR *buf; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetDescRec():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Handle: %p", in_handle ); else txt.sprintf( " Handle: SQL_NULL_HANDLE" ); odbctest -> out_win -> insertLineLimited( txt ); rec_number = atoi( rec_num -> text().ascii()); txt.sprintf( " RecNumber: %d", rec_number ); odbctest -> out_win -> insertLineLimited( txt ); b_len = atoi( buffer_len -> text().ascii()); if ( name_valid -> isOn() ) { buf = NULL; txt.sprintf( " Name: " ); } else { if ( b_len < 0 ) b_len = 300; buf = new SQLCHAR[ b_len ]; txt.sprintf( " Name: %p", buf ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strlen_valid -> isOn() ) { txt.sprintf( " StringLengthPtr: " ); strlen_ptr = NULL; } else { strlen_ptr = &strlen_val; strlen_val = -9999; txt.sprintf( " StringLengthPtr: %p", strlen_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); if ( type_valid -> isOn() ) { txt.sprintf( " TypePtr: " ); type_ptr = NULL; } else { type_ptr = &type_val; type_val = -9999; txt.sprintf( " TypePtr: %p", type_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); if ( sub_type_valid -> isOn() ) { txt.sprintf( " SubTypePtr: " ); sub_type_ptr = NULL; } else { sub_type_ptr = &sub_type_val; sub_type_val = -9999; txt.sprintf( " SubTypePtr: %p", sub_type_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); if ( length_valid -> isOn() ) { txt.sprintf( " LengthPtr: " ); length_ptr = NULL; } else { length_ptr = &length_val; length_val = -9999; txt.sprintf( " LengthPtr: %p", length_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); if ( precision_valid -> isOn() ) { txt.sprintf( " PrecisionPtr: " ); precision_ptr = NULL; } else { precision_ptr = &precision_val; precision_val = -9999; txt.sprintf( " PrecisionPtr: %p", precision_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); if ( scale_valid -> isOn() ) { txt.sprintf( " ScalePtr: " ); scale_ptr = NULL; } else { scale_ptr = &scale_val; scale_val = -9999; txt.sprintf( " ScalePtr: %p", scale_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); if ( nullable_valid -> isOn() ) { txt.sprintf( " NullablePtr: " ); nullable_ptr = NULL; } else { nullable_ptr = &nullable_val; nullable_val = -9999; txt.sprintf( " NullablePtr: %p", nullable_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLGetDescRec( in_handle, rec_number, buf, b_len, strlen_ptr, type_ptr, sub_type_ptr, length_ptr, precision_ptr, scale_ptr, nullable_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { odbctest -> out_win -> insertLineLimited( " Out:" ); if ( buf ) { txt.sprintf( " Name: %s", buf ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strlen_ptr ) { if ( strlen_val == -9999 ) { txt.sprintf( " *StringLengthPtr: " ); } else { txt.sprintf( " *StringLengthPtr: %d", strlen_val ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( type_ptr ) { if ( type_val == -9999 ) { txt.sprintf( " *TypePtr: " ); } else { txt.sprintf( " *TypePtr: %d", type_val ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( sub_type_ptr ) { if ( sub_type_val == -9999 ) { txt.sprintf( " *SubTypePtr: " ); } else { txt.sprintf( " *SubTypePtr: %d", sub_type_val ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( length_ptr ) { if ( length_val == -9999 ) { txt.sprintf( " *LengthPtr: " ); } else { txt.sprintf( " *LengthPtr: %d", length_val ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( precision_ptr ) { if ( precision_val == -9999 ) { txt.sprintf( " *PrecisionPtr: " ); } else { txt.sprintf( " *PrecisionPtr: %d", precision_val ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( nullable_ptr ) { if ( nullable_val == -9999 ) { txt.sprintf( " *NullablePtr: " ); } else { txt.sprintf( " *NullablePtr: %d", nullable_val ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); if ( buf ) delete buf; } dGetDescRec::dGetDescRec( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 250,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 330,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 410,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handles" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DESC, handles ); l_handles = new QLabel( "Handle:", this ); l_handles -> setGeometry( 10, 50, 120, 20 ); rec_num = new QLineEdit( this, "Rec Num" ); rec_num -> setGeometry( 130, 80, 70, 20 ); rec_num -> setMaxLength( 6 ); rec_num -> setText( "0" ); l_rec_num = new QLabel( "Rec Number:", this ); l_rec_num -> setGeometry( 10, 80, 100, 20 ); name_valid = new QCheckBox( "Name: VALID", this ); name_valid -> setGeometry( 10, 110, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 130, 140, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Length:", this ); l_buffer_len -> setGeometry( 10, 140, 100, 20 ); strlen_valid = new QCheckBox( "StringLengthPtr: VALID", this ); strlen_valid -> setGeometry( 10, 170, 220, 15 ); type_valid = new QCheckBox( "TypePtr: VALID", this ); type_valid -> setGeometry( 300, 170, 220, 15 ); sub_type_valid = new QCheckBox( "SubTypePtr: VALID", this ); sub_type_valid -> setGeometry( 10, 200, 220, 15 ); length_valid = new QCheckBox( "LengthPtr: VALID", this ); length_valid -> setGeometry( 300, 200, 220, 15 ); precision_valid = new QCheckBox( "PrecisionPtr: VALID", this ); precision_valid -> setGeometry( 10, 230, 220, 15 ); scale_valid = new QCheckBox( "ScalePtr: VALID", this ); scale_valid -> setGeometry( 300, 230, 220, 15 ); nullable_valid = new QCheckBox( "NullablePtr: VALID", this ); nullable_valid -> setGeometry( 10, 260, 220, 15 ); connect( name_valid, SIGNAL( clicked()), this, SLOT( name_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); connect( type_valid, SIGNAL( clicked()), this, SLOT( type_clkd())); connect( sub_type_valid, SIGNAL( clicked()), this, SLOT( sub_type_clkd())); connect( length_valid, SIGNAL( clicked()), this, SLOT( length_clkd())); connect( scale_valid, SIGNAL( clicked()), this, SLOT( scale_clkd())); connect( precision_valid, SIGNAL( clicked()), this, SLOT( precision_clkd())); connect( nullable_valid, SIGNAL( clicked()), this, SLOT( nullable_clkd())); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dGetDescRec::~dGetDescRec() { delete ok; delete cancel; delete help; delete handles; delete l_handles; delete name_valid; delete strlen_valid; delete type_valid; delete sub_type_valid; delete length_valid; delete precision_valid; delete nullable_valid; delete scale_valid; delete buffer_len; delete l_buffer_len; delete rec_num; delete l_rec_num; } void OdbcTest::sqlcopydesc() { dCopyDesc *dlg = new dCopyDesc( this, "SQLCopyDesc" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetdescfield() { dGetDescField *dlg = new dGetDescField( this, "SQLGetDescField" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetdescrec() { dGetDescRec *dlg = new dGetDescRec( this, "SQLGetDescRec" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlsetdescfield() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlsetdescrec() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::getdescriptorsall() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } unixODBC-2.2.14-p2/odbctest/diag.cpp0100644000076400007640000006405010564052121015415 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * ********************************************************************** * * $Id: diag.cpp,v 1.2 2007/02/12 11:49:37 lurcher Exp $ * * $Log: diag.cpp,v $ * Revision 1.2 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.1.1.1 2001/10/17 16:40:30 lurcher * * First upload to SourceForge * * Revision 1.3 2001/07/20 09:42:58 nick * * Replace char[] with QString to avoid buffer overrun * * Revision 1.2 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.4 2000/06/13 12:30:25 ngorham * * Enough there for the first release I think * * Revision 1.3 2000/06/05 16:53:19 ngorham * * Next lot of updates * * Revision 1.2 2001/05/31 10:26:27 ngorham * * Fix a few minor typo's * * Revision 1.1 2000/05/04 17:04:48 ngorham * * Initial commit * * **********************************************************************/ #include #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include "diag.h" #include "odbctest.h" #include #include static attr_value handle_type_struct[] = { { "SQL_HANDLE_ENV", SQL_HANDLE_ENV }, { "SQL_HANDLE_DBC", SQL_HANDLE_DBC }, { "SQL_HANDLE_STMT", SQL_HANDLE_STMT }, { "SQL_HANDLE_DESC", SQL_HANDLE_DESC }, { NULL } }; static attr_options field_type_struct[] = { { "SQL_DIAG_CURSOR_ROW_COUNT", SQL_DIAG_CURSOR_ROW_COUNT, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DIAG_DYNAMIC_FUNCTION", SQL_DIAG_DYNAMIC_FUNCTION, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DIAG_DYNAMIC_FUNCTION_CODE", SQL_DIAG_DYNAMIC_FUNCTION_CODE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DIAG_NUMBER", SQL_DIAG_NUMBER, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DIAG_RETURNCODE", SQL_DIAG_RETURNCODE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DIAG_ROW_COUNT", SQL_DIAG_ROW_COUNT, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DIAG_CLASS_ORIGIN", SQL_DIAG_CLASS_ORIGIN, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DIAG_COLUMN_NUMBER", SQL_DIAG_COLUMN_NUMBER, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DIAG_CONNECTION_NAME", SQL_DIAG_CONNECTION_NAME, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DIAG_MESSAGE_TEXT", SQL_DIAG_MESSAGE_TEXT, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DIAG_NATIVE", SQL_DIAG_NATIVE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DIAG_ROW_NUMBER", SQL_DIAG_ROW_NUMBER, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DIAG_SERVER_NAME", SQL_DIAG_SERVER_NAME, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DIAG_SQLSTATE", SQL_DIAG_SQLSTATE, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_DIAG_SUBCLASS_ORIGIN", SQL_DIAG_SUBCLASS_ORIGIN, { { NULL } }, "3.0", SQL_CHAR }, { NULL } }; void dError::sqlstate_clkd() { if ( sqlstate_valid -> isOn() ) sqlstate_valid -> setText( "szSqlState: SQL_NULL_POINTER" ); else sqlstate_valid -> setText( "szSqlState: VALID" ); } void dError::native_clkd() { if ( native_valid -> isOn() ) native_valid -> setText( "pfNativeError: SQL_NULL_POINTER" ); else native_valid -> setText( "pfNativeError: VALID" ); } void dError::error_clkd() { if ( error_valid -> isOn() ) error_valid -> setText( "szErrorMsg: SQL_NULL_POINTER" ); else error_valid -> setText( "szErrorMsg: VALID" ); } void dError::perror_clkd() { if ( perror_valid -> isOn() ) perror_valid -> setText( "pcbErrorMsg: SQL_NULL_POINTER" ); else perror_valid -> setText( "pcbErrorMsg: VALID" ); } void dError::Ok() { Handle *stmt = odbctest->extract_handle_list( SQL_HANDLE_STMT, shandles ); Handle *dbc = odbctest->extract_handle_list( SQL_HANDLE_DBC, chandles ); Handle *env = odbctest->extract_handle_list( SQL_HANDLE_ENV, ehandles ); SQLHANDLE in_shandle = SQL_NULL_HANDLE; SQLHANDLE in_dhandle = SQL_NULL_HANDLE; SQLHANDLE in_ehandle = SQL_NULL_HANDLE; SQLCHAR sqlstate[ 7 ], *psqlstate; SQLSMALLINT b_len, text_len, *ptext_len; SQLINTEGER native, *pnative; SQLCHAR *buf; if ( env ) in_ehandle = env -> getHandle(); if ( dbc ) in_dhandle = dbc -> getHandle(); if ( stmt ) in_shandle = stmt -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLError():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_ehandle ) txt.sprintf( " Environment Handle: %p", in_ehandle ); else txt.sprintf( " Environment Handle: SQL_NULL_HENV" ); odbctest -> out_win -> insertLineLimited( txt ); if ( in_dhandle ) txt.sprintf( " Connection Handle: %p", in_dhandle ); else txt.sprintf( " Connection Handle: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); if ( in_shandle ) txt.sprintf( " Statement Handle: %p", in_shandle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( sqlstate_valid -> isOn() ) { txt.sprintf( " szSqlState: " ); psqlstate = NULL; } else { psqlstate = sqlstate; strcpy(( char * ) sqlstate, "XYXYXZ" ); txt.sprintf( " szSqlState: %p", psqlstate ); } odbctest -> out_win -> insertLineLimited( txt ); if ( native_valid -> isOn() ) { txt.sprintf( " pfNativeError: " ); pnative = NULL; } else { pnative = &native; native = -999999; txt.sprintf( " pfNativeError: %p", pnative ); } odbctest -> out_win -> insertLineLimited( txt ); b_len = atoi( buffer_len -> text().ascii()); if ( error_valid -> isOn() ) { buf = NULL; txt.sprintf( " szErrorMsg: " ); } else { if ( b_len < 0 ) b_len = 300; buf = new SQLCHAR[ b_len ]; txt.sprintf( " szErrorMsg: %p", buf ); } odbctest -> out_win -> insertLineLimited( txt ); txt.sprintf( " cbErrorMsgMax: %d", b_len ); odbctest -> out_win -> insertLineLimited( txt ); if ( perror_valid -> isOn() ) { txt.sprintf( " pcbErrorMsg: " ); ptext_len = NULL; } else { ptext_len = &text_len; text_len = -9999; txt.sprintf( " pcbErrorMsg: %p", ptext_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLError( in_ehandle, in_dhandle, in_shandle, psqlstate, pnative, buf, b_len, ptext_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { odbctest -> out_win -> insertLineLimited( " Out:" ); if ( psqlstate ) { if ( strcmp(( char * ) sqlstate, "XYXYXZ" ) == 0 ) { txt.sprintf( " *szSqlState: " ); } else { txt.sprintf( " *szSqlState: %6s", sqlstate ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( pnative ) { if ( native == -999999 ) { txt.sprintf( " *pfNativeError: " ); } else { txt.sprintf( " *pfNativeError: %d", native ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( buf ) { txt.sprintf( " *szErrorMsg: %s", buf ); odbctest -> out_win -> insertLineLimited( txt ); } if ( ptext_len ) { if ( text_len == -9999 ) { txt.sprintf( " *pcbErrorMsg: " ); } else { txt.sprintf( " *pcbErrorMsg: %d", text_len ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); if ( buf ) delete buf; } dError::dError( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 190,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 270,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 350,10, 70,25 ); ehandles = new QComboBox( FALSE, this, "Environment Handle" ); ehandles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_ENV, ehandles ); l_ehandle = new QLabel( "Environment Handle:", this ); l_ehandle -> setGeometry( 10, 50, 120, 20 ); chandles = new QComboBox( FALSE, this, "Connection Handle" ); chandles -> setGeometry( 130, 80, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, chandles ); l_chandle = new QLabel( "Connection Handle:", this ); l_chandle -> setGeometry( 10, 80, 120, 20 ); shandles = new QComboBox( FALSE, this, "Statement Handle" ); shandles -> setGeometry( 130, 110, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, shandles ); l_shandle = new QLabel( "Statement Handle:", this ); l_shandle -> setGeometry( 10, 110, 120, 20 ); sqlstate_valid = new QCheckBox( "szSqlState: VALID", this ); sqlstate_valid -> setGeometry( 10, 140, 300, 15 ); native_valid = new QCheckBox( "pfNativeError: VALID", this ); native_valid -> setGeometry( 10, 170, 300, 15 ); error_valid = new QCheckBox( "szErrorMsg: VALID", this ); error_valid -> setGeometry( 10, 200, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 350, 200, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "cbErrorMsgMax:", this ); l_buffer_len -> setGeometry( 240, 200, 100, 20 ); perror_valid = new QCheckBox( "pcbErrorMsg: VALID", this ); perror_valid -> setGeometry( 10, 230, 300, 15 ); connect( native_valid, SIGNAL( clicked()), this, SLOT( native_clkd())); connect( sqlstate_valid, SIGNAL( clicked()), this, SLOT( sqlstate_clkd())); connect( error_valid, SIGNAL( clicked()), this, SLOT( error_clkd())); connect( perror_valid, SIGNAL( clicked()), this, SLOT( perror_clkd())); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dError::~dError() { delete ok; delete cancel; delete help; delete ehandles; delete chandles; delete shandles; delete l_ehandle; delete l_chandle; delete l_shandle; delete sqlstate_valid; delete native_valid; delete error_valid; delete perror_valid; delete buffer_len; delete l_buffer_len; } void dGetDiagRec::sel_handle( int index ) { int handle_t; handles -> clear(); handle_t = handle_type_struct[ handle_type -> currentItem() ].value; odbctest->fill_handle_list( handle_t, handles ); } void dGetDiagRec::sqlstate_clkd() { if ( sqlstate_valid -> isOn() ) sqlstate_valid -> setText( "szSqlState: SQL_NULL_POINTER" ); else sqlstate_valid -> setText( "szSqlState: VALID" ); } void dGetDiagRec::native_clkd() { if ( native_valid -> isOn() ) native_valid -> setText( "pfNativeError: SQL_NULL_POINTER" ); else native_valid -> setText( "pfNativeError: VALID" ); } void dGetDiagRec::error_clkd() { if ( error_valid -> isOn() ) error_valid -> setText( "szErrorMsg: SQL_NULL_POINTER" ); else error_valid -> setText( "szErrorMsg: VALID" ); } void dGetDiagRec::perror_clkd() { if ( perror_valid -> isOn() ) perror_valid -> setText( "pcbErrorMsg: SQL_NULL_POINTER" ); else perror_valid -> setText( "pcbErrorMsg: VALID" ); } void dGetDiagRec::Ok() { int htype = handle_type_struct[ handle_type -> currentItem() ].value; Handle *hand = odbctest->extract_handle_list( htype, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLCHAR sqlstate[ 7 ], *psqlstate; SQLSMALLINT b_len, text_len, *ptext_len; SQLINTEGER native, *pnative, rec_number; SQLCHAR *buf; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetDiagRec():" ); odbctest -> out_win -> insertLineLimited( " In:" ); txt.sprintf( " Handle Type: %s", handle_type_struct[ handle_type -> currentItem() ].text ); odbctest -> out_win -> insertLineLimited( txt ); if ( in_handle ) txt.sprintf( " Handle: %p", in_handle ); else txt.sprintf( " Handle: SQL_NULL_HANDLE" ); odbctest -> out_win -> insertLineLimited( txt ); rec_number = atoi( rec_num -> text().ascii()); txt.sprintf( " RecNumber: %d", rec_number ); if ( sqlstate_valid -> isOn() ) { txt.sprintf( " szSqlState: " ); psqlstate = NULL; } else { psqlstate = sqlstate; strcpy(( char * ) sqlstate, "XYXYXZ" ); txt.sprintf( " szSqlState: %p", psqlstate ); } odbctest -> out_win -> insertLineLimited( txt ); if ( native_valid -> isOn() ) { txt.sprintf( " pfNativeError: " ); pnative = NULL; } else { pnative = &native; native = -999999; txt.sprintf( " pfNativeError: %p", pnative ); } odbctest -> out_win -> insertLineLimited( txt ); b_len = atoi( buffer_len -> text().ascii()); if ( error_valid -> isOn() ) { buf = NULL; txt.sprintf( " szErrorMsg: " ); } else { if ( b_len < 0 ) b_len = 300; buf = new SQLCHAR[ b_len ]; txt.sprintf( " szErrorMsg: %p", buf ); } odbctest -> out_win -> insertLineLimited( txt ); txt.sprintf( " cbErrorMsgMax: %d", b_len ); odbctest -> out_win -> insertLineLimited( txt ); if ( perror_valid -> isOn() ) { txt.sprintf( " pcbErrorMsg: " ); ptext_len = NULL; } else { ptext_len = &text_len; text_len = -9999; txt.sprintf( " pcbErrorMsg: %p", ptext_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLGetDiagRec( htype, in_handle, rec_number, psqlstate, pnative, buf, b_len, ptext_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { odbctest -> out_win -> insertLineLimited( " Out:" ); if ( psqlstate ) { if ( strcmp(( char * ) sqlstate, "XYXYXZ" ) == 0 ) { txt.sprintf( " *szSqlState: " ); } else { txt.sprintf( " *szSqlState: %6s", sqlstate ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( pnative ) { if ( native == -999999 ) { txt.sprintf( " *pfNativeError: " ); } else { txt.sprintf( " *pfNativeError: %d", native ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( buf ) { txt.sprintf( " *szErrorMsg: %s", buf ); odbctest -> out_win -> insertLineLimited( txt ); } if ( ptext_len ) { if ( text_len == -9999 ) { txt.sprintf( " *pcbErrorMsg: " ); } else { txt.sprintf( " *pcbErrorMsg: %d", text_len ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); if ( buf ) delete buf; } dGetDiagRec::dGetDiagRec( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 190,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 270,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 350,10, 70,25 ); handle_type = new QComboBox( FALSE, this, "Handle" ); handle_type -> setGeometry( 130, 50, 200, 20 ); parent->fill_list_box( handle_type_struct, handle_type ); l_handle_type = new QLabel( "Handle Type:", this ); l_handle_type -> setGeometry( 10, 50, 120, 20 ); handles = new QComboBox( FALSE, this, "Handles" ); handles -> setGeometry( 130, 80, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_ENV, handles ); l_handles = new QLabel( "Handle:", this ); l_handles -> setGeometry( 10, 80, 120, 20 ); rec_num = new QLineEdit( this, "Rec Num" ); rec_num -> setGeometry( 130, 110, 70, 20 ); rec_num -> setMaxLength( 6 ); rec_num -> setText( "1" ); l_rec_num = new QLabel( "Rec Number:", this ); l_rec_num -> setGeometry( 10, 110, 100, 20 ); sqlstate_valid = new QCheckBox( "szSqlState: VALID", this ); sqlstate_valid -> setGeometry( 10, 140, 300, 15 ); native_valid = new QCheckBox( "pfNativeError: VALID", this ); native_valid -> setGeometry( 10, 170, 300, 15 ); error_valid = new QCheckBox( "szErrorMsg: VALID", this ); error_valid -> setGeometry( 10, 200, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 350, 200, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "cbErrorMsgMax:", this ); l_buffer_len -> setGeometry( 240, 200, 100, 20 ); perror_valid = new QCheckBox( "pcbErrorMsg: VALID", this ); perror_valid -> setGeometry( 10, 230, 300, 15 ); connect( native_valid, SIGNAL( clicked()), this, SLOT( native_clkd())); connect( sqlstate_valid, SIGNAL( clicked()), this, SLOT( sqlstate_clkd())); connect( error_valid, SIGNAL( clicked()), this, SLOT( error_clkd())); connect( perror_valid, SIGNAL( clicked()), this, SLOT( perror_clkd())); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( handle_type, SIGNAL(activated(int)), this, SLOT( sel_handle(int))); } dGetDiagRec::~dGetDiagRec() { delete ok; delete cancel; delete help; delete handles; delete l_handles; delete handle_type; delete l_handle_type; delete sqlstate_valid; delete native_valid; delete error_valid; delete perror_valid; delete buffer_len; delete l_buffer_len; delete rec_num; delete l_rec_num; } void dGetDiagField::sel_handle( int index ) { int handle_t; handles -> clear(); handle_t = handle_type_struct[ handle_type -> currentItem() ].value; odbctest->fill_handle_list( handle_t, handles ); } void dGetDiagField::diag_ptr_clkd() { if ( diag_ptr_valid -> isOn() ) diag_ptr_valid -> setText( "DiagInfoPtr: SQL_NULL_POINTER" ); else diag_ptr_valid -> setText( "DiagInfoPtr: VALID" ); } void dGetDiagField::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "StringLengthPtr: SQL_NULL_POINTER" ); else strlen_valid -> setText( "StringLengthPtr: VALID" ); } void dGetDiagField::Ok() { int htype = handle_type_struct[ handle_type -> currentItem() ].value; Handle *hand = odbctest->extract_handle_list( htype, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLSMALLINT b_len, *strlen_ptr, strlen_val, attribute; SQLINTEGER rec_number; SQLCHAR *buf; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetDiagField():" ); odbctest -> out_win -> insertLineLimited( " In:" ); txt.sprintf( " Handle Type: %s", handle_type_struct[ handle_type -> currentItem() ].text ); odbctest -> out_win -> insertLineLimited( txt ); if ( in_handle ) txt.sprintf( " Handle: %p", in_handle ); else txt.sprintf( " Handle: SQL_NULL_HANDLE" ); odbctest -> out_win -> insertLineLimited( txt ); rec_number = atoi( rec_num -> text().ascii()); txt.sprintf( " RecNumber: %d", rec_number ); attribute = field_type_struct[ diag_info -> currentItem() ].attr; txt.sprintf( " DiagIdentifier: %s=%d", field_type_struct[ diag_info -> currentItem() ].text, field_type_struct[ diag_info -> currentItem() ].attr ); b_len = atoi( buffer_len -> text().ascii()); if ( diag_ptr_valid -> isOn() ) { buf = NULL; txt.sprintf( " DiagInfo: " ); } else { if ( b_len < 0 ) b_len = 300; buf = new SQLCHAR[ b_len ]; txt.sprintf( " DiagInfo: %p", buf ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strlen_valid -> isOn() ) { txt.sprintf( " StringLengthPtr: " ); strlen_ptr = NULL; } else { strlen_ptr = &strlen_val; strlen_val = -9999; txt.sprintf( " StringLengthPtr: %p", strlen_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLGetDiagField( htype, in_handle, rec_number, attribute, buf, b_len, strlen_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { odbctest -> out_win -> insertLineLimited( " Out:" ); if ( field_type_struct[ diag_info -> currentItem() ].data_type == SQL_INTEGER ) { if ( buf ) { int lval; memcpy( &lval, buf, sizeof( lval )); txt.sprintf( " *DiagInfo: %d", lval ); odbctest -> out_win -> insertLineLimited( txt ); } } else { if ( buf ) { txt.sprintf( " *DiagInfo: %s", buf ); odbctest -> out_win -> insertLineLimited( txt ); } } if ( strlen_ptr ) { if ( strlen_val == -9999 ) { txt.sprintf( " *StringLengthPtr: " ); } else { txt.sprintf( " *StringLengthPtr: %d", strlen_val ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); if ( buf ) delete buf; } dGetDiagField::dGetDiagField( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 250,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 330,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 410,10, 70,25 ); handle_type = new QComboBox( FALSE, this, "Handle" ); handle_type -> setGeometry( 130, 50, 200, 20 ); parent->fill_list_box( handle_type_struct, handle_type ); l_handle_type = new QLabel( "Handle Type:", this ); l_handle_type -> setGeometry( 10, 50, 120, 20 ); handles = new QComboBox( FALSE, this, "Handles" ); handles -> setGeometry( 130, 80, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_ENV, handles ); l_handles = new QLabel( "Handle:", this ); l_handles -> setGeometry( 10, 80, 120, 20 ); rec_num = new QLineEdit( this, "Rec Num" ); rec_num -> setGeometry( 130, 110, 70, 20 ); rec_num -> setMaxLength( 6 ); rec_num -> setText( "1" ); l_rec_num = new QLabel( "Rec Number:", this ); l_rec_num -> setGeometry( 10, 110, 100, 20 ); diag_info = new QComboBox( FALSE, this, "Info" ); diag_info -> setGeometry( 130, 140, 350, 20 ); parent->fill_list_box( field_type_struct, diag_info ); l_diag_info = new QLabel( "Diag Identifier::", this ); l_diag_info -> setGeometry( 10, 140, 120, 20 ); diag_ptr_valid = new QCheckBox( "DiagInfoPtr: VALID", this ); diag_ptr_valid -> setGeometry( 10, 170, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 130, 200, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Length:", this ); l_buffer_len -> setGeometry( 10, 200, 100, 20 ); strlen_valid = new QCheckBox( "pcbErrorMsg: VALID", this ); strlen_valid -> setGeometry( 10, 230, 300, 15 ); connect( diag_ptr_valid, SIGNAL( clicked()), this, SLOT( diag_ptr_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( handle_type, SIGNAL(activated(int)), this, SLOT( sel_handle(int))); } dGetDiagField::~dGetDiagField() { delete ok; delete cancel; delete help; delete handles; delete l_handles; delete handle_type; delete l_handle_type; delete diag_ptr_valid; delete strlen_valid; delete buffer_len; delete l_buffer_len; delete rec_num; delete l_rec_num; } void OdbcTest::sqlgetdiagrec() { dGetDiagRec *dlg = new dGetDiagRec( this, "SQLGetDiagRec" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetdiagfield() { dGetDiagField *dlg = new dGetDiagField( this, "SQLGetDiagField" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlerror() { dError *dlg = new dError( this, "SQLError" ); dlg -> exec(); delete dlg; } void OdbcTest::errorall() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } unixODBC-2.2.14-p2/odbctest/conn.cpp0100644000076400007640000041602510564052121015451 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * ********************************************************************** * * $Id: conn.cpp,v 1.6 2007/02/12 11:49:37 lurcher Exp $ * * $Log: conn.cpp,v $ * Revision 1.6 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.5 2005/04/18 15:00:56 lurcher * * Use SQLDriverConnect in odbctest Full Connect * * Revision 1.4 2004/11/20 13:21:39 lurcher * Fix unicode bug in SQLGetInfoW * * Revision 1.3 2002/10/10 08:48:34 lurcher * * Add missing SQLGetInfo value to odbctest (SQL_ODBC_SAG_CONFORMANCE) * * Revision 1.2 2002/08/12 13:17:52 lurcher * * Replicate the way the MS DM handles loading of driver libs, and allocating * handles in the driver. usage counting in the driver means that dlopen is * only called for the first use, and dlclose for the last. AllocHandle for * the driver environment is only called for the first time per driver * per application environment. * * Revision 1.1.1.1 2001/10/17 16:40:30 lurcher * * First upload to SourceForge * * Revision 1.6 2001/07/20 09:42:58 nick * * Replace char[] with QString to avoid buffer overrun * * Revision 1.5 2001/07/20 08:54:25 nick * * Add a delete in BrowseConnect * * Revision 1.4 2001/07/19 14:04:46 martin * * SQLBrowseConnect legitimately returns SQL_NEED_DATA * * Revision 1.3 2001/06/04 15:24:49 nick * * Add port to MAC OSX and QT3 changes * * Revision 1.2 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.5 2000/06/13 12:30:21 ngorham * * Enough there for the first release I think * * Revision 1.4 2000/06/09 17:04:19 ngorham * * More, and More * * Revision 1.3 2000/06/05 16:53:16 ngorham * * Next lot of updates * * Revision 1.2 2001/05/31 10:26:26 ngorham * * Fix a few minor typo's * * Revision 1.1 2000/05/04 17:04:47 ngorham * * Initial commit * * **********************************************************************/ #include #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #endif #include #include #include "conn.h" #include "odbctest.h" static attr_options gf_options[] = { { "SQL_API_ODBC3_ALL_FUNCTIONS", SQL_API_ODBC3_ALL_FUNCTIONS, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_API_ALL_FUNCTIONS", SQL_API_ALL_FUNCTIONS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLALLOCCONNECT", SQL_API_SQLALLOCCONNECT, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLALLOCENV", SQL_API_SQLALLOCENV, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLALLOCHANDLESTD", SQL_API_SQLALLOCHANDLESTD, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLALLOCSTMT", SQL_API_SQLALLOCSTMT, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLBINDCOL", SQL_API_SQLBINDCOL, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLBINDPARAMETER", SQL_API_SQLBINDPARAMETER, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLBROWSECONNECT", SQL_API_SQLBROWSECONNECT, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLBULKOPERATIONS", SQL_API_SQLBULKOPERATIONS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLCANCEL", SQL_API_SQLCANCEL, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLCOLATTRIBUTE", SQL_API_SQLCOLATTRIBUTE, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLCOLATTRIBUTES", SQL_API_SQLCOLATTRIBUTES, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLCOLUMNPRIVILEGES", SQL_API_SQLCOLUMNPRIVILEGES, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLCOLUMNS", SQL_API_SQLCOLUMNS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLCONNECT", SQL_API_SQLCONNECT, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLDATASOURCES", SQL_API_SQLDATASOURCES, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLDESCRIBECOL", SQL_API_SQLDESCRIBECOL, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLDESCRIBEPARAM", SQL_API_SQLDESCRIBEPARAM, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLDISCONNECT", SQL_API_SQLDISCONNECT, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLDRIVERCONNECT", SQL_API_SQLDRIVERCONNECT, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLDRIVERS", SQL_API_SQLDRIVERS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLERROR", SQL_API_SQLERROR, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLEXECDIRECT", SQL_API_SQLEXECDIRECT, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLEXECUTE", SQL_API_SQLEXECUTE, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLEXTENDEDFETCH", SQL_API_SQLEXTENDEDFETCH, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLFETCH", SQL_API_SQLFETCH, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLFOREIGNKEYS", SQL_API_SQLFOREIGNKEYS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLFREECONNECT", SQL_API_SQLFREECONNECT, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLFREEENV", SQL_API_SQLFREEENV, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLFREESTMT", SQL_API_SQLFREESTMT, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLGETCONNECTOPTION", SQL_API_SQLGETCONNECTOPTION, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLGETCURSORNAME", SQL_API_SQLGETCURSORNAME, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLGETDATA", SQL_API_SQLGETDATA, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLGETFUNCTIONS", SQL_API_SQLGETFUNCTIONS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLGETINFO", SQL_API_SQLGETINFO, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLGETSTMTOPTION", SQL_API_SQLGETSTMTOPTION, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLGETTYPEINFO", SQL_API_SQLGETTYPEINFO, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLMORERESULTS", SQL_API_SQLMORERESULTS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLNATIVESQL", SQL_API_SQLNATIVESQL, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLNUMPARAMS", SQL_API_SQLNUMPARAMS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLNUMRESULTCOLS", SQL_API_SQLNUMRESULTCOLS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLPARAMDATA", SQL_API_SQLPARAMDATA, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLPARAMOPTIONS", SQL_API_SQLPARAMOPTIONS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLPREPARE", SQL_API_SQLPREPARE, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLPRIMARYKEYS", SQL_API_SQLPRIMARYKEYS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLPROCEDURECOLUMNS", SQL_API_SQLPROCEDURECOLUMNS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLPROCEDURES", SQL_API_SQLPROCEDURES, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLPUTDATA", SQL_API_SQLPUTDATA, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLROWCOUNT", SQL_API_SQLROWCOUNT, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLSETCONNECTOPTION", SQL_API_SQLSETCONNECTOPTION, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLSETCURSORNAME", SQL_API_SQLSETCURSORNAME, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLSETPARAM", SQL_API_SQLSETPARAM, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLSETPOS", SQL_API_SQLSETPOS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLSETSCROLLOPTIONS", SQL_API_SQLSETSCROLLOPTIONS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLSETSTMTOPTION", SQL_API_SQLSETSTMTOPTION, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLSPECIALCOLUMNS", SQL_API_SQLSPECIALCOLUMNS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLSTATISTICS", SQL_API_SQLSTATISTICS, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLTABLEPRIVILEGES", SQL_API_SQLTABLEPRIVILEGES, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLTABLES", SQL_API_SQLTABLES, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLTRANSACT", SQL_API_SQLTRANSACT, { { NULL } }, "1.0", SQL_INTEGER }, {"SQL_API_SQLALLOCHANDLE", SQL_API_SQLALLOCHANDLE, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLBINDPARAM", SQL_API_SQLBINDPARAM, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLCLOSECURSOR", SQL_API_SQLCLOSECURSOR, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLCOPYDESC", SQL_API_SQLCOPYDESC, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLENDTRAN", SQL_API_SQLENDTRAN, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLFETCHSCROLL", SQL_API_SQLFETCHSCROLL, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLFREEHANDLE", SQL_API_SQLFREEHANDLE, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLGETCONNECTATTR", SQL_API_SQLGETCONNECTATTR, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLGETDESCFIELD", SQL_API_SQLGETDESCFIELD, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLGETDESCREC", SQL_API_SQLGETDESCREC, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLGETDIAGFIELD", SQL_API_SQLGETDIAGFIELD, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLGETDIAGREC", SQL_API_SQLGETDIAGREC, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLGETENVATTR", SQL_API_SQLGETENVATTR, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLGETSTMTATTR", SQL_API_SQLGETSTMTATTR, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLSETCONNECTATTR", SQL_API_SQLSETCONNECTATTR, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLSETDESCFIELD", SQL_API_SQLSETDESCFIELD, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLSETDESCREC", SQL_API_SQLSETDESCREC, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLSETENVATTR", SQL_API_SQLSETENVATTR, { { NULL } }, "3.0", SQL_INTEGER }, {"SQL_API_SQLSETSTMTATTR", SQL_API_SQLSETSTMTATTR, { { NULL } }, "3.0", SQL_INTEGER }, { NULL } }; static attr_options dc_options[] = { { "SQL_DRIVER_COMPLETE", SQL_DRIVER_COMPLETE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DRIVER_NOPROMPT", SQL_DRIVER_NOPROMPT, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DRIVER_COMPLETE", SQL_DRIVER_COMPLETE, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DRIVER_COMPLETE_REQUIRED", SQL_DRIVER_COMPLETE_REQUIRED, { { NULL } }, "1.0", SQL_INTEGER }, { NULL } }; static attr_options info_options[] = { { "SQL_ACCESSIBLE_PROCEDURES", SQL_ACCESSIBLE_PROCEDURES, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_ACCESSIBLE_TABLES", SQL_ACCESSIBLE_TABLES, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_ACTIVE_ENVIRONMENTS", SQL_ACTIVE_ENVIRONMENTS, { { NULL } }, "3.0", SQL_SMALLINT }, { "SQL_AGGREGATE_FUNCTIONS", SQL_AGGREGATE_FUNCTIONS, { { "SQL_AF_ALL", SQL_AF_ALL }, { "SQL_AF_AVG", SQL_AF_AVG }, { "SQL_AF_COUNT", SQL_AF_COUNT }, { "SQL_AF_DISTINCT", SQL_AF_DISTINCT }, { "SQL_AF_MAX", SQL_AF_MAX }, { "SQL_AF_MIN", SQL_AF_MIN }, { "SQL_AF_SUM", SQL_AF_SUM }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_ALTER_DOMAIN", SQL_ALTER_DOMAIN, { { "SQL_AD_ADD_DOMAIN_CONSTRAINT", SQL_AD_ADD_DOMAIN_CONSTRAINT }, { "SQL_AD_ADD_DOMAIN_DEFAULT", SQL_AD_ADD_DOMAIN_DEFAULT }, { "SQL_AD_CONSTRAINT_NAME_DEFINITION", SQL_AD_CONSTRAINT_NAME_DEFINITION }, { "SQL_AD_DROP_DOMAIN_CONSTRAINT", SQL_AD_DROP_DOMAIN_CONSTRAINT }, { "SQL_AD_DROP_DOMAIN_DEFAULT", SQL_AD_DROP_DOMAIN_DEFAULT }, { "SQL_AD_ADD_CONSTRAINT_DEFERRABLE", SQL_AD_ADD_CONSTRAINT_DEFERRABLE }, { "SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE", SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE }, { "SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED", SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED }, { "SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE", SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_ALTER_TABLE", SQL_ALTER_TABLE, { { "SQL_AT_ADD_COLUMN_COLLATION", SQL_AT_ADD_COLUMN_COLLATION }, { "SQL_AT_ADD_COLUMN_DEFAULT", SQL_AT_ADD_COLUMN_DEFAULT }, { "SQL_AT_ADD_COLUMN_SINGLE", SQL_AT_ADD_COLUMN_SINGLE }, { "SQL_AT_ADD_CONSTRAINT", SQL_AT_ADD_CONSTRAINT }, { "SQL_AT_ADD_TABLE_CONSTRAINT", SQL_AT_ADD_TABLE_CONSTRAINT }, { "SQL_AT_CONSTRAINT_NAME_DEFINITION", SQL_AT_CONSTRAINT_NAME_DEFINITION }, { "SQL_AT_DROP_COLUMN_CASCADE", SQL_AT_DROP_COLUMN_CASCADE }, { "SQL_AT_DROP_COLUMN_DEFAULT", SQL_AT_DROP_COLUMN_DEFAULT }, { "SQL_AT_DROP_COLUMN_RESTRICT", SQL_AT_DROP_COLUMN_RESTRICT }, { "SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE", SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE }, { "SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT", SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT }, { "SQL_AT_SET_COLUMN_DEFAULT", SQL_AT_SET_COLUMN_DEFAULT }, { "SQL_AT_CONSTRAINT_INITIALLY_DEFERRED", SQL_AT_CONSTRAINT_INITIALLY_DEFERRED }, { "SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE", SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE }, { "SQL_AT_CONSTRAINT_DEFERRABLE", SQL_AT_CONSTRAINT_DEFERRABLE }, { "SQL_AT_CONSTRAINT_NON_DEFERRABLE", SQL_AT_CONSTRAINT_NON_DEFERRABLE }, { NULL } }, "2.0", SQL_INTEGER, TRUE }, { "SQL_ASYNC_MODE", SQL_ASYNC_MODE, { { "SQL_AM_CONNECTION", SQL_AM_CONNECTION }, { "SQL_AM_STATEMENT", SQL_AM_STATEMENT }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_BATCH_ROW_COUNT", SQL_BATCH_ROW_COUNT, { { "SQL_BRC_ROLLED_UP", SQL_BRC_ROLLED_UP }, { "SQL_BRC_PROCEDURES", SQL_BRC_PROCEDURES }, { "SQL_BRC_EXPLICIT", SQL_BRC_EXPLICIT }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_BATCH_SUPPORT", SQL_BATCH_SUPPORT, { { "SQL_BS_SELECT_EXPLI|CIT", SQL_BS_SELECT_EXPLICIT }, { "SQL_BS_ROW_COUNT_EXPLICIT", SQL_BS_ROW_COUNT_EXPLICIT }, { "SQL_BS_SELECT_PROC", SQL_BS_SELECT_PROC }, { "SQL_BS_ROW_COUNT_PROC", SQL_BS_ROW_COUNT_PROC }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_BOOKMARK_PERSISTENCE", SQL_BOOKMARK_PERSISTENCE, { { "SQL_BP_CLOSE", SQL_BP_CLOSE }, { "SQL_BP_DELETE", SQL_BP_DELETE }, { "SQL_BP_DROP", SQL_BP_DROP }, { "SQL_BP_TRANSACTION", SQL_BP_TRANSACTION }, { "SQL_BP_UPDATE", SQL_BP_UPDATE }, { "SQL_BP_OTHER_HSTMT", SQL_BP_OTHER_HSTMT }, { NULL } }, "2.0", SQL_INTEGER, TRUE }, { "SQL_CATALOG_LOCATION", SQL_CATALOG_LOCATION, { { "SQL_CL_START", SQL_CL_START }, { "SQL_CL_END", SQL_CL_END }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_CATALOG_NAME", SQL_CATALOG_NAME, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_CATALOG_NAME_SEPARATOR", SQL_CATALOG_NAME_SEPARATOR, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_CATALOG_TERM", SQL_CATALOG_TERM, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_CATALOG_USAGE", SQL_CATALOG_USAGE, { { "SQL_CU_DML_STATEMENTS", SQL_CU_DML_STATEMENTS }, { "SQL_CU_PROCEDURE_INVOCATION", SQL_CU_PROCEDURE_INVOCATION }, { "SQL_CU_TABLE_DEFINITION", SQL_CU_TABLE_DEFINITION }, { "SQL_CU_INDEX_DEFINITION", SQL_CU_INDEX_DEFINITION }, { "SQL_CU_PRIVILEGE_DEFINITION", SQL_CU_PRIVILEGE_DEFINITION }, { "SQL_CL_END", SQL_CL_END }, { NULL } }, "2.0", SQL_INTEGER, TRUE }, { "SQL_COLLATION_SEQ", SQL_COLLATION_SEQ, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_COLUMN_ALIAS", SQL_COLUMN_ALIAS, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_ODBC_API_CONFORMANCE", SQL_ODBC_API_CONFORMANCE, { { "SQL_OAC_NONE", SQL_OAC_NONE }, { "SQL_OAC_LEVEL1", SQL_OAC_LEVEL1 }, { "SQL_OAC_LEVEL2", SQL_OAC_LEVEL2 }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ODBC_SAG_CLI_CONFORMANCE", SQL_ODBC_SAG_CLI_CONFORMANCE, { { "SQL_OSCC_NOT_COMPLIANT", SQL_OSCC_NOT_COMPLIANT }, { "SQL_OSCC_COMPLIANT", SQL_OSCC_COMPLIANT }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ODBC_SQL_CONFORMANCE", SQL_ODBC_SQL_CONFORMANCE, { { "SQL_OSC_MINIMUM", SQL_OSC_MINIMUM }, { "SQL_OSC_CORE", SQL_OSC_CORE }, { "SQL_OSC_EXTENDED", SQL_OSC_EXTENDED }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_CONCAT_NULL_BEHAVIOR", SQL_CONCAT_NULL_BEHAVIOR, { { "SQL_CB_NULL", SQL_CB_NULL }, { "SQL_CB_NON_NULL", SQL_CB_NON_NULL }, { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_CONVERT_BIGINT", SQL_CONVERT_BIGINT, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_BINARY", SQL_CONVERT_BINARY, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_BIT", SQL_CONVERT_BIT, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_CHAR", SQL_CONVERT_CHAR, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_DATE", SQL_CONVERT_DATE, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_DECIMAL", SQL_CONVERT_DECIMAL, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_DOUBLE", SQL_CONVERT_DOUBLE, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_FLOAT", SQL_CONVERT_FLOAT, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_INTEGER", SQL_CONVERT_INTEGER, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_INTERVAL_YEAR_MONTH", SQL_CONVERT_INTERVAL_YEAR_MONTH, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_INTERVAL_DAY_TIME", SQL_CONVERT_INTERVAL_DAY_TIME, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_LONGVARBINARY", SQL_CONVERT_LONGVARBINARY, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_LONGVARCHAR", SQL_CONVERT_LONGVARCHAR, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_NUMERIC", SQL_CONVERT_NUMERIC, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_REAL", SQL_CONVERT_REAL, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_SMALLINT", SQL_CONVERT_SMALLINT, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_TIME", SQL_CONVERT_TIME, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_TIMESTAMP", SQL_CONVERT_TIMESTAMP, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_TINYINT", SQL_CONVERT_TINYINT, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_VARBINARY", SQL_CONVERT_VARBINARY, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_VARCHAR", SQL_CONVERT_VARCHAR, { { "SQL_CVT_BIGINT", SQL_CVT_BIGINT }, { "SQL_CVT_BINARY", SQL_CVT_BINARY }, { "SQL_CVT_BIT", SQL_CVT_BIT }, { "SQL_CVT_CHAR", SQL_CVT_CHAR }, { "SQL_CVT_DATE", SQL_CVT_DATE }, { "SQL_CVT_DECIMAL", SQL_CVT_DECIMAL }, { "SQL_CVT_DOUBLE", SQL_CVT_DOUBLE }, { "SQL_CVT_FLOAT", SQL_CVT_FLOAT }, { "SQL_CVT_INTEGER", SQL_CVT_INTEGER }, { "SQL_CVT_INTERVAL_YEAR_MONTH", SQL_CVT_INTERVAL_YEAR_MONTH }, { "SQL_CVT_INTERVAL_DAY_TIME", SQL_CVT_INTERVAL_DAY_TIME }, { "SQL_CVT_LONGVARBINARY", SQL_CVT_LONGVARBINARY }, { "SQL_CVT_LONGVARCHAR", SQL_CVT_LONGVARCHAR }, { "SQL_CVT_NUMERIC", SQL_CVT_NUMERIC }, { "SQL_CVT_REAL", SQL_CVT_REAL }, { "SQL_CVT_SMALLINT", SQL_CVT_SMALLINT }, { "SQL_CVT_TIME", SQL_CVT_TIME }, { "SQL_CVT_TIMESTAMP", SQL_CVT_TIMESTAMP }, { "SQL_CVT_TINYINT", SQL_CVT_TINYINT }, { "SQL_CVT_VARBINARY", SQL_CVT_VARBINARY }, { "SQL_CVT_VARCHAR", SQL_CVT_VARCHAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CONVERT_FUNCTIONS", SQL_CONVERT_FUNCTIONS, { { "SQL_FN_CVT_CAST", SQL_FN_CVT_CAST }, { "SQL_FN_CVT_CONVERT", SQL_FN_CVT_CONVERT }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_CORRELATION_NAME", SQL_CORRELATION_NAME, { { "SQL_CN_NONE", SQL_CN_NONE }, { "SQL_CN_DIFFERENT", SQL_CN_DIFFERENT }, { "SQL_CN_ANY", SQL_CN_ANY }, { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_CREATE_ASSERTION", SQL_CREATE_ASSERTION, { { "SQL_CA_CREATE_ASSERTION", SQL_CA_CREATE_ASSERTION }, { "SQL_CA_CONSTRAINT_INITIALLY_DEFERRED", SQL_CA_CONSTRAINT_INITIALLY_DEFERRED }, { "SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE", SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE }, { "SQL_CA_CONSTRAINT_DEFERRABLE", SQL_CA_CONSTRAINT_DEFERRABLE }, { "SQL_CA_CONSTRAINT_NON_DEFERRABLE", SQL_CA_CONSTRAINT_NON_DEFERRABLE }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_CREATE_CHARACTER_SET", SQL_CREATE_CHARACTER_SET, { { "SQL_CCS_CREATE_CHARACTER_SET", SQL_CCS_CREATE_CHARACTER_SET }, { "SQL_CCS_COLLATE_CLAUSE", SQL_CCS_COLLATE_CLAUSE }, { "SQL_CCS_LIMITED_COLLATION", SQL_CCS_LIMITED_COLLATION }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_CREATE_COLLATION", SQL_CREATE_COLLATION, { { "SQL_CCOL_CREATE_COLLATION", SQL_CCOL_CREATE_COLLATION }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_CREATE_DOMAIN", SQL_CREATE_DOMAIN, { { "SQL_CDO_CREATE_DOMAIN", SQL_CDO_CREATE_DOMAIN }, { "SQL_CDO_CONSTRAINT_NAME_DEFINITION", SQL_CDO_CONSTRAINT_NAME_DEFINITION }, { "SQL_CDO_DEFAULT", SQL_CDO_DEFAULT }, { "SQL_CDO_CONSTRAINT", SQL_CDO_CONSTRAINT }, { "SQL_CDO_COLLATION", SQL_CDO_COLLATION }, { "SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED", SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED }, { "SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE", SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE }, { "SQL_CDO_CONSTRAINT_DEFERRABLE", SQL_CDO_CONSTRAINT_DEFERRABLE }, { "SQL_CDO_CONSTRAINT_NON_DEFERRABLE", SQL_CDO_CONSTRAINT_NON_DEFERRABLE }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_CREATE_SCHEMA", SQL_CREATE_SCHEMA, { { "SQL_CS_CREATE_SCHEMA", SQL_CS_CREATE_SCHEMA }, { "SQL_CS_AUTHORIZATION", SQL_CS_AUTHORIZATION }, { "SQL_CS_DEFAULT_CHARACTER_SET", SQL_CS_DEFAULT_CHARACTER_SET }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_CREATE_TABLE", SQL_CREATE_TABLE, { { "SQL_CT_CREATE_TABLE", SQL_CT_CREATE_TABLE }, { "SQL_CT_TABLE_CONSTRAINT", SQL_CT_TABLE_CONSTRAINT }, { "SQL_CT_CONSTRAINT_NAME_DEFINITION", SQL_CT_CONSTRAINT_NAME_DEFINITION }, { "SQL_CT_COMMIT_PRESERVE", SQL_CT_COMMIT_PRESERVE }, { "SQL_CT_COMMIT_DELETE", SQL_CT_COMMIT_DELETE }, { "SQL_CT_GLOBAL_TEMPORARY", SQL_CT_GLOBAL_TEMPORARY }, { "SQL_CT_LOCAL_TEMPORARY", SQL_CT_LOCAL_TEMPORARY }, { "SQL_CT_COLUMN_CONSTRAINT", SQL_CT_COLUMN_CONSTRAINT }, { "SQL_CT_COLUMN_DEFAULT", SQL_CT_COLUMN_DEFAULT }, { "SQL_CT_COLUMN_COLLATION", SQL_CT_COLUMN_COLLATION }, { "SQL_CT_CONSTRAINT_INITIALLY_DEFERRED", SQL_CT_CONSTRAINT_INITIALLY_DEFERRED }, { "SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE", SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE }, { "SQL_CT_CONSTRAINT_DEFERRABLE", SQL_CT_CONSTRAINT_DEFERRABLE }, { "SQL_CT_CONSTRAINT_NON_DEFERRABLE", SQL_CT_CONSTRAINT_NON_DEFERRABLE }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_CREATE_TRANSLATION", SQL_CREATE_TRANSLATION, { { "SQL_CTR_CREATE_TRANSLATION", SQL_CTR_CREATE_TRANSLATION }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_CREATE_VIEW", SQL_CREATE_VIEW, { { "SQL_CV_CREATE_VIEW", SQL_CV_CREATE_VIEW }, { "SQL_CV_CHECK_OPTION", SQL_CV_CHECK_OPTION }, { "SQL_CV_CASCADED", SQL_CV_CASCADED }, { "SQL_CV_LOCAL", SQL_CV_LOCAL }, { NULL } }, "1.0", SQL_SMALLINT, TRUE }, { "SQL_CURSOR_COMMIT_BEHAVIOR", SQL_CURSOR_COMMIT_BEHAVIOR, { { "SQL_CB_DELETE", SQL_CB_DELETE }, { "SQL_CB_CLOSE", SQL_CB_CLOSE }, { "SQL_CB_PRESERVE", SQL_CB_PRESERVE }, { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_CURSOR_ROLLBACK_BEHAVIOR", SQL_CURSOR_ROLLBACK_BEHAVIOR, { { "SQL_CB_DELETE", SQL_CB_DELETE }, { "SQL_CB_CLOSE", SQL_CB_CLOSE }, { "SQL_CB_PRESERVE", SQL_CB_PRESERVE }, { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_CURSOR_SENSITIVITY", SQL_CURSOR_SENSITIVITY, { { "SQL_INSENSITIVE", SQL_INSENSITIVE }, { "SQL_UNSPECIFIED", SQL_UNSPECIFIED }, { "SQL_SENSITIVE", SQL_SENSITIVE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DATA_SOURCE_NAME", SQL_DATA_SOURCE_NAME, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_DATA_SOURCE_READ_ONLY", SQL_DATA_SOURCE_READ_ONLY, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_DATABASE_NAME", SQL_DATABASE_NAME, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_DATETIME_LITERALS", SQL_DATETIME_LITERALS, { { "SQL_DL_SQL92_DATE", SQL_DL_SQL92_DATE }, { "SQL_DL_SQL92_TIME", SQL_DL_SQL92_TIME }, { "SQL_DL_SQL92_TIMESTAMP", SQL_DL_SQL92_TIMESTAMP }, { "SQL_DL_SQL92_INTERVAL_YEAR", SQL_DL_SQL92_INTERVAL_YEAR }, { "SQL_DL_SQL92_INTERVAL_MONTH", SQL_DL_SQL92_INTERVAL_MONTH }, { "SQL_DL_SQL92_INTERVAL_DAY", SQL_DL_SQL92_INTERVAL_DAY }, { "SQL_DL_SQL92_INTERVAL_HOUR", SQL_DL_SQL92_INTERVAL_HOUR }, { "SQL_DL_SQL92_INTERVAL_MINUTE", SQL_DL_SQL92_INTERVAL_MINUTE }, { "SQL_DL_SQL92_INTERVAL_SECOND", SQL_DL_SQL92_INTERVAL_SECOND }, { "SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH", SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH }, { "SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR", SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR }, { "SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE", SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE }, { "SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND", SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND }, { "SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE", SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE }, { "SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND", SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND }, { "SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND", SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_DBMS_NAME", SQL_DBMS_NAME, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_DBMS_VER", SQL_DBMS_VER, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_DDL_INDEX", SQL_DDL_INDEX, { { "SQL_DI_CREATE_INDEX", SQL_DI_CREATE_INDEX }, { "SQL_DI_DROP_INDEX", SQL_DI_DROP_INDEX }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_DEFAULT_TXN_ISOLATION", SQL_DEFAULT_TXN_ISOLATION, { { "SQL_TXN_READ_UNCOMMITTED", SQL_TXN_READ_UNCOMMITTED }, { "SQL_TXN_READ_COMMITTED", SQL_TXN_READ_COMMITTED }, { "SQL_TXN_REPEATABLE_READ", SQL_TXN_REPEATABLE_READ }, { "SQL_TXN_SERIALIZABLE", SQL_TXN_SERIALIZABLE }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DESCRIBE_PARAMETER", SQL_DESCRIBE_PARAMETER, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_DM_VER", SQL_DM_VER, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_DRIVER_HDBC", SQL_DRIVER_HDBC, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DRIVER_HENV", SQL_DRIVER_HENV, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DRIVER_HDESC", SQL_DRIVER_HDESC, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_DRIVER_HLIB", SQL_DRIVER_HLIB, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_DRIVER_HSTMT", SQL_DRIVER_HSTMT, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_DRIVER_NAME", SQL_DRIVER_NAME, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_DRIVER_ODBC_VER", SQL_DRIVER_ODBC_VER, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_DRIVER_VER", SQL_DRIVER_VER, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_DROP_ASSERTION", SQL_DROP_ASSERTION, { { "SQL_DA_DROP_ASSERTION", SQL_DA_DROP_ASSERTION }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_DROP_CHARACTER_SET", SQL_DROP_CHARACTER_SET, { { "SQL_DCS_DROP_CHARACTER_SET", SQL_DCS_DROP_CHARACTER_SET }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_DROP_COLLATION", SQL_DROP_COLLATION, { { "SQL_DC_DROP_COLLATION", SQL_DC_DROP_COLLATION }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_DROP_DOMAIN", SQL_DROP_DOMAIN, { { "SQL_DD_DROP_DOMAIN", SQL_DD_DROP_DOMAIN }, { "SQL_DD_CASCADE", SQL_DD_CASCADE }, { "SQL_DD_RESTRICT", SQL_DD_RESTRICT }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_DROP_SCHEMA", SQL_DROP_SCHEMA, { { "SQL_DS_DROP_SCHEMA", SQL_DS_DROP_SCHEMA }, { "SQL_DS_CASCADE", SQL_DS_CASCADE }, { "SQL_DS_RESTRICT", SQL_DS_RESTRICT }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_DROP_TABLE", SQL_DROP_TABLE, { { "SQL_DT_DROP_TABLE", SQL_DT_DROP_TABLE }, { "SQL_DT_CASCADE", SQL_DT_CASCADE }, { "SQL_DT_RESTRICT", SQL_DT_RESTRICT }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_DROP_TRANSLATION", SQL_DROP_TRANSLATION, { { "SQL_DTR_DROP_TRANSLATION", SQL_DTR_DROP_TRANSLATION }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_DROP_VIEW", SQL_DROP_VIEW, { { "SQL_DV_DROP_VIEW", SQL_DV_DROP_VIEW }, { "SQL_DV_CASCADE", SQL_DV_CASCADE }, { "SQL_DV_RESTRICT", SQL_DV_RESTRICT }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_DYNAMIC_CURSOR_ATTRIBUTES1", SQL_DYNAMIC_CURSOR_ATTRIBUTES1, { { "SQL_CA1_NEXT", SQL_CA1_NEXT }, { "SQL_CA1_ABSOLUTE", SQL_CA1_ABSOLUTE }, { "SQL_CA1_RELATIVE", SQL_CA1_RELATIVE }, { "SQL_CA1_BOOKMARK", SQL_CA1_BOOKMARK }, { "SQL_CA1_LOCK_EXCLUSIVE", SQL_CA1_LOCK_EXCLUSIVE }, { "SQL_CA1_LOCK_NO_CHANGE", SQL_CA1_LOCK_NO_CHANGE }, { "SQL_CA1_LOCK_UNLOCK", SQL_CA1_LOCK_UNLOCK }, { "SQL_CA1_POS_POSITION", SQL_CA1_POS_POSITION }, { "SQL_CA1_POS_UPDATE", SQL_CA1_POS_UPDATE }, { "SQL_CA1_POS_DELETE", SQL_CA1_POS_DELETE }, { "SQL_CA1_POS_REFRESH", SQL_CA1_POS_REFRESH }, { "SQL_CA1_POSITIONED_UPDATE", SQL_CA1_POSITIONED_UPDATE }, { "SQL_CA1_POSITIONED_DELETE", SQL_CA1_POSITIONED_DELETE }, { "SQL_CA1_SELECT_FOR_UPDATE", SQL_CA1_SELECT_FOR_UPDATE }, { "SQL_CA1_BULK_ADD", SQL_CA1_BULK_ADD }, { "SQL_CA1_BULK_UPDATE_BY_BOOKMARK", SQL_CA1_BULK_UPDATE_BY_BOOKMARK }, { "SQL_CA1_BULK_DELETE_BY_BOOKMARK", SQL_CA1_BULK_DELETE_BY_BOOKMARK }, { "SQL_CA1_BULK_FETCH_BY_BOOKMARK", SQL_CA1_BULK_FETCH_BY_BOOKMARK }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_DYNAMIC_CURSOR_ATTRIBUTES2", SQL_DYNAMIC_CURSOR_ATTRIBUTES2, { { "SQL_CA2_READ_ONLY_CONCURRENCY", SQL_CA2_READ_ONLY_CONCURRENCY }, { "SQL_CA2_LOCK_CONCURRENCY", SQL_CA2_LOCK_CONCURRENCY }, { "SQL_CA2_OPT_ROWVER_CONCURRENCY", SQL_CA2_OPT_ROWVER_CONCURRENCY }, { "SQL_CA2_OPT_VALUES_CONCURRENCY", SQL_CA2_OPT_VALUES_CONCURRENCY }, { "SQL_CA2_SENSITIVITY_ADDITIONS", SQL_CA2_SENSITIVITY_ADDITIONS }, { "SQL_CA2_SENSITIVITY_DELETIONS", SQL_CA2_SENSITIVITY_DELETIONS }, { "SQL_CA2_SENSITIVITY_UPDATES", SQL_CA2_SENSITIVITY_UPDATES }, { "SQL_CA2_MAX_ROWS_SELECT", SQL_CA2_MAX_ROWS_SELECT }, { "SQL_CA2_MAX_ROWS_INSERT", SQL_CA2_MAX_ROWS_INSERT }, { "SQL_CA2_MAX_ROWS_DELETE", SQL_CA2_MAX_ROWS_DELETE }, { "SQL_CA2_MAX_ROWS_UPDATE", SQL_CA2_MAX_ROWS_UPDATE }, { "SQL_CA2_MAX_ROWS_CATALOG", SQL_CA2_MAX_ROWS_CATALOG }, { "SQL_CA2_MAX_ROWS_AFFECTS_ALL", SQL_CA2_MAX_ROWS_AFFECTS_ALL }, { "SQL_CA2_CRC_EXACT", SQL_CA2_CRC_EXACT }, { "SQL_CA2_CRC_APPROXIMATE", SQL_CA2_CRC_APPROXIMATE }, { "SQL_CA2_SIMULATE_NON_UNIQUE", SQL_CA2_SIMULATE_NON_UNIQUE }, { "SQL_CA2_SIMULATE_TRY_UNIQUE", SQL_CA2_SIMULATE_TRY_UNIQUE }, { "SQL_CA2_SIMULATE_UNIQUE", SQL_CA2_SIMULATE_UNIQUE }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_EXPRESSIONS_IN_ORDERBY", SQL_EXPRESSIONS_IN_ORDERBY, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_FILE_USAGE", SQL_FILE_USAGE, { { "SQL_FILE_NOT_SUPPORTED", SQL_FILE_NOT_SUPPORTED }, { "SQL_FILE_TABLE", SQL_FILE_TABLE }, { "SQL_FILE_CATALOG", SQL_FILE_CATALOG }, { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1", SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1, { { "SQL_CA1_NEXT", SQL_CA1_NEXT }, { "SQL_CA1_LOCK_EXCLUSIVE", SQL_CA1_LOCK_EXCLUSIVE }, { "SQL_CA1_LOCK_NO_CHANGE", SQL_CA1_LOCK_NO_CHANGE }, { "SQL_CA1_LOCK_UNLOCK", SQL_CA1_LOCK_UNLOCK }, { "SQL_CA1_POS_POSITION", SQL_CA1_POS_POSITION }, { "SQL_CA1_POS_UPDATE", SQL_CA1_POS_UPDATE }, { "SQL_CA1_POS_DELETE", SQL_CA1_POS_DELETE }, { "SQL_CA1_POS_REFRESH", SQL_CA1_POS_REFRESH }, { "SQL_CA1_POSITIONED_UPDATE", SQL_CA1_POSITIONED_UPDATE }, { "SQL_CA1_POSITIONED_DELETE", SQL_CA1_POSITIONED_DELETE }, { "SQL_CA1_SELECT_FOR_UPDATE", SQL_CA1_SELECT_FOR_UPDATE }, { "SQL_CA1_BULK_ADD", SQL_CA1_BULK_ADD }, { "SQL_CA1_BULK_UPDATE_BY_BOOKMARK", SQL_CA1_BULK_UPDATE_BY_BOOKMARK }, { "SQL_CA1_BULK_DELETE_BY_BOOKMARK", SQL_CA1_BULK_DELETE_BY_BOOKMARK }, { "SQL_CA1_BULK_FETCH_BY_BOOKMARK", SQL_CA1_BULK_FETCH_BY_BOOKMARK }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2", SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2, { { "SQL_CA2_READ_ONLY_CONCURRENCY", SQL_CA2_READ_ONLY_CONCURRENCY }, { "SQL_CA2_LOCK_CONCURRENCY", SQL_CA2_LOCK_CONCURRENCY }, { "SQL_CA2_OPT_ROWVER_CONCURRENCY", SQL_CA2_OPT_ROWVER_CONCURRENCY }, { "SQL_CA2_OPT_VALUES_CONCURRENCY", SQL_CA2_OPT_VALUES_CONCURRENCY }, { "SQL_CA2_SENSITIVITY_ADDITIONS", SQL_CA2_SENSITIVITY_ADDITIONS }, { "SQL_CA2_SENSITIVITY_DELETIONS", SQL_CA2_SENSITIVITY_DELETIONS }, { "SQL_CA2_SENSITIVITY_UPDATES", SQL_CA2_SENSITIVITY_UPDATES }, { "SQL_CA2_MAX_ROWS_SELECT", SQL_CA2_MAX_ROWS_SELECT }, { "SQL_CA2_MAX_ROWS_INSERT", SQL_CA2_MAX_ROWS_INSERT }, { "SQL_CA2_MAX_ROWS_DELETE", SQL_CA2_MAX_ROWS_DELETE }, { "SQL_CA2_MAX_ROWS_UPDATE", SQL_CA2_MAX_ROWS_UPDATE }, { "SQL_CA2_MAX_ROWS_CATALOG", SQL_CA2_MAX_ROWS_CATALOG }, { "SQL_CA2_MAX_ROWS_AFFECTS_ALL", SQL_CA2_MAX_ROWS_AFFECTS_ALL }, { "SQL_CA2_CRC_EXACT", SQL_CA2_CRC_EXACT }, { "SQL_CA2_CRC_APPROXIMATE", SQL_CA2_CRC_APPROXIMATE }, { "SQL_CA2_SIMULATE_NON_UNIQUE", SQL_CA2_SIMULATE_NON_UNIQUE }, { "SQL_CA2_SIMULATE_TRY_UNIQUE", SQL_CA2_SIMULATE_TRY_UNIQUE }, { "SQL_CA2_SIMULATE_UNIQUE", SQL_CA2_SIMULATE_UNIQUE }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_GETDATA_EXTENSIONS", SQL_GETDATA_EXTENSIONS, { { "SQL_GD_ANY_COLUMN", SQL_GD_ANY_COLUMN }, { "SQL_GD_ANY_ORDER", SQL_GD_ANY_ORDER }, { "SQL_GD_BLOCK", SQL_GD_BLOCK }, { "SQL_GD_BOUND", SQL_GD_BOUND }, { NULL } }, "2.0", SQL_INTEGER, TRUE }, { "SQL_GROUP_BY", SQL_GROUP_BY, { { "SQL_GB_COLLATE", SQL_GB_COLLATE }, { "SQL_GB_NOT_SUPPORTED", SQL_GB_NOT_SUPPORTED }, { "SQL_GB_GROUP_BY_EQUALS_SELECT", SQL_GB_GROUP_BY_EQUALS_SELECT }, { "SQL_GB_GROUP_BY_CONTAINS_SELECT", SQL_GB_GROUP_BY_CONTAINS_SELECT }, { "SQL_GB_NO_RELATION", SQL_GB_NO_RELATION }, { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_IDENTIFIER_CASE", SQL_IDENTIFIER_CASE, { { "SQL_IC_UPPER", SQL_IC_UPPER }, { "SQL_IC_LOWER", SQL_IC_LOWER }, { "SQL_IC_SENSITIVE", SQL_IC_SENSITIVE }, { "SQL_IC_MIXED", SQL_IC_MIXED }, { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_IDENTIFIER_QUOTE_CHAR", SQL_IDENTIFIER_QUOTE_CHAR, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_INDEX_KEYWORDS", SQL_INDEX_KEYWORDS, { { "SQL_IK_NONE", SQL_IK_NONE }, { "SQL_IK_ASC", SQL_IK_ASC }, { "SQL_IK_DESC", SQL_IK_DESC }, { "SQL_IK_ALL", SQL_IK_ALL }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_INFO_SCHEMA_VIEWS", SQL_INFO_SCHEMA_VIEWS, { { "SQL_ISV_ASSERTIONS", SQL_ISV_ASSERTIONS }, { "SQL_ISV_CHARACTER_SETS", SQL_ISV_CHARACTER_SETS }, { "SQL_ISV_CHECK_CONSTRAINTS", SQL_ISV_CHECK_CONSTRAINTS }, { "SQL_ISV_COLLATIONS", SQL_ISV_COLLATIONS }, { "SQL_ISV_COLUMN_DOMAIN_USAGE", SQL_ISV_COLUMN_DOMAIN_USAGE }, { "SQL_ISV_COLUMN_PRIVILEGES", SQL_ISV_COLUMN_PRIVILEGES }, { "SQL_ISV_COLUMNS", SQL_ISV_COLUMNS }, { "SQL_ISV_CONSTRAINT_COLUMN_USAGE", SQL_ISV_CONSTRAINT_COLUMN_USAGE }, { "SQL_ISV_CONSTRAINT_TABLE_USAGE", SQL_ISV_CONSTRAINT_TABLE_USAGE }, { "SQL_ISV_DOMAIN_CONSTRAINTS", SQL_ISV_DOMAIN_CONSTRAINTS }, { "SQL_ISV_DOMAINS", SQL_ISV_DOMAINS }, { "SQL_ISV_KEY_COLUMN_USAGE", SQL_ISV_KEY_COLUMN_USAGE }, { "SQL_ISV_REFERENTIAL_CONSTRAINTS", SQL_ISV_REFERENTIAL_CONSTRAINTS }, { "SQL_ISV_SCHEMATA", SQL_ISV_SCHEMATA }, { "SQL_ISV_SQL_LANGUAGES", SQL_ISV_SQL_LANGUAGES }, { "SQL_ISV_TABLE_CONSTRAINTS", SQL_ISV_TABLE_CONSTRAINTS }, { "SQL_ISV_TABLE_PRIVILEGES", SQL_ISV_TABLE_PRIVILEGES }, { "SQL_ISV_TABLES", SQL_ISV_TABLES }, { "SQL_ISV_TRANSLATIONS", SQL_ISV_TRANSLATIONS }, { "SQL_ISV_USAGE_PRIVILEGES", SQL_ISV_USAGE_PRIVILEGES }, { "SQL_ISV_VIEW_COLUMN_USAGE", SQL_ISV_VIEW_COLUMN_USAGE }, { "SQL_ISV_VIEW_TABLE_USAGE", SQL_ISV_VIEW_TABLE_USAGE }, { "SQL_ISV_VIEWS", SQL_ISV_VIEWS }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_INSERT_STATEMENT", SQL_INSERT_STATEMENT, { { "SQL_IS_INSERT_LITERALS", SQL_IS_INSERT_LITERALS }, { "SQL_IS_INSERT_SEARCHED", SQL_IS_INSERT_SEARCHED }, { "SQL_IS_SELECT_INTO", SQL_IS_SELECT_INTO }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_INTEGRITY", SQL_INTEGRITY, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_KEYSET_CURSOR_ATTRIBUTES1", SQL_KEYSET_CURSOR_ATTRIBUTES1, { { "SQL_CA1_NEXT", SQL_CA1_NEXT }, { "SQL_CA1_ABSOLUTE", SQL_CA1_ABSOLUTE }, { "SQL_CA1_RELATIVE", SQL_CA1_RELATIVE }, { "SQL_CA1_BOOKMARK", SQL_CA1_BOOKMARK }, { "SQL_CA1_LOCK_EXCLUSIVE", SQL_CA1_LOCK_EXCLUSIVE }, { "SQL_CA1_LOCK_NO_CHANGE", SQL_CA1_LOCK_NO_CHANGE }, { "SQL_CA1_LOCK_UNLOCK", SQL_CA1_LOCK_UNLOCK }, { "SQL_CA1_POS_POSITION", SQL_CA1_POS_POSITION }, { "SQL_CA1_POS_UPDATE", SQL_CA1_POS_UPDATE }, { "SQL_CA1_POS_DELETE", SQL_CA1_POS_DELETE }, { "SQL_CA1_POS_REFRESH", SQL_CA1_POS_REFRESH }, { "SQL_CA1_POSITIONED_UPDATE", SQL_CA1_POSITIONED_UPDATE }, { "SQL_CA1_POSITIONED_DELETE", SQL_CA1_POSITIONED_DELETE }, { "SQL_CA1_SELECT_FOR_UPDATE", SQL_CA1_SELECT_FOR_UPDATE }, { "SQL_CA1_BULK_ADD", SQL_CA1_BULK_ADD }, { "SQL_CA1_BULK_UPDATE_BY_BOOKMARK", SQL_CA1_BULK_UPDATE_BY_BOOKMARK }, { "SQL_CA1_BULK_DELETE_BY_BOOKMARK", SQL_CA1_BULK_DELETE_BY_BOOKMARK }, { "SQL_CA1_BULK_FETCH_BY_BOOKMARK", SQL_CA1_BULK_FETCH_BY_BOOKMARK }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_KEYSET_CURSOR_ATTRIBUTES2", SQL_KEYSET_CURSOR_ATTRIBUTES2, { { "SQL_CA2_READ_ONLY_CONCURRENCY", SQL_CA2_READ_ONLY_CONCURRENCY }, { "SQL_CA2_LOCK_CONCURRENCY", SQL_CA2_LOCK_CONCURRENCY }, { "SQL_CA2_OPT_ROWVER_CONCURRENCY", SQL_CA2_OPT_ROWVER_CONCURRENCY }, { "SQL_CA2_OPT_VALUES_CONCURRENCY", SQL_CA2_OPT_VALUES_CONCURRENCY }, { "SQL_CA2_SENSITIVITY_ADDITIONS", SQL_CA2_SENSITIVITY_ADDITIONS }, { "SQL_CA2_SENSITIVITY_DELETIONS", SQL_CA2_SENSITIVITY_DELETIONS }, { "SQL_CA2_SENSITIVITY_UPDATES", SQL_CA2_SENSITIVITY_UPDATES }, { "SQL_CA2_MAX_ROWS_SELECT", SQL_CA2_MAX_ROWS_SELECT }, { "SQL_CA2_MAX_ROWS_INSERT", SQL_CA2_MAX_ROWS_INSERT }, { "SQL_CA2_MAX_ROWS_DELETE", SQL_CA2_MAX_ROWS_DELETE }, { "SQL_CA2_MAX_ROWS_UPDATE", SQL_CA2_MAX_ROWS_UPDATE }, { "SQL_CA2_MAX_ROWS_CATALOG", SQL_CA2_MAX_ROWS_CATALOG }, { "SQL_CA2_MAX_ROWS_AFFECTS_ALL", SQL_CA2_MAX_ROWS_AFFECTS_ALL }, { "SQL_CA2_CRC_EXACT", SQL_CA2_CRC_EXACT }, { "SQL_CA2_CRC_APPROXIMATE", SQL_CA2_CRC_APPROXIMATE }, { "SQL_CA2_SIMULATE_NON_UNIQUE", SQL_CA2_SIMULATE_NON_UNIQUE }, { "SQL_CA2_SIMULATE_TRY_UNIQUE", SQL_CA2_SIMULATE_TRY_UNIQUE }, { "SQL_CA2_SIMULATE_UNIQUE", SQL_CA2_SIMULATE_UNIQUE }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_KEYWORDS", SQL_KEYWORDS, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_LIKE_ESCAPE_CLAUSE", SQL_LIKE_ESCAPE_CLAUSE, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_MAX_ASYNC_CONCURRENT_STATEMENTS", SQL_MAX_ASYNC_CONCURRENT_STATEMENTS, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_MAX_BINARY_LITERAL_LEN", SQL_MAX_BINARY_LITERAL_LEN, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_MAX_CATALOG_NAME_LEN", SQL_MAX_CATALOG_NAME_LEN, { { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_MAX_CHAR_LITERAL_LEN", SQL_MAX_CHAR_LITERAL_LEN, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_MAX_COLUMN_NAME_LEN", SQL_MAX_COLUMN_NAME_LEN, { { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_MAX_COLUMNS_IN_GROUP_BY", SQL_MAX_COLUMNS_IN_GROUP_BY, { { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_MAX_COLUMNS_IN_INDEX", SQL_MAX_COLUMNS_IN_INDEX, { { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_MAX_COLUMNS_IN_ORDER_BY", SQL_MAX_COLUMNS_IN_ORDER_BY, { { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_MAX_COLUMNS_IN_SELECT", SQL_MAX_COLUMNS_IN_SELECT, { { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_MAX_COLUMNS_IN_TABLE", SQL_MAX_COLUMNS_IN_TABLE, { { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_MAX_CONCURRENT_ACTIVITIES", SQL_MAX_CONCURRENT_ACTIVITIES, { { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_MAX_CURSOR_NAME_LEN", SQL_MAX_CURSOR_NAME_LEN, { { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_MAX_DRIVER_CONNECTIONS", SQL_MAX_DRIVER_CONNECTIONS, { { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_MAX_IDENTIFIER_LEN", SQL_MAX_IDENTIFIER_LEN, { { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_MAX_INDEX_SIZE", SQL_MAX_INDEX_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_MAX_PROCEDURE_NAME_LEN", SQL_MAX_PROCEDURE_NAME_LEN, { { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_MAX_ROW_SIZE", SQL_MAX_ROW_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_MAX_ROW_SIZE_INCLUDES_LONG", SQL_MAX_ROW_SIZE_INCLUDES_LONG, { { NULL } }, "3.0", SQL_CHAR }, { "SQL_MAX_STATEMENT_LEN", SQL_MAX_STATEMENT_LEN, { { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_MAX_TABLE_NAME_LEN", SQL_MAX_TABLE_NAME_LEN, { { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_MAX_TABLES_IN_SELECT", SQL_MAX_TABLES_IN_SELECT, { { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_MAX_USER_NAME_LEN", SQL_MAX_USER_NAME_LEN, { { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_MULT_RESULT_SETS", SQL_MULT_RESULT_SETS, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_MULTIPLE_ACTIVE_TXN", SQL_MULTIPLE_ACTIVE_TXN, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_NEED_LONG_DATA_LEN", SQL_NEED_LONG_DATA_LEN, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_NON_NULLABLE_COLUMNS", SQL_NON_NULLABLE_COLUMNS, { { "SQL_NNC_NULL", SQL_NNC_NULL }, { "SQL_NNC_NON_NULL", SQL_NNC_NON_NULL }, { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_NULL_COLLATION", SQL_NULL_COLLATION, { { "SQL_NC_END", SQL_NC_END }, { "SQL_NC_HIGH", SQL_NC_HIGH }, { "SQL_NC_LOW", SQL_NC_LOW }, { "SQL_NC_START", SQL_NC_START }, { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_NUMERIC_FUNCTIONS", SQL_NUMERIC_FUNCTIONS, { { "SQL_FN_NUM_ABS", SQL_FN_NUM_ABS }, { "SQL_FN_NUM_ACOS", SQL_FN_NUM_ACOS }, { "SQL_FN_NUM_ASIN", SQL_FN_NUM_ASIN }, { "SQL_FN_NUM_ATAN", SQL_FN_NUM_ATAN }, { "SQL_FN_NUM_ATAN2", SQL_FN_NUM_ATAN2 }, { "SQL_FN_NUM_CEILING", SQL_FN_NUM_CEILING }, { "SQL_FN_NUM_COS", SQL_FN_NUM_COS }, { "SQL_FN_NUM_COT", SQL_FN_NUM_COT }, { "SQL_FN_NUM_DEGREES", SQL_FN_NUM_DEGREES }, { "SQL_FN_NUM_EXP", SQL_FN_NUM_EXP }, { "SQL_FN_NUM_FLOOR", SQL_FN_NUM_FLOOR }, { "SQL_FN_NUM_LOG", SQL_FN_NUM_LOG }, { "SQL_FN_NUM_LOG10", SQL_FN_NUM_LOG10 }, { "SQL_FN_NUM_MOD", SQL_FN_NUM_MOD }, { "SQL_FN_NUM_PI", SQL_FN_NUM_PI }, { "SQL_FN_NUM_POWER", SQL_FN_NUM_POWER }, { "SQL_FN_NUM_RADIANS", SQL_FN_NUM_RADIANS }, { "SQL_FN_NUM_RAND", SQL_FN_NUM_RAND }, { "SQL_FN_NUM_ROUND", SQL_FN_NUM_ROUND }, { "SQL_FN_NUM_SIGN", SQL_FN_NUM_SIGN }, { "SQL_FN_NUM_SIN", SQL_FN_NUM_SIN }, { "SQL_FN_NUM_SQRT", SQL_FN_NUM_SQRT }, { "SQL_FN_NUM_TAN", SQL_FN_NUM_TAN }, { "SQL_FN_NUM_TRUNCATE", SQL_FN_NUM_TRUNCATE }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_ODBC_INTERFACE_CONFORMANCE", SQL_ODBC_INTERFACE_CONFORMANCE, { { "SQL_OIC_CORE", SQL_OIC_CORE }, { "SQL_OIC_LEVEL1", SQL_OIC_LEVEL1 }, { "SQL_OIC_LEVEL2", SQL_OIC_LEVEL2 }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ODBC_SAG_CLI_CONFORMANCE", SQL_ODBC_SAG_CLI_CONFORMANCE, { { "SQL_OSCC_NOT_COMPLIANT", SQL_OSCC_NOT_COMPLIANT }, { "SQL_OSCC_COMPLIANT", SQL_OSCC_COMPLIANT }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ODBC_VER", SQL_ODBC_VER, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_OJ_CAPABILITIES", SQL_OJ_CAPABILITIES, { { "SQL_OJ_LEFT", SQL_OJ_LEFT }, { "SQL_OJ_RIGHT", SQL_OJ_RIGHT }, { "SQL_OJ_FULL", SQL_OJ_FULL }, { "SQL_OJ_NESTED", SQL_OJ_NESTED }, { "SQL_OJ_NOT_ORDERED", SQL_OJ_NOT_ORDERED }, { "SQL_OJ_INNER", SQL_OJ_INNER }, { "SQL_OJ_ALL_COMPARISON_OPS", SQL_OJ_ALL_COMPARISON_OPS }, { NULL } }, "2.01", SQL_INTEGER, TRUE }, { "SQL_ORDER_BY_COLUMNS_IN_SELECT", SQL_ORDER_BY_COLUMNS_IN_SELECT, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_PARAM_ARRAY_ROW_COUNTS", SQL_PARAM_ARRAY_ROW_COUNTS, { { "SQL_PARC_BATCH", SQL_PARC_BATCH }, { "SQL_PARC_NO_BATCH", SQL_PARC_NO_BATCH }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_PARAM_ARRAY_SELECTS", SQL_PARAM_ARRAY_SELECTS, { { "SQL_PAS_BATCH", SQL_PAS_BATCH }, { "SQL_PAS_NO_BATCH", SQL_PAS_NO_BATCH }, { "SQL_PAS_NO_SELECT", SQL_PAS_NO_SELECT }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_PROCEDURE_TERM", SQL_PROCEDURE_TERM, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_PROCEDURES", SQL_PROCEDURES, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_QUOTED_IDENTIFIER_CASE", SQL_QUOTED_IDENTIFIER_CASE, { { "SQL_IC_UPPER", SQL_IC_UPPER }, { "SQL_IC_LOWER", SQL_IC_LOWER }, { "SQL_IC_SENSITIVE", SQL_IC_SENSITIVE }, { "SQL_IC_MIXED", SQL_IC_MIXED }, { NULL } }, "2.0", SQL_SMALLINT }, { "SQL_ROW_UPDATES", SQL_ROW_UPDATES, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_SCHEMA_TERM", SQL_SCHEMA_TERM, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_SCHEMA_USAGE", SQL_SCHEMA_USAGE, { { "SQL_SU_DML_STATEMENTS", SQL_SU_DML_STATEMENTS }, { "SQL_SU_PROCEDURE_INVOCATION", SQL_SU_PROCEDURE_INVOCATION }, { "SQL_SU_TABLE_DEFINITION", SQL_SU_TABLE_DEFINITION }, { "SQL_SU_INDEX_DEFINITION", SQL_SU_INDEX_DEFINITION }, { "SQL_SU_PRIVILEGE_DEFINITION", SQL_SU_PRIVILEGE_DEFINITION }, { NULL } }, "2.0", SQL_INTEGER, TRUE }, { "SQL_SCROLL_OPTIONS", SQL_SCROLL_OPTIONS, { { "SQL_SO_FORWARD_ONLY", SQL_SO_FORWARD_ONLY }, { "SQL_SO_STATIC", SQL_SO_STATIC }, { "SQL_SO_KEYSET_DRIVEN", SQL_SO_KEYSET_DRIVEN }, { "SQL_SO_DYNAMIC", SQL_SO_DYNAMIC }, { "SQL_SO_MIXED", SQL_SO_MIXED }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_SEARCH_PATTERN_ESCAPE", SQL_SEARCH_PATTERN_ESCAPE, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_SERVER_NAME", SQL_SERVER_NAME, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_SPECIAL_CHARACTERS", SQL_SPECIAL_CHARACTERS, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_SQL_CONFORMANCE", SQL_SQL_CONFORMANCE, { { "SQL_SC_SQL92_ENTRY", SQL_SC_SQL92_ENTRY }, { "SQL_SC_FIPS127_2_TRANSITIONAL", SQL_SC_FIPS127_2_TRANSITIONAL }, { "SQL_SC_SQL92_FULL", SQL_SC_SQL92_FULL }, { "SQL_SC_SQL92_INTERMEDIATE", SQL_SC_SQL92_INTERMEDIATE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_SQL92_DATETIME_FUNCTIONS", SQL_SQL92_DATETIME_FUNCTIONS, { { "SQL_SDF_CURRENT_DATE", SQL_SDF_CURRENT_DATE }, { "SQL_SDF_CURRENT_TIME", SQL_SDF_CURRENT_TIME }, { "SQL_SDF_CURRENT_TIMESTAMP", SQL_SDF_CURRENT_TIMESTAMP }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_SQL92_FOREIGN_KEY_DELETE_RULE", SQL_SQL92_FOREIGN_KEY_DELETE_RULE, { { "SQL_SFKD_CASCADE", SQL_SFKD_CASCADE }, { "SQL_SFKD_NO_ACTION", SQL_SFKD_NO_ACTION }, { "SQL_SFKD_SET_DEFAULT", SQL_SFKD_SET_DEFAULT }, { "SQL_SFKD_SET_NULL", SQL_SFKD_SET_NULL }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_SQL92_FOREIGN_KEY_UPDATE_RULE", SQL_SQL92_FOREIGN_KEY_UPDATE_RULE, { { "SQL_SFKU_CASCADE", SQL_SFKU_CASCADE }, { "SQL_SFKU_NO_ACTION", SQL_SFKU_NO_ACTION }, { "SQL_SFKU_SET_DEFAULT", SQL_SFKU_SET_DEFAULT }, { "SQL_SFKU_SET_NULL", SQL_SFKU_SET_NULL }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_SQL92_GRANT", SQL_SQL92_GRANT, { { "SQL_SG_DELETE_TABLE", SQL_SG_DELETE_TABLE }, { "SQL_SG_INSERT_COLUMN", SQL_SG_INSERT_COLUMN }, { "SQL_SG_INSERT_TABLE", SQL_SG_INSERT_TABLE }, { "SQL_SG_REFERENCES_TABLE", SQL_SG_REFERENCES_TABLE }, { "SQL_SG_REFERENCES_COLUMN", SQL_SG_REFERENCES_COLUMN }, { "SQL_SG_SELECT_TABLE", SQL_SG_SELECT_TABLE }, { "SQL_SG_UPDATE_COLUMN", SQL_SG_UPDATE_COLUMN }, { "SQL_SG_UPDATE_TABLE", SQL_SG_UPDATE_TABLE }, { "SQL_SG_USAGE_ON_DOMAIN", SQL_SG_USAGE_ON_DOMAIN }, { "SQL_SG_USAGE_ON_CHARACTER_SET", SQL_SG_USAGE_ON_CHARACTER_SET }, { "SQL_SG_USAGE_ON_COLLATION", SQL_SG_USAGE_ON_COLLATION }, { "SQL_SG_USAGE_ON_TRANSLATION", SQL_SG_USAGE_ON_TRANSLATION }, { "SQL_SG_WITH_GRANT_OPTION", SQL_SG_WITH_GRANT_OPTION }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_SQL92_NUMERIC_VALUE_FUNCTIONS", SQL_SQL92_NUMERIC_VALUE_FUNCTIONS, { { "SQL_SNVF_BIT_LENGTH", SQL_SNVF_BIT_LENGTH }, { "SQL_SNVF_CHAR_LENGTH", SQL_SNVF_CHAR_LENGTH }, { "SQL_SNVF_CHARACTER_LENGTH", SQL_SNVF_CHARACTER_LENGTH }, { "SQL_SNVF_EXTRACT", SQL_SNVF_EXTRACT }, { "SQL_SNVF_OCTET_LENGTH", SQL_SNVF_OCTET_LENGTH }, { "SQL_SNVF_POSITION", SQL_SNVF_POSITION }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_SQL92_PREDICATES", SQL_SQL92_PREDICATES, { { "SQL_SP_BETWEEN", SQL_SP_BETWEEN }, { "SQL_SP_COMPARISON", SQL_SP_COMPARISON }, { "SQL_SP_EXISTS", SQL_SP_EXISTS }, { "SQL_SP_IN", SQL_SP_IN }, { "SQL_SP_ISNOTNULL", SQL_SP_ISNOTNULL }, { "SQL_SP_ISNULL", SQL_SP_ISNULL }, { "SQL_SP_LIKE", SQL_SP_LIKE }, { "SQL_SP_MATCH_FULL", SQL_SP_MATCH_FULL }, { "SQL_SP_MATCH_PARTIAL", SQL_SP_MATCH_PARTIAL }, { "SQL_SP_MATCH_UNIQUE_FULL", SQL_SP_MATCH_UNIQUE_FULL }, { "SQL_SP_MATCH_UNIQUE_PARTIAL", SQL_SP_MATCH_UNIQUE_PARTIAL }, { "SQL_SP_OVERLAPS", SQL_SP_OVERLAPS }, { "SQL_SP_QUANTIFIED_COMPARISON", SQL_SP_QUANTIFIED_COMPARISON }, { "SQL_SP_UNIQUE", SQL_SP_UNIQUE }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_SQL92_RELATIONAL_JOIN_OPERATORS", SQL_SQL92_RELATIONAL_JOIN_OPERATORS, { { "SQL_SRJO_CORRESPONDING_CLAUSE", SQL_SRJO_CORRESPONDING_CLAUSE }, { "SQL_SRJO_CROSS_JOIN", SQL_SRJO_CROSS_JOIN }, { "SQL_SRJO_EXCEPT_JOIN", SQL_SRJO_EXCEPT_JOIN }, { "SQL_SRJO_FULL_OUTER_JOIN", SQL_SRJO_FULL_OUTER_JOIN }, { "SQL_SRJO_INNER_JOIN", SQL_SRJO_INNER_JOIN }, { "SQL_SRJO_INTERSECT_JOIN", SQL_SRJO_INTERSECT_JOIN }, { "SQL_SRJO_LEFT_OUTER_JOIN", SQL_SRJO_LEFT_OUTER_JOIN }, { "SQL_SRJO_NATURAL_JOIN", SQL_SRJO_NATURAL_JOIN }, { "SQL_SRJO_RIGHT_OUTER_JOIN", SQL_SRJO_RIGHT_OUTER_JOIN }, { "SQL_SRJO_UNION_JOIN", SQL_SRJO_UNION_JOIN }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_SQL92_REVOKE", SQL_SQL92_REVOKE, { { "SQL_SR_CASCADE", SQL_SR_CASCADE }, { "SQL_SR_DELETE_TABLE", SQL_SR_DELETE_TABLE }, { "SQL_SR_GRANT_OPTION_FOR", SQL_SR_GRANT_OPTION_FOR }, { "SQL_SR_INSERT_COLUMN", SQL_SR_INSERT_COLUMN }, { "SQL_SR_INSERT_TABLE", SQL_SR_INSERT_TABLE }, { "SQL_SR_REFERENCES_COLUMN", SQL_SR_REFERENCES_COLUMN }, { "SQL_SR_REFERENCES_TABLE", SQL_SR_REFERENCES_TABLE }, { "SQL_SR_RESTRICT", SQL_SR_RESTRICT }, { "SQL_SR_SELECT_TABLE", SQL_SR_SELECT_TABLE }, { "SQL_SR_UPDATE_COLUMN", SQL_SR_UPDATE_COLUMN }, { "SQL_SR_UPDATE_TABLE", SQL_SR_UPDATE_TABLE }, { "SQL_SR_USAGE_ON_DOMAIN", SQL_SR_USAGE_ON_DOMAIN }, { "SQL_SR_USAGE_ON_CHARACTER_SET", SQL_SR_USAGE_ON_CHARACTER_SET }, { "SQL_SR_USAGE_ON_COLLATION", SQL_SR_USAGE_ON_COLLATION }, { "SQL_SR_USAGE_ON_TRANSLATION", SQL_SR_USAGE_ON_TRANSLATION }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_SQL92_ROW_VALUE_CONSTRUCTOR", SQL_SQL92_ROW_VALUE_CONSTRUCTOR, { { "SQL_SRVC_VALUE_EXPRESSION", SQL_SRVC_VALUE_EXPRESSION }, { "SQL_SRVC_NULL", SQL_SRVC_NULL }, { "SQL_SRVC_DEFAULT", SQL_SRVC_DEFAULT }, { "SQL_SRVC_ROW_SUBQUERY", SQL_SRVC_ROW_SUBQUERY }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_SQL92_STRING_FUNCTIONS", SQL_SQL92_STRING_FUNCTIONS, { { "SQL_SSF_CONVERT", SQL_SSF_CONVERT }, { "SQL_SSF_LOWER", SQL_SSF_LOWER }, { "SQL_SSF_UPPER", SQL_SSF_UPPER }, { "SQL_SSF_SUBSTRING", SQL_SSF_SUBSTRING }, { "SQL_SSF_TRANSLATE", SQL_SSF_TRANSLATE }, { "SQL_SSF_TRIM_BOTH", SQL_SSF_TRIM_BOTH }, { "SQL_SSF_TRIM_LEADING", SQL_SSF_TRIM_LEADING }, { "SQL_SSF_TRIM_TRAILING", SQL_SSF_TRIM_TRAILING }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_SQL92_VALUE_EXPRESSIONS", SQL_SQL92_VALUE_EXPRESSIONS, { { "SQL_SVE_CASE", SQL_SVE_CASE }, { "SQL_SVE_CAST", SQL_SVE_CAST }, { "SQL_SVE_COALESCE", SQL_SVE_COALESCE }, { "SQL_SVE_NULLIF", SQL_SVE_NULLIF }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_STANDARD_CLI_CONFORMANCE", SQL_STANDARD_CLI_CONFORMANCE, { { "SQL_SCC_XOPEN_CLI_VERSION1", SQL_SCC_XOPEN_CLI_VERSION1 }, { "SQL_SCC_ISO92_CLI", SQL_SCC_ISO92_CLI }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_STATIC_CURSOR_ATTRIBUTES1", SQL_STATIC_CURSOR_ATTRIBUTES1, { { "SQL_CA1_NEXT", SQL_CA1_NEXT }, { "SQL_CA1_ABSOLUTE", SQL_CA1_ABSOLUTE }, { "SQL_CA1_RELATIVE", SQL_CA1_RELATIVE }, { "SQL_CA1_BOOKMARK", SQL_CA1_BOOKMARK }, { "SQL_CA1_LOCK_EXCLUSIVE", SQL_CA1_LOCK_EXCLUSIVE }, { "SQL_CA1_LOCK_NO_CHANGE", SQL_CA1_LOCK_NO_CHANGE }, { "SQL_CA1_LOCK_UNLOCK", SQL_CA1_LOCK_UNLOCK }, { "SQL_CA1_POS_POSITION", SQL_CA1_POS_POSITION }, { "SQL_CA1_POS_UPDATE", SQL_CA1_POS_UPDATE }, { "SQL_CA1_POS_DELETE", SQL_CA1_POS_DELETE }, { "SQL_CA1_POS_REFRESH", SQL_CA1_POS_REFRESH }, { "SQL_CA1_POSITIONED_UPDATE", SQL_CA1_POSITIONED_UPDATE }, { "SQL_CA1_POSITIONED_DELETE", SQL_CA1_POSITIONED_DELETE }, { "SQL_CA1_SELECT_FOR_UPDATE", SQL_CA1_SELECT_FOR_UPDATE }, { "SQL_CA1_BULK_ADD", SQL_CA1_BULK_ADD }, { "SQL_CA1_BULK_UPDATE_BY_BOOKMARK", SQL_CA1_BULK_UPDATE_BY_BOOKMARK }, { "SQL_CA1_BULK_DELETE_BY_BOOKMARK", SQL_CA1_BULK_DELETE_BY_BOOKMARK }, { "SQL_CA1_BULK_FETCH_BY_BOOKMARK", SQL_CA1_BULK_FETCH_BY_BOOKMARK }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_STATIC_CURSOR_ATTRIBUTES2", SQL_STATIC_CURSOR_ATTRIBUTES2, { { "SQL_CA2_READ_ONLY_CONCURRENCY", SQL_CA2_READ_ONLY_CONCURRENCY }, { "SQL_CA2_LOCK_CONCURRENCY", SQL_CA2_LOCK_CONCURRENCY }, { "SQL_CA2_OPT_ROWVER_CONCURRENCY", SQL_CA2_OPT_ROWVER_CONCURRENCY }, { "SQL_CA2_OPT_VALUES_CONCURRENCY", SQL_CA2_OPT_VALUES_CONCURRENCY }, { "SQL_CA2_SENSITIVITY_ADDITIONS", SQL_CA2_SENSITIVITY_ADDITIONS }, { "SQL_CA2_SENSITIVITY_DELETIONS", SQL_CA2_SENSITIVITY_DELETIONS }, { "SQL_CA2_SENSITIVITY_UPDATES", SQL_CA2_SENSITIVITY_UPDATES }, { "SQL_CA2_MAX_ROWS_SELECT", SQL_CA2_MAX_ROWS_SELECT }, { "SQL_CA2_MAX_ROWS_INSERT", SQL_CA2_MAX_ROWS_INSERT }, { "SQL_CA2_MAX_ROWS_DELETE", SQL_CA2_MAX_ROWS_DELETE }, { "SQL_CA2_MAX_ROWS_UPDATE", SQL_CA2_MAX_ROWS_UPDATE }, { "SQL_CA2_MAX_ROWS_CATALOG", SQL_CA2_MAX_ROWS_CATALOG }, { "SQL_CA2_MAX_ROWS_AFFECTS_ALL", SQL_CA2_MAX_ROWS_AFFECTS_ALL }, { "SQL_CA2_CRC_EXACT", SQL_CA2_CRC_EXACT }, { "SQL_CA2_CRC_APPROXIMATE", SQL_CA2_CRC_APPROXIMATE }, { "SQL_CA2_SIMULATE_NON_UNIQUE", SQL_CA2_SIMULATE_NON_UNIQUE }, { "SQL_CA2_SIMULATE_TRY_UNIQUE", SQL_CA2_SIMULATE_TRY_UNIQUE }, { "SQL_CA2_SIMULATE_UNIQUE", SQL_CA2_SIMULATE_UNIQUE }, { NULL } }, "3.0", SQL_INTEGER, TRUE }, { "SQL_STRING_FUNCTIONS", SQL_STRING_FUNCTIONS, { { "SQL_FN_STR_ASCII", SQL_FN_STR_ASCII }, { "SQL_FN_STR_BIT_LENGTH", SQL_FN_STR_BIT_LENGTH }, { "SQL_FN_STR_CHAR", SQL_FN_STR_CHAR }, { "SQL_FN_STR_CHAR_LENGTH", SQL_FN_STR_CHAR_LENGTH }, { "SQL_FN_STR_CHARACTER_LENGTH", SQL_FN_STR_CHARACTER_LENGTH }, { "SQL_FN_STR_CONCAT", SQL_FN_STR_CONCAT }, { "SQL_FN_STR_DIFFERENCE", SQL_FN_STR_DIFFERENCE }, { "SQL_FN_STR_INSERT", SQL_FN_STR_INSERT }, { "SQL_FN_STR_LCASE", SQL_FN_STR_LCASE }, { "SQL_FN_STR_LEFT", SQL_FN_STR_LEFT }, { "SQL_FN_STR_LENGTH", SQL_FN_STR_LENGTH }, { "SQL_FN_STR_LOCATE", SQL_FN_STR_LOCATE }, { "SQL_FN_STR_LTRIM", SQL_FN_STR_LTRIM }, { "SQL_FN_STR_OCTET_LENGTH", SQL_FN_STR_OCTET_LENGTH }, { "SQL_FN_STR_POSITION", SQL_FN_STR_POSITION }, { "SQL_FN_STR_REPEAT", SQL_FN_STR_REPEAT }, { "SQL_FN_STR_REPLACE", SQL_FN_STR_REPLACE }, { "SQL_FN_STR_RIGHT", SQL_FN_STR_RIGHT }, { "SQL_FN_STR_RTRIM", SQL_FN_STR_RTRIM }, { "SQL_FN_STR_SOUNDEX", SQL_FN_STR_SOUNDEX }, { "SQL_FN_STR_SPACE", SQL_FN_STR_SPACE }, { "SQL_FN_STR_SUBSTRING", SQL_FN_STR_SUBSTRING }, { "SQL_FN_STR_UCASE", SQL_FN_STR_UCASE }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_SUBQUERIES", SQL_SUBQUERIES, { { "SQL_SQ_CORRELATED_SUBQUERIES", SQL_SQ_CORRELATED_SUBQUERIES }, { "SQL_SQ_COMPARISON", SQL_SQ_COMPARISON }, { "SQL_SQ_EXISTS", SQL_SQ_EXISTS }, { "SQL_SQ_IN", SQL_SQ_IN }, { "SQL_SQ_QUANTIFIED", SQL_SQ_QUANTIFIED }, { NULL } }, "2.0", SQL_INTEGER, TRUE }, { "SQL_SYSTEM_FUNCTIONS", SQL_SYSTEM_FUNCTIONS, { { "SQL_FN_SYS_DBNAME", SQL_FN_SYS_DBNAME }, { "SQL_FN_SYS_IFNULL", SQL_FN_SYS_IFNULL }, { "SQL_FN_SYS_USERNAME", SQL_FN_SYS_USERNAME }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_TABLE_TERM", SQL_TABLE_TERM, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_TIMEDATE_ADD_INTERVALS", SQL_TIMEDATE_ADD_INTERVALS, { { "SQL_FN_TSI_FRAC_SECOND", SQL_FN_TSI_FRAC_SECOND }, { "SQL_FN_TSI_SECOND", SQL_FN_TSI_SECOND }, { "SQL_FN_TSI_MINUTE", SQL_FN_TSI_MINUTE }, { "SQL_FN_TSI_HOUR", SQL_FN_TSI_HOUR }, { "SQL_FN_TSI_DAY", SQL_FN_TSI_DAY }, { "SQL_FN_TSI_WEEK", SQL_FN_TSI_WEEK }, { "SQL_FN_TSI_MONTH", SQL_FN_TSI_MONTH }, { "SQL_FN_TSI_QUARTER", SQL_FN_TSI_QUARTER }, { "SQL_FN_TSI_YEAR", SQL_FN_TSI_YEAR }, { NULL } }, "2.0", SQL_INTEGER, TRUE }, { "SQL_TIMEDATE_DIFF_INTERVALS", SQL_TIMEDATE_DIFF_INTERVALS, { { "SQL_FN_TSI_FRAC_SECOND", SQL_FN_TSI_FRAC_SECOND }, { "SQL_FN_TSI_SECOND", SQL_FN_TSI_SECOND }, { "SQL_FN_TSI_MINUTE", SQL_FN_TSI_MINUTE }, { "SQL_FN_TSI_HOUR", SQL_FN_TSI_HOUR }, { "SQL_FN_TSI_DAY", SQL_FN_TSI_DAY }, { "SQL_FN_TSI_WEEK", SQL_FN_TSI_WEEK }, { "SQL_FN_TSI_MONTH", SQL_FN_TSI_MONTH }, { "SQL_FN_TSI_QUARTER", SQL_FN_TSI_QUARTER }, { "SQL_FN_TSI_YEAR", SQL_FN_TSI_YEAR }, { NULL } }, "2.0", SQL_INTEGER, TRUE }, { "SQL_TIMEDATE_FUNCTIONS", SQL_TIMEDATE_FUNCTIONS, { { "SQL_FN_TD_CURRENT_DATE", SQL_FN_TD_CURRENT_DATE }, { "SQL_FN_TD_CURRENT_TIME", SQL_FN_TD_CURRENT_TIME }, { "SQL_FN_TD_CURRENT_TIMESTAMP", SQL_FN_TD_CURRENT_TIMESTAMP }, { "SQL_FN_TD_CURDATE", SQL_FN_TD_CURDATE }, { "SQL_FN_TD_CURTIME", SQL_FN_TD_CURTIME }, { "SQL_FN_TD_DAYNAME", SQL_FN_TD_DAYNAME }, { "SQL_FN_TD_DAYOFMONTH", SQL_FN_TD_DAYOFMONTH }, { "SQL_FN_TD_DAYOFWEEK", SQL_FN_TD_DAYOFWEEK }, { "SQL_FN_TD_DAYOFYEAR", SQL_FN_TD_DAYOFYEAR }, { "SQL_FN_TD_EXTRACT", SQL_FN_TD_EXTRACT }, { "SQL_FN_TD_HOUR", SQL_FN_TD_HOUR }, { "SQL_FN_TD_MINUTE", SQL_FN_TD_MINUTE }, { "SQL_FN_TD_MONTH", SQL_FN_TD_MONTH }, { "SQL_FN_TD_MONTHNAME", SQL_FN_TD_MONTHNAME }, { "SQL_FN_TD_NOW", SQL_FN_TD_NOW }, { "SQL_FN_TD_QUARTER", SQL_FN_TD_QUARTER }, { "SQL_FN_TD_SECOND", SQL_FN_TD_SECOND }, { "SQL_FN_TD_TIMESTAMPADD", SQL_FN_TD_TIMESTAMPADD }, { "SQL_FN_TD_TIMESTAMPDIFF", SQL_FN_TD_TIMESTAMPDIFF }, { "SQL_FN_TD_WEEK", SQL_FN_TD_WEEK }, { "SQL_FN_TD_YEAR", SQL_FN_TD_YEAR }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_TXN_CAPABLE", SQL_TXN_CAPABLE, { { "SQL_TC_NONE", SQL_TC_NONE }, { "SQL_TC_DML", SQL_TC_DML }, { "SQL_TC_DDL_COMMIT", SQL_TC_DDL_COMMIT }, { "SQL_TC_DDL_IGNORE", SQL_TC_DDL_IGNORE }, { "SQL_TC_ALL", SQL_TC_ALL }, { NULL } }, "1.0", SQL_SMALLINT }, { "SQL_TXN_ISOLATION_OPTION", SQL_TXN_ISOLATION_OPTION, { { "SQL_TXN_READ_UNCOMMITTED", SQL_TXN_READ_UNCOMMITTED }, { "SQL_TXN_READ_COMMITTED", SQL_TXN_READ_COMMITTED }, { "SQL_TXN_REPEATABLE_READ", SQL_TXN_REPEATABLE_READ }, { "SQL_TXN_SERIALIZABLE", SQL_TXN_SERIALIZABLE }, { NULL } }, "1.0", SQL_INTEGER, TRUE }, { "SQL_UNION", SQL_UNION, { { "SQL_U_UNION", SQL_U_UNION }, { "SQL_U_UNION_ALL", SQL_U_UNION_ALL }, { NULL } }, "2.0", SQL_INTEGER, TRUE }, { "SQL_USER_NAME", SQL_USER_NAME, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_XOPEN_CLI_YEAR", SQL_XOPEN_CLI_YEAR, { { NULL } }, "3.0", SQL_CHAR }, { NULL } }; void dDriverConnect::out_str_clkd() { if ( out_str_valid -> isOn() ) out_str_valid -> setText( "OutConnectionString: SQL_NULL_POINTER" ); else out_str_valid -> setText( "OutConnectionString: VALID" ); } void dDriverConnect::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "StrLenPtr: SQL_NULL_POINTER" ); else strlen_valid -> setText( "StrLenPtr: VALID" ); } void dDriverConnect::Ok() { const char *in_string, *string_len; SQLCHAR *conn_str_in; SQLCHAR *out_string; SQLINTEGER in_string_len, con_str_out_max; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); SQLHANDLE in_handle; SQLSMALLINT con_str_out, *ptr_con_str_out; SQLUSMALLINT dc_type; int index; QString qstring_len, qin_string; if ( hand ) in_handle = hand -> getHandle(); qstring_len = str_len -> currentText(); string_len = qstring_len.ascii(); odbctest -> out_win -> insertLineLimited( "SQLDriverConnect():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Connection Handle: %p", in_handle ); else txt.sprintf( " Connection Handle: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); txt.sprintf( " Window Handle: NULL" ); odbctest -> out_win -> insertLineLimited( txt ); qin_string = in_str -> currentText(); in_string = qin_string.ascii(); if ( strcmp( in_string, "" ) == 0 ) { conn_str_in = NULL; odbctest -> out_win -> insertLineLimited( " InConnectionString: " ); } else if ( strcmp( in_string, "" ) == 0 ) { conn_str_in = ( SQLCHAR * ) ""; odbctest -> out_win -> insertLineLimited( " InConnectionString: " ); } else { txt.sprintf( " InConnectionString: %s", in_string ); conn_str_in = ( SQLCHAR * ) in_string; odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( string_len, "SQL_NTS", 7 ) == 0 ) { in_string_len = SQL_NTS; txt.sprintf( " StringLength1: SQL_NTS=-3" ); } else { in_string_len = atoi( string_len ); txt.sprintf( " StringLength1: %d", in_string_len ); } odbctest -> out_win -> insertLineLimited( txt ); con_str_out_max = atoi( buffer_len -> text()); if ( out_str_valid -> isOn()) { out_string = ( SQLCHAR * ) NULL; } else if ( con_str_out_max < 300 ) { out_string = new SQLCHAR[ 300 ]; } else { out_string = new SQLCHAR[ con_str_out_max ]; } if ( out_string ) { txt.sprintf( " OutConnectionString: %p", out_string ); } else { txt.sprintf( " OutConnectionString: NULL_POINTER" ); } odbctest -> out_win -> insertLineLimited( txt ); txt.sprintf( " Buffer Length %d", con_str_out_max ); odbctest -> out_win -> insertLineLimited( txt ); if ( strlen_valid -> isOn()) { ptr_con_str_out = NULL; txt.sprintf( " StringLengthPtr: NULL_POINTER" ); } else { ptr_con_str_out = &con_str_out; txt.sprintf( " StringLengthPtr: %p", ptr_con_str_out ); } odbctest -> out_win -> insertLineLimited( txt ); con_str_out = -9999; index = driver_completion -> currentItem(); dc_type = dc_options[ index ].attr; txt.sprintf( " Driver Complete: %s=%d (%s)", dc_options[ index ].text, dc_options[ index ].attr, dc_options[ index ].version ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLDriverConnect( in_handle, NULL, conn_str_in, in_string_len, out_string, con_str_out_max, ptr_con_str_out, dc_type ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { if ( out_string ) { txt.sprintf( " OutConnectionString: %s", out_string ); odbctest -> out_win -> insertLineLimited( txt ); } if ( ptr_con_str_out ) { if ( con_str_out == -9999 ) { txt.sprintf( " *StrLenPtr: " ); } else { txt.sprintf( " *StrLenPtr: %d", con_str_out ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); } dDriverConnect::dDriverConnect( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); in_str = new QComboBox( TRUE, this, "InStr" ); in_str -> setGeometry( 130, 50, 300, 20 ); l_in_str = new QLabel( "InConnectionString:", this ); l_in_str -> setGeometry( 10, 50, 90, 20 ); in_str -> insertItem( "", 0 ); in_str -> insertItem( "", 1 ); str_len = new QComboBox( TRUE, this, "StrLen" ); str_len -> setGeometry( 130, 80, 150, 20 ); l_str_len = new QLabel( "StringLength1:", this ); l_str_len -> setGeometry( 10, 80, 90, 20 ); str_len -> insertItem( "SQL_NTS=-3", 0 ); str_len -> insertItem( "0", 1 ); out_str_valid = new QCheckBox( "OutConnectionString: VALID", this ); out_str_valid -> setGeometry( 10, 110, 300, 15 ); strlen_valid = new QCheckBox( "StrLenPtr: VALID", this ); strlen_valid -> setGeometry( 10, 140, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 400, 80, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Len:", this ); l_buffer_len -> setGeometry( 320, 80, 60, 20 ); driver_completion = new QComboBox( FALSE, this, "driver_completion" ); driver_completion -> setGeometry( 100, 170, 300, 20 ); parent->fill_list_box( dc_options, driver_completion ); l_driver_completion = new QLabel( "Driver Completion:", this ); l_driver_completion -> setGeometry( 10, 170, 80, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( out_str_valid, SIGNAL( clicked()), this, SLOT( out_str_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); } dDriverConnect::~dDriverConnect() { delete ok; delete cancel; delete help; delete handles; delete in_str; delete str_len; delete l_handle; delete l_in_str; delete l_str_len; delete out_str_valid; delete strlen_valid; delete buffer_len; delete l_buffer_len; delete driver_completion; delete l_driver_completion; } void dBrowseConnect::out_str_clkd() { if ( out_str_valid -> isOn() ) out_str_valid -> setText( "OutConnectionString: SQL_NULL_POINTER" ); else out_str_valid -> setText( "OutConnectionString: VALID" ); } void dBrowseConnect::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "StrLenPtr: SQL_NULL_POINTER" ); else strlen_valid -> setText( "StrLenPtr: VALID" ); } void dBrowseConnect::Ok() { const char *in_string, *string_len; SQLCHAR *conn_str_in; SQLCHAR *out_string; SQLINTEGER in_string_len, con_str_out_max; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); SQLHANDLE in_handle; SQLSMALLINT con_str_out, *ptr_con_str_out; QString qstring_len, qin_string; if ( hand ) in_handle = hand -> getHandle(); qstring_len = str_len -> currentText(); string_len = qstring_len.ascii(); odbctest -> out_win -> insertLineLimited( "SQLBrowseConnect():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Connection Handle: %p", in_handle ); else txt.sprintf( " Connection Handle: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); qin_string = in_str -> currentText(); in_string = qin_string.ascii(); if ( strcmp( in_string, "" ) == 0 ) { conn_str_in = NULL; odbctest -> out_win -> insertLineLimited( " InConnectionString: " ); } else if ( strcmp( in_string, "" ) == 0 ) { conn_str_in = ( SQLCHAR * ) ""; odbctest -> out_win -> insertLineLimited( " InConnectionString: " ); } else { txt.sprintf( " InConnectionString: %s", in_string ); conn_str_in = ( SQLCHAR * ) in_string; odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( string_len, "SQL_NTS", 7 ) == 0 ) { in_string_len = SQL_NTS; txt.sprintf( " StringLength1: SQL_NTS=-3" ); } else { in_string_len = atoi( string_len ); txt.sprintf( " StringLength1: %d", in_string_len ); } odbctest -> out_win -> insertLineLimited( txt ); con_str_out_max = atoi( buffer_len -> text()); if ( out_str_valid -> isOn()) { out_string = ( SQLCHAR * ) NULL; } else if ( con_str_out_max < 300 ) { out_string = new SQLCHAR[ 300 ]; } else { out_string = new SQLCHAR[ con_str_out_max ]; } if ( out_string ) { txt.sprintf( " OutConnectionString: %p", out_string ); } else { txt.sprintf( " OutConnectionString: NULL_POINTER" ); } odbctest -> out_win -> insertLineLimited( txt ); txt.sprintf( " Buffer Length %d", con_str_out_max ); odbctest -> out_win -> insertLineLimited( txt ); if ( strlen_valid -> isOn()) { ptr_con_str_out = NULL; txt.sprintf( " StringLengthPtr: NULL_POINTER" ); } else { ptr_con_str_out = &con_str_out; txt.sprintf( " StringLengthPtr: %p", ptr_con_str_out ); } odbctest -> out_win -> insertLineLimited( txt ); con_str_out = -9999; SQLRETURN ret = SQLBrowseConnect( in_handle, conn_str_in, in_string_len, out_string, con_str_out_max, ptr_con_str_out ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret ) || (SQL_NEED_DATA == ret)) { if ( out_string ) { txt.sprintf( " OutConnectionString: %s", out_string ); odbctest -> out_win -> insertLineLimited( txt ); } if ( ptr_con_str_out ) { if ( con_str_out == -9999 ) { txt.sprintf( " *StrLenPtr: " ); } else { txt.sprintf( " *StrLenPtr: %d", con_str_out ); } odbctest -> out_win -> insertLineLimited( txt ); } } if ( out_string ) { delete out_string; } odbctest -> out_win -> insertLineLimited( "" ); } dBrowseConnect::dBrowseConnect( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); in_str = new QComboBox( TRUE, this, "InStr" ); in_str -> setGeometry( 130, 50, 300, 20 ); l_in_str = new QLabel( "InConnectionString:", this ); l_in_str -> setGeometry( 10, 50, 90, 20 ); in_str -> insertItem( "", 0 ); in_str -> insertItem( "", 1 ); str_len = new QComboBox( TRUE, this, "StrLen" ); str_len -> setGeometry( 130, 80, 150, 20 ); l_str_len = new QLabel( "StringLength1:", this ); l_str_len -> setGeometry( 10, 80, 90, 20 ); str_len -> insertItem( "SQL_NTS=-3", 0 ); str_len -> insertItem( "0", 1 ); out_str_valid = new QCheckBox( "OutConnectionString: VALID", this ); out_str_valid -> setGeometry( 10, 110, 300, 15 ); strlen_valid = new QCheckBox( "StrLenPtr: VALID", this ); strlen_valid -> setGeometry( 10, 140, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 400, 80, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Len:", this ); l_buffer_len -> setGeometry( 320, 80, 60, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( out_str_valid, SIGNAL( clicked()), this, SLOT( out_str_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); } dBrowseConnect::~dBrowseConnect() { delete ok; delete cancel; delete help; delete handles; delete in_str; delete str_len; delete l_handle; delete l_in_str; delete l_str_len; delete out_str_valid; delete strlen_valid; delete buffer_len; delete l_buffer_len; } void dConnect::Ok() { const char *dsn, *usr, *pwd, *ldsn, *lusr, *lpwd; QString qdsn, qusr, qpwd, qldsn, qlusr, qlpwd; int dsn_len, usr_len, pwd_len; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); SQLHANDLE in_handle; if ( hand ) in_handle = hand -> getHandle(); qdsn = server -> currentText(); qusr = user -> currentText(); qpwd = auth -> currentText(); qldsn = server_len -> currentText(); qlusr = user_len -> currentText(); qlpwd = auth_len -> currentText(); dsn = qdsn.ascii(); usr = qusr.ascii(); pwd = qpwd.ascii(); ldsn = qldsn.ascii(); lusr = qlusr.ascii(); lpwd = qlpwd.ascii(); odbctest -> out_win -> insertLineLimited( "SQLConnect():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Connection Handle: %p", in_handle ); else txt.sprintf( " Connection Handle: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( dsn, "" ) == 0 ) { dsn = NULL; odbctest -> out_win -> insertLineLimited( " Server: " ); } else if ( strcmp( dsn, "" ) == 0 ) { dsn = ""; odbctest -> out_win -> insertLineLimited( " Server: " ); } else { txt.sprintf( " Server: %s", dsn ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ldsn, "SQL_NTS", 7 ) == 0 ) { dsn_len = SQL_NTS; txt.sprintf( " Server Len: SQL_NTS=-3" ); } else { dsn_len = atoi( ldsn ); txt.sprintf( " Server Len: %d", dsn_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( usr, "" ) == 0 ) { usr = NULL; odbctest -> out_win -> insertLineLimited( " User: " ); } else if ( strcmp( usr, "" ) == 0 ) { usr = ""; odbctest -> out_win -> insertLineLimited( " User: " ); } else { txt.sprintf( " User: %s", usr ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lusr, "SQL_NTS", 7 ) == 0 ) { usr_len = SQL_NTS; txt.sprintf( " User Len: SQL_NTS=-3" ); } else { usr_len = atoi( lusr ); txt.sprintf( " User Len: %d", usr_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( pwd, "" ) == 0 ) { pwd = NULL; odbctest -> out_win -> insertLineLimited( " Auth: " ); } else if ( strcmp( pwd, "" ) == 0 ) { pwd = ""; odbctest -> out_win -> insertLineLimited( " Auth: " ); } else { txt.sprintf( " Auth: %s", usr ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lpwd, "SQL_NTS", 7 ) == 0 ) { pwd_len = SQL_NTS; txt.sprintf( " Auth Len: SQL_NTS=-3" ); } else { pwd_len = atoi( lpwd ); txt.sprintf( " Auth Len: %d", pwd_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLConnect( in_handle, (SQLCHAR*)dsn, dsn_len, (SQLCHAR*)usr, usr_len, (SQLCHAR*)pwd, pwd_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dConnect::dConnect( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); server = new QComboBox( TRUE, this, "server" ); server -> setGeometry( 100, 50, 150, 20 ); l_server = new QLabel( "Server:", this ); l_server -> setGeometry( 10, 50, 90, 20 ); server -> insertItem( "", 0 ); server -> insertItem( "", 1 ); /* * find a env handle */ SQLHANDLE henv = SQL_NULL_HANDLE; Handle *hand; for ( hand=parent->listHandle.first(); hand != 0; hand=parent->listHandle.next() ) { if ( hand->getType() == SQL_HANDLE_ENV ) { henv = hand->getHandle(); } } if ( henv ) { SQLRETURN ret; SQLCHAR dsn[ 128 ]; int index = 2; ret = SQLDataSources( henv, SQL_FETCH_FIRST, dsn, sizeof( dsn ), NULL, NULL, 0, NULL ); while ( SQL_SUCCEEDED( ret )) { server -> insertItem(( char * ) dsn, index ++ ); ret = SQLDataSources( henv, SQL_FETCH_NEXT, dsn, sizeof( dsn ), NULL, NULL, 0, NULL ); } } user = new QComboBox( TRUE, this, "user" ); user -> setGeometry( 100, 80, 150, 20 ); l_user = new QLabel( "User:", this ); l_user -> setGeometry( 10, 80, 90, 20 ); user -> insertItem( "", 0 ); user -> insertItem( "", 1 ); auth = new QComboBox( TRUE, this, "auth" ); auth -> setGeometry( 100, 110, 150, 20 ); l_auth = new QLabel( "Authentication:", this ); l_auth -> setGeometry( 10, 110, 90, 20 ); auth -> insertItem( "", 0 ); auth -> insertItem( "", 1 ); server_len = new QComboBox( TRUE, this, "server len" ); server_len -> setGeometry( 370, 50, 150, 20 ); l_server_len = new QLabel( "String Length:", this ); l_server_len -> setGeometry( 280, 50, 90, 20 ); server_len -> insertItem( "SQL_NTS=-3", 0 ); server_len -> insertItem( "0", 1 ); user_len = new QComboBox( TRUE, this, "user len" ); user_len -> setGeometry( 370, 80, 150, 20 ); l_user_len = new QLabel( "String Length:", this ); l_user_len -> setGeometry( 280, 80, 90, 20 ); user_len -> insertItem( "SQL_NTS=-3", 0 ); user_len -> insertItem( "0", 1 ); auth_len = new QComboBox( TRUE, this, "auth len" ); auth_len -> setGeometry( 370, 110, 150, 20 ); l_auth_len = new QLabel( "String Length:", this ); l_auth_len -> setGeometry( 280, 110, 90, 20 ); auth_len -> insertItem( "SQL_NTS=-3", 0 ); auth_len -> insertItem( "0", 1 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dConnect::~dConnect() { delete ok; delete cancel; delete help; delete handles; delete server; delete server_len; delete user; delete user_len; delete auth; delete auth_len; delete l_handle; delete l_server; delete l_server_len; delete l_user; delete l_user_len; delete l_auth; delete l_auth_len; } void dDisconnect::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); SQLHANDLE in_handle; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLDisconnect():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Connection Handle: %p", in_handle ); else txt.sprintf( " Connection Handle: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLDisconnect( in_handle ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dDisconnect::dDisconnect( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 110,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 190,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 270,10, 70,25 ); handles = new QComboBox( FALSE, this, "Connection Handle" ); handles -> setGeometry( 140, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); l_handle = new QLabel( "Connection Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dDisconnect::~dDisconnect() { delete ok; delete cancel; delete help; delete handles; delete l_handle; } void dFullConnect::set_dsn( const QString & s ) { dsn -> setText( s ); } void dFullConnect::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_ENV, handles ); SQLINTEGER odbc_ver, odbc_cur; SQLHANDLE henv, hdbc, hstmt; SQLRETURN ret; henv = SQL_NULL_HENV; /* * do we need to allocate a env handle ? */ if ( !hand ) { ret = SQLAllocHandle( SQL_HANDLE_ENV, SQL_NULL_HENV, &henv ); if ( !SQL_SUCCEEDED( ret )) { odbctest->out_win->insertLineLimited( "SQLAllocHandle( SQL_HANDLE_ENV ) failed" ); return; } /* * set the odbc version */ if ( ver_2 -> isOn() ) odbc_ver = SQL_OV_ODBC2; else if ( ver_3 -> isOn() ) odbc_ver = SQL_OV_ODBC3; else odbc_ver = SQL_OV_ODBC3; ret = SQLSetEnvAttr( henv, SQL_ATTR_ODBC_VERSION, ( SQLPOINTER ) odbc_ver, 0 ); odbctest->dumpError( SQL_HANDLE_ENV, henv ); if ( !SQL_SUCCEEDED( ret )) { odbctest->out_win->insertLineLimited( "SQLSetEnvAttr( SQL_ATTR_ODBC_VERSION ) failed" ); return; } } else { henv = hand->getHandle(); } /* * allocate a dbc handle */ ret = SQLAllocHandle( SQL_HANDLE_DBC, henv, &hdbc ); odbctest->dumpError( SQL_HANDLE_ENV, henv ); if ( !SQL_SUCCEEDED( ret )) { odbctest->out_win->insertLineLimited( "SQLAllocHandle( SQL_HANDLE_DBC ) failed" ); if ( !hand ) { SQLFreeHandle( SQL_HANDLE_ENV, henv ); } return; } /* * set the cursor lib setting */ if ( cur_ifneeded -> isOn() ) odbc_cur = SQL_CUR_USE_IF_NEEDED; else if ( cur_use -> isOn() ) odbc_cur = SQL_CUR_USE_ODBC; else if ( cur_driver -> isOn() ) odbc_cur = SQL_CUR_USE_DRIVER; else odbc_cur = SQL_CUR_DEFAULT; ret = SQLSetConnectAttr( hdbc, SQL_ODBC_CURSORS, ( SQLPOINTER ) odbc_cur, 0 ); odbctest->dumpError( SQL_HANDLE_DBC, hdbc ); if ( !SQL_SUCCEEDED( ret )) { odbctest->out_win->insertLineLimited( "SQLSetConnectAttr( SQL_ODBC_CURSORS ) failed" ); SQLFreeHandle( SQL_HANDLE_DBC, hdbc ); if ( !hand ) { SQLFreeHandle( SQL_HANDLE_ENV, henv ); } return; } /* * connect */ char cstr[ 1024 ], tmp[ 1024 ]; QString qdsn = dsn -> text(); QString quid = usr -> text(); QString qpwd = pwd -> text(); cstr[ 0 ] = '\0'; if ( qdsn.isEmpty()) strcpy( tmp, "DSN=" ); else if ( qdsn.isNull()) strcpy( tmp, "" ); else sprintf( tmp, "DSN=%s", qdsn.ascii()); strcpy( cstr, tmp ); if ( quid.isEmpty()) strcpy( tmp, "UID=" ); else if ( quid.isNull()) strcpy( tmp, "" ); else sprintf( tmp, "UID=%s", quid.ascii()); if ( strlen( tmp ) > 0 ) { if ( strlen( cstr ) > 0 ) { strcat( cstr, ";" ); strcat( cstr, tmp ); } else { strcpy( cstr, tmp ); } } if ( qpwd.isEmpty()) strcpy( tmp, "PWD=" ); else if ( qpwd.isNull()) strcpy( tmp, "" ); else sprintf( tmp, "PWD=%s", qpwd.ascii()); if ( strlen( tmp ) > 0 ) { if ( strlen( cstr ) > 0 ) { strcat( cstr, ";" ); strcat( cstr, tmp ); } else { strcpy( cstr, tmp ); } } ret = SQLDriverConnect( hdbc, (void*)1, (SQLCHAR*)cstr, strlen( cstr ), NULL, 0, NULL, SQL_DRIVER_COMPLETE ); odbctest->dumpError( SQL_HANDLE_DBC, hdbc ); if ( !SQL_SUCCEEDED( ret )) { odbctest->out_win->insertLineLimited( "SQLConnect() failed" ); SQLFreeHandle( SQL_HANDLE_DBC, hdbc ); if ( !hand ) { SQLFreeHandle( SQL_HANDLE_ENV, henv ); } return; } /* * allocate a statement handle */ ret = SQLAllocHandle( SQL_HANDLE_STMT, hdbc, &hstmt ); odbctest->dumpError( SQL_HANDLE_DBC, hdbc ); if ( !SQL_SUCCEEDED( ret )) { odbctest->out_win->insertLineLimited( "SQLAllocHandle( SQL_HANDLE_STMT ) failed" ); SQLDisconnect( hdbc ); SQLFreeHandle( SQL_HANDLE_DBC, hdbc ); if ( !hand ) { SQLFreeHandle( SQL_HANDLE_ENV, henv ); } return; } /* * all done, record the handles */ if ( !hand ) { odbctest->listHandle.append( new Handle( SQL_HANDLE_ENV, henv )); } odbctest->listHandle.append( new Handle( SQL_HANDLE_DBC, hdbc )); odbctest->listHandle.append( new Handle( SQL_HANDLE_STMT, hstmt, odbctest->listHandle )); odbctest->out_win->insertLineLimited( "Full Connect Succeeded\n" ); } dFullConnect::dFullConnect( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 110,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 190,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 270,10, 70,25 ); handles = new QComboBox( FALSE, this, "Environment Handle" ); handles -> setGeometry( 140, 50, 200, 20 ); Handle * hand = odbctest->fill_handle_list( SQL_HANDLE_ENV, handles ); l_handle = new QLabel( "Envronment Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); dsn = new QLineEdit( this, "DSN" ); dsn -> setGeometry( 80, 85, 120, 20 ); l_dsn = new QLabel( "DSN:", this ); l_dsn -> setGeometry( 10, 85, 60, 20 ); #ifdef QT_V4LAYOUT dsn_list = new Q3ListBox( this, "DSN List" ); #else dsn_list = new QListBox( this, "DSN List" ); #endif dsn_list -> setGeometry( 80, 106, 120, 100 ); /* * find a env handle, hand is set above */ SQLHANDLE henv; SQLRETURN ret; SQLCHAR dsn_txt[ 128 ]; /* * allocate a handle if required */ if ( !hand ) { ret = SQLAllocEnv( &henv ); if ( !SQL_SUCCEEDED( ret )) { parent -> out_win -> insertLineLimited( "SQLAllocHandle fails allocating a environment handle" ); return; } } else { henv = hand -> getHandle(); } ret = SQLDataSources( henv, SQL_FETCH_FIRST, dsn_txt, sizeof( dsn_txt ), NULL, NULL, 0, NULL ); while ( SQL_SUCCEEDED( ret )) { dsn_list -> insertItem(( char * ) dsn_txt ); ret = SQLDataSources( henv, SQL_FETCH_NEXT, dsn_txt, sizeof( dsn_txt ), NULL, NULL, 0, NULL ); } /* * remove the temp henv */ if ( !hand ) { SQLFreeEnv( henv ); } usr = new QLineEdit( this, "usr" ); usr -> setGeometry( 80, 215, 120, 20 ); usr -> setMaxLength( 32 ); l_usr = new QLabel( "User:", this ); l_usr -> setGeometry( 10, 215, 60, 20 ); pwd = new QLineEdit( this, "pwd" ); pwd -> setGeometry( 80, 245, 120, 20 ); pwd -> setEchoMode( QLineEdit::Password ); pwd -> setMaxLength( 32 ); l_pwd = new QLabel( "Password:", this ); l_pwd -> setGeometry( 10, 245, 60, 20 ); #ifdef QT_V4LAYOUT version = new Q3ButtonGroup( "ODBC Version", this ); #else version = new QButtonGroup( "ODBC Version", this ); #endif version -> setGeometry( 220, 80, 120, 100 ); ver_2 = new QRadioButton( "ODBC 2", version ); ver_2 -> setGeometry( 10, 20, 100, 20 ); ver_3 = new QRadioButton( "ODBC 3", version ); ver_3 -> setGeometry( 10, 45, 100, 20 ); ver_def = new QRadioButton( "Default", version ); ver_def -> setGeometry( 10, 70, 100, 20 ); ver_def -> setChecked( TRUE ); #ifdef QT_V4LAYOUT cursor = new Q3ButtonGroup( "ODBC Cursors", this ); #else cursor = new QButtonGroup( "ODBC Cursors", this ); #endif cursor -> setGeometry( 220, 180, 120, 130 ); cur_ifneeded = new QRadioButton( "Use If Needed", cursor ); cur_ifneeded -> setGeometry( 10, 20, 100, 20 ); cur_use = new QRadioButton( "Use ODBC", cursor ); cur_use -> setGeometry( 10, 45, 100, 20 ); cur_driver = new QRadioButton( "Use Driver", cursor ); cur_driver -> setGeometry( 10, 70, 100, 20 ); cur_default = new QRadioButton( "Default", cursor ); cur_default -> setGeometry( 10, 95, 100, 20 ); cur_default -> setChecked( TRUE ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( dsn_list, SIGNAL(selected(const QString &)), SLOT(set_dsn( const QString &))); } dFullConnect::~dFullConnect() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete dsn; delete l_dsn; delete dsn_list; delete usr; delete l_usr; delete pwd; delete l_pwd; delete ver_2; delete ver_3; delete ver_def; delete version; delete cur_ifneeded; delete cur_use; delete cur_driver; delete cur_default; delete cursor; } void dGetInfo::target_clkd() { if ( target_valid -> isOn() ) target_valid -> setText( "InfoValuePtr: SQL_NULL_POINTER" ); else target_valid -> setText( "InfoValuePtr: VALID" ); } void dGetInfo::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "StrLenPtr: SQL_NULL_POINTER" ); else strlen_valid -> setText( "StrLenPtr: VALID" ); } void dGetInfo::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); int index; SQLHANDLE in_handle; SQLINTEGER b_len, info_type; SQLSMALLINT strlen, *strlen_ptr; char *buf = NULL; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetInfo():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Connection Handle: %p", in_handle ); else txt.sprintf( " Connection Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); index = type -> currentItem(); info_type = info_options[ index ].attr; txt.sprintf( " Info Type: %s=%d (%s)", info_options[ index ].text, info_options[ index ].attr, info_options[ index ].version ); odbctest -> out_win -> insertLineLimited( txt ); b_len = atoi( buffer_len -> text().ascii()); if ( b_len < 1 ) { b_len = 0; } if ( target_valid -> isOn()) { buf = NULL; } else if ( b_len < 300 ) { buf = new char[ 300 ]; } else { buf = new char[ b_len ]; } if ( buf ) { txt.sprintf( " Info Value Ptr: %p", buf ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Info Value Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } txt.sprintf( " Buffer Length: %d", b_len ); odbctest -> out_win -> insertLineLimited( txt ); strlen = -9999; if ( strlen_valid -> isOn()) { strlen_ptr = NULL; } else { strlen_ptr = &strlen; } if ( strlen_ptr ) { txt.sprintf( " Strlen Ptr: %p", strlen_ptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Strlen Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } SQLRETURN ret = SQLGetInfo( in_handle, info_type, buf, b_len, strlen_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( strlen_ptr ) { if ( strlen == -9999 ) { txt.sprintf( " *Strlen Ptr: " ); } else { txt.sprintf( " *Strlen Ptr: %d", strlen ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( SQL_SUCCEEDED( ret )) { switch( info_options[ index ].data_type ) { case SQL_CHAR: txt.sprintf( " *InfoValuePtr = \"%s\"", buf ); odbctest -> out_win -> insertLineLimited( txt ); break; case SQL_INTEGER: SQLUINTEGER ival; memcpy( &ival, buf, sizeof( ival )); txt.sprintf( " *InfoValuePtr = %d (0x%08X)", ival, ival ); odbctest -> out_win -> insertLineLimited( txt ); if ( info_options[ index ].values[ 0 ].text ) { if ( info_options[ index ].is_bitmap ) { int i; for ( i = 0; info_options[ index ].values[ i ].text; i ++ ) { if ( info_options[ index ].values[ i ].value & ival ) { txt.sprintf( " %s", info_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } else { int i; for ( i = 0; info_options[ index ].values[ i ].text; i ++ ) { if ( info_options[ index ].values[ i ].value == ival ) { txt.sprintf( " %s", info_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } } break; case SQL_SMALLINT: SQLSMALLINT sval; memcpy( &sval, buf, sizeof( sval )); txt.sprintf( " *InfoValuePtr = %d (0x%04X)", sval, sval ); odbctest -> out_win -> insertLineLimited( txt ); if ( info_options[ index ].values[ 0 ].text ) { if ( info_options[ index ].is_bitmap ) { int i; for ( i = 0; info_options[ index ].values[ i ].text; i ++ ) { if ( info_options[ index ].values[ i ].value & sval ) { txt.sprintf( " %s", info_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } else { int i; for ( i = 0; info_options[ index ].values[ i ].text; i ++ ) { if ( info_options[ index ].values[ i ].value == sval ) { txt.sprintf( " %s", info_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } } break; } } if ( buf ) delete buf; odbctest -> out_win -> insertLineLimited( "" ); } dGetInfo::dGetInfo( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Connection Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); l_handle = new QLabel( "Connection Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); type = new QComboBox( FALSE, this, "Info Type" ); type -> setGeometry( 130, 80, 340, 20 ); parent->fill_list_box( info_options, type ); l_type = new QLabel( "Info Type:", this ); l_type -> setGeometry( 10, 80, 120, 20 ); target_valid = new QCheckBox( "InfoValuePtr: VALID", this ); target_valid -> setGeometry( 10, 110, 300, 15 ); strlen_valid = new QCheckBox( "StrLenPtr: VALID", this ); strlen_valid -> setGeometry( 10, 140, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 400, 110, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Len:", this ); l_buffer_len -> setGeometry( 320, 110, 60, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( target_valid, SIGNAL( clicked()), this, SLOT( target_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); } dGetInfo::~dGetInfo() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete type; delete l_type; delete target_valid; delete strlen_valid; delete buffer_len; delete l_buffer_len; } void dGetFunctions::target_clkd() { if ( target_valid -> isOn() ) target_valid -> setText( "SupportedPtr: SQL_NULL_POINTER" ); else target_valid -> setText( "SupportedPtr: VALID" ); } void dGetFunctions::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); int index; SQLHANDLE in_handle; SQLINTEGER func_type; SQLUSMALLINT single_value, odbc_3_all[ SQL_API_ODBC3_ALL_FUNCTIONS ], odbc_2_all[ 100 ]; SQLUSMALLINT *supported_ptr; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetFunctions():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Connection Handle: %p", in_handle ); else txt.sprintf( " Connection Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); index = type -> currentItem(); func_type = gf_options[ index ].attr; txt.sprintf( " FunctionId: %s=%d (%s)", gf_options[ index ].text, gf_options[ index ].attr, gf_options[ index ].version ); odbctest -> out_win -> insertLineLimited( txt ); if ( target_valid -> isOn()) { supported_ptr = NULL; } else { if ( func_type == SQL_API_ODBC3_ALL_FUNCTIONS ) { supported_ptr = odbc_3_all; } else if ( func_type == SQL_API_ALL_FUNCTIONS ) { supported_ptr = odbc_2_all; } else { supported_ptr = &single_value; } } if ( supported_ptr ) { txt.sprintf( " Supported Ptr: %p", supported_ptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Supported Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } SQLRETURN ret = SQLGetFunctions( in_handle, func_type, supported_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { if ( func_type == SQL_API_ODBC3_ALL_FUNCTIONS ) { odbctest -> out_win -> insertLineLimited( " Out:" ); for ( int i = 0; gf_options[ i ].text; i ++ ) { if ( gf_options[ i ].attr == SQL_API_ODBC3_ALL_FUNCTIONS || gf_options[ i ].attr == SQL_API_ALL_FUNCTIONS ) { continue; } if ( SQL_FUNC_EXISTS( odbc_3_all, gf_options[ i ].attr )) { txt.sprintf( " %s=%d SQL_TRUE", gf_options[ i ].text, gf_options[ i ].attr ); } else { txt.sprintf( " %s=%d SQL_FALSE", gf_options[ i ].text, gf_options[ i ].attr ); } odbctest -> out_win -> insertLineLimited( txt ); } } else if ( func_type == SQL_API_ALL_FUNCTIONS ) { odbctest -> out_win -> insertLineLimited( " Out:" ); for ( int i = 0; gf_options[ i ].text; i ++ ) { if ( gf_options[ i ].attr > 99 || gf_options[ i ].attr == SQL_API_ALL_FUNCTIONS ) { continue; } if ( odbc_2_all[ gf_options[ i ].attr ] ) { txt.sprintf( " %s=%d SQL_TRUE", gf_options[ i ].text, gf_options[ i ].attr ); } else { txt.sprintf( " %s=%d SQL_FALSE", gf_options[ index ].text, gf_options[ index ].attr ); } odbctest -> out_win -> insertLineLimited( txt ); } } else { odbctest -> out_win -> insertLineLimited( " Out:" ); if ( single_value ) { txt.sprintf( " *SupportedPtr: = SQL_TRUE" ); } else { txt.sprintf( " *SupportedPtr: = SQL_FALSE" ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); } dGetFunctions::dGetFunctions( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Connection Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); l_handle = new QLabel( "Connection Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); type = new QComboBox( FALSE, this, "FunctionId:" ); type -> setGeometry( 130, 80, 340, 20 ); parent->fill_list_box( gf_options, type ); l_type = new QLabel( "FunctionId:", this ); l_type -> setGeometry( 10, 80, 120, 20 ); target_valid = new QCheckBox( "SupportedPtr: VALID", this ); target_valid -> setGeometry( 10, 110, 300, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( target_valid, SIGNAL( clicked()), this, SLOT( target_clkd())); } dGetFunctions::~dGetFunctions() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete type; delete l_type; delete target_valid; } void dNativeSQL::out_str_clkd() { if ( out_str_valid -> isOn() ) out_str_valid -> setText( "OutStatementText: SQL_NULL_POINTER" ); else out_str_valid -> setText( "OutStatementText: VALID" ); } void dNativeSQL::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "TextLength2Ptr: SQL_NULL_POINTER" ); else strlen_valid -> setText( "TextLength2Ptr2: VALID" ); } void dNativeSQL::Ok() { const char *in_string, *string_len; SQLCHAR *conn_str_in; SQLCHAR *out_string; SQLINTEGER in_string_len, con_str_out_max; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); SQLHANDLE in_handle; SQLINTEGER con_str_out, *ptr_con_str_out; QString qstring_len, qin_string; if ( hand ) in_handle = hand -> getHandle(); qstring_len = str_len -> currentText(); string_len = qstring_len.ascii(); odbctest -> out_win -> insertLineLimited( "SQLNativeSql():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Connection Handle: %p", in_handle ); else txt.sprintf( " Connection Handle: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); qin_string = in_str -> currentText(); in_string = qin_string.ascii(); if ( strcmp( in_string, "" ) == 0 ) { conn_str_in = NULL; odbctest -> out_win -> insertLineLimited( " InStatementTxt: " ); } else if ( strcmp( in_string, "" ) == 0 ) { conn_str_in = ( SQLCHAR * ) ""; odbctest -> out_win -> insertLineLimited( " InStatementTxt: " ); } else if ( strcmp( in_string, "" ) == 0 ) { QString *s = new QString( odbctest->in_win->text()); if ( s -> isEmpty()) in_string = ""; else if ( s -> isNull()) in_string = NULL; else in_string = s->latin1(); txt.sprintf( " InStatementTxt: %s", in_string ); odbctest -> out_win -> insertLineLimited( txt ); conn_str_in = ( SQLCHAR * ) in_string; } else { txt.sprintf( " InStatementTxt: %s", in_string ); conn_str_in = ( SQLCHAR * ) in_string; odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( string_len, "SQL_NTS", 7 ) == 0 ) { in_string_len = SQL_NTS; txt.sprintf( " TextLength1: SQL_NTS=-3" ); } else { in_string_len = atoi( string_len ); txt.sprintf( " TextLength1: %d", in_string_len ); } odbctest -> out_win -> insertLineLimited( txt ); con_str_out_max = atoi( buffer_len -> text()); if ( out_str_valid -> isOn()) { out_string = ( SQLCHAR * ) NULL; } else if ( con_str_out_max < 300 ) { out_string = new SQLCHAR[ 300 ]; } else { out_string = new SQLCHAR[ con_str_out_max ]; } if ( out_string ) { txt.sprintf( " OutStatementText: %p", out_string ); } else { txt.sprintf( " OutStatementText: NULL_POINTER" ); } odbctest -> out_win -> insertLineLimited( txt ); txt.sprintf( " Buffer Length %d", con_str_out_max ); odbctest -> out_win -> insertLineLimited( txt ); if ( strlen_valid -> isOn()) { ptr_con_str_out = NULL; txt.sprintf( " TextLength2Ptr: NULL_POINTER" ); } else { ptr_con_str_out = &con_str_out; txt.sprintf( " TextLength2Ptr: %p", ptr_con_str_out ); } odbctest -> out_win -> insertLineLimited( txt ); con_str_out = -9999; SQLRETURN ret = SQLNativeSql( in_handle, conn_str_in, in_string_len, out_string, con_str_out_max, ptr_con_str_out ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret )) { if ( out_string ) { txt.sprintf( " OutStatementText: %s", out_string ); odbctest -> out_win -> insertLineLimited( txt ); } if ( ptr_con_str_out ) { if ( con_str_out == -9999 ) { txt.sprintf( " *TextLength2Ptr: " ); } else { txt.sprintf( " *TextLength2Ptr: %d", con_str_out ); } odbctest -> out_win -> insertLineLimited( txt ); } } odbctest -> out_win -> insertLineLimited( "" ); } dNativeSQL::dNativeSQL( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); in_str = new QComboBox( TRUE, this, "InStr" ); in_str -> setGeometry( 130, 50, 300, 20 ); l_in_str = new QLabel( "InStatementText:", this ); l_in_str -> setGeometry( 10, 50, 90, 20 ); in_str -> insertItem( "", 0 ); in_str -> insertItem( "", 1 ); in_str -> insertItem( "", 2 ); str_len = new QComboBox( TRUE, this, "StrLen" ); str_len -> setGeometry( 130, 80, 150, 20 ); l_str_len = new QLabel( "TextLength1:", this ); l_str_len -> setGeometry( 10, 80, 90, 20 ); str_len -> insertItem( "SQL_NTS=-3", 0 ); str_len -> insertItem( "0", 1 ); out_str_valid = new QCheckBox( "OutStatementText: VALID", this ); out_str_valid -> setGeometry( 10, 110, 300, 15 ); strlen_valid = new QCheckBox( "TextLength2Ptr: VALID", this ); strlen_valid -> setGeometry( 10, 140, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 400, 80, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Len:", this ); l_buffer_len -> setGeometry( 320, 80, 60, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( out_str_valid, SIGNAL( clicked()), this, SLOT( out_str_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); } dNativeSQL::~dNativeSQL() { delete ok; delete cancel; delete help; delete handles; delete in_str; delete str_len; delete l_handle; delete l_in_str; delete l_str_len; delete out_str_valid; delete strlen_valid; delete buffer_len; delete l_buffer_len; } void dAllocConnect::handle_clkd() { if ( handle_valid -> isOn() ) handle_valid -> setText( "phdbc: SQL_NULL_POINTER" ); else handle_valid -> setText( "phdbc: VALID" ); } void dAllocConnect::Ok() { SQLHDBC hdbc, *hdbc_ptr; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_ENV, handles ); SQLHANDLE in_handle; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLAllocConnect():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Environment Handle: %p", in_handle ); else txt.sprintf( " Environment Handle: SQL_NULL_HENV" ); odbctest -> out_win -> insertLineLimited( txt ); if ( handle_valid -> isOn()) { hdbc_ptr = NULL; txt.sprintf( " phdbc: SQL_NULL_HANDLE" ); } else { hdbc_ptr = &hdbc; txt.sprintf( " phdbc: %p", hdbc_ptr ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLAllocConnect( in_handle, hdbc_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret ) && hdbc_ptr ) { txt.sprintf( " *phdbc: %p", hdbc ); odbctest -> out_win -> insertLineLimited( txt ); odbctest->listHandle.append( new Handle( SQL_HANDLE_DBC, hdbc ) ); } odbctest -> out_win -> insertLineLimited( "" ); } dAllocConnect::dAllocConnect( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 90,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 170,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 250,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_ENV, handles ); l_handles = new QLabel( "Handle:", this ); l_handles -> setGeometry( 10, 50, 80, 20 ); handle_valid = new QCheckBox( "phdbc: VALID", this ); handle_valid -> setGeometry( 10, 80, 300, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( handle_valid, SIGNAL( clicked()), this, SLOT( handle_clkd())); } dAllocConnect::~dAllocConnect() { delete ok; delete cancel; delete help; delete handle_valid; delete handles; delete l_handles; } void dFreeConnect::Ok() { Handle *dbc = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( dbc ) in_handle = dbc -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLFreeConnect():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " hdbc: %p", in_handle ); else txt.sprintf( " hdbc: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLFreeConnect( in_handle ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); if ( SQL_SUCCEEDED( ret ) && in_handle ) { odbctest->listHandle.remove( dbc ); } odbctest -> out_win -> insertLineLimited( "" ); } dFreeConnect::dFreeConnect( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 90,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 170,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 250,10, 70,25 ); handles = new QComboBox( FALSE, this, "hdbc" ); handles -> setGeometry( 120, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); l_handles = new QLabel( "hdbc:", this ); l_handles -> setGeometry( 10, 50, 100, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dFreeConnect::~dFreeConnect() { delete ok; delete cancel; delete help; delete handles; delete l_handles; } void OdbcTest::sqlbrowseconnect() { dBrowseConnect *dlg = new dBrowseConnect( this, "SQLBrowseConnect" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlconnect() { dConnect *dlg = new dConnect( this, "SQLConnect" ); dlg -> exec(); delete dlg; } void OdbcTest::sqldriverconnect() { dDriverConnect *dlg = new dDriverConnect( this, "SQLDriverConnect" ); dlg -> exec(); delete dlg; } void OdbcTest::sqldisconnect() { dDisconnect *dlg = new dDisconnect( this, "SQLDisconnect" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetinfo() { dGetInfo *dlg = new dGetInfo( this, "GetInfo" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetfunctions() { dGetFunctions *dlg = new dGetFunctions( this, "GetFunctions" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlnativesql() { dNativeSQL *dlg = new dNativeSQL( this, "NativeSql" ); dlg -> exec(); delete dlg; } void OdbcTest::fullconnect() { dFullConnect *dlg = new dFullConnect( this, "FullConnect" ); dlg -> exec(); delete dlg; } void OdbcTest::fulldisconnect() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } void OdbcTest::sqlallocconnect() { dAllocConnect *dlg = new dAllocConnect( this, "AllocConnect" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlfreeconnect() { dFreeConnect *dlg = new dFreeConnect( this, "FreeConnect" ); dlg -> exec(); delete dlg; } void OdbcTest::getinfodbc( SQLHANDLE hdbc ) { attr_options *opt = info_options; if ( !hdbc ) { return; } /* * go through each option, and report */ out_win -> insertLineLimited( "SQLGetInfo All" ); while ( opt -> text ) { char buf[ 300 ]; SQLSMALLINT str_len; SQLINTEGER info_type; QString txt; info_type = opt -> attr; SQLRETURN ret = SQLGetInfo( hdbc, info_type, buf, sizeof( buf ), &str_len ); if ( SQL_SUCCEEDED( ret )) { switch( opt -> data_type ) { case SQL_CHAR: txt.sprintf( " %s=%d (%s) = \"%s\"", opt -> text, opt -> attr, opt -> version, buf ); out_win -> insertLineLimited( txt ); break; case SQL_INTEGER: SQLUINTEGER ival; memcpy( &ival, buf, sizeof( ival )); if ( opt -> values[ 0 ].text ) { if ( opt -> is_bitmap ) { int i; txt.sprintf( " %s=%d (%s) = 0x%08x", opt -> text, opt -> attr, opt -> version, ival ); out_win -> insertLineLimited( txt ); for ( i = 0; opt -> values[ i ].text; i ++ ) { if ( opt -> values[ i ].value & ival ) { txt.sprintf( " %s", opt -> values[ i ].text ); out_win -> insertLineLimited( txt ); } } } else { int i; txt.sprintf( " %s=%d (%s) = 0x%08x", opt -> text, opt -> attr, opt -> version, ival ); out_win -> insertLineLimited( txt ); for ( i = 0; opt -> values[ i ].text; i ++ ) { if ( opt -> values[ i ].value == ival ) { txt.sprintf( " %s", opt -> values[ i ].text ); out_win -> insertLineLimited( txt ); } } } } break; case SQL_SMALLINT: SQLSMALLINT sval; memcpy( &sval, buf, sizeof( sval )); if ( opt -> values[ 0 ].text ) { if ( opt -> is_bitmap ) { int i; txt.sprintf( " %s=%d (%s) = 0x%04x", opt -> text, opt -> attr, opt -> version, sval ); out_win -> insertLineLimited( txt ); for ( i = 0; opt -> values[ i ].text; i ++ ) { if ( opt -> values[ i ].value & sval ) { txt.sprintf( " %s", opt -> values[ i ].text ); out_win -> insertLineLimited( txt ); } } } else { int i; txt.sprintf( " %s=%d (%s) = 0x%04x", opt -> text, opt -> attr, opt -> version, sval ); out_win -> insertLineLimited( txt ); for ( i = 0; opt -> values[ i ].text; i ++ ) { if ( opt -> values[ i ].value == sval ) { txt.sprintf( " %s", opt -> values[ i ].text ); out_win -> insertLineLimited( txt ); } } } } break; } } else { txt.sprintf( " %s=%d (%s) Not Supported", opt -> text, opt -> attr, opt -> version ); out_win -> insertLineLimited( txt ); } opt ++; } } void OdbcTest::getinfoall() { /* * look for a connection handle */ Handle *hand; SQLHANDLE hdbc; int handle_count = 0; char txt[ 128 ]; for ( hand=listHandle.first(); hand != 0; hand=listHandle.next() ) { hand->toStr( txt ); if ( hand->getType() == SQL_HANDLE_DBC ) { handle_count ++; hdbc = hand->getHandle(); } } if ( handle_count == 0 ) { QMessageBox::about( this, "Get Info All", "No connection handles avalable" ); } else if ( handle_count == 1 ) { getinfodbc( hdbc ); } else { getinfodbc(); } } void OdbcTest::getfunctionsall() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } unixODBC-2.2.14-p2/odbctest/catalog.cpp0100644000076400007640000024501210564052121016122 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * ********************************************************************** * * $Id: catalog.cpp,v 1.2 2007/02/12 11:49:37 lurcher Exp $ * * $Log: catalog.cpp,v $ * Revision 1.2 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.1.1.1 2001/10/17 16:40:30 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/20 09:42:58 nick * * Replace char[] with QString to avoid buffer overrun * * Revision 1.3 2001/06/04 15:24:49 nick * * Add port to MAC OSX and QT3 changes * * Revision 1.2 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.5 2000/09/04 15:43:59 ngorham * * Fix incorrect call in TablePrivs * * Revision 1.4 2000/06/13 12:30:20 ngorham * * Enough there for the first release I think * * Revision 1.3 2000/06/05 16:53:15 ngorham * * Next lot of updates * * Revision 1.2 2001/05/31 10:26:26 ngorham * * Fix a few minor typo's * * Revision 1.1 2000/05/04 17:04:47 ngorham * * Initial commit * * **********************************************************************/ #include #ifdef QT_V4LAYOUT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include #include #include "catalog.h" #include "odbctest.h" static attr_options get_type_options[] = { { "SQL_ALL_TYPES", SQL_ALL_TYPES, { { NULL } }, "1.0" }, { "SQL_CHAR", SQL_CHAR, { { NULL } }, "1.0" }, { "SQL_VARCHAR", SQL_VARCHAR, { { NULL } }, "1.0" }, { "SQL_LONGVARCHAR", SQL_LONGVARCHAR, { { NULL } }, "1.0" }, { "SQL_DECIMAL", SQL_DECIMAL, { { NULL } }, "1.0" }, { "SQL_NUMERIC", SQL_NUMERIC, { { NULL } }, "1.0" }, { "SQL_SMALLINT", SQL_SMALLINT, { { NULL } }, "1.0" }, { "SQL_INTEGER", SQL_INTEGER, { { NULL } }, "1.0" }, { "SQL_REAL", SQL_REAL, { { NULL } }, "1.0" }, { "SQL_FLOAT", SQL_FLOAT, { { NULL } }, "1.0" }, { "SQL_DOUBLE", SQL_DOUBLE, { { NULL } }, "1.0" }, { "SQL_BIT", SQL_BIT, { { NULL } }, "1.0" }, { "SQL_TINYINT", SQL_TINYINT, { { NULL } }, "1.0" }, { "SQL_BIGINT", SQL_BIGINT, { { NULL } }, "1.0" }, { "SQL_BINARY", SQL_BINARY, { { NULL } }, "1.0" }, { "SQL_VARBINARY", SQL_VARBINARY, { { NULL } }, "1.0" }, { "SQL_LONGVARBINARY", SQL_LONGVARBINARY, { { NULL } }, "1.0" }, { "SQL_TYPE_DATE", SQL_TYPE_DATE, { { NULL } }, "3.0" }, { "SQL_DATE", SQL_DATE, { { NULL } }, "1.0" }, { "SQL_TYPE_TIME", SQL_TYPE_TIME, { { NULL } }, "3.0" }, { "SQL_TIME", SQL_TIME, { { NULL } }, "1.0" }, { "SQL_TYPE_TIMESTAMP", SQL_TYPE_TIMESTAMP, { { NULL } }, "3.0" }, { "SQL_TIMESTAMP", SQL_TIMESTAMP, { { NULL } }, "1.0" }, { "SQL_INTERVAL_MONTH", SQL_INTERVAL_MONTH, { { NULL } }, "3.0" }, { "SQL_INTERVAL_YEAR", SQL_INTERVAL_YEAR, { { NULL } }, "3.0" }, { "SQL_INTERVAL_YEAR_TO_MONTH", SQL_INTERVAL_YEAR_TO_MONTH, { { NULL } }, "3.0" }, { "SQL_INTERVAL_DAY", SQL_INTERVAL_DAY, { { NULL } }, "3.0" }, { "SQL_INTERVAL_HOUR", SQL_INTERVAL_HOUR, { { NULL } }, "3.0" }, { "SQL_INTERVAL_MINUTE", SQL_INTERVAL_MINUTE, { { NULL } }, "3.0" }, { "SQL_INTERVAL_SECOND", SQL_INTERVAL_SECOND, { { NULL } }, "3.0" }, { "SQL_INTERVAL_DAY_TO_HOUR", SQL_INTERVAL_DAY_TO_HOUR, { { NULL } }, "3.0" }, { "SQL_INTERVAL_DAY_TO_MINUTE", SQL_INTERVAL_DAY_TO_MINUTE, { { NULL } }, "3.0" }, { "SQL_INTERVAL_DAY_TO_SECOND", SQL_INTERVAL_DAY_TO_SECOND, { { NULL } }, "3.0" }, { "SQL_INTERVAL_HOUR_TO_MINUTE", SQL_INTERVAL_HOUR_TO_MINUTE, { { NULL } }, "3.0" }, { "SQL_INTERVAL_HOUR_TO_SECOND", SQL_INTERVAL_HOUR_TO_SECOND, { { NULL } }, "3.0" }, { NULL } }; static attr_options unique_options[ 3 ] = { { "SQL_INDEX_UNIQUE", SQL_INDEX_UNIQUE, { { NULL } }, "1.0" }, { "SQL_INDEX_ALL", SQL_INDEX_ALL, { { NULL } }, "1.0" }, { NULL } }; static attr_options reserved_options[ 3 ] = { { "SQL_QUICK", SQL_QUICK, { { NULL } }, "1.0" }, { "SQL_ENSURE", SQL_ENSURE, { { NULL } }, "1.0" }, { NULL } }; static attr_options ident_options[ 3 ] = { { "SQL_BEST_ROWID", SQL_BEST_ROWID, { { NULL } }, "1.0" }, { "SQL_ROWVER", SQL_ROWVER, { { NULL } }, "1.0" }, { NULL } }; static attr_options scope_options[ 4 ] = { { "SQL_SCOPE_CURROW", SQL_SCOPE_CURROW, { { NULL } }, "1.0" }, { "SQL_SCOPE_TRANSACTION", SQL_SCOPE_TRANSACTION, { { NULL } }, "1.0" }, { "SQL_SCOPE_SESSION", SQL_SCOPE_SESSION, { { NULL } }, "1.0" }, { NULL } }; static attr_options null_options[ 3 ] = { { "SQL_NO_NULLS", SQL_NO_NULLS, { { NULL } }, "1.0" }, { "SQL_NULLABLE", SQL_NULLABLE, { { NULL } }, "1.0" }, { NULL } }; void dTables::Ok() { const char *cat, *sch, *tab, *typ; const char *lcat, *lsch, *ltab, *ltyp; QString qcat, qsch, qtab, qtyp; QString qlcat, qlsch, qltab, qltyp; int cat_len, sch_len, tab_len, typ_len; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( hand ) in_handle = hand -> getHandle(); qcat = catalog ->currentText(); qsch = schema ->currentText(); qtab = table ->currentText(); qtyp = type ->currentText(); qlcat = catalog_len ->currentText(); qlsch = schema_len ->currentText(); qltab = table_len ->currentText(); qltyp = type_len ->currentText(); cat = qcat.ascii(); sch = qsch.ascii(); tab = qtab.ascii(); typ = qtyp.ascii(); lcat = qlcat.ascii(); lsch = qlsch.ascii(); ltab = qltab.ascii(); ltyp = qltyp.ascii(); odbctest -> out_win -> insertLineLimited( "SQLTables():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( cat, "" ) == 0 ) { cat = NULL; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else if ( strcmp( cat, "" ) == 0 ) { cat = ""; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else { txt.sprintf( " Catalog: %s", cat ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcat, "SQL_NTS", 7 ) == 0 ) { cat_len = SQL_NTS; txt.sprintf( " Catalog Len: SQL_NTS=-3" ); } else { cat_len = atoi( lcat ); txt.sprintf( " Catalog Len: %d", cat_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sch, "" ) == 0 ) { sch = NULL; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else if ( strcmp( sch, "" ) == 0 ) { sch = ""; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else { txt.sprintf( " Schema: %s", sch ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lsch, "SQL_NTS", 7 ) == 0 ) { sch_len = SQL_NTS; txt.sprintf( " Schema Len: SQL_NTS=-3" ); } else { sch_len = atoi( lsch ); txt.sprintf( " Schema Len: %d", sch_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( tab, "" ) == 0 ) { tab = NULL; odbctest -> out_win -> insertLineLimited( " Table: " ); } else if ( strcmp( tab, "" ) == 0 ) { tab = ""; odbctest -> out_win -> insertLineLimited( " Table: " ); } else { txt.sprintf( " Table: %s", tab ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ltab, "SQL_NTS", 7 ) == 0 ) { tab_len = SQL_NTS; txt.sprintf( " Table Len: SQL_NTS=-3" ); } else { tab_len = atoi( ltab ); txt.sprintf( " Table Len: %d", tab_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( typ, "" ) == 0 ) { typ = NULL; odbctest -> out_win -> insertLineLimited( " Table Type: " ); } else if ( strcmp( typ, "" ) == 0 ) { typ = ""; odbctest -> out_win -> insertLineLimited( " Table Type: " ); } else { txt.sprintf( " Table Type: %s", typ ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ltyp, "SQL_NTS", 7 ) == 0 ) { typ_len = SQL_NTS; txt.sprintf( " Table Type Len: SQL_NTS=-3" ); } else { typ_len = atoi( ltyp ); txt.sprintf( " Table Type Len: %d", typ_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLTables( in_handle, (SQLCHAR*)cat, cat_len, (SQLCHAR*)sch, sch_len, (SQLCHAR*)tab, tab_len, (SQLCHAR*)typ, typ_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dTables::dTables( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); catalog = new QComboBox( TRUE, this, "catalog" ); catalog -> setGeometry( 100, 50, 150, 20 ); l_catalog = new QLabel( "Catalog:", this ); l_catalog -> setGeometry( 10, 50, 90, 20 ); catalog -> insertItem( "", 0 ); catalog -> insertItem( "", 1 ); schema = new QComboBox( TRUE, this, "schema" ); schema -> setGeometry( 100, 80, 150, 20 ); l_schema = new QLabel( "Schema:", this ); l_schema -> setGeometry( 10, 80, 90, 20 ); schema -> insertItem( "", 0 ); schema -> insertItem( "", 1 ); table = new QComboBox( TRUE, this, "table" ); table -> setGeometry( 100, 110, 150, 20 ); l_table = new QLabel( "Table:", this ); l_table -> setGeometry( 10, 110, 90, 20 ); table -> insertItem( "", 0 ); table -> insertItem( "", 1 ); type = new QComboBox( TRUE, this, "table" ); type -> setGeometry( 100, 140, 150, 20 ); l_type = new QLabel( "Table Type:", this ); l_type -> setGeometry( 10, 140, 90, 20 ); type -> insertItem( "", 0 ); type -> insertItem( "", 1 ); catalog_len = new QComboBox( TRUE, this, "catalog len" ); catalog_len -> setGeometry( 370, 50, 150, 20 ); l_catalog_len = new QLabel( "String Length:", this ); l_catalog_len -> setGeometry( 280, 50, 90, 20 ); catalog_len -> insertItem( "SQL_NTS=-3", 0 ); catalog_len -> insertItem( "0", 1 ); schema_len = new QComboBox( TRUE, this, "schema len" ); schema_len -> setGeometry( 370, 80, 150, 20 ); l_schema_len = new QLabel( "String Length:", this ); l_schema_len -> setGeometry( 280, 80, 90, 20 ); schema_len -> insertItem( "SQL_NTS=-3", 0 ); schema_len -> insertItem( "0", 1 ); table_len = new QComboBox( TRUE, this, "table len" ); table_len -> setGeometry( 370, 110, 150, 20 ); l_table_len = new QLabel( "String Length:", this ); l_table_len -> setGeometry( 280, 110, 90, 20 ); table_len -> insertItem( "SQL_NTS=-3", 0 ); table_len -> insertItem( "0", 1 ); type_len = new QComboBox( TRUE, this, "type len" ); type_len -> setGeometry( 370, 140, 150, 20 ); l_type_len = new QLabel( "String Length:", this ); l_type_len -> setGeometry( 280, 140, 90, 20 ); type_len -> insertItem( "SQL_NTS=-3", 0 ); type_len -> insertItem( "0", 1 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dTables::~dTables() { delete ok; delete cancel; delete help; delete handles; delete catalog; delete schema; delete table; delete type; delete l_handle; delete l_catalog; delete l_schema; delete l_table; delete l_type; delete catalog_len; delete schema_len; delete table_len; delete type_len; delete l_catalog_len; delete l_schema_len; delete l_table_len; delete l_type_len; } void dColumns::Ok() { const char *cat, *sch, *tab, *col; const char *lcat, *lsch, *ltab, *lcol; QString qcat, qsch, qtab, qcol; QString qlcat, qlsch, qltab, qlcol; int cat_len, sch_len, tab_len, col_len; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( hand ) in_handle = hand -> getHandle(); qcat = catalog ->currentText(); qsch = schema ->currentText(); qtab = table ->currentText(); qcol = column ->currentText(); qlcat = catalog_len ->currentText(); qlsch = schema_len ->currentText(); qltab = table_len ->currentText(); qlcol = column_len ->currentText(); cat = qcat.ascii(); sch = qsch.ascii(); tab = qtab.ascii(); col = qcol.ascii(); lcat = qlcat.ascii(); lsch = qlsch.ascii(); ltab = qltab.ascii(); lcol = qlcol.ascii(); odbctest -> out_win -> insertLineLimited( "SQLColumns():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( cat, "" ) == 0 ) { cat = NULL; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else if ( strcmp( cat, "" ) == 0 ) { cat = ""; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else { txt.sprintf( " Catalog: %s", cat ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcat, "SQL_NTS", 7 ) == 0 ) { cat_len = SQL_NTS; txt.sprintf( " Catalog Len: SQL_NTS=-3" ); } else { cat_len = atoi( lcat ); txt.sprintf( " Catalog Len: %d", cat_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sch, "" ) == 0 ) { sch = NULL; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else if ( strcmp( sch, "" ) == 0 ) { sch = ""; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else { txt.sprintf( " Schema: %s", sch ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lsch, "SQL_NTS", 7 ) == 0 ) { sch_len = SQL_NTS; txt.sprintf( " Schema Len: SQL_NTS=-3" ); } else { sch_len = atoi( lsch ); txt.sprintf( " Schema Len: %d", sch_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( tab, "" ) == 0 ) { tab = NULL; odbctest -> out_win -> insertLineLimited( " Table: " ); } else if ( strcmp( tab, "" ) == 0 ) { tab = ""; odbctest -> out_win -> insertLineLimited( " Table: " ); } else { txt.sprintf( " Table: %s", tab ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ltab, "SQL_NTS", 7 ) == 0 ) { tab_len = SQL_NTS; txt.sprintf( " Table Len: SQL_NTS=-3" ); } else { tab_len = atoi( ltab ); txt.sprintf( " Table Len: %d", tab_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( col, "" ) == 0 ) { col = NULL; odbctest -> out_win -> insertLineLimited( " Column: " ); } else if ( strcmp( col, "" ) == 0 ) { col = ""; odbctest -> out_win -> insertLineLimited( " Column: " ); } else { txt.sprintf( " Column: %s", col ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcol, "SQL_NTS", 7 ) == 0 ) { col_len = SQL_NTS; txt.sprintf( " Column Len: SQL_NTS=-3" ); } else { col_len = atoi( lcol ); txt.sprintf( " Column Len: %d", col_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLColumns( in_handle, (SQLCHAR*)cat, cat_len, (SQLCHAR*)sch, sch_len, (SQLCHAR*)tab, tab_len, (SQLCHAR*)col, col_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } void dColumnPrivileges::Ok() { const char *cat, *sch, *tab, *col; const char *lcat, *lsch, *ltab, *lcol; QString qcat, qsch, qtab, qcol; QString qlcat, qlsch, qltab, qlcol; int cat_len, sch_len, tab_len, col_len; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( hand ) in_handle = hand -> getHandle(); qcat = catalog ->currentText(); qsch = schema ->currentText(); qtab = table ->currentText(); qcol = column ->currentText(); qlcat = catalog_len ->currentText(); qlsch = schema_len ->currentText(); qltab = table_len ->currentText(); qlcol = column_len ->currentText(); cat = qcat.ascii(); sch = qsch.ascii(); tab = qtab.ascii(); col = qcol.ascii(); lcat = qlcat.ascii(); lsch = qlsch.ascii(); ltab = qltab.ascii(); lcol = qlcol.ascii(); odbctest -> out_win -> insertLineLimited( "SQLColumnPrivileges():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( cat, "" ) == 0 ) { cat = NULL; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else if ( strcmp( cat, "" ) == 0 ) { cat = ""; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else { txt.sprintf( " Catalog: %s", cat ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcat, "SQL_NTS", 7 ) == 0 ) { cat_len = SQL_NTS; txt.sprintf( " Catalog Len: SQL_NTS=-3" ); } else { cat_len = atoi( lcat ); txt.sprintf( " Catalog Len: %d", cat_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sch, "" ) == 0 ) { sch = NULL; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else if ( strcmp( sch, "" ) == 0 ) { sch = ""; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else { txt.sprintf( " Schema: %s", sch ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lsch, "SQL_NTS", 7 ) == 0 ) { sch_len = SQL_NTS; txt.sprintf( " Schema Len: SQL_NTS=-3" ); } else { sch_len = atoi( lsch ); txt.sprintf( " Schema Len: %d", sch_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( tab, "" ) == 0 ) { tab = NULL; odbctest -> out_win -> insertLineLimited( " Table: " ); } else if ( strcmp( tab, "" ) == 0 ) { tab = ""; odbctest -> out_win -> insertLineLimited( " Table: " ); } else { txt.sprintf( " Table: %s", tab ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ltab, "SQL_NTS", 7 ) == 0 ) { tab_len = SQL_NTS; txt.sprintf( " Table Len: SQL_NTS=-3" ); } else { tab_len = atoi( ltab ); txt.sprintf( " Table Len: %d", tab_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( col, "" ) == 0 ) { col = NULL; odbctest -> out_win -> insertLineLimited( " Column: " ); } else if ( strcmp( col, "" ) == 0 ) { col = ""; odbctest -> out_win -> insertLineLimited( " Column: " ); } else { txt.sprintf( " Column: %s", col ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcol, "SQL_NTS", 7 ) == 0 ) { col_len = SQL_NTS; txt.sprintf( " Column Len: SQL_NTS=-3" ); } else { col_len = atoi( lcol ); txt.sprintf( " Column Len: %d", col_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLColumnPrivileges( in_handle, (SQLCHAR*)cat, cat_len, (SQLCHAR*)sch, sch_len, (SQLCHAR*)tab, tab_len, (SQLCHAR*)col, col_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dColumnPrivileges::dColumnPrivileges( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); catalog = new QComboBox( TRUE, this, "catalog" ); catalog -> setGeometry( 100, 50, 150, 20 ); l_catalog = new QLabel( "Catalog:", this ); l_catalog -> setGeometry( 10, 50, 90, 20 ); catalog -> insertItem( "", 0 ); catalog -> insertItem( "", 1 ); schema = new QComboBox( TRUE, this, "schema" ); schema -> setGeometry( 100, 80, 150, 20 ); l_schema = new QLabel( "Schema:", this ); l_schema -> setGeometry( 10, 80, 90, 20 ); schema -> insertItem( "", 0 ); schema -> insertItem( "", 1 ); table = new QComboBox( TRUE, this, "table" ); table -> setGeometry( 100, 110, 150, 20 ); l_table = new QLabel( "Table:", this ); l_table -> setGeometry( 10, 110, 90, 20 ); table -> insertItem( "", 0 ); table -> insertItem( "", 1 ); column = new QComboBox( TRUE, this, "column" ); column -> setGeometry( 100, 140, 150, 20 ); l_column = new QLabel( "Column:", this ); l_column -> setGeometry( 10, 140, 90, 20 ); column -> insertItem( "", 0 ); column -> insertItem( "", 1 ); catalog_len = new QComboBox( TRUE, this, "catalog len" ); catalog_len -> setGeometry( 370, 50, 150, 20 ); l_catalog_len = new QLabel( "String Length:", this ); l_catalog_len -> setGeometry( 280, 50, 90, 20 ); catalog_len -> insertItem( "SQL_NTS=-3", 0 ); catalog_len -> insertItem( "0", 1 ); schema_len = new QComboBox( TRUE, this, "schema len" ); schema_len -> setGeometry( 370, 80, 150, 20 ); l_schema_len = new QLabel( "String Length:", this ); l_schema_len -> setGeometry( 280, 80, 90, 20 ); schema_len -> insertItem( "SQL_NTS=-3", 0 ); schema_len -> insertItem( "0", 1 ); table_len = new QComboBox( TRUE, this, "table len" ); table_len -> setGeometry( 370, 110, 150, 20 ); l_table_len = new QLabel( "String Length:", this ); l_table_len -> setGeometry( 280, 110, 90, 20 ); table_len -> insertItem( "SQL_NTS=-3", 0 ); table_len -> insertItem( "0", 1 ); column_len = new QComboBox( TRUE, this, "column len" ); column_len -> setGeometry( 370, 140, 150, 20 ); l_column_len = new QLabel( "String Length:", this ); l_column_len -> setGeometry( 280, 140, 90, 20 ); column_len -> insertItem( "SQL_NTS=-3", 0 ); column_len -> insertItem( "0", 1 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dColumnPrivileges::~dColumnPrivileges() { delete ok; delete cancel; delete help; delete handles; delete catalog; delete schema; delete table; delete column; delete l_handle; delete l_catalog; delete l_schema; delete l_table; delete l_column; delete catalog_len; delete schema_len; delete table_len; delete column_len; delete l_catalog_len; delete l_schema_len; delete l_table_len; delete l_column_len; } dColumns::dColumns( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); catalog = new QComboBox( TRUE, this, "catalog" ); catalog -> setGeometry( 100, 50, 150, 20 ); l_catalog = new QLabel( "Catalog:", this ); l_catalog -> setGeometry( 10, 50, 90, 20 ); catalog -> insertItem( "", 0 ); catalog -> insertItem( "", 1 ); schema = new QComboBox( TRUE, this, "schema" ); schema -> setGeometry( 100, 80, 150, 20 ); l_schema = new QLabel( "Schema:", this ); l_schema -> setGeometry( 10, 80, 90, 20 ); schema -> insertItem( "", 0 ); schema -> insertItem( "", 1 ); table = new QComboBox( TRUE, this, "table" ); table -> setGeometry( 100, 110, 150, 20 ); l_table = new QLabel( "Table:", this ); l_table -> setGeometry( 10, 110, 90, 20 ); table -> insertItem( "", 0 ); table -> insertItem( "", 1 ); column = new QComboBox( TRUE, this, "column" ); column -> setGeometry( 100, 140, 150, 20 ); l_column = new QLabel( "Column:", this ); l_column -> setGeometry( 10, 140, 90, 20 ); column -> insertItem( "", 0 ); column -> insertItem( "", 1 ); catalog_len = new QComboBox( TRUE, this, "catalog len" ); catalog_len -> setGeometry( 370, 50, 150, 20 ); l_catalog_len = new QLabel( "String Length:", this ); l_catalog_len -> setGeometry( 280, 50, 90, 20 ); catalog_len -> insertItem( "SQL_NTS=-3", 0 ); catalog_len -> insertItem( "0", 1 ); schema_len = new QComboBox( TRUE, this, "schema len" ); schema_len -> setGeometry( 370, 80, 150, 20 ); l_schema_len = new QLabel( "String Length:", this ); l_schema_len -> setGeometry( 280, 80, 90, 20 ); schema_len -> insertItem( "SQL_NTS=-3", 0 ); schema_len -> insertItem( "0", 1 ); table_len = new QComboBox( TRUE, this, "table len" ); table_len -> setGeometry( 370, 110, 150, 20 ); l_table_len = new QLabel( "String Length:", this ); l_table_len -> setGeometry( 280, 110, 90, 20 ); table_len -> insertItem( "SQL_NTS=-3", 0 ); table_len -> insertItem( "0", 1 ); column_len = new QComboBox( TRUE, this, "column len" ); column_len -> setGeometry( 370, 140, 150, 20 ); l_column_len = new QLabel( "String Length:", this ); l_column_len -> setGeometry( 280, 140, 90, 20 ); column_len -> insertItem( "SQL_NTS=-3", 0 ); column_len -> insertItem( "0", 1 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dColumns::~dColumns() { delete ok; delete cancel; delete help; delete handles; delete catalog; delete schema; delete table; delete column; delete l_handle; delete l_catalog; delete l_schema; delete l_table; delete l_column; delete catalog_len; delete schema_len; delete table_len; delete column_len; delete l_catalog_len; delete l_schema_len; delete l_table_len; delete l_column_len; } void dForeignKeys::Ok() { const char *cat, *sch, *tab; const char *fk_cat, *fk_sch, *fk_tab; const char *lcat, *lsch, *ltab; const char *fk_lcat, *fk_lsch, *fk_ltab; QString qcat, qsch, qtab; QString qfk_cat, qfk_sch, qfk_tab; QString qlcat, qlsch, qltab; QString qfk_lcat, qfk_lsch, qfk_ltab; int cat_len, sch_len, tab_len; int fk_cat_len, fk_sch_len, fk_tab_len; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( hand ) in_handle = hand -> getHandle(); qcat = catalog ->currentText(); qsch = schema ->currentText(); qtab = table ->currentText(); qlcat = catalog_len ->currentText(); qlsch = schema_len ->currentText(); qltab = table_len ->currentText(); qfk_cat = fk_catalog ->currentText(); qfk_sch = fk_schema ->currentText(); qfk_tab = fk_table ->currentText(); qfk_lcat = fk_catalog_len ->currentText(); qfk_lsch = fk_schema_len ->currentText(); qfk_ltab = fk_table_len ->currentText(); cat = qcat.ascii(); sch = qsch.ascii(); tab = qtab.ascii(); lcat = qlcat.ascii(); lsch = qlsch.ascii(); ltab = qltab.ascii(); fk_cat = qfk_cat.ascii(); fk_sch = qfk_sch.ascii(); fk_tab = qfk_tab.ascii(); fk_lcat = qfk_lcat.ascii(); fk_lsch = qfk_lsch.ascii(); fk_ltab = qfk_ltab.ascii(); odbctest -> out_win -> insertLineLimited( "SQLForeignKeys():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( cat, "" ) == 0 ) { cat = NULL; odbctest -> out_win -> insertLineLimited( " PKCatalog: " ); } else if ( strcmp( cat, "" ) == 0 ) { cat = ""; odbctest -> out_win -> insertLineLimited( " PKCatalog: " ); } else { txt.sprintf( " PKCatalog: %s", cat ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcat, "SQL_NTS", 7 ) == 0 ) { cat_len = SQL_NTS; txt.sprintf( " PKCatalog Len: SQL_NTS=-3" ); } else { cat_len = atoi( lcat ); txt.sprintf( " PKCatalog Len: %d", cat_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sch, "" ) == 0 ) { sch = NULL; odbctest -> out_win -> insertLineLimited( " PKSchema: " ); } else if ( strcmp( sch, "" ) == 0 ) { sch = ""; odbctest -> out_win -> insertLineLimited( " PKSchema: " ); } else { txt.sprintf( " PKSchema: %s", sch ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lsch, "SQL_NTS", 7 ) == 0 ) { sch_len = SQL_NTS; txt.sprintf( " PKSchema Len: SQL_NTS=-3" ); } else { sch_len = atoi( lsch ); txt.sprintf( " PKSchema Len: %d", sch_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( tab, "" ) == 0 ) { tab = NULL; odbctest -> out_win -> insertLineLimited( " PKTable: " ); } else if ( strcmp( tab, "" ) == 0 ) { tab = ""; odbctest -> out_win -> insertLineLimited( " PKTable: " ); } else { txt.sprintf( " PKTable: %s", tab ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ltab, "SQL_NTS", 7 ) == 0 ) { tab_len = SQL_NTS; txt.sprintf( " PKTable Len: SQL_NTS=-3" ); } else { tab_len = atoi( ltab ); txt.sprintf( " PKTable Len: %d", tab_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( fk_cat, "" ) == 0 ) { fk_cat = NULL; odbctest -> out_win -> insertLineLimited( " FKCatalog: " ); } else if ( strcmp( fk_cat, "" ) == 0 ) { fk_cat = ""; odbctest -> out_win -> insertLineLimited( " FKCatalog: " ); } else { txt.sprintf( " FKCatalog: %s", fk_cat ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( fk_lcat, "SQL_NTS", 7 ) == 0 ) { fk_cat_len = SQL_NTS; txt.sprintf( " FKCatalog Len: SQL_NTS=-3" ); } else { fk_cat_len = atoi( fk_lcat ); txt.sprintf( " FKCatalog Len: %d", fk_cat_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( fk_sch, "" ) == 0 ) { fk_sch = NULL; odbctest -> out_win -> insertLineLimited( " FKSchema: " ); } else if ( strcmp( fk_sch, "" ) == 0 ) { fk_sch = ""; odbctest -> out_win -> insertLineLimited( " FKSchema: " ); } else { txt.sprintf( " FKSchema: %s", fk_sch ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( fk_lsch, "SQL_NTS", 7 ) == 0 ) { fk_sch_len = SQL_NTS; txt.sprintf( " FKSchema Len: SQL_NTS=-3" ); } else { fk_sch_len = atoi( lsch ); txt.sprintf( " FKSchema Len: %d", fk_sch_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( fk_tab, "" ) == 0 ) { fk_tab = NULL; odbctest -> out_win -> insertLineLimited( " FKTable: " ); } else if ( strcmp( fk_tab, "" ) == 0 ) { fk_tab = ""; odbctest -> out_win -> insertLineLimited( " FKTable: " ); } else { txt.sprintf( " FKTable: %s", fk_tab ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( fk_ltab, "SQL_NTS", 7 ) == 0 ) { fk_tab_len = SQL_NTS; txt.sprintf( " FKTable Len: SQL_NTS=-3" ); } else { fk_tab_len = atoi( ltab ); txt.sprintf( " FKTable Len: %d", fk_tab_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLForeignKeys( in_handle, (SQLCHAR*)cat, cat_len, (SQLCHAR*)sch, sch_len, (SQLCHAR*)tab, tab_len, (SQLCHAR*)fk_cat, fk_cat_len, (SQLCHAR*)fk_sch, fk_sch_len, (SQLCHAR*)fk_tab, fk_tab_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dForeignKeys::dForeignKeys( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); catalog = new QComboBox( TRUE, this, "catalog" ); catalog -> setGeometry( 100, 50, 150, 20 ); l_catalog = new QLabel( "PKCatalog:", this ); l_catalog -> setGeometry( 10, 50, 90, 20 ); catalog -> insertItem( "", 0 ); catalog -> insertItem( "", 1 ); schema = new QComboBox( TRUE, this, "schema" ); schema -> setGeometry( 100, 80, 150, 20 ); l_schema = new QLabel( "PKSchema:", this ); l_schema -> setGeometry( 10, 80, 90, 20 ); schema -> insertItem( "", 0 ); schema -> insertItem( "", 1 ); table = new QComboBox( TRUE, this, "table" ); table -> setGeometry( 100, 110, 150, 20 ); l_table = new QLabel( "PKTable:", this ); l_table -> setGeometry( 10, 110, 90, 20 ); table -> insertItem( "", 0 ); table -> insertItem( "", 1 ); fk_catalog = new QComboBox( TRUE, this, "catalog" ); fk_catalog -> setGeometry( 100, 140, 150, 20 ); fk_l_catalog = new QLabel( "FKCatalog:", this ); fk_l_catalog -> setGeometry( 10, 140, 90, 20 ); fk_catalog -> insertItem( "", 0 ); fk_catalog -> insertItem( "", 1 ); fk_schema = new QComboBox( TRUE, this, "schema" ); fk_schema -> setGeometry( 100, 170, 150, 20 ); fk_l_schema = new QLabel( "FKSchema:", this ); fk_l_schema -> setGeometry( 10, 170, 90, 20 ); fk_schema -> insertItem( "", 0 ); fk_schema -> insertItem( "", 1 ); fk_table = new QComboBox( TRUE, this, "table" ); fk_table -> setGeometry( 100, 200, 150, 20 ); fk_l_table = new QLabel( "FKTable:", this ); fk_l_table -> setGeometry( 10, 200, 90, 20 ); fk_table -> insertItem( "", 0 ); fk_table -> insertItem( "", 1 ); catalog_len = new QComboBox( TRUE, this, "catalog len" ); catalog_len -> setGeometry( 370, 140, 150, 20 ); l_catalog_len = new QLabel( "String Length:", this ); l_catalog_len -> setGeometry( 280, 140, 90, 20 ); catalog_len -> insertItem( "SQL_NTS=-3", 0 ); catalog_len -> insertItem( "0", 1 ); schema_len = new QComboBox( TRUE, this, "schema len" ); schema_len -> setGeometry( 370, 80, 150, 20 ); l_schema_len = new QLabel( "String Length:", this ); l_schema_len -> setGeometry( 280, 80, 90, 20 ); schema_len -> insertItem( "SQL_NTS=-3", 0 ); schema_len -> insertItem( "0", 1 ); table_len = new QComboBox( TRUE, this, "table len" ); table_len -> setGeometry( 370, 110, 150, 20 ); l_table_len = new QLabel( "String Length:", this ); l_table_len -> setGeometry( 280, 110, 90, 20 ); table_len -> insertItem( "SQL_NTS=-3", 0 ); table_len -> insertItem( "0", 1 ); fk_catalog_len = new QComboBox( TRUE, this, "catalog len" ); fk_catalog_len -> setGeometry( 370, 140, 150, 20 ); fk_l_catalog_len = new QLabel( "String Length:", this ); fk_l_catalog_len -> setGeometry( 280, 140, 90, 20 ); fk_catalog_len -> insertItem( "SQL_NTS=-3", 0 ); fk_catalog_len -> insertItem( "0", 1 ); fk_schema_len = new QComboBox( TRUE, this, "schema len" ); fk_schema_len -> setGeometry( 370, 170, 150, 20 ); fk_l_schema_len = new QLabel( "String Length:", this ); fk_l_schema_len -> setGeometry( 280, 170, 90, 20 ); fk_schema_len -> insertItem( "SQL_NTS=-3", 0 ); fk_schema_len -> insertItem( "0", 1 ); fk_table_len = new QComboBox( TRUE, this, "table len" ); fk_table_len -> setGeometry( 370, 200, 150, 20 ); fk_l_table_len = new QLabel( "String Length:", this ); fk_l_table_len -> setGeometry( 280, 200, 90, 20 ); fk_table_len -> insertItem( "SQL_NTS=-3", 0 ); fk_table_len -> insertItem( "0", 1 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dForeignKeys::~dForeignKeys() { delete ok; delete cancel; delete help; delete handles; delete catalog; delete schema; delete table; delete l_handle; delete l_catalog; delete l_schema; delete l_table; delete catalog_len; delete schema_len; delete table_len; delete l_catalog_len; delete l_schema_len; delete l_table_len; delete fk_catalog; delete fk_schema; delete fk_table; delete fk_l_catalog; delete fk_l_schema; delete fk_l_table; delete fk_catalog_len; delete fk_schema_len; delete fk_table_len; delete fk_l_catalog_len; delete fk_l_schema_len; delete fk_l_table_len; } void dPrimaryKeys::Ok() { const char *cat, *sch, *tab; const char *lcat, *lsch, *ltab; QString qcat, qsch, qtab; QString qlcat, qlsch, qltab; int cat_len, sch_len, tab_len; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( hand ) in_handle = hand -> getHandle(); qcat = catalog ->currentText(); qsch = schema ->currentText(); qtab = table ->currentText(); qlcat = catalog_len ->currentText(); qlsch = schema_len ->currentText(); qltab = table_len ->currentText(); cat = qcat.ascii(); sch = qsch.ascii(); tab = qtab.ascii(); lcat = qlcat.ascii(); lsch = qlsch.ascii(); ltab = qltab.ascii(); odbctest -> out_win -> insertLineLimited( "SQLPrimaryKeys():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( cat, "" ) == 0 ) { cat = NULL; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else if ( strcmp( cat, "" ) == 0 ) { cat = ""; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else { txt.sprintf( " Catalog: %s", cat ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcat, "SQL_NTS", 7 ) == 0 ) { cat_len = SQL_NTS; txt.sprintf( " Catalog Len: SQL_NTS=-3" ); } else { cat_len = atoi( lcat ); txt.sprintf( " Catalog Len: %d", cat_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sch, "" ) == 0 ) { sch = NULL; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else if ( strcmp( sch, "" ) == 0 ) { sch = ""; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else { txt.sprintf( " Schema: %s", sch ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lsch, "SQL_NTS", 7 ) == 0 ) { sch_len = SQL_NTS; txt.sprintf( " Schema Len: SQL_NTS=-3" ); } else { sch_len = atoi( lsch ); txt.sprintf( " Schema Len: %d", sch_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( tab, "" ) == 0 ) { tab = NULL; odbctest -> out_win -> insertLineLimited( " Table: " ); } else if ( strcmp( tab, "" ) == 0 ) { tab = ""; odbctest -> out_win -> insertLineLimited( " Table: " ); } else { txt.sprintf( " Table: %s", tab ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ltab, "SQL_NTS", 7 ) == 0 ) { tab_len = SQL_NTS; txt.sprintf( " Table Len: SQL_NTS=-3" ); } else { tab_len = atoi( ltab ); txt.sprintf( " Table Len: %d", tab_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLPrimaryKeys( in_handle, (SQLCHAR*)cat, cat_len, (SQLCHAR*)sch, sch_len, (SQLCHAR*)tab, tab_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dPrimaryKeys::dPrimaryKeys( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); catalog = new QComboBox( TRUE, this, "catalog" ); catalog -> setGeometry( 100, 50, 150, 20 ); l_catalog = new QLabel( "Catalog:", this ); l_catalog -> setGeometry( 10, 50, 90, 20 ); catalog -> insertItem( "", 0 ); catalog -> insertItem( "", 1 ); schema = new QComboBox( TRUE, this, "schema" ); schema -> setGeometry( 100, 80, 150, 20 ); l_schema = new QLabel( "Schema:", this ); l_schema -> setGeometry( 10, 80, 90, 20 ); schema -> insertItem( "", 0 ); schema -> insertItem( "", 1 ); table = new QComboBox( TRUE, this, "table" ); table -> setGeometry( 100, 110, 150, 20 ); l_table = new QLabel( "Table:", this ); l_table -> setGeometry( 10, 110, 90, 20 ); table -> insertItem( "", 0 ); table -> insertItem( "", 1 ); catalog_len = new QComboBox( TRUE, this, "catalog len" ); catalog_len -> setGeometry( 370, 50, 150, 20 ); l_catalog_len = new QLabel( "String Length:", this ); l_catalog_len -> setGeometry( 280, 50, 90, 20 ); catalog_len -> insertItem( "SQL_NTS=-3", 0 ); catalog_len -> insertItem( "0", 1 ); schema_len = new QComboBox( TRUE, this, "schema len" ); schema_len -> setGeometry( 370, 80, 150, 20 ); l_schema_len = new QLabel( "String Length:", this ); l_schema_len -> setGeometry( 280, 80, 90, 20 ); schema_len -> insertItem( "SQL_NTS=-3", 0 ); schema_len -> insertItem( "0", 1 ); table_len = new QComboBox( TRUE, this, "table len" ); table_len -> setGeometry( 370, 110, 150, 20 ); l_table_len = new QLabel( "String Length:", this ); l_table_len -> setGeometry( 280, 110, 90, 20 ); table_len -> insertItem( "SQL_NTS=-3", 0 ); table_len -> insertItem( "0", 1 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dPrimaryKeys::~dPrimaryKeys() { delete ok; delete cancel; delete help; delete handles; delete catalog; delete schema; delete table; delete l_handle; delete l_catalog; delete l_schema; delete l_table; delete catalog_len; delete schema_len; delete table_len; delete l_catalog_len; delete l_schema_len; delete l_table_len; } void dProcedures::Ok() { const char *cat, *sch, *tab; const char *lcat, *lsch, *ltab; QString qcat, qsch, qtab; QString qlcat, qlsch, qltab; int cat_len, sch_len, tab_len; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( hand ) in_handle = hand -> getHandle(); qcat = catalog ->currentText(); qsch = schema ->currentText(); qtab = table ->currentText(); qlcat = catalog_len ->currentText(); qlsch = schema_len ->currentText(); qltab = table_len ->currentText(); cat = qcat.ascii(); sch = qsch.ascii(); tab = qtab.ascii(); lcat = qlcat.ascii(); lsch = qlsch.ascii(); ltab = qltab.ascii(); odbctest -> out_win -> insertLineLimited( "SQLProcedures():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( cat, "" ) == 0 ) { cat = NULL; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else if ( strcmp( cat, "" ) == 0 ) { cat = ""; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else { txt.sprintf( " Catalog: %s", cat ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcat, "SQL_NTS", 7 ) == 0 ) { cat_len = SQL_NTS; txt.sprintf( " Catalog Len: SQL_NTS=-3" ); } else { cat_len = atoi( lcat ); txt.sprintf( " Catalog Len: %d", cat_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sch, "" ) == 0 ) { sch = NULL; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else if ( strcmp( sch, "" ) == 0 ) { sch = ""; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else { txt.sprintf( " Schema: %s", sch ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lsch, "SQL_NTS", 7 ) == 0 ) { sch_len = SQL_NTS; txt.sprintf( " Schema Len: SQL_NTS=-3" ); } else { sch_len = atoi( lsch ); txt.sprintf( " Schema Len: %d", sch_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( tab, "" ) == 0 ) { tab = NULL; odbctest -> out_win -> insertLineLimited( " Procedure: " ); } else if ( strcmp( tab, "" ) == 0 ) { tab = ""; odbctest -> out_win -> insertLineLimited( " Procedure: " ); } else { txt.sprintf( " Procedure: %s", tab ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ltab, "SQL_NTS", 7 ) == 0 ) { tab_len = SQL_NTS; txt.sprintf( " Procedure Len: SQL_NTS=-3" ); } else { tab_len = atoi( ltab ); txt.sprintf( " Procedure Len: %d", tab_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLProcedures( in_handle, (SQLCHAR*)cat, cat_len, (SQLCHAR*)sch, sch_len, (SQLCHAR*)tab, tab_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dProcedures::dProcedures( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); catalog = new QComboBox( TRUE, this, "catalog" ); catalog -> setGeometry( 100, 50, 150, 20 ); l_catalog = new QLabel( "Catalog:", this ); l_catalog -> setGeometry( 10, 50, 90, 20 ); catalog -> insertItem( "", 0 ); catalog -> insertItem( "", 1 ); schema = new QComboBox( TRUE, this, "schema" ); schema -> setGeometry( 100, 80, 150, 20 ); l_schema = new QLabel( "Schema:", this ); l_schema -> setGeometry( 10, 80, 90, 20 ); schema -> insertItem( "", 0 ); schema -> insertItem( "", 1 ); table = new QComboBox( TRUE, this, "proc" ); table -> setGeometry( 100, 110, 150, 20 ); l_table = new QLabel( "Procedure:", this ); l_table -> setGeometry( 10, 110, 90, 20 ); table -> insertItem( "", 0 ); table -> insertItem( "", 1 ); catalog_len = new QComboBox( TRUE, this, "catalog len" ); catalog_len -> setGeometry( 370, 50, 150, 20 ); l_catalog_len = new QLabel( "String Length:", this ); l_catalog_len -> setGeometry( 280, 50, 90, 20 ); catalog_len -> insertItem( "SQL_NTS=-3", 0 ); catalog_len -> insertItem( "0", 1 ); schema_len = new QComboBox( TRUE, this, "schema len" ); schema_len -> setGeometry( 370, 80, 150, 20 ); l_schema_len = new QLabel( "String Length:", this ); l_schema_len -> setGeometry( 280, 80, 90, 20 ); schema_len -> insertItem( "SQL_NTS=-3", 0 ); schema_len -> insertItem( "0", 1 ); table_len = new QComboBox( TRUE, this, "proc len" ); table_len -> setGeometry( 370, 110, 150, 20 ); l_table_len = new QLabel( "String Length:", this ); l_table_len -> setGeometry( 280, 110, 90, 20 ); table_len -> insertItem( "SQL_NTS=-3", 0 ); table_len -> insertItem( "0", 1 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dProcedures::~dProcedures() { delete ok; delete cancel; delete help; delete handles; delete catalog; delete schema; delete table; delete l_handle; delete l_catalog; delete l_schema; delete l_table; delete catalog_len; delete schema_len; delete table_len; delete l_catalog_len; delete l_schema_len; delete l_table_len; } void dProcedureColumns::Ok() { const char *cat, *sch, *tab, *col; const char *lcat, *lsch, *ltab, *lcol; QString qcat, qsch, qtab, qcol; QString qlcat, qlsch, qltab, qlcol; int cat_len, sch_len, tab_len, col_len; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( hand ) in_handle = hand -> getHandle(); qcat = catalog ->currentText(); qsch = schema ->currentText(); qtab = table ->currentText(); qcol = column ->currentText(); qlcat = catalog_len ->currentText(); qlsch = schema_len ->currentText(); qltab = table_len ->currentText(); qlcol = column_len ->currentText(); cat = qcat.ascii(); sch = qsch.ascii(); tab = qtab.ascii(); col = qcol.ascii(); lcat = qlcat.ascii(); lsch = qlsch.ascii(); ltab = qltab.ascii(); lcol = qlcol.ascii(); odbctest -> out_win -> insertLineLimited( "SQLProcedureColumns():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( cat, "" ) == 0 ) { cat = NULL; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else if ( strcmp( cat, "" ) == 0 ) { cat = ""; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else { txt.sprintf( " Catalog: %s", cat ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcat, "SQL_NTS", 7 ) == 0 ) { cat_len = SQL_NTS; txt.sprintf( " Catalog Len: SQL_NTS=-3" ); } else { cat_len = atoi( lcat ); txt.sprintf( " Catalog Len: %d", cat_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sch, "" ) == 0 ) { sch = NULL; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else if ( strcmp( sch, "" ) == 0 ) { sch = ""; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else { txt.sprintf( " Schema: %s", sch ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lsch, "SQL_NTS", 7 ) == 0 ) { sch_len = SQL_NTS; txt.sprintf( " Schema Len: SQL_NTS=-3" ); } else { sch_len = atoi( lsch ); txt.sprintf( " Schema Len: %d", sch_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( tab, "" ) == 0 ) { tab = NULL; odbctest -> out_win -> insertLineLimited( " Procedure: " ); } else if ( strcmp( tab, "" ) == 0 ) { tab = ""; odbctest -> out_win -> insertLineLimited( " Procedure: " ); } else { txt.sprintf( " Procedure: %s", tab ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ltab, "SQL_NTS", 7 ) == 0 ) { tab_len = SQL_NTS; txt.sprintf( " Table Len: SQL_NTS=-3" ); } else { tab_len = atoi( ltab ); txt.sprintf( " Table Len: %d", tab_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( col, "" ) == 0 ) { col = NULL; odbctest -> out_win -> insertLineLimited( " Column: " ); } else if ( strcmp( col, "" ) == 0 ) { col = ""; odbctest -> out_win -> insertLineLimited( " Column: " ); } else { txt.sprintf( " Column: %s", col ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcol, "SQL_NTS", 7 ) == 0 ) { col_len = SQL_NTS; txt.sprintf( " Column Len: SQL_NTS=-3" ); } else { col_len = atoi( lcol ); txt.sprintf( " Column Len: %d", col_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLProcedureColumns( in_handle, (SQLCHAR*)cat, cat_len, (SQLCHAR*)sch, sch_len, (SQLCHAR*)tab, tab_len, (SQLCHAR*)col, col_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dProcedureColumns::dProcedureColumns( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); catalog = new QComboBox( TRUE, this, "catalog" ); catalog -> setGeometry( 100, 50, 150, 20 ); l_catalog = new QLabel( "Catalog:", this ); l_catalog -> setGeometry( 10, 50, 90, 20 ); catalog -> insertItem( "", 0 ); catalog -> insertItem( "", 1 ); schema = new QComboBox( TRUE, this, "schema" ); schema -> setGeometry( 100, 80, 150, 20 ); l_schema = new QLabel( "Schema:", this ); l_schema -> setGeometry( 10, 80, 90, 20 ); schema -> insertItem( "", 0 ); schema -> insertItem( "", 1 ); table = new QComboBox( TRUE, this, "procedure" ); table -> setGeometry( 100, 110, 150, 20 ); l_table = new QLabel( "Procedure:", this ); l_table -> setGeometry( 10, 110, 90, 20 ); table -> insertItem( "", 0 ); table -> insertItem( "", 1 ); column = new QComboBox( TRUE, this, "column" ); column -> setGeometry( 100, 140, 150, 20 ); l_column = new QLabel( "Column:", this ); l_column -> setGeometry( 10, 140, 90, 20 ); column -> insertItem( "", 0 ); column -> insertItem( "", 1 ); catalog_len = new QComboBox( TRUE, this, "catalog len" ); catalog_len -> setGeometry( 370, 50, 150, 20 ); l_catalog_len = new QLabel( "String Length:", this ); l_catalog_len -> setGeometry( 280, 50, 90, 20 ); catalog_len -> insertItem( "SQL_NTS=-3", 0 ); catalog_len -> insertItem( "0", 1 ); schema_len = new QComboBox( TRUE, this, "schema len" ); schema_len -> setGeometry( 370, 80, 150, 20 ); l_schema_len = new QLabel( "String Length:", this ); l_schema_len -> setGeometry( 280, 80, 90, 20 ); schema_len -> insertItem( "SQL_NTS=-3", 0 ); schema_len -> insertItem( "0", 1 ); table_len = new QComboBox( TRUE, this, "proc len" ); table_len -> setGeometry( 370, 110, 150, 20 ); l_table_len = new QLabel( "String Length:", this ); l_table_len -> setGeometry( 280, 110, 90, 20 ); table_len -> insertItem( "SQL_NTS=-3", 0 ); table_len -> insertItem( "0", 1 ); column_len = new QComboBox( TRUE, this, "column len" ); column_len -> setGeometry( 370, 140, 150, 20 ); l_column_len = new QLabel( "String Length:", this ); l_column_len -> setGeometry( 280, 140, 90, 20 ); column_len -> insertItem( "SQL_NTS=-3", 0 ); column_len -> insertItem( "0", 1 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dProcedureColumns::~dProcedureColumns() { delete ok; delete cancel; delete help; delete handles; delete catalog; delete schema; delete table; delete column; delete l_handle; delete l_catalog; delete l_schema; delete l_table; delete l_column; delete catalog_len; delete schema_len; delete table_len; delete column_len; delete l_catalog_len; delete l_schema_len; delete l_table_len; delete l_column_len; } void dTablePrivileges::Ok() { const char *cat, *sch, *tab; const char *lcat, *lsch, *ltab; QString qcat, qsch, qtab; QString qlcat, qlsch, qltab; int cat_len, sch_len, tab_len; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( hand ) in_handle = hand -> getHandle(); qcat = catalog ->currentText(); qsch = schema ->currentText(); qtab = table ->currentText(); qlcat = catalog_len ->currentText(); qlsch = schema_len ->currentText(); qltab = table_len ->currentText(); cat = qcat.ascii(); sch = qsch.ascii(); tab = qtab.ascii(); lcat = qlcat.ascii(); lsch = qlsch.ascii(); ltab = qltab.ascii(); odbctest -> out_win -> insertLineLimited( "SQLTablePrivileges():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( cat, "" ) == 0 ) { cat = NULL; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else if ( strcmp( cat, "" ) == 0 ) { cat = ""; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else { txt.sprintf( " Catalog: %s", cat ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcat, "SQL_NTS", 7 ) == 0 ) { cat_len = SQL_NTS; txt.sprintf( " Catalog Len: SQL_NTS=-3" ); } else { cat_len = atoi( lcat ); txt.sprintf( " Catalog Len: %d", cat_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sch, "" ) == 0 ) { sch = NULL; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else if ( strcmp( sch, "" ) == 0 ) { sch = ""; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else { txt.sprintf( " Schema: %s", sch ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lsch, "SQL_NTS", 7 ) == 0 ) { sch_len = SQL_NTS; txt.sprintf( " Schema Len: SQL_NTS=-3" ); } else { sch_len = atoi( lsch ); txt.sprintf( " Schema Len: %d", sch_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( tab, "" ) == 0 ) { tab = NULL; odbctest -> out_win -> insertLineLimited( " Table: " ); } else if ( strcmp( tab, "" ) == 0 ) { tab = ""; odbctest -> out_win -> insertLineLimited( " Table: " ); } else { txt.sprintf( " Table: %s", tab ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ltab, "SQL_NTS", 7 ) == 0 ) { tab_len = SQL_NTS; txt.sprintf( " Table Len: SQL_NTS=-3" ); } else { tab_len = atoi( ltab ); txt.sprintf( " Table Len: %d", tab_len ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLTablePrivileges( in_handle, (SQLCHAR*)cat, cat_len, (SQLCHAR*)sch, sch_len, (SQLCHAR*)tab, tab_len ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dTablePrivileges::dTablePrivileges( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); catalog = new QComboBox( TRUE, this, "catalog" ); catalog -> setGeometry( 100, 50, 150, 20 ); l_catalog = new QLabel( "Catalog:", this ); l_catalog -> setGeometry( 10, 50, 90, 20 ); catalog -> insertItem( "", 0 ); catalog -> insertItem( "", 1 ); schema = new QComboBox( TRUE, this, "schema" ); schema -> setGeometry( 100, 80, 150, 20 ); l_schema = new QLabel( "Schema:", this ); l_schema -> setGeometry( 10, 80, 90, 20 ); schema -> insertItem( "", 0 ); schema -> insertItem( "", 1 ); table = new QComboBox( TRUE, this, "table" ); table -> setGeometry( 100, 110, 150, 20 ); l_table = new QLabel( "Table:", this ); l_table -> setGeometry( 10, 110, 90, 20 ); table -> insertItem( "", 0 ); table -> insertItem( "", 1 ); catalog_len = new QComboBox( TRUE, this, "catalog len" ); catalog_len -> setGeometry( 370, 50, 150, 20 ); l_catalog_len = new QLabel( "String Length:", this ); l_catalog_len -> setGeometry( 280, 50, 90, 20 ); catalog_len -> insertItem( "SQL_NTS=-3", 0 ); catalog_len -> insertItem( "0", 1 ); schema_len = new QComboBox( TRUE, this, "schema len" ); schema_len -> setGeometry( 370, 80, 150, 20 ); l_schema_len = new QLabel( "String Length:", this ); l_schema_len -> setGeometry( 280, 80, 90, 20 ); schema_len -> insertItem( "SQL_NTS=-3", 0 ); schema_len -> insertItem( "0", 1 ); table_len = new QComboBox( TRUE, this, "table len" ); table_len -> setGeometry( 370, 110, 150, 20 ); l_table_len = new QLabel( "String Length:", this ); l_table_len -> setGeometry( 280, 110, 90, 20 ); table_len -> insertItem( "SQL_NTS=-3", 0 ); table_len -> insertItem( "0", 1 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dTablePrivileges::~dTablePrivileges() { delete ok; delete cancel; delete help; delete handles; delete catalog; delete schema; delete table; delete l_handle; delete l_catalog; delete l_schema; delete l_table; delete catalog_len; delete schema_len; delete table_len; delete l_catalog_len; delete l_schema_len; delete l_table_len; } void dGetTypeInfo::Ok() { Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); int index; SQLHANDLE in_handle = SQL_NULL_HANDLE; SQLINTEGER info_type; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetTypeInfo():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); index = type -> currentItem(); info_type = get_type_options[ index ].attr; txt.sprintf( " Data Type: %s=%d (%s)", get_type_options[ index ].text, get_type_options[ index ].attr, get_type_options[ index ].version ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLGetTypeInfo( in_handle, info_type ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dGetTypeInfo::dGetTypeInfo( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 130, 50, 200, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 120, 20 ); type = new QComboBox( FALSE, this, "Info Type" ); type -> setGeometry( 130, 80, 340, 20 ); parent->fill_list_box( get_type_options, type ); l_type = new QLabel( "Data Type:", this ); l_type -> setGeometry( 10, 80, 120, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dGetTypeInfo::~dGetTypeInfo() { delete ok; delete cancel; delete help; delete handles; delete l_handle; delete type; delete l_type; } void dStatistics::Ok() { const char *cat, *sch, *tab; const char *lcat, *lsch, *ltab; QString qcat, qsch, qtab; QString qlcat, qlsch, qltab; int cat_len, sch_len, tab_len; int res, res_val, uniq, uniq_val; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( hand ) in_handle = hand -> getHandle(); qcat = catalog ->currentText(); qsch = schema ->currentText(); qtab = table ->currentText(); qlcat = catalog_len ->currentText(); qlsch = schema_len ->currentText(); qltab = table_len -> currentText(); cat = qcat.ascii(); sch = qsch.ascii(); tab = qtab.ascii(); lcat = qlcat.ascii(); lsch = qlsch.ascii(); ltab = qltab.ascii(); odbctest -> out_win -> insertLineLimited( "SQLStatistics():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( cat, "" ) == 0 ) { cat = NULL; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else if ( strcmp( cat, "" ) == 0 ) { cat = ""; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else { txt.sprintf( " Catalog: %s", cat ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcat, "SQL_NTS", 7 ) == 0 ) { cat_len = SQL_NTS; txt.sprintf( " Catalog Len: SQL_NTS=-3" ); } else { cat_len = atoi( lcat ); txt.sprintf( " Catalog Len: %d", cat_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sch, "" ) == 0 ) { sch = NULL; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else if ( strcmp( sch, "" ) == 0 ) { sch = ""; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else { txt.sprintf( " Schema: %s", sch ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lsch, "SQL_NTS", 7 ) == 0 ) { sch_len = SQL_NTS; txt.sprintf( " Schema Len: SQL_NTS=-3" ); } else { sch_len = atoi( lsch ); txt.sprintf( " Schema Len: %d", sch_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( tab, "" ) == 0 ) { tab = NULL; odbctest -> out_win -> insertLineLimited( " Table: " ); } else if ( strcmp( tab, "" ) == 0 ) { tab = ""; odbctest -> out_win -> insertLineLimited( " Table: " ); } else { txt.sprintf( " Table: %s", tab ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ltab, "SQL_NTS", 7 ) == 0 ) { tab_len = SQL_NTS; txt.sprintf( " Table Len: SQL_NTS=-3" ); } else { tab_len = atoi( ltab ); txt.sprintf( " Table Len: %d", tab_len ); } odbctest -> out_win -> insertLineLimited( txt ); uniq = unique -> currentItem(); uniq_val = unique_options[ uniq ].attr; txt.sprintf( " Unique: %s=%d (%s)", unique_options[ uniq ].text, unique_options[ uniq ].attr, unique_options[ uniq ].version ); odbctest -> out_win -> insertLineLimited( txt ); res = reserved -> currentItem(); res_val = reserved_options[ res ].attr; txt.sprintf( " Reserved: %s=%d (%s)", reserved_options[ res ].text, reserved_options[ res ].attr, reserved_options[ res ].version ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLStatistics( in_handle, (SQLCHAR*)cat, cat_len, (SQLCHAR*)sch, sch_len, (SQLCHAR*)tab, tab_len, uniq_val, res_val ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dStatistics::dStatistics( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); catalog = new QComboBox( TRUE, this, "catalog" ); catalog -> setGeometry( 100, 50, 150, 20 ); l_catalog = new QLabel( "Catalog:", this ); l_catalog -> setGeometry( 10, 50, 90, 20 ); catalog -> insertItem( "", 0 ); catalog -> insertItem( "", 1 ); schema = new QComboBox( TRUE, this, "schema" ); schema -> setGeometry( 100, 80, 150, 20 ); l_schema = new QLabel( "Schema:", this ); l_schema -> setGeometry( 10, 80, 90, 20 ); schema -> insertItem( "", 0 ); schema -> insertItem( "", 1 ); table = new QComboBox( TRUE, this, "table" ); table -> setGeometry( 100, 110, 150, 20 ); l_table = new QLabel( "Table:", this ); l_table -> setGeometry( 10, 110, 90, 20 ); table -> insertItem( "", 0 ); table -> insertItem( "", 1 ); catalog_len = new QComboBox( TRUE, this, "catalog len" ); catalog_len -> setGeometry( 370, 50, 150, 20 ); l_catalog_len = new QLabel( "String Length:", this ); l_catalog_len -> setGeometry( 280, 50, 90, 20 ); catalog_len -> insertItem( "SQL_NTS=-3", 0 ); catalog_len -> insertItem( "0", 1 ); schema_len = new QComboBox( TRUE, this, "schema len" ); schema_len -> setGeometry( 370, 80, 150, 20 ); l_schema_len = new QLabel( "String Length:", this ); l_schema_len -> setGeometry( 280, 80, 90, 20 ); schema_len -> insertItem( "SQL_NTS=-3", 0 ); schema_len -> insertItem( "0", 1 ); table_len = new QComboBox( TRUE, this, "table len" ); table_len -> setGeometry( 370, 110, 150, 20 ); l_table_len = new QLabel( "String Length:", this ); l_table_len -> setGeometry( 280, 110, 90, 20 ); table_len -> insertItem( "SQL_NTS=-3", 0 ); table_len -> insertItem( "0", 1 ); unique = new QComboBox( FALSE, this, "Info Type" ); unique -> setGeometry( 100, 140, 200, 20 ); parent->fill_list_box( unique_options, unique ); l_unique = new QLabel( "Unique:", this ); l_unique -> setGeometry( 10, 140, 90, 20 ); reserved = new QComboBox( FALSE, this, "Info Type" ); reserved -> setGeometry( 100, 170, 200, 20 ); parent->fill_list_box( reserved_options, reserved ); l_reserved = new QLabel( "Reserved:", this ); l_reserved -> setGeometry( 10, 170, 90, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dStatistics::~dStatistics() { delete ok; delete cancel; delete help; delete handles; delete catalog; delete schema; delete table; delete l_handle; delete l_catalog; delete l_schema; delete l_table; delete catalog_len; delete schema_len; delete table_len; delete l_catalog_len; delete l_schema_len; delete l_table_len; delete unique; delete reserved; delete l_unique; delete l_reserved; } void dSpecialColumns::Ok() { const char *cat, *sch, *tab; const char *lcat, *lsch, *ltab; QString qcat, qsch, qtab; QString qlcat, qlsch, qltab; int cat_len, sch_len, tab_len; int nul, nul_val, scp, scp_val; int id, id_val; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLHANDLE in_handle = SQL_NULL_HANDLE; if ( hand ) in_handle = hand -> getHandle(); qcat = catalog->currentText(); qsch = schema->currentText(); qtab = table->currentText(); qlcat = catalog_len->currentText(); qlsch = schema_len->currentText(); qltab = table_len->currentText(); cat = qcat.ascii(); sch = qsch.ascii(); tab = qtab.ascii(); lcat = qlcat.ascii(); lsch = qlsch.ascii(); ltab = qltab.ascii(); odbctest -> out_win -> insertLineLimited( "SQLSpecialColumns():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); id = ident -> currentItem(); id_val = ident_options[ id ].attr; txt.sprintf( " Identifier Type: %s=%d (%s)", ident_options[ id ].text, ident_options[ id ].attr, ident_options[ id ].version ); odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( cat, "" ) == 0 ) { cat = NULL; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else if ( strcmp( cat, "" ) == 0 ) { cat = ""; odbctest -> out_win -> insertLineLimited( " Catalog: " ); } else { txt.sprintf( " Catalog: %s", cat ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lcat, "SQL_NTS", 7 ) == 0 ) { cat_len = SQL_NTS; txt.sprintf( " Catalog Len: SQL_NTS=-3" ); } else { cat_len = atoi( lcat ); txt.sprintf( " Catalog Len: %d", cat_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( sch, "" ) == 0 ) { sch = NULL; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else if ( strcmp( sch, "" ) == 0 ) { sch = ""; odbctest -> out_win -> insertLineLimited( " Schema: " ); } else { txt.sprintf( " Schema: %s", sch ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( lsch, "SQL_NTS", 7 ) == 0 ) { sch_len = SQL_NTS; txt.sprintf( " Schema Len: SQL_NTS=-3" ); } else { sch_len = atoi( lsch ); txt.sprintf( " Schema Len: %d", sch_len ); } odbctest -> out_win -> insertLineLimited( txt ); if ( strcmp( tab, "" ) == 0 ) { tab = NULL; odbctest -> out_win -> insertLineLimited( " Table: " ); } else if ( strcmp( tab, "" ) == 0 ) { tab = ""; odbctest -> out_win -> insertLineLimited( " Table: " ); } else { txt.sprintf( " Table: %s", tab ); odbctest -> out_win -> insertLineLimited( txt ); } if ( strncmp( ltab, "SQL_NTS", 7 ) == 0 ) { tab_len = SQL_NTS; txt.sprintf( " Table Len: SQL_NTS=-3" ); } else { tab_len = atoi( ltab ); txt.sprintf( " Table Len: %d", tab_len ); } odbctest -> out_win -> insertLineLimited( txt ); scp = scope -> currentItem(); scp_val = unique_options[ scp ].attr; txt.sprintf( " Scope: %s=%d (%s)", scope_options[ scp ].text, scope_options[ scp ].attr, scope_options[ scp ].version ); odbctest -> out_win -> insertLineLimited( txt ); nul = nullable -> currentItem(); nul_val = null_options[ nul ].attr; txt.sprintf( " Nullable: %s=%d (%s)", null_options[ nul ].text, null_options[ nul ].attr, null_options[ nul ].version ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLSpecialColumns( in_handle, id_val, (SQLCHAR*)cat, cat_len, (SQLCHAR*)sch, sch_len, (SQLCHAR*)tab, tab_len, scp_val, nul_val ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dSpecialColumns::dSpecialColumns( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 290,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 370,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 450,10, 70,25 ); handles = new QComboBox( FALSE, this, "Handle" ); handles -> setGeometry( 100, 15, 150, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); l_handle = new QLabel( "Handle:", this ); l_handle -> setGeometry( 10, 15, 80, 20 ); ident = new QComboBox( FALSE, this, "Info Type" ); ident -> setGeometry( 100, 50, 250, 20 ); parent->fill_list_box( ident_options, ident ); l_ident = new QLabel( "Identifier Type:", this ); l_ident -> setGeometry( 10, 50, 90, 20 ); catalog = new QComboBox( TRUE, this, "catalog" ); catalog -> setGeometry( 100, 80, 150, 20 ); l_catalog = new QLabel( "Catalog:", this ); l_catalog -> setGeometry( 10, 80, 90, 20 ); catalog -> insertItem( "", 0 ); catalog -> insertItem( "", 1 ); schema = new QComboBox( TRUE, this, "schema" ); schema -> setGeometry( 100, 110, 150, 20 ); l_schema = new QLabel( "Schema:", this ); l_schema -> setGeometry( 10, 110, 90, 20 ); schema -> insertItem( "", 0 ); schema -> insertItem( "", 1 ); table = new QComboBox( TRUE, this, "table" ); table -> setGeometry( 100, 140, 150, 20 ); l_table = new QLabel( "Table:", this ); l_table -> setGeometry( 10, 140, 90, 20 ); table -> insertItem( "", 0 ); table -> insertItem( "", 1 ); catalog_len = new QComboBox( TRUE, this, "catalog len" ); catalog_len -> setGeometry( 370, 80, 150, 20 ); l_catalog_len = new QLabel( "String Length:", this ); l_catalog_len -> setGeometry( 280, 80, 90, 20 ); catalog_len -> insertItem( "SQL_NTS=-3", 0 ); catalog_len -> insertItem( "0", 1 ); schema_len = new QComboBox( TRUE, this, "schema len" ); schema_len -> setGeometry( 370, 110, 150, 20 ); l_schema_len = new QLabel( "String Length:", this ); l_schema_len -> setGeometry( 280, 110, 90, 20 ); schema_len -> insertItem( "SQL_NTS=-3", 0 ); schema_len -> insertItem( "0", 1 ); table_len = new QComboBox( TRUE, this, "table len" ); table_len -> setGeometry( 370, 140, 150, 20 ); l_table_len = new QLabel( "String Length:", this ); l_table_len -> setGeometry( 280, 140, 90, 20 ); table_len -> insertItem( "SQL_NTS=-3", 0 ); table_len -> insertItem( "0", 1 ); scope = new QComboBox( FALSE, this, "Info Type" ); scope -> setGeometry( 100, 170, 250, 20 ); parent->fill_list_box( scope_options, scope ); l_scope = new QLabel( "Scope:", this ); l_scope -> setGeometry( 10, 170, 90, 20 ); nullable = new QComboBox( FALSE, this, "Info Type" ); nullable -> setGeometry( 100, 200, 250, 20 ); parent->fill_list_box( null_options, nullable ); l_nullable = new QLabel( "Reserved:", this ); l_nullable -> setGeometry( 10, 200, 90, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); } dSpecialColumns::~dSpecialColumns() { delete ok; delete cancel; delete help; delete handles; delete catalog; delete schema; delete table; delete l_handle; delete l_catalog; delete l_schema; delete l_table; delete catalog_len; delete schema_len; delete table_len; delete l_catalog_len; delete l_schema_len; delete l_table_len; delete scope; delete nullable; delete l_scope; delete l_nullable; delete ident; delete l_ident; } void OdbcTest::sqlcolumns() { dColumns *dlg = new dColumns( this, "SQLColumns" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlcolumnprivileges() { dColumnPrivileges *dlg = new dColumnPrivileges( this, "SQLColumnPrivileges" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgettypeinfo() { dGetTypeInfo *dlg = new dGetTypeInfo( this, "SQLGetTypeInfo" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlforeignkeys() { dForeignKeys *dlg = new dForeignKeys( this, "SQLForeignKeys" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlprimarykeys() { dPrimaryKeys *dlg = new dPrimaryKeys( this, "SQLPrimaryKeys" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlprocedures() { dProcedures *dlg = new dProcedures( this, "SQLProcedures" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlprocedurecolumns() { dProcedureColumns *dlg = new dProcedureColumns( this, "SQLProcedureColumns" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlspecialcolumns() { dSpecialColumns *dlg = new dSpecialColumns( this, "SQLSpecialColumns" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlstatistics() { dStatistics *dlg = new dStatistics( this, "SQLStatistics" ); dlg -> exec(); delete dlg; } void OdbcTest::sqltables() { dTables *dlg = new dTables( this, "SQLTables" ); dlg -> exec(); delete dlg; } void OdbcTest::sqltableprivileges() { dTablePrivileges *dlg = new dTablePrivileges( this, "SQLTablePrivileges" ); dlg -> exec(); delete dlg; } unixODBC-2.2.14-p2/odbctest/attr.cpp0100644000076400007640000022070110723524745015475 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * ********************************************************************** * * $Id: attr.cpp,v 1.7 2007/11/29 12:00:37 lurcher Exp $ * * $Log: attr.cpp,v $ * Revision 1.7 2007/11/29 12:00:37 lurcher * Add 64 bit type changes to SQLExtendedFetch etc * * Revision 1.6 2007/02/12 11:49:37 lurcher * Add QT4 support to existing GUI parts * * Revision 1.5 2007/01/02 10:27:50 lurcher * Fix descriptor leak with unicode only driver * * Revision 1.4 2003/12/01 16:37:17 lurcher * * Fix a bug in SQLWritePrivateProfileString * * Revision 1.3 2001/12/20 17:26:26 lurcher * * More warnings removed * * Revision 1.2 2001/12/20 12:30:44 lurcher * * Fix 64 problem in odbctest and 7.1 Postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:30 lurcher * * First upload to SourceForge * * Revision 1.4 2001/07/20 09:42:58 nick * * Replace char[] with QString to avoid buffer overrun * * Revision 1.3 2001/06/04 15:24:49 nick * * Add port to MAC OSX and QT3 changes * * Revision 1.2 2001/05/31 16:05:55 nick * * Fix problems with postgres closing local sockets * Make odbctest build with QT 3 (it doesn't work due to what I think are bugs * in QT 3) * Fix a couple of problems in the cursor lib * * Revision 1.1.1.1 2000/09/04 16:42:53 nick * Imported Sources * * Revision 1.7 2000/06/16 14:09:26 ngorham * * Fix a couple of bugs in GetStmtOptions * * Revision 1.6 2000/06/13 12:30:19 ngorham * * Enough there for the first release I think * * Revision 1.5 2000/06/12 18:46:18 ngorham * * More changes * * Revision 1.4 2000/06/09 17:04:18 ngorham * * More, and More * * Revision 1.3 2000/06/05 16:53:14 ngorham * * Next lot of updates * * Revision 1.2 2001/05/31 10:26:26 ngorham * * Fix a few minor typo's * * Revision 1.1 2000/05/04 17:04:47 ngorham * * Initial commit * * **********************************************************************/ #include #ifdef QT_V4LAYOUT #include #include #include #else #include #include #include #endif #include #include #include "odbctest.h" #include "attr.h" static attr_value strlen_options[] = { { "SQL_NTS", SQL_NTS }, { "SQL_IS_POINTER", SQL_IS_POINTER }, { "SQL_IS_UINTEGER", SQL_IS_UINTEGER }, { "SQL_IS_INTEGER", SQL_IS_INTEGER }, { "SQL_IS_USMALLINT", SQL_IS_USMALLINT }, { "SQL_IS_SMALLINT", SQL_IS_SMALLINT }, { "", 0 }, { NULL } }; static attr_options stmt_options[] = { { "SQL_ATTR_APP_PARAM_DESC", SQL_ATTR_APP_PARAM_DESC, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_APP_ROW_DESC", SQL_ATTR_APP_ROW_DESC, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_ASYNC_ENABLE", SQL_ATTR_ASYNC_ENABLE, { { "SQL_ASYNC_ENABLE_OFF", SQL_ASYNC_ENABLE_OFF }, { "SQL_ASYNC_ENABLE_ON", SQL_ASYNC_ENABLE_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_CONCURRENCY", SQL_ATTR_CONCURRENCY, { { "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY }, { "SQL_CONCUR_LOCK", SQL_CONCUR_LOCK }, { "SQL_CONCUR_ROWVER", SQL_CONCUR_ROWVER }, { "SQL_CONCUR_VALUES", SQL_CONCUR_VALUES }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_CURSOR_SCROLLABLE", SQL_ATTR_CURSOR_SCROLLABLE, { { "SQL_NONSCROLLABLE", SQL_NONSCROLLABLE }, { "SQL_SCROLLABLE", SQL_SCROLLABLE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_CURSOR_SENSITIVITY", SQL_ATTR_CURSOR_SENSITIVITY, { { "SQL_UNSPECIFIED", SQL_UNSPECIFIED }, { "SQL_INSENSITIVE", SQL_INSENSITIVE }, { "SQL_SENSITIVE", SQL_SENSITIVE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_CURSOR_TYPE", SQL_ATTR_CURSOR_TYPE, { { "SQL_CURSOR_FORWARD_ONLY", SQL_CURSOR_FORWARD_ONLY }, { "SQL_CURSOR_STATIC", SQL_CURSOR_STATIC }, { "SQL_CURSOR_KEYSET_DRIVEN", SQL_CURSOR_KEYSET_DRIVEN }, { "SQL_CURSOR_DYNAMIC", SQL_CURSOR_DYNAMIC }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_ENABLE_AUTO_IPD", SQL_ATTR_ENABLE_AUTO_IPD, { { "SQL_FALSE", SQL_FALSE }, { "SQL_TRUE", SQL_TRUE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_FETCH_BOOKMARK_PTR", SQL_ATTR_FETCH_BOOKMARK_PTR, { { NULL } }, "3.0", SQL_INTEGER, FALSE, TRUE }, { "SQL_ATTR_FETCH_IMP_PARAM_DESC", SQL_ATTR_IMP_PARAM_DESC, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_FETCH_IMP_ROW_DESC", SQL_ATTR_IMP_ROW_DESC, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_KEYSET_SIZE", SQL_ATTR_KEYSET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_MAX_LENGTH", SQL_ATTR_MAX_LENGTH, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_MAX_ROWS", SQL_ATTR_MAX_ROWS, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_METADATA_ID", SQL_ATTR_METADATA_ID, { { "SQL_FALSE", SQL_FALSE }, { "SQL_TRUE", SQL_TRUE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_NOSCAN", SQL_ATTR_NOSCAN, { { "SQL_NOSCAN_OFF", SQL_NOSCAN_OFF }, { "SQL_NOSCAN_ON", SQL_NOSCAN_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_PARAM_BIND_OFFSET_PTR", SQL_ATTR_PARAM_BIND_OFFSET_PTR, { { NULL } }, "3.0", SQL_INTEGER, FALSE, TRUE }, { "SQL_ATTR_PARAM_BIND_TYPE", SQL_ATTR_PARAM_BIND_TYPE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_PARAM_OPERATION_PTR", SQL_ATTR_PARAM_OPERATION_PTR, { { NULL } }, "3.0", SQL_SMALLINT, FALSE, TRUE }, { "SQL_ATTR_PARAM_STATUS_PTR", SQL_ATTR_PARAM_STATUS_PTR, { { NULL } }, "3.0", SQL_SMALLINT, FALSE, TRUE }, { "SQL_ATTR_PARAMS_PROCESSED_PTR", SQL_ATTR_PARAMS_PROCESSED_PTR, { { NULL } }, "3.0", SQL_SMALLINT, FALSE, TRUE }, { "SQL_ATTR_PARAMSET_SIZE", SQL_ATTR_PARAMSET_SIZE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_QUERY_TIMEOUT", SQL_ATTR_QUERY_TIMEOUT, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_RETRIEVE_DATA", SQL_ATTR_RETRIEVE_DATA, { { "SQL_RD_ON", SQL_RD_ON }, { "SQL_RD_OFF", SQL_RD_OFF }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_ROW_ARRAY_SIZE", SQL_ATTR_ROW_ARRAY_SIZE, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_ROW_BIND_OFFSET_PTR", SQL_ATTR_ROW_BIND_OFFSET_PTR, { { NULL } }, "3.0", SQL_INTEGER, FALSE, TRUE }, { "SQL_ATTR_ROW_BIND_TYPE", SQL_ATTR_ROW_BIND_TYPE, { { "SQL_BIND_BY_COLUMN", SQL_BIND_BY_COLUMN }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_ROW_NUMBER", SQL_ATTR_ROW_NUMBER, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_ROW_OPERATION_PTR", SQL_ATTR_ROW_OPERATION_PTR, { { NULL } }, "3.0", SQL_SMALLINT, FALSE, TRUE }, { "SQL_ATTR_ROW_STATUS_PTR", SQL_ATTR_ROW_STATUS_PTR, { { NULL } }, "3.0", SQL_SMALLINT, FALSE, TRUE }, { "SQL_ATTR_ROWS_FETCHED_PTR", SQL_ATTR_ROWS_FETCHED_PTR, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_SIMULATE_CURSOR", SQL_ATTR_SIMULATE_CURSOR, { { "SQL_SC_NON_UNIQUE", SQL_SC_NON_UNIQUE }, { "SQL_SC_TRY_UNIQUE", SQL_SC_TRY_UNIQUE }, { "SQL_SC_UNIQUE", SQL_SC_UNIQUE }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_USE_BOOKMARKS", SQL_ATTR_USE_BOOKMARKS, { { "SQL_UB_ON", SQL_UB_ON }, { "SQL_UB_OFF", SQL_UB_OFF }, { "SQL_UB_VARIABLE", SQL_UB_VARIABLE }, { NULL } }, "2.0", SQL_INTEGER }, { NULL } }; static attr_options stmt_opt_options[] = { { "SQL_ASYNC_ENABLE", SQL_ASYNC_ENABLE, { { "SQL_ASYNC_ENABLE_OFF", SQL_ASYNC_ENABLE_OFF }, { "SQL_ASYNC_ENABLE_ON", SQL_ASYNC_ENABLE_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_BIND_TYPE", SQL_BIND_TYPE, { { "SQL_BIND_BY_COLUMN", SQL_BIND_BY_COLUMN }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_CONCURRENCY", SQL_CONCURRENCY, { { "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY }, { "SQL_CONCUR_LOCK", SQL_CONCUR_LOCK }, { "SQL_CONCUR_ROWVER", SQL_CONCUR_ROWVER }, { "SQL_CONCUR_VALUES", SQL_CONCUR_VALUES }, { "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_CURSOR_TYPE", SQL_CURSOR_TYPE, { { "SQL_CURSOR_FORWARD_ONLY", SQL_CURSOR_FORWARD_ONLY }, { "SQL_CURSOR_STATIC", SQL_CURSOR_STATIC }, { "SQL_CURSOR_KEYSET_DRIVEN", SQL_CURSOR_KEYSET_DRIVEN }, { "SQL_CURSOR_DYNAMIC", SQL_CURSOR_DYNAMIC }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_KEYSET_SIZE", SQL_KEYSET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_MAX_LENGTH", SQL_MAX_LENGTH, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_MAX_ROWS", SQL_MAX_ROWS, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_NOSCAN", SQL_NOSCAN, { { "SQL_NOSCAN_OFF", SQL_NOSCAN_OFF }, { "SQL_NOSCAN_ON", SQL_NOSCAN_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_QUERY_TIMEOUT", SQL_QUERY_TIMEOUT, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_RETRIEVE_DATA", SQL_RETRIEVE_DATA, { { "SQL_RD_ON", SQL_RD_ON }, { "SQL_RD_OFF", SQL_RD_OFF }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ROWSET_SIZE", SQL_ROWSET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_SIMULATE_CURSOR", SQL_SIMULATE_CURSOR, { { "SQL_SC_NON_UNIQUE", SQL_SC_NON_UNIQUE }, { "SQL_SC_TRY_UNIQUE", SQL_SC_TRY_UNIQUE }, { "SQL_SC_UNIQUE", SQL_SC_UNIQUE }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_USE_BOOKMARKS", SQL_USE_BOOKMARKS, { { "SQL_UB_ON", SQL_UB_ON }, { "SQL_UB_OFF", SQL_UB_OFF }, { "SQL_UB_VARIABLE", SQL_UB_VARIABLE }, { NULL } }, "2.0", SQL_INTEGER }, { NULL } }; static attr_options conn_options[] = { { "SQL_ATTR_ACCESS_MODE", SQL_ATTR_ACCESS_MODE, { { "SQL_MODE_READ_WRITE", SQL_MODE_READ_WRITE }, { "SQL_MODE_READ_ONLY", SQL_MODE_READ_ONLY }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_ASYNC_ENABLE", SQL_ATTR_ASYNC_ENABLE, { { "SQL_ASYNC_ENABLE_OFF", SQL_ASYNC_ENABLE_OFF }, { "SQL_ASYNC_ENABLE_ON", SQL_ASYNC_ENABLE_ON }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_AUTO_IPD", SQL_ATTR_AUTO_IPD, { { "SQL_TRUE", SQL_TRUE }, { "SQL_FALSE", SQL_FALSE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_AUTOCOMMIT", SQL_ATTR_AUTOCOMMIT, { { "SQL_AUTOCOMMIT_ON", SQL_AUTOCOMMIT_ON }, { "SQL_AUTOCOMMIT_OFF", SQL_AUTOCOMMIT_OFF }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_CONNECTION_TIMEOUT", SQL_ATTR_CONNECTION_TIMEOUT, { { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_CURRENT_CATALOG", SQL_ATTR_CURRENT_CATALOG, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_ATTR_LOGIN_TIMEOUT", SQL_ATTR_LOGIN_TIMEOUT, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_METADATA_ID", SQL_ATTR_METADATA_ID, { { "SQL_TRUE", SQL_TRUE }, { "SQL_FALSE", SQL_FALSE }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_ODBC_CURSORS", SQL_ATTR_ODBC_CURSORS, { { "SQL_CUR_USE_IF_NEEDED", SQL_CUR_USE_IF_NEEDED }, { "SQL_CUR_USE_ODBC", SQL_CUR_USE_ODBC }, { "SQL_CUR_USE_DRIVER", SQL_CUR_USE_DRIVER }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_PACKET_SIZE", SQL_ATTR_PACKET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_QUIET_MODE", SQL_ATTR_QUIET_MODE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_ATTR_TRACE", SQL_ATTR_TRACE, { { "SQL_OPT_TRACE_OFF", SQL_OPT_TRACE_OFF }, { "SQL_OPT_TRACE_ON", SQL_OPT_TRACE_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_TRACEFILE", SQL_ATTR_TRACEFILE, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_ATTR_TRANSLATE_LIB", SQL_ATTR_TRANSLATE_LIB, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_ATTR_TRANSLATE_OPTION", SQL_ATTR_TRANSLATE_OPTION, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ATTR_TXN_ISOLATION", SQL_ATTR_TXN_ISOLATION, { { "SQL_TXN_READ_UNCOMMITTED", SQL_TXN_READ_UNCOMMITTED }, { "SQL_TXN_READ_COMMITTED", SQL_TXN_READ_COMMITTED }, { "SQL_TXN_REPEATABLE_READ", SQL_TXN_REPEATABLE_READ }, { "SQL_TXN_SERIALIZABLE", SQL_TXN_SERIALIZABLE }, { NULL } }, "1.0", SQL_INTEGER }, { NULL } }; static attr_options conn_opt_options[] = { { "conn: SQL_ACCESS_MODE", SQL_ACCESS_MODE, { { "SQL_MODE_READ_ONLY", SQL_MODE_READ_ONLY }, { "SQL_MODE_READ_WRITE", SQL_MODE_READ_WRITE }, { NULL } }, "1.0", SQL_INTEGER }, { "conn: SQL_AUTOCOMMIT", SQL_AUTOCOMMIT, { { "SQL_AUTOCOMMIT_ON", SQL_AUTOCOMMIT_ON }, { "SQL_AUTOCOMMIT_OFF", SQL_AUTOCOMMIT_OFF }, { NULL } }, "1.0", SQL_INTEGER }, { "conn: SQL_CURRENT_QUALIFIER", SQL_CURRENT_QUALIFIER, { { NULL } }, "2.0", SQL_CHAR }, { "conn: SQL_LOGIN_TIMEOUT", SQL_LOGIN_TIMEOUT, { { NULL } }, "1.0", SQL_INTEGER }, { "conn: SQL_ODBC_CURSORS", SQL_ODBC_CURSORS, { { "SQL_CUR_USE_IF_NEEDED", SQL_CUR_USE_IF_NEEDED }, { "SQL_CUR_USE_ODBC", SQL_CUR_USE_ODBC }, { "SQL_CUR_USE_DRIVER", SQL_CUR_USE_DRIVER }, { NULL } }, "2.0", SQL_INTEGER }, { "conn: SQL_OPT_TRACE", SQL_OPT_TRACE, { { "SQL_OPT_TRACE_ON", SQL_OPT_TRACE_ON }, { "SQL_OPT_TRACE_OFF", SQL_OPT_TRACE_OFF }, { NULL } }, "1.0", SQL_INTEGER }, { "conn: SQL_OPT_TRACEFILE", SQL_OPT_TRACEFILE, { { NULL } }, "1.0", SQL_CHAR }, { "conn: SQL_PACKET_SIZE", SQL_PACKET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "conn: SQL_QUIET_MODE", SQL_QUIET_MODE, { { NULL } }, "2.0", SQL_INTEGER }, { "conn: SQL_TRANSLATE_DLL", SQL_TRANSLATE_DLL, { { NULL } }, "1.0", SQL_CHAR }, { "conn: SQL_TRANSLATE_OPTION", SQL_TRANSLATE_OPTION, { { NULL } }, "1.0", SQL_INTEGER }, { "conn: SQL_TXN_ISOLATION", SQL_TXN_ISOLATION, { { "SQL_TXN_READ_UNCOMMITED", SQL_TXN_READ_UNCOMMITTED }, { "SQL_TXN_READ_COMMITED", SQL_TXN_READ_COMMITTED }, { "SQL_TXN_REPEATABLE_READ", SQL_TXN_REPEATABLE_READ }, { "SQL_TXN_SERIALIZABLE", SQL_TXN_SERIALIZABLE }, { "SQL_TXN_VERSIONING", 0x00000010L }, { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_ASYNC_ENABLE", SQL_ASYNC_ENABLE, { { "SQL_ASYNC_ENABLE_OFF", SQL_ASYNC_ENABLE_OFF }, { "SQL_ASYNC_ENABLE_ON", SQL_ASYNC_ENABLE_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_BIND_TYPE", SQL_BIND_TYPE, { { "SQL_BIND_BY_COLUMN", SQL_BIND_BY_COLUMN }, { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_CONCURRENCY", SQL_CONCURRENCY, { { "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY }, { "SQL_CONCUR_LOCK", SQL_CONCUR_LOCK }, { "SQL_CONCUR_ROWVER", SQL_CONCUR_ROWVER }, { "SQL_CONCUR_VALUES", SQL_CONCUR_VALUES }, { "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY }, { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_CURSOR_TYPE", SQL_CURSOR_TYPE, { { "SQL_CURSOR_FORWARD_ONLY", SQL_CURSOR_FORWARD_ONLY }, { "SQL_CURSOR_STATIC", SQL_CURSOR_STATIC }, { "SQL_CURSOR_KEYSET_DRIVEN", SQL_CURSOR_KEYSET_DRIVEN }, { "SQL_CURSOR_DYNAMIC", SQL_CURSOR_DYNAMIC }, { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_KEYSET_SIZE", SQL_KEYSET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_MAX_LENGTH", SQL_MAX_LENGTH, { { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_MAX_ROWS", SQL_MAX_ROWS, { { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_NOSCAN", SQL_NOSCAN, { { "SQL_NOSCAN_OFF", SQL_NOSCAN_OFF }, { "SQL_NOSCAN_ON", SQL_NOSCAN_ON }, { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_QUERY_TIMEOUT", SQL_QUERY_TIMEOUT, { { NULL } }, "1.0", SQL_INTEGER }, { "stmt: SQL_RETRIEVE_DATA", SQL_RETRIEVE_DATA, { { "SQL_RD_ON", SQL_RD_ON }, { "SQL_RD_OFF", SQL_RD_OFF }, { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_ROWSET_SIZE", SQL_ROWSET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_SIMULATE_CURSOR", SQL_SIMULATE_CURSOR, { { "SQL_SC_NON_UNIQUE", SQL_SC_NON_UNIQUE }, { "SQL_SC_TRY_UNIQUE", SQL_SC_TRY_UNIQUE }, { "SQL_SC_UNIQUE", SQL_SC_UNIQUE }, { NULL } }, "2.0", SQL_INTEGER }, { "stmt: SQL_USE_BOOKMARKS", SQL_USE_BOOKMARKS, { { "SQL_UB_ON", SQL_UB_ON }, { "SQL_UB_OFF", SQL_UB_OFF }, { NULL } }, "2.0", SQL_INTEGER }, { NULL } }; static attr_options conn_gopt_options[] = { { "SQL_ACCESS_MODE", SQL_ACCESS_MODE, { { "SQL_MODE_READ_ONLY", SQL_MODE_READ_ONLY }, { "SQL_MODE_READ_WRITE", SQL_MODE_READ_WRITE }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_AUTOCOMMIT", SQL_AUTOCOMMIT, { { "SQL_AUTOCOMMIT_ON", SQL_AUTOCOMMIT_ON }, { "SQL_AUTOCOMMIT_OFF", SQL_AUTOCOMMIT_OFF }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_CURRENT_QUALIFIER", SQL_CURRENT_QUALIFIER, { { NULL } }, "2.0", SQL_CHAR }, { "SQL_LOGIN_TIMEOUT", SQL_LOGIN_TIMEOUT, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_ODBC_CURSORS", SQL_ODBC_CURSORS, { { "SQL_CUR_USE_IF_NEEDED", SQL_CUR_USE_IF_NEEDED }, { "SQL_CUR_USE_ODBC", SQL_CUR_USE_ODBC }, { "SQL_CUR_USE_DRIVER", SQL_CUR_USE_DRIVER }, { NULL } }, "2.0", SQL_INTEGER }, { "SQL_OPT_TRACE", SQL_OPT_TRACE, { { "SQL_OPT_TRACE_ON", SQL_OPT_TRACE_ON }, { "SQL_OPT_TRACE_OFF", SQL_OPT_TRACE_OFF }, { NULL } }, "1.0", SQL_INTEGER }, { "SQL_OPT_TRACEFILE", SQL_OPT_TRACEFILE, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_PACKET_SIZE", SQL_PACKET_SIZE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_QUIET_MODE", SQL_QUIET_MODE, { { NULL } }, "2.0", SQL_INTEGER }, { "SQL_TRANSLATE_DLL", SQL_TRANSLATE_DLL, { { NULL } }, "1.0", SQL_CHAR }, { "SQL_TRANSLATE_OPTION", SQL_TRANSLATE_OPTION, { { NULL } }, "1.0", SQL_INTEGER }, { "SQL_TXN_ISOLATION", SQL_TXN_ISOLATION, { { "SQL_TXN_READ_UNCOMMITED", SQL_TXN_READ_UNCOMMITTED }, { "SQL_TXN_READ_COMMITED", SQL_TXN_READ_COMMITTED }, { "SQL_TXN_REPEATABLE_READ", SQL_TXN_REPEATABLE_READ }, { "SQL_TXN_SERIALIZABLE", SQL_TXN_SERIALIZABLE }, { "SQL_TXN_VERSIONING", 0x00000010L }, { NULL } }, "1.0", SQL_INTEGER }, { NULL } }; static attr_options env_options[] = { { "SQL_ATTR_ODBC_VERSION", SQL_ATTR_ODBC_VERSION, { { "SQL_OV_ODBC2", SQL_OV_ODBC2 }, { "SQL_OV_ODBC3", SQL_OV_ODBC3 }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_CP_MATCH", SQL_ATTR_CP_MATCH, { { "SQL_CP_STRICT_MATCH", SQL_CP_STRICT_MATCH }, { "SQL_CP_RELAXED_MATCH", SQL_CP_RELAXED_MATCH }, { "SQL_CP_MATCH_DEFAULT", SQL_CP_MATCH_DEFAULT }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_CONNECTION_POOLING", SQL_ATTR_CONNECTION_POOLING, { { "SQL_CP_OFF", SQL_OV_ODBC2 }, { "SQL_CP_ONE_PER_DRIVER", SQL_CP_ONE_PER_DRIVER }, { "SQL_CP_ONE_PER_HENV", SQL_CP_ONE_PER_HENV }, { "SQL_CP_DEFAULT", SQL_CP_DEFAULT }, { NULL } }, "3.0", SQL_INTEGER }, { "SQL_ATTR_OUTPUT_NTS", SQL_ATTR_OUTPUT_NTS, { { "SQL_TRUE", SQL_TRUE }, { "SQL_FALSE", SQL_FALSE }, { NULL } }, "3.0", SQL_INTEGER }, { NULL } }; void dSetEnvAttr::Activated( int index ) { value -> clear(); odbctest->fill_list_box( env_options[ index ].values, value ); } void dSetEnvAttr::Ok() { SQLHANDLE in_handle = SQL_NULL_HENV; SQLINTEGER attribute; SQLPOINTER vptr; SQLINTEGER string_length; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_ENV, handles ); int i; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLSetEnvAttr():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Environment Handle: %p", in_handle ); else txt.sprintf( " Environment Handle: SQL_NULL_HENV" ); odbctest -> out_win -> insertLineLimited( txt ); attribute = env_options[ types -> currentItem() ].attr; txt.sprintf( " Attribute: %s=%d", env_options[ types -> currentItem() ].text, env_options[ types -> currentItem() ].attr ); odbctest -> out_win -> insertLineLimited( txt ); vptr = (SQLPOINTER) env_options[ types -> currentItem() ].values[ value -> currentItem() ].value; txt.sprintf( " Value: %s=%d", env_options[ types -> currentItem() ].values[ value -> currentItem() ].text, env_options[ types -> currentItem() ].values[ value -> currentItem() ].value ); odbctest -> out_win -> insertLineLimited( txt ); string_length = strlen_options[ stringlen -> currentItem() ].value; txt.sprintf( " String Length: %s=%d", strlen_options[ stringlen -> currentItem() ].text, strlen_options[ stringlen -> currentItem() ].value ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLSetEnvAttr( in_handle, attribute, vptr, string_length ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dSetEnvAttr::dSetEnvAttr( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Environment Handle" ); handles -> setGeometry( 170, 50, 300, 20 ); odbctest->fill_handle_list( SQL_HANDLE_ENV, handles ); types = new QComboBox( FALSE, this, "Attribute" ); types -> setGeometry( 170, 80, 300, 20 ); parent->fill_list_box( env_options, types ); value = new QComboBox( FALSE, this, "Value" ); value -> setGeometry( 170, 110, 300, 20 ); parent->fill_list_box( env_options[ 0 ].values, value ); stringlen = new QComboBox( FALSE, this, "String Length" ); stringlen -> setGeometry( 170, 140, 300, 20 ); parent->fill_list_box( strlen_options, stringlen ); l_handle = new QLabel( "Environment Handle:", this ); l_handle -> setGeometry( 10, 50, 130, 20 ); l_types = new QLabel( "Attribute:", this ); l_types -> setGeometry( 10, 80, 130, 20 ); l_value = new QLabel( "Value:", this ); l_value -> setGeometry( 10, 110, 130, 20 ); l_slen = new QLabel( "String Length:", this ); l_slen -> setGeometry( 10, 140, 130, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( types, SIGNAL(activated(int)), this, SLOT( Activated(int))); } dSetEnvAttr::~dSetEnvAttr() { delete ok; delete cancel; delete help; delete types; delete handles; delete value; delete stringlen; delete l_handle; delete l_types; delete l_value; delete l_slen; } void dGetEnvAttr::Ok() { SQLHANDLE in_handle = SQL_NULL_HENV; SQLINTEGER attribute; SQLPOINTER vptr; SQLINTEGER string_length; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_ENV, handles ); SQLINTEGER b_len, strlen_or_ind; SQLINTEGER *strlen_ptr; char *buf = NULL; int i; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetEnvAttr():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Environment Handle: %p", in_handle ); else txt.sprintf( " Environment Handle: SQL_NULL_HENV" ); odbctest -> out_win -> insertLineLimited( txt ); attribute = env_options[ types -> currentItem() ].attr; txt.sprintf( " Attribute: %s=%d", env_options[ types -> currentItem() ].text, env_options[ types -> currentItem() ].attr ); odbctest -> out_win -> insertLineLimited( txt ); b_len = atoi( buffer_len -> text().ascii()); if ( b_len < 1 ) { b_len = 0; } if ( target_valid -> isOn()) { buf = NULL; } else if ( b_len < 300 ) { buf = new char[ 300 ]; } else { buf = new char[ b_len ]; } if ( buf ) { txt.sprintf( " Value Ptr: %p", buf ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Value Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } txt.sprintf( " Buffer Length: %d", b_len ); odbctest -> out_win -> insertLineLimited( txt ); strlen_or_ind = -999999; if ( strlen_valid -> isOn()) { strlen_ptr = NULL; } else { strlen_ptr = &strlen_or_ind; } if ( strlen_ptr ) { txt.sprintf( " Strlen Ptr: %p", strlen_ptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Strlen Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } SQLRETURN ret = SQLGetEnvAttr( in_handle, attribute, buf, b_len, strlen_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( strlen_ptr ) { if ( strlen_or_ind == -999999 ) { txt.sprintf( " *Strlen Ptr: " ); } else { txt.sprintf( " *Strlen Ptr: %d", strlen_or_ind ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( SQL_SUCCEEDED( ret )) { int index = types -> currentItem(); switch( env_options[ index ].data_type ) { case SQL_INTEGER: SQLUINTEGER ival; memcpy( &ival, buf, sizeof( ival )); txt.sprintf( " *ValuePtr = %d (0x%08X)", ival, ival ); odbctest -> out_win -> insertLineLimited( txt ); if ( env_options[ index ].values[ 0 ].text ) { if ( env_options[ index ].is_bitmap ) { int i; for ( i = 0; env_options[ index ].values[ i ].text; i ++ ) { if ( env_options[ index ].values[ i ].value & ival ) { txt.sprintf( " %s", env_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } else { int i; for ( i = 0; env_options[ index ].values[ i ].text; i ++ ) { if ( env_options[ index ].values[ i ].value == ival ) { txt.sprintf( " %s", env_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } } break; case SQL_SMALLINT: SQLSMALLINT sval; memcpy( &sval, buf, sizeof( sval )); txt.sprintf( " *ValuePtr = %d (0x%04X)", sval, sval ); odbctest -> out_win -> insertLineLimited( txt ); if ( env_options[ index ].values[ 0 ].text ) { if ( env_options[ index ].is_bitmap ) { int i; for ( i = 0; env_options[ index ].values[ i ].text; i ++ ) { if ( env_options[ index ].values[ i ].value & sval ) { txt.sprintf( " %s", env_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } else { int i; for ( i = 0; env_options[ index ].values[ i ].text; i ++ ) { if ( env_options[ index ].values[ i ].value == sval ) { txt.sprintf( " %s", env_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } } break; } } if ( buf ) delete buf; odbctest -> out_win -> insertLineLimited( "" ); } void dGetEnvAttr::target_clkd() { if ( target_valid -> isOn() ) target_valid -> setText( "ValuePtr: SQL_NULL_POINTER" ); else target_valid -> setText( "ValuePtr: VALID" ); } void dGetEnvAttr::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "StrLen_Ptr: SQL_NULL_POINTER" ); else strlen_valid -> setText( "StrLen_Ptr: VALID" ); } dGetEnvAttr::dGetEnvAttr( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Environment Handle" ); handles -> setGeometry( 170, 50, 300, 20 ); odbctest->fill_handle_list( SQL_HANDLE_ENV, handles ); types = new QComboBox( FALSE, this, "Attribute" ); types -> setGeometry( 170, 80, 300, 20 ); parent->fill_list_box( env_options, types ); l_handle = new QLabel( "Environment Handle:", this ); l_handle -> setGeometry( 10, 50, 130, 20 ); l_types = new QLabel( "Attribute:", this ); l_types -> setGeometry( 10, 80, 130, 20 ); target_valid = new QCheckBox( "ValuePtr: VALID", this ); target_valid -> setGeometry( 10, 110, 300, 15 ); strlen_valid = new QCheckBox( "StrLen_Ptr: VALID", this ); strlen_valid -> setGeometry( 10, 140, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 400, 110, 70, 20 ); buffer_len -> setMaxLength( 7 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Len:", this ); l_buffer_len -> setGeometry( 320, 110, 60, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( target_valid, SIGNAL( clicked()), this, SLOT( target_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); } dGetEnvAttr::~dGetEnvAttr() { delete ok; delete cancel; delete help; delete types; delete handles; delete l_handle; delete l_types; delete target_valid; delete strlen_valid; delete buffer_len; delete l_buffer_len; } void dSetStmtAttr::Activated( int index ) { value -> clear(); if ( !stmt_options[ index ].values[ 0 ].text ) { switch( stmt_options[ index ].attr ) { case SQL_ATTR_FETCH_BOOKMARK_PTR: case SQL_ATTR_PARAM_BIND_OFFSET_PTR: case SQL_ATTR_PARAM_OPERATION_PTR: case SQL_ATTR_PARAM_STATUS_PTR: case SQL_ATTR_PARAMS_PROCESSED_PTR: case SQL_ATTR_ROW_BIND_OFFSET_PTR: case SQL_ATTR_ROW_OPERATION_PTR: case SQL_ATTR_ROW_STATUS_PTR: case SQL_ATTR_ROWS_FETCHED_PTR: value->insertItem( "", 0 ); break; default: value->insertItem( "0", 0 ); break; } } else { odbctest->fill_list_box( stmt_options[ index ].values, value ); } } void dSetStmtAttr::Ok() { SQLHANDLE in_handle = SQL_NULL_HSTMT; SQLINTEGER attribute; SQLPOINTER vptr; SQLUINTEGER ival; const char *tptr; attr_value *ptr; SQLINTEGER string_length; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); int index = types->currentItem(); int i; QString qtptr; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLSetStmtAttr():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statment Handle: %p", in_handle ); else txt.sprintf( " Statment Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); attribute = stmt_options[ types -> currentItem() ].attr; txt.sprintf( " Attribute: %s=%d", stmt_options[ types -> currentItem() ].text, stmt_options[ types -> currentItem() ].attr ); odbctest -> out_win -> insertLineLimited( txt ); qtptr = value -> currentText(); tptr = qtptr.ascii(); /* * try and match the text */ for ( ptr = stmt_options[ types -> currentItem() ].values; ptr -> text; ptr ++ ) { if ( strncmp( ptr -> text, tptr, strlen( ptr -> text )) == 0 ) { break; } } if ( !ptr -> text ) { if ( attribute == SQL_ATTR_ROW_ARRAY_SIZE || attribute == SQL_ATTR_PARAMSET_SIZE ) { ival = atoi( tptr ); } vptr = (SQLPOINTER) atoi( tptr ); txt.sprintf( " Value: %d", atoi( tptr )); } else { if ( attribute == SQL_ATTR_ROW_ARRAY_SIZE || attribute == SQL_ATTR_PARAMSET_SIZE ) { ival = ptr -> value; } vptr = (SQLPOINTER) ptr -> value; txt.sprintf( " Value: %s=%d", ptr -> text, ptr -> value ); } if ( strcmp( tptr, "" ) == 0 ) { switch( stmt_options[ types -> currentItem() ].attr ) { case SQL_ATTR_FETCH_BOOKMARK_PTR: vptr = hand-> bookmark_ptr; txt.sprintf( " Value: %x", vptr ); break; case SQL_ATTR_PARAM_BIND_OFFSET_PTR: vptr = hand-> param_bind_offset_ptr; txt.sprintf( " Value: %x", vptr ); break; case SQL_ATTR_PARAM_OPERATION_PTR: vptr = hand-> param_opt_ptr; txt.sprintf( " Value: %x", vptr ); break; case SQL_ATTR_PARAM_STATUS_PTR: vptr = hand-> param_status_ptr; txt.sprintf( " Value: %x", vptr ); break; case SQL_ATTR_PARAMS_PROCESSED_PTR: vptr = hand-> params_processed_ptr; txt.sprintf( " Value: %x", vptr ); break; case SQL_ATTR_ROW_BIND_OFFSET_PTR: vptr = hand-> row_bind_offset_ptr; txt.sprintf( " Value: %x", vptr ); break; case SQL_ATTR_ROW_OPERATION_PTR: vptr = hand-> row_operation_ptr; txt.sprintf( " Value: %x", vptr ); break; case SQL_ATTR_ROW_STATUS_PTR: vptr = hand-> row_status_ptr; txt.sprintf( " Value: %x", vptr ); break; case SQL_ATTR_ROWS_FETCHED_PTR: vptr = hand-> rows_fetched_ptr; txt.sprintf( " Value: %x", vptr ); break; } } odbctest -> out_win -> insertLineLimited( txt ); string_length = strlen_options[ stringlen -> currentItem() ].value; txt.sprintf( " String Length: %s=%d", strlen_options[ stringlen -> currentItem() ].text, strlen_options[ stringlen -> currentItem() ].value ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLSetStmtAttr( in_handle, attribute, vptr, string_length ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); /* * save the row or param array size */ if ( SQL_SUCCEEDED( ret )) { if ( attribute == SQL_ATTR_ROW_ARRAY_SIZE ) { hand -> row_array_size = ival; } else if ( attribute == SQL_ATTR_PARAMSET_SIZE ) { hand -> param_array_size = ival; } } } dSetStmtAttr::dSetStmtAttr( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 170, 50, 300, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); types = new QComboBox( FALSE, this, "Attribute" ); types -> setGeometry( 170, 80, 300, 20 ); parent->fill_list_box( stmt_options, types ); value = new QComboBox( TRUE, this, "Value" ); value -> setGeometry( 170, 110, 300, 20 ); parent->fill_list_box( stmt_options[ 0 ].values, value ); stringlen = new QComboBox( FALSE, this, "String Length" ); stringlen -> setGeometry( 170, 140, 300, 20 ); parent->fill_list_box( strlen_options, stringlen ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 130, 20 ); l_types = new QLabel( "Attribute:", this ); l_types -> setGeometry( 10, 80, 130, 20 ); l_value = new QLabel( "Value:", this ); l_value -> setGeometry( 10, 110, 130, 20 ); l_slen = new QLabel( "String Length:", this ); l_slen -> setGeometry( 10, 140, 130, 20 ); Activated( 0 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( types, SIGNAL(activated(int)), this, SLOT( Activated(int))); } dSetStmtAttr::~dSetStmtAttr() { delete ok; delete cancel; delete help; delete types; delete handles; delete value; delete stringlen; delete l_handle; delete l_types; delete l_value; delete l_slen; } void dSetStmtOption::Activated( int index ) { value -> clear(); if ( !stmt_opt_options[ index ].values[ 0 ].text ) { value->insertItem( "0", 0 ); } else { odbctest->fill_list_box( stmt_opt_options[ index ].values, value ); } } void dSetStmtOption::Ok() { SQLHANDLE in_handle = SQL_NULL_HSTMT; SQLINTEGER attribute; SQLINTEGER ival; SQLULEN vptr; const char *tptr; attr_value *ptr; SQLINTEGER string_length; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); int index = types->currentItem(); int i; QString qtptr; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLSetStmtOption():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " hstmt: %p", in_handle ); else txt.sprintf( " hstmt: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); attribute = stmt_opt_options[ types -> currentItem() ].attr; txt.sprintf( " fOption: %s=%d", stmt_opt_options[ types -> currentItem() ].text, stmt_opt_options[ types -> currentItem() ].attr ); odbctest -> out_win -> insertLineLimited( txt ); qtptr = value -> currentText(); tptr = qtptr.ascii(); /* * try and match the text */ for ( ptr = stmt_opt_options[ types -> currentItem() ].values; ptr -> text; ptr ++ ) { if ( strncmp( ptr -> text, tptr, strlen( ptr -> text )) == 0 ) { break; } } if ( !ptr -> text ) { vptr = (SQLULEN) atoi( tptr ); txt.sprintf( " vParam: %d", atoi( tptr )); if ( attribute == SQL_ROWSET_SIZE ) { ival = atoi( tptr ); } } else { vptr = (SQLULEN) ptr -> value; txt.sprintf( " vParam: %s=%d", ptr -> text, ptr -> value ); if ( attribute == SQL_ROWSET_SIZE ) { ival = ptr -> value; } } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLSetStmtOption( in_handle, attribute, vptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); /* * save the row or param array size */ if ( SQL_SUCCEEDED( ret )) { if ( attribute == SQL_ROWSET_SIZE ) { hand -> row_array_size = ival; } } } dSetStmtOption::dSetStmtOption( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 170, 50, 300, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); types = new QComboBox( FALSE, this, "Attribute" ); types -> setGeometry( 170, 80, 300, 20 ); parent->fill_list_box( stmt_opt_options, types ); value = new QComboBox( TRUE, this, "Value" ); value -> setGeometry( 170, 110, 300, 20 ); parent->fill_list_box( stmt_opt_options[ 0 ].values, value ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 130, 20 ); l_types = new QLabel( "fOption:", this ); l_types -> setGeometry( 10, 80, 130, 20 ); l_value = new QLabel( "vParam:", this ); l_value -> setGeometry( 10, 110, 130, 20 ); Activated( 0 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( types, SIGNAL(activated(int)), this, SLOT( Activated(int))); } dSetStmtOption::~dSetStmtOption() { delete ok; delete cancel; delete help; delete types; delete handles; delete value; delete l_handle; delete l_types; delete l_value; } void dGetStmtAttr::Ok() { SQLHANDLE in_handle = SQL_NULL_HENV; SQLINTEGER attribute; SQLPOINTER vptr; SQLINTEGER string_length; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); SQLINTEGER b_len, strlen_or_ind; SQLINTEGER *strlen_ptr; char *buf = NULL; int i; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetStmtAttr():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Statement Handle: %p", in_handle ); else txt.sprintf( " Statement Handle: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); attribute = stmt_options[ types -> currentItem() ].attr; txt.sprintf( " Attribute: %s=%d", stmt_options[ types -> currentItem() ].text, stmt_options[ types -> currentItem() ].attr ); odbctest -> out_win -> insertLineLimited( txt ); b_len = atoi( buffer_len -> text().ascii()); if ( b_len < 1 ) { b_len = 0; } if ( target_valid -> isOn()) { buf = NULL; } else if ( b_len < 300 ) { buf = new char[ 300 ]; } else { buf = new char[ b_len ]; } if ( buf ) { txt.sprintf( " Value Ptr: %p", buf ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Value Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } txt.sprintf( " Buffer Length: %d", b_len ); odbctest -> out_win -> insertLineLimited( txt ); strlen_or_ind = -999999; if ( strlen_valid -> isOn()) { strlen_ptr = NULL; } else { strlen_ptr = &strlen_or_ind; } if ( strlen_ptr ) { txt.sprintf( " Strlen Ptr: %p", strlen_ptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Strlen Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } SQLRETURN ret = SQLGetStmtAttr( in_handle, attribute, buf, b_len, strlen_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( strlen_ptr ) { if ( strlen_or_ind == -999999 ) { txt.sprintf( " *Strlen Ptr: " ); } else { txt.sprintf( " *Strlen Ptr: %d", strlen_or_ind ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( SQL_SUCCEEDED( ret )) { int index = types -> currentItem(); if ( stmt_options[ index ].is_pointer ) { void *ival; memcpy( &ival, buf, sizeof( ival )); txt.sprintf( " ValuePtr = 0x%08X", ival ); odbctest -> out_win -> insertLineLimited( txt ); } else { switch( stmt_options[ index ].data_type ) { case SQL_INTEGER: SQLUINTEGER ival; memcpy( &ival, buf, sizeof( ival )); txt.sprintf( " *ValuePtr = %d (0x%08X)", ival, ival ); odbctest -> out_win -> insertLineLimited( txt ); if ( stmt_options[ index ].values[ 0 ].text ) { if ( stmt_options[ index ].is_bitmap ) { int i; for ( i = 0; stmt_options[ index ].values[ i ].text; i ++ ) { if ( stmt_options[ index ].values[ i ].value & ival ) { txt.sprintf( " %s", stmt_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } else { int i; for ( i = 0; stmt_options[ index ].values[ i ].text; i ++ ) { if ( stmt_options[ index ].values[ i ].value == ival ) { txt.sprintf( " %s", stmt_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } } break; case SQL_SMALLINT: SQLSMALLINT sval; memcpy( &sval, buf, sizeof( sval )); txt.sprintf( " *ValuePtr = %d (0x%04X)", sval, sval ); odbctest -> out_win -> insertLineLimited( txt ); if ( stmt_options[ index ].values[ 0 ].text ) { if ( stmt_options[ index ].is_bitmap ) { int i; for ( i = 0; stmt_options[ index ].values[ i ].text; i ++ ) { if ( stmt_options[ index ].values[ i ].value & sval ) { txt.sprintf( " %s", stmt_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } else { int i; for ( i = 0; stmt_options[ index ].values[ i ].text; i ++ ) { if ( stmt_options[ index ].values[ i ].value == sval ) { txt.sprintf( " %s", stmt_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } } break; } } } if ( buf ) delete buf; odbctest -> out_win -> insertLineLimited( "" ); } void dGetStmtAttr::target_clkd() { if ( target_valid -> isOn() ) target_valid -> setText( "ValuePtr: SQL_NULL_POINTER" ); else target_valid -> setText( "ValuePtr: VALID" ); } void dGetStmtAttr::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "StrLen_Ptr: SQL_NULL_POINTER" ); else strlen_valid -> setText( "StrLen_Ptr: VALID" ); } dGetStmtAttr::dGetStmtAttr( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 170, 50, 300, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); types = new QComboBox( FALSE, this, "Attribute" ); types -> setGeometry( 170, 80, 300, 20 ); parent->fill_list_box( stmt_options, types ); l_handle = new QLabel( "Statement Handle:", this ); l_handle -> setGeometry( 10, 50, 130, 20 ); l_types = new QLabel( "Attribute:", this ); l_types -> setGeometry( 10, 80, 130, 20 ); target_valid = new QCheckBox( "ValuePtr: VALID", this ); target_valid -> setGeometry( 10, 110, 300, 15 ); strlen_valid = new QCheckBox( "StrLen_Ptr: VALID", this ); strlen_valid -> setGeometry( 10, 140, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 400, 110, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Len:", this ); l_buffer_len -> setGeometry( 320, 110, 60, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( target_valid, SIGNAL( clicked()), this, SLOT( target_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); } dGetStmtAttr::~dGetStmtAttr() { delete ok; delete cancel; delete help; delete types; delete handles; delete l_handle; delete l_types; delete target_valid; delete strlen_valid; delete buffer_len; delete l_buffer_len; } void dGetStmtOption::Ok() { SQLHANDLE in_handle = SQL_NULL_HENV; SQLINTEGER attribute, value; SQLPOINTER vptr; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_STMT, handles ); int index = types->currentItem(); char *buf = NULL; int i; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetStmtOption():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " hstmt: %p", in_handle ); else txt.sprintf( " hstmt: SQL_NULL_HSTMT" ); odbctest -> out_win -> insertLineLimited( txt ); attribute = stmt_opt_options[ types -> currentItem() ].attr; txt.sprintf( " fOption: %s=%d", stmt_opt_options[ types -> currentItem() ].text, stmt_opt_options[ types -> currentItem() ].attr ); odbctest -> out_win -> insertLineLimited( txt ); if ( target_valid -> isOn()) { buf = NULL; vptr = NULL; } else { if ( stmt_opt_options[ index ].data_type == SQL_INTEGER ) { vptr = &value; } else { buf = new char[ 300 ]; vptr = buf; } } if ( vptr ) { txt.sprintf( " vParam: %p", vptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " vParam: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } SQLRETURN ret = SQLGetStmtOption( in_handle, attribute, vptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( SQL_SUCCEEDED( ret )) { if ( vptr ) { switch( stmt_opt_options[ index ].data_type ) { case SQL_INTEGER: { int i; txt.sprintf( " *vptr = 0x%08X", value ); odbctest -> out_win -> insertLineLimited( txt ); for ( i = 0; stmt_opt_options[ index ].values[ i ].text; i ++ ) { if ( stmt_opt_options[ index ].values[ i ].value == value ) { txt.sprintf( " %s", stmt_opt_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } break; } default: txt.sprintf( " *vptr = %s", buf ); break; } } } if ( buf ) delete buf; odbctest -> out_win -> insertLineLimited( "" ); } void dGetStmtOption::target_clkd() { if ( target_valid -> isOn() ) target_valid -> setText( "vParam: SQL_NULL_POINTER" ); else target_valid -> setText( "vParam: VALID" ); } dGetStmtOption::dGetStmtOption( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "hstmt" ); handles -> setGeometry( 170, 50, 300, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); types = new QComboBox( FALSE, this, "fOption" ); types -> setGeometry( 170, 80, 300, 20 ); parent->fill_list_box( stmt_opt_options, types ); l_handle = new QLabel( "hstmt:", this ); l_handle -> setGeometry( 10, 50, 130, 20 ); l_types = new QLabel( "fOption:", this ); l_types -> setGeometry( 10, 80, 130, 20 ); target_valid = new QCheckBox( "vParam: VALID", this ); target_valid -> setGeometry( 10, 110, 300, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( target_valid, SIGNAL( clicked()), this, SLOT( target_clkd())); } dGetStmtOption::~dGetStmtOption() { delete ok; delete cancel; delete help; delete types; delete handles; delete l_handle; delete l_types; delete target_valid; } void dSetConnAttr::Activated( int index ) { value -> clear(); if ( !conn_options[ index ].values[ 0 ].text ) { if ( conn_options[ index ].data_type == SQL_CHAR ) { value->insertItem( "", 0 ); value->insertItem( "", 1 ); } else { value->insertItem( "0", 0 ); } } else { odbctest->fill_list_box( conn_options[ index ].values, value ); } } void dSetConnAttr::Ok() { SQLHANDLE in_handle = SQL_NULL_HDBC; SQLINTEGER attribute; SQLPOINTER vptr; SQLINTEGER string_length; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); int i; attr_value *ptr; const char *tptr; QString qtptr; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLSetConnectAttr():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Connection Handle: %p", in_handle ); else txt.sprintf( " Connection Handle: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); attribute = conn_options[ types -> currentItem() ].attr; txt.sprintf( " Attribute: %s=%d", conn_options[ types -> currentItem() ].text, conn_options[ types -> currentItem() ].attr ); odbctest -> out_win -> insertLineLimited( txt ); qtptr = value -> currentText(); tptr = qtptr.ascii(); /* * try and match the text */ for ( ptr = conn_options[ types -> currentItem() ].values; ptr -> text; ptr ++ ) { if ( strncmp( ptr -> text, tptr, strlen( ptr -> text )) == 0 ) { break; } } if ( !ptr -> text ) { if ( conn_options[ types -> currentItem() ].data_type == SQL_CHAR ) { vptr = (SQLPOINTER) tptr; if ( strncmp( "", tptr, 14 ) == 0 ) { vptr = NULL; txt.sprintf( " Value: SQL_NULL_POINTER" ); } else { vptr = (SQLPOINTER) tptr; txt.sprintf( " Value: %s", tptr ); } } else { vptr = (SQLPOINTER) atoi( tptr ); txt.sprintf( " Value: %d", atoi( tptr )); } } else { vptr = (SQLPOINTER) ptr -> value; txt.sprintf( " Value: %s=%d", ptr -> text, ptr -> value ); } odbctest -> out_win -> insertLineLimited( txt ); string_length = strlen_options[ stringlen -> currentItem() ].value; txt.sprintf( " String Length: %s=%d", strlen_options[ stringlen -> currentItem() ].text, strlen_options[ stringlen -> currentItem() ].value ); odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLSetConnectAttr( in_handle, attribute, vptr, string_length ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dSetConnAttr::dSetConnAttr( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Connection Handle" ); handles -> setGeometry( 170, 50, 300, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); types = new QComboBox( FALSE, this, "Attribute" ); types -> setGeometry( 170, 80, 300, 20 ); parent->fill_list_box( conn_options, types ); value = new QComboBox( TRUE, this, "Value" ); value -> setGeometry( 170, 110, 300, 20 ); parent->fill_list_box( conn_options[ 0 ].values, value ); stringlen = new QComboBox( FALSE, this, "String Length" ); stringlen -> setGeometry( 170, 140, 300, 20 ); parent->fill_list_box( strlen_options, stringlen ); l_handle = new QLabel( "Connection Handle:", this ); l_handle -> setGeometry( 10, 50, 130, 20 ); l_types = new QLabel( "Attribute:", this ); l_types -> setGeometry( 10, 80, 130, 20 ); l_value = new QLabel( "Value:", this ); l_value -> setGeometry( 10, 110, 130, 20 ); l_slen = new QLabel( "String Length:", this ); l_slen -> setGeometry( 10, 140, 130, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( types, SIGNAL(activated(int)), this, SLOT( Activated(int))); } dSetConnAttr::~dSetConnAttr() { delete ok; delete cancel; delete help; delete types; delete handles; delete value; delete stringlen; delete l_handle; delete l_types; delete l_value; delete l_slen; } void dGetConnAttr::Ok() { SQLHANDLE in_handle = SQL_NULL_HDBC; SQLINTEGER attribute; SQLPOINTER vptr; SQLINTEGER string_length; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); SQLINTEGER b_len, strlen_or_ind; SQLINTEGER *strlen_ptr; char *buf = NULL; int i; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetConnectAttr():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " Connection Handle: %p", in_handle ); else txt.sprintf( " Connection Handle: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); attribute = conn_options[ types -> currentItem() ].attr; txt.sprintf( " Attribute: %s=%d", conn_options[ types -> currentItem() ].text, conn_options[ types -> currentItem() ].attr ); odbctest -> out_win -> insertLineLimited( txt ); b_len = atoi( buffer_len -> text().ascii()); if ( b_len < 1 ) { b_len = 0; } if ( target_valid -> isOn()) { buf = NULL; } else if ( b_len < 300 ) { buf = new char[ 300 ]; } else { buf = new char[ b_len ]; } if ( buf ) { txt.sprintf( " Value Ptr: %p", buf ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Value Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } txt.sprintf( " Buffer Length: %d", b_len ); odbctest -> out_win -> insertLineLimited( txt ); strlen_or_ind = -999999; if ( strlen_valid -> isOn()) { strlen_ptr = NULL; } else { strlen_ptr = &strlen_or_ind; } if ( strlen_ptr ) { txt.sprintf( " Strlen Ptr: %p", strlen_ptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " Strlen Ptr: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } SQLRETURN ret = SQLGetConnectAttr( in_handle, attribute, buf, b_len, strlen_ptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( strlen_ptr ) { if ( strlen_or_ind == -999999 ) { txt.sprintf( " *Strlen Ptr: " ); } else { txt.sprintf( " *Strlen Ptr: %d", strlen_or_ind ); } odbctest -> out_win -> insertLineLimited( txt ); } if ( SQL_SUCCEEDED( ret )) { int index = types -> currentItem(); switch( conn_options[ index ].data_type ) { case SQL_CHAR: txt.sprintf( " *InfoValuePtr = \"%s\"", buf ); odbctest -> out_win -> insertLineLimited( txt ); break; case SQL_INTEGER: SQLUINTEGER ival; memcpy( &ival, buf, sizeof( ival )); txt.sprintf( " *ValuePtr = %d (0x%08X)", ival, ival ); odbctest -> out_win -> insertLineLimited( txt ); if ( conn_options[ index ].values[ 0 ].text ) { if ( conn_options[ index ].is_bitmap ) { int i; for ( i = 0; conn_options[ index ].values[ i ].text; i ++ ) { if ( conn_options[ index ].values[ i ].value & ival ) { txt.sprintf( " %s", conn_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } else { int i; for ( i = 0; conn_options[ index ].values[ i ].text; i ++ ) { if ( conn_options[ index ].values[ i ].value == ival ) { txt.sprintf( " %s", conn_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } } break; case SQL_SMALLINT: SQLSMALLINT sval; memcpy( &sval, buf, sizeof( sval )); txt.sprintf( " *ValuePtr = %d (0x%04X)", sval, sval ); odbctest -> out_win -> insertLineLimited( txt ); if ( conn_options[ index ].values[ 0 ].text ) { if ( conn_options[ index ].is_bitmap ) { int i; for ( i = 0; conn_options[ index ].values[ i ].text; i ++ ) { if ( conn_options[ index ].values[ i ].value & sval ) { txt.sprintf( " %s", conn_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } else { int i; for ( i = 0; conn_options[ index ].values[ i ].text; i ++ ) { if ( conn_options[ index ].values[ i ].value == sval ) { txt.sprintf( " %s", conn_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } } } break; } } if ( buf ) delete buf; odbctest -> out_win -> insertLineLimited( "" ); } void dGetConnAttr::target_clkd() { if ( target_valid -> isOn() ) target_valid -> setText( "ValuePtr: SQL_NULL_POINTER" ); else target_valid -> setText( "ValuePtr: VALID" ); } void dGetConnAttr::strlen_clkd() { if ( strlen_valid -> isOn() ) strlen_valid -> setText( "StrLen_Ptr: SQL_NULL_POINTER" ); else strlen_valid -> setText( "StrLen_Ptr: VALID" ); } dGetConnAttr::dGetConnAttr( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Connection Handle" ); handles -> setGeometry( 170, 50, 300, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); types = new QComboBox( FALSE, this, "Attribute" ); types -> setGeometry( 170, 80, 300, 20 ); parent->fill_list_box( conn_options, types ); l_handle = new QLabel( "Connection Handle:", this ); l_handle -> setGeometry( 10, 50, 130, 20 ); l_types = new QLabel( "Attribute:", this ); l_types -> setGeometry( 10, 80, 130, 20 ); target_valid = new QCheckBox( "ValuePtr: VALID", this ); target_valid -> setGeometry( 10, 110, 300, 15 ); strlen_valid = new QCheckBox( "StrLen_Ptr: VALID", this ); strlen_valid -> setGeometry( 10, 140, 300, 15 ); buffer_len = new QLineEdit( this, "Buffer Len" ); buffer_len -> setGeometry( 400, 110, 70, 20 ); buffer_len -> setMaxLength( 6 ); buffer_len -> setText( "300" ); l_buffer_len = new QLabel( "Buffer Len:", this ); l_buffer_len -> setGeometry( 320, 110, 60, 20 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( target_valid, SIGNAL( clicked()), this, SLOT( target_clkd())); connect( strlen_valid, SIGNAL( clicked()), this, SLOT( strlen_clkd())); } dGetConnAttr::~dGetConnAttr() { delete ok; delete cancel; delete help; delete types; delete handles; delete l_handle; delete l_types; delete target_valid; delete strlen_valid; delete buffer_len; delete l_buffer_len; } void dSetConnectOption::Activated( int index ) { value -> clear(); if ( !conn_opt_options[ index ].values[ 0 ].text ) { if ( conn_opt_options[ index ].data_type == SQL_CHAR ) { value->insertItem( "", 0 ); value->insertItem( "", 1 ); } else { value->insertItem( "0", 0 ); } } else { odbctest->fill_list_box( conn_opt_options[ index ].values, value ); } } void dSetConnectOption::Ok() { SQLHANDLE in_handle = SQL_NULL_HDBC; SQLINTEGER attribute; SQLULEN vptr; const char *tptr; attr_value *ptr; SQLINTEGER string_length; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); int i; QString qtptr; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLSetConnectOption():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " hdbc: %p", in_handle ); else txt.sprintf( " hdbc: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); attribute = conn_opt_options[ types -> currentItem() ].attr; txt.sprintf( " fOption: %s=%d", conn_opt_options[ types -> currentItem() ].text, conn_opt_options[ types -> currentItem() ].attr ); odbctest -> out_win -> insertLineLimited( txt ); qtptr = value -> currentText(); tptr = qtptr.ascii(); /* * try and match the text */ for ( ptr = conn_opt_options[ types -> currentItem() ].values; ptr -> text; ptr ++ ) { if ( strncmp( ptr -> text, tptr, strlen( ptr -> text )) == 0 ) { break; } } if ( !ptr -> text ) { // This can't be done on 64 bit with old definitions... if ( conn_opt_options[ types -> currentItem() ].data_type == SQL_CHAR ) { #if (SIZEOF_LONG_INT == 8) #ifndef DO_YOU_KNOW_WHAT_YOUR_ARE_DOING fprintf( stderr, "unable to do this on this processor with 32 bit build options...\n" ); #else vptr = (SQLULEN) tptr; #endif #else vptr = (SQLULEN) tptr; #endif if ( strncmp( "", tptr, 14 ) == 0 ) { vptr = 0; txt.sprintf( " vParam: SQL_NULL_POINTER" ); } else { #if (SIZEOF_LONG_INT == 8) #ifndef DO_YOU_KNOW_WHAT_YOUR_ARE_DOING fprintf( stderr, "unable to do this on this processor with 32 bit build options...\n" ); #else vptr = (SQLULEN) tptr; #endif #else vptr = (SQLULEN) tptr; #endif txt.sprintf( " vParam: %s", tptr ); } } else { vptr = (SQLULEN) atoi( tptr ); txt.sprintf( " vParam: %d", atoi( tptr )); } } else { vptr = (SQLULEN) ptr -> value; txt.sprintf( " vParam: %s=%d", ptr -> text, ptr -> value ); } odbctest -> out_win -> insertLineLimited( txt ); SQLRETURN ret = SQLSetConnectOption( in_handle, attribute, vptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( "" ); } dSetConnectOption::dSetConnectOption( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "Statement Handle" ); handles -> setGeometry( 170, 50, 300, 20 ); odbctest->fill_handle_list( SQL_HANDLE_STMT, handles ); types = new QComboBox( FALSE, this, "Attribute" ); types -> setGeometry( 170, 80, 300, 20 ); parent->fill_list_box( conn_opt_options, types ); value = new QComboBox( TRUE, this, "Value" ); value -> setGeometry( 170, 110, 300, 20 ); parent->fill_list_box( conn_opt_options[ 0 ].values, value ); l_handle = new QLabel( "hdbc:", this ); l_handle -> setGeometry( 10, 50, 130, 20 ); l_types = new QLabel( "fOption:", this ); l_types -> setGeometry( 10, 80, 130, 20 ); l_value = new QLabel( "vParam:", this ); l_value -> setGeometry( 10, 110, 130, 20 ); Activated( 0 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( types, SIGNAL(activated(int)), this, SLOT( Activated(int))); } dSetConnectOption::~dSetConnectOption() { delete ok; delete cancel; delete help; delete types; delete handles; delete value; delete l_handle; delete l_types; delete l_value; } void dGetConnectOption::Ok() { SQLHANDLE in_handle = SQL_NULL_HENV; SQLINTEGER attribute, value; SQLPOINTER vptr; Handle *hand = odbctest->extract_handle_list( SQL_HANDLE_DBC, handles ); int index = types->currentItem(); char *buf = NULL; int i; if ( hand ) in_handle = hand -> getHandle(); odbctest -> out_win -> insertLineLimited( "SQLGetConnectOption():" ); odbctest -> out_win -> insertLineLimited( " In:" ); if ( in_handle ) txt.sprintf( " hdbc: %p", in_handle ); else txt.sprintf( " hdbc: SQL_NULL_HDBC" ); odbctest -> out_win -> insertLineLimited( txt ); attribute = conn_gopt_options[ types -> currentItem() ].attr; txt.sprintf( " fOption: %s=%d", conn_gopt_options[ types -> currentItem() ].text, conn_gopt_options[ types -> currentItem() ].attr ); odbctest -> out_win -> insertLineLimited( txt ); if ( target_valid -> isOn()) { buf = NULL; vptr = NULL; } else { if ( conn_gopt_options[ index ].data_type == SQL_INTEGER ) { vptr = &value; } else { buf = new char[ 300 ]; vptr = buf; } } if ( vptr ) { txt.sprintf( " vParam: %p", vptr ); odbctest -> out_win -> insertLineLimited( txt ); } else { txt.sprintf( " vParam: SQL_NULL_POINTER" ); odbctest -> out_win -> insertLineLimited( txt ); } SQLRETURN ret = SQLGetConnectOption( in_handle, attribute, vptr ); odbctest -> out_win -> insertLineLimited( " Return:" ); txt.sprintf( " %s=%d", odbctest->return_as_text( ret ), ret ); odbctest -> out_win -> insertLineLimited( txt ); odbctest -> out_win -> insertLineLimited( " Out:" ); if ( SQL_SUCCEEDED( ret )) { if ( vptr ) { switch( conn_gopt_options[ index ].data_type ) { case SQL_INTEGER: { int i; txt.sprintf( " *vptr = 0x%08X", value ); odbctest -> out_win -> insertLineLimited( txt ); for ( i = 0; conn_gopt_options[ index ].values[ i ].text; i ++ ) { if ( conn_gopt_options[ index ].values[ i ].value == value ) { txt.sprintf( " %s", conn_gopt_options[ index ].values[ i ].text ); odbctest -> out_win -> insertLineLimited( txt ); } } break; } default: txt.sprintf( " *vptr = %s", buf ); break; } } } if ( buf ) delete buf; odbctest -> out_win -> insertLineLimited( "" ); } void dGetConnectOption::target_clkd() { if ( target_valid -> isOn() ) target_valid -> setText( "vParam: SQL_NULL_POINTER" ); else target_valid -> setText( "vParam: VALID" ); } dGetConnectOption::dGetConnectOption( OdbcTest *parent, QString name ) : QDialog( parent, name, TRUE ) { setCaption( name ); odbctest = parent; ok = new QPushButton( "OK", this ); ok->setGeometry( 240,10, 70,25 ); cancel = new QPushButton( "Cancel", this ); cancel->setGeometry( 320,10, 70,25 ); help = new QPushButton( "Help", this ); help->setGeometry( 400,10, 70,25 ); handles = new QComboBox( FALSE, this, "hdbc" ); handles -> setGeometry( 170, 50, 300, 20 ); odbctest->fill_handle_list( SQL_HANDLE_DBC, handles ); types = new QComboBox( FALSE, this, "fOption" ); types -> setGeometry( 170, 80, 300, 20 ); parent->fill_list_box( conn_gopt_options, types ); l_handle = new QLabel( "hstmt:", this ); l_handle -> setGeometry( 10, 50, 130, 20 ); l_types = new QLabel( "fOption:", this ); l_types -> setGeometry( 10, 80, 130, 20 ); target_valid = new QCheckBox( "vParam: VALID", this ); target_valid -> setGeometry( 10, 110, 300, 15 ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); connect( ok, SIGNAL(clicked()), SLOT(Ok()) ); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); connect( target_valid, SIGNAL( clicked()), this, SLOT( target_clkd())); } dGetConnectOption::~dGetConnectOption() { delete ok; delete cancel; delete help; delete types; delete handles; delete l_handle; delete l_types; delete target_valid; } void OdbcTest::sqlsetstmtattr() { dSetStmtAttr *dlg = new dSetStmtAttr( this, "SQLSetStmtAttr" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetstmtattr() { dGetStmtAttr *dlg = new dGetStmtAttr( this, "SQLGetStmtAttr" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlsetconnectattr() { dSetConnAttr *dlg = new dSetConnAttr( this, "SQLSetConnectAttr" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetconnectattr() { dGetConnAttr *dlg = new dGetConnAttr( this, "SQLGetConnectAttr" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlsetenvattr() { dSetEnvAttr *dlg = new dSetEnvAttr( this, "SQLSetEnvAttr" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetenvattr() { dGetEnvAttr *dlg = new dGetEnvAttr( this, "SQLGetEnvAttr" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlsetstmtoption() { dSetStmtOption *dlg = new dSetStmtOption( this, "SQLSetStmtOption" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetstmtoption() { dGetStmtOption *dlg = new dGetStmtOption( this, "SQLGetStmtOption" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlsetconnectoption() { dSetConnectOption *dlg = new dSetConnectOption( this, "SQLSetConnectOption" ); dlg -> exec(); delete dlg; } void OdbcTest::sqlgetconnectoption() { dGetConnectOption *dlg = new dGetConnectOption( this, "SQLGetConnectOption" ); dlg -> exec(); delete dlg; } void OdbcTest::setcursoratributes() { QMessageBox::about( this, "ODBC Test", "Not yet implemented" ); } unixODBC-2.2.14-p2/odbctest/results.h0100644000076400007640000002013510564052121015653 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * **********************************************************************/ #ifndef RESULTS_H #define RESULTS_H #ifdef QT_V4LAYOUT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include "odbctest.h" class dGetData : public QDialog { Q_OBJECT public: dGetData( OdbcTest *parent, QString name ); ~dGetData(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *type; QLineEdit *column_num; QLineEdit *buffer_len; QCheckBox *target_valid, *strlen_valid; QLabel *l_handle, *l_column_num, *l_type, *l_buffer_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void target_clkd(); void strlen_clkd(); void Ok(); }; class dDescribeCol : public QDialog { Q_OBJECT public: dDescribeCol( OdbcTest *parent, QString name ); ~dDescribeCol(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLineEdit *column_num; QLineEdit *column_len; QLabel *l_handle, *l_column_num, *l_column_len; QCheckBox *name_valid; QCheckBox *type_valid; QCheckBox *size_valid; QCheckBox *digit_valid; QCheckBox *null_valid; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; const char *data_type_to_str( int ); protected slots: void name_clkd(); void type_clkd(); void size_clkd(); void digit_clkd(); void null_clkd(); void Ok(); }; class dNumResultCols : public QDialog { Q_OBJECT public: dNumResultCols( OdbcTest *parent, QString name ); ~dNumResultCols(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QCheckBox *valid; QLabel *l_handle; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void out_handle_ptr_clkd(); void Ok(); }; class dFetch : public QDialog { Q_OBJECT public: dFetch( OdbcTest *parent, QString name ); ~dFetch(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLabel *l_handle; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dRowCount : public QDialog { Q_OBJECT public: dRowCount( OdbcTest *parent, QString name ); ~dRowCount(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLabel *l_handle; QCheckBox *valid; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void Valid(); }; class dMoreResults : public QDialog { Q_OBJECT public: dMoreResults( OdbcTest *parent, QString name ); ~dMoreResults(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLabel *l_handle; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dSetPos : public QDialog { Q_OBJECT public: dSetPos( OdbcTest *parent, QString name ); ~dSetPos(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *operation, *lock_type; QLabel *l_handle, *l_operation, *l_lock_type, *l_row_number; QLineEdit *row_number; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dBulkOperations : public QDialog { Q_OBJECT public: dBulkOperations( OdbcTest *parent, QString name ); ~dBulkOperations(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *operation; QLabel *l_handle, *l_operation; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dColAttribute : public QDialog { Q_OBJECT public: dColAttribute( OdbcTest *parent, QString name ); ~dColAttribute(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *field_ident; QLabel *l_handles, *l_buffer_len, *l_col_num, *l_diag_info; QLabel *l_field_ident; QCheckBox *char_ptr_valid, *strlen_valid, *numeric_valid; QLineEdit *buffer_len, *col_num; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void char_ptr_clkd(); void strlen_clkd(); void numeric_clkd(); }; class dColAttributes : public QDialog { Q_OBJECT public: dColAttributes( OdbcTest *parent, QString name ); ~dColAttributes(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *field_ident; QLabel *l_handles, *l_buffer_len, *l_col_num, *l_diag_info; QLabel *l_field_ident; QCheckBox *char_ptr_valid, *strlen_valid, *numeric_valid; QLineEdit *buffer_len, *col_num; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void char_ptr_clkd(); void strlen_clkd(); void numeric_clkd(); }; class dFetchScroll : public QDialog { Q_OBJECT public: dFetchScroll( OdbcTest *parent, QString name ); ~dFetchScroll(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *orentation; QLabel *l_handle, *l_orentation, *l_offset; QLineEdit *offset; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dExtendedFetch : public QDialog { Q_OBJECT public: dExtendedFetch( OdbcTest *parent, QString name ); ~dExtendedFetch(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *orentation; QLabel *l_handle, *l_orentation, *l_offset; QLineEdit *offset; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif QCheckBox *count_ptr_valid, *status_ptr_valid; OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void count_ptr_clkd(); void status_ptr_clkd(); }; class dSetScrollOptions : public QDialog { Q_OBJECT public: dSetScrollOptions( OdbcTest *parent, QString name ); ~dSetScrollOptions(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *concurrency, *keyset; QLabel *l_handle, *l_concurrency, *l_keyset, *l_rowset; QLineEdit *rowset; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; #endif unixODBC-2.2.14-p2/odbctest/stmt.h0100644000076400007640000002221710564052121015144 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * **********************************************************************/ #ifndef STMT_H #define STMT_H #ifdef QT_V4LAYOUT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include "odbctest.h" class dPrepare : public QDialog { Q_OBJECT public: dPrepare( OdbcTest *parent, QString name ); ~dPrepare(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *str, *name_len; QLabel *l_handle, *l_str, *l_name_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dExecute : public QDialog { Q_OBJECT public: dExecute( OdbcTest *parent, QString name ); ~dExecute(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLabel *l_handle; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dExecDirect : public QDialog { Q_OBJECT public: dExecDirect( OdbcTest *parent, QString name ); ~dExecDirect(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *str, *name_len; QLabel *l_handle, *l_str, *l_name_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dNumParams : public QDialog { Q_OBJECT public: dNumParams( OdbcTest *parent, QString name ); ~dNumParams(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QCheckBox *valid; QLabel *l_handle; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Valid(); void Ok(); }; class dCancel : public QDialog { Q_OBJECT public: dCancel( OdbcTest *parent, QString name ); ~dCancel(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLabel *l_handle; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dCloseCursor : public QDialog { Q_OBJECT public: dCloseCursor( OdbcTest *parent, QString name ); ~dCloseCursor(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLabel *l_handle; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dGetCursorName : public QDialog { Q_OBJECT public: dGetCursorName( OdbcTest *parent, QString name ); ~dGetCursorName(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *option; QLabel *l_handle, *l_option, *l_buffer_len; QCheckBox *name_valid, *cursor_valid; QLineEdit *buffer_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void CursorValid(); void NameValid(); }; class dFreeStmt : public QDialog { Q_OBJECT public: dFreeStmt( OdbcTest *parent, QString name ); ~dFreeStmt(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *option; QLabel *l_handle, *l_option; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dSetCursorName : public QDialog { Q_OBJECT public: dSetCursorName( OdbcTest *parent, QString name ); ~dSetCursorName(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *str, *name_len; QLabel *l_handle, *l_str, *l_name_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dDescribeParam : public QDialog { Q_OBJECT public: dDescribeParam( OdbcTest *parent, QString name ); ~dDescribeParam(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLineEdit *param_num; QLabel *l_handle, *l_param_num; QCheckBox *type_valid; QCheckBox *digit_valid; QCheckBox *size_valid; QCheckBox *null_valid; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; const char *data_type_to_str( int ); protected slots: void type_clkd(); void digit_clkd(); void size_clkd(); void null_clkd(); void Ok(); }; class dParamData : public QDialog { Q_OBJECT public: dParamData( OdbcTest *parent, QString name ); ~dParamData(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLabel *l_handle; QCheckBox *value_valid; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void value_clkd(); void Ok(); }; class dParamOption : public QDialog { Q_OBJECT public: dParamOption( OdbcTest *parent, QString name ); ~dParamOption(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLabel *l_handle; QLineEdit *crow_num; QLabel *l_param_num, *l_crow_num; QCheckBox *pirow_valid; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void pirow_clkd(); void Ok(); }; class dPutData : public QDialog { Q_OBJECT public: dPutData( OdbcTest *parent, QString name ); ~dPutData(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *data_ptr, *str_len; QLabel *l_handle, *l_data_ptr, *l_str_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dBindParameter : public QDialog { Q_OBJECT public: dBindParameter( OdbcTest *parent, QString name ); ~dBindParameter(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *io_type, *value_type; QComboBox *param_type, *param_value, *strlen_or_ind; QLabel *l_handle, *l_io_type, *l_value_type; QLabel *l_param_type, *l_param_value, *l_strlen_or_ind, *l_param_num; QLineEdit *column_size, *decimal_digits, *buffer_length, *param_num; QLabel *l_column_size, *l_decimal_digits, *l_buffer_length; QCheckBox *len_data_at_exec; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dBindParam : public QDialog { Q_OBJECT public: dBindParam( OdbcTest *parent, QString name ); ~dBindParam(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *value_type; QComboBox *param_type, *param_value, *strlen_or_ind; QLabel *l_handle, *l_value_type; QLabel *l_param_type, *l_param_value, *l_strlen_or_ind, *l_param_num; QLineEdit *column_size, *decimal_digits, *param_num; QLabel *l_column_size, *l_decimal_digits; QCheckBox *len_data_at_exec; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dAllocStmt : public QDialog { Q_OBJECT public: dAllocStmt( OdbcTest *parent, QString name ); ~dAllocStmt(); protected: QPushButton *ok, *cancel, *help; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif QCheckBox *handle_valid; QComboBox *handles; QLabel *l_handles; OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void handle_clkd(); }; #endif unixODBC-2.2.14-p2/odbctest/odbctest.h0100644000076400007640000001640010564052121015761 0ustar nicknick/**************************************************************************** * such slot OdbcTest::options() * QObject::connec ** $Id: odbctest.h,v 1.3 2007/02/12 11:49:37 lurcher Exp $ ** ** Copyright (C) 1992-1999 Troll Tech AS. All rights reserved. ** ** This file is part of an example program for Qt. This example ** program may be used, distributed and modified without limitation. ** *****************************************************************************/ #ifndef ODBCTEST_H #define ODBCTEST_H #include #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #if (QT_VERSION>=300) #include #endif #include #endif #include #ifdef QT_V4LAYOUT #define LView Q3ListView #define PList Q3PtrList #define LViewItem Q3ListViewItem #define MWindow Q3MainWindow #define TBar Q3ToolBar #define PMenu Q3PopupMenu #define MLEdit Q3MultiLineEdit #else #define LView QListView #define LViewItem QListViewItem #define MWindow QMainWindow #define TBar QToolBar #define PMenu QPopupMenu #define PList QList #define MLEdit QMultiLineEdit #endif /* * structure that defines the options and values */ typedef struct attr_value { const char *text; int value; const char *version; int data_type; } attr_value; typedef struct attr_options { const char *text; int attr; attr_value values[ 25 ]; const char *version; int data_type; int is_bitmap; int is_pointer; } attr_options; class Handle { public: Handle( int t, SQLHANDLE h, PList &list ); Handle( int t, SQLHANDLE h, QString desc = NULL, SQLHANDLE stmt = SQL_NULL_HANDLE ); Handle( Handle &e ); ~Handle(); char * toStr( char * str ); SQLHANDLE getHandle( void ) { return handle; }; SQLHANDLE getStmtHandle( void ) { return stmt_handle; }; int getType( void ) { return type; }; char *bookmark_ptr; SQLUINTEGER row_array_size; SQLUINTEGER param_array_size; SQLUINTEGER *param_bind_offset_ptr, param_bind_offset; SQLUSMALLINT *param_opt_ptr, param_opt; SQLUSMALLINT *param_status_ptr, param_status; SQLUINTEGER *params_processed_ptr, params_processed; SQLUINTEGER *row_bind_offset_ptr, row_bind_offset; SQLUSMALLINT *row_operation_ptr, row_operation; SQLUSMALLINT *row_status_ptr, row_status; SQLUINTEGER *rows_fetched_ptr, rows_fetched; private: int type; SQLHANDLE handle; QString description; int implicit; SQLHANDLE stmt_handle; PList *handle_list; }; #if (QT_VERSION<300) class QTextEdit : public QMultiLineEdit { public: QTextEdit (QWidget *, const char *); void setMaxLength( int x ); void append( const char *str ); void maxLines( int n ); }; #endif class OutputWin : public QTextEdit { public: OutputWin( QWidget *parent = 0, const char *name = 0 ); void insertLineLimited( const char * str ); void setMaxLines( int ); private: int max_lines; }; class OdbcTest : public MWindow { Q_OBJECT public: OdbcTest( QWidget *parent=0, const char *name=0 ); QSplitter *split; MLEdit *in_win; OutputWin *out_win; PList listHandle; const char *return_as_text( int ret ); void fill_list_box( attr_value *attr, QComboBox *lst ); void fill_list_box( attr_options *attr, QComboBox *lst ); void dumpError( int type, SQLHANDLE ); Handle *fill_handle_list( int type, QComboBox *lst ); Handle *extract_handle_list( int type, QComboBox *lst ); const char *int_type_as_string( SQLINTERVAL ); SQLHANDLE get_handle( int type ); public slots: void about(); void testhelp(); void apihelp(); void open(); void saveas(); void saveopt(); void undo(); void cut(); void copy(); void paste(); void del(); void clearow(); void selectall(); void wrap(); void sqlgetdiagrec(); void sqlgetdiagfield(); void sqlerror(); void errorall(); void sqlallochandle(); void sqldatasources(); void sqldrivers(); void sqlendtran(); void sqlfreehandle(); void datasourcesall(); void driversall(); void sqlbrowseconnect(); void sqlconnect(); void sqldriverconnect(); void sqldisconnect(); void sqlgetinfo(); void getinfodbc( SQLHANDLE dbc = SQL_NULL_HANDLE ); void sqlgetfunctions(); void sqlnativesql(); void fullconnect(); void fulldisconnect(); void getinfoall(); void getfunctionsall(); void sqlcopydesc(); void sqlgetdescfield(); void sqlgetdescrec(); void sqlsetdescfield(); void sqlsetdescrec(); void getdescriptorsall(); void sqlbindparameter(); void sqlcancel(); void sqlclosecursor(); void sqldescribeparam(); void sqlexecute(); void sqlexecdirect(); void sqlfreestmt(); void sqlgetcursorname(); void sqlnumparams(); void sqlparamdata(); void sqlparamoptions(); void sqlprepare(); void sqlputdata(); void sqlsetcursorname(); void fillparam(); void showparam(); void showcursorsettings(); void sqlsetstmtattr(); void sqlgetstmtattr(); void sqlsetconnectattr(); void sqlgetconnectattr(); void sqlsetenvattr(); void sqlgetenvattr(); void setcursoratributes(); void sqlbindcol(); void sqlbulkoperations(); void sqlcolattributes(); void sqlcolattribute(); void sqldescribecol(); void sqlextendedfetch(); void sqlfetch(); void sqlfetchscroll(); void sqlgetdata(); void sqlmoreresults(); void sqlnumresultscols(); void sqlrowcount(); void sqlsetpos(); void sqlsetscrolloptions(); void bindcolall(); void describecolall(); void fetchall(); void getdataall(); void getdatastmt( SQLHANDLE hstmt = SQL_NULL_HANDLE ); void showboundcols(); void displayrowset(); void sqlcolumns(); void sqlcolumnprivileges(); void sqlgettypeinfo(); void sqlforeignkeys(); void sqlprimarykeys(); void sqlprocedures(); void sqlprocedurecolumns(); void sqlspecialcolumns(); void sqlstatistics(); void sqltables(); void sqltableprivileges(); void sqlmanagedatasources(); void sqlremovedefaultdatasource(); void sqlconfigdatasource(); void sqlcreatedatasource(); void sqlvaliddsn(); void sqlremovedsnfromini(); void sqlwritedsntoini(); void sqlremovedrivers(); void sqlconfigdrivers(); void sqlinstalldriver(); void sqlinstalldriverex(); void sqlgetinstalleddrivers(); void sqlremovedrivermanager(); void sqlinstalldrivermanager(); void sqlreadfiledsn(); void sqlwritefiledsn(); void sqlwriteprivateprofilestring(); void sqlgetprivateprofilestring(); void sqlinstalltranslator(); void sqlinstalltranslatorex(); void sqlremovetranslator(); void sqlgettranslator(); void sqlsetconfigmode(); void sqlgetconfigmode(); void options(); void trace(); void sqlallocenv(); void sqlfreeenv(); void sqltransact(); void sqlallocconnect(); void sqlfreeconnect(); void sqlallocstmt(); void sqlbindparam(); void sqlsetstmtoption(); void sqlgetstmtoption(); void sqlsetconnectoption(); void sqlgetconnectoption(); void manage_test(); void manage_auto_test(); void manage_test_groups(); void run_auto_tests(); protected: void resizeEvent( QResizeEvent * ); signals: void explain( const QString& ); private: QMenuBar *menu; QLabel *label; }; #endif // ODBCTEST_H unixODBC-2.2.14-p2/odbctest/desc.h0100644000076400007640000000623610564052121015076 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * **********************************************************************/ #ifndef DESC_H #define DESC_H #ifdef QT_V4LAYOUT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include "odbctest.h" class dCopyDesc : public QDialog { Q_OBJECT public: dCopyDesc( OdbcTest *parent, QString name ); ~dCopyDesc(); protected: QPushButton *ok, *cancel, *help; QComboBox *handle1, *handle2; QLabel *l_handle1, *l_handle2; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dGetDescField : public QDialog { Q_OBJECT public: dGetDescField( OdbcTest *parent, QString name ); ~dGetDescField(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *diag_info; QLabel *l_handle_type, *l_handles, *l_buffer_len, *l_rec_num, *l_diag_info; QCheckBox *ptr_valid, *strlen_valid; QLineEdit *buffer_len, *rec_num; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void ptr_clkd(); void strlen_clkd(); }; class dGetDescRec : public QDialog { Q_OBJECT public: dGetDescRec( OdbcTest *parent, QString name ); ~dGetDescRec(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLabel *l_handle_type, *l_handles, *l_buffer_len, *l_rec_num; QCheckBox *name_valid, *strlen_valid, *type_valid, *sub_type_valid; QCheckBox *length_valid, *precision_valid, *scale_valid, *nullable_valid; QLineEdit *buffer_len, *rec_num; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void name_clkd(); void strlen_clkd(); void type_clkd(); void sub_type_clkd(); void length_clkd(); void precision_clkd(); void scale_clkd(); void nullable_clkd(); }; #endif unixODBC-2.2.14-p2/odbctest/diag.h0100644000076400007640000000646610564052121015071 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * **********************************************************************/ #ifndef DIAG_H #define DIAG_H #ifdef QT_V4LAYOUT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include "odbctest.h" class dError : public QDialog { Q_OBJECT public: dError( OdbcTest *parent, QString name ); ~dError(); protected: QPushButton *ok, *cancel, *help; QComboBox *ehandles, *chandles, *shandles; QLabel *l_ehandle, *l_chandle, *l_shandle, *l_buffer_len; QCheckBox *native_valid, *error_valid, *perror_valid, *sqlstate_valid; QLineEdit *buffer_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void native_clkd(); void error_clkd(); void perror_clkd(); void sqlstate_clkd(); }; class dGetDiagRec : public QDialog { Q_OBJECT public: dGetDiagRec( OdbcTest *parent, QString name ); ~dGetDiagRec(); protected: QPushButton *ok, *cancel, *help; QComboBox *handle_type, *handles; QLabel *l_handle_type, *l_handles, *l_buffer_len, *l_rec_num; QCheckBox *native_valid, *error_valid, *perror_valid, *sqlstate_valid; QLineEdit *buffer_len, *rec_num; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void native_clkd(); void error_clkd(); void perror_clkd(); void sqlstate_clkd(); void sel_handle( int ); }; class dGetDiagField : public QDialog { Q_OBJECT public: dGetDiagField( OdbcTest *parent, QString name ); ~dGetDiagField(); protected: QPushButton *ok, *cancel, *help; QComboBox *handle_type, *handles, *diag_info; QLabel *l_handle_type, *l_handles, *l_buffer_len, *l_rec_num, *l_diag_info; QCheckBox *diag_ptr_valid, *strlen_valid; QLineEdit *buffer_len, *rec_num; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void diag_ptr_clkd(); void strlen_clkd(); void sel_handle( int ); }; #endif unixODBC-2.2.14-p2/odbctest/env.h0100644000076400007640000001255410564052121014750 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * **********************************************************************/ #ifndef ENV_H #define ENV_H #ifdef QT_V4LAYOUT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include "odbctest.h" class dAllocHandle : public QDialog { Q_OBJECT public: dAllocHandle( OdbcTest *parent, QString name ); ~dAllocHandle(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types; QCheckBox *valid; QLabel *l_handle, *l_types; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void out_handle_ptr_clkd(); void Ok(); }; class dFreeHandle : public QDialog { Q_OBJECT public: dFreeHandle( OdbcTest *parent, QString name ); ~dFreeHandle(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types; QCheckBox *valid; QLabel *l_handle, *l_types; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dDataSources : public QDialog { Q_OBJECT public: dDataSources( OdbcTest *parent, QString name ); ~dDataSources(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *direction; QCheckBox *server_valid, *nlp1_valid, *description_valid, *nlp2_valid; QLabel *l_handles, *l_direction, *l_server_len, *l_description_len; QLineEdit *server_len, *description_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void server_clkd(); void description_clkd(); void nlp1_clkd(); void nlp2_clkd(); }; class dDrivers : public QDialog { Q_OBJECT public: dDrivers( OdbcTest *parent, QString name ); ~dDrivers(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *direction; QCheckBox *server_valid, *nlp1_valid, *description_valid, *nlp2_valid; QLabel *l_handles, *l_direction, *l_server_len, *l_description_len; QLineEdit *server_len, *description_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void server_clkd(); void description_clkd(); void nlp1_clkd(); void nlp2_clkd(); }; class dEndTran : public QDialog { Q_OBJECT public: dEndTran( OdbcTest *parent, QString name ); ~dEndTran(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *handle_type, *completion_type; QLabel *l_handles, *l_handle_type, *l_completion_type; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void sel_handle( int ); }; class dAllocEnv : public QDialog { Q_OBJECT public: dAllocEnv( OdbcTest *parent, QString name ); ~dAllocEnv(); protected: QPushButton *ok, *cancel, *help; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif QCheckBox *handle_valid; OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void handle_clkd(); }; class dFreeEnv : public QDialog { Q_OBJECT public: dFreeEnv( OdbcTest *parent, QString name ); ~dFreeEnv(); protected: QPushButton *ok, *cancel, *help; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif QComboBox *handles; QLabel *l_handles; OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dTransact : public QDialog { Q_OBJECT public: dTransact( OdbcTest *parent, QString name ); ~dTransact(); protected: QPushButton *ok, *cancel, *help; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif QComboBox *ehandles, *chandles; QLabel *l_ehandles, *l_chandles; QComboBox *completion_type; QLabel *l_completion_type; OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; #endif unixODBC-2.2.14-p2/odbctest/catalog.h0100644000076400007640000001772510564052121015577 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * **********************************************************************/ #ifndef CATALOG_H #define CATALOG_H #ifdef QT_V4LAYOUT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include "odbctest.h" class dTables : public QDialog { Q_OBJECT public: dTables( OdbcTest *parent, QString name ); ~dTables(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *schema, *catalog, *table, *type; QComboBox *schema_len, *catalog_len, *table_len, *type_len; QLabel *l_handle, *l_schema, *l_catalog, *l_table, *l_type; QLabel *l_schema_len, *l_catalog_len, *l_table_len, *l_type_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dColumns : public QDialog { Q_OBJECT public: dColumns( OdbcTest *parent, QString name ); ~dColumns(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *schema, *catalog, *table, *column; QComboBox *schema_len, *catalog_len, *table_len, *column_len; QLabel *l_handle, *l_schema, *l_catalog, *l_table, *l_column; QLabel *l_schema_len, *l_catalog_len, *l_table_len, *l_column_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dColumnPrivileges : public QDialog { Q_OBJECT public: dColumnPrivileges( OdbcTest *parent, QString name ); ~dColumnPrivileges(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *schema, *catalog, *table, *column; QComboBox *schema_len, *catalog_len, *table_len, *column_len; QLabel *l_handle, *l_schema, *l_catalog, *l_table, *l_column; QLabel *l_schema_len, *l_catalog_len, *l_table_len, *l_column_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dForeignKeys : public QDialog { Q_OBJECT public: dForeignKeys( OdbcTest *parent, QString name ); ~dForeignKeys(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *schema, *catalog, *table; QComboBox *fk_schema, *fk_catalog, *fk_table; QComboBox *schema_len, *catalog_len, *table_len; QComboBox *fk_schema_len, *fk_catalog_len, *fk_table_len; QLabel *l_handle, *l_schema, *l_catalog, *l_table; QLabel *fk_l_schema, *fk_l_catalog, *fk_l_table; QLabel *l_schema_len, *l_catalog_len, *l_table_len; QLabel *fk_l_schema_len, *fk_l_catalog_len, *fk_l_table_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dPrimaryKeys : public QDialog { Q_OBJECT public: dPrimaryKeys( OdbcTest *parent, QString name ); ~dPrimaryKeys(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *schema, *catalog, *table; QComboBox *schema_len, *catalog_len, *table_len; QLabel *l_handle, *l_schema, *l_catalog, *l_table; QLabel *l_schema_len, *l_catalog_len, *l_table_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dProcedures : public QDialog { Q_OBJECT public: dProcedures( OdbcTest *parent, QString name ); ~dProcedures(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *schema, *catalog, *table; QComboBox *schema_len, *catalog_len, *table_len; QLabel *l_handle, *l_schema, *l_catalog, *l_table; QLabel *l_schema_len, *l_catalog_len, *l_table_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dProcedureColumns : public QDialog { Q_OBJECT public: dProcedureColumns( OdbcTest *parent, QString name ); ~dProcedureColumns(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *schema, *catalog, *table, *column; QComboBox *schema_len, *catalog_len, *table_len, *column_len; QLabel *l_handle, *l_schema, *l_catalog, *l_table, *l_column; QLabel *l_schema_len, *l_catalog_len, *l_table_len, *l_column_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dTablePrivileges : public QDialog { Q_OBJECT public: dTablePrivileges( OdbcTest *parent, QString name ); ~dTablePrivileges(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *schema, *catalog, *table; QComboBox *schema_len, *catalog_len, *table_len; QLabel *l_handle, *l_schema, *l_catalog, *l_table; QLabel *l_schema_len, *l_catalog_len, *l_table_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dGetTypeInfo : public QDialog { Q_OBJECT public: dGetTypeInfo( OdbcTest *parent, QString name ); ~dGetTypeInfo(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *type; QLabel *l_handle, *l_type; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dStatistics : public QDialog { Q_OBJECT public: dStatistics( OdbcTest *parent, QString name ); ~dStatistics(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *schema, *catalog, *table; QComboBox *schema_len, *catalog_len, *table_len; QComboBox *unique, *reserved; QLabel *l_handle, *l_schema, *l_catalog, *l_table; QLabel *l_schema_len, *l_catalog_len, *l_table_len; QLabel *l_unique, *l_reserved; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dSpecialColumns : public QDialog { Q_OBJECT public: dSpecialColumns( OdbcTest *parent, QString name ); ~dSpecialColumns(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *schema, *catalog, *table; QComboBox *schema_len, *catalog_len, *table_len; QComboBox *ident, *scope, *nullable; QLabel *l_handle, *l_schema, *l_catalog, *l_table; QLabel *l_schema_len, *l_catalog_len, *l_table_len; QLabel *l_ident, *l_scope, *l_nullable; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; #endif unixODBC-2.2.14-p2/odbctest/conn.h0100644000076400007640000001567610564052121015125 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * **********************************************************************/ #ifndef CONN_H #define CONN_H #ifdef QT_V4LAYOUT #include #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #include #include #include #endif #include "odbctest.h" class dConnect : public QDialog { Q_OBJECT public: dConnect( OdbcTest *parent, QString name ); ~dConnect(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *server, *user, *auth; QComboBox *server_len, *user_len, *auth_len; QLabel *l_handle, *l_server, *l_user, *l_auth; QLabel *l_server_len, *l_user_len, *l_auth_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dDisconnect : public QDialog { Q_OBJECT public: dDisconnect( OdbcTest *parent, QString name ); ~dDisconnect(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLabel *l_handle; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; class dFullConnect : public QDialog { Q_OBJECT public: dFullConnect( OdbcTest *parent, QString name ); ~dFullConnect(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles; QLineEdit *dsn, *usr, *pwd; QLabel *l_handle, *l_dsn, *l_usr, *l_pwd; #ifdef QT_V4LAYOUT Q3ListBox *dsn_list; Q3MultiLineEdit *in_win; Q3ButtonGroup *version, *cursor; #else QListBox *dsn_list; QMultiLineEdit *in_win; QButtonGroup *version, *cursor; #endif OutputWin *out_win; OdbcTest *odbctest; QRadioButton *ver_2, *ver_3, *ver_def; QRadioButton *cur_ifneeded, *cur_use, *cur_driver, *cur_default; QString txt; protected slots: void Ok(); void set_dsn( const QString &); }; class dGetInfo : public QDialog { Q_OBJECT public: dGetInfo( OdbcTest *parent, QString name ); ~dGetInfo(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *type; QLineEdit *buffer_len; QCheckBox *target_valid, *strlen_valid; QLabel *l_handle, *l_type, *l_buffer_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void target_clkd(); void strlen_clkd(); void Ok(); }; class dGetFunctions : public QDialog { Q_OBJECT public: dGetFunctions( OdbcTest *parent, QString name ); ~dGetFunctions(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *type; QCheckBox *target_valid; QLabel *l_handle, *l_type; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void target_clkd(); void Ok(); }; class dBrowseConnect : public QDialog { Q_OBJECT public: dBrowseConnect( OdbcTest *parent, QString name ); ~dBrowseConnect(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *in_str, *str_len; QLineEdit *buffer_len; QCheckBox *out_str_valid, *strlen_valid; QLabel *l_handle, *l_out_str, *l_buffer_len; QLabel *l_str_len, *l_in_str; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void out_str_clkd(); void strlen_clkd(); void Ok(); }; class dDriverConnect : public QDialog { Q_OBJECT public: dDriverConnect( OdbcTest *parent, QString name ); ~dDriverConnect(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *in_str, *str_len, *driver_completion; QLineEdit *buffer_len; QCheckBox *out_str_valid, *strlen_valid; QLabel *l_handle, *l_out_str, *l_buffer_len; QLabel *l_str_len, *l_in_str, *l_driver_completion; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void out_str_clkd(); void strlen_clkd(); void Ok(); }; class dNativeSQL : public QDialog { Q_OBJECT public: dNativeSQL( OdbcTest *parent, QString name ); ~dNativeSQL(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *in_str, *str_len; QLineEdit *buffer_len; QCheckBox *out_str_valid, *strlen_valid; QLabel *l_handle, *l_out_str, *l_buffer_len; QLabel *l_str_len, *l_in_str; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void out_str_clkd(); void strlen_clkd(); void Ok(); }; class dAllocConnect : public QDialog { Q_OBJECT public: dAllocConnect( OdbcTest *parent, QString name ); ~dAllocConnect(); protected: QPushButton *ok, *cancel, *help; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif QCheckBox *handle_valid; QComboBox *handles; QLabel *l_handles; OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); void handle_clkd(); }; class dFreeConnect : public QDialog { Q_OBJECT public: dFreeConnect( OdbcTest *parent, QString name ); ~dFreeConnect(); protected: QPushButton *ok, *cancel, *help; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif QComboBox *handles; QLabel *l_handles; OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Ok(); }; #endif unixODBC-2.2.14-p2/odbctest/attr.h0100644000076400007640000001475410564052121015136 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * **********************************************************************/ #ifndef ATTR_H #define ATTR_H #ifdef QT_V4LAYOUT #include #include #include #include #include #include #else #include #include #include #include #include #include #endif #include "odbctest.h" class dSetStmtAttr : public QDialog { Q_OBJECT public: dSetStmtAttr( OdbcTest *parent, QString name ); ~dSetStmtAttr(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types, *value, *stringlen; QLabel *l_handle, *l_types, *l_value, *l_slen; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Activated( int index ); void Ok(); }; class dSetStmtOption : public QDialog { Q_OBJECT public: dSetStmtOption( OdbcTest *parent, QString name ); ~dSetStmtOption(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types, *value; QLabel *l_handle, *l_types, *l_value; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Activated( int index ); void Ok(); }; class dGetStmtOption : public QDialog { Q_OBJECT public: dGetStmtOption( OdbcTest *parent, QString name ); ~dGetStmtOption(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types; QCheckBox *target_valid; QLabel *l_handle, *l_types; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void target_clkd(); void Ok(); }; class dGetStmtAttr : public QDialog { Q_OBJECT public: dGetStmtAttr( OdbcTest *parent, QString name ); ~dGetStmtAttr(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types; QCheckBox *target_valid, *strlen_valid; QLabel *l_handle, *l_types, *l_buffer_len; QLineEdit *buffer_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void target_clkd(); void strlen_clkd(); void Ok(); }; class dSetConnAttr : public QDialog { Q_OBJECT public: dSetConnAttr( OdbcTest *parent, QString name ); ~dSetConnAttr(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types, *value, *stringlen; QLabel *l_handle, *l_types, *l_value, *l_slen; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Activated( int index ); void Ok(); }; class dGetConnAttr : public QDialog { Q_OBJECT public: dGetConnAttr( OdbcTest *parent, QString name ); ~dGetConnAttr(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types; QCheckBox *target_valid, *strlen_valid; QLabel *l_handle, *l_types, *l_buffer_len; QLineEdit *buffer_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void target_clkd(); void strlen_clkd(); void Ok(); }; class dSetConnectOption : public QDialog { Q_OBJECT public: dSetConnectOption( OdbcTest *parent, QString name ); ~dSetConnectOption(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types, *value; QLabel *l_handle, *l_types, *l_value; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Activated( int index ); void Ok(); }; class dGetConnectOption : public QDialog { Q_OBJECT public: dGetConnectOption( OdbcTest *parent, QString name ); ~dGetConnectOption(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types; QCheckBox *target_valid; QLabel *l_handle, *l_types; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void target_clkd(); void Ok(); }; class dSetEnvAttr : public QDialog { Q_OBJECT public: dSetEnvAttr( OdbcTest *parent, QString name ); ~dSetEnvAttr(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types, *value, *stringlen; QLabel *l_handle, *l_types, *l_value, *l_slen; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void Activated( int index ); void Ok(); }; class dGetEnvAttr : public QDialog { Q_OBJECT public: dGetEnvAttr( OdbcTest *parent, QString name ); ~dGetEnvAttr(); protected: QPushButton *ok, *cancel, *help; QComboBox *handles, *types; QCheckBox *target_valid, *strlen_valid; QLabel *l_handle, *l_types, *l_buffer_len; QLineEdit *buffer_len; #ifdef QT_V4LAYOUT Q3MultiLineEdit *in_win; #else QMultiLineEdit *in_win; #endif OutputWin *out_win; OdbcTest *odbctest; QString txt; protected slots: void target_clkd(); void strlen_clkd(); void Ok(); }; #endif unixODBC-2.2.14-p2/odbctest/tools.h0100644000076400007640000001266307762667075015353 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * **********************************************************************/ #ifndef TOOLS_H #define TOOLS_H #include #include #include #include #include #include #include #include #include #include #include "odbctest.h" class dManageTest; class dManageTestGroup; class Q_EXPORT MYQListViewItem : public QListViewItem { public: MYQListViewItem( QListView * parent, MYQListViewItem *after, QString label1, QString label2 = QString::null ); MYQListViewItem( MYQListViewItem * parent, QString label1, QString label2 = QString::null, int test_index = 0, QString test_name = QString::null ); MYQListViewItem( MYQListViewItem * parent, MYQListViewItem *after, QString label1, QString label2 = QString::null, int test_index = 0, QString test_name = QString::null ); void set_down( BOOL state ); MYQListViewItem *firstChild(); MYQListViewItem *parent(); MYQListViewItem *nextSibling(); int index() { return test_index; }; QString name() { return test_name; }; QString source() { return test_source; }; QString group() { return test_group; }; protected: void activate(); private: int test_index; QString test_name; QString test_group; QString test_source; }; class dNewSource : public QDialog { Q_OBJECT public: dNewSource( OdbcTest *parent, QString name, dManageTest *ptest ); ~dNewSource(); protected: QPushButton *ok, *cancel; OdbcTest *odbctest; QLineEdit *source; QLabel *l_dsn; dManageTest *parent_test; protected slots: void Ok(); }; class dNewGroup : public QDialog { Q_OBJECT public: dNewGroup( OdbcTest *parent, QString name, dManageTestGroup *ptest ); ~dNewGroup(); protected: QPushButton *ok, *cancel; OdbcTest *odbctest; QLineEdit *source; QLabel *l_dsn; dManageTestGroup *parent_test; protected slots: void Ok(); }; class dManageTest : public QDialog { Q_OBJECT public: dManageTest( OdbcTest *parent, QString name ); ~dManageTest(); friend class dNewSource; protected: QPushButton *close, *nw, *del; OdbcTest *odbctest; QComboBox *test_source; QComboBox*dsn; QLabel *l_dsn, *l_ts, *l_uid, *l_pwd, *l_kw; QLineEdit *uid, *pwd, *kw; QButtonGroup *param; protected slots: void Ok(); void NewSource(); void DelSource(); void Activated( int index ); void Activated( const QString &str ); }; class dManageAutoTest : public QDialog { Q_OBJECT public: dManageAutoTest( OdbcTest *parent, QString name ); ~dManageAutoTest(); protected: QPushButton *close, *add, *remove, *from; OdbcTest *odbctest; QLabel *l_avail, *l_name, *l_lib, *l_so, *l_installed, *s_from, *s_name, *s_lib; QListBox *lib_list, *test_list; char curr_dir[ 256 ]; void SetPath( QString &str ); void SetPath( const char *str ); protected slots: void Ok(); void From(); void Add(); void ListSelect( const QString &name ); void Remove(); }; class dManageTestGroup : public QDialog { Q_OBJECT public: dManageTestGroup( OdbcTest *parent, QString name ); ~dManageTestGroup(); friend class dNewGroup; protected: QPushButton *close, *nw, *del, *add, *remove; OdbcTest *odbctest; QComboBox *test_source; QComboBox *group; QLabel *l_group, *l_auto, *l_sauto; QListBox *auto_list, *sauto_list; void update_test_lists( void ); protected slots: void Activated( int index ); void Activated( const QString &str ); void Ok(); void Add(); void Remove(); void New(); void Delete(); }; class dRunAutoTests : public QDialog { Q_OBJECT public: dRunAutoTests( OdbcTest *parent, QString name ); ~dRunAutoTests(); protected: QPushButton *run_list, *ok, *cancel, *log_file; OdbcTest *odbctest; QComboBox *rlist; QLabel *l_tests, *l_sources, *l_log; QButtonGroup *output, *options; QListBox *sources; QListView *tests; QCheckBox *b_log_file, *b_screen, *b_debug, *b_isolate, *b_cursor; void add_auto_test( const char * test_name, MYQListViewItem *top, MYQListViewItem **last_test ); protected slots: void Ok(); void Log(); void LogChanged(int); void CursorChanged(int); void TestsChanged(); private: int cursor_state; }; #endif unixODBC-2.2.14-p2/odbctest/tools4.h0100644000076400007640000001272010564052121015377 0ustar nicknick/********************************************************************* * * Written by Nick Gorham * (nick@lurcher.org). * * copyright (c) 1999 Nick Gorham * * This program is free software; you can 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. * **********************************************************************/ #ifndef TOOLS_H #define TOOLS_H #include #include #include #include #include #include #include #include #include #include #include "odbctest.h" class dManageTest; class dManageTestGroup; class MYQListViewItem : public Q3ListViewItem { public: MYQListViewItem( Q3ListView * parent, MYQListViewItem *after, QString label1, QString label2 = QString::null ); MYQListViewItem( MYQListViewItem * parent, QString label1, QString label2 = QString::null, int test_index = 0, QString test_name = QString::null ); MYQListViewItem( MYQListViewItem * parent, MYQListViewItem *after, QString label1, QString label2 = QString::null, int test_index = 0, QString test_name = QString::null ); void set_down( BOOL state ); MYQListViewItem *firstChild(); MYQListViewItem *parent(); MYQListViewItem *nextSibling(); int index() { return test_index; }; QString name() { return test_name; }; QString source() { return test_source; }; QString group() { return test_group; }; protected: void activate(); private: int test_index; QString test_name; QString test_group; QString test_source; }; class dNewSource : public QDialog { Q_OBJECT public: dNewSource( OdbcTest *parent, QString name, dManageTest *ptest ); ~dNewSource(); protected: QPushButton *ok, *cancel; OdbcTest *odbctest; QLineEdit *source; QLabel *l_dsn; dManageTest *parent_test; protected slots: void Ok(); }; class dNewGroup : public QDialog { Q_OBJECT public: dNewGroup( OdbcTest *parent, QString name, dManageTestGroup *ptest ); ~dNewGroup(); protected: QPushButton *ok, *cancel; OdbcTest *odbctest; QLineEdit *source; QLabel *l_dsn; dManageTestGroup *parent_test; protected slots: void Ok(); }; class dManageTest : public QDialog { Q_OBJECT public: dManageTest( OdbcTest *parent, QString name ); ~dManageTest(); friend class dNewSource; protected: QPushButton *close, *nw, *del; OdbcTest *odbctest; QComboBox *test_source; QComboBox*dsn; QLabel *l_dsn, *l_ts, *l_uid, *l_pwd, *l_kw; QLineEdit *uid, *pwd, *kw; Q3ButtonGroup *param; protected slots: void Ok(); void NewSource(); void DelSource(); void Activated( int index ); void Activated( const QString &str ); }; class dManageAutoTest : public QDialog { Q_OBJECT public: dManageAutoTest( OdbcTest *parent, QString name ); ~dManageAutoTest(); protected: QPushButton *close, *add, *remove, *from; OdbcTest *odbctest; QLabel *l_avail, *l_name, *l_lib, *l_so, *l_installed, *s_from, *s_name, *s_lib; Q3ListBox *lib_list, *test_list; char curr_dir[ 256 ]; void SetPath( QString &str ); void SetPath( const char *str ); protected slots: void Ok(); void From(); void Add(); void ListSelect( const QString &name ); void Remove(); }; class dManageTestGroup : public QDialog { Q_OBJECT public: dManageTestGroup( OdbcTest *parent, QString name ); ~dManageTestGroup(); friend class dNewGroup; protected: QPushButton *close, *nw, *del, *add, *remove; OdbcTest *odbctest; QComboBox *test_source; QComboBox *group; QLabel *l_group, *l_auto, *l_sauto; Q3ListBox *auto_list, *sauto_list; void update_test_lists( void ); protected slots: void Activated( int index ); void Activated( const QString &str ); void Ok(); void Add(); void Remove(); void New(); void Delete(); }; class dRunAutoTests : public QDialog { Q_OBJECT public: dRunAutoTests( OdbcTest *parent, QString name ); ~dRunAutoTests(); protected: QPushButton *run_list, *ok, *cancel, *log_file; OdbcTest *odbctest; QComboBox *rlist; QLabel *l_tests, *l_sources, *l_log; Q3ButtonGroup *output, *options; Q3ListBox *sources; Q3ListView *tests; QCheckBox *b_log_file, *b_screen, *b_debug, *b_isolate, *b_cursor; void add_auto_test( const char * test_name, MYQListViewItem *top, MYQListViewItem **last_test ); protected slots: void Ok(); void Log(); void LogChanged(int); void CursorChanged(int); void TestsChanged(); private: int cursor_state; }; #endif unixODBC-2.2.14-p2/autotest/0040755000076400007640000000000011150523351014044 5ustar nicknickunixODBC-2.2.14-p2/autotest/Makefile.am0100644000076400007640000000064411025707567016117 0ustar nicknicklib_LTLIBRARIES = libgtrtst.la noinst_LTLIBRARIES = libgtrtstlc.la INCLUDES = -I@top_srcdir@/include -I@top_srcdir@/odbctest EXTRA_DIST = \ gtrtst.exp libgtrtst_la_LDFLAGS = \ -no-undefined \ -version-info @LIB_VERSION@ \ -export-dynamic \ -export-symbols @srcdir@/gtrtst.exp libgtrtst_la_DEPENDENCIES = \ ../DriverManager/libodbc.la libgtrtst_la_SOURCES = \ gtrtst.c libgtrtstlc_la_SOURCES = \ gtrtst.c unixODBC-2.2.14-p2/autotest/Makefile.in0100644000076400007640000004105211111035242016102 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = autotest DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) libgtrtst_la_LIBADD = am_libgtrtst_la_OBJECTS = gtrtst.lo libgtrtst_la_OBJECTS = $(am_libgtrtst_la_OBJECTS) libgtrtstlc_la_LIBADD = am_libgtrtstlc_la_OBJECTS = gtrtst.lo libgtrtstlc_la_OBJECTS = $(am_libgtrtstlc_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libgtrtst_la_SOURCES) $(libgtrtstlc_la_SOURCES) DIST_SOURCES = $(libgtrtst_la_SOURCES) $(libgtrtstlc_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libgtrtst.la noinst_LTLIBRARIES = libgtrtstlc.la INCLUDES = -I@top_srcdir@/include -I@top_srcdir@/odbctest EXTRA_DIST = \ gtrtst.exp libgtrtst_la_LDFLAGS = \ -no-undefined \ -version-info @LIB_VERSION@ \ -export-dynamic \ -export-symbols @srcdir@/gtrtst.exp libgtrtst_la_DEPENDENCIES = \ ../DriverManager/libodbc.la libgtrtst_la_SOURCES = \ gtrtst.c libgtrtstlc_la_SOURCES = \ gtrtst.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu autotest/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu autotest/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libgtrtst.la: $(libgtrtst_la_OBJECTS) $(libgtrtst_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgtrtst_la_LDFLAGS) $(libgtrtst_la_OBJECTS) $(libgtrtst_la_LIBADD) $(LIBS) libgtrtstlc.la: $(libgtrtstlc_la_OBJECTS) $(libgtrtstlc_la_DEPENDENCIES) $(LINK) $(libgtrtstlc_la_LDFLAGS) $(libgtrtstlc_la_OBJECTS) $(libgtrtstlc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtrtst.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-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-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .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-exec install-exec-am install-info \ install-info-am install-libLTLIBRARIES install-man \ 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-info-am uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/autotest/gtrtst.c0100644000076400007640000000633507363332157015560 0ustar nicknick/********************************************************************* * * This code mimics the AutoTest functions provided by the Microsoft * ODBC test app, in the GTRTST32.DLL library * * Created by Nick Gorham * (nick@easysoft.com). * * Any bugs or problems should be considered the fault of Nick and not * Peter. * * copyright (c) 1999 Nick Gorham * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ********************************************************************** * * $Id: gtrtst.c,v 1.1.1.1 2001/10/17 16:40:15 lurcher Exp $ * * $Log: gtrtst.c,v $ * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher * * First upload to SourceForge * * Revision 1.3 2001/04/17 12:57:11 nick * * Extra for AutoTest * * Revision 1.2 2001/04/14 10:42:03 nick * * Extra work on the autotest feature of odbctest * * Revision 1.1 2001/04/12 17:43:36 nick * * Change logging and added autotest to odbctest * * *********************************************************************/ #include #include #include #include HINSTANCE hLoadedInst; typedef int (*CBFN)(lpSERVERINFO,BOOL,BOOL,UINT,LPTSTR,const char*); BOOL EXTFUNCDECL FAR szLogPrintf( lpSERVERINFO lps, BOOL fForce, LPTSTR fmt, ... ) { va_list ap; char buffer[ 1024 ]; /* * assemble the buffer */ va_start(ap, fmt); vsprintf (buffer, fmt, ap); va_end(ap); /* * the lps->hwnd is not a handle, but a pointer to a callback * function in odbctest */ if ( lps->hwnd ) { return ((CBFN)lps->hwnd)(lps,fForce,0,0,NULL,buffer); } else { return 0; } } int EXTFUNCDECL FAR szMessageBox( HWND hwnd, UINT style, LPTSTR szTitle, LPTSTR szFmt, ... ) { char buffer[ 1024 ]; va_list ap; /* * assemble the buffer */ va_start(ap, szFmt); vsprintf ( buffer, szFmt, ap); va_end(ap); if ( hwnd ) { /* * the hwnd is not a handle, but a pointer to a callback * function in odbctest */ return ((CBFN)hwnd)(NULL,0,1,style,szTitle,buffer); } else { return 0; } } /* * not sure what this is for yet... */ LPTSTR EXTFUN GetRCString( HINSTANCE hInst, LPTSTR buf, int cbbuf, UINT ids ) { printf( "GetRCString\n" ); return NULL; } unixODBC-2.2.14-p2/autotest/gtrtst.exp0100644000076400007640000000004507363332157016122 0ustar nicknickszLogPrintf szMessageBox GetRCString unixODBC-2.2.14-p2/samples/0040755000076400007640000000000011150523351013640 5ustar nicknickunixODBC-2.2.14-p2/samples/Makefile.am0100644000076400007640000000107211025707750015701 0ustar nicknicklib_LTLIBRARIES = libboundparam.la INCLUDES = -I@top_srcdir@/include libboundparam_la_LDFLAGS = \ -no-undefined \ -version-info @LIB_VERSION@ \ -export-dynamic \ -module if QNX libboundparam_la_LIBADD = \ ../autotest/libgtrtstlc.la \ -L${prefix}/lib -lodbc else libboundparam_la_LIBADD = \ ../autotest/libgtrtstlc.la \ ../DriverManager/libodbc.la endif libboundparam_la_SOURCES = \ boundparam.c \ helper.c \ cboundtimestampparam.c EXTRA_DIST = \ cursor.c \ quiktest.h \ quiktest.c \ custom.c \ custom.h \ helper.h \ libboundparam.exp unixODBC-2.2.14-p2/samples/Makefile.in0100644000076400007640000004065611111035270015710 0ustar nicknick# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ subdir = samples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/qt.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) @QNX_FALSE@libboundparam_la_DEPENDENCIES = ../autotest/libgtrtstlc.la \ @QNX_FALSE@ ../DriverManager/libodbc.la @QNX_TRUE@libboundparam_la_DEPENDENCIES = ../autotest/libgtrtstlc.la am_libboundparam_la_OBJECTS = boundparam.lo helper.lo \ cboundtimestampparam.lo libboundparam_la_OBJECTS = $(am_libboundparam_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libboundparam_la_SOURCES) DIST_SOURCES = $(libboundparam_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVERS_FALSE = @DRIVERS_FALSE@ DRIVERS_TRUE = @DRIVERS_TRUE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FDB_FALSE = @FDB_FALSE@ FDB_TRUE = @FDB_TRUE@ FFLAGS = @FFLAGS@ GREP = @GREP@ HAVE_FLEX_FALSE = @HAVE_FLEX_FALSE@ HAVE_FLEX_TRUE = @HAVE_FLEX_TRUE@ ICONV_CHAR_ENCODING = @ICONV_CHAR_ENCODING@ ICONV_UNICODE_ENCODING = @ICONV_UNICODE_ENCODING@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LFLAGS = @LFLAGS@ LIBADD_CRYPT = @LIBADD_CRYPT@ LIBADD_DL = @LIBADD_DL@ LIBADD_POW = @LIBADD_POW@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MOC = @MOC@ MOCDEFS = @MOCDEFS@ MSQL_FALSE = @MSQL_FALSE@ MSQL_TRUE = @MSQL_TRUE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODBCTRACE_FALSE = @ODBCTRACE_FALSE@ ODBCTRACE_TRUE = @ODBCTRACE_TRUE@ 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@ PTH_CFLAGS = @PTH_CFLAGS@ PTH_CPPFLAGS = @PTH_CPPFLAGS@ PTH_LDFLAGS = @PTH_LDFLAGS@ PTH_LIBS = @PTH_LIBS@ QNX_FALSE = @QNX_FALSE@ QNX_TRUE = @QNX_TRUE@ QT4_FALSE = @QT4_FALSE@ QT4_TRUE = @QT4_TRUE@ QTMAX = @QTMAX@ QTMDIAREA_FALSE = @QTMDIAREA_FALSE@ QTMDIAREA_TRUE = @QTMDIAREA_TRUE@ QTMIN = @QTMIN@ QTVERSION = @QTVERSION@ QTWIZARD_FALSE = @QTWIZARD_FALSE@ QTWIZARD_TRUE = @QTWIZARD_TRUE@ QT_CXXFLAGS = @QT_CXXFLAGS@ QT_FALSE = @QT_FALSE@ QT_LDFLAGS = @QT_LDFLAGS@ QT_LIBS = @QT_LIBS@ QT_TRUE = @QT_TRUE@ RANLIB = @RANLIB@ READLINE = @READLINE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHLIBEXT = @SHLIBEXT@ STRIP = @STRIP@ UIC = @UIC@ VERSION = @VERSION@ WITHLT_FALSE = @WITHLT_FALSE@ WITHLT_TRUE = @WITHLT_TRUE@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ msql_headers = @msql_headers@ msql_libraries = @msql_libraries@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libboundparam.la INCLUDES = -I@top_srcdir@/include libboundparam_la_LDFLAGS = \ -no-undefined \ -version-info @LIB_VERSION@ \ -export-dynamic \ -module @QNX_FALSE@libboundparam_la_LIBADD = \ @QNX_FALSE@ ../autotest/libgtrtstlc.la \ @QNX_FALSE@ ../DriverManager/libodbc.la @QNX_TRUE@libboundparam_la_LIBADD = \ @QNX_TRUE@ ../autotest/libgtrtstlc.la \ @QNX_TRUE@ -L${prefix}/lib -lodbc libboundparam_la_SOURCES = \ boundparam.c \ helper.c \ cboundtimestampparam.c EXTRA_DIST = \ cursor.c \ quiktest.h \ quiktest.c \ custom.c \ custom.h \ helper.h \ libboundparam.exp all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu samples/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu samples/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ 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 libboundparam.la: $(libboundparam_la_OBJECTS) $(libboundparam_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libboundparam_la_LDFLAGS) $(libboundparam_la_OBJECTS) $(libboundparam_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boundparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cboundtimestampparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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 distclean-libtool: -rm -f libtool uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libdir)"; 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) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES 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-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man 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-info-am \ uninstall-libLTLIBRARIES # 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: unixODBC-2.2.14-p2/samples/boundparam.c0100644000076400007640000000403507363332177016152 0ustar nicknick#include "autotest.h" #include "custom.h" typedef SWORD (*TESTCASEFUNC)(lpSERVERINFO); extern SWORD testboundparameters( lpSERVERINFO server_info ); struct { char * name; /* Test case name */ char * desc; /* Test case description */ TESTCASEFUNC lpTestFunc; /* Pointer to function to implement test */ } TestCases[] = { /* szName szDesc lpTestFunc */ /* -------------------- ----------------------- ------------------------*/ "Test Bound Parameters", "Test Bound Parameters", testboundparameters }; BOOL EXTFUN AutoTestName(LPSTR szName, UINT FAR * pcbTestCases) { strcpy( szName, "Test Bound Parameters" ); *pcbTestCases = NumItems(TestCases); return TRUE; } BOOL EXTFUN AutoTestDesc(UWORD iTest, LPSTR szName, LPSTR szDesc) { /* Extra protection should AutoTestName return invalid pcbTestCases */ if(iTest > NumItems(TestCases)) return FALSE; strcpy( szName, TestCases[ iTest - 1 ].name ); strcpy( szDesc, TestCases[ iTest - 1 ].desc ); return TRUE; } void EXTFUN AutoTestFunc(lpSERVERINFO lpSrvr) { int iDex; SWORD cErrCnt; /* Count errors */ char szName[AUTO_MAX_TESTCASE_NAME+6]; /* Room for NULL and \r\n */ /* Sets the error count to 0 */ InitTest(lpSrvr); /* Loop through the count of test cases looking for set bits via GETBIT. */ /* When a bit is set, that test is to be run. We've stored the */ /* function address which will implement the test, so simply call it. */ for(iDex=1; iDex<=NumItems(TestCases); iDex++) if(GETBIT(lpSrvr->rglMask, iDex)) { /* Print out title of test */ strcpy( szName, TestCases[ iDex - 1 ].name ); szLogPrintf(lpSrvr, FALSE, "%s:\r\n", (LPSTR)szName); /* Call the test case and add errors */ cErrCnt = (*TestCases[(iDex-1)].lpTestFunc)(lpSrvr); if(cErrCnt != TEST_ABORTED) lpSrvr->cErrors += cErrCnt; else goto abort; } return; /* When a test must abort, the test case should call the AbortTest */ /* macro which sets lpSrvr->cErrors to TEST_ABORTED. */ abort: return; } unixODBC-2.2.14-p2/samples/helper.c0100644000076400007640000010766407406123162015303 0ustar nicknick/* * $Id: helper.c,v 1.2 2001/12/13 13:00:34 lurcher Exp $ * * $Log: helper.c,v $ * Revision 1.2 2001/12/13 13:00:34 lurcher * * Remove most if not all warnings on 64 bit platforms * Add support for new MS 3.52 64 bit changes * Add override to disable the stopping of tracing * Add MAX_ROWS support in postgres driver * * Revision 1.1.1.1 2001/10/17 16:40:32 lurcher * * First upload to SourceForge * * Revision 1.2 2001/05/23 13:48:37 nick * * Remove unwanted include * * Revision 1.1 2001/05/04 15:32:54 nick * * Some makefile tweeks * * Revision 1.3 2001/04/18 15:58:27 martin * Add string_param_status. * Make sure strings passed to ODBC fns are SQLCHAR. * * Revision 1.2 1999/05/19 12:06:10 martin * Quote table name to avoid reserved words problems. * * Revision 1.1 1999/02/12 15:16:07 martin * Initial revision * */ #include #include #if defined (WIN32) # include #endif #include #include #include #define IN_HELPER_C 1 #include "helper.h" #define TABLE_ROWS 50 #define paramset_size 2 #define rowset_size 2 #ifndef FALSE #define FALSE 0 #endif /************************************************************************/ /* */ /* do_create_table */ /* =============== */ /* */ /* Delete the named table and create a new one. */ /* */ /************************************************************************/ SQLRETURN do_create_table( lpSERVERINFO srv_info, SQLHDBC *hdbc, char *table_name, unsigned long flags, SQLINTEGER length, char *type, char *params) { SQLHSTMT hstmt; /* statement handle */ SQLRETURN ret; /* function status return */ char qbuf[1024]; /* query buffer */ szLogPrintf( srv_info, FALSE,"---------- do_create_table ----------\n"); /* * Allocate a statement and delete existing table. */ if (SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt) != SQL_SUCCESS) { do_a_error(srv_info, SQL_HANDLE_DBC, hdbc, "SQLAllocHandle"); return SQL_ERROR; } sprintf(qbuf, "drop table \"%s\"", table_name); szLogPrintf( srv_info, FALSE,"\"%s\"\n", qbuf); if (!SQL_SUCCEEDED(SQLExecDirect(hstmt, (SQLCHAR *)qbuf, SQL_NTS))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecDirect"); } if (flags & CREATE_TABLE_BIGCOL) { if (strstr(params, "length")) { sprintf(qbuf, "create table \"%s\" " "(a INTEGER PRIMARY KEY, b %s(%ld))", table_name, type, length); } else { sprintf(qbuf, "create table \"%s\" " "(a INTEGER PRIMARY KEY, b %s)", table_name, type); } } else { sprintf(qbuf, "create table \"%s\" " "(a INTEGER PRIMARY KEY, b CHARACTER VARYING(20))", table_name); } szLogPrintf( srv_info, FALSE,"\"%s\"\n", qbuf); ret = SQLExecDirect(hstmt, (SQLCHAR *)qbuf, SQL_NTS); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecDirect"); ret = SQLFreeStmt(hstmt, SQL_DROP); if (!SQL_SUCCEEDED(ret)) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLFreeStmt"); } return ret; } /************************************************************************/ /* */ /* do_type_info */ /* */ /************************************************************************/ SQLRETURN do_type_info( lpSERVERINFO srv_info, SQLHDBC *hdbc, typeinfo_t *typeinfo) { struct types_s { SQLSMALLINT type; char *name; }; struct types_s types[] = { {SQL_ALL_TYPES,"ALL"}, {SQL_CHAR,"CHAR"}, {SQL_NUMERIC,"NUMERIC"}, {SQL_DECIMAL,"DECIMAL"}, {SQL_INTEGER,"INTEGER"}, {SQL_SMALLINT,"SMALLINT"}, {SQL_FLOAT,"FLOAT"}, {SQL_REAL,"REAL"}, {SQL_DOUBLE,"DOUBLE"}, {SQL_DATETIME,"DATETIME"}, {SQL_VARCHAR,"VARCHAR"}, {SQL_TIME,"TIME"}, {SQL_DATE,"DATE"}, {SQL_TIMESTAMP,"TIMESTAMP"}, {SQL_LONGVARCHAR,"LONGVARCHAR"}, {SQL_BINARY,"BINARY"}, {SQL_VARBINARY,"VARBINARY"}, {SQL_LONGVARBINARY,"LONGVARBINARY"}, {SQL_BIGINT,"BIGINT"}, {SQL_TINYINT,"TINYINT"}, {SQL_BIT,"BIT"}, {0,NULL} }; SQLRETURN ret; /* function status return */ unsigned int t_index; /* type index */ SQLHSTMT hstmt; /* statement handle */ unsigned int varchar_found=0; /* found SQL_VARCHAR */ unsigned int integer_found=0; /* found SQL_INTEGER */ SQLSMALLINT columns; /* no. of resultant columns */ szLogPrintf( srv_info, FALSE,"---------- do_type_info ----------\n"); /* * Allocate a statement and delete existing table. */ if (SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt) != SQL_SUCCESS) { do_a_error(srv_info, SQL_HANDLE_DBC, hdbc, "SQLAllocHandle"); return SQL_ERROR; } szLogPrintf( srv_info, FALSE,"\tCollecting type information with SQLGetTypeInfo\n"); t_index = 0; while(types[t_index].name) { char local_name[50]; char type_name[50]; SQLSMALLINT sql_data_type; SQLINTEGER column_size; char create_params[256]; SQLSMALLINT min_scale; SQLSMALLINT max_scale; SQLSMALLINT fix_prec_scale; if (srv_info->fDebug) szLogPrintf( srv_info, FALSE,"%s:\n", types[t_index].name); ret = SQLGetTypeInfo(hstmt, types[t_index].type); if (!SQL_SUCCEEDED(ret)) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetTypeInfo"); ret = SQLCloseCursor(hstmt); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLCloseCursor"); t_index++; continue; } if (!SQL_SUCCEEDED(SQLNumResultCols(hstmt, &columns))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLNumResultCols"); return SQL_ERROR; } if (columns < 19) { szLogPrintf( srv_info, FALSE, "** Can't find right number of columns in the result **\n"); szLogPrintf( srv_info, FALSE, "** Found %d columns\n", columns); } while(SQL_SUCCEEDED(ret = SQLFetch(hstmt))) { SQLLEN ind; local_name[0] = '\0'; if (!SQL_SUCCEEDED(ret = SQLGetData(hstmt, 1, SQL_C_CHAR, type_name, sizeof(type_name), &ind))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); } if (!SQL_SUCCEEDED(ret = SQLGetData(hstmt, 2, SQL_C_SHORT, &sql_data_type, sizeof(sql_data_type), &ind))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); } if (!SQL_SUCCEEDED(ret = SQLGetData(hstmt, 3, SQL_C_LONG, &column_size, sizeof(column_size), &ind))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); } /* * We are specifically interested in column size as we can use * this to choose a big data type for blob testing. However, * driver can legitimately return SQL_NULL_DATA (which we will * class as 0 length) and SQL_NO_TOTAL which sort of implies * very big (no limit). */ if (ind == SQL_NO_TOTAL) column_size = SQL_NO_TOTAL; if (ind == SQL_NULL_DATA) column_size = 0; create_params[0] = '\0'; if (!SQL_SUCCEEDED(ret = SQLGetData(hstmt, 6, SQL_C_CHAR, create_params, sizeof(create_params), &ind))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); } if (!SQL_SUCCEEDED(ret = SQLGetData(hstmt, 11, SQL_C_SHORT, &fix_prec_scale, sizeof(fix_prec_scale), &ind))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); } if (!SQL_SUCCEEDED(ret = SQLGetData(hstmt, 13, SQL_C_CHAR, local_name, sizeof(local_name), &ind))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); } if (!SQL_SUCCEEDED(ret = SQLGetData(hstmt, 14, SQL_C_SHORT, &min_scale, sizeof(min_scale), &ind))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); } if (ind == SQL_NULL_DATA) min_scale = -1; if (!SQL_SUCCEEDED(ret = SQLGetData(hstmt, 15, SQL_C_SHORT, &max_scale, sizeof(max_scale), &ind))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); } if (ind == SQL_NULL_DATA) max_scale = -1; if (srv_info -> fDebug) { if (column_size == SQL_NO_TOTAL) { szLogPrintf( srv_info, FALSE,"%20s %20s %d oo %d %d %d (%16s)\n", type_name, local_name, sql_data_type, min_scale, max_scale, fix_prec_scale, create_params); } else { szLogPrintf( srv_info, FALSE,"%20s %20s %d %ld %d %d %d (%16s)\n", type_name, local_name, sql_data_type, column_size, min_scale, max_scale, fix_prec_scale, create_params); } } if (types[t_index].type == SQL_VARCHAR) varchar_found = 1; if (types[t_index].type == SQL_VARCHAR) integer_found = 1; if (!strcmp(types[t_index].name, "ALL")) { if (typeinfo) { strcpy(typeinfo->local_name, local_name); strcpy(typeinfo->type_name, type_name); strcpy(typeinfo->create_params, create_params); typeinfo->sql_data_type = sql_data_type; typeinfo->column_size = column_size; typeinfo++; } } } if (ret != SQL_NO_DATA) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLFetch"); } ret = SQLCloseCursor(hstmt); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLCloseCursor"); t_index++; } if (srv_info->fDebug) szLogPrintf( srv_info, FALSE,"\n"); ret = SQLFreeStmt(hstmt, SQL_DROP); if (!SQL_SUCCEEDED(ret)) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLFreeStmt"); } if (!varchar_found || !integer_found) { szLogPrintf( srv_info, FALSE, "** Can't seem to locate the INTEGER and VARCHAR types **\n"); return SQL_ERROR; } return ret; } /************************************************************************/ /* */ /* do_table_info */ /* ============= */ /* */ /* Display a list of tables in the database. */ /* */ /************************************************************************/ SQLRETURN do_table_info(lpSERVERINFO srv_info, SQLHSTMT *hdbc) { SQLSMALLINT columns; SQLRETURN ret; SQLSMALLINT col; SQLHSTMT hstmt; szLogPrintf( srv_info, FALSE,"---------- do_table_info ----------\n"); /* * Allocate a statement and delete existing table. */ if (SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt) != SQL_SUCCESS) { do_a_error(srv_info, SQL_HANDLE_DBC, hdbc, "SQLAllocHandle"); return SQL_ERROR; } /* * Find out what tables we have. */ szLogPrintf( srv_info, FALSE,"\tFinding out what tables there are with SQLTables\n"); if (!SQL_SUCCEEDED(SQLTables(hstmt, NULL, 0, NULL, 0, NULL, 0, NULL, 0))) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLTables"); if (!SQL_SUCCEEDED(SQLNumResultCols(hstmt, &columns))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLNumResultCols"); return SQL_ERROR; } if (columns < 5) { szLogPrintf( srv_info, FALSE, "** Can't find enough columns in the table info **\n"); return SQL_ERROR; } if (srv_info->fDebug) szLogPrintf( srv_info, FALSE,"\tColumns: %d\n", columns); szLogPrintf( srv_info, FALSE,"\tCollecting column information for Tables call\n"); for (col = 1; col <= columns; col++) { SQLCHAR column_name[100]; SQLSMALLINT column_name_len; SQLSMALLINT data_type; SQLULEN column_size; ret = SQLDescribeCol(hstmt, col, column_name, sizeof(column_name), &column_name_len, &data_type, &column_size, NULL, NULL); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLDescribeCol"); if (column_name_len > sizeof(column_name)) column_name[sizeof(column_name) - 1] = '\0'; else column_name[column_name_len] = '\0'; if (srv_info->fDebug) szLogPrintf( srv_info, FALSE,"\tname:%s type=%d size=%lu\n", column_name, data_type, column_size); } /* * Fetch the names of the tables. */ szLogPrintf( srv_info, FALSE,"\tFetching the names of the tables\n"); while(SQL_SUCCEEDED(SQLFetch(hstmt))) { char buf[1024]; SQLLEN slen; ret = SQLGetData(hstmt, 3, SQL_C_CHAR, buf, sizeof(buf), &slen); if (SQL_SUCCEEDED(ret)) { buf[slen] = '\0'; if (srv_info->fDebug) szLogPrintf( srv_info, FALSE,"%s ", buf); } } if (srv_info->fDebug) szLogPrintf( srv_info, FALSE,"\n"); if (!SQL_SUCCEEDED(SQLCloseCursor(hstmt))) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLCloseCursor"); ret = SQLFreeStmt(hstmt, SQL_DROP); if (!SQL_SUCCEEDED(ret)) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLCloseCursor"); } return ret; } /************************************************************************/ /* */ /* do_create_rows */ /* */ /************************************************************************/ SQLRETURN do_create_rows( lpSERVERINFO srv_info, SQLHDBC *hdbc, char *table) { SQLLEN len_ind[2][paramset_size]; /* parameter lengths */ SQLINTEGER p1[paramset_size]; /* first parameter array */ SQLCHAR p2[paramset_size][30]; /* second parameter array */ SQLUSMALLINT param_status[paramset_size]; /* parameter status */ SQLUINTEGER params_processed; /* parameters processed */ SQLLEN row_counts[paramset_size]; /* rows affected */ SQLRETURN ret; /* function status return */ unsigned int row; /* current row */ unsigned int i; /* loop variable */ SQLHSTMT hstmt; /* statement handle */ char qbuf[1024]; /* query buffer */ szLogPrintf( srv_info, FALSE,"---------- do_create_rows ----------\n"); szLogPrintf( srv_info, FALSE,"-- Creating rows with column-wise bound parameters --\n"); if (SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt) != SQL_SUCCESS) { do_a_error(srv_info, SQL_HANDLE_DBC, hdbc, "SQLAllocHandle"); return SQL_ERROR; } /* * Delete all the rows. */ sprintf(qbuf, "delete from \"%s\"", table); szLogPrintf( srv_info, FALSE,"\"%s\"\n", qbuf); ret = SQLExecDirect(hstmt, (SQLCHAR *)qbuf, SQL_NTS); if (ret != SQL_SUCCESS) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecDirect"); /* * Set the parameter binding type. */ szLogPrintf( srv_info, FALSE,"\tSetting bind by column\n"); if (!SQL_SUCCEEDED(SQLSetStmtAttr(hstmt, SQL_ATTR_PARAM_BIND_TYPE, SQL_PARAM_BIND_BY_COLUMN, 0))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr"); return SQL_ERROR; } /* * Set the parameter status array and parameters processed. */ szLogPrintf( srv_info, FALSE,"\tSetting Parameter Status Array Ptr\n"); ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAM_STATUS_PTR, ¶m_status[0], 0); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr"); szLogPrintf( srv_info, FALSE,"\tSetting Parameters Processed Ptr\n"); ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAMS_PROCESSED_PTR, ¶ms_processed, 0); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr"); /* * Set the parameter set size. */ szLogPrintf( srv_info, FALSE,"\tSetting PARAMSETSIZE to %d\n", paramset_size); ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAMSET_SIZE, (SQLPOINTER)paramset_size, 0); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr"); /* * Create the rows. */ sprintf(qbuf, "insert into \"%s\" (a,b) values(?,?)", table); szLogPrintf( srv_info, FALSE,"\"%s\"\n", qbuf); if (SQLPrepare(hstmt, (SQLCHAR *)qbuf, SQL_NTS) != SQL_SUCCESS) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLPrepare"); return SQL_ERROR; } /* * Now look at what the driver thinks the parameters are. */ (void) do_describe_params(srv_info, hstmt, paramset_size); /* * Bind Parameters */ ret = SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER, 5, 0, p1, 0, len_ind[0]); if (!SQL_SUCCEEDED(ret)) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLBindParameter"); return ret; } ret = SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_VARCHAR, sizeof(p2[0]) - 1, 0, p2, sizeof(p2[0]), len_ind[1]); if (!SQL_SUCCEEDED(ret)) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLBindParameter"); return ret; } szLogPrintf( srv_info, FALSE,"\tInserting rows into table\n"); for (row = 0; row < TABLE_ROWS; row++) { /* a */ p1[0] = row; len_ind[0][0] = sizeof(p1[0]); p1[1] = TABLE_ROWS + row; len_ind[0][1] = sizeof(p1[1]); /* b */ sprintf((char*)p2[0], "this is row %u", row); len_ind[1][0] = SQL_NTS; sprintf((char*)p2[1], "and this is row %u", TABLE_ROWS + row); len_ind[1][1] = SQL_NTS; memset(param_status, 0xff, sizeof(param_status)); if (!SQL_SUCCEEDED(ret = SQLExecute(hstmt))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecute"); return SQL_ERROR; } else if (ret != SQL_SUCCESS) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecute"); } if (!SQL_SUCCEEDED(SQLRowCount(hstmt, row_counts))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLRowCount"); } if (row_counts[0] != paramset_size) { szLogPrintf( srv_info, FALSE, "** RowCount=%ld, expected %d **\n", row_counts[0], paramset_size); } for (i = 0; i < paramset_size; i++) { if ((param_status[i] != SQL_PARAM_SUCCESS)) { szLogPrintf( srv_info, FALSE, "** Row %u not executed, status=%u**\n", i+1, param_status[i]); } } if (params_processed != paramset_size) { szLogPrintf( srv_info, FALSE, "** Only %ld rows processed **\n", params_processed); } szLogPrintf( srv_info, FALSE,"."); fflush(stdout); } szLogPrintf( srv_info, FALSE,"\n"); szLogPrintf( srv_info, FALSE,"\tResetting parameters\n"); if (!SQL_SUCCEEDED(SQLFreeStmt(hstmt, SQL_RESET_PARAMS))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLFreeStmt"); } szLogPrintf( srv_info, FALSE,"\tClosing statement\n"); if (!SQL_SUCCEEDED(SQLFreeStmt(hstmt, SQL_CLOSE))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLFreeStmt"); } szLogPrintf( srv_info, FALSE,"\tClearing Parameter Status Array Ptr\n"); ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAM_STATUS_PTR, NULL, 0); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr"); szLogPrintf( srv_info, FALSE,"\tClearing Parameters Processed Ptr\n"); ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAMS_PROCESSED_PTR, NULL, 0); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr"); /* * Set the parameter set size. */ szLogPrintf( srv_info, FALSE,"\tSetting PARAMSETSIZE to 1\n"); ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAMSET_SIZE, (SQLPOINTER)1, 0); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr"); szLogPrintf( srv_info, FALSE,"\tDropping Statement\n"); ret = SQLFreeStmt(hstmt, SQL_DROP); if (!SQL_SUCCEEDED(ret)) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLFreeStmt"); } return ret; } /************************************************************************/ /* */ /* do_describe_params */ /* */ /************************************************************************/ SQLSMALLINT do_describe_params( lpSERVERINFO srv_info, SQLHSTMT *hstmt, SQLSMALLINT params) { unsigned int i; SQLRETURN ret; SQLSMALLINT data_type; SQLULEN param_size; SQLSMALLINT decimal_digits; SQLSMALLINT nullable; SQLSMALLINT parameters; szLogPrintf( srv_info, FALSE,"---------- do_describe_params ----------\n"); /* * Find out how many parameters the driver thinks we need. */ if (!SQL_SUCCEEDED(SQLNumParams(hstmt, ¶meters))) { szLogPrintf( srv_info, FALSE, "** SQLNumParams() failed **\n"); do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLNumParams"); return 0; } szLogPrintf( srv_info, FALSE,"\tDriver thinks we have %d parameters\n", parameters); if (parameters != params) { szLogPrintf( srv_info, FALSE, "** Inconsistent parameter counts expected %d, got %d **\n", params, parameters); } for (i = 1; i <= parameters; i++) { ret = SQLDescribeParam(hstmt, i, &data_type, ¶m_size, &decimal_digits, &nullable); if (!SQL_SUCCEEDED(ret)) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLDescribeParam"); } else { szLogPrintf( srv_info, FALSE,"\tparam:%u type:%d size=%lu digits:%d nullable:%d\n", i, data_type, param_size, decimal_digits, nullable); } } return parameters; } /************************************************************************/ /* */ /* do_a_error */ /* */ /************************************************************************/ SQLRETURN do_a_error( lpSERVERINFO srv_info, SQLSMALLINT type, SQLHANDLE handle, char *fn) { SQLRETURN ret; SQLCHAR state[7]; SQLCHAR text[1024]; SQLSMALLINT len; int i=0; SQLINTEGER native; char cbuf[2048]; SQLINTEGER ndiags; szLogPrintf( srv_info, FALSE,"** Error from %s **\n", fn); ret = SQLGetDiagField(type, handle, 0, SQL_DIAG_NUMBER, &ndiags, 0, NULL); szLogPrintf( srv_info, FALSE,"%ld diagnostics found\n", ndiags); do { ret = SQLGetDiagRec(type, handle, ++i, state, &native, text, sizeof(text), &len); if (SQL_SUCCEEDED(ret)) { sprintf(cbuf, "** error: %s:%d:%ld:%s **\n", state, i, native, text); szLogPrintf( srv_info, FALSE, cbuf); } } while (SQL_SUCCEEDED(ret)); return ret; } /************************************************************************/ /* */ /* do_get_info */ /* =========== */ /* */ /************************************************************************/ SQLRETURN do_get_info( lpSERVERINFO srv_info, SQLHDBC *hdbc, SQLUINTEGER *array_row_counts, SQLUINTEGER *array_selects, SQLUINTEGER *static_ca1, SQLUINTEGER *static_ca2) { SQLRETURN ret; szLogPrintf( srv_info, FALSE,"---------- do_get_info ----------\n"); ret = SQLGetInfo(hdbc, SQL_PARAM_ARRAY_ROW_COUNTS, array_row_counts, 0, NULL); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_DBC, hdbc, "SQLGetInfo"); if (*array_row_counts == SQL_PARC_BATCH) { szLogPrintf( srv_info, FALSE,"Driver: SQL_PARAM_ARRAY_ROW_COUNTS = SQL_PARC_BATCH\n"); } else if (*array_row_counts == SQL_PARC_NO_BATCH) { szLogPrintf( srv_info, FALSE,"Driver: SQL_PARAM_ARRAY_ROW_COUNTS = SQL_PARC_BATCH\n"); } else { szLogPrintf( srv_info, FALSE,"Driver: SQL_PARAM_ARRAY_ROW_COUNTS = unknown, %lu\n", *array_row_counts); } ret = SQLGetInfo(hdbc, SQL_PARAM_ARRAY_SELECTS, array_selects, 0, NULL); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_DBC, hdbc, "SQLGetInfo"); if (*array_selects == SQL_PAS_BATCH) { szLogPrintf( srv_info, FALSE,"Driver: SQL_PARAM_ARRAY_SELECTS = SQL_PAS_BATCH\n"); } else if (*array_selects == SQL_PAS_NO_BATCH) { szLogPrintf( srv_info, FALSE,"Driver: SQL_PARAM_ARRAY_SELECTS = SQL_PAS_NO_BATCH\n"); } else if (*array_selects == SQL_PAS_NO_SELECT) { szLogPrintf( srv_info, FALSE,"Driver: SQL_PARAM_ARRAY_SELECTS = SQL_PAS_NO_SELECT\n"); } else { szLogPrintf( srv_info, FALSE,"Driver: SQL_PARAM_ARRAY_SELECTS = unknown, %lu\n", *array_selects); } if (static_ca1) { ret = SQLGetInfo(hdbc, SQL_STATIC_CURSOR_ATTRIBUTES1, static_ca1, 0, NULL); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_DBC, hdbc, "SQLGetInfo"); if (*static_ca1 & SQL_CA1_POS_POSITION) { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES1 says SQL_CA1_POS_POSITION" "\nand so a static cursor can be positioned with SQLSetPos\n"); } else { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES1 says !SQL_CA1_POS_POSITION" "\nand so a static cursor can NOT be positioned with SQLSetPos\n"); } if (*static_ca1 & SQL_CA1_POS_UPDATE) { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES1 says SQL_CA1_POS_UPDATE" "\nand so a static cursor can be used to SQL_UPDATE with SQLSetPos\n"); } else { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES1 says !SQL_CA1_POS_UPDATE" "\nand so a static cursor can NOT be used to SQL_UPDATE with SQLSetPos\n"); } if (*static_ca1 & SQL_CA1_POS_DELETE) { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES1 says SQL_CA1_POS_DELETE" "\nand so a static cursor can be used to SQL_DELETE with SQLSetPos\n"); } else { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES1 says !SQL_CA1_POS_DELETE" "\nand so a static cursor can NOT be used to SQL_DELETE with SQLSetPos\n"); } if (*static_ca1 & SQL_CA1_POS_REFRESH) { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES1 says SQL_CA1_POS_REFRESH" "\nand so a static cursor can be used to SQL_REFRESH with SQLSetPos\n"); } else { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES1 says !SQL_CA1_POS_REFRESH" "\nand so a static cursor can NOT be used to SQL_REFRESH with SQLSetPos\n"); } } if (static_ca2) { ret = SQLGetInfo(hdbc, SQL_STATIC_CURSOR_ATTRIBUTES2, static_ca2, 0, NULL); if (!SQL_SUCCEEDED(ret)) do_a_error(srv_info, SQL_HANDLE_DBC, hdbc, "SQLGetInfo"); if (*static_ca2 & SQL_CA2_SENSITIVITY_ADDITIONS) { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES2 says SQL_CA2_SENSITIVITY_ADDITIONS" "\nand so added rows are visible with a static cursor\n"); } else { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES2 says !SQL_CA2_SENSITIVITY_ADDITIONS" "\nand so added rows NOT are visible with a static cursor\n"); } if (*static_ca2 & SQL_CA2_SENSITIVITY_DELETIONS) { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES2 says SQL_CA2_SENSITIVITY_DELETIONS" "\nand so deleted rows are visible with a static cursor\n"); } else { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES2 says !SQL_CA2_SENSITIVITY_DELETIONS" "\nand so deleted rows NOT are visible with a static cursor\n"); } if (*static_ca2 & SQL_CA2_SENSITIVITY_UPDATES) { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES2 says SQL_CA2_SENSITIVITY_UPDATES" "\nand so updated rows are visible with a static cursor\n"); } else { szLogPrintf( srv_info, FALSE,"Driver: SQL_STATIC_CURSOR_ATTRIBUTES2 says !SQL_CA2_SENSITIVITY_UPDATES" "\nand so updated rows NOT are visible with a static cursor\n"); } } return ret; } /************************************************************************/ /* */ /* do_get_dbtype */ /* ============= */ /* */ /************************************************************************/ SQLRETURN do_get_dbtype( lpSERVERINFO srv_info, SQLHDBC *hdbc, SQLSMALLINT type, char *type_name, size_t len) { SQLRETURN ret; SQLHSTMT hstmt; SQLLEN ind; /* * Find out what type to use for a timestamp. */ if (!SQL_SUCCEEDED(ret = SQLAllocStmt(hdbc, &hstmt))) { do_a_error(srv_info, SQL_HANDLE_DBC, hdbc, "SQLAllocStmt"); return ret; } if (!SQL_SUCCEEDED(ret = SQLGetTypeInfo(hstmt, type))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetTypeInfo"); SQLFreeStmt(hstmt, SQL_DROP); return ret; } if (!SQL_SUCCEEDED(ret = SQLFetch(hstmt))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLFetch"); SQLFreeStmt(hstmt, SQL_DROP); return ret; } if (!SQL_SUCCEEDED(ret = SQLGetData(hstmt, 1, SQL_C_CHAR, type_name, len, &ind))) { do_a_error(srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); SQLFreeStmt(hstmt, SQL_DROP); return ret; } return SQLFreeStmt(hstmt, SQL_DROP); } /************************************************************************/ /* */ /* string_row_status */ /* ================= */ /* */ /************************************************************************/ void string_row_status( SQLUSMALLINT status, char *string) { switch(status) { case SQL_ROW_SUCCESS: strcpy(string, "SQL_ROW_SUCCESS"); break; case SQL_ROW_SUCCESS_WITH_INFO: strcpy(string, "SQL_ROW_SUCCESS_WITH_INFO"); break; case SQL_ROW_ERROR: strcpy(string, "SQL_ROW_ERROR"); break; case SQL_ROW_UPDATED: strcpy(string, "SQL_ROW_UPDATED"); break; case SQL_ROW_DELETED: strcpy(string, "SQL_ROW_DELETED"); break; case SQL_ROW_ADDED: strcpy(string, "SQL_ROW_ADDED"); break; case SQL_ROW_NOROW: strcpy(string, "SQL_ROW_NOROW"); break; default: sprintf(string, "%d", status); break; } } char *string_param_status(SQLUSMALLINT status) { switch (status) { case SQL_PARAM_SUCCESS: return "SQL_PARAM_SUCCESS"; case SQL_PARAM_SUCCESS_WITH_INFO: return "SQL_PARAM_SUCCESS_WITH_INFO"; case SQL_PARAM_ERROR: return "SQL_PARAM_ERROR"; case SQL_PARAM_UNUSED: return "SQL_PARAM_UNUSED"; case SQL_PARAM_DIAG_UNAVAILABLE: return "SQL_PARAM_DIAG_UNAVAILABLE"; default: return "UNKNOWN"; } } unixODBC-2.2.14-p2/samples/cboundtimestampparam.c0100644000076400007640000004576707406123162020250 0ustar nicknick#include #include #if defined (WIN32) # include #endif #include #include #include #include "autotest.h" #include "helper.h" #ifndef WIN32 #define TRUE 1 #define FALSE 0 #endif static SQLRETURN create_table(lpSERVERINFO,SQLHDBC *hdbc, char *table, char *columns); static SQLRETURN create_rows(lpSERVERINFO,SQLHDBC *hdbc, char *table); static SQLRETURN show_rows(lpSERVERINFO,SQLHDBC *hdbc, char *table); SQLUINTEGER array_row_counts; SQLUINTEGER array_selects; /************************************************************************/ SWORD testboundparameters( lpSERVERINFO srv_info ) { SQLRETURN ret; char timestamp[100]; char create[256]; SQLHANDLE henv, hdbc; /* * Connect to the data source. */ if(srv_info->szValidServer0[0]) { if (SQLAllocEnv(&henv) != SQL_SUCCESS) { do_a_error( srv_info, SQL_HANDLE_ENV, henv, "SQLAllocHandle"); goto ErrorRet; } if (SQLAllocConnect(henv, &hdbc) != SQL_SUCCESS) { do_a_error( srv_info, SQL_HANDLE_ENV, henv, "SQLAllocHandle"); SQLFreeEnv(henv); goto ErrorRet; } ret = SQLConnect( hdbc, (SQLCHAR*)srv_info -> szValidServer0, SQL_NTS, (SQLCHAR*)srv_info -> szValidLogin0, SQL_NTS, (SQLCHAR*)srv_info -> szValidPassword0, SQL_NTS ); if ( ret == SQL_SUCCESS_WITH_INFO ) { do_a_error( srv_info, SQL_HANDLE_DBC, hdbc, "SQLConnect"); } else if ( ret != SQL_SUCCESS ) { do_a_error( srv_info, SQL_HANDLE_DBC, hdbc, "SQLConnect"); SQLFreeConnect(hdbc); SQLFreeEnv(henv); goto ErrorRet; } } else { henv = srv_info->henv; hdbc = srv_info->hdbc; } if (!SQL_SUCCEEDED( do_get_dbtype(srv_info, hdbc, SQL_TIMESTAMP, timestamp, sizeof(timestamp)))) { SQLFreeConnect(hdbc); SQLFreeEnv(henv); goto ErrorRet; } sprintf(create, "a integer, ts %s, f float, d char(50), t char(50), ff float", timestamp); if (!SQL_SUCCEEDED(ret = create_table(srv_info, hdbc,"bindtype", create))) { SQLFreeConnect(hdbc); SQLFreeEnv(henv); goto ErrorRet; } create_rows(srv_info, hdbc, "bindtype"); show_rows(srv_info, hdbc, "bindtype"); SQLDisconnect(hdbc); SQLFreeConnect(hdbc); SQLFreeEnv(henv); return 0; ErrorRet: /* a failure in an ODBC function that prevents completion of the */ /* test - for example, connect to the server */ szLogPrintf( srv_info, 0, "\t\t *** Unrecoverable Quick Test FAILURE ***"); srv_info->cErrors = -1; return 0; } /************************************************************************/ /* */ /* create_table */ /* =============== */ /* */ /* Delete the named table and create a new one. */ /* */ /************************************************************************/ static SQLRETURN create_table( lpSERVERINFO srv_info, SQLHDBC *hdbc, char *table, char *columns) { SQLHSTMT hstmt; /* statement handle */ SQLRETURN ret; /* function status return */ char qbuf[1024]; /* query buffer */ szLogPrintf( srv_info, FALSE,"---------- create_table ----------\n"); /* * Allocate a statement and delete existing table. */ if ((ret = SQLAllocStmt(hdbc, &hstmt)) != SQL_SUCCESS) { do_a_error( srv_info, SQL_HANDLE_DBC, hdbc, "SQLAllocStmt"); return SQL_ERROR; } sprintf(qbuf, "drop table %s", table); szLogPrintf( srv_info, FALSE,"\"%s\"\n", qbuf); if (!SQL_SUCCEEDED(SQLExecDirect(hstmt, (SQLCHAR *)qbuf, SQL_NTS))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecDirect"); } sprintf(qbuf, "create table %s (%s)", table, columns); szLogPrintf( srv_info, FALSE,"\"%s\"\n", qbuf); if (!SQL_SUCCEEDED(ret = SQLExecDirect(hstmt, (SQLCHAR *)qbuf, SQL_NTS))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecDirect"); return ret; } if (!SQL_SUCCEEDED(ret = SQLFreeStmt(hstmt, SQL_DROP))) do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLFreeStmt"); return ret; } /************************************************************************/ /* */ /* create_rows */ /* */ /************************************************************************/ static SQLRETURN create_rows( lpSERVERINFO srv_info, SQLHDBC *hdbc, char *table) { SQLUSMALLINT param_status[2]; /* parameter status */ SQLUINTEGER params_processed[2]; /* parameters processed */ SQLINTEGER p1[2]; SQL_TIMESTAMP_STRUCT p2[2]; float p3[2]; SQL_DATE_STRUCT p4[2]; SQL_TIME_STRUCT p5[2]; double p6[2]; SQLLEN ip1[2]; SQLLEN ip2[2]; SQLLEN ip3[2]; SQLLEN ip4[2]; SQLLEN ip5[2]; SQLLEN ip6[2]; SQLLEN row_counts; /* rows affected */ SQLRETURN ret; /* function status return */ unsigned int row; /* current row */ unsigned int i; /* loop variable */ SQLHSTMT hstmt; /* statement handle */ char qbuf[1024]; /* query buffer */ szLogPrintf( srv_info, FALSE,"---------- create_rows ----------\n"); if ((ret = SQLAllocStmt(hdbc, &hstmt)) != SQL_SUCCESS) { do_a_error( srv_info, SQL_HANDLE_DBC, hdbc, "SQLAllocStmt"); return ret; } /* * Delete all the rows. */ sprintf(qbuf, "delete from %s", table); szLogPrintf( srv_info, FALSE,"\"%s\"\n", qbuf); ret = SQLExecDirect(hstmt, (SQLCHAR *)qbuf, SQL_NTS); /* SQL_NO_DATA returned when no rows deleted */ if ((ret != SQL_SUCCESS) && (ret != SQL_NO_DATA)) do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecDirect"); /* * Set the parameter binding type. */ szLogPrintf( srv_info, FALSE,"\tSetting bind by row\n"); if (!SQL_SUCCEEDED(SQLSetStmtAttr(hstmt, SQL_ATTR_PARAM_BIND_TYPE, (SQLPOINTER)SQL_BIND_BY_COLUMN, 0))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr(BIND_BY_COLUMN)"); return SQL_ERROR; } /* * Set the parameter status array and parameters processed. */ szLogPrintf( srv_info, FALSE,"\tSetting Parameter Status Array Ptr\n"); if (!SQL_SUCCEEDED( ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAM_STATUS_PTR, ¶m_status[0], 0))) do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr(PARAM_STATUS)"); szLogPrintf( srv_info, FALSE,"\tSetting Parameters Processed Ptr\n"); params_processed[0] = params_processed[1] = 255; if (!SQL_SUCCEEDED( ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAMS_PROCESSED_PTR, ¶ms_processed[0], 0))) do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr(PARAMS_PROCESSED)"); /* * Create the rows. */ sprintf(qbuf, "insert into %s values(?,?,?,?,?,?)", table); szLogPrintf( srv_info, FALSE,"\"%s\"\n", qbuf); if ((ret = SQLPrepare(hstmt, (SQLCHAR *)qbuf, SQL_NTS)) != SQL_SUCCESS) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLPrepare"); return SQL_ERROR; } /* * Now look at what the driver thinks the parameters are. */ (void) do_describe_params(srv_info, hstmt, 6); /* * Bind Parameters */ if (!SQL_SUCCEEDED( ret = SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER, 0, 0, &p1[0], sizeof(p1[0]), &ip1[0]))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLBindParameter4"); return ret; } if (!SQL_SUCCEEDED( ret = SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_TYPE_TIMESTAMP, SQL_TYPE_TIMESTAMP, 23, 0, &p2[0], sizeof(p2[0]), &ip2[0]))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLBindParameter4"); return ret; } if (!SQL_SUCCEEDED( ret = SQLBindParameter(hstmt, 3, SQL_PARAM_INPUT, SQL_C_FLOAT, SQL_FLOAT, 0, 0, &p3[0], sizeof(p3[0]), &ip3[0]))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLBindParameter4"); return ret; } if (!SQL_SUCCEEDED( ret = SQLBindParameter(hstmt, 4, SQL_PARAM_INPUT, SQL_C_DATE, SQL_CHAR, 50, 0, &p4[0], sizeof(p4[0]), &ip4[0]))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLBindParameter4"); return ret; } if (!SQL_SUCCEEDED( ret = SQLBindParameter(hstmt, 5, SQL_PARAM_INPUT, SQL_C_TIME, SQL_CHAR, 50, 0, &p5[0], sizeof(p5[0]), &ip5[0]))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLBindParameter4"); return ret; } if (!SQL_SUCCEEDED( ret = SQLBindParameter(hstmt, 6, SQL_PARAM_INPUT, SQL_C_DOUBLE, SQL_DOUBLE, sizeof(p6[0]), 0, &p6[0], sizeof(p6[0]), &ip6[0]))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLBindParameter4"); return ret; } if (!SQL_SUCCEEDED( ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAMSET_SIZE, (SQLPOINTER)2, 0))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr(SQL_ATTR_PARAMSET_SIZE"); return ret; } szLogPrintf( srv_info, FALSE,"\tInserting rows into table\n"); for (row = 0; row < 2; row++) { p1[0] = row; p2[0].year = 1992; p2[0].month = 12; p2[0].day = 31; p2[0].hour = 23; p2[0].minute = 45; p2[0].second = 55; p2[0].fraction = 500000000; p3[0] = 1.4142135 * (row + 1); p4[0].year = 1992; p4[0].month = 12; p4[0].day = 31; p5[0].hour = 23; p5[0].minute = 45; p5[0].second = 55; p6[0] = 1.23456789 * (row + 1); ip1[0] = sizeof(p1[0]); ip2[0] = sizeof(p2[0]); ip3[0] = sizeof(p3[0]); ip4[0] = sizeof(p4[0]); ip5[0] = sizeof(p5[0]); ip6[0] = sizeof(p6[0]); p1[1] = row; p2[1].year = 1966; p2[1].month = 11; p2[1].day = 9; p2[1].hour = 1; p2[1].minute = 2; p2[1].second = 3; p2[1].fraction = 500000000; p3[1] = 3.14 * (row + 1); p4[1].year = 1966; p4[1].month = 11; p4[1].day = 9; p5[1].hour = 1; p5[1].minute = 2; p5[1].second = 3; p6[1] = 9.87654321 * (row + 1); ip1[1] = sizeof(p1[1]); ip2[1] = sizeof(p2[1]); ip3[1] = sizeof(p3[1]); ip4[1] = sizeof(p4[1]); ip5[1] = sizeof(p5[1]); ip6[1] = sizeof(p6[1]); param_status[0] = param_status[1] = 0xff; if (!SQL_SUCCEEDED(ret = SQLExecute(hstmt))) { if (ret == SQL_NEED_DATA) { szLogPrintf( srv_info, FALSE, "SQLExecute=SQL_NEED_DATA\n"); return SQL_ERROR; } szLogPrintf( srv_info, FALSE, "%d from SQLExecute\n", ret); do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecute"); return SQL_ERROR; } else if (ret != SQL_SUCCESS) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecute"); } if (!SQL_SUCCEEDED(SQLRowCount(hstmt, &row_counts))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLRowCount"); } if (row_counts != 2) { szLogPrintf( srv_info, FALSE, "** RowCount=%ld, expected %d **\n", row_counts, 2); } for (i = 0; i < 2; i++) { if ((param_status[i] != SQL_PARAM_SUCCESS)) { szLogPrintf( srv_info, FALSE, "** Row %u not executed, status=%u (%s)**\n", i+1, param_status[i], string_param_status(param_status[i])); } } if (params_processed[0] != 2) { szLogPrintf( srv_info, FALSE, "** Only %ld params processed, expected 1 **\n", params_processed[0]); } szLogPrintf( srv_info, FALSE,"."); fflush(stdout); } szLogPrintf( srv_info, FALSE,"\n"); szLogPrintf( srv_info, FALSE,"\tResetting parameters\n"); if (!SQL_SUCCEEDED(SQLFreeStmt(hstmt, SQL_RESET_PARAMS))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLFreeStmt(RESET_PARAMS)"); } szLogPrintf( srv_info, FALSE,"\tClosing statement\n"); if (!SQL_SUCCEEDED(SQLFreeStmt(hstmt, SQL_CLOSE))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLFreeStmt(SQL_CLOSE)"); } szLogPrintf( srv_info, FALSE,"\tClearing Parameter Status Array Ptr\n"); if (!SQL_SUCCEEDED( ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAM_STATUS_PTR, NULL, 0))) do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr(PARAM_STATUS)"); szLogPrintf( srv_info, FALSE,"\tClearing Parameters Processed Ptr\n"); if (!SQL_SUCCEEDED( ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAMS_PROCESSED_PTR, NULL, 0))) do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr(PARAMS_PROCESSED)"); /* * Set the parameter set size. */ szLogPrintf( srv_info, FALSE,"\tSetting PARAMSETSIZE to 1\n"); if (!SQL_SUCCEEDED( ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAMSET_SIZE, (SQLPOINTER)1, 0))) do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLSetStmtAttr(PARAMSET_SIZE)"); szLogPrintf( srv_info, FALSE,"\tDropping Statement\n"); if (!SQL_SUCCEEDED(ret = SQLFreeStmt(hstmt, SQL_DROP))) do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLFreeStmt(SQL_DROP)"); return ret; } /************************************************************************/ /* */ /* show_rows */ /* */ /************************************************************************/ static SQLRETURN show_rows( lpSERVERINFO srv_info, SQLHDBC *hdbc, char *table) { SQLINTEGER p1[2]; SQL_TIMESTAMP_STRUCT p2[2]; float p3[2]; SQL_DATE_STRUCT p4[2]; SQL_TIME_STRUCT p5[2]; double p6[2]; SQLRETURN ret; /* function status return */ SQLHSTMT hstmt; /* statement handle */ char qbuf[1024]; /* query buffer */ SQLLEN ind; szLogPrintf( srv_info, FALSE,"---------- create_rows ----------\n"); if ((ret = SQLAllocStmt(hdbc, &hstmt)) != SQL_SUCCESS) { do_a_error( srv_info, SQL_HANDLE_DBC, hdbc, "SQLAllocStmt"); return ret; } szLogPrintf( srv_info, FALSE,"Retrieving rows for comparison\n"); if (SQLAllocStmt(hdbc, &hstmt) != SQL_SUCCESS) { do_a_error( srv_info, SQL_HANDLE_DBC, hdbc, "SQLAllocHandle"); return SQL_ERROR; } sprintf(qbuf, "select * from %s", table); szLogPrintf( srv_info, FALSE,"\"%s\"\n", qbuf); if ((ret = SQLPrepare(hstmt, (SQLCHAR *)qbuf, SQL_NTS)) != SQL_SUCCESS) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLPrepare"); return ret; } if (!SQL_SUCCEEDED(ret = SQLExecute(hstmt))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecute"); return ret; } else if (ret != SQL_SUCCESS) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLExecute"); } memset(&p2[0], '\0', sizeof(p2[0])); memset(&p1[0], '\0', sizeof(p1[0])); memset(&p3[0], '\0', sizeof(p3[0])); memset(&p4[0], '\0', sizeof(p4[0])); while(SQL_SUCCEEDED(SQLFetch(hstmt))) { if (!SQL_SUCCEEDED( SQLGetData(hstmt, 1, SQL_C_LONG, &p1[0], sizeof(p1[0]), &ind))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); return SQL_ERROR; } if (!SQL_SUCCEEDED( SQLGetData(hstmt, 2, SQL_C_TIMESTAMP, &p2[0], sizeof(p2[0]), &ind))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); return SQL_ERROR; } if (!SQL_SUCCEEDED( SQLGetData(hstmt, 3, SQL_C_FLOAT, &p3[0], sizeof(p3[0]), &ind))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); return SQL_ERROR; } if (!SQL_SUCCEEDED( SQLGetData(hstmt, 4, SQL_C_DATE, &p4[0], sizeof(p4[0]), &ind))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); return SQL_ERROR; } if (!SQL_SUCCEEDED( SQLGetData(hstmt, 5, SQL_C_TIME, &p5[0], sizeof(p5[0]), &ind))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); return SQL_ERROR; } if (!SQL_SUCCEEDED( SQLGetData(hstmt, 6, SQL_C_DOUBLE, &p6[0], sizeof(p6[0]), &ind))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLGetData"); return SQL_ERROR; } szLogPrintf(srv_info, FALSE, "%ld | " "%d:%u:%u-%u:%u:%u.%u |" "%f | %d:%u:%u | %u:%u:%u | %g\n", p1[0], p2[0].year, p2[0].month, p2[0].day, p2[0].hour, p2[0].minute, p2[0].second, p2[0].fraction, p3[0], p4[0].year, p4[0].month, p4[0].day, p5[0].hour, p5[0].minute, p5[0].second, p6[0]); } szLogPrintf( srv_info, FALSE,"\tDropping Statement\n"); if (!SQL_SUCCEEDED(ret = SQLFreeStmt(hstmt, SQL_DROP))) { do_a_error( srv_info, SQL_HANDLE_STMT, hstmt, "SQLFreeStmt"); } return ret; } unixODBC-2.2.14-p2/samples/cursor.c0100644000076400007640000001711507570441722015337 0ustar nicknick#include #include #include #define ROWS 20 #define STATUS_LEN 6 #define OPENDATE_LEN 11 #define DONE -1 int res[][ 3 ] = { { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_PRIOR, 0, 0 }, { SQL_FETCH_FIRST, 0, 0 }, { SQL_FETCH_ABSOLUTE, -100, 0 }, { SQL_FETCH_ABSOLUTE, -400, 0 }, { SQL_FETCH_ABSOLUTE, 200, 0 }, { SQL_FETCH_ABSOLUTE, 350, 0 }, { SQL_FETCH_LAST, 0, 0 }, { SQL_FETCH_NEXT, 0, 0 }, { SQL_FETCH_LAST, 0, 0 }, { SQL_FETCH_FIRST, 0, 0 }, { SQL_FETCH_RELATIVE, 20, 0 }, { SQL_FETCH_RELATIVE, 50, 0 }, { SQL_FETCH_RELATIVE, 101, 0 }, { SQL_FETCH_RELATIVE, -5, 0 }, { SQL_FETCH_RELATIVE, 60, 0 }, { SQL_FETCH_RELATIVE, -60, 0 }, { SQL_FETCH_RELATIVE, 0, 0 }, { SQL_FETCH_RELATIVE, 0, 0 }, { SQL_FETCH_NEXT, 0, -1 }, }; int PromptScroll( SQLUINTEGER *ort, SQLUINTEGER *offset ) { static int count = 0; int ret; *ort = res[ count ][ 0 ]; *offset = res[ count ][ 1 ]; ret = res[ count ][ 2 ]; count ++; return ret; } int DumpODBCLog( SQLHENV hEnv, SQLHDBC hDbc, SQLHSTMT hStmt ) { SQLCHAR szError[501]; SQLCHAR szSqlState[10]; SQLINTEGER nNativeError; SQLSMALLINT nErrorMsg; if ( hStmt ) { while ( SQLError( hEnv, hDbc, hStmt, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "%s\n", szError ); } } if ( hDbc ) { while ( SQLError( hEnv, hDbc, 0, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "%s\n", szError ); } } if ( hEnv ) { while ( SQLError( hEnv, 0, 0, szSqlState, &nNativeError, szError, 500, &nErrorMsg ) == SQL_SUCCESS ) { printf( "%s\n", szError ); } } return 1; } static int Display( SQLUSMALLINT *rsa, SQLUINTEGER crow, SQLSMALLINT *sOrderID, SQLINTEGER *cbOrderID, SQLCHAR szOrderDate[][OPENDATE_LEN], SQLINTEGER *cbOrderDate, SQLCHAR szStatus[][STATUS_LEN], SQLINTEGER *cbStatus ) { int i; printf( "crow = %d\n", crow ); for ( i = 0; i < crow; i ++ ) { printf( "%d %d |%d:%d|%s:%d|%s:%d\n", i, rsa[ i ], sOrderID[ i ], cbOrderID[ i ], szOrderDate[ i ], cbOrderDate[ i ], szStatus[ i ], cbStatus[ i ] ); } } void create_file( SQLHANDLE hstmt ) { SQLRETURN ret; int i; ret = SQLExecDirect( hstmt, "drop table ctest", SQL_NTS ); ret = SQLExecDirect( hstmt, "create table ctest ( id integer, dt character( 10 ), status character( 5 ), other character varying( 40 ))", SQL_NTS ); for ( i = 1; i < 1000; i ++ ) { char sql[ 256 ]; sprintf( sql, "insert into ctest values( %d, '%10d', '%05d', 'other line %d' )", i, i, i, i ); ret = SQLExecDirect( hstmt, sql, SQL_NTS ); printf( "%s - %d\n", sql, ret ); } } void cursor_test() { SQLHENV henv; SQLHDBC hdbc; SQLHSTMT hstmt1, hstmt2; SQLRETURN retcode; SQLCHAR szStatus[ROWS][STATUS_LEN], szOpenDate[ROWS][OPENDATE_LEN]; SQLCHAR szNewStatus[STATUS_LEN], szNewOpenDate[OPENDATE_LEN]; SQLSMALLINT sOrderID[ROWS], sNewOrderID[ROWS]; SQLINTEGER cbStatus[ROWS], cbOrderID[ROWS], cbOpenDate[ROWS]; SQLUINTEGER FetchOrientation, crow, FetchOffset, irowUpdt; SQLUSMALLINT RowStatusArray[ROWS]; SQLAllocHandle( SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv ); SQLSetEnvAttr( henv, SQL_ATTR_ODBC_VERSION, SQL_OV_ODBC3, 0 ); SQLAllocHandle( SQL_HANDLE_DBC, henv, &hdbc ); /* Specify the ODBC Cursor Library is always used then connect. */ SQLSetConnectAttr( hdbc, SQL_ATTR_ODBC_CURSORS, SQL_CUR_USE_ODBC, 0 ); retcode = SQLConnect( hdbc, "postgres", SQL_NTS, "", SQL_NTS, "", SQL_NTS ); DumpODBCLog( NULL, hdbc, NULL ); if ( retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO ) { /* Allocate a statement handle for the result set and a statement */ /* handle for a positioned update statement */ SQLAllocHandle( SQL_HANDLE_STMT, hdbc, &hstmt1 ); SQLAllocHandle( SQL_HANDLE_STMT, hdbc, &hstmt2 ); /* * create the data */ create_file( hstmt1 ); /* Specify an updateable statis cursor with 20 rows of data. Set */ /* the cursor name, execute the SELECT statement, and bind the */ /* rowset buffer to result set columns in column-wise fashion */ SQLSetStmtAttr( hstmt1, SQL_ATTR_CONCURRENCY, SQL_CONCUR_VALUES, 0 ); SQLSetStmtAttr( hstmt1, SQL_ATTR_CURSOR_TYPE, SQL_CURSOR_STATIC, 0 ); SQLSetStmtAttr( hstmt1, SQL_ATTR_ROW_ARRAY_SIZE, ROWS, 20 ); SQLSetStmtAttr( hstmt1, SQL_ATTR_ROW_STATUS_PTR, RowStatusArray, 0 ); SQLSetStmtAttr( hstmt1, SQL_ATTR_ROWS_FETCHED_PTR, &crow, 0 ); SQLSetCursorName( hstmt1, "ORDERCURSOR", SQL_NTS ); SQLPrepare( hstmt1, "select id, dt, status from ctest", SQL_NTS ); { char cname[ 30 ]; retcode = SQLDescribeCol( hstmt1, 1, cname, sizeof( cname ), NULL, NULL, NULL, NULL, NULL ); printf( "ret = %d %s\n", retcode, cname ); DumpODBCLog( NULL, NULL, hstmt1 ); } SQLExecute( hstmt1 ); SQLBindCol( hstmt1, 1, SQL_C_SSHORT, sOrderID, 0, cbOrderID ); SQLBindCol( hstmt1, 2, SQL_C_CHAR, szOpenDate, OPENDATE_LEN, cbOpenDate ); SQLBindCol( hstmt1, 3, SQL_C_CHAR, szStatus, STATUS_LEN, cbStatus ); FetchOrientation = SQL_FETCH_FIRST; FetchOffset = 0; do { int ret; int count; printf( "fetch %d %d\n", FetchOrientation, FetchOffset ); ret = SQLFetchScroll( hstmt1, FetchOrientation, FetchOffset ); SQLRowCount( hstmt1, &count ); printf( "ret = %d count = %d\n", ret, count ); Display( RowStatusArray, crow, sOrderID, cbOrderID, szOpenDate, cbOpenDate, szStatus, cbStatus ); if ( SQL_SUCCEEDED( ret )) { char txt[ 50 ]; SQLINTEGER len; ret = SQLSetPos( hstmt1, 5, SQL_POSITION, SQL_LOCK_NO_CHANGE ); ret = SQLGetData( hstmt1, 2, SQL_C_CHAR, txt, sizeof( txt ), &len ); printf( "ret = %d %s:%d\n", ret, txt, len ); } } while( PromptScroll( &FetchOrientation, &FetchOffset ) != DONE ); SQLCloseCursor( hstmt1 ); SQLFreeStmt( hstmt1, SQL_DROP ); SQLFreeStmt( hstmt2, SQL_DROP ); SQLDisconnect( hdbc ); SQLFreeHandle( SQL_HANDLE_DBC, hdbc ); } SQLFreeHandle( SQL_HANDLE_ENV, henv ); } int main() { cursor_test(); } unixODBC-2.2.14-p2/samples/quiktest.h0100644000076400007640000002717607363332200015676 0ustar nicknick//**************************************************************************** //| Title: quiktest.h //| //| (c) Copyright 1991, 1992, 1993, 1994, 1995 //| by Microsoft Corp. //| //****************************************************************************** #ifndef quiktest_defs #define quiktest_defs #define TRUE 1 #define FALSE 0 #define TEXT(x) x /*-----------------------------------------------------------------------------------*/ /* constants defines */ /*-----------------------------------------------------------------------------------*/ #define MAX_QUERY_SIZE 2048 #define MAX_BIND_ELEMENTS 100 #define MAX_BIND_ARRAY_ELEMENT MAX_QUERY_SIZE / MAX_BIND_ELEMENTS #define MAX_STRING_SIZE 1024 // Increased from 255 due to overwrite #define MAX_PARAM_SIZE 129 #define MAX_DATA_SIZE 45 #define MAX_COLUMN_LIST_SIZE 200 #define MAX_COLUMN_NAME_SIZE 100 #define MAX_INSERT_VALUES_SIZE 200 #define MAX_TYPES_SUPPORTED 25 #define MAX_TYPE_NAME 129 #define MAX_FIELD 40 #define MAX_PREFIX 129 #define MAX_SUFFIX 129 #define MAX_TABLE_NAME 60 #define MAX_NUM_BUFFER 60 #define MAX_ERROR_SIZE 200 #define MAX_ROW_ITEM_LIMIT 4 #define PREFIX_SIZE 3 #define IGNORED 999 #define TEST_CONNECT_OPTION 15 #define TEST_STMT_OPTION 300 #define SCALEDIFF 4 #define ABORT -1 #define TYPE_PORTION 4 #define MAXUDWORD ((UDWORD)(-1)) #define MINSDWORD (-(SDWORD)((MAXUDWORD / 2) + 1)) #define MAXSDWORD ((SDWORD)(MAXUDWORD / 2)) #define SMALLBUFF 100 #define MEDBUFF 200 #define LARGEBUFF 300 #define XLARGEBUFF 1024 #define STATE_SIZE 6 #define COMBINED_SIZE MAX_ERROR_SIZE + 30 // Descriptor type defines #define DESC_NONE 0 // No descriptor type #define DESC_APD 1 // APD only #define DESC_IPD 2 // IPD only #define DESC_ARD 4 // ARD only #define DESC_IRD 8 // IRD only #define DESC_PD DESC_APD|DESC_IPD // Parameter descriptors #define DESC_RD DESC_ARD|DESC_IRD // Row descriptors #define DESC_ID DESC_IPD|DESC_IRD // Implementation descriptors #define DESC_AD DESC_APD|DESC_ARD // Application descriptors #define DESC_MOST DESC_AD|DESC_IPD // This is the most common settable combination #define DESC_ALL DESC_APD|DESC_IPD|DESC_ARD|DESC_IRD // All descriptor types #define STATUS_ARRAY_SIZE 5 // Array size to use for row and param arrays #define BIND_SIZE 12 // Bind type size value /* NUM_THREAD is the number of threads that will be created for multi-thread test */ #define NUM_THREAD 5 #define NUM_QUIKREBIND_ROWSETS 6 /* BIND_PARM_OFFSET specifies the parameter base for DAE bindings. Either 0 */ /* or 1 based. */ #define BIND_PARM_OFFSET 0 // COLNAME_START specifies the beginning number used in colnames, i.e. c00bit // vs. c01bit. #define COLNAME_START 1 /*constants for Descriptor tests */ #define MAX_DESC_BUF 200 #define DESC_UPDATE_MODE_READ 0 #define DESC_UPDATE_MODE_WRITE 1 #define REC_COUNT_UNK -1 // Unkown record count // #define DESC_LOCATE_FAIL -1 /* constants for TestBindParam */ #define INSERT_FAIL -1 #define UNTOUCHED 0xCA /*------------------------------------------------------------------------------------*/ /* macros */ /*------------------------------------------------------------------------------------*/ #define RC_SUCCESSFUL(rc) ((rc) == SQL_SUCCESS || \ (rc) == SQL_SUCCESS_WITH_INFO) #define RC_NOTSUCCESSFUL(rc) (!(RC_SUCCESSFUL(rc))) #define RETCHECK(exp, rec, buf) ReturnCheck(exp, rec, buf, TEXT(__FILE__), __LINE__,FALSE) #define ERRSHANDLE(type, handle, exp, rec, buf) ErrsHandle(type, handle, exp, rec, buf, TEXT(__FILE__), __LINE__,FALSE) #define DIAGRETCHECK(exp, rec, buf) ReturnCheck(exp, rec, buf, TEXT(__FILE__), __LINE__,TRUE) #define DISPLAYERROR(func, string) qtDisplayError(func, string, TEXT(__FILE__), __LINE__) /*--------------------------------------------------------------------------------------*/ /* Structure definitions */ /*--------------------------------------------------------------------------------------*/ /* Number of Cols in result set of a query: */ UWORD cNumResSetCols; /* used to store information from GetTypeInfo for table creation */ typedef struct FieldInfo { int iField; TCHAR szType[MAX_TYPE_NAME]; TCHAR szFieldName[MAX_FIELD]; SWORD wSQLType; TCHAR szParams[MAX_PARAM_SIZE]; TCHAR szLength[MAX_FIELD]; TCHAR szPrefix[MAX_PREFIX]; TCHAR szSuffix[MAX_SUFFIX]; SDWORD precision; SWORD scale; SWORD nullable; UDWORD length; int fAutoUpdate; SWORD fSearchable; SDWORD fUnsigned; SWORD autoinc; } FIELDINFO; /* large buffers allocated as a global used for queries and other*/ /* returned information */ typedef struct tagQtStruct { TCHAR buf[MAX_STRING_SIZE]; TCHAR sz[MAX_QUERY_SIZE]; TCHAR szParamQuery[MAX_QUERY_SIZE]; TCHAR szParam[MAX_PARAM_SIZE]; TCHAR szDataItem[MAX_DATA_SIZE]; TCHAR szTableName[MAX_TABLE_NAME]; TCHAR szColNames[MAX_COLUMN_LIST_SIZE]; TCHAR szColName[MAX_COLUMN_NAME_SIZE]; TCHAR szValues[MAX_INSERT_VALUES_SIZE]; } QTSTRUCT; /* the storage used for data retreived using bind/fetch sequence */ /* and data for BindParameter */ /* only cb and one of the types will be used for each entry */ typedef struct tagDataStruct { SDWORD cb; TCHAR data[MAX_STRING_SIZE]; SDWORD sdword; UDWORD udword; SWORD sword; UWORD uword; TCHAR sChar; SQLTCHAR uChar; SDOUBLE sdouble; SFLOAT sfloat; TIME_STRUCT time; DATE_STRUCT date; TIMESTAMP_STRUCT timestamp; } DSTRUCT; /* These declarations used to reside locally, but the structures didn't get initialized correctly */ typedef struct SupportOptList { UDWORD Support; SDWORD Option; } SUPPORTOPTINFO; typedef struct SupportConcurList { UDWORD Support; UWORD Option; } SUPPORTCONCURINFO; /* Each thread will contain the following information */ typedef struct { HENV henv; HDBC hdbc; TCHAR szTableName[MAX_TABLE_NAME]; FIELDINFO rgFieldInfo; } THREAD_STRUCT; static union { BYTE rgb[16]; SWORD sw; UWORD uw; SDWORD sdw; UDWORD udw; HENV henv; HDBC hdbc; HSTMT hstmt; SQLHDESC hdesc; } Untouched = {UNTOUCHED, UNTOUCHED, UNTOUCHED, UNTOUCHED}; int ReturnCheck(RETCODE retExpected, RETCODE retReceived, LPTSTR szFunction, LPTSTR szFile, int iLine,BOOL fDiag); void qtDisplayError(LPTSTR szFunction, LPTSTR buf, LPTSTR szFile, int iLine); LPTSTR qtMakeData(int row, int col,FIELDINFO * rgField, LPTSTR buf); BOOL CmpODBCtoCHAR(DSTRUCT * rgTestValue, TCHAR * szTrueValue, SWORD fSqlType, SWORD iResSetCol); void* CvtCHARtoODBC(void * odbcValue, TCHAR * buf, SWORD fSqlType) { if(!buf) return NULL; switch (fSqlType) { case SQL_DATE: case SQL_TYPE_DATE: { TCHAR szDATEDELIM[] = "d{}'- "; TCHAR szTempBuff[30]; LPTSTR tmpstr=szTempBuff; _tcscpy((LPTSTR) szTempBuff, buf); ((DATE_STRUCT *)odbcValue)->year = _ttoi(_tcstok(tmpstr, szDATEDELIM)); ((DATE_STRUCT *)odbcValue)->month = _ttoi(_tcstok(NULL, szDATEDELIM)); ((DATE_STRUCT *)odbcValue)->day = _ttoi(_tcstok(NULL, szDATEDELIM)); break; } case SQL_TIME: case SQL_TYPE_TIME: { TCHAR szTIMEDELIM[] = TEXT("t{}': "); TCHAR szTempBuff[30]; LPTSTR tmpstr=szTempBuff; _tcscpy((LPTSTR) szTempBuff, buf); ((TIME_STRUCT *)odbcValue)->hour = _ttoi(_tcstok(tmpstr, szTIMEDELIM)); ((TIME_STRUCT *)odbcValue)->minute = _ttoi(_tcstok(NULL, szTIMEDELIM)); ((TIME_STRUCT *)odbcValue)->second = _ttoi(_tcstok(NULL, szTIMEDELIM)); break; } case SQL_TIMESTAMP: case SQL_TYPE_TIMESTAMP: { TCHAR szDATETIMEDELIM[] = TEXT("ts'{}-:. "); TCHAR szTempBuff[30]; LPTSTR tmpstr=szTempBuff; LPTSTR endstr, frstr; _tcscpy((LPTSTR) szTempBuff, buf); /* First the date */ ((TIMESTAMP_STRUCT *)odbcValue)->year = _ttoi(_tcstok(tmpstr, szDATETIMEDELIM)); ((TIMESTAMP_STRUCT *)odbcValue)->month = _ttoi(_tcstok(NULL, szDATETIMEDELIM)); ((TIMESTAMP_STRUCT *)odbcValue)->day = _ttoi(_tcstok(NULL, szDATETIMEDELIM)); /* Then the complete time */ ((TIMESTAMP_STRUCT *)odbcValue)->hour = _ttoi(_tcstok(NULL, szDATETIMEDELIM)); ((TIMESTAMP_STRUCT *)odbcValue)->minute = _ttoi(_tcstok(NULL, szDATETIMEDELIM)); ((TIMESTAMP_STRUCT *)odbcValue)->second = _ttoi(_tcstok(NULL, szDATETIMEDELIM)); if(frstr = _tcstok(NULL, szDATETIMEDELIM)) ((TIMESTAMP_STRUCT *)odbcValue)->fraction = (_tcstoul(frstr, &endstr, 10) * 1000000); else ((TIMESTAMP_STRUCT *)odbcValue)->fraction = 0; break; } } return odbcValue; } /* Compares the value stored at location (row,col) in the array of * DSTRUCT's with the value created by qtMakeData */ BOOL CmpODBCtoCHAR(DSTRUCT * rgTestValue, TCHAR * szTrueValue, SWORD fSqlType, SWORD iCol) { BOOL fTestPass=TRUE; SWORD test1,test2; TCHAR *pStop=NULL; switch (fSqlType) { case SQL_BIGINT: case SQL_INTEGER: if(_ttoi(szTrueValue) == (int)rgTestValue[iCol].sdword) return TRUE; return FALSE; case SQL_DECIMAL: case SQL_NUMERIC: return (_tcstod(szTrueValue,&pStop) == _tcstod(rgTestValue[iCol].data,&pStop)); case SQL_TINYINT: case SQL_SMALLINT: if(_ttoi(szTrueValue) == (int)rgTestValue[iCol].sword) return TRUE; return FALSE; case SQL_FLOAT: case SQL_DOUBLE: return (_tcstod(szTrueValue,&pStop) == rgTestValue[iCol].sdouble); case SQL_REAL: /* Need to account for round-off errors in _tcstod conversions: */ test1 = (SWORD)(1000*_tcstod(szTrueValue,&pStop)); test1 = (SWORD)((test1>0) ? (test1+5)/10 : (test1-5)/10); test2 = (SWORD)(1000*rgTestValue[iCol].sfloat); test2 = (SWORD)((test2>0) ? (test2+5)/10 : (test2-5)/10); return (test1 == test2); case SQL_TIMESTAMP: case SQL_TYPE_TIMESTAMP: { TIMESTAMP_STRUCT tss; CvtCHARtoODBC(&tss, szTrueValue, SQL_TYPE_TIMESTAMP); fTestPass= ((rgTestValue[iCol].timestamp.month == tss.month) && (rgTestValue[iCol].timestamp.day == tss.day) && (rgTestValue[iCol].timestamp.year == tss.year) && (rgTestValue[iCol].timestamp.hour == tss.hour) && (rgTestValue[iCol].timestamp.minute == tss.minute) && (rgTestValue[iCol].timestamp.fraction == tss.fraction)); /* Seconds value is zero for small timestamp, so to keep it from always failing... */ if(0 != rgTestValue[iCol].timestamp.second) fTestPass= (fTestPass && rgTestValue[iCol].timestamp.second == tss.second); return fTestPass; } case SQL_TIME: case SQL_TYPE_TIME: { TIME_STRUCT tss; CvtCHARtoODBC(&tss, szTrueValue, SQL_TYPE_TIME); fTestPass= ((rgTestValue[iCol].time.hour == tss.hour) && (rgTestValue[iCol].time.minute == tss.minute)); /* Seconds value is zero for small timestamp, so to keep it from always failing... */ if(0 != rgTestValue[iCol].time.second) fTestPass= (fTestPass && rgTestValue[iCol].time.second == tss.second); return fTestPass; } case SQL_DATE: case SQL_TYPE_DATE: { DATE_STRUCT tss; CvtCHARtoODBC(&tss, szTrueValue, SQL_TYPE_DATE); return ((rgTestValue[iCol].date.month == tss.month) && (rgTestValue[iCol].date.day == tss.day) && (rgTestValue[iCol].date.year == tss.year)); } case SQL_BIT: case SQL_CHAR: case SQL_VARCHAR: case SQL_LONGVARCHAR: case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY: default: return !(_tcsncmp(szTrueValue, rgTestValue[iCol].data, _tcslen(szTrueValue))); } } #endif unixODBC-2.2.14-p2/samples/quiktest.c0100644000076400007640000065534207363332200015673 0ustar nicknick//--------------------------------------------------------------------------------------- // // PROGRAM: quiktest.c // This code is furnished on an as-is basis as part of the ODBC SDK and is // intended for example purposes only. // // PURPOSE: This is a Quick Test of the basic functionality of an ODBC driver. // // FUNCTIONS: // QuickTest() - performs the quick test focusing on basic functionalities. // //-------------------------------------------------------------------------------------------- #pragma warning (disable : 4703) #define QUIKTEST #define _tcscpy strcpy #define _tcstok strtok #define _ttoi atoi #define _ttol atol #define _tcstoul strtoul #define _tcstod strtod #define _tcslen strlen #define _tcsncmp strncmp #define _tcscmp strcmp #define _tcscat strcat #define _tcsnccmp strncasecmp #define _tstrtime(x) timgtime(x) #define min(x,y) ((x>y)?(y):(x)) #define _sntprintf snprintf #define _tcsnccat strncat #define _tcschr strchr #define _ltot(v,s,r) sprintf(s,"%d",v) #define _itot(v,s,r) sprintf(s,"%d",v) #define _tcsicmp strcasecmp #define _tcsstr strstr #include "autotest.h" #include #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_MALLOC_H #include #elif HAVE_SYS_MALLOC_H #include #endif #include #include #include // #include #include "sql.h" #include "sqlext.h" #include "quiktest.h" #define LONG int #define UWORD unsigned short #define LPBYTE char* #define HANDLE void* #define INFINITE -1 char *timgtime(char *s) { time_t tim = time( NULL ); return strftime( s, 20, "%H%M%S", localtime( &tim )); } //-------------------------------------------------------------------------------------- // static //-------------------------------------------------------------------------------------- static CHAR vszFile[] = TEXT(__FILE__); static LPTSTR sz07009 = TEXT("07009"); static LPTSTR szIM001 = TEXT("IM001"); static LPTSTR szHYC00 = TEXT("HYC00"); static LPTSTR szHY009 = TEXT("HY009"); static LPTSTR szHY091 = TEXT("HY091"); static LPTSTR szHY092 = TEXT("HY092"); static LPTSTR szISO = TEXT("ISO 9075"); static LPTSTR szODBC30 = TEXT("ODBC 3.0"); static LPTSTR szNotSupported = TEXT("did not return Not supported message"); static LPTSTR szBrowseNotSupported = TEXT("Browse Connect is not supported with Connection Pooling on"); static LPTSTR szSQLSETCONNECTATTR = TEXT("SQLSetConnectAttr"); static LPTSTR szSQLGETCONNECTATTR = TEXT("SQLGetConnecTAttr"); static LPTSTR szSQLGETINFO = TEXT("SQLGetInfo"); static LPTSTR szSQLGETTYPEINFO = TEXT("SQLGetTypeInfo"); static LPTSTR szSQLALLOCHANDLE = TEXT("SQLAllocHandle"); static LPTSTR szSQLALLOCSTMT = TEXT("SQLAllocStmt"); static LPTSTR szSQLALLOCCONNECT = TEXT("SQLAllocConnect"); static LPTSTR szSQLALLOCENV = TEXT("SQLAllocEnv"); static LPTSTR szSQLSETSTMTATTR = TEXT("SQLSetStmtAttr"); static LPTSTR szSQLGETSTMTATTR = TEXT("SQLGetStmtAttr"); static LPTSTR szSQLSETSTMTOPTION = TEXT("SQLSetStmtOption"); static LPTSTR szSQLGETSTMTOPTION = TEXT("SQLGetStmtOption"); static LPTSTR szSQLSETCONNECTOPTION = TEXT("SQLSetConnectOption"); static LPTSTR szSQLGETCONNECTOPTION = TEXT("SQLGetConnectOption"); static LPTSTR szSQLFETCH = TEXT("SQLFetch"); static LPTSTR szSQLBINDCOL = TEXT("SQLBindCol"); static LPTSTR szSQLFOREIGNKEYS = TEXT("SQLForeignkeys"); static LPTSTR szSQLFREEHANDLE = TEXT("SQLFreeHandle"); static LPTSTR szSQLFREECONNECT = TEXT("SQLFreeConnect"); static LPTSTR szSQLFREEENV = TEXT("SQLFreeEnv"); static LPTSTR szSQLGETDESCREC = TEXT("SQLGetDescRec"); static LPTSTR szSQLSETDESCREC = TEXT("SQLSetDescRec"); static LPTSTR szSQLGETDESCFIELD = TEXT("SQLGetDescField"); static LPTSTR szSQLSETDESCFIELD = TEXT("SQLSetDescField"); static LPTSTR szSQLCOPYDESC = TEXT("SQLCopyDesc"); static LPTSTR szSQLSETENVATTR = TEXT("SQLSetEnvAttr"); static LPTSTR szSQLGETENVATTR = TEXT("SQLGetEnvAttr"); static LPTSTR szSQLFREESTMT = TEXT("SQLFreeStmt"); static LPTSTR szSQLENDTRAN = TEXT("SQLEndTran"); static LPTSTR szSQLGETCURSORNAME = TEXT("SQLGetCursorName"); static LPTSTR szSQLEXECDIRECT = TEXT("SQLExecDirect"); static LPTSTR szSQLPUTDATA = TEXT("SQLPutData"); static LPTSTR szSQLPARAMDATA = TEXT("SQLParamData"); static LPTSTR szSQLROWCOUNT = TEXT("SQLRowCount"); static LPTSTR szSQLSETPARAM = TEXT("SQLSetParam"); static LPTSTR szSQLBINDPARAMETER = TEXT("SQLBindParameter"); static LPTSTR szSQLBINDPARAM = TEXT("SQLBindParam"); static LPTSTR szSQLPREPARE = TEXT("SQLPrepare"); static LPTSTR szSQLEXECUTE = TEXT("SQLExecute"); static LPTSTR szSQLCOLATTRIBUTES = TEXT("SQLColAttributes"); static LPTSTR szSQLGETDATA = TEXT("SQLGetData"); static LPTSTR szSQLCOLUMNS = TEXT("SQLColumns"); static LPTSTR szSQLGETFUNCTIONS = TEXT("SQLGetFunctions"); static LPTSTR szSQLDRIVERCONNECT = TEXT("SQLDriverConnect"); static LPTSTR szSQLDISCONNECT = TEXT("SQLDisconnect"); static LPTSTR szSQLCONNECT = TEXT("SQLConnect"); static LPTSTR szSQLCANCEL = TEXT("SQLCancel"); static LPTSTR szSQLDESCRIBECOL = TEXT("SQLDescribeCol"); static LPTSTR szSQLTABLES = TEXT("SQLTables"); static LPTSTR szSQLSPECIALCOLUMNS = TEXT("SQLSpecialColumns"); static LPTSTR szSQLDESCRIBEPARAM = TEXT("SQLDescribeParam"); static LPTSTR szSQLNUMPARAMS = TEXT("SQLNumParams"); static LPTSTR szSQLPARAMOPTIONS = TEXT("SQLParamOptions"); static LPTSTR szSQLPRIMARYKEYS = TEXT("SQLPrimaryKeys"); static LPTSTR szSQLEXTENDEDFETCH = TEXT("SQLExtendedFetch"); static LPTSTR szSELECTSTAR = TEXT("select * from %s"); static LPTSTR szQUICKREBIND = TEXT("Quick Rebind"); static LPTSTR szSQLBROWSECONNECT = TEXT("SQLBrowseConnect"); static LPTSTR szBLANKLINE = TEXT(" "); static LPTSTR szTAB = TEXT("\t"); static LPTSTR szSQLNUMRESULTCOLS = TEXT("SQLNumResultCols"); static LPTSTR szSQLSETSCROLLOPTIONS = TEXT("SQLSetScrollOptions"); static LPTSTR szSQLFETCHSCROLL = TEXT("SQLFetchScroll"); static LPTSTR szSQLSTATISTICS = TEXT("SQLStatistics"); static LPTSTR szSQLCLOSECURSOR = TEXT("SQLCloseCursor"); static LPTSTR szSQLGETDIAGREC = TEXT("SQLGetDiagRec"); static LPTSTR szSQLGETDIAGFIELD = TEXT("SQLGetDiagField"); static LPTSTR szRETDATA = TEXT("returned data"); static LPTSTR szINCORRECTOUTLEN = TEXT("incorrect outlen"); static LPTSTR szSQLNATIVESQL = TEXT("SQLNativeSql"); static LPTSTR szSQLNATIVESQLW = TEXT("SQLNativeSqlW"); static LPTSTR szSQLCONNECTW = TEXT("SQLConnectW"); static LPTSTR szSQLTABLESA = TEXT("SQLTablesA"); static LPTSTR szSQLTABLESW = TEXT("SQLTablesW"); static LPTSTR szSQLCOLUMNSA = TEXT("SQLColumnsA"); static LPTSTR szSQLCOLUMNSW = TEXT("SQLColumnsW"); static LPTSTR szSQLEXECDIRECTA = TEXT("SQLExecDirectA"); static LPTSTR szSQLEXECDIRECTW = TEXT("SQLExecDirectW"); LPTSTR iTestNames[]={ TEXT("Test Connection Options"), TEXT("Test Statement Options"), TEXT("Test SQLGetCursorName"), TEXT("Test Data"), TEXT("Test SQLNumResultCols"), TEXT("Test Meta-Data"), TEXT("Test Searched Query"), TEXT("Test Large Query"), TEXT("Test SQLTables"), TEXT("Test SQLStatistics"), TEXT("Test SQLSpecialColumns"), TEXT("Test 'Like' Query"), TEXT("Test SQLForeignKeys"), TEXT("Test SQLBrowseConnect"), TEXT("Test SQLDataSources"), TEXT("Test SQLDrivers"), TEXT("Test SQLMoreResults"), TEXT("Test SQLNativeSQL"), TEXT("Test SQLDescribeParam"), TEXT("Test SQLNumParams"), TEXT("Test SQLParamOptions"), TEXT("Test SQLPrimaryKeys"), TEXT("Test SQLProcedures"), TEXT("Test SQLTablePrivileges"), TEXT("Test SQLColumnPrivileges"), TEXT("Test SQLSetScrollOptions"), TEXT("Test SQLExtendedFetch"), TEXT("Test SQL_OJ_CAPABILITIES"), TEXT("Test SQLSetConnectAttr"), TEXT("Test SQLSetStmtAttr"), TEXT("Test Threading"), TEXT("Test GetDescField"), TEXT("Test SetDescField"), TEXT("Test GetDescRec"), TEXT("Test SetDescRec"), TEXT("Test CopyDesc"), TEXT("Test Descriptor Defaults"), TEXT("Test Usage of Descriptor"), TEXT("Test Environment Attributes"), TEXT("Test SQLEndTran"), TEXT("Test SQLBindParam"), TEXT("Test Quick Rebind"), TEXT("Test SQLFetchScroll"), TEXT("Test GetDiagRec"), TEXT("Test GetDiagField"), TEXT("Test MixedAnsiUnicode") }; typedef struct tagHANDLES { SWORD fHandleType; SQLHANDLE hHandle; } HANDLES, *lpHANDLES; SUPPORTOPTINFO OptionList[] = {SQL_SO_FORWARD_ONLY, SQL_SCROLL_FORWARD_ONLY, SQL_SO_KEYSET_DRIVEN, SQL_SCROLL_KEYSET_DRIVEN, SQL_SO_DYNAMIC, SQL_SCROLL_DYNAMIC}; SUPPORTCONCURINFO ConcurList[] = {SQL_SCCO_READ_ONLY, SQL_CONCUR_READ_ONLY, SQL_SCCO_LOCK, SQL_CONCUR_LOCK, SQL_SCCO_OPT_TIMESTAMP, SQL_CONCUR_TIMESTAMP, SQL_SCCO_OPT_VALUES, SQL_CONCUR_VALUES}; /*--------------------------------------------------------------------------------------*/ /* globals */ /*--------------------------------------------------------------------------------------*/ lpSERVERINFO lpSI= NULL; UWORD fBindParameter=FALSE, fDiagRecSupported=FALSE, fDiagFieldSupported=FALSE, uDriverODBCVer=0; UWORD guwRowCount=0; // Count of rows in the automaketable /* these are globals so that the error functions can access them without needing to have them passed to every error check */ static HENV henv=SQL_NULL_HENV; static HDBC hdbc=SQL_NULL_HDBC; static HSTMT hstmt=SQL_NULL_HSTMT; static SQLHDESC hdesc=SQL_NULL_HDESC; //globals for test descriptors TIMESTAMP_STRUCT tsval= {1955, 12, 31, 23, 59, 59, 999}; SQLINTEGER cbtsval=sizeof(TIMESTAMP_STRUCT); SQLINTEGER cbValueMax, cbValue, swBindOffset=128; SQLUINTEGER RowsProcessed; SQLSMALLINT DescBuf[MAX_DESC_BUF]; SQLUSMALLINT StatusArray[STATUS_ARRAY_SIZE]; SQLCHAR buf[MAX_STRING_SIZE]; SQLCHAR szParamName[MAX_STRING_SIZE]=TEXT("Parameter Name"); struct tagDescType { SQLUSMALLINT uwDescType; SQLUSMALLINT uwTypeMask; CHAR szDescName[4]; } DescTypes[] = { SQL_ATTR_APP_ROW_DESC, DESC_ARD, TEXT("ARD"), SQL_ATTR_APP_PARAM_DESC, DESC_APD, TEXT("APD"), SQL_ATTR_IMP_ROW_DESC, DESC_IRD, TEXT("IRD"), SQL_ATTR_IMP_PARAM_DESC, DESC_IPD, TEXT("IPD") }; struct tagDescInfo { SQLSMALLINT uwDescField; LPTSTR szDescFieldName; BOOL fHeader; SQLSMALLINT fGettable; // Can be retrieved for given descriptor types SQLSMALLINT fSettable; // Can be set for given descriptor types SQLSMALLINT fDefault; // Has a default value for the descriptor types SQLINTEGER NewValue; SQLINTEGER DefaultVal; SQLSMALLINT cbValue; SQLINTEGER size; } rgDescInfo[] = { // Test expects all header fields to be listed first. The TYPE field must be the first record field listed. // size should be set to 0 for string fields, since we don't know up front what to set it to // Field ID Field Name Header Gettable Settable fDefault New Value Default Value Data Size Data Type //Header fields SQL_DESC_COUNT, TEXT("SQL_DESC_COUNT"), TRUE, DESC_ALL, DESC_MOST, DESC_MOST, 1, 0, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_ALLOC_TYPE, TEXT("SQL_DESC_ALLOC_TYPE"), TRUE, DESC_ALL, DESC_NONE, DESC_ALL, 0, SQL_DESC_ALLOC_AUTO, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_ARRAY_SIZE, TEXT("SQL_DESC_ARRAY_SIZE"), TRUE, DESC_AD, DESC_AD, DESC_AD, STATUS_ARRAY_SIZE, 1, sizeof(SQLUINTEGER), SQL_IS_UINTEGER, SQL_DESC_ARRAY_STATUS_PTR, TEXT("SQL_DESC_ARRAY_STATUS_PTR"), TRUE, DESC_ALL, DESC_ALL, DESC_ALL, (SQLINTEGER)(StatusArray), (SQLINTEGER)NULL, sizeof(SQLPOINTER), SQL_IS_POINTER, SQL_DESC_BIND_OFFSET_PTR, TEXT("SQL_DESC_BIND_OFFSET_PTR"), TRUE, DESC_AD, DESC_AD, DESC_AD, (SQLINTEGER)(&swBindOffset), (SQLINTEGER)NULL, sizeof(SQLPOINTER), SQL_IS_POINTER, SQL_DESC_BIND_TYPE, TEXT("SQL_DESC_BIND_TYPE"), TRUE, DESC_AD, DESC_AD, DESC_AD, BIND_SIZE, 0, sizeof(SQLINTEGER), SQL_IS_INTEGER, // SQL_DESC_OUT_OF_LINE_HEAP, TEXT("SQL_DESC_OUT_OF_LINE_HEAP"), TRUE, DESC_AD, DESC_AD, (SQLINTEGER)(StatusArray), sizeof(SQLINTEGER), SQL_IS_POINTER, // SQL_DESC_OUT_OF_LINE_HEAP_OCTET_LENGTH, TEXT("SQL_DESC_OUT_OF_LINE_HEAP_OCTET_LENGTH"), TRUE, DESC_AD, DESC_AD, sizeof(StatusArray), sizeof(SQLINTEGER), SQL_IS_NOT_POINTER, SQL_DESC_ROWS_PROCESSED_PTR, TEXT("SQL_DESC_ROWS_PROCESSED_PTR"), TRUE, DESC_ID, DESC_ID, DESC_ID, (SQLINTEGER)(&RowsProcessed), (SQLINTEGER)NULL, sizeof(SQLPOINTER), SQL_IS_POINTER, // Record fields SQL_DESC_DATETIME_INTERVAL_CODE, TEXT("SQL_DESC_DATETIME_INTERVAL_CODE"), FALSE, DESC_ALL, DESC_MOST, DESC_NONE, SQL_CODE_TIMESTAMP, 0, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_TYPE, TEXT("SQL_DESC_TYPE"), FALSE, DESC_ALL, DESC_MOST, DESC_AD, SQL_DATETIME, SQL_C_DEFAULT, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_CONCISE_TYPE, TEXT("SQL_DESC_CONCISE_TYPE"), FALSE, DESC_ALL, DESC_MOST, DESC_AD, SQL_TYPE_TIMESTAMP, SQL_C_DEFAULT, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_AUTO_UNIQUE_VALUE, TEXT("SQL_DESC_AUTO_UNIQUE_VALUE"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, 0, 0, sizeof(SQLINTEGER), SQL_IS_INTEGER, // SQL_DESC_BIND_OUT_OF_LINE, TEXT("SQL_DESC_BIND_OUT_OF_LINE"), FALSE, DESC_AD, DESC_AD, SQL_TRUE, sizeof(SQLSMALLINT), SQL_IS_NOT_POINTER, SQL_DESC_BASE_COLUMN_NAME, TEXT("SQL_DESC_BASE_COLUMN_NAME"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, (SQLINTEGER)szParamName, 0, sizeof(SQLCHAR), 0, SQL_DESC_CASE_SENSITIVE, TEXT("SQL_DESC_CASE_SENSITIVE"), FALSE, DESC_ID, DESC_NONE, DESC_NONE, 0, 0, sizeof(SQLINTEGER), SQL_IS_INTEGER, SQL_DESC_CATALOG_NAME, TEXT("SQL_DESC_CATALOG_NAME"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, (SQLINTEGER)szParamName, 0, sizeof(SQLCHAR), 0, SQL_DESC_DATETIME_INTERVAL_PRECISION, TEXT("SQL_DESC_DATETIME_INTERVAL_PRECISION"), FALSE, DESC_ALL,DESC_MOST, DESC_NONE, 3, 0, sizeof(SQLINTEGER), SQL_IS_INTEGER, SQL_DESC_DISPLAY_SIZE, TEXT("SQL_DESC_DISPLAY_SIZE"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, 0, 0, sizeof(SQLINTEGER), SQL_IS_INTEGER, SQL_DESC_FIXED_PREC_SCALE, TEXT("SQL_DESC_FIXED_PREC_SCALE"), FALSE, DESC_ID, DESC_NONE, DESC_NONE, 0, 0, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_LABEL, TEXT("SQL_DESC_LABEL"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, (SQLINTEGER)szParamName, 0, sizeof(SQLCHAR), 0, SQL_DESC_LENGTH, TEXT("SQL_DESC_LENGTH"), FALSE, DESC_ALL, DESC_MOST, DESC_NONE, 23, 0, sizeof(SQLUINTEGER), SQL_IS_UINTEGER, SQL_DESC_LITERAL_PREFIX, TEXT("SQL_DESC_LITERAL_PREFIX"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, (SQLINTEGER)szParamName, 0, sizeof(SQLCHAR), 0, SQL_DESC_LITERAL_SUFFIX, TEXT("SQL_DESC_LITERAL_SUFFIX"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, (SQLINTEGER)szParamName, 0, sizeof(SQLCHAR), 0, SQL_DESC_LOCAL_TYPE_NAME, TEXT("SQL_DESC_LOCAL_TYPE_NAME"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, (SQLINTEGER)szParamName, 0, sizeof(SQLCHAR), 0, SQL_DESC_NAME, TEXT("SQL_DESC_NAME"), FALSE, DESC_ID, DESC_IPD, DESC_NONE, (SQLINTEGER)szParamName, 0, sizeof(SQLCHAR), 0, SQL_DESC_NULLABLE, TEXT("SQL_DESC_NULLABLE"), FALSE, DESC_ID, DESC_NONE, DESC_NONE, 0, 0, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_OCTET_LENGTH, TEXT("SQL_DESC_OCTET_LENGTH"), FALSE, DESC_ALL, DESC_MOST, DESC_NONE, sizeof(tsval), 0, sizeof(SQLINTEGER), SQL_IS_INTEGER, SQL_DESC_OCTET_LENGTH_PTR, TEXT("SQL_DESC_OCTET_LENGTH_PTR"), FALSE, DESC_AD, DESC_AD, DESC_AD, (SQLINTEGER)(&cbtsval), (SQLINTEGER)NULL, sizeof(SQLINTEGER), SQL_IS_POINTER, SQL_DESC_PARAMETER_TYPE, TEXT("SQL_DESC_PARAMETER_TYPE"), FALSE, DESC_IPD, DESC_IPD, DESC_IPD, SQL_PARAM_OUTPUT, SQL_PARAM_INPUT, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_PRECISION, TEXT("SQL_DESC_PRECISION"), FALSE, DESC_ALL, DESC_MOST, DESC_NONE, 23, 0, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_SCALE, TEXT("SQL_DESC_SCALE"), FALSE, DESC_ALL, DESC_MOST, DESC_NONE, 3, 0, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_SCHEMA_NAME, TEXT("SQL_DESC_SCHEMA_NAME"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, (SQLINTEGER)szParamName, 0, sizeof(SQLCHAR), 0, SQL_DESC_SEARCHABLE, TEXT("SQL_DESC_SEARCHABLE"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, 0, 0, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_TABLE_NAME, TEXT("SQL_DESC_TABLE_NAME"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, (SQLINTEGER)szParamName, 0, sizeof(SQLCHAR), 0, SQL_DESC_TYPE_NAME, TEXT("SQL_DESC_TYPE_NAME"), FALSE, DESC_ID, DESC_NONE, DESC_NONE, (SQLINTEGER)szParamName, 0, sizeof(SQLCHAR), 0, SQL_DESC_UNSIGNED, TEXT("SQL_DESC_UNSIGNED"), FALSE, DESC_ID, DESC_NONE, DESC_NONE, 0, 0, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_UPDATABLE, TEXT("SQL_DESC_UPDATABLE"), FALSE, DESC_IRD, DESC_NONE, DESC_NONE, 0, 0, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_INDICATOR_PTR, TEXT("SQL_DESC_INDICATOR_PTR"), FALSE, DESC_AD, DESC_AD, DESC_AD, SQL_NULL_DATA, (SQLINTEGER)NULL, sizeof(SQLPOINTER), SQL_IS_POINTER, SQL_DESC_UNNAMED, TEXT("SQL_DESC_UNNAMED"), FALSE, DESC_ID, DESC_IPD, DESC_NONE, SQL_UNNAMED, SQL_NAMED, sizeof(SQLSMALLINT), SQL_IS_SMALLINT, SQL_DESC_DATA_PTR, TEXT("SQL_DESC_DATA_PTR"), FALSE, DESC_AD, DESC_MOST, DESC_AD, (SQLINTEGER)&tsval, (SQLINTEGER)NULL, sizeof(SQLPOINTER), SQL_IS_POINTER }; struct tagDIAGINFO { SQLSMALLINT uwDescField; LPTSTR szDescFieldName; SWORD irecRecNumber; } rgDiagInfo[] = { // SQL_DIAG_CURSOR_ROW_COUNT, TEXT("SQL_DIAG_CURSOR_ROW_COUNT"), 0, // SQL_DIAG_DYNAMIC_FUNCTION, TEXT("SQL_DIAG_DYNAMIC_FUNCTION"), 0, // SQL_DIAG_DYNAMIC_FUNCTION_CODE, TEXT("SQL_DIAG_DYNAMIC_FUNCTION_CODE"), 0, SQL_DIAG_NUMBER, TEXT("SQL_DIAG_NUMBER"), 0, SQL_DIAG_RETURNCODE, TEXT("SQL_DIAG_RETURNCODE"), 0, // SQL_DIAG_ROW_NUMBER, TEXT("SQL_DIAG_ROW_NUMBER"), 0, // SQL_DIAG_COLUMN_NUMBER, TEXT("SQL_DIAG_COLUMN_NUMBER"), 1, // SQL_DIAG_ROW_COUNT, TEXT("SQL_DIAG_ROW_COUNT"), 0, SQL_DIAG_SQLSTATE, TEXT("SQL_DIAG_SQLSTATE"), 1, SQL_DIAG_NATIVE, TEXT("SQL_DIAG_NATIVE"), 1, SQL_DIAG_MESSAGE_TEXT, TEXT("SQL_DIAG_MESSAGE_TEXT"), 1, SQL_DIAG_CLASS_ORIGIN, TEXT("SQL_DIAG_CLASS_ORIGIN"), 1, SQL_DIAG_SUBCLASS_ORIGIN, TEXT("SQL_DIAG_SUBCLASS_ORIGIN"), 1, // SQL_DIAG_CONNECTION_NAME, TEXT("SQL_DIAG_CONNECTION_NAME"), 1, SQL_DIAG_SERVER_NAME, TEXT("SQL_DIAG_SERVER_NAME"), 1, }; BOOL g_f3XDriver=FALSE; //the insert statement buffer to hold the insert statement CHAR szInsertStmt[MAX_STRING_SIZE]; /*----------------------------------------------------------------------- // Function: Supported //-----------------------------------------------------------------------*/ UWORD Supported(UWORD uwSQLFunc) { UWORD fLevel2=FALSE; RETCODE rc=SQL_SUCCESS; rc = SQLGetFunctions(hdbc, uwSQLFunc,&fLevel2); RETCHECK(SQL_SUCCESS, rc,szSQLGETFUNCTIONS); return(fLevel2); } //Supported() /*------------------------------------------------------------------------------ * Function: CheckDataResults - To check data returned by Fetch calls * Checks data at (row, col) in result set against (row, col) in table * ----------------------------------------------------------------------------*/ BOOL CheckDataResults(SWORD row, SWORD iTableCol, FIELDINFO* pField, DSTRUCT* pDataStr, SDWORD cbValue, CHAR* rgbValue) { if((pField ->nullable)&& (cbValue<1)) { if(cbValue == SQL_NULL_DATA && pDataStr[iTableCol].cb == SQL_NULL_DATA) return TRUE; return FALSE; } return CmpODBCtoCHAR(pDataStr, rgbValue, pField->wSQLType, iTableCol); } /*------------------------------------------------------------------------------ / Function: BinToHex / Purpose: Render a buffer contents as a hexidecimal string. /*----------------------------------------------------------------------------*/ void BinToHex(PTR rgbValue, SWORD cbValue, LPTSTR szHexString) { UWORD ib; LPTSTR pch; CHAR rgchDigits[] = TEXT("0123456789ABCDEF"); _tcscpy(szHexString, TEXT("0x")); if(cbValue > (MAX_STRING_SIZE - 3)/2 || cbValue < 0) cbValue = (MAX_STRING_SIZE - 3)/2; pch = &szHexString[_tcslen(szHexString)]; for(ib=0; ib < cbValue; ib++) { *pch = rgchDigits[((LPBYTE)rgbValue)[ib] >> 4]; pch ++; *pch++ = rgchDigits[((LPBYTE)rgbValue)[ib] & 0xF]; } *pch = TEXT('\0'); } /* BinToHex() */ /*-----------------------------------------------------------------------*/ /* Function: SearchForError */ /*-----------------------------------------------------------------------*/ int SearchForError(HENV henv, HDBC hdbc,HSTMT hstmt,LPTSTR szFindState) { CHAR buf[MAX_STRING_SIZE]; RETCODE rc; CHAR szState[6]; int found = FALSE; for(rc = SQLError(henv, hdbc, hstmt, szState, NULL, buf, MAX_STRING_SIZE, NULL) ; !found && (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) ; rc = SQLError(henv, NULL, NULL, szState, NULL, buf, MAX_STRING_SIZE, NULL)) { found = _tcscmp(szState, szFindState) == 0; } return(found); } /* SearchForError() */ /*-----------------------------------------------------------------------*/ /* Function: szWrite */ /*-----------------------------------------------------------------------*/ VOID szWrite(LPTSTR szStr, BOOL fNewLine) { szLogPrintf(lpSI, FALSE, szStr); if(fNewLine) szLogPrintf(lpSI, FALSE, TEXT("\r\n")); } /*-----------------------------------------------------------------------*/ /* Function: GetErrors */ /*-----------------------------------------------------------------------*/ VOID GetErrors(HENV henv,HDBC hdbc,HSTMT hstmt) { CHAR buf[MAX_ERROR_SIZE]; CHAR largebuf[COMBINED_SIZE]; CHAR szState[100]; RETCODE rc=SQL_SUCCESS; for(rc = SQLError(henv, hdbc, hstmt, szState, NULL, buf, MAX_ERROR_SIZE, NULL) ; RC_SUCCESSFUL(rc) ; rc = SQLError(henv, NULL, NULL, szState, NULL, buf, MAX_ERROR_SIZE, NULL)) { sprintf(largebuf,TEXT("\t\t\tState: %s"), szState); szWrite(largebuf, TRUE); sprintf(largebuf,TEXT("\t\t\tError: %s"), buf); szWrite(largebuf, TRUE); } } /* GetErrors() */ /*-----------------------------------------------------------------------*/ /* Function: GetDiagRecs */ /*-----------------------------------------------------------------------*/ VOID GetDiagRecs(SWORD fHandleType,SQLHANDLE hHandle) { CHAR szMessageText[XLARGEBUFF]=TEXT(""), szBuff[XLARGEBUFF]=TEXT(""); CHAR szSQLState[100]=TEXT(""); RETCODE rc=SQL_SUCCESS; SWORD irecRecNumber=0; SDWORD fNativeError=0; SWORD cchBufferLength=sizeof(szMessageText)/sizeof(CHAR), cbTextLength=0; SDWORD sdNumRecs=0; if (fDiagFieldSupported) { /* Get number of diag, records */ rc = SQLGetDiagField(fHandleType, hHandle,0,SQL_DIAG_NUMBER, &sdNumRecs,sizeof(sdNumRecs),NULL); } for(irecRecNumber=1;(irecRecNumber <= sdNumRecs) && RC_SUCCESSFUL(rc);irecRecNumber++) { rc = SQLGetDiagRec(fHandleType, hHandle, irecRecNumber,szSQLState,&fNativeError, szMessageText,cchBufferLength,&cbTextLength); if (RC_SUCCESSFUL(rc)) { sprintf(szBuff,TEXT("\t\t\tState: %s"), szSQLState); szWrite(szBuff, TRUE); sprintf(szBuff,TEXT("\t\t\tError: %s"), szMessageText); szWrite(szBuff, TRUE); } } } /* GetErrors() */ /*-----------------------------------------------------------------------*/ /* Function: DisplayAllErrors */ /*-----------------------------------------------------------------------*/ void DisplayAllErrors() { if (!fDiagRecSupported) { GetErrors(henv,NULL,NULL); GetErrors(NULL,hdbc,NULL); GetErrors(NULL,NULL,hstmt); } else { GetDiagRecs(SQL_HANDLE_ENV,henv); GetDiagRecs(SQL_HANDLE_DBC,hdbc); GetDiagRecs(SQL_HANDLE_STMT,hstmt); GetDiagRecs(SQL_HANDLE_DESC,hdesc); } } /* DisplayAllErrors() */ /*-----------------------------------------------------------------------*/ /* Function: RetcodeToCHAR */ /*-----------------------------------------------------------------------*/ LPTSTR RetcodeToCHAR(RETCODE retcode, LPTSTR buf) { switch (retcode) { case SQL_SUCCESS: _tcscpy (buf,TEXT("SQL_SUCCESS")); break; case SQL_ERROR: _tcscpy (buf,TEXT("SQL_ERROR")); break; case SQL_SUCCESS_WITH_INFO: _tcscpy (buf,TEXT("SQL_SUCCESS_WITH_INFO")); break; case SQL_NO_DATA_FOUND: _tcscpy (buf,TEXT("SQL_NO_DATA_FOUND")); break; case SQL_NEED_DATA: _tcscpy (buf,TEXT("SQL_NEED_DATA")); break; case SQL_INVALID_HANDLE: _tcscpy (buf,TEXT("SQL_INVALID_HANDLE")); break; case SQL_STILL_EXECUTING: _tcscpy (buf,TEXT("SQL_STILL_EXECUTING")); break; default: _tcscpy(buf,TEXT("UNKNOWN rc")); } return buf; } //----------------------------------------------------------------------- // Function: ReturnCheck //----------------------------------------------------------------------- int ReturnCheck(RETCODE retExpected, RETCODE retReceived, LPTSTR szFunction, LPTSTR szFile, int iLine,BOOL fDiag) { CHAR buf[MAX_STRING_SIZE]; if(retExpected == retReceived) return TRUE; szWrite(TEXT(""), TRUE); szWrite(TEXT("\t\t\t"), FALSE); szWrite(szFunction, TRUE); szWrite(TEXT("\t\t\tExpected: "), FALSE); szWrite(RetcodeToCHAR(retExpected, buf), TRUE); szWrite(TEXT("\t\t\tReceived: "), FALSE); szWrite(RetcodeToCHAR(retReceived, buf), TRUE); if (!fDiag) DisplayAllErrors(); sprintf(buf,TEXT("\t\t\t%s: %d"), szFile, iLine); szWrite(buf, TRUE); szWrite(TEXT("\t\t\t -------- "), TRUE); lpSI->failed++; return FALSE; } //----------------------------------------------------------------------- // Function: ErrsHandle //----------------------------------------------------------------------- int ErrsHandle(SWORD fHandleType,SQLHANDLE hHandle, RETCODE retExpected, RETCODE retReceived, LPTSTR szFunction, LPTSTR szFile, int iLine,BOOL fDiag) { CHAR buf[MAX_STRING_SIZE]; if(retExpected == retReceived) return TRUE; szWrite(TEXT(""), TRUE); szWrite(TEXT("\t\t\t"), FALSE); szWrite(szFunction, TRUE); szWrite(TEXT("\t\t\tExpected: "), FALSE); szWrite(RetcodeToCHAR(retExpected, buf), TRUE); szWrite(TEXT("\t\t\tReceived: "), FALSE); szWrite(RetcodeToCHAR(retReceived, buf), TRUE); if (!fDiag) GetDiagRecs(fHandleType,hHandle); sprintf(buf,TEXT("\t\t\t%s: %d"), szFile, iLine); szWrite(buf, TRUE); szWrite(TEXT("\t\t\t -------- "), TRUE); lpSI->failed++; return FALSE; } /*------------------------------------------------------------------------------ / Function: FindError / Purpose: Find the expected error message. Display a failure if not found. /*----------------------------------------------------------------------------*/ BOOL FindError(SWORD fHandleType, LPTSTR szFindState) { SQLHANDLE handle = SQL_NULL_HANDLE; SWORD irec; CHAR szErrorMsg[SQL_MAX_MESSAGE_LENGTH]; RETCODE rc; CHAR szState[6]; switch(fHandleType) { case SQL_HANDLE_ENV: handle = henv; break; case SQL_HANDLE_DBC: handle = hdbc; break; case SQL_HANDLE_STMT: handle = hstmt; break; case SQL_HANDLE_DESC: if(!Supported(SQL_API_SQLGETDIAGREC)) return TRUE; handle = hdesc; break; default: DISPLAYERROR(TEXT("FindError"), TEXT("invalid fHandleType")); return FALSE; } for(irec = 1 ; rc = SQLGetDiagRec(fHandleType, handle, irec, szState, NULL, szErrorMsg, SQL_MAX_MESSAGE_LENGTH, NULL) , RC_SUCCESSFUL(rc) ; irec++) { if(_tcscmp(szState, szFindState) == 0) return TRUE; } return FALSE; } /* FindError() */ /*------------------------------------------------------------------------------ * Function: CompareWithExpected * Checks data in rgbValue against expected value given row, col, and rgFields. * Posts an error if mismatch * ----------------------------------------------------------------------------*/ void CompareWithExpected(PTR rgbValue, SDWORD * pcbValue, UWORD row, UWORD icol, FIELDINFO *rgFields) { LPTSTR pch=NULL; CHAR szExpBuf[MAX_STRING_SIZE]=TEXT(""); CHAR * stopstr; pch = qtMakeData(row-1, icol-1, &rgFields[icol-1], szExpBuf); // Field is not READ ONLY, compare the value we inserted if(pch) { // Where row and column match and field is nullable, a NULL exists if (icol-1 == row-1 && rgFields[icol-1].nullable) { // Post an error if not SQL_NULL_DATA if (*pcbValue != SQL_NULL_DATA) DISPLAYERROR(TEXT("Simulate BindCol"),TEXT("Didn't return SQL_NULL_DATA")); } else { BOOL bCompare; CHAR * pstr=szExpBuf; // Pointer to start of expected string switch(rgFields[icol-1].wSQLType) { case SQL_BIT: case SQL_TINYINT: case SQL_SMALLINT: case SQL_INTEGER: // Compare the data values as long // tcsncmp bCompare=(_ttol(rgbValue) == _ttol(pstr)); break; case SQL_NUMERIC: case SQL_DECIMAL: case SQL_REAL: bCompare=(fabs(_tcstod(rgbValue, &stopstr) - _tcstod(pstr, &stopstr)) <= fabs((1/pow(10,7))*_tcstod(rgbValue, &stopstr))); break; case SQL_FLOAT: case SQL_DOUBLE: // Compare the data values as doubles strtod bCompare=(_tcstod(rgbValue, &stopstr) == _tcstod(pstr, &stopstr)); break; case SQL_DATE: case SQL_TIME: case SQL_TIMESTAMP: case SQL_TYPE_DATE: case SQL_TYPE_TIME: case SQL_TYPE_TIMESTAMP: pstr=szExpBuf+_tcslen(TEXT("{ts '")); // Replace second ' with '\0' ' _tcstok(pstr, TEXT("'")); if (_tcslen(rgbValue) > _tcslen(TEXT("1994-10-10 10:00:00"))) _tcscat(pstr, TEXT(".000")); bCompare=(!_tcsncmp(rgbValue, pstr, rgFields[icol-1].precision)); break; default: bCompare=(!_tcsncmp(rgbValue, pstr, _tcslen(pstr))); } // Compare the data values as char if (!bCompare) { DISPLAYERROR(TEXT("Simulate BindCol"),TEXT("Returned data didn't match")); szWrite(TEXT("\t\t\tExpected: "), FALSE); szWrite(pstr, TRUE); szWrite(TEXT("\t\t\tReceived: "), FALSE); szWrite(rgbValue, TRUE); } } } } //CompareWithExpected //----------------------------------------------------------------------- // Function: ResetHstmt //----------------------------------------------------------------------- void ResetHstmt(SQLHSTMT * phstmt) { SQLRETURN rc; // Free and reallocate stmt handle to clean up rc=SQLFreeHandle(SQL_HANDLE_STMT, *phstmt); ERRSHANDLE(SQL_HANDLE_STMT, *phstmt, SQL_SUCCESS, rc, szSQLFREESTMT); rc=SQLAllocHandle(SQL_HANDLE_STMT, hdbc, phstmt); RETCHECK(SQL_SUCCESS, rc,szSQLALLOCHANDLE); hdesc=NULL; // Global hdesc needs to be NULL or attempt to read freed mem } /*-----------------------------------------------------------------------*/ /* Function: GetSomeData */ /*-----------------------------------------------------------------------*/ VOID GetSomeData(HSTMT lhstmt, LPTSTR szTableName,BOOL fBindCol, FIELDINFO rgField) { RETCODE rc=SQL_SUCCESS; SDWORD cbValue=0; CHAR szQuery[XLARGEBUFF]=TEXT(""), szBuff[XLARGEBUFF]=TEXT(""); CHAR szErrMsg[MAX_STRING_SIZE]=TEXT(""), szDataItem[XLARGEBUFF]=TEXT(""); LPTSTR pch=NULL; pch = qtMakeData(0, 0,&rgField, szDataItem); sprintf(szQuery,szSELECTSTAR,szTableName); rc=SQLExecDirect(lhstmt,szQuery,SQL_NTS); // RETCHECK(SQL_SUCCESS,rc,szSQLEXECDIRECT); if (fBindCol) { rc = SQLBindCol(lhstmt, 1, SQL_C_CHAR, szBuff, sizeof(szBuff),&cbValue); // RETCHECK(SQL_SUCCESS, rc, szSQLBINDCOL); } rc = SQLFetch(lhstmt); // RETCHECK(SQL_SUCCESS, rc,szSQLFETCH); if (!fBindCol) { rc = SQLGetData(lhstmt,1, SQL_C_CHAR,szBuff, sizeof(szBuff), NULL); // RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA); } _tcscmp(szDataItem,szBuff); } /* GetSomeData() */ /*-----------------------------------------------------------------------*/ /* Function: SelectFromTable */ /*-----------------------------------------------------------------------*/ RETCODE SelectFromTable(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; CHAR szQuery[LARGEBUFF]; sprintf(szQuery,TEXT("select %s from %s"), //sprintf(szQuery,TEXT("select %s from %s order by %s"), lpqt->szColNames, lpqt->szTableName/*, lpqt->szColNames*/); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); return(rc); } /* SelectFromTable() */ /*-----------------------------------------------------------------------*/ /* Function: SelectFromTableFetch */ /*-----------------------------------------------------------------------*/ RETCODE SelectFromTableFetch(QTSTRUCT *lpqt, CHAR* szColName) { RETCODE rc=SQL_SUCCESS; CHAR szQuery[LARGEBUFF]; sprintf(szQuery,TEXT("select %s from %s order by %s"), lpqt->szColNames, lpqt->szTableName, szColName); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); if((SQL_SUCCESS!=rc) && (SQL_SUCCESS_WITH_INFO!=rc)){ RETCHECK(SQL_SUCCESS_WITH_INFO, rc,szSQLEXECDIRECT); return SQL_NO_DATA; } return SQL_SUCCESS; } /* SelectFromTableFetch() */ //----------------------------------------------------------------------- // Function: AllocHstmt //----------------------------------------------------------------------- BOOL AllocHstmt() { BOOL fFailed=FALSE; RETCODE rc=SQL_SUCCESS; if (Supported(SQL_API_SQLALLOCHANDLE)) { rc = SQLAllocHandle(SQL_HANDLE_STMT,hdbc, &hstmt); if(!RETCHECK(SQL_SUCCESS, rc, szSQLALLOCHANDLE)) fFailed=TRUE; } else { rc = SQLAllocStmt(hdbc, &hstmt); if(!RETCHECK(SQL_SUCCESS, rc, szSQLALLOCSTMT)) fFailed=TRUE; } return(fFailed); } //AllocHstmt() //----------------------------------------------------------------------- // Function: AllocHdbc //----------------------------------------------------------------------- BOOL AllocHdbc(HDBC *phdbc) { BOOL fFailed=FALSE; RETCODE rc=SQL_SUCCESS; if (Supported(SQL_API_SQLALLOCHANDLE)) { rc = SQLAllocHandle(SQL_HANDLE_DBC,henv, phdbc); if(!RETCHECK(SQL_SUCCESS, rc, szSQLALLOCHANDLE)) fFailed=TRUE; } else { rc = SQLAllocConnect(henv, phdbc); if(!RETCHECK(SQL_SUCCESS, rc, szSQLALLOCCONNECT)) fFailed=TRUE; } return(fFailed); } //AllocHdbc() //----------------------------------------------------------------------- // Function: AllocHenv //----------------------------------------------------------------------- BOOL AllocHenv() { BOOL fFailed=FALSE; RETCODE rc=SQL_SUCCESS; rc = SQLAllocEnv(&henv); if (!RETCHECK(SQL_SUCCESS, rc,szSQLALLOCENV)) fFailed=TRUE; return(fFailed); } //AllocHenv() //----------------------------------------------------------------------- // Function: SetStatementAttributes //----------------------------------------------------------------------- BOOL SetStatementAttributes(UWORD fAttr, PTR rgbValue) { RETCODE rc=SQL_SUCCESS; CHAR szAPI[MEDBUFF]; BOOL fFailed=FALSE; if (Supported(SQL_API_SQLSETSTMTATTR)) { rc = SQLSetStmtAttr(hstmt,(SDWORD)fAttr,rgbValue,sizeof(UDWORD)); _tcscpy(szAPI,szSQLSETSTMTATTR); } else { rc = SQLSetStmtOption(hstmt,fAttr,(UDWORD)rgbValue); _tcscpy(szAPI,szSQLSETSTMTOPTION); } if (rc != SQL_SUCCESS) { if(!FindError(SQL_HANDLE_STMT,szHYC00)) RETCHECK(SQL_SUCCESS, rc,szAPI); fFailed=TRUE; } return(fFailed); } //SetStatementAttributes() //----------------------------------------------------------------------- // Function: SetConnectionAttributes //----------------------------------------------------------------------- BOOL SetConnectionAttributes(HDBC lhdbc,UWORD fAttr, UDWORD rgbValue) { RETCODE rc=SQL_SUCCESS; CHAR szAPI[MEDBUFF]; BOOL fFailed=FALSE; if (Supported(SQL_API_SQLSETCONNECTATTR)) { rc = SQLSetConnectAttr(lhdbc,(SDWORD)fAttr,(PTR)rgbValue,sizeof(UDWORD)); _tcscpy(szAPI,szSQLSETCONNECTATTR); } else { rc = SQLSetConnectOption(lhdbc,fAttr,rgbValue); _tcscpy(szAPI,szSQLSETCONNECTOPTION); } if (rc != SQL_SUCCESS) { if(!FindError(SQL_HANDLE_DBC,szHYC00)) RETCHECK(SQL_SUCCESS, rc,szAPI); fFailed=TRUE; } return(fFailed); } //SetConnectionAttributes() //----------------------------------------------------------------------- // Function: FreeStmt //----------------------------------------------------------------------- BOOL FreeStmt(UWORD fOption) { RETCODE rc=SQL_SUCCESS; if (Supported(SQL_API_SQLFREEHANDLE) && (fOption == SQL_DROP)) { rc = SQLFreeHandle(SQL_HANDLE_STMT,hstmt); RETCHECK(SQL_SUCCESS, rc,szSQLFREEHANDLE); } else { rc = SQLFreeStmt(hstmt, fOption); RETCHECK(SQL_SUCCESS, rc,szSQLFREESTMT); } return(RC_NOTSUCCESSFUL(rc)); } //FreeStmt() //----------------------------------------------------------------------- // Function: DropHdbc //----------------------------------------------------------------------- VOID DropHdbc(HDBC hdbc) { RETCODE rc=SQL_SUCCESS; if (Supported(SQL_API_SQLFREEHANDLE)) { rc = SQLFreeHandle(SQL_HANDLE_DBC,hdbc); RETCHECK(SQL_SUCCESS, rc,szSQLFREEHANDLE); } else { rc = SQLFreeConnect(hdbc); RETCHECK(SQL_SUCCESS, rc,szSQLFREECONNECT); } } //DropHdbc() //----------------------------------------------------------------------- // Function: DropHenv //----------------------------------------------------------------------- VOID DropHenv() { RETCODE rc=SQL_SUCCESS; if (Supported(SQL_API_SQLFREEHANDLE)) { rc = SQLFreeHandle(SQL_HANDLE_ENV,henv); RETCHECK(SQL_SUCCESS, rc,szSQLFREEHANDLE); } else { rc = SQLFreeEnv(henv); RETCHECK(SQL_SUCCESS, rc,szSQLFREEENV); } } //DropHenv() //----------------------------------------------------------------------- // Function: ClearErrorQueue //----------------------------------------------------------------------- VOID ClearErrorQueue() { CHAR szErrMsg[MAX_STRING_SIZE]; CHAR szState[6]; /* Eat up the SQL_SUCCESS_WITH_INFO error record */ while (RC_SUCCESSFUL(SQLError(NULL, hdbc,NULL, szState, NULL, szErrMsg, sizeof(szErrMsg)/sizeof(CHAR), NULL))) ; } //----------------------------------------------------------------------- // Function: Is3XDriver //----------------------------------------------------------------------- BOOL Is3XDriver(HDBC hdbc,QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; LPTSTR pch=NULL; BOOL f3XDriver=FALSE; rc = SQLGetInfo(hdbc, SQL_DRIVER_ODBC_VER, lpqt->buf, sizeof(lpqt->buf), NULL); if(RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO)) { pch = _tcstok(lpqt->buf,TEXT(".")); if (!_tcsnccmp(pch,TEXT("02"), 2)) { pch = _tcstok(NULL,TEXT(".")); if(!_tcsnccmp(pch,TEXT("00"), 2)) DISPLAYERROR(szSQLGETINFO,TEXT("Driver returned ODBC version 2.00 which is no longer supported. Please upgrade to 2.01")); } else if (!_tcsnccmp(pch,TEXT("03"), 2)) f3XDriver=TRUE; } uDriverODBCVer=_ttoi(lpqt->buf); return(f3XDriver); } //Is3XDriver() //----------------------------------------------------------------------- // Function: Connect //----------------------------------------------------------------------- BOOL Connect(lpSERVERINFO lpSI,QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; SDWORD sdwAppVer; /* The signal for test to use it's own allocated handles, is if the a server name is passed in. If it is not, the test should use the hdbc passed in */ /* ****************** Allocate Env ************************* */ if (AllocHenv()) goto ConnectErrorRet; /* ****************** Set Application Version ************************* */ rc = SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, SQL_IS_UINTEGER); if(!RETCHECK(SQL_SUCCESS, rc, szSQLSETENVATTR)) goto ConnectErrorRet; /* ****************** Allocate Connection ************************* */ rc = SQLAllocConnect(henv, &hdbc); if(!RETCHECK(SQL_SUCCESS, rc, szSQLALLOCCONNECT)) goto ConnectErrorRet; /* ****************** Set Connection Attributes ************************* */ rc = SQLSetConnectOption(hdbc,SQL_ODBC_CURSORS,lpSI->vCursorLib); if(!FindError(SQL_HANDLE_DBC,szHYC00)) if (!RETCHECK(SQL_SUCCESS, rc,szSQLSETCONNECTOPTION)) goto ConnectErrorRet; /* create a DriverConnect string */ sprintf(lpqt->sz, TEXT("dsn=%s;uid=%s;pwd=%s;"), lpSI->szValidServer0, lpSI->szValidLogin0, lpSI->szValidPassword0); /* since SQL_DRIVER_COMPLETE is used, it is possible that the driver will bring up a dialog asking for more information. */ rc = SQLDriverConnect(hdbc, lpSI->hwnd, lpqt->sz, SQL_NTS, lpqt->buf, MAX_STRING_SIZE, NULL, SQL_DRIVER_NOPROMPT); if (RC_NOTSUCCESSFUL(rc)) { if (!RETCHECK(SQL_SUCCESS, rc,szSQLDRIVERCONNECT)) goto ConnectErrorRet; } else ClearErrorQueue(); rc = SQLDisconnect(hdbc); RETCHECK(SQL_SUCCESS, rc,szSQLDISCONNECT); rc = SQLConnect(hdbc, lpSI->szValidServer0, SQL_NTS, lpSI->szValidLogin0, SQL_NTS, lpSI->szValidPassword0, SQL_NTS); if (RC_SUCCESSFUL(rc)) ClearErrorQueue(); else if (!RETCHECK(SQL_SUCCESS, rc,szSQLCONNECT)) goto ConnectErrorRet; // Set the global 3.0 driver flag g_f3XDriver=Is3XDriver(hdbc,lpqt); // We're now connected, check application version and adjust expected error // states appropriately. rc = SQLGetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, &sdwAppVer, SQL_IS_UINTEGER, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETENVATTR); if (RC_SUCCESSFUL(rc) && (SQL_OV_ODBC2 == sdwAppVer)) { _tcscpy(szHY009, TEXT("S1009")); _tcscpy(szHYC00, TEXT("S1C00")); } return(FALSE); ConnectErrorRet: return(TRUE); } //Connect() //----------------------------------------------------------------------- // Function: IgnoreType //----------------------------------------------------------------------- BOOL IgnoreType(LPTSTR szType,SWORD wSQLType) { BOOL fIgnore=FALSE; /* If a line below is compiled in, that type will not be used in creating the table. (useful for when one specific type is causing problems in a particular test, this way the test can be run for all other types) */ if (!_tcscmp(szType,TEXT("LONG RAW")) || !_tcscmp(szType,TEXT("LONG VARCHAR")) || !_tcscmp(szType,TEXT("LONG VARCHAR FOR BIT DATA"))) { fIgnore=TRUE; } //if (wSQLType != SQL_CHAR) // fIgnore=TRUE; return(fIgnore); } //IgnoreType() //----------------------------------------------------------------------- // Function: CheckConformanceLevel //----------------------------------------------------------------------- UWORD CheckConformanceLevel() { RETCODE rc=SQL_SUCCESS; UWORD fIndex=0; SWORD cb=0; rc = SQLGetInfo(hdbc, SQL_ODBC_SQL_CONFORMANCE, &fIndex, sizeof (fIndex), &cb); RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO); if(fIndex != 0 && fIndex != 1 && fIndex != 2) { /* one of these two values should always be returned */ DISPLAYERROR(szSQLGETINFO,TEXT("SQL_ODBC_API_CONFORMANCE - invalid value")); } return(fIndex); } //CheckConformanceLevel() /*-----------------------------------------------------------------------*/ /* Function: TestConnectionOptions */ /*-----------------------------------------------------------------------*/ void TestConnectionOptions() { RETCODE rc=SQL_SUCCESS; SDWORD sdw, cbValue=0; BOOL fConnectOption=TRUE; CHAR szAPI[MEDBUFF]; HDBC lhdbc=NULL; rc=SQLAllocConnect(henv,&lhdbc); RETCHECK(SQL_SUCCESS, rc,szSQLALLOCCONNECT); SetConnectionAttributes(lhdbc,SQL_ACCESS_MODE,SQL_MODE_READ_WRITE); SetConnectionAttributes(lhdbc,SQL_AUTOCOMMIT,TRUE); if (SetConnectionAttributes(lhdbc,SQL_LOGIN_TIMEOUT,TEST_CONNECT_OPTION)) fConnectOption = FALSE; if (Supported(SQL_API_SQLGETCONNECTATTR)) { rc = SQLGetConnectAttr(lhdbc, SQL_LOGIN_TIMEOUT, (PTR)&sdw,0,&cbValue); _tcscpy(szAPI,szSQLGETCONNECTATTR); } else { rc = SQLGetConnectOption(lhdbc, SQL_LOGIN_TIMEOUT, &sdw); _tcscpy(szAPI,szSQLSETCONNECTOPTION); } if(rc != SQL_SUCCESS) { if(!FindError(SQL_HANDLE_DBC,szHYC00)) RETCHECK(SQL_SUCCESS, rc,szAPI); } else { if(sdw != TEST_CONNECT_OPTION && fConnectOption) DISPLAYERROR(szAPI,TEXT("SQL_LOGIN_TIMEOUT returned incorrect value")); } rc=SQLFreeConnect(lhdbc); RETCHECK(SQL_SUCCESS, rc,szSQLFREECONNECT); } //TestConnectionOptions() /*-----------------------------------------------------------------------*/ /* Function: CanAllocHdesc */ /*-----------------------------------------------------------------------*/ BOOL CanAllocHdesc() { BOOL fSupported=FALSE; /* Allocate an hdesc: */ if(Supported(SQL_API_SQLALLOCHANDLE)) fSupported = RC_SUCCESSFUL(SQLAllocHandle(SQL_HANDLE_DESC, hdbc, &hdesc)); return(fSupported); } /*-----------------------------------------------------------------------*/ /* Function: SetErrorCondition */ /*-----------------------------------------------------------------------*/ VOID SetErrorCondition(SWORD fHandleType) { RETCODE rc=SQL_SUCCESS; /* The following are used to produce "(S1)HY009" SQL State */ switch (fHandleType) { case SQL_HANDLE_ENV: rc = SQLAllocConnect(henv, NULL); break; case SQL_HANDLE_DBC: rc = SQLAllocStmt(hdbc, NULL); break; case SQL_HANDLE_STMT: rc = SQLExecDirect(hstmt, NULL, SQL_NTS); // Produces a DM error break; case SQL_HANDLE_DESC: rc = SQLGetDescField(hdesc, 0, SQL_DESC_AUTO_UNIQUE_VALUE, NULL, 0, NULL); break; } } //SetErrorCondition() VOID CheckData(SWORD fHandleType,UWORD uwDescField, PTR rgbValue,LPTSTR szDataSourceName) { CHAR szBuff[MEDBUFF]=TEXT(""); LPTSTR pszExpState=szHY009; if (fHandleType == SQL_HANDLE_DESC) pszExpState=szHY091; switch(uwDescField) { case SQL_DIAG_RETURNCODE: { RETCODE rcRec=*(RETCODE *)rgbValue; if (rcRec!= SQL_ERROR) { sprintf(szBuff,TEXT("\t\t\tSQL_DIAG_RETURN_CODE\tReceived: %d\tExpected: %d"),rcRec,-1); } } break; case SQL_DIAG_SQLSTATE: { if (_tcscmp((LPTSTR)rgbValue,pszExpState)) { sprintf(szBuff,TEXT("\t\t\tSQL_DIAG_SQLSTATE\tReceived: %s\tExpected: %s"),(LPTSTR)rgbValue,pszExpState); } } break; case SQL_DIAG_CLASS_ORIGIN: { if (_tcscmp((LPTSTR)rgbValue,szISO)) sprintf(szBuff,TEXT("\t\t\tSQL_DIAG_CLASS_ORIGIN\tReceived: %s\tExpected: %s"),(LPTSTR)rgbValue,szISO); } break; case SQL_DIAG_SUBCLASS_ORIGIN: { if (_tcscmp((LPTSTR)rgbValue,szISO)) sprintf(szBuff,TEXT("\t\t\tSQL_DIAG_CLASS_ORIGIN\tReceived: %s\tExpected: %s"),(LPTSTR)rgbValue,szISO); } break; case SQL_DIAG_NUMBER: { SDWORD cRecs=*(SDWORD *)rgbValue; if (cRecs != 1) sprintf(szBuff,TEXT("\t\t\tSQL_DIAG_NUMBER\tReceived: %d\tExpected: %d"),cRecs,1); } break; case SQL_DIAG_SERVER_NAME: { switch(fHandleType) { case SQL_HANDLE_DBC: case SQL_HANDLE_STMT: if (_tcscmp((LPTSTR)rgbValue,szDataSourceName)) sprintf(szBuff,TEXT("\t\t\tSQL_DIAG_SERVER_NAME\tReceived: %s\tExpected: %s"),(LPTSTR)rgbValue,szDataSourceName); break; } } break; default: break; } if (*szBuff) DISPLAYERROR(szSQLGETDIAGFIELD,szBuff); } /* CheckData() */ /*------------------------------------------------------------------------------ / Function: TestDiagRec / Purpose: For each type of handle, generate an error. If SQLGetDiagField / is not supported, verify the appropriate DM error is returned. / Otherwise, verify SQLGetDiagField returns the expected error / information. If SQLGetDiagRec is not supported, verify the / appropriate DM error is returned. Otherwise, verify / SQLGetDiagField returns the expected error information. If / SQLGetDiagRec is supported, compare its output with that of / SQLGetDiagField. /*----------------------------------------------------------------------------*/ void TestDiagRec() { SQLRETURN rcFunction, rc=SQL_SUCCESS; SWORD cbErrorMsg; SDWORD fNativeError; UWORD iHandle=0, iField=0, cHandles; SDWORD *pfNativeError = NULL; LPTSTR pchMessageText = NULL; CHAR szDataSourceName[MAX_STRING_SIZE] = TEXT(""); CHAR szState[SQL_SQLSTATE_SIZE+1]; CHAR szErrorMsg[SQL_MAX_MESSAGE_LENGTH]; CHAR szAPI[MEDBUFF]=TEXT(""); CHAR szBuff[MEDBUFF]=TEXT(""); LPTSTR pszExpState=szHY009; RETCODE rcExp=SQL_SUCCESS; HANDLES rgHandles[] = { SQL_HANDLE_ENV, henv, SQL_HANDLE_DBC, hdbc, SQL_HANDLE_STMT, hstmt, SQL_HANDLE_DESC, hdesc, }; cHandles=sizeof(rgHandles)/sizeof(HANDLES); /* Call SQLGetInfo to get values to compare: */ rcFunction = SQLGetInfo(hdbc, SQL_DATA_SOURCE_NAME, szDataSourceName, sizeof(szDataSourceName), NULL); RETCHECK(SQL_SUCCESS, rcFunction, szSQLGETINFO); /* Allocate an hdesc: */ if(Supported(SQL_API_SQLALLOCHANDLE) && g_f3XDriver) { rcFunction = SQLAllocHandle(SQL_HANDLE_DESC, hdbc, &hdesc); RETCHECK(SQL_SUCCESS, rcFunction, szSQLALLOCHANDLE); // Update the array entry for the hdesc rgHandles[3].hHandle=hdesc; } else cHandles--; for (iHandle=0; iHandle < cHandles; iHandle++) { SetErrorCondition(rgHandles[iHandle].fHandleType); rc = SQLGetDiagRec(rgHandles[iHandle].fHandleType, rgHandles[iHandle].hHandle, 1,szState,&fNativeError, szErrorMsg, SQL_MAX_MESSAGE_LENGTH, &cbErrorMsg); if (rgHandles[iHandle].fHandleType == SQL_HANDLE_DESC) pszExpState=szHY091; rcExp=SQL_SUCCESS; if(fDiagRecSupported) { DIAGRETCHECK(rcExp, rc, szSQLGETDIAGREC); if (RC_SUCCESSFUL(rc) && _tcscmp(szState,pszExpState)) { sprintf(szBuff,TEXT("\t\t\tReceived: %s\tExpected: %s"),szState, pszExpState); DISPLAYERROR(szSQLGETDIAGREC,szBuff); } } else { if(!FindError(rgHandles[iHandle].fHandleType, szIM001)) DISPLAYERROR(szSQLGETDIAGREC, szNotSupported); } } /* Free the hdesc: */ if (hdesc) { rcFunction = SQLFreeHandle(SQL_HANDLE_DESC, hdesc); RETCHECK(rcExp, rcFunction, szSQLFREEHANDLE); hdesc = SQL_NULL_HDESC; } //ExitTestDiagRec FreeStmt(SQL_CLOSE); } /* TestDiagRec() */ /*------------------------------------------------------------------------------ / Function: TestDiagField / Purpose: For each type of handle, generate an error. If SQLGetDiagField / is not supported, verify the appropriate DM error is returned. / Otherwise, verify SQLGetDiagField returns the expected error / information. If SQLGetDiagRec is not supported, verify the / appropriate DM error is returned. Otherwise, verify / SQLGetDiagField returns the expected error information. If / SQLGetDiagRec is supported, compare its output with that of / SQLGetDiagField. /*----------------------------------------------------------------------------*/ void TestDiagField() { SQLRETURN rcFunction, rc=SQL_SUCCESS; SWORD cbValue=0; UWORD iHandle=0, iField=0, cHandles; CHAR szDataSourceName[MAX_STRING_SIZE] = TEXT(""); CHAR rgbValue[SQL_MAX_MESSAGE_LENGTH]; CHAR szAPI[MEDBUFF]=TEXT(""); CHAR szBuff[MEDBUFF]=TEXT(""); RETCODE rcExp=SQL_SUCCESS; HANDLES rgHandles[] = { SQL_HANDLE_ENV, henv, SQL_HANDLE_DBC, hdbc, SQL_HANDLE_STMT, hstmt, SQL_HANDLE_DESC, hdesc, }; cHandles=sizeof(rgHandles)/sizeof(HANDLES); /* Call SQLGetInfo to get values to compare: */ rcFunction = SQLGetInfo(hdbc, SQL_DATA_SOURCE_NAME, szDataSourceName, sizeof(szDataSourceName), NULL); RETCHECK(SQL_SUCCESS, rcFunction, szSQLGETINFO); hdesc = SQL_NULL_HDESC; /* Allocate an hdesc: */ if(Supported(SQL_API_SQLALLOCHANDLE) && g_f3XDriver) { rcFunction = SQLAllocHandle(SQL_HANDLE_DESC, hdbc, &hdesc); RETCHECK(SQL_SUCCESS, rcFunction, szSQLALLOCHANDLE); // Update the array entry for the hdesc rgHandles[3].hHandle=hdesc; } else cHandles--; for (iHandle=0; iHandle < cHandles; iHandle++) { SetErrorCondition(rgHandles[iHandle].fHandleType); if(fDiagFieldSupported) { for (iField=0;iField < sizeof(rgDiagInfo)/sizeof(struct tagDIAGINFO);iField++) { rc = SQLGetDiagField(rgHandles[iHandle].fHandleType, rgHandles[iHandle].hHandle, rgDiagInfo[iField].irecRecNumber, rgDiagInfo[iField].uwDescField, rgbValue, SQL_MAX_MESSAGE_LENGTH, &cbValue); DIAGRETCHECK(rcExp, rc, szSQLGETDIAGFIELD); if (RC_SUCCESSFUL(rc)) CheckData(rgHandles[iHandle].fHandleType,rgDiagInfo[iField].uwDescField, rgbValue,szDataSourceName); } } else { rc = SQLGetDiagField(SQL_HANDLE_ENV, henv, 0, SQL_DIAG_RETURNCODE, rgbValue,SQL_MAX_MESSAGE_LENGTH, &cbValue); if(!FindError(rgHandles[iHandle].fHandleType, szIM001)) DISPLAYERROR(szAPI, szNotSupported); } } /* Free the hdesc: */ if (hdesc) { rcFunction = SQLFreeHandle(SQL_HANDLE_DESC, hdesc); RETCHECK(rcExp, rcFunction, szSQLFREEHANDLE); hdesc = SQL_NULL_HDESC; } //ExitTestDiagField FreeStmt(SQL_CLOSE); } /* TestDiagField() */ //------------------------------------------------------------------------------ // Function: CompareAnsiToUnicode // Compares an ANSI string to a Unicode string //------------------------------------------------------------------------------ BOOL CompareAnsiToUnicode(SQLCHAR * aszBuf, SQLINTEGER cbA, SQLWCHAR * wszBuf, SQLINTEGER cbW, SQLCHAR * szAPI) { return; } //------------------------------------------------------------------------------ // Function: CompareAnsiUnicodeResults // Compares an ANSI result set to a Unicode result set //------------------------------------------------------------------------------ void CompareAnsiUnicodeResults(SQLHSTMT hstmtA, SQLHSTMT hstmtW, SQLCHAR * szAPI) { return; } /*------------------------------------------------------------------------------ / Function: TestMixedAnsiUnicode / Purpose: Call several of the Unicode functions mixed with ANSI functions / to verify functions succeed in the mixed case. /*----------------------------------------------------------------------------*/ void TestMixedAnsiUnicode(QTSTRUCT * lpqt) { return; } /* TestMixedAnsiUnicode() */ //----------------------------------------------------------------------- // Function: TestStmtOptions //----------------------------------------------------------------------- void TestStmtOptions() { UDWORD dwLen, udw; BOOL fConnectOption; RETCODE rc=SQL_SUCCESS; CHAR szAPI[MEDBUFF]; SDWORD cbValue=0; SetStatementAttributes(SQL_MAX_LENGTH,(PTR)&udw); if (SetStatementAttributes(SQL_MAX_LENGTH, (PTR)TEST_STMT_OPTION)) fConnectOption = TRUE; if (Supported(SQL_API_SQLGETSTMTATTR)) { rc = SQLGetStmtAttr(hstmt, SQL_MAX_LENGTH, (PTR)&dwLen,sizeof(dwLen),&cbValue); _tcscpy(szAPI,szSQLGETSTMTATTR); } else { rc = SQLGetStmtOption(hstmt, SQL_MAX_LENGTH, &dwLen); _tcscpy(szAPI,szSQLGETSTMTOPTION); } if(rc != SQL_SUCCESS) { if(!FindError(SQL_HANDLE_STMT,szHYC00)) RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTOPTION); } else { if(dwLen != TEST_STMT_OPTION && rc == SQL_SUCCESS && fConnectOption) DISPLAYERROR(szSQLGETSTMTOPTION,TEXT("incorrect SQL_MAX_LENGTH value returned")); } } //TestStmtOptions() //----------------------------------------------------------------------- // Function: SetTableName //----------------------------------------------------------------------- void SetTableName(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; UWORD cTableName; CHAR szTime[MEDBUFF]=TEXT(""), szTmpBuff[MEDBUFF], *pTime=NULL; _tstrtime(szTmpBuff); /* Remove colons */ pTime=_tcstok(szTmpBuff, TEXT(":")); while (pTime) { _tcscat(szTime,pTime); pTime=_tcstok(NULL, TEXT(":")); } rc = SQLGetInfo(hdbc, SQL_MAX_TABLE_NAME_LEN, &cTableName, sizeof (int), NULL); if(rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO); rc = SQLGetInfo(hdbc, SQL_QUALIFIER_NAME_SEPARATOR, lpqt->buf, sizeof(lpqt->buf), NULL); if(rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO); if(!(_tcscmp(TEXT("\\"), lpqt->buf))) cTableName -= 4; _sntprintf(lpqt->szTableName, min(cTableName, MAX_TABLE_NAME-1), TEXT("Q%s"), szTime); } //SetTableName() //----------------------------------------------------------------------- // Function: AllowedType // // If swNumTypes > 0, limits SQL types to those in array //----------------------------------------------------------------------- BOOL AllowedType(SWORD fType) { SWORD i, swNumTypes=0; BOOL bAllowed=TRUE; SWORD rgAllowedTypes[MAX_TYPES_SUPPORTED]={ SQL_CHAR, SQL_BINARY // SQL_BIT /* SQL_TINYINT SQL_NUMERIC, SQL_INTEGER, SQL_SMALLINT, SQL_FLOAT, SQL_REAL, SQL_TYPE_TIMESTAMP, SQL_LONGVARBINARY, SQL_LONGVARCHAR */ }; if (swNumTypes > 0) { bAllowed=FALSE; for (i=0; i < swNumTypes; i++) { if (fType == rgAllowedTypes[i]) bAllowed=TRUE; } } return bAllowed; } //----------------------------------------------------------------------- // Function: GetTypeInfo //----------------------------------------------------------------------- UWORD GetTypeInfo(FIELDINFO *rgFields,QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; UWORD cFieldName; SDWORD cMaxTypeSize, cMaxRowSize; UWORD i, cTypes=0; SDWORD sdw; LPTSTR pch=NULL; BOOL fAutoInc=0; /* Get the type information to use in a create statement for a table */ rc = SQLGetInfo(hdbc, SQL_MAX_COLUMN_NAME_LEN, &cFieldName, sizeof cFieldName, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO); rc = SQLGetInfo(hdbc, SQL_MAX_ROW_SIZE, &cMaxRowSize, sizeof cMaxRowSize, NULL); /* don't check for SQL_SUCCES here, it's a 2.0 function. If it's successful That's great, if not then no maximum is assumed. */ cMaxTypeSize = cMaxRowSize / MAX_TYPES_SUPPORTED; /* TO DO: add checks in here for dos file types GetInfo SQL_QUALIFIER_NAME_SEPARATER */ if(cFieldName > MAX_FIELD - 1) cFieldName = MAX_FIELD - 1; if(cFieldName < PREFIX_SIZE) { DISPLAYERROR(szSQLGETINFO,TEXT("MAX_COLUMN_NAME_LEN is too small for autotest to run")); goto TypeErrorRet; } rc = SQLGetTypeInfo(hstmt, SQL_ALL_TYPES); RETCHECK(SQL_SUCCESS, rc,szSQLGETTYPEINFO); for(i = 0; i < MAX_TYPES_SUPPORTED; i++) { rc = SQLFetch(hstmt); if(rc != SQL_SUCCESS && rc !=SQL_SUCCESS_WITH_INFO) break; *rgFields[i].szType = *rgFields[i].szLength = *rgFields[i].szParams = TEXT('\0'); /* get type name */ rc = SQLGetData(hstmt, 1, SQL_C_CHAR, rgFields[i].szType, sizeof(rgFields[i].szType), &sdw); if(!RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA)) goto TypeErrorRet; sprintf(rgFields[i].szFieldName,TEXT("c%02u"), i+COLNAME_START); /* copy first portion of type name for easy reference */ _tcsnccat(rgFields[i].szFieldName, rgFields[i].szType, TYPE_PORTION); /* change spaces in field name to '_' */ while((pch = (LPTSTR)_tcschr(rgFields[i].szFieldName, TEXT(' '))) != NULL) *pch = TEXT('_'); /* get the SQLType */ rc = SQLGetData(hstmt, 2, SQL_C_DEFAULT, (SWORD *)&rgFields[i].wSQLType, IGNORED, &sdw); if(!RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA)) goto TypeErrorRet; /* Max length */ rc = SQLGetData(hstmt, 3, SQL_C_CHAR, rgFields[i].szLength, sizeof(rgFields[i].szLength), &sdw); if(!RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA)) goto TypeErrorRet; /* limit the row size for those drivers that don't support a long enough row length for all the fields to be at the max length */ switch(rgFields[i].wSQLType) { case SQL_CHAR: case SQL_VARCHAR: case SQL_VARBINARY: case SQL_BINARY: case SQL_LONGVARCHAR: case SQL_LONGVARBINARY: if(cMaxTypeSize) { if(_ttol (rgFields[i].szLength) > cMaxTypeSize) _ltot(cMaxTypeSize, rgFields[i].szLength, 10); } } /* prefix */ rc = SQLGetData(hstmt, 4, SQL_C_CHAR, rgFields[i].szPrefix, sizeof(rgFields[i].szPrefix), &sdw); if(!RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA)) goto TypeErrorRet; /* suffix */ rc = SQLGetData(hstmt, 5, SQL_C_CHAR, rgFields[i].szSuffix, sizeof(rgFields[i].szSuffix), &sdw); if(!RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA)) goto TypeErrorRet; /* create params */ rc = SQLGetData(hstmt, 6, SQL_C_CHAR, rgFields[i].szParams, sizeof(rgFields[i].szParams), &sdw); if(!RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA)) goto TypeErrorRet; /* nullable */ rc = SQLGetData(hstmt, 7, SQL_C_SHORT, &rgFields[i].nullable, IGNORED, &sdw); if(!RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA)) goto TypeErrorRet; /* searchable */ rc = SQLGetData(hstmt, 9, SQL_C_SHORT, &rgFields[i].fSearchable, IGNORED, &sdw); if(!RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA)) goto TypeErrorRet; /* autoincrement */ rc = SQLGetData(hstmt, 12, SQL_C_SHORT, &rgFields[i].autoinc, IGNORED, &sdw); if(!RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA)) goto TypeErrorRet; // Since some data types will have NULL for autoincrement, we need to set to FALSE if (SQL_NULL_DATA == sdw) rgFields[i].autoinc=FALSE; if (IgnoreType(rgFields[i].szType,rgFields[i].wSQLType)) { i--; continue; } /* The following code only allows the first autoincrement column to be placed in the table. Many DBMS's do not allow more than one per table. */ if(rgFields[i].autoinc == TRUE) { if(fAutoInc) { i--; continue; } else fAutoInc = TRUE; } // Limit data types to those desired (use for debugging) if (!AllowedType(rgFields[i].wSQLType)) { i--; continue; } } cTypes = i; /* if the type name contains spaces, replace them with _ because most servers don't allow spaces in field names */ RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); rc = SQLFreeStmt(hstmt, SQL_CLOSE); RETCHECK(SQL_SUCCESS, rc,szSQLFREESTMT); SetTableName(lpqt); return(cTypes); TypeErrorRet: return(0); } //GetTypeInfo() //----------------------------------------------------------------------- // Function: BuildCreateStmt //----------------------------------------------------------------------- BOOL BuildCreateStmt(QTSTRUCT *lpqt,FIELDINFO *rgFields,UWORD cTypes) { RETCODE rc=SQL_SUCCESS; CHAR szNum[MAX_NUM_BUFFER]; /* used with _ttoi and itoa conversions */ SWORD wNum; UWORD i; SDWORD sdw; LPTSTR pch=NULL; /* the column names will be ctypname (where typename is the type name returned by the source in SQLGetTypeInfo) */ *lpqt->sz = TEXT('\0'); _tcscpy(lpqt->sz,TEXT("Create Table ")); _tcscat(lpqt->sz, lpqt->szTableName); _tcscat(lpqt->sz,TEXT(" (")); for(i = 0; i < cTypes; i++) { CHAR szParamType[50]; CHAR szNotNull[10]; *lpqt->szParam = TEXT('\0'); /* if SQLGetTypeInfo returned params they need to be used in the create statement */ if(rgFields[i].szParams == NULL || _tcslen(rgFields[i].szParams) == 0) *lpqt->szParam = TEXT('\0'); else if(_tcschr(rgFields[i].szParams, TEXT(',')) == NULL) sprintf(lpqt->szParam,TEXT("(%s)"), rgFields[i].szLength); else { _tcscpy(szNum, rgFields[i].szLength); sprintf(lpqt->szParam,TEXT("(%s, %d)"), rgFields[i].szLength, _ttoi(szNum) - SCALEDIFF); } _tcscpy(szParamType, rgFields[i].szType); if(pch = _tcschr((LPTSTR)szParamType, TEXT('('))) { *pch = TEXT('\0'); _tcscat(szParamType, lpqt->szParam); _tcscat(szParamType, (LPTSTR)_tcschr(rgFields[i].szType, TEXT(')')) + 1); } else { _tcscat(szParamType, lpqt->szParam); } /* If the field is not nullable, we need to create the table that way */ rc = SQLGetInfo(hdbc, SQL_NON_NULLABLE_COLUMNS, &wNum, sizeof (SWORD), NULL); if(rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO); if((rgFields[i].nullable == SQL_NO_NULLS) && (wNum != SQL_NNC_NULL)) _tcscpy(szNotNull,TEXT("NOT NULL")); else szNotNull[0] = TEXT('\0'); sprintf(&lpqt->sz[_tcslen(lpqt->sz)],TEXT(" %s %s %s ,"), rgFields[i].szFieldName, (LPTSTR)szParamType, (LPTSTR)szNotNull); } /* remove the last comma and space */ lpqt->sz[_tcslen(lpqt->sz) - 2] = TEXT('\0'); _tcscat(lpqt->sz,TEXT(")")); rc = SQLExecDirect(hstmt, lpqt->sz, SQL_NTS); if(rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) if(!RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT)) goto BuildErrorRet; /* now that table was created, call SQLColumns. Both as a test and to get necessary information to insert data */ rc = SQLColumns(hstmt, NULL, SQL_NTS, NULL, SQL_NTS, lpqt->szTableName, SQL_NTS, NULL, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLCOLUMNS); for(i = 0; i < cTypes; i++) { rc = SQLFetch(hstmt); RETCHECK(SQL_SUCCESS, rc,szSQLFETCH); /* precision */ rc = SQLGetData(hstmt, 7, SQL_C_LONG, &rgFields[i].precision, IGNORED, &sdw); RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA); /* length */ if((rgFields[i].precision == 0) || (sdw == SQL_NO_TOTAL)){ rc = SQLGetData(hstmt, 8, SQL_C_LONG, &rgFields[i].precision, IGNORED, &sdw); RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA); if(sdw == SQL_NO_TOTAL) /* precision & length were undetermined */ rgFields[i].precision = 1000; /* so set it to an arbitary value */ } /* numeric scale */ rc = SQLGetData(hstmt, 9, SQL_C_SHORT, &rgFields[i].scale, IGNORED, &sdw); RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA); if(sdw == SQL_NO_TOTAL) rgFields[i].scale = 0; } rc = SQLFreeStmt(hstmt, SQL_CLOSE); RETCHECK(SQL_SUCCESS, rc,szSQLFREESTMT); /* look for columns the test should not try to update by running a select * query and calling ColAttributes on the result fields */ /* select * does not return the fields in a defined order, so field order must be specified */ _tcscpy(lpqt->sz,TEXT("select ")); for(i = 0; i < cTypes; i ++) { if(i) _tcscat(lpqt->sz,TEXT(",")); _tcscat(lpqt->sz, rgFields[i].szFieldName); } _tcscat(lpqt->sz,TEXT(" from ")); _tcscat(lpqt->sz, lpqt->szTableName); rc = SQLExecDirect(hstmt, lpqt->sz, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); for(i = 1; i <= cTypes; i++) { rc = SQLColAttributes(hstmt, i, SQL_COLUMN_UPDATABLE, NULL, 0, NULL, &sdw); RETCHECK(SQL_SUCCESS, rc,szSQLCOLATTRIBUTES); rgFields[i - 1].fAutoUpdate = sdw == SQL_ATTR_READONLY; rc = SQLColAttributes(hstmt, i, SQL_COLUMN_UNSIGNED, NULL, 0, NULL, &sdw); RETCHECK(SQL_SUCCESS, rc,szSQLCOLATTRIBUTES); rgFields[i - 1].fUnsigned = sdw; } rc = SQLFreeStmt(hstmt, SQL_CLOSE); RETCHECK(SQL_SUCCESS, rc,szSQLFREESTMT); return(FALSE); BuildErrorRet: return(TRUE); } //BuildCreateStmt() //----------------------------------------------------------------------- // Function: BuildInsertStmt //----------------------------------------------------------------------- BOOL BuildInsertStmt(QTSTRUCT *lpqt,FIELDINFO *rgFields,UWORD cTypes, DSTRUCT *lpd,SDWORD *cColsSelected,BOOL fBindParameter) { RETCODE rc; UWORD w; UWORD i; PTR ptr; UWORD ind; SDWORD sdw; LPTSTR pch=NULL; BOOL fColNames=TRUE, fLongData=FALSE; SDWORD *sdwArray = (SDWORD *)AllocateMemory(sizeof(SDWORD) * MAX_TYPES_SUPPORTED); _tcscpy(lpqt->szColNames,TEXT("\0")); _tcscpy(lpqt->szValues,TEXT("\0")); for(i = 0; i < cTypes; i++) { for(ind = 0, w = 0; ind < cTypes; ind++) { pch = qtMakeData(i, ind,&rgFields[ind], lpqt->szDataItem); if(!pch) /* current type is READ_ONLY) */ continue; /* for every nullable type, that field will be set to */ /* null when the row number corresponds with the field */ /* number */ if(*pch) { _tcscpy(lpd[w].data, pch); lpd[w].cb = SQL_NTS; } else { _tcscpy(lpd[w].data,TEXT("")); lpd[w].cb = SQL_NULL_DATA; } if(fColNames) { /* the first time throught, the insert */ /* statement itself is created */ _tcscat(lpqt->szColNames, rgFields[ind].szFieldName); _tcscat(lpqt->szColNames,TEXT(", ")); _tcscat(lpqt->szValues,TEXT(" ?, ")); /* and parameters are set */ /* set all the parameters using pointers to buffers in*/ /* the param struct. */ if(!fBindParameter) { rc = SQLSetParam(hstmt, (UWORD)(w+1), SQL_C_CHAR, rgFields[ind].wSQLType, rgFields[ind].precision, rgFields[ind].scale, &lpd[w].data, &lpd[w].cb); RETCHECK(SQL_SUCCESS, rc,szSQLSETPARAM); } else { rc = SQLBindParameter(hstmt, (UWORD)(w+1), SQL_PARAM_INPUT, SQL_C_CHAR, rgFields[ind].wSQLType, rgFields[ind].precision, rgFields[ind].scale, &lpd[w].data, MAX_STRING_SIZE, &lpd[w].cb); RETCHECK(SQL_SUCCESS, rc,szSQLBINDPARAMETER); } } w++; cNumResSetCols=w; } if(fColNames) { /* the first time through, the insert */ /* statement needs to be SQLPrepare'd */ /* remove the "," at the end of the string */ lpqt->szColNames[_tcslen(lpqt->szColNames) - 2] = TEXT('\0'); lpqt->szValues[_tcslen(lpqt->szValues) - 2] = TEXT('\0'); sprintf(lpqt->sz,TEXT("insert into %s (%s) VALUES(%s)"), lpqt->szTableName, lpqt->szColNames, lpqt->szValues); //copy the insert statement, with the column names. //_ASSERTE(_tcslen(lpqt->sz) < MAX_STRING_SIZE); _tcscpy(szInsertStmt,lpqt->sz); //prepare the statement rc = SQLPrepare(hstmt, lpqt->sz, SQL_NTS); if(!RETCHECK(SQL_SUCCESS, rc,szSQLPREPARE)) goto InsertErrorRet; fColNames = FALSE; /* no more first times through */ } rc = SQLExecute(hstmt); /* insert a row */ if(!RETCHECK(SQL_SUCCESS, rc,szSQLEXECUTE)) { if (SQL_SUCCESS_WITH_INFO != rc) // BANDAID, normally would fail on S.W.I goto InsertErrorRet; } rc = SQLRowCount(hstmt, &sdw); RETCHECK(SQL_SUCCESS, rc,szSQLROWCOUNT); if(sdw != 1) /* the execute inserted 1 row */ DISPLAYERROR(szSQLROWCOUNT,TEXT("Insert single row")); /* FreeStmt SQL_CLOSE */ rc = SQLFreeStmt(hstmt, SQL_CLOSE); RETCHECK(SQL_SUCCESS, rc,szSQLFREESTMT); } /* for the last row use SQLParamData and SQLPutData */ /* First check to see if the SQL_LEN_DATA_AT_EXEC macro is supported */ rc = SQLGetInfo(hdbc, SQL_NEED_LONG_DATA_LEN, lpqt->buf, (SWORD)sizeof(lpqt->buf), NULL); if(rc == SQL_SUCCESS) if(lpqt->buf[0] == TEXT('Y')) fLongData = TRUE; for(ind = 0, w = 0; ind < cTypes; ind++) { /* set all the params */ if(rgFields[ind].fAutoUpdate) continue; if(fLongData && ((rgFields[ind].wSQLType == SQL_LONGVARBINARY) || (rgFields[ind].wSQLType == SQL_LONGVARCHAR))){ /* Make sure we don't exceed the max negative SDWORD value */ if(rgFields[ind].precision > (MAXSDWORD + SQL_LEN_DATA_AT_EXEC_OFFSET)) sdwArray[ind] = MINSDWORD - SQL_LEN_DATA_AT_EXEC_OFFSET; else sdwArray[ind] = SQL_LEN_DATA_AT_EXEC(rgFields[ind].precision); } else sdwArray[ind] = SQL_DATA_AT_EXEC; w++; if(!fBindParameter){ rc = SQLSetParam(hstmt, w, SQL_C_CHAR, rgFields[ind].wSQLType, rgFields[ind].precision, rgFields[ind].scale, (LPTSTR)(UDWORD)ind, &sdwArray[ind]); RETCHECK(SQL_SUCCESS, rc,szSQLSETPARAM); } else{ rc = SQLBindParameter(hstmt, w, SQL_PARAM_INPUT, SQL_C_CHAR, rgFields[ind].wSQLType, rgFields[ind].precision, rgFields[ind].scale, (LPTSTR)(((UDWORD)ind)+BIND_PARM_OFFSET), 0, &sdwArray[ind]); RETCHECK(SQL_SUCCESS, rc,szSQLBINDPARAMETER); } } *cColsSelected = w; rc = SQLExecDirect(hstmt, lpqt->sz, SQL_NTS); if (!RETCHECK(SQL_NEED_DATA, rc,szSQLEXECDIRECT)) goto InsertErrorRet; for(ind = 0; ind <= cTypes; ind++) { rc = SQLParamData(hstmt, &ptr); if(rc != SQL_NEED_DATA) break; pch = qtMakeData(cTypes, ind, &rgFields[(unsigned long)ptr-BIND_PARM_OFFSET], lpqt->szDataItem); if(*pch) { rc = SQLPutData(hstmt, pch, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLPUTDATA); } else { rc = SQLPutData(hstmt, (LPTSTR)IGNORED, SQL_NULL_DATA); RETCHECK(SQL_SUCCESS, rc,szSQLPUTDATA); } } RETCHECK(SQL_SUCCESS, rc,szSQLPARAMDATA); rc = SQLRowCount(hstmt, &sdw); RETCHECK(SQL_SUCCESS, rc,szSQLROWCOUNT); if(sdw != 1) DISPLAYERROR(szSQLROWCOUNT,TEXT("Insert single row")); rc = SQLFreeStmt(hstmt, SQL_RESET_PARAMS); RETCHECK(SQL_SUCCESS, rc,szSQLFREESTMT); ReleaseMemory(sdwArray); return(FALSE); InsertErrorRet: SQLFreeStmt(hstmt, SQL_RESET_PARAMS); ReleaseMemory(sdwArray); return(TRUE); } //BuildInsertStmt() //----------------------------------------------------------------------- // Function: FullDisconnect //----------------------------------------------------------------------- void FullDisconnect() { RETCODE rc=SQL_SUCCESS; /* SQLCancel has the same functionality as SQLFreeStmt w/ SQL_CLOSE */ /* in a non-asynchronous environment */ rc = SQLCancel(hstmt); RETCHECK(SQL_SUCCESS, rc,szSQLCANCEL); FreeStmt(SQL_DROP); /* if the connection was made in the */ /* test, it should be disconnected */ /* in the test, otherwise it should be left connected */ rc = SQLDisconnect(hdbc); RETCHECK(SQL_SUCCESS, rc,szSQLDISCONNECT); rc = SQLFreeConnect(hdbc); RETCHECK(SQL_SUCCESS, rc,szSQLFREECONNECT); rc = SQLFreeEnv(henv); RETCHECK(SQL_SUCCESS, rc,szSQLFREEENV); } //FullDisconnect() //----------------------------------------------------------------------- // Function: DropTable //----------------------------------------------------------------------- void DropTable(LPTSTR szTableName, BOOL fSilent) { CHAR szBuff[100]; RETCODE rc=SQL_ERROR; _tcscpy(szBuff,TEXT("drop table ")); _tcscat(szBuff, szTableName); rc = SQLExecDirect(hstmt, szBuff, SQL_NTS); if (!fSilent) { if(!RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT)) szWrite(TEXT("Unable to drop table"), TRUE); } } //DropTable() //----------------------------------------------------------------------- // Function: CleanUp // Purpose: To drop the table,disconnect from data source and // release memory. //----------------------------------------------------------------------- void CleanUp(DSTRUCT *lpd,QTSTRUCT *lpqt,FIELDINFO *rgFields, LPTSTR szTableName,BOOL fSilent,LPTSTR szValidServer) { DropTable(szTableName, fSilent); if(szValidServer) FullDisconnect(); ReleaseMemory(lpd); ReleaseMemory(lpqt); ReleaseMemory(rgFields); } //CleanUp() //----------------------------------------------------------------------- // Function: BindAllColumns //----------------------------------------------------------------------- BOOL BindAllColumns(QTSTRUCT *lpqt,FIELDINFO *rgFields,UWORD cTypes, DSTRUCT *lpd) { //----------------------------------------------------------------------- // Function: BindAllColumns UWORD i, w; RETCODE rc=SQL_SUCCESS; for(i = 0, w = 0; i < cTypes; i++) { if(!qtMakeData(1, i,&rgFields[i],lpqt->szDataItem)) continue; w++; switch(rgFields[i].wSQLType) { case SQL_INTEGER: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpd[i].sdword, IGNORED, &lpd[i].cb); break; case SQL_SMALLINT: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpd[i].sword, IGNORED, &lpd[i].cb); break; case SQL_FLOAT: case SQL_DOUBLE: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpd[i].sdouble, IGNORED, &lpd[i].cb); break; case SQL_REAL: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpd[i].sfloat, IGNORED, &lpd[i].cb); break; case SQL_DATE: case SQL_TYPE_DATE: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpd[i].date, IGNORED, &lpd[i].cb); break; case SQL_TIME: case SQL_TYPE_TIME: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpd[i].time, IGNORED, &lpd[i].cb); break; case SQL_TIMESTAMP: case SQL_TYPE_TIMESTAMP: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpd[i].timestamp, IGNORED, &lpd[i].cb); break; case SQL_CHAR: case SQL_VARCHAR: case SQL_LONGVARCHAR: case SQL_NUMERIC: case SQL_DECIMAL: rc = SQLBindCol(hstmt, w, SQL_C_CHAR, lpd[i].data, MAX_STRING_SIZE*sizeof(SQLCHAR), &lpd[i].cb); break; default: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, lpd[i].data, MAX_STRING_SIZE, &lpd[i].cb); break; } if(!RETCHECK(SQL_SUCCESS, rc, szSQLBINDCOL)) return(FALSE); } return(TRUE); } //BindAllColumns() /*----------------------------------------------------------------------- * Function: BindFetchColumns * Used for Checking data in Result sets from fetch calls. * Binds Binary data types as SQL_C_CHAR *----------------------------------------------------------------------- */ BOOL BindFetchColumns(QTSTRUCT *lpqt,FIELDINFO *rgFields,UWORD cTypes, DSTRUCT *lpdFetch) { UWORD i, w; RETCODE rc=SQL_SUCCESS; for(i = 0, w = 0; i < cTypes; i++) { if(!qtMakeData(0, i,&rgFields[i],lpqt->szDataItem)) continue; w++; switch(rgFields[i].wSQLType) { case SQL_BIGINT: case SQL_INTEGER: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpdFetch[i].sdword, IGNORED, &lpdFetch[i].cb); break; case SQL_TINYINT: case SQL_SMALLINT: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpdFetch[i].sword, IGNORED, &lpdFetch[i].cb); break; case SQL_FLOAT: case SQL_DOUBLE: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpdFetch[i].sdouble, IGNORED, &lpdFetch[i].cb); break; case SQL_REAL: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpdFetch[i].sfloat, IGNORED, &lpdFetch[i].cb); break; case SQL_DATE: case SQL_TYPE_DATE: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpdFetch[i].date, IGNORED, &lpdFetch[i].cb); break; case SQL_TIME: case SQL_TYPE_TIME: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpdFetch[i].time, IGNORED, &lpdFetch[i].cb); break; case SQL_TIMESTAMP: case SQL_TYPE_TIMESTAMP: rc = SQLBindCol(hstmt, w, SQL_C_DEFAULT, &lpdFetch[i].timestamp, IGNORED, &lpdFetch[i].cb); break; case SQL_BIT: case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY: rc = SQLBindCol(hstmt, w, SQL_C_CHAR, lpdFetch[i].data, sizeof(lpdFetch[i].data), &lpdFetch[i].cb); break; case SQL_CHAR: case SQL_VARCHAR: case SQL_NUMERIC: case SQL_DECIMAL: default: rc = SQLBindCol(hstmt, w, SQL_C_CHAR, lpdFetch[i].data, sizeof(lpdFetch[i].data), &lpdFetch[i].cb); break; } if(!RETCHECK(SQL_SUCCESS, rc, szSQLBINDCOL)) return(FALSE); } return(TRUE); } /*BindFetchColumns() */ //----------------------------------------------------------------------- // Function: TestMetaData //----------------------------------------------------------------------- void TestMetaData(lpSERVERINFO lpSI, QTSTRUCT *lpqt,FIELDINFO *rgFields,UWORD cTypes) { SWORD wNum; UWORD w; UWORD i; UDWORD dwLen; RETCODE rc=SQL_SUCCESS; SWORD wType; SWORD wNull; SelectFromTable(lpqt); for(i = 0, w = 0; i < cTypes; i++) { dwLen = 0; wNum = 0; wNull = 0; /* information returned by SQLDescribeCol should match info */ /* used to create table */ if(!qtMakeData(1, i,&rgFields[i],lpqt->szDataItem)) continue; w++; rc = SQLDescribeCol(hstmt, w, lpqt->buf, sizeof(lpqt->buf)/sizeof(CHAR), NULL, &wType, &dwLen, &wNum, &wNull); RETCHECK(SQL_SUCCESS, rc,szSQLDESCRIBECOL); /* verify that column name returned is column name created */ if(0 != _tcsicmp(rgFields[i].szFieldName, lpqt->buf)) DISPLAYERROR(szSQLDESCRIBECOL,TEXT("incorrect column name")); if(wType != rgFields[i].wSQLType) { // For a 2.x driver, SQLGetTypeInfo result will be SQL_DATE, etc, // but 3.0 DM will convert SQLDescribeCol values to TYPE_DATE, ETC. if ((uDriverODBCVer < 3) && ((SQL_TYPE_DATE == wType && SQL_DATE == rgFields[i].wSQLType) || (SQL_TYPE_TIME == wType && SQL_TIME == rgFields[i].wSQLType) || (SQL_TYPE_TIMESTAMP == wType && SQL_TIMESTAMP == rgFields[i].wSQLType))) NULL; else DISPLAYERROR(szSQLDESCRIBECOL,TEXT("incorrect SQLType")); } if(dwLen != (UDWORD)rgFields[i].precision) DISPLAYERROR(szSQLDESCRIBECOL,TEXT("incorrect precision")); if(wNum != rgFields[i].scale) DISPLAYERROR(szSQLDESCRIBECOL,TEXT("incorrect scale")); if(wNull != rgFields[i].nullable && wNull != SQL_NULLABLE_UNKNOWN && rgFields[i].nullable != SQL_NULLABLE_UNKNOWN) { DISPLAYERROR(szSQLDESCRIBECOL,TEXT("incorrect nullable")); } } FreeStmt(SQL_CLOSE); } //TestMetaData() //----------------------------------------------------------------------- // Function: RetrieveData //----------------------------------------------------------------------- void RetrieveData(QTSTRUCT *lpqt,FIELDINFO *rgFields, UWORD cTypes,DSTRUCT *lpd) { RETCODE rc=SQL_SUCCESS; UWORD ind, i; SDWORD nSame; LPTSTR pch=NULL; CHAR szNum[MAX_NUM_BUFFER]; /* used with _ttoi and itoa conversions */ CHAR *stopstring=NULL; double Num=0, Num2=0; for(ind = 0; ;ind++) { /* Get the data back */ rc = SQLFetch(hstmt); if(rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) break; for(i = 0; i < cTypes; i++) { /* make sure it's original data placed */ /* in that field/row location */ pch = qtMakeData(ind, i,&rgFields[i], lpqt->szDataItem); if(!pch) continue; if(!*pch) { if(lpd[i].cb != SQL_NULL_DATA) DISPLAYERROR(szRETDATA, TEXT("should have been NULL")); continue; } switch(rgFields[i].wSQLType) { /* check the outlen and data */ /* returned for each type. */ case SQL_INTEGER: if(lpd[i].cb != sizeof(SDWORD)) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); _tcscpy(szNum, pch); nSame = _ttol(szNum) == lpd[i].sdword; break; case SQL_SMALLINT: if(lpd[i].cb != sizeof(SWORD)) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); _tcscpy(szNum, pch); nSame = _ttoi(szNum) == lpd[i].sword; break; case SQL_FLOAT: case SQL_DOUBLE: if(lpd[i].cb != sizeof(SDOUBLE)) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); _tcscpy(szNum, pch); Num=_tcstod(szNum, &stopstring); nSame = Num - lpd[i].sdouble < 0.001 && Num - lpd[i].sdouble > -0.001; break; case SQL_REAL: if(lpd[i].cb != sizeof(SFLOAT)) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); _tcscpy(szNum, pch); Num=_tcstod(szNum, &stopstring); nSame = Num - lpd[i].sfloat < 0.001 && Num - lpd[i].sfloat > -0.001; break; case SQL_TINYINT: if(lpd[i].cb != sizeof(SCHAR)) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); _tcscpy(szNum, pch); nSame = (SCHAR)_ttoi(szNum) == (SCHAR)lpd[i].data[0]; break; case SQL_DECIMAL: case SQL_NUMERIC: if(lpd[i].cb > MAX_STRING_SIZE*sizeof(CHAR)) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); // Chg _tcslen to strlen below pending spec decision if((lpd[i].cb / sizeof(CHAR)) > (UDWORD)_tcslen(lpd[i].data)) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); { CHAR szNum2[MAX_NUM_BUFFER]; _tcscpy(szNum, pch); _tcscpy(szNum2, pch); Num=_tcstod(szNum, &stopstring); Num2=_tcstod(szNum2, &stopstring); nSame = Num - Num2 < 0.001 && Num - Num2 > -0.001; } break; case SQL_VARCHAR: case SQL_LONGVARCHAR: if(lpd[i].cb > MAX_STRING_SIZE*sizeof(CHAR)) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); if(lpd[i].cb / sizeof(SQLCHAR) > _tcslen(lpd[i].data)) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); nSame = (SDWORD)_tcsstr(lpd[i].data, pch); break; case SQL_VARBINARY: case SQL_LONGVARBINARY: if(lpd[i].cb > MAX_STRING_SIZE) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); if(lpd[i].cb * 2 != (SWORD)_tcslen(pch)) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); nSame = TRUE; /* not checking returned data for binary */ break; case SQL_CHAR: if(lpd[i].cb > MAX_STRING_SIZE*sizeof(CHAR) && rc == SQL_SUCCESS) DISPLAYERROR(szRETDATA,TEXT("incorrect return code for outlen")); if(((lpd[i].cb / sizeof(CHAR)) != (UDWORD)rgFields[i].precision) && rc == SQL_SUCCESS) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); nSame = !_tcsnccmp(lpd[i].data, pch, _tcslen(pch)); break; case SQL_BINARY: default: if(lpd[i].cb > MAX_STRING_SIZE && rc == SQL_SUCCESS) DISPLAYERROR(szRETDATA,szINCORRECTOUTLEN); nSame = TRUE; /* not checking returned data for binary */ } if(!nSame) DISPLAYERROR(szRETDATA, TEXT("invalid data")); } } RETCHECK(SQL_NO_DATA_FOUND, rc, szSQLFETCH); if(ind != cTypes + 1) DISPLAYERROR(szSQLFETCH, TEXT("Incorrect number of result rows")); rc = SQLFreeStmt(hstmt, SQL_CLOSE); RETCHECK(SQL_SUCCESS, rc, szSQLFREESTMT); rc = SQLFreeStmt(hstmt, SQL_UNBIND); RETCHECK(SQL_SUCCESS, rc, szSQLFREESTMT); rc = SQLFreeStmt(hstmt, SQL_RESET_PARAMS); RETCHECK(SQL_SUCCESS, rc, szSQLFREESTMT); } // RetrieveData() //----------------------------------------------------------------------- // Function: TestData //----------------------------------------------------------------------- void TestData(QTSTRUCT *lpqt,FIELDINFO *rgFields, UWORD cTypes,DSTRUCT *lpd) { /* bind all fields to a variable of the correct type for retreiving data */ if (!BindAllColumns(lpqt,rgFields,cTypes,lpd)) return; SelectFromTable(lpqt); RetrieveData(lpqt,rgFields,cTypes,lpd); } // TestData() //----------------------------------------------------------------------- // Function: CreateParamQuery //----------------------------------------------------------------------- void CreateParamQuery(QTSTRUCT *lpqt, FIELDINFO *rgFields,UWORD cTypes) { RETCODE rc=SQL_SUCCESS; UWORD i; LPTSTR pch=NULL; CHAR szQuery[MAX_QUERY_SIZE]; static SDWORD sdw = SQL_DATA_AT_EXEC; UWORD w, ind; sprintf(szQuery,TEXT("select %s from %s where "), lpqt->szColNames,lpqt->szTableName); for(i = 0, w = 0,ind=0; i < cTypes; i++) { pch = qtMakeData(ind, i,&rgFields[i], lpqt->szDataItem); if ((rgFields[i].fSearchable == SQL_SEARCHABLE || rgFields[i].fSearchable == SQL_ALL_EXCEPT_LIKE) && pch && *pch) { w++; switch(rgFields[i].wSQLType) { case SQL_REAL: case SQL_FLOAT: case SQL_DOUBLE: sprintf(&szQuery[_tcslen(szQuery)],TEXT("%s < ? + 1 and "), rgFields[i].szFieldName); break; default: sprintf(&szQuery[_tcslen(szQuery)],TEXT("%s = ? and "), rgFields[i].szFieldName); } if(!fBindParameter) { rc = SQLSetParam(hstmt, w, SQL_C_CHAR, rgFields[i].wSQLType, rgFields[i].precision, rgFields[i].scale, (LPTSTR)(UDWORD)i, &sdw); RETCHECK(SQL_SUCCESS, rc,szSQLSETPARAM); } else { rc = SQLBindParameter(hstmt, w, SQL_PARAM_INPUT, SQL_C_CHAR, rgFields[i].wSQLType, rgFields[i].precision, rgFields[i].scale, (LPTSTR)((UDWORD)i+BIND_PARM_OFFSET), 0, &sdw); RETCHECK(SQL_SUCCESS, rc,szSQLBINDPARAMETER); } ind++; } } if (_tcsstr(szQuery,TEXT("and"))) { /* remove the final "and " */ szQuery[_tcslen(szQuery) - 5] = TEXT('\0'); } _tcscpy(lpqt->szParamQuery, szQuery); } //----------------------------------------------------------------------- // Function: TestSearchedQuery //----------------------------------------------------------------------- void TestSearchedQuery(QTSTRUCT *lpqt,FIELDINFO *rgFields, UWORD cTypes,DSTRUCT *lpd,BOOL fBindParameter) { RETCODE rc=SQL_SUCCESS; UWORD i; LPTSTR pch=NULL; SDWORD sdw; UWORD w; UDWORD udw; UWORD ind; sprintf(lpqt->sz, TEXT("select %s from %s where "), lpqt->szColNames, lpqt->szTableName); sdw = SQL_DATA_AT_EXEC; for(i = 0, w = 0,ind=0; i < cTypes; i++) { pch = qtMakeData(ind, i,&rgFields[i], lpqt->szDataItem); if ((rgFields[i].fSearchable == SQL_SEARCHABLE || rgFields[i].fSearchable == SQL_ALL_EXCEPT_LIKE) && pch && *pch) { w++; switch(rgFields[i].wSQLType) { case SQL_REAL: case SQL_FLOAT: case SQL_DOUBLE: sprintf(&lpqt->sz[_tcslen(lpqt->sz)], TEXT("%s < ? + 1 and "), rgFields[i].szFieldName); break; default: sprintf(&lpqt->sz[_tcslen(lpqt->sz)], TEXT("%s = ? and "), rgFields[i].szFieldName); } if(!fBindParameter){ rc = SQLSetParam(hstmt, w, SQL_C_CHAR, rgFields[i].wSQLType, rgFields[i].precision, rgFields[i].scale, (LPTSTR)(UDWORD)i, &sdw); RETCHECK(SQL_SUCCESS, rc, szSQLSETPARAM); } else{ rc = SQLBindParameter(hstmt, w, SQL_PARAM_INPUT, SQL_C_CHAR, rgFields[i].wSQLType, rgFields[i].precision, rgFields[i].scale, (LPTSTR)((UDWORD)i+BIND_PARM_OFFSET), 0, &sdw); RETCHECK(SQL_SUCCESS, rc, szSQLBINDPARAMETER); } ind++; } } /* remove the final "and " */ lpqt->sz[_tcslen(lpqt->sz) - 5] = TEXT('\0'); _tcscpy(lpqt->szParamQuery, lpqt->sz); rc = SQLPrepare(hstmt, lpqt->sz, SQL_NTS); RETCHECK(SQL_SUCCESS, rc, szSQLPREPARE); rc = SQLExecute(hstmt); RETCHECK(SQL_NEED_DATA, rc, szSQLEXECUTE); udw = cTypes; for(i = 0; ; i++) { rc = SQLParamData(hstmt, (PTR *)&udw); if(rc != SQL_NEED_DATA) break; if(udw-BIND_PARM_OFFSET < cTypes) pch = qtMakeData(cTypes, i,&rgFields[udw-BIND_PARM_OFFSET], lpqt->szDataItem); else DISPLAYERROR(szSQLPARAMDATA, TEXT("invalid rgbValue")); if(*pch) { udw = _tcslen(pch); rc = SQLPutData(hstmt, pch, (SDWORD)_tcslen(pch)*sizeof(SQLCHAR)); RETCHECK(SQL_SUCCESS, rc, szSQLPUTDATA); } else { rc = SQLPutData(hstmt, (LPTSTR)IGNORED, SQL_NULL_DATA); RETCHECK(SQL_SUCCESS, rc, szSQLPUTDATA); } } RETCHECK(SQL_SUCCESS, rc, szSQLPARAMDATA); for(i = 0;; i++) { rc = SQLFetch(hstmt); if(rc != SQL_SUCCESS) break; } RETCHECK(SQL_NO_DATA_FOUND, rc, szSQLFETCH); /* should have gotten 1 row back */ if(i != 1) DISPLAYERROR(TEXT("Param/PutData"), TEXT("incorrect number of rows returned")); FreeStmt(SQL_CLOSE); FreeStmt(SQL_RESET_PARAMS); } //TestSearchedQuery() //----------------------------------------------------------------------- // Function: TestLargeQuery //----------------------------------------------------------------------- void TestLargeQuery(QTSTRUCT *lpqt,FIELDINFO *rgFields, UWORD cTypes,DSTRUCT *lpd) { RETCODE rc=SQL_SUCCESS; UWORD ind=0, i; LPTSTR pch=NULL; CHAR szQuery[2048]; /* > 1K query */ sprintf(szQuery,TEXT("select %s from %s where "), lpqt->szColNames, lpqt->szTableName); for(i = 0; i < cTypes; i++) { if (rgFields[i].fSearchable == SQL_SEARCHABLE || rgFields[i].fSearchable == SQL_ALL_EXCEPT_LIKE) break; } pch = qtMakeData(cTypes, 1, &rgFields[i], lpqt->szDataItem); while(_tcslen(szQuery) < 1024L) { int li=_tcslen(szQuery); switch(rgFields[i].wSQLType) { case SQL_REAL: case SQL_FLOAT: case SQL_DOUBLE: sprintf(&szQuery[_tcslen(szQuery)],TEXT("%s < %s + 1 and "), rgFields[i].szFieldName, pch); break; default: sprintf(&szQuery[_tcslen(szQuery)],TEXT("%s = %s%s%s and "), rgFields[i].szFieldName, rgFields[i].szPrefix, pch, rgFields[i].szSuffix); break; } } /* remove the final "and " */ szQuery[_tcslen(szQuery) - 5] = TEXT('\0'); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); if (RC_SUCCESSFUL(rc)) { for(i = 0;; i++) { rc = SQLFetch(hstmt); if(rc != SQL_SUCCESS) break; } RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); /* should have gotten at least 1 row back */ if(i < 1) DISPLAYERROR(TEXT("> 1K query"),TEXT("incorrect number of rows returned")); } /* SQLFreeStmt with SQL_CLOSE to re-use the hstmt */ FreeStmt(SQL_CLOSE); } //TestLargeQuery() //----------------------------------------------------------------------- // Function: TestSQLTables //----------------------------------------------------------------------- void TestSQLTables(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; BOOL fFoundTable=FALSE; UWORD i; /* this call may return many tables, as */ /* long as the one created earlier shows */ /* up it will pass. */ rc = SQLTables(hstmt, NULL, 0, NULL, 0,TEXT("q%"),SQL_NTS,TEXT("'TABLE'"), SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLTABLES); for(i = 0;; i++) { rc = SQLFetch(hstmt); if(rc != SQL_SUCCESS) break; /* column 3 is tablename */ rc = SQLGetData(hstmt, 3, SQL_C_CHAR, lpqt->sz, sizeof(lpqt->sz), NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA); /* should not overflow and return SQL_SUCCESS_WITH_INFO because the buffer is larger than the table name */ fFoundTable += 0 == _tcsicmp(lpqt->sz, lpqt->szTableName); } RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); if(1 != fFoundTable) { DISPLAYERROR(szSQLTABLES,TEXT("table not found")); } FreeStmt(SQL_CLOSE); } //TestSQLTables() //----------------------------------------------------------------------- // Function: TestSQLSpecialCols //----------------------------------------------------------------------- void TestSQLSpecialCols(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; UWORD i; rc = SQLSpecialColumns(hstmt, SQL_BEST_ROWID, NULL, 0, NULL, 0, lpqt->szTableName, (SWORD)(_tcslen(lpqt->szTableName)), SQL_SCOPE_TRANSACTION, SQL_NULLABLE); RETCHECK(SQL_SUCCESS, rc,szSQLSPECIALCOLUMNS); for(i = 0;; i++) { rc = SQLFetch(hstmt); if(rc != SQL_SUCCESS) break; } RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); FreeStmt(SQL_CLOSE); } //TestSQLSpecialCols() //----------------------------------------------------------------------- // Function: VerifyIndex //----------------------------------------------------------------------- void VerifyIndex(QTSTRUCT *lpqt,UWORD fIndex) { RETCODE rc=SQL_SUCCESS; BOOL fFoundTable=FALSE; UWORD i; SDWORD sdw; rc = SQLStatistics(hstmt, NULL, 0, NULL, 0, lpqt->szTableName, SQL_NTS, SQL_INDEX_ALL, SQL_ENSURE); RETCHECK(SQL_SUCCESS, rc,TEXT("SQLStatistics")); fFoundTable = 0; for(i = 0;; i++) { rc = SQLFetch(hstmt); if(rc != SQL_SUCCESS) break; rc = SQLGetData(hstmt, 3, SQL_C_CHAR, lpqt->sz, sizeof(lpqt->sz), &sdw); RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA); if (_tcsicmp(lpqt->sz, lpqt->szTableName) == 0) { rc = SQLGetData(hstmt, 6, SQL_C_CHAR, lpqt->sz, sizeof(lpqt->sz), &sdw); RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA); fFoundTable += 0 == _tcsicmp(lpqt->sz, lpqt->szDataItem); } } RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); if(1 != fFoundTable && fIndex) DISPLAYERROR(TEXT("SQLStatistics"),TEXT("index not returned")); /* one row represents original table, the */ /* other represents the index */ if(i > 2 || i < 1) DISPLAYERROR(TEXT("SQLStatistics"),TEXT("too many rows")); FreeStmt(SQL_CLOSE); } //VerifyIndex() //----------------------------------------------------------------------- // Function: TestSQLStatistics //----------------------------------------------------------------------- BOOL TestSQLStatistics(QTSTRUCT *lpqt,FIELDINFO *rgFields, UWORD cTypes,DSTRUCT *lpd,UWORD fIndex) { RETCODE rc=SQL_SUCCESS; UWORD i; _tcscpy(lpqt->szDataItem, lpqt->szTableName); lpqt->szDataItem[0] = TEXT('i'); for(i = 1; i < cTypes; i++) if(rgFields[i].wSQLType == SQL_INTEGER || rgFields[i].wSQLType == SQL_SMALLINT) break; if(i == cTypes) i = 0; _tcscpy(lpqt->buf, rgFields[i].szFieldName); sprintf(lpqt->sz,TEXT("create unique index %s on %s (%s)"), lpqt->szDataItem, lpqt->szTableName, lpqt->buf); rc = SQLExecDirect(hstmt, lpqt->sz, SQL_NTS); if(fIndex < 1) /* if this is minimal grammar, don't count on indexes being available */ fIndex = rc == SQL_SUCCESS; else RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); VerifyIndex(lpqt,fIndex); return(fIndex); } //TestSQLStatistics() //---------------------------------------------------------------------- // Function: TestLikeQuery //----------------------------------------------------------------------- void TestLikeQuery(QTSTRUCT *lpqt,FIELDINFO *rgFields, UWORD cTypes,DSTRUCT *lpd) { RETCODE rc=SQL_SUCCESS; UWORD i; SDWORD cbValue=0; for(i = 0; i < cTypes; i++) { if(rgFields[i].fSearchable == SQL_LIKE_ONLY || rgFields[i].fSearchable == SQL_SEARCHABLE) { _tcscpy(lpqt->buf, rgFields[i].szFieldName); break; } } if(i < cTypes) { /* execute a query using like. This query should return all records */ /* this query should return all rows in the table */ sprintf(lpqt->sz,TEXT("select * from %s where %s not like 'a'"), lpqt->szTableName, lpqt->buf, lpqt->buf); rc = SQLExecDirect(hstmt, lpqt->sz, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); for(i = 0;; i++) { rc = SQLFetch(hstmt); if(rc != SQL_SUCCESS) break; rc = SQLGetData(hstmt, 1, SQL_C_CHAR, lpqt->sz, sizeof(lpqt->sz), &cbValue); if(rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA); } RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); if(i != cTypes) DISPLAYERROR(TEXT("'LIKE' query"),TEXT("incorrect number of result rows")); } FreeStmt(SQL_CLOSE); } //TestLikeQuery() //----------------------------------------------------------------------- // Function: TestLikeQuery //----------------------------------------------------------------------- void TestOJCap(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; UDWORD udw; rc = SQLGetInfo(hdbc, (UWORD)SQL_OJ_CAPABILITIES, &udw, (SWORD)(sizeof(udw)), NULL); if(RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO)) { udw &= ~(SQL_OJ_LEFT | SQL_OJ_RIGHT | SQL_OJ_FULL | SQL_OJ_NESTED | SQL_OJ_NOT_ORDERED | SQL_OJ_INNER | SQL_OJ_ALL_COMPARISON_OPS); if(udw) { sprintf(lpqt->buf,TEXT("Undefined flags return from SQLGetInfo(...SQL_OJ_CAPABILITIES...) = %lX"), udw); DISPLAYERROR(szSQLGETINFO, lpqt->buf); } } rc = SQLGetInfo(hdbc, SQL_OUTER_JOINS, lpqt->buf, sizeof(lpqt->buf), NULL); if(RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO)){ *lpqt->buf = toupper(*lpqt->buf); if((!_tcsnccmp(lpqt->buf,TEXT("Y"), 1)) && (!_tcsnccmp(lpqt->buf,TEXT("N"), 1))) DISPLAYERROR(szSQLGETINFO,TEXT("Driver returned an invalid value for SQLGetInfo(...SQL_OUTER_JOINS...). The only valid values are \"Y\" and \"N\".")); } } //TestOJCap() /*----------------------------------------------------------------------- * Function: TestExtendedFetch *-----------------------------------------------------------------------*/ void TestExtendedFetch(QTSTRUCT *lpqt, FIELDINFO *rgFields, UWORD cTypes) { RETCODE rc=SQL_SUCCESS; WORD fLevel2 = FALSE; DWORD dwLen=0; SWORD fSqlType; SDWORD cbValue=0; UWORD iTableCol,row,iCol,uwRowSetSize; CHAR szQuery[MAX_STRING_SIZE], szColName[SMALLBUFF]; CHAR* rgbValue = NULL; DSTRUCT* rgData = NULL; DSTRUCT* pDataBuf; BOOL fCol0Bound=TRUE; uwRowSetSize=5; /* Cinco seems like a good rowset size */ /* Only col which might not be bound but might not be AutoUpdateable is col 0 */ if(!qtMakeData(0, 0, &rgFields[0], szQuery)) fCol0Bound = FALSE; SelectFromTable(lpqt); rc = SQLBindCol(hstmt, 1, SQL_C_BINARY, lpqt->sz, MAX_BIND_ARRAY_ELEMENT, &cbValue); RETCHECK(SQL_SUCCESS, rc,szSQLBINDCOL); if (!Supported(SQL_API_SQLEXTENDEDFETCH)) { rc = SQLExtendedFetch(hstmt, SQL_FETCH_FIRST, IGNORED, NULL, NULL); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(szSQLEXTENDEDFETCH, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLEXTENDEDFETCH); FreeStmt(SQL_CLOSE); return; } rc = SQLGetStmtOption(hstmt,SQL_CURSOR_TYPE,&dwLen); RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTOPTION); if(dwLen != SQL_CURSOR_FORWARD_ONLY) { rc = SQLExtendedFetch(hstmt, SQL_FETCH_FIRST, IGNORED, NULL, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLEXTENDEDFETCH); } else { rc = SQLExtendedFetch(hstmt, SQL_FETCH_FIRST, IGNORED, NULL, NULL); RETCHECK(SQL_ERROR, rc,szSQLEXTENDEDFETCH); } rc = SQLFreeStmt(hstmt, SQL_CLOSE); RETCHECK(SQL_SUCCESS, rc, szSQLFREESTMT); rc = SQLFreeStmt(hstmt, SQL_UNBIND); RETCHECK(SQL_SUCCESS, rc, szSQLFREESTMT); rc = SQLFreeStmt(hstmt, SQL_RESET_PARAMS); RETCHECK(SQL_SUCCESS, rc, szSQLFREESTMT); /* Allocate an area for ExtendedFetch to take place */ if (!(rgData = AllocateMemory(sizeof(DSTRUCT)*cTypes*uwRowSetSize))){ DISPLAYERROR(szSQLEXTENDEDFETCH,TEXT("Insufficient Memory Available")); return; } /* Allocate an area for test data */ if (!(rgbValue = AllocateMemory(MAX_STRING_SIZE*sizeof(CHAR)))){ DISPLAYERROR(szSQLEXTENDEDFETCH,TEXT("Insufficient Memory Available")); ReleaseMemory(rgData); return; } /* Get column for "order by" clause: */ sprintf(szQuery,TEXT("select %s from %s"),lpqt->szColNames, lpqt->szTableName); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); if((SQL_SUCCESS!=rc) && (SQL_SUCCESS_WITH_INFO!=rc)){ RETCHECK(SQL_SUCCESS_WITH_INFO, rc, szSQLEXECDIRECT); goto abortxfetch; } iCol=0; do { iCol++; rc=SQLDescribeCol(hstmt, iCol, szColName, SMALLBUFF, NULL, &fSqlType, NULL, NULL, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLDESCRIBECOL); } while(fSqlType!=SQL_CHAR && iCol<=cTypes); FreeStmt(SQL_CLOSE); if(iCol>cTypes){ DISPLAYERROR(szSQLEXTENDEDFETCH, TEXT("\t\t\tSelect-order by Failed")); goto abortxfetch; } /* Set rowset size and set to row-wise binding: */ rc = SQLSetStmtOption(hstmt, SQL_ROWSET_SIZE, (UDWORD)uwRowSetSize); if (SQL_SUCCESS != rc){ DISPLAYERROR(TEXT("ExtendedFetch...SQLSetStmtOption(Rowset_Size)"), TEXT("SQLSetStmtOption Failed")); GetErrors(henv, hdbc,hstmt); } rc = SQLSetStmtOption(hstmt, SQL_BIND_TYPE, (sizeof(DSTRUCT)*cTypes)); if (SQL_SUCCESS != rc){ DISPLAYERROR(TEXT("ExtendedFetch...SQLSetStmtOption(Bind_Type)"), TEXT("SQLSetStmtOption Failed")); GetErrors(henv, hdbc,hstmt); } if(SQL_SUCCESS != SelectFromTableFetch(lpqt, szColName)){ DISPLAYERROR(szSQLEXTENDEDFETCH, TEXT("\t\t\tSelect-order by Failed")); goto abortxfetch; } if (!BindFetchColumns(lpqt, rgFields, cTypes, rgData)){ DISPLAYERROR(szSQLEXTENDEDFETCH, szSQLBINDCOL); goto abortxfetch; } /* Fetch into allocated area rowset to be tested */ rc = SQLExtendedFetch(hstmt, SQL_FETCH_NEXT, 1, NULL, NULL); if (SQL_SUCCESS != rc){ RETCHECK(SQL_SUCCESS, rc,szSQLEXTENDEDFETCH); DISPLAYERROR(szSQLEXTENDEDFETCH, TEXT("Fetch Failed")); goto abortxfetch; } rc = SQLFreeStmt(hstmt, SQL_CLOSE); RETCHECK(SQL_SUCCESS, rc, szSQLFREESTMT); rc = SQLFreeStmt(hstmt, SQL_UNBIND); RETCHECK(SQL_SUCCESS, rc, szSQLFREESTMT); /* Set rowset size to "1" to test each row of rowset independently: */ rc = SQLSetStmtOption(hstmt, SQL_ROWSET_SIZE, (UDWORD)(1)); if (SQL_SUCCESS != rc){ DISPLAYERROR(TEXT("ExtendedFetch...SQLSetStmtOption(Rowset_Size)"), TEXT("SQLSetStmtOption Failed")); GetErrors(henv, hdbc,hstmt); } /* Check data in all rows of rowset */ if(SQL_SUCCESS != SelectFromTableFetch(lpqt, szColName)){ DISPLAYERROR(szSQLEXTENDEDFETCH, TEXT("\t\t\tSelect-order by Failed")); goto abortxfetch; } // Need to change this loop if number of rows in table < uwRowSetSize for (row=0; rowbuf, TEXT("Data Check Failed, Row %d, Table Col %d, DataType %d (%s)"), row, iTableCol, rgFields[iTableCol].wSQLType, rgFields[iTableCol].szFieldName) ; szWrite(lpqt->buf,FALSE); rgbValue[MAX_STRING_SIZE-1]=TEXT('\0'); sprintf(lpqt->buf, TEXT("Returned Data: (%s)"), rgbValue); DISPLAYERROR(TEXT("ExtendedFetch"),lpqt->buf); // goto abortxfetch; } } } abortxfetch: FreeStmt(SQL_CLOSE); FreeStmt(SQL_UNBIND); if ( rgData ) ReleaseMemory(rgData); if ( rgbValue ) ReleaseMemory(rgbValue); } /* TestExtendedFetch() */ /*------------------------------------------------------------------------------ * Function: TestQuickRebind Feature * Purpose: To test this specific feature, not the function(s) using it. * Synopsis: * An area large enough for 12 rows of QRDSTRUCTs will be created. There will * be two rows of the result set per Rowset. Rowset 1 should be duplicated * in rows 0,1 and 3,4, while Rowset 2 should be duplicated in rows 6,7 and 9,10. * Thus, rows 0 and 3 will contain the first row of the result set, rows 1 and * 4 will contain the second row of the result set, etc. Rows 2, 5, 8, and * 11 should have their preset condition of all zeroes remain unchanged. * ----------------------------------------------------------------------------*/ void TestQuickRebind(QTSTRUCT * lpqt, FIELDINFO *rgFields, UWORD cTypes, DSTRUCT *lpd) { RETCODE rc; UWORD row,iCol,iRowset,uwRowsetSize,iRowsetRow,iTableCol; UDWORD udwRowSize; SWORD fSqlType; SDWORD sdwOffset; DSTRUCT *rgData, *pZeroRow; DSTRUCT *pCurrentRowData; CHAR szQuery[MAX_STRING_SIZE], szColName[SMALLBUFF]; SDWORD cbValue; CHAR* rgbValue=NULL; BOOL fCol0Bound=TRUE; udwRowSize = sizeof(DSTRUCT)*cTypes; /* cNumResSetCols is set in BuildInsertStmt() */ uwRowsetSize = 5;/* uwRowsetSize rows per Rowset */ /* Only col which might not be bound but might not be AutoUpdateable is col 0 */ if(!qtMakeData(0, 0, &rgFields[0], szQuery)) fCol0Bound = FALSE; /* Allocate an area for QuickRebind to take place */ if (!(rgData = AllocateMemory(NUM_QUIKREBIND_ROWSETS*(uwRowsetSize+1)*udwRowSize) )){ DISPLAYERROR(szQUICKREBIND,TEXT("\t\t\tInsufficient Memory Available")); return; } /* Allocate an area for a row of zeroes to place between each Rowset. */ if (!(pZeroRow = AllocateMemory(udwRowSize) )){ DISPLAYERROR(szQUICKREBIND,TEXT("\t\t\tInsufficient Memory Available")); goto abortQuikRebind; } /* Allocate an area for test data */ if (!(rgbValue = AllocateMemory(MAX_STRING_SIZE * sizeof(SQLCHAR)))){ DISPLAYERROR(szSQLEXTENDEDFETCH,TEXT("Insufficient Memory Available")); goto abortQuikRebind; } ResetHstmt(&hstmt); /* Get column for "order by" clause: */ sprintf(szQuery,TEXT("select %s from %s"),lpqt->szColNames, lpqt->szTableName); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); if((SQL_SUCCESS!=rc) && (SQL_SUCCESS_WITH_INFO!=rc)){ RETCHECK(SQL_SUCCESS_WITH_INFO, rc, szSQLEXECDIRECT); goto abortQuikRebind; } iCol=0; do { iCol++; rc=SQLDescribeCol(hstmt, iCol, szColName, SMALLBUFF, NULL, &fSqlType, NULL, NULL, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLDESCRIBECOL); } while(fSqlType!=SQL_CHAR && iCol<=cTypes); FreeStmt(SQL_CLOSE); if(iCol>=cTypes){ DISPLAYERROR(szQUICKREBIND, TEXT("\t\t\tSelect-order by Failed")); goto abortQuikRebind; } /* Set to row-wise binding and set Rowset size to uwRowsetSize: */ rc = SQLSetStmtAttr(hstmt,SQL_ATTR_ROW_BIND_TYPE,(PTR)udwRowSize,SQL_IS_INTEGER); if (SQL_SUCCESS != rc){ _tcscpy(lpqt->buf,TEXT("\t\t\tQuick Rebind FAILED...SQLSetDescField(Bind_Type)")); szWrite(lpqt->buf, TRUE); goto abortQuikRebind; } rc = SQLSetStmtAttr(hstmt,SQL_ATTR_ROW_ARRAY_SIZE,(PTR)uwRowsetSize,SQL_IS_INTEGER); if (SQL_SUCCESS != rc){ DISPLAYERROR(szQUICKREBIND,TEXT("\t\t\tSetStmtAttr(Rowset Size)")); goto abortQuikRebind; } /* Define area storing Quikrebind offset value: */ rc = SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_BIND_OFFSET_PTR, &sdwOffset, SQL_IS_POINTER); if (SQL_SUCCESS != rc){ if(FindError(SQL_HANDLE_STMT,szHYC00)){ _tcscpy(lpqt->buf,TEXT("\t\t\tQuickRebind Not Supported")); szWrite(lpqt->buf, TRUE); goto abortQuikRebind; } _tcscpy(lpqt->buf,TEXT("\t\t\tQuick Rebind FAILED...QuickRebind Not Functional")); szWrite(lpqt->buf, TRUE); goto abortQuikRebind; } if(SQL_SUCCESS != SelectFromTableFetch(lpqt, szColName)){ DISPLAYERROR(szQUICKREBIND, TEXT("\t\t\tSelect-order by Failed")); goto abortQuikRebind; } if (!BindFetchColumns(lpqt, rgFields, cTypes, rgData)){ DISPLAYERROR(szQUICKREBIND,szSQLBINDCOL); goto abortQuikRebind; } /* Test quick rebind feature with two pairs of Rowsets, all * * rowsets separated by a row of zeroes: */ for (iRowset=0; iRowset<=1; iRowset++) { if(iRowset) if(SQL_SUCCESS != SelectFromTableFetch(lpqt, szColName)){ DISPLAYERROR(szQUICKREBIND, TEXT("\t\t\tSelect-order by Failed")); goto abortQuikRebind; } /* Set offset value (to 0 or 1 * uwRowsetSize * udwRowSize) for 1st rowset */ sdwOffset = iRowset*((1+uwRowsetSize)*udwRowSize); /* Fetch rowset into desired area */ rc = SQLFetchScroll(hstmt, SQL_FETCH_NEXT, 1); if (SQL_SUCCESS != rc){ ERRSHANDLE(SQL_HANDLE_STMT, hstmt, SQL_SUCCESS, rc, szSQLFETCHSCROLL); DISPLAYERROR(szQUICKREBIND,TEXT("Fetch Failed")); goto abortQuikRebind; } /* Set offset value (to 2 or 3 * uwRowsetSize * udwRowSize) for 2nd rowset */ sdwOffset = (iRowset+2)*(1+uwRowsetSize)*udwRowSize; rc = SQLFetchScroll(hstmt, SQL_FETCH_NEXT, 1); if (SQL_SUCCESS != rc){ ERRSHANDLE(SQL_HANDLE_STMT, hstmt, SQL_SUCCESS, rc, szSQLFETCHSCROLL); DISPLAYERROR(szQUICKREBIND,TEXT("Fetch Failed")); goto abortQuikRebind; } FreeStmt(SQL_CLOSE); } rc = SQLFreeStmt(hstmt, SQL_UNBIND); RETCHECK(SQL_SUCCESS, rc, szSQLFREESTMT); rc = SQLSetStmtAttr(hstmt,SQL_ATTR_ROW_ARRAY_SIZE,(PTR)1,SQL_IS_INTEGER); if (SQL_SUCCESS != rc){ DISPLAYERROR(szQUICKREBIND,TEXT("\t\t\tSetStmtAttr(Rowset Size)")); goto abortQuikRebind; } /* Check stored values: */ for (iRowset=0; iRowset<=1; iRowset++) { if(SQL_SUCCESS != SelectFromTableFetch(lpqt, szColName)){ DISPLAYERROR(szQUICKREBIND, TEXT("\t\t\tSelect-order by Failed")); goto abortQuikRebind; } /* First Rowset starts either in Allocated Row 0 or 3 */ iRowsetRow= iRowset*(1+uwRowsetSize); //for (row=0; rowbuf, TEXT("Data Check Failed, Row %d, Table Col %d, DataType %d (%s)"), row, iTableCol, rgFields[iTableCol].wSQLType, rgFields[iTableCol].szFieldName) ; szWrite(lpqt->buf,FALSE); rgbValue[MAX_STRING_SIZE-1]=TEXT('\0'); sprintf(lpqt->buf, TEXT("Returned Data: (%s)"), rgbValue); DISPLAYERROR(szQUICKREBIND,lpqt->buf); goto abortQuikRebind; } }/* end for(iTableCol) */ } /* end for(row) */ FreeStmt(SQL_CLOSE); } /* end for (iRowset) */ /* Check Unused memory areas: */ for (iRowsetRow=uwRowsetSize; iRowsetRowszTableName, SQL_NTS, NULL, 0, NULL, 0, NULL, 0); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(szSQLFOREIGNKEYS, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLFOREIGNKEYS); } else { rc = SQLForeignKeys(hstmt, NULL, 0, NULL, 0, lpqt->szTableName, SQL_NTS, NULL, 0, NULL, 0, NULL, 0); RETCHECK(SQL_SUCCESS, rc,szSQLFOREIGNKEYS); while(rc == SQL_SUCCESS) rc = SQLFetch(hstmt); RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); FreeStmt(SQL_CLOSE); } } //TestSQLForeignKeys() //----------------------------------------------------------------------- // Function: TestSQLBrowseConnect //----------------------------------------------------------------------- void TestSQLBrowseConnect(lpSERVERINFO lpSI) { RETCODE rc=SQL_SUCCESS; UWORD cMaxConnections=0; CHAR szBCString[40]; CHAR szDSN[40]; HDBC hdbcb=NULL; SQLINTEGER sdwCP; AllocHdbc(&hdbcb); rc = SQLGetInfo(hdbc, SQL_ACTIVE_CONNECTIONS, &cMaxConnections, sizeof(int), NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO); rc = SQLGetEnvAttr(henv, SQL_ATTR_CONNECTION_POOLING, &sdwCP, SQL_IS_INTEGER, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETENVATTR); if ( SQL_CP_OFF != sdwCP) { DISPLAYERROR(szSQLBROWSECONNECT, szBrowseNotSupported); return; } if(cMaxConnections != 1) { _tcscpy(szBCString,TEXT("DSN=")); _tcscat(szBCString, lpSI->szValidServer0); if(lpSI->szValidServer0[0] == 0) { rc = SQLGetInfo(hdbc, SQL_DATA_SOURCE_NAME, szDSN, sizeof(szDSN), NULL); _tcscat(szBCString, szDSN); } if(!Supported(SQL_API_SQLBROWSECONNECT)) { HDBC thdbc=NULL; rc = SQLBrowseConnect(hdbcb, szBCString, SQL_NTS, NULL, 0, NULL); thdbc = hdbc; hdbc = hdbcb; if(!FindError(SQL_HANDLE_DBC,szIM001)) DISPLAYERROR(szSQLBROWSECONNECT, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLBROWSECONNECT); hdbc = thdbc; rc = SQLFreeConnect(hdbcb); RETCHECK(SQL_SUCCESS, rc,szSQLFREECONNECT); } else { rc = SQLBrowseConnect(hdbcb, szBCString, SQL_NTS, NULL, 0, NULL); RETCHECK(SQL_NEED_DATA, rc,szSQLBROWSECONNECT); rc = SQLDisconnect(hdbcb); RETCHECK(SQL_SUCCESS, rc,szSQLDISCONNECT); rc = SQLFreeConnect(hdbcb); RETCHECK(SQL_SUCCESS, rc,szSQLFREECONNECT); } } } //TestSQLBrowseConnect() //----------------------------------------------------------------------- // Function: TestSQLDataSources //----------------------------------------------------------------------- void TestSQLDataSources() { RETCODE rc=SQL_SUCCESS; if (!Supported( SQL_API_SQLDATASOURCES)) { rc = SQLDataSources(henv, SQL_FETCH_FIRST, NULL, 0, NULL, NULL, 0, NULL); if(!FindError(SQL_HANDLE_ENV,szIM001)) DISPLAYERROR(TEXT("SQLDataSources"), szNotSupported); RETCHECK(SQL_ERROR, rc,TEXT("SQLDataSources")); } else { rc = SQLDataSources(henv, SQL_FETCH_FIRST, NULL, 0, NULL, NULL, 0, NULL); RETCHECK(SQL_SUCCESS, rc,TEXT("SQLDataSources")); } } //TestSQLDataSources() //----------------------------------------------------------------------- // Function: TestSQLDataSources //----------------------------------------------------------------------- void TestSQLDrivers() { RETCODE rc=SQL_SUCCESS; if(!Supported( SQL_API_SQLDRIVERS)) { rc = SQLDrivers(henv, SQL_FETCH_FIRST, NULL, 0, NULL, NULL, 0, NULL); if(!FindError(SQL_HANDLE_ENV,szIM001)) DISPLAYERROR(TEXT("SQLDrivers"), szNotSupported); RETCHECK(SQL_ERROR, rc,TEXT("SQLDataSources")); } else { rc = SQLDrivers(henv, SQL_FETCH_FIRST, NULL, 0, NULL, NULL, 0, NULL); if(rc != SQL_SUCCESS) RETCHECK(SQL_SUCCESS_WITH_INFO, rc,TEXT("SQLDrivers")); } } //TestSQLDrivers() //----------------------------------------------------------------------- // Function: TestSQLMoreResults //----------------------------------------------------------------------- void TestSQLMoreResults(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; if(!Supported( SQL_API_SQLMORERESULTS)) { SelectFromTable(lpqt); rc = SQLMoreResults(hstmt); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(TEXT("SQLMoreResults"), szNotSupported); RETCHECK(SQL_ERROR, rc,TEXT("SQLMoreResults")); } else { SelectFromTable(lpqt); rc = SQLMoreResults(hstmt); RETCHECK(SQL_NO_DATA_FOUND, rc,TEXT("SQLMoreResults")); } FreeStmt(SQL_CLOSE); } //TestSQLMoreResults() //----------------------------------------------------------------------- // Function: TestSQLMoreResults //----------------------------------------------------------------------- void TestSQLNativeSQL(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; CHAR szQuery[XLARGEBUFF]; sprintf(szQuery,TEXT("select * from %s were 0 > 1"),lpqt->szTableName); if(!Supported( SQL_API_SQLNATIVESQL)) { rc = SQLNativeSql(hdbc, szQuery, SQL_NTS, NULL, 0, NULL); if(!FindError(SQL_HANDLE_DBC,szIM001)) DISPLAYERROR(TEXT("SQLNativeSql"), szNotSupported); RETCHECK(SQL_ERROR, rc,TEXT("SQLNativeSql")); } else { rc = SQLNativeSql(hdbc, szQuery, SQL_NTS, NULL, 0, NULL); RETCHECK(SQL_SUCCESS, rc,TEXT("SQLNativeSql")); } FreeStmt(SQL_CLOSE); } //TestSQLNativeSQL() //----------------------------------------------------------------------- // Function: TestSQLDescribeParam //----------------------------------------------------------------------- void TestSQLDescribeParam(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; rc = SQLPrepare(hstmt, lpqt->szParamQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLPREPARE); if(!Supported( SQL_API_SQLDESCRIBEPARAM)) { rc = SQLPrepare(hstmt, lpqt->szParamQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLPREPARE); rc = SQLDescribeParam(hstmt, 1, NULL, NULL, NULL, NULL); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(szSQLDESCRIBEPARAM, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLDESCRIBEPARAM); } else { rc = SQLPrepare(hstmt, lpqt->szParamQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLPREPARE); rc = SQLDescribeParam(hstmt, 1, NULL, NULL, NULL, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLDESCRIBEPARAM); } FreeStmt(SQL_CLOSE); } //TestSQLDescribeParam() //----------------------------------------------------------------------- // Function: TestSQLNumParams //----------------------------------------------------------------------- void TestSQLNumParams(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; rc = SQLPrepare(hstmt, lpqt->szParamQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLPREPARE); if(!Supported( SQL_API_SQLNUMPARAMS)) { rc = SQLNumParams(hstmt, NULL); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(szSQLNUMPARAMS, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLNUMPARAMS); } else { rc = SQLNumParams(hstmt, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLNUMPARAMS); } FreeStmt(SQL_CLOSE); } //TestSQLNumParams() //----------------------------------------------------------------------- // Function: TestSQLParamOptions //----------------------------------------------------------------------- void TestSQLParamOptions(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; rc = SQLPrepare(hstmt, lpqt->szParamQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLPREPARE); if(!Supported( SQL_API_SQLPARAMOPTIONS)) { rc = SQLParamOptions(hstmt, 1, NULL); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(szSQLPARAMOPTIONS, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLPARAMOPTIONS); } else { rc = SQLParamOptions(hstmt, 1, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLPARAMOPTIONS); } FreeStmt(SQL_CLOSE); } //TestSQLParamOptions() //----------------------------------------------------------------------- // Function: TestSQLPrimaryKeys //----------------------------------------------------------------------- void TestSQLPrimaryKeys(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; if (!Supported( SQL_API_SQLPRIMARYKEYS)) { rc = SQLPrimaryKeys(hstmt, NULL, 0, NULL, 0, lpqt->szTableName, SQL_NTS); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(szSQLPRIMARYKEYS, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLPRIMARYKEYS); } else { rc = SQLPrimaryKeys(hstmt, NULL, 0, NULL, 0, lpqt->szTableName, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLPRIMARYKEYS); while(rc == SQL_SUCCESS) rc = SQLFetch(hstmt); RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); FreeStmt(SQL_CLOSE); } } //TestSQLPrimaryKeys() //----------------------------------------------------------------------- // Function: TestSQLProcedureColumns //----------------------------------------------------------------------- void TestSQLProcedureColumns(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; if(!Supported( SQL_API_SQLPROCEDURECOLUMNS)) { rc = SQLProcedureColumns(hstmt, NULL, 0, NULL, 0, NULL, 0, NULL, 0); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(TEXT("SQLProcedureColumns"), szNotSupported); RETCHECK(SQL_ERROR, rc,TEXT("SQLProcedureColumns")); } else { rc = SQLProcedureColumns(hstmt, NULL, 0, NULL, 0, NULL, 0, NULL, 0); RETCHECK(SQL_SUCCESS, rc,TEXT("SQLProcedureColumns")); while(rc == SQL_SUCCESS) rc = SQLFetch(hstmt); RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); FreeStmt(SQL_CLOSE); } } //TestSQLProcedureColumns() //----------------------------------------------------------------------- // Function: TestSQLProcedures //----------------------------------------------------------------------- void TestSQLProcedures() { RETCODE rc=SQL_SUCCESS; if(!Supported( SQL_API_SQLPROCEDURES)) { rc = SQLProcedures(hstmt, NULL, 0, NULL, 0, NULL, 0); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(TEXT("SQLProcedures"), szNotSupported); RETCHECK(SQL_ERROR, rc,TEXT("SQLProcedures")); } else { rc = SQLProcedures(hstmt, NULL, 0, NULL, 0, NULL, 0); RETCHECK(SQL_SUCCESS, rc,TEXT("SQLProcedures")); while(rc == SQL_SUCCESS) rc = SQLFetch(hstmt); RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); FreeStmt(SQL_CLOSE); } } //TestSQLProcedures() //----------------------------------------------------------------------- // Function: TestSQLTablePrivileges //----------------------------------------------------------------------- void TestSQLTablePrivileges() { RETCODE rc=SQL_SUCCESS; if(!Supported( SQL_API_SQLTABLEPRIVILEGES)) { rc = SQLTablePrivileges(hstmt, NULL, 0, NULL, 0, NULL, 0); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(TEXT("SQLTablePrivileges"), szNotSupported); RETCHECK(SQL_ERROR, rc,TEXT("SQLTablePrivileges")); } else { rc = SQLTablePrivileges(hstmt, NULL, 0, NULL, 0, NULL, 0); RETCHECK(SQL_SUCCESS, rc,TEXT("SQLTablePrivileges")); while(rc == SQL_SUCCESS) rc = SQLFetch(hstmt); RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); FreeStmt(SQL_CLOSE); } } //TestSQLTablePrivileges() //----------------------------------------------------------------------- // Function: TestSQLColumnPrivileges //----------------------------------------------------------------------- void TestSQLColumnPrivileges(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; if(!Supported( SQL_API_SQLCOLUMNPRIVILEGES)) { rc = SQLColumnPrivileges(hstmt, NULL, 0, NULL, 0, lpqt->szTableName, SQL_NTS, NULL, 0); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(TEXT("SQLColummPrivileges"), szNotSupported); RETCHECK(SQL_ERROR, rc,TEXT("SQLColumnPrivileges")); } else { rc = SQLColumnPrivileges(hstmt, NULL, 0, NULL, 0, lpqt->szTableName, SQL_NTS, NULL, 0); RETCHECK(SQL_SUCCESS, rc,TEXT("SQLColumnPrivileges")); while(rc == SQL_SUCCESS) rc = SQLFetch(hstmt); RETCHECK(SQL_NO_DATA_FOUND, rc,szSQLFETCH); FreeStmt(SQL_CLOSE); } } // TestSQLColumnPrivileges() //----------------------------------------------------------------------- // Function: TestSQLSetScrollOptions //----------------------------------------------------------------------- void TestSQLSetScrollOptions() { RETCODE rc=SQL_SUCCESS; UWORD i, j; UDWORD fSupportedOpt; UDWORD fSupportedCon; CHAR szState[100]=TEXT(""), szErrMsg[XLARGEBUFF]=TEXT(""); FreeStmt(SQL_CLOSE); if(!Supported( SQL_API_SQLSETSCROLLOPTIONS)) { rc = SQLSetScrollOptions(hstmt, SQL_CONCUR_READ_ONLY, SQL_SCROLL_FORWARD_ONLY, 1); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(szSQLSETSCROLLOPTIONS, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLSETSCROLLOPTIONS); } else { rc = SQLGetInfo(hdbc, SQL_SCROLL_CONCURRENCY, &fSupportedCon, 4, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO); rc = SQLGetInfo(hdbc, SQL_SCROLL_OPTIONS, &fSupportedOpt, 4, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO); for(i = 0; i < sizeof(OptionList) / sizeof(SUPPORTOPTINFO); i ++) { for(j = 0; j < sizeof(ConcurList) / sizeof(SUPPORTCONCURINFO); j++) { if(fSupportedOpt & OptionList[i].Support && fSupportedCon & ConcurList[j].Support) { if(!((ConcurList[j].Option == SQL_CONCUR_VALUES) && ((lpSI->vCursorLib == SQL_CUR_USE_IF_NEEDED) || (lpSI->vCursorLib == SQL_CUR_USE_ODBC)))) { rc = SQLSetScrollOptions(hstmt, ConcurList[j].Option,OptionList[i].Option, 1); RETCHECK(SQL_SUCCESS, rc,szSQLSETSCROLLOPTIONS); } } } } } FreeStmt(SQL_CLOSE); } //TestSQLSetScrollOptions() //----------------------------------------------------------------------------- // Function: TestConnectAttr //----------------------------------------------------------------------------- VOID TestConnectAttr(HDBC hdbc,SDWORD fAttribute, UDWORD rgbValue,LPTSTR lpAttr,BOOL fReadOnlyAttr) { RETCODE rc=SQL_SUCCESS; CHAR szBuff[LARGEBUFF]=TEXT(""); UDWORD pvParam=0; RETCODE rcExp=fReadOnlyAttr ? SQL_ERROR : SQL_SUCCESS; rc = SQLSetConnectAttr(hdbc,fAttribute,(PTR)rgbValue,sizeof(rgbValue)); if(!FindError(SQL_HANDLE_DBC,szHYC00)) { RETCHECK(rcExp,rc,szSQLSETCONNECTATTR); rc = SQLGetConnectAttr(hdbc,fAttribute,&pvParam,sizeof(pvParam),NULL); if(!FindError(SQL_HANDLE_DBC,szHYC00)) { RETCHECK(SQL_SUCCESS,rc,szSQLGETCONNECTATTR); if(!fReadOnlyAttr && (pvParam != rgbValue)) { sprintf(szBuff,TEXT("%s returned incorrect value"),lpAttr); DISPLAYERROR(szSQLGETCONNECTATTR,szBuff); } } else RETCHECK(SQL_ERROR,rc,szSQLGETCONNECTATTR); } else RETCHECK(SQL_ERROR,rc,szSQLSETCONNECTATTR); } //TestConnectAttr() //----------------------------------------------------------------------------- // Function: TestSQLSetConnectAttr // This function tests both SQLSetConnectAttr and SQLGetConnectAttr //----------------------------------------------------------------------------- void TestSQLSetConnectAttr() { RETCODE rc = SQL_SUCCESS; UDWORD pvParam; UWORD rgbValue; BOOL fSupportSetConnectAttr = TRUE; BOOL fSupportGetConnectAttr = TRUE; //make sure these APIs are supported before testing if(!Supported(SQL_API_SQLSETCONNECTATTR)) { rgbValue = SQL_MODE_READ_WRITE; fSupportSetConnectAttr = FALSE; rc = SQLSetConnectAttr(hdbc,SQL_ACCESS_MODE,&rgbValue,sizeof(rgbValue)); if(!FindError(SQL_HANDLE_DBC,szIM001)) DISPLAYERROR(szSQLSETCONNECTATTR,TEXT("did not return Not supported message")); RETCHECK(SQL_ERROR,rc,szSQLSETCONNECTATTR); } if(!Supported(SQL_API_SQLGETCONNECTATTR)) { fSupportGetConnectAttr = FALSE; rc = SQLGetConnectAttr(hdbc,SQL_ACCESS_MODE,&pvParam,sizeof(pvParam),NULL); if(!FindError(SQL_HANDLE_DBC,szIM001)) DISPLAYERROR(szSQLGETCONNECTATTR,TEXT("did not return Not supported message")); RETCHECK(SQL_ERROR,rc,szSQLGETCONNECTATTR); } if(fSupportSetConnectAttr && (!fSupportGetConnectAttr)) { //test SQL_ACCESS_MODE rgbValue = SQL_MODE_READ_WRITE; rc = SQLSetConnectAttr(hdbc,SQL_ACCESS_MODE,&rgbValue,sizeof(rgbValue)); if(!FindError(SQL_HANDLE_DBC,szHYC00)) RETCHECK(SQL_SUCCESS,rc,szSQLSETCONNECTATTR); else RETCHECK(SQL_ERROR,rc,szSQLSETCONNECTATTR); //test SQL_AUTOCOMMIT rgbValue = SQL_AUTOCOMMIT_ON; rc = SQLSetConnectAttr(hdbc,SQL_AUTOCOMMIT,&rgbValue,sizeof(rgbValue)); if(!FindError(SQL_HANDLE_DBC,szHYC00)) RETCHECK(SQL_SUCCESS,rc,szSQLSETCONNECTATTR); else RETCHECK(SQL_ERROR,rc,szSQLSETCONNECTATTR); //test SQL_LOGIN_TIMEOUT //the choice of 15 seconds for timeout is arbitrary rgbValue = 15; rc = SQLSetConnectAttr(hdbc,SQL_LOGIN_TIMEOUT,&rgbValue,sizeof(rgbValue)); if(!FindError(SQL_HANDLE_DBC,szHYC00)) RETCHECK(SQL_SUCCESS,rc,szSQLSETCONNECTATTR); else RETCHECK(SQL_ERROR,rc,szSQLSETCONNECTATTR); } if((!fSupportSetConnectAttr) && fSupportGetConnectAttr) { //test SQL_ACCESS_MODE rc = SQLGetConnectAttr(hdbc,SQL_ACCESS_MODE,&pvParam,sizeof(pvParam),NULL); if(!FindError(SQL_HANDLE_DBC,szHYC00)) RETCHECK(SQL_SUCCESS,rc,szSQLGETCONNECTATTR); else RETCHECK(SQL_ERROR,rc,szSQLGETCONNECTATTR); //test SQL_AUTOCOMMIT rc = SQLGetConnectAttr(hdbc,SQL_AUTOCOMMIT,&pvParam,sizeof(pvParam),NULL); if(!FindError(SQL_HANDLE_DBC,szHYC00)) RETCHECK(SQL_SUCCESS,rc,szSQLGETCONNECTATTR); else RETCHECK(SQL_ERROR,rc,szSQLGETCONNECTATTR); //test SQL_LOGIN_TIMEOUT rc = SQLGetConnectAttr(hdbc,SQL_LOGIN_TIMEOUT,&pvParam,sizeof(pvParam),NULL); if(!FindError(SQL_HANDLE_DBC,szHYC00)) RETCHECK(SQL_SUCCESS,rc,szSQLGETCONNECTATTR); else RETCHECK(SQL_ERROR,rc,szSQLGETCONNECTATTR); //SQL_ATTR_AUTO_IPD is a read-only attribute rc = SQLGetConnectAttr(hdbc,SQL_ATTR_AUTO_IPD,&pvParam,sizeof(pvParam),NULL); if(!FindError(SQL_HANDLE_DBC,szHYC00)) RETCHECK(SQL_SUCCESS,rc,szSQLGETCONNECTATTR); else RETCHECK(SQL_ERROR,rc,szSQLGETCONNECTATTR); } if(fSupportSetConnectAttr && fSupportGetConnectAttr) { //test SQL_ACCESS_MODE TestConnectAttr(hdbc,SQL_ACCESS_MODE,SQL_MODE_READ_WRITE,TEXT("SQL_ACCESS_MODE"),FALSE); //test SQL_AUTOCOMMIT TestConnectAttr(hdbc,SQL_AUTOCOMMIT,SQL_AUTOCOMMIT_ON,TEXT("SQL_AUTOCOMMIT"),FALSE); //test SQL_LOGIN_TIMEOUT //the choice of 15 seconds for timeout is arbitrary TestConnectAttr(hdbc,SQL_LOGIN_TIMEOUT,15,TEXT("SQL_LOGIN_TIMEOUT"),FALSE); //SQL_ATTR_AUTO_IPD is a read-only attribute TestConnectAttr(hdbc,SQL_ATTR_AUTO_IPD,15,TEXT("SQL_ATTR_AUTO_IPD"),TRUE); } } //TestSQLSetConnectAttr() //----------------------------------------------------------------------------- // Function: TestSQLSetStmtAttr // This function tests both SQLSetStmtAttr and SQLGetStmtAttr //----------------------------------------------------------------------------- void TestSQLSetStmtAttr() { RETCODE rc = SQL_SUCCESS, rc2= SQL_SUCCESS; UDWORD pvParam; UWORD rgbValue; BOOL fSupportSetStmtAttr = TRUE; BOOL fSupportGetStmtAttr = TRUE; //make sure these APIs are supported before testing if(!Supported(SQL_API_SQLSETSTMTATTR)) { //the choice of 300 for SQL_MAX_LENGTH is arbitrary rgbValue = 300; fSupportSetStmtAttr = FALSE; rc = SQLSetStmtAttr(hstmt,SQL_MAX_LENGTH,&rgbValue,sizeof(rgbValue)); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(szSQLSETSTMTATTR,TEXT("did not return Not supported message")); RETCHECK(SQL_ERROR,rc,szSQLSETSTMTATTR); } if(!Supported(SQL_API_SQLGETSTMTATTR)) { fSupportGetStmtAttr = FALSE; rc = SQLGetStmtAttr(hstmt,SQL_MAX_LENGTH,&pvParam,sizeof(pvParam),NULL); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(szSQLGETSTMTATTR,TEXT("did not return Not supported message")); RETCHECK(SQL_ERROR,rc,szSQLGETSTMTATTR); } if(fSupportSetStmtAttr && (!fSupportGetStmtAttr)) { //test SQL_MAX_LENGTH rgbValue = 300; rc = SQLSetStmtAttr(hstmt,SQL_MAX_LENGTH,&rgbValue,sizeof(rgbValue)); if(!FindError(SQL_HANDLE_STMT,szHYC00)) RETCHECK(SQL_SUCCESS,rc,szSQLSETSTMTATTR); else RETCHECK(SQL_ERROR,rc,szSQLSETSTMTATTR); //test SQL_ATTR_METADATA_ID -- new in 3.0 rgbValue = SQL_FALSE; rc = SQLSetStmtAttr(hstmt,SQL_ATTR_METADATA_ID,&rgbValue,sizeof(rgbValue)); if(!FindError(SQL_HANDLE_STMT,szHYC00)) RETCHECK(SQL_SUCCESS,rc,szSQLSETSTMTATTR); else RETCHECK(SQL_ERROR,rc,szSQLSETSTMTATTR); } if((!fSupportSetStmtAttr) && fSupportGetStmtAttr) { //test SQL_MAX_LENGTH rc = SQLGetStmtAttr(hstmt,SQL_MAX_LENGTH,&pvParam,sizeof(pvParam),NULL); if(!FindError(SQL_HANDLE_STMT,szHYC00)) RETCHECK(SQL_SUCCESS,rc,szSQLGETSTMTATTR); else RETCHECK(SQL_ERROR,rc,szSQLGETSTMTATTR); //test SQL_ATTR_METADATA_ID -- new in 3.0 rc = SQLGetStmtAttr(hstmt,SQL_ATTR_METADATA_ID,&pvParam,sizeof(pvParam),NULL); if(!FindError(SQL_HANDLE_STMT,szHYC00)) RETCHECK(SQL_SUCCESS,rc,szSQLGETSTMTATTR); else RETCHECK(SQL_ERROR,rc,szSQLGETSTMTATTR); } if(fSupportSetStmtAttr && fSupportGetStmtAttr) { //test SQL_MAX_LENGTH rgbValue = 300; rc = SQLSetStmtAttr(hstmt,SQL_MAX_LENGTH,(PTR)rgbValue,sizeof(rgbValue)); if(!FindError(SQL_HANDLE_STMT,szHYC00)) { RETCHECK(SQL_SUCCESS,rc,szSQLSETSTMTATTR); rc = SQLGetStmtAttr(hstmt,SQL_MAX_LENGTH,&pvParam,sizeof(pvParam),NULL); if(!FindError(SQL_HANDLE_STMT,szHYC00)) { RETCHECK(SQL_SUCCESS,rc,szSQLGETSTMTATTR); if(pvParam != 300) DISPLAYERROR(szSQLGETSTMTATTR,TEXT("SQL_MAX_LENGTH returned incorrect value")); } else RETCHECK(SQL_ERROR,rc,szSQLGETSTMTATTR); } else RETCHECK(SQL_ERROR,rc,szSQLSETSTMTATTR); //test SQL_ATTR_METADATA_ID -- new in 3.0 rgbValue = SQL_FALSE; rc = SQLSetStmtAttr(hstmt,SQL_ATTR_METADATA_ID,(PTR)rgbValue,sizeof(rgbValue)); if (!FindError(SQL_HANDLE_STMT,szHYC00) && !FindError(SQL_HANDLE_STMT,szHY092)) RETCHECK(SQL_SUCCESS,rc,szSQLSETSTMTATTR); rc2 = SQLGetStmtAttr(hstmt,SQL_ATTR_METADATA_ID,&pvParam,sizeof(pvParam),NULL); if (!FindError(SQL_HANDLE_STMT,szHYC00) && !FindError(SQL_HANDLE_STMT,szHY092)) RETCHECK(SQL_SUCCESS,rc,szSQLGETSTMTATTR); if (RC_SUCCESSFUL(rc) && RC_SUCCESSFUL(rc2) && pvParam != SQL_FALSE) DISPLAYERROR(szSQLGETSTMTATTR,TEXT("SQL_ATTR_METADATA_ID returned incorrect value")); } } //TestSQLSetStmtAttr() //-------------------------------------------------------------------------------- // FUNCTION: TestOneThread // PURPOSE: This function allocates the statement handle, performs simple // queries and deallocates the statement handle. This function is called // by testthreading. //-------------------------------------------------------------------------------- static int TestOneThread(THREAD_STRUCT *ptArg) { HENV henv0 = ptArg->henv; HDBC hdbc0 = ptArg->hdbc; HSTMT hstmt0 = NULL; //RETCODE rc=SQL_SUCCESS; /* allocate new statment handle */ if (RC_NOTSUCCESSFUL(SQLAllocHandle(SQL_HANDLE_STMT,hdbc0, &hstmt0))) return(FALSE); /* perform some simple catalog functions */ if (RC_NOTSUCCESSFUL(SQLStatistics(hstmt0,NULL,SQL_NTS,NULL,SQL_NTS,NULL,SQL_NTS,SQL_INDEX_ALL,SQL_QUICK))) return(FALSE); if (RC_NOTSUCCESSFUL(SQLCloseCursor(hstmt0))) return(FALSE); /* Get some data */ GetSomeData(hstmt0, ptArg->szTableName, TRUE,ptArg->rgFieldInfo); if (RC_NOTSUCCESSFUL(SQLGetTypeInfo(hstmt0,SQL_CHAR))) return(FALSE); // Cleanup if (RC_NOTSUCCESSFUL(SQLFreeHandle(SQL_HANDLE_STMT,hstmt0))) return(FALSE); return(TRUE); } //end of TestOneThread //-------------------------------------------------------------------------------- // FUNCTION: ThreadLoop // PURPOSE: This is the main loop for the threads, and it's called by // CreateThread() API. //-------------------------------------------------------------------------------- DWORD ThreadLoop(void *pArg) { THREAD_STRUCT *ptArg = (THREAD_STRUCT *)pArg; int i; RETCODE rc; for(i=0; i< NUM_THREAD; i++) TestOneThread(ptArg); // free connection handle for each thread rc=SQLDisconnect(ptArg->hdbc); RETCHECK(SQL_SUCCESS,rc,szSQLDISCONNECT); rc=SQLFreeHandle(SQL_HANDLE_DBC,ptArg->hdbc); RETCHECK(SQL_SUCCESS,rc,szSQLFREEHANDLE); return(0); } //end of ThreadLoop //------------------------------------------------------------------------------- // FUNCTION: TestThreading // PURPOSE: This function tests the multi-threading capabilities of the // driver by creating multiple threads that connect to the same data // source. Once connected, each thread performs simple queries to // test that the driver handles these queries successfully. // This function is to be called inside AutoTestFunc() in QuikTest. //-------------------------------------------------------------------------------- void TestThreading(lpSERVERINFO lpSI,QTSTRUCT *lpqt,FIELDINFO *rgFieldInfo) { } //end of TestThreading() //----------------------------------------------------------------------- // Function: CreateDescRecord //----------------------------------------------------------------------- SWORD CreateDescRecord(SQLHDESC hdesc, SQLHSTMT hstmt, UWORD uwDescType) { UDWORD cbColDef; SWORD swColCount; SQLRETURN rc; SWORD fType, fSQLType; SWORD ibScale; CHAR rgBuf[100]; switch(uwDescType) { case SQL_ATTR_APP_ROW_DESC: rc = SQLSetDescField(hdesc, 1, SQL_DESC_TYPE, (SQLPOINTER)SQL_C_DEFAULT, SQL_IS_SMALLINT); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc,szSQLSETDESCFIELD); if (SQL_SUCCEEDED(rc)) return 1; rc=SQLBindCol(hstmt, 1, SQL_C_CHAR, rgBuf, sizeof(rgBuf), NULL); RETCHECK(SQL_SUCCESS, rc,szSQLBINDCOL); if (SQL_SUCCEEDED(rc)) return 1; break; case SQL_ATTR_IMP_PARAM_DESC: case SQL_ATTR_APP_PARAM_DESC: // Select statement has already been done by this time rc=SQLDescribeCol(hstmt, 1, NULL, 0, NULL, &fSQLType, &cbColDef, &ibScale, NULL); RETCHECK(SQL_SUCCESS, rc,szSQLDESCRIBECOL); if (!SQL_SUCCEEDED(rc)) return 0; if (SQL_ATTR_APP_PARAM_DESC == uwDescType) fType=SQL_C_CHAR; else fType=fSQLType; rc = SQLSetDescField(hdesc, 1, SQL_DESC_TYPE, (SQLPOINTER)fType, SQL_IS_SMALLINT); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc,szSQLSETDESCFIELD); if (SQL_SUCCEEDED(rc)) return 1; rc=SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, fSQLType, cbColDef, ibScale, rgBuf, sizeof(rgBuf), NULL); RETCHECK(SQL_SUCCESS, rc,szSQLDESCRIBECOL); if (SQL_SUCCEEDED(rc)) return 1; break; case SQL_ATTR_IMP_ROW_DESC: // Quiktest has already done the select for us // Need to find out how many cols in result set rc=SQLNumResultCols(hstmt, &swColCount); if (SQL_SUCCEEDED(rc)) return(swColCount); break; } return 0; } //CreateDescRecord //----------------------------------------------------------------------- // Function: CheckDescOp //----------------------------------------------------------------------- void CheckDescOp(SQLHDESC hdesc, SQLRETURN rc, SQLUSMALLINT uwDescIndex, SQLSMALLINT swDescRecCount, SQLSMALLINT swDescRec, SQLUSMALLINT iDescField, SQLINTEGER swUpdateMode) { CHAR * pszAPI, szOp[10]; SQLSMALLINT fValidOp; // Descriptor types operation is valid for if (DESC_UPDATE_MODE_READ == swUpdateMode) { pszAPI=szSQLGETDESCFIELD; _tcscpy(szOp, TEXT("read")); fValidOp=rgDescInfo[iDescField].fGettable; } else { pszAPI=szSQLSETDESCFIELD; _tcscpy(szOp, TEXT("write")); fValidOp=rgDescInfo[iDescField].fSettable; } // If we're reading beyond the last record, expect SQL_NO_DATA. if (swDescRec > swDescRecCount && DESC_UPDATE_MODE_READ == swUpdateMode) { sprintf(buf,TEXT("%s: Able to %s descriptor field %s in the %s beyond last record."), pszAPI, szOp, rgDescInfo[iDescField].szDescFieldName, DescTypes[uwDescIndex].szDescName); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_NO_DATA, rc, buf); } else { if (fValidOp & DescTypes[uwDescIndex].uwTypeMask) { sprintf(buf,TEXT("%s: Unable to %s descriptor field %s in the %s"), pszAPI, szOp, rgDescInfo[iDescField].szDescFieldName, DescTypes[uwDescIndex].szDescName); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc, buf); } else { sprintf(buf,TEXT("%s: Able to %s descriptor field %s in the %s"), pszAPI, szOp, rgDescInfo[iDescField].szDescFieldName, DescTypes[uwDescIndex].szDescName); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_ERROR, rc, buf); } } } //----------------------------------------------------------------------- // // Function: CompareDescField // // Compares two fields from the given descriptor, or to rgDescInfo if hdesc2 // is NULL. uwDescField contains the entry in rgDescInfo for the desired field //----------------------------------------------------------------------- void CompareDescField(SQLHDESC hdesc1, SQLHDESC hdesc2, SQLUSMALLINT uwDescIndex, SQLSMALLINT swDescRec, SQLSMALLINT swDescRecCount, SQLUSMALLINT uwDescField, CHAR * pszAPI) { SQLRETURN rc; SQLCHAR DescBuf2[MAX_DESC_BUF]; SQLINTEGER cbValue2; // Make sure we've got a valid descriptor handle for hdesc1 // (hdesc2 is allowed to be NULL) if (SQL_NULL_HDESC == hdesc1) { sprintf(buf,TEXT("\t\tCompareDescriptor: hdesc1 handle was null!")); DISPLAYERROR(pszAPI, buf); return; } // Read the value from hdesc1 rc = SQLGetDescField(hdesc1, swDescRec, rgDescInfo[uwDescField].uwDescField, &DescBuf, sizeof(DescBuf), &cbValue); CheckDescOp(hdesc1, rc, uwDescIndex, swDescRecCount, swDescRec, uwDescField, DESC_UPDATE_MODE_READ); cbValue2=rgDescInfo[uwDescField].cbValue; // Get the value to compare to if (SQL_NULL_HDESC == hdesc2) { // Compare to rgDescInfo if it's settable if (rgDescInfo[uwDescField].fSettable & DescTypes[uwDescIndex].uwTypeMask) { // Copy the set value into DescBuf2. For char fields size is 0 // (unknown), and the new value is actually the pointer to the start // of the string. SQLPOINTER pNewvalue = &(rgDescInfo[uwDescField].NewValue); if (!rgDescInfo[uwDescField].size) { pNewvalue = (SQLPOINTER)rgDescInfo[uwDescField].NewValue; cbValue2 = (_tcslen(pNewvalue)+1) * sizeof(CHAR); } memcpy(&DescBuf2, pNewvalue, cbValue2); } } else { // Compare to hdesc2 rc = SQLGetDescField(hdesc2, swDescRec, rgDescInfo[uwDescField].uwDescField, &DescBuf2, sizeof(DescBuf2), &cbValue); // Since hdesc2 is an unassociated hdesc, treat it as an ARD // (uwDescIndex=0) CheckDescOp(hdesc2, rc, 0, swDescRecCount, swDescRec, uwDescField, DESC_UPDATE_MODE_READ); } // Perform the compare if settable in source desc and settable in // target desc (application descriptors) when using hdesc2 if (rgDescInfo[uwDescField].fSettable & DescTypes[uwDescIndex].uwTypeMask) { if (!hdesc2 || (rgDescInfo[uwDescField].fSettable & DESC_ARD)) { // IPD field SQL_DESC_TYPE is settable for consitency check, but set // value can't be retrieved, so skip compare in this case if (SQL_ATTR_IMP_PARAM_DESC != DescTypes[uwDescIndex].uwDescType || SQL_DESC_DATA_PTR != rgDescInfo[uwDescField].uwDescField) { if (memcmp(DescBuf, DescBuf2, cbValue2)) { // Compare error, print message sprintf(buf,TEXT("Compare error in %s field %s"), DescTypes[uwDescIndex].szDescName,rgDescInfo[uwDescField].szDescFieldName); DISPLAYERROR(pszAPI, buf); } } } } } //----------------------------------------------------------------------- // // Function: CheckDescriptor // // Checks all fields in all records of given descriptor. If swUpdateMode is // DESC_UPDATE_MODE_READ then all fields are read, otherwise all updatable // fields are written. //----------------------------------------------------------------------- void CheckDescriptor(SQLHDESC hdesc, SQLINTEGER swUpdateMode, SQLHSTMT hstmt, UWORD uwDescIndex) { SQLINTEGER cbValue2; SQLSMALLINT swDescRec=0, swDescRecCount, swAdditionalRecs=0; SQLUSMALLINT iDescField, iStartField=0; SQLRETURN rc; // Get the descriptor record count. rc = SQLGetDescField(hdesc, 0, SQL_DESC_COUNT, &swDescRecCount, sizeof(swDescRecCount), &cbValue); if (SQL_SUCCESS == rc) { // In read mode, try to read one past last record if (swUpdateMode == DESC_UPDATE_MODE_READ) swAdditionalRecs=1; // Check all records, including header for (swDescRec=0; swDescRec <= swDescRecCount+swAdditionalRecs; swDescRec++) { // Check all fields for (iDescField=iStartField; iDescField < sizeof(rgDescInfo)/sizeof(rgDescInfo[0]); iDescField++) { // If we've gone past the header fields, then break out of loop to check record fields if (0 == swDescRec && !rgDescInfo[iDescField].fHeader) { iStartField=iDescField; break; } if (DESC_UPDATE_MODE_READ == swUpdateMode) { // Read from the field rc = SQLGetDescField(hdesc, swDescRec, rgDescInfo[iDescField].uwDescField, &DescBuf, sizeof(DescBuf), &cbValue); CheckDescOp(hdesc, rc, uwDescIndex, swDescRecCount, swDescRec, iDescField, swUpdateMode); if (RC_SUCCESSFUL(rc)) { // Compare cbValue with expected cbValue2=rgDescInfo[iDescField].cbValue; // For most fields if (!rgDescInfo[iDescField].size) cbValue2 = _tcslen((LPTSTR)DescBuf) * sizeof(SQLCHAR); // For string fields // Make sure cbValue and cbValue2 agree if (cbValue != cbValue2) { sprintf(buf,TEXT("Compare error in %s field %s, expected")\ TEXT(" StringLength %d, received %d"), DescTypes[uwDescIndex].szDescName, rgDescInfo[iDescField].szDescFieldName, cbValue2, cbValue); DISPLAYERROR(szSQLGETDESCFIELD, buf); } } } else { // Write to the field. For char fields size is 0 (unknown), // so compute the length of the string rc = SQLSetDescField(hdesc, swDescRec, rgDescInfo[iDescField].uwDescField, (SQLPOINTER)rgDescInfo[iDescField].NewValue, (rgDescInfo[iDescField].size) ? rgDescInfo[iDescField].size : _tcslen((LPTSTR)rgDescInfo[iDescField].NewValue)*sizeof(CHAR)); CheckDescOp(hdesc, rc, uwDescIndex, swDescRecCount, swDescRec, iDescField, swUpdateMode); if (RC_SUCCESSFUL(rc)) CompareDescField(hdesc, NULL, uwDescIndex, swDescRec, swDescRecCount,iDescField, szSQLSETDESCFIELD); } } } } else { // Unable to read record count from descriptor header, can't proceed sprintf(buf,TEXT("\t\tUnable to read record count from descriptor header.")); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc, buf); } } //----------------------------------------------------------------------- // // Function: CompareDescriptor // // Compares two descriptors, or if hdesc2 is NULL compares hdesc1 to rgDescInfo // updatable columns //----------------------------------------------------------------------- void CompareDescriptor(SQLHDESC hdesc1, SQLHDESC hdesc2, UWORD uwDescIndex, CHAR * pszAPI) { SQLSMALLINT swDescRec, swDescRecCount; SQLUSMALLINT iDescField, iStartField=0; SQLRETURN rc; // Make sure we've got a valid descriptor handle for hdesc1 // (hdesc2 is allowed to be NULL) if (SQL_NULL_HDESC == hdesc1) { sprintf(buf,TEXT("\t\thCompareDescriptor: hdesc1 handle was null!")); DISPLAYERROR(szSQLGETDESCFIELD, buf); return; } // Get the descriptor record count. rc = SQLGetDescField(hdesc1, 0, SQL_DESC_COUNT, &swDescRecCount, sizeof(swDescRecCount), &cbValue); if (SQL_SUCCESS == rc) { // Check all records, including header for (swDescRec=0; swDescRec <= swDescRecCount; swDescRec++) { // Check all fields for (iDescField=iStartField; iDescField < sizeof(rgDescInfo)/sizeof(rgDescInfo[0]); iDescField++) { // If we've gone past the header fields, then break out of loop to check record fields if (0 == swDescRec && !rgDescInfo[iDescField].fHeader) { iStartField=iDescField; break; } CompareDescField(hdesc1, hdesc2, uwDescIndex, swDescRec, swDescRecCount, iDescField, pszAPI); } } } else { // Unable to read record count from descriptor header, can't proceed sprintf(buf,TEXT("\t\tUnable to read record count from descriptor header.")); ERRSHANDLE(SQL_HANDLE_DESC, hdesc1, SQL_SUCCESS, rc, buf); } } void CheckDescRecord(SQLHDESC hdesc, SQLSMALLINT swDescRec, SQLSMALLINT fType, SQLSMALLINT fSubType, SQLINTEGER cbLength, SQLSMALLINT ibPrecision, SQLSMALLINT ibScale, SQLPOINTER pData, SQLINTEGER *pcbValue, SQLINTEGER *pIndicator, SQLUSMALLINT iDescType) { SQLINTEGER Length, * pIndicator2; PTR pDescPtr; SQLRETURN rc; SQLSMALLINT fType2, fSubType2, cbName, Precision, Scale, Nullable; CHAR szName[MAX_DESC_BUF]=TEXT(""); // Write the record rc = SQLSetDescRec(hdesc, swDescRec, fType, fSubType, cbLength, ibPrecision, ibScale, pData, pcbValue, pIndicator); // Can't set IRD, so it should error if (SQL_ATTR_IMP_ROW_DESC == DescTypes[iDescType].uwDescType) ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_ERROR, rc, szSQLSETDESCREC); else { sprintf(buf,TEXT("%s: Unable to write record %d in %s"), szSQLSETDESCREC, swDescRec, DescTypes[iDescType].szDescName); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc, buf); } if (RC_SUCCESSFUL(rc)) { // Read it again rc = SQLGetDescRec(hdesc, swDescRec, szName, sizeof(szName)/sizeof(CHAR), &cbName, &fType2, &fSubType2, &Length, &Precision, &Scale, &Nullable); sprintf(buf,TEXT("%s: Unable to read record %d in %s"), szSQLGETDESCREC, swDescRec, DescTypes[iDescType].szDescName); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc, buf); if (RC_SUCCESSFUL(rc)) { // Compare values if (fType2 != fType) DISPLAYERROR(szSQLSETDESCREC,TEXT("fType not set correctly")); if (Precision != ibPrecision) DISPLAYERROR(szSQLSETDESCREC,TEXT("ibPrecision not set correctly")); switch(fType) { case SQL_DECIMAL: case SQL_NUMERIC: case SQL_C_DOUBLE: case SQL_C_FLOAT: // Scale is only defined for NUMERIC or DECIMAL types if (Scale != ibScale) DISPLAYERROR(szSQLSETDESCREC,TEXT("ibScale not set correctly")); break; case SQL_DATETIME: case SQL_INTEGER: // Subtype is only valid for DATETIME or INTERVAL types if (fSubType2 != fSubType) DISPLAYERROR(szSQLSETDESCREC,TEXT("fSubType not set correctly")); break; } // For application descriptors, compare the Length and get the // data ptr value to check for accuracy switch(DescTypes[iDescType].uwDescType) { case SQL_ATTR_APP_ROW_DESC: case SQL_ATTR_APP_PARAM_DESC: if (Length != cbLength) DISPLAYERROR(szSQLSETDESCREC,TEXT("cbLength not set correctly")); rc = SQLGetDescField(hdesc, swDescRec, SQL_DESC_DATA_PTR, &pDescPtr, sizeof(PTR), &cbValue); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc, szSQLGETDESCFIELD); if (pDescPtr != pData) DISPLAYERROR(szSQLSETDESCREC,TEXT("rgbValue not set correctly")); // Get the octet length ptr value and check for accuracy rc = SQLGetDescField(hdesc, swDescRec, SQL_DESC_OCTET_LENGTH_PTR, &pDescPtr, sizeof(PTR), &cbValue); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc, szSQLGETDESCFIELD); if (pDescPtr != pcbValue) DISPLAYERROR(szSQLSETDESCREC,TEXT("cbValue not set correctly")); rc = SQLGetDescField(hdesc, swDescRec, SQL_DESC_INDICATOR_PTR, &pIndicator2, sizeof(PTR), &cbValue); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc, szSQLGETDESCFIELD); if (pIndicator2 != pIndicator) DISPLAYERROR(szSQLSETDESCREC,TEXT("Indicator not set correctly")); break; case SQL_ATTR_IMP_ROW_DESC: case SQL_ATTR_IMP_PARAM_DESC: break; default: DISPLAYERROR(szSQLSETDESCREC,TEXT("Unknown descriptor type.")); } } } } SQLRETURN DescBindParameter(SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT fParamType, SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLUINTEGER cbColDef, SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue) { SQLHDESC hdescAPD, hdescIPD; SQLRETURN rc; rc = SQLGetStmtAttr(hstmt, SQL_ATTR_APP_PARAM_DESC, &hdescAPD, sizeof(hdescAPD), NULL); if (!RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTATTR)) return rc; rc = SQLGetStmtAttr(hstmt, SQL_ATTR_IMP_PARAM_DESC, &hdescIPD, sizeof(hdescIPD), NULL); if (!RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTATTR)) return rc; // Parameter type rc = SQLSetDescField(hdescIPD, ipar, SQL_DESC_PARAMETER_TYPE, (SQLPOINTER)fParamType, SQL_IS_SMALLINT); // Set ipar and fParamType for IPD if (!ERRSHANDLE(SQL_HANDLE_DESC, hdescIPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; // C type rc = SQLSetDescField(hdescAPD, ipar, SQL_DESC_CONCISE_TYPE, (SQLPOINTER)fCType, SQL_IS_SMALLINT); // Set ipar and fCType of APD if (!ERRSHANDLE(SQL_HANDLE_DESC, hdescAPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; // Sql type rc = SQLSetDescField(hdescIPD, ipar, SQL_DESC_CONCISE_TYPE, (SQLPOINTER)fSqlType, SQL_IS_SMALLINT); // Set fSqlType of IPD if (!ERRSHANDLE(SQL_HANDLE_DESC, hdescIPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; // Column Size (Length or Precision) if (fSqlType == SQL_CHAR || fSqlType == SQL_VARCHAR || fSqlType == SQL_LONGVARCHAR || fSqlType == SQL_BINARY || fSqlType == SQL_VARBINARY || fSqlType == SQL_LONGVARBINARY || fSqlType == SQL_TYPE_DATE || fSqlType == SQL_TYPE_TIME || fSqlType == SQL_TYPE_TIMESTAMP || (fSqlType >= SQL_INTERVAL_YEAR && fSqlType <= SQL_INTERVAL_MINUTE_TO_SECOND)) { rc = SQLSetDescField(hdescIPD, ipar, SQL_DESC_LENGTH, (SQLPOINTER)cbColDef, SQL_IS_UINTEGER); // Set cbColDef (Length) of IPD if (!ERRSHANDLE(SQL_HANDLE_DESC, hdescIPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; } else if (fSqlType == SQL_DECIMAL || fSqlType == SQL_NUMERIC || fSqlType == SQL_FLOAT || fSqlType == SQL_REAL || fSqlType == SQL_DOUBLE) { rc = SQLSetDescField(hdescIPD, ipar, SQL_DESC_PRECISION, (SQLPOINTER)cbColDef, SQL_IS_SMALLINT); // Set cbColDef (Precision) of IPD if (!ERRSHANDLE(SQL_HANDLE_DESC, hdescIPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; } // Scale if (fSqlType == SQL_TYPE_DATE || fSqlType == SQL_TYPE_TIME || fSqlType == SQL_TYPE_TIMESTAMP || (fSqlType >= SQL_INTERVAL_YEAR && fSqlType <= SQL_INTERVAL_MINUTE_TO_SECOND)) { switch(fSqlType) { case SQL_TYPE_TIME: case SQL_TYPE_TIMESTAMP: case SQL_INTERVAL_SECOND: case SQL_INTERVAL_DAY_TO_SECOND: case SQL_INTERVAL_HOUR_TO_SECOND: case SQL_INTERVAL_MINUTE_TO_SECOND: rc = SQLSetDescField(hdescIPD, ipar, SQL_DESC_PRECISION, (SQLPOINTER)ibScale, SQL_IS_SMALLINT); // Set scale of IPD if (!ERRSHANDLE(SQL_HANDLE_DESC, hdescIPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; break; default: rc = SQLSetDescField(hdescIPD, ipar, SQL_DESC_PRECISION, (SQLPOINTER)0, SQL_IS_SMALLINT); // Set scale of IPD if (!ERRSHANDLE(SQL_HANDLE_DESC, hdescIPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; } } else { rc = SQLSetDescField(hdescIPD, ipar, SQL_DESC_SCALE, (SQLPOINTER)ibScale, SQL_IS_SMALLINT); // Set scale of IPD if (!ERRSHANDLE(SQL_HANDLE_DESC, hdescIPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; } // cbValueMax rc = SQLSetDescField(hdescAPD, ipar, SQL_DESC_OCTET_LENGTH, (SQLPOINTER)cbValueMax, SQL_IS_INTEGER); // Set cbValueMax of APD if (!ERRSHANDLE(SQL_HANDLE_DESC, hdescAPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; // pcbValue rc = SQLSetDescField(hdescAPD, ipar, SQL_DESC_OCTET_LENGTH_PTR, (SQLPOINTER)pcbValue, SQL_IS_POINTER); // Set pcbValue/octet length if (!ERRSHANDLE(SQL_HANDLE_DESC, hdescAPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; rc = SQLSetDescField(hdescAPD, ipar, SQL_DESC_INDICATOR_PTR, (SQLPOINTER)pcbValue, SQL_IS_POINTER); // Set pcbValue/indicator if (!ERRSHANDLE(SQL_HANDLE_DESC, hdescAPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; // Data ptr rc = SQLSetDescField(hdescAPD, ipar, SQL_DESC_DATA_PTR, (SQLPOINTER)rgbValue, SQL_IS_POINTER); // Set rgbValue ERRSHANDLE(SQL_HANDLE_DESC, hdescAPD, SQL_SUCCESS, rc,szSQLSETDESCFIELD); return rc; } SQLRETURN DescBindCol(SQLHSTMT hstmt, SQLSMALLINT icol, SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue) { SQLHDESC hdesc; SQLRETURN rc; rc = SQLGetStmtAttr(hstmt, SQL_ATTR_APP_ROW_DESC, &hdesc, sizeof(hdesc), NULL); if (!RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTATTR)) return rc; rc = SQLSetDescField(hdesc, icol, SQL_DESC_CONCISE_TYPE, (SQLPOINTER)fCType, SQL_IS_SMALLINT); // Set icol and fCType if (!ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; rc = SQLSetDescField(hdesc, icol, SQL_DESC_OCTET_LENGTH, (SQLPOINTER)cbValueMax, SQL_IS_INTEGER); // Set cbValueMax if (!ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; rc = SQLSetDescField(hdesc, icol, SQL_DESC_OCTET_LENGTH_PTR, (SQLPOINTER)pcbValue, SQL_IS_POINTER); // Set pcbValue/octet length if (!ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; rc = SQLSetDescField(hdesc, icol, SQL_DESC_INDICATOR_PTR, (SQLPOINTER)pcbValue, SQL_IS_POINTER); // Set pcbValue/indicator if (!ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc,szSQLSETDESCFIELD)) return rc; rc = SQLSetDescField(hdesc, icol, SQL_DESC_DATA_PTR, (SQLPOINTER)rgbValue, SQL_IS_POINTER); // Set rgbValue ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc,szSQLSETDESCFIELD); return rc; } //----------------------------------------------------------------------- // Function: TestGetDescField //----------------------------------------------------------------------- void TestGetDescField(QTSTRUCT * lpqt) { SQLRETURN rc=SQL_SUCCESS; SQLUSMALLINT iDescType; SQLHDESC hdesc1=NULL, hdesc2=NULL; PTR rgbValue=NULL; SQLSMALLINT swDescRecCount, swExpRecCount; SQLINTEGER cbValue; CHAR szName[MAX_DESC_BUF]=TEXT(""); CHAR szQuery[XLARGEBUFF]=TEXT(""); if (!Supported(SQL_API_SQLGETDESCFIELD)) { // Allocate a default descriptor rc = SQLAllocHandle(SQL_HANDLE_DESC, hdbc, &hdesc); if (RC_SUCCESSFUL(rc)) { rc = SQLGetDescField(hdesc, 0, SQL_DESC_COUNT, &DescBuf, sizeof(DescBuf), &cbValue); if(!FindError(SQL_HANDLE_DESC,szIM001)) DISPLAYERROR(szSQLGETDESCFIELD, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLGETDESCFIELD); } } else { // Make sure all parameters and columns are unbound ResetHstmt(&hstmt); // Perform a select stmt sprintf(szQuery,szSELECTSTAR,lpqt->szTableName); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); // For each descriptor type for (iDescType=0; iDescType < sizeof(DescTypes)/sizeof(DescTypes[0]); iDescType++) { // Get the handle for the automatically allocated descriptor rc = SQLGetStmtAttr(hstmt, DescTypes[iDescType].uwDescType, &hdesc1, sizeof(hdesc1), &cbValue); RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTATTR); // Create a descriptor record so we have something to read besides header swExpRecCount=CreateDescRecord(hdesc1, hstmt, DescTypes[iDescType].uwDescType); // Get the count of descriptor records (iRecord ignored for header fields) rc = SQLGetDescField(hdesc1, 0, SQL_DESC_COUNT, &swDescRecCount, sizeof(swDescRecCount), &cbValue); if (SQL_SUCCEEDED(rc)) { // Check count value for expected if (swExpRecCount != swDescRecCount) { sprintf(buf,TEXT("Expected record count %d, found %d"), swExpRecCount, swDescRecCount); DISPLAYERROR(szSQLGETDESCFIELD, buf); } CheckDescriptor(hdesc1, DESC_UPDATE_MODE_READ, hstmt, iDescType); } else { // Unable to read record count from descriptor header, can't proceed sprintf(buf,TEXT("Unable to read record count from descriptor header for descriptor type %d"), DescTypes[iDescType].szDescName); ERRSHANDLE(SQL_HANDLE_DESC, hdesc1, SQL_SUCCESS, rc, buf); } } rc=SQLCloseCursor(hstmt); RETCHECK(SQL_SUCCESS, rc,szSQLCLOSECURSOR); } } // TestGetDescField() //----------------------------------------------------------------------- // Function: TestSetDescField //----------------------------------------------------------------------- void TestSetDescField(QTSTRUCT * lpqt) { SQLRETURN rc=SQL_SUCCESS; SQLUSMALLINT iDescType; SQLHDESC hdesc1=NULL, hdesc2=NULL; PTR rgbValue=NULL; SQLSMALLINT swDescRecCount, swExpRecCount; SQLINTEGER cbValue; CHAR szName[MAX_DESC_BUF]=TEXT(""); CHAR szQuery[XLARGEBUFF]=TEXT(""); if (!Supported(SQL_API_SQLSETDESCFIELD)) { // Allocate a default descriptor rc = SQLAllocHandle(SQL_HANDLE_DESC, hdbc, &hdesc); if (RC_SUCCESSFUL(rc)) { rc = SQLSetDescField(hdesc, 0, SQL_DESC_COUNT, &swDescRecCount, sizeof(swDescRecCount)); if(!FindError(SQL_HANDLE_DESC,szIM001)) DISPLAYERROR(szSQLSETDESCFIELD, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLSETDESCFIELD); } } else { // Make sure all parameters and columns are unbound ResetHstmt(&hstmt); // Perform a select stmt sprintf(szQuery,szSELECTSTAR,lpqt->szTableName); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); // For each descriptor type for (iDescType=0; iDescType < sizeof(DescTypes)/sizeof(DescTypes[0]); iDescType++) { // Get the handle for the automatically allocated descriptor rc = SQLGetStmtAttr(hstmt, DescTypes[iDescType].uwDescType, &hdesc1, sizeof(hdesc1), &cbValue); RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTATTR); // Create a descriptor record so we have something to read besides header swExpRecCount=CreateDescRecord(hdesc1, hstmt, DescTypes[iDescType].uwDescType); // Update all descriptor records to new values CheckDescriptor(hdesc1, DESC_UPDATE_MODE_WRITE, hstmt, iDescType); // Compare the descriptor with the update values // CompareDescriptor(hdesc1, NULL, iDescType, szSQLSETDESCFIELD); } ResetHstmt(&hstmt); } } //TestSetDescField() //----------------------------------------------------------------------- // Function: TestGetDescRec //----------------------------------------------------------------------- void TestGetDescRec(QTSTRUCT * lpqt) { SQLRETURN rc=SQL_SUCCESS; SQLUSMALLINT iDescType; SQLHDESC hdesc1=NULL, hdesc2=NULL; PTR rgbValue=NULL; SQLSMALLINT swDescRec, swDescRecCount, iRecord, cbName, fType, fSubType, Precision, Scale, Nullable, swExpRecCount; SQLINTEGER Length, cbValue; CHAR szName[MAX_DESC_BUF]=TEXT(""); CHAR szQuery[XLARGEBUFF]=TEXT(""); if (!Supported(SQL_API_SQLGETDESCREC)) { // Allocate a default descriptor rc = SQLAllocHandle(SQL_HANDLE_DESC, hdbc, &hdesc); if (RC_SUCCESSFUL(rc)) { rc = SQLGetDescRec(hdesc, iRecord, szName, MAX_DESC_BUF, &cbName, &fType, &fSubType, &Length, &Precision, &Scale, &Nullable); if(!FindError(SQL_HANDLE_DESC,szIM001)) DISPLAYERROR(szSQLGETDESCREC, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLGETDESCREC); } } else { // Make sure all parameters and columns are unbound ResetHstmt(&hstmt); // Turn on bookmarks so we can retrieve from record 0 of ARD rc = SQLSetStmtAttr(hstmt, SQL_ATTR_USE_BOOKMARKS, (SQLPOINTER)SQL_UB_ON, SQL_IS_INTEGER); RETCHECK(SQL_SUCCESS, rc,szSQLSETSTMTATTR); // Perform a select stmt sprintf(szQuery,szSELECTSTAR,lpqt->szTableName); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); // For each descriptor type for (iDescType=0; iDescType < sizeof(DescTypes)/sizeof(DescTypes[0]); iDescType++) { // Get the handle for the automatically allocated descriptor rc = SQLGetStmtAttr(hstmt, DescTypes[iDescType].uwDescType, &hdesc1, sizeof(hdesc1), &cbValue); RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTATTR); // Create a descriptor record so we have something to read besides header swExpRecCount=CreateDescRecord(hdesc1, hstmt, DescTypes[iDescType].uwDescType); // Get the count of descriptor records // Count for automatically allocated descriptors is written in // SetDescField test. rc = SQLGetDescField(hdesc1, 0, SQL_DESC_COUNT, &swDescRecCount, sizeof(swDescRecCount), &cbValue); if (SQL_SUCCESS == rc) { // For all descriptor records for (swDescRec=0; swDescRec <= swDescRecCount+1; swDescRec++) { // Read the record rc = SQLGetDescRec(hdesc1, swDescRec, szName, sizeof(szName), &cbName, &fType, &fSubType, &Length, &Precision, &Scale, &Nullable); if (swDescRec <= swDescRecCount) { // Retrieving bookmark on IPD is an error if (SQL_ATTR_IMP_PARAM_DESC == DescTypes[iDescType].uwDescType && 0 == swDescRec) { sprintf(buf,TEXT("%s: Able to read record %d from %s"), szSQLGETDESCREC, swDescRec, DescTypes[iDescType].szDescName); ERRSHANDLE(SQL_HANDLE_DESC, hdesc1, SQL_ERROR, rc, buf); } else { sprintf(buf,TEXT("%s: Unable to read record %d from %s"), szSQLGETDESCREC, swDescRec, DescTypes[iDescType].szDescName); ERRSHANDLE(SQL_HANDLE_DESC, hdesc1, SQL_SUCCESS, rc, buf); } } else { sprintf(buf,TEXT("%s: Did not receive SQL_NO_DATA reading record %d from %s"), szSQLGETDESCREC, swDescRec, DescTypes[iDescType].szDescName); ERRSHANDLE(SQL_HANDLE_DESC, hdesc1, SQL_NO_DATA, rc, buf); } } } else { // Unable to read record count from descriptor header, can't proceed sprintf(buf,TEXT("\t\tUnable to read record count from descriptor header for %s"), DescTypes[iDescType].szDescName); ERRSHANDLE(SQL_HANDLE_DESC, hdesc1, SQL_SUCCESS, rc, buf); } } rc=SQLCloseCursor(hstmt); RETCHECK(SQL_SUCCESS, rc,szSQLCLOSECURSOR); } } //TestGetDescRec() //----------------------------------------------------------------------- // Function: TestSetDescRec //----------------------------------------------------------------------- void TestSetDescRec(QTSTRUCT * lpqt) { SQLRETURN rc=SQL_SUCCESS; SQLINTEGER cbLength, cbValue, Indicator; SQLUSMALLINT iDescType; SQLHDESC hdesc1=NULL, hdesc2=NULL; PTR rgbValue=NULL; SQLSMALLINT swDescRec, swDescRecCount, swStartRec=1, iRecord, fType, fSubType, ibPrecision, ibScale; SQLSMALLINT swExpRecCount; CHAR szQuery[XLARGEBUFF]=TEXT(""); if (!Supported(SQL_API_SQLSETDESCREC)) { // Allocate a default descriptor rc = SQLAllocHandle(SQL_HANDLE_DESC, hdbc, &hdesc); if (RC_SUCCESSFUL(rc)) { rc = SQLSetDescRec(hdesc, iRecord, fType, fSubType, cbLength, ibPrecision, ibScale, &DescBuf, &cbValue, &Indicator); if(!FindError(SQL_HANDLE_DESC,szIM001)) DISPLAYERROR(szSQLSETDESCREC, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLSETDESCREC); } } else { // Make sure all parameters and columns are unbound ResetHstmt(&hstmt); // Perform a select stmt sprintf(szQuery,szSELECTSTAR,lpqt->szTableName); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); // If bookmarks are supported, then we want to try to set record 0 rc = SQLSetStmtAttr(hstmt, SQL_ATTR_USE_BOOKMARKS, (PTR)SQL_UB_VARIABLE, SQL_IS_INTEGER); if (RC_SUCCESSFUL(rc)) swStartRec=0; // For each descriptor type for (iDescType=0; iDescType < sizeof(DescTypes)/sizeof(DescTypes[0]); iDescType++) { // Get the handle for the automatically allocated descriptor rc = SQLGetStmtAttr(hstmt, DescTypes[iDescType].uwDescType, &hdesc1, sizeof(hdesc1), &cbValue); RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTATTR); // Create a descriptor record so we have something to read besides header swExpRecCount=CreateDescRecord(hdesc1, hstmt, DescTypes[iDescType].uwDescType); // Get the count of descriptor records rc = SQLGetDescField(hdesc1, 0, SQL_DESC_COUNT, &swDescRecCount, sizeof(swDescRecCount), &cbValue); if (SQL_SUCCESS == rc) { // For all descriptor records for (swDescRec=swStartRec; swDescRec <= swDescRecCount; swDescRec++) { // Test with a DATETIME record so we can check the subtype field. SQLINTEGER Indicator=0; fType=SQL_DATETIME; fSubType=SQL_CODE_TIMESTAMP; cbLength=sizeof(TIMESTAMP_STRUCT); ibPrecision=5; // For DATETIME, SQL_CODE_DATE data // precision defaults to 0, but it implies it can be set otherwise. ibScale=0; // Only used for DECIMAL or NUMERIC types, otherwise undefined CheckDescRecord(hdesc1, swDescRec, fType, fSubType, cbLength, ibPrecision, ibScale, &tsval, &cbValue, &Indicator, iDescType); // Test with a numeric record to test scale Indicator=0; fType=SQL_NUMERIC; fSubType=SQL_CODE_TIMESTAMP; cbLength=sizeof(TIMESTAMP_STRUCT); ibPrecision=5; // For DATETIME, SQL_CODE_DATE data // precision defaults to 0, but it implies it can be set otherwise. ibScale=0; // Only used for DECIMAL or NUMERIC types, otherwise undefined CheckDescRecord(hdesc1, swDescRec, fType, fSubType, cbLength, ibPrecision, ibScale, &tsval, &cbValue, &Indicator, iDescType); } } else { // Unable to read record count from descriptor header, // can't proceed sprintf(buf,TEXT("\t\tUnable to read record count from descriptor header for %s"), DescTypes[iDescType].szDescName); ERRSHANDLE(SQL_HANDLE_DESC, hdesc1, SQL_SUCCESS, rc, buf); } } ResetHstmt(&hstmt); } } //TestSetDescRec() //----------------------------------------------------------------------- // Function: TestCopyDesc //----------------------------------------------------------------------- void TestCopyDesc(QTSTRUCT * lpqt) { SQLRETURN rc=SQL_SUCCESS; SQLUSMALLINT iDescType; SQLSMALLINT swExpRecCount; SQLHDESC hdesc1=NULL, hdesc2=NULL; PTR rgbValue=NULL; CHAR szName[MAX_DESC_BUF]=TEXT(""); CHAR szQuery[XLARGEBUFF]=TEXT(""); ResetHstmt(&hstmt); // Allocate a default descriptor rc = SQLAllocHandle(SQL_HANDLE_DESC, hdbc, &hdesc); if (RC_SUCCESSFUL(rc)) { if (!Supported(SQL_API_SQLCOPYDESC)) { rc = SQLCopyDesc(hdesc, hdesc1); if(!FindError(SQL_HANDLE_DESC,szIM001)) DISPLAYERROR(szSQLCOPYDESC, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLCOPYDESC); } else { // Perform a select stmt sprintf(szQuery,szSELECTSTAR,lpqt->szTableName); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); // For each descriptor type for (iDescType=0; iDescType < sizeof(DescTypes)/sizeof(DescTypes[0]); iDescType++) { // Get the handle for the automatically allocated descriptor rc = SQLGetStmtAttr(hstmt, DescTypes[iDescType].uwDescType, &hdesc1, sizeof(hdesc1), &cbValue); RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTATTR); // Create a descriptor record so we have something to read besides header swExpRecCount=CreateDescRecord(hdesc1, hstmt, DescTypes[iDescType].uwDescType); // Update all descriptor records to new values CheckDescriptor(hdesc1, DESC_UPDATE_MODE_WRITE, hstmt, iDescType); // Copy the descriptor to the newly allocated descriptor rc = SQLCopyDesc(hdesc1, hdesc); ERRSHANDLE(SQL_HANDLE_DESC, hdesc1, SQL_SUCCESS, rc, szSQLCOPYDESC); ERRSHANDLE(SQL_HANDLE_DESC, hdesc, SQL_SUCCESS, rc, szSQLCOPYDESC); // Compare each field in the copied descriptor to the original if (RC_SUCCESSFUL(rc)) CompareDescriptor(hdesc1, hdesc, iDescType, szSQLCOPYDESC); } } // Free descriptor handle if (hdesc) { rc = SQLFreeHandle(SQL_HANDLE_DESC, hdesc); RETCHECK(SQL_SUCCESS, rc,szSQLFREEHANDLE); } ResetHstmt(&hstmt); } } //TestCopyDesc() //----------------------------------------------------------------------- // Function: TestDescDefaults //----------------------------------------------------------------------- void TestDescDefaults(QTSTRUCT * lpqt) { SQLRETURN rc=SQL_SUCCESS; SQLINTEGER cbValue; SQLSMALLINT swDescRec; SQLUSMALLINT iDescField, iStartField=0, iDescType; if (Supported(SQL_API_SQLGETDESCFIELD)) { // Reallocate hstmt to check defaults against ResetHstmt(&hstmt); // For each descriptor type for (iDescType=0; iDescType < sizeof(DescTypes)/sizeof(DescTypes[0]); iDescType++) { // Get the handle for the descriptor rc = SQLGetStmtAttr(hstmt, DescTypes[iDescType].uwDescType, &hdesc, sizeof(hdesc), NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTATTR); swDescRec=0; // For each descriptor field, read the value for (iDescField=iStartField; iDescField < sizeof(rgDescInfo)/sizeof(rgDescInfo[0]); iDescField++) { // If we've gone past the header fields, then create a record and check record fields if (0 == swDescRec && !rgDescInfo[iDescField].fHeader) { iStartField=iDescField; // Make sure we're not on the IRD, 'cause you can't modify an IRD if (SQL_ATTR_IMP_ROW_DESC != DescTypes[iDescType].uwDescType) { // Create a record with all default values rc = SQLSetDescField(hdesc, 0, SQL_DESC_COUNT, (SQLPOINTER)1, SQL_IS_SMALLINT); RETCHECK(SQL_SUCCESS, rc,szSQLSETDESCFIELD); swDescRec++; } continue; } // If the field has a default value if (rgDescInfo[iDescField].fDefault & DescTypes[iDescType].uwTypeMask) { // Read from the field rc = SQLGetDescField(hdesc, swDescRec, rgDescInfo[iDescField].uwDescField, &DescBuf, sizeof(DescBuf), &cbValue); RETCHECK(SQL_SUCCESS, rc,szSQLGETDESCFIELD); if (RC_SUCCESSFUL(rc)) { // Perform the compare if (memcmp(DescBuf, &rgDescInfo[iDescField].DefaultVal, cbValue)) { // Compare error, print message sprintf(buf,TEXT("Error in %s field %s default value"), DescTypes[iDescType].szDescName,rgDescInfo[iDescField].szDescFieldName); DISPLAYERROR(szSQLGETDESCFIELD, buf); } } } } } } } // TestDescDefaults //----------------------------------------------------------------------- // Function: TestUseDesc //----------------------------------------------------------------------- void TestUseDesc(QTSTRUCT * lpqt, FIELDINFO *rgFields) { LPTSTR pch=NULL; SDWORD crow=0; CHAR szQuery[XLARGEBUFF]=TEXT(""); SQLRETURN rc; UWORD row, icol, paramno; SWORD ccol; CHAR * rgbMemBuf=NULL, * rgbValue=NULL; SDWORD * pcbValueBuf=NULL, * pcbValue=NULL; if (Supported(SQL_API_SQLSETDESCFIELD)) { // Test descriptor bindcol // Reallocate hstmt to set to defaults ResetHstmt(&hstmt); // Perform a select stmt sprintf(szQuery,szSELECTSTAR,lpqt->szTableName); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); rc=SQLNumResultCols(hstmt, &ccol); RETCHECK(SQL_SUCCESS, rc, szSQLNUMRESULTCOLS); rc=SQLFreeStmt(hstmt, SQL_CLOSE); // Close the cursor so we can insert RETCHECK(SQL_SUCCESS, rc,szSQLFREESTMT); rgbMemBuf=AllocateMemory(ccol*MAX_STRING_SIZE*sizeof(CHAR)); if (!rgbMemBuf) { DISPLAYERROR(TEXT("Simulate BindCol"),TEXT("Out of memory!")); goto ExitUseDesc; } pcbValueBuf=(SDWORD *)AllocateMemory(ccol*sizeof(SDWORD)); if (!pcbValueBuf) { DISPLAYERROR(TEXT("Simulate BindCol"),TEXT("Out of memory!")); goto ExitUseDesc; } // Bind a parameter for each column in the result set using descriptors paramno=0; for (icol=1, rgbValue=rgbMemBuf, pcbValue=pcbValueBuf; icol <= ccol; icol++, rgbValue+=MAX_STRING_SIZE, pcbValue++) { pch = qtMakeData(guwRowCount, icol-1, &rgFields[icol-1], rgbValue); // Field is not READ ONLY if(pch) { // Where row and column match and field is nullable, make NULL if (icol == guwRowCount && rgFields[icol-1].nullable) *pcbValue=SQL_NULL_DATA; else *pcbValue=SQL_NTS; paramno++; // rc=SQLBindParameter(hstmt, paramno, SQL_PARAM_INPUT, SQL_C_CHAR, rc=DescBindParameter(hstmt, paramno, SQL_PARAM_INPUT, SQL_C_CHAR, rgFields[icol-1].wSQLType, rgFields[icol-1].precision, rgFields[icol-1].scale, rgbValue, 0, pcbValue); RETCHECK(SQL_SUCCESS, rc,TEXT("DescBindParameter")); } } // Insert the new row. Note that the inserted row will be checked // for accuracy below. rc = SQLExecDirect(hstmt, szInsertStmt, SQL_NTS); ERRSHANDLE(SQL_HANDLE_STMT, hstmt, SQL_SUCCESS, rc, szSQLEXECDIRECT); if (RC_SUCCESSFUL(rc)) guwRowCount++; // Perform the select stmt again sprintf(szQuery,szSELECTSTAR,lpqt->szTableName); rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); // Bind all the columns to char for (icol=1, rgbValue=rgbMemBuf, pcbValue=pcbValueBuf; icol <= ccol; icol++, rgbValue+=MAX_STRING_SIZE, pcbValue++) { // Bind to next column rc = DescBindCol(hstmt, icol, SQL_C_CHAR, rgbValue, MAX_STRING_SIZE*sizeof(CHAR), pcbValue); // rc = SQLBindCol(hstmt, icol, SQL_C_CHAR, rgbValue, MAX_STRING_SIZE*sizeof(CHAR), pcbValue); RETCHECK(SQL_SUCCESS, rc, TEXT("DescBindCol")); } // Fetch all the rows and check the bound value with MakeAData for // each column for (row=1; rc == SQL_SUCCESS; row++) { rc=SQLFetch(hstmt); // Will return SQL_NO_DATA after last row if (SQL_SUCCESS == rc) { // Compare all the columns for (icol=1, rgbValue=rgbMemBuf, pcbValue=pcbValueBuf; icol <= ccol; icol++, rgbValue+=MAX_STRING_SIZE, pcbValue++) { CompareWithExpected(rgbValue, pcbValue, row, icol, rgFields); } } else ERRSHANDLE(SQL_HANDLE_STMT, hstmt, SQL_NO_DATA, rc, szSQLFETCH); } // Close the cursor and retry using SQLFetchScroll rc=SQLFreeStmt(hstmt, SQL_CLOSE); RETCHECK(SQL_SUCCESS, rc,szSQLFREESTMT); // Make sure we have a rowset size of 1 rc=SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_ARRAY_SIZE, (SQLPOINTER)1, SQL_IS_UINTEGER); ERRSHANDLE(SQL_HANDLE_STMT, hstmt, SQL_SUCCESS, rc, szSQLSETDESCFIELD); // Re-execute the query rc = SQLExecDirect(hstmt, szQuery, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); // Fetch all the rows and check the bound value with MakeAData for // each column for (row=1, rc=SQL_SUCCESS; rc == SQL_SUCCESS; row++) { rc=SQLFetchScroll(hstmt, SQL_FETCH_NEXT, 1); // Will return SQL_NO_DATA after last row if (SQL_SUCCESS == rc) { // Compare all the columns for (icol=1, rgbValue=rgbMemBuf, pcbValue=pcbValueBuf; icol <= ccol; icol++, rgbValue+=MAX_STRING_SIZE, pcbValue++) { CompareWithExpected(rgbValue, pcbValue, row, icol, rgFields); } } else ERRSHANDLE(SQL_HANDLE_STMT, hstmt, SQL_NO_DATA, rc, szSQLFETCHSCROLL); } } ExitUseDesc: rc=SQLFreeStmt(hstmt, SQL_CLOSE); RETCHECK(SQL_SUCCESS, rc,szSQLFREESTMT); if (rgbMemBuf) ReleaseMemory(rgbMemBuf); if (pcbValueBuf) ReleaseMemory(pcbValueBuf); } // TestUseDesc //----------------------------------------------------------------------- // Function: TestEnvAttr // // Note: Only one environment attribute (SQL_ATTR_OUTPUT_NTS) exists at this // time. The default value is SQL_TRUE. // // For the Environment attributes we assume support if DM version >= 3.00 //----------------------------------------------------------------------- void TestEnvAttr() { SQLINTEGER sdwEnvAttr; SQLRETURN rc; HENV tshenv; BOOL fSetSupported = Supported(SQL_API_SQLSETENVATTR), fGetSupported = Supported(SQL_API_SQLGETENVATTR); LONG DEFAULT_ODBC_VERSION; //allocate an enviroment handle rc = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &tshenv); RETCHECK(SQL_SUCCESS, rc,szSQLALLOCHANDLE); //------------------------------- //-------- SQLSetEnvAttr -------- //------------------------------- // Set to SQL_FALSE rc = SQLSetEnvAttr(tshenv, SQL_ATTR_ODBC_VERSION, (PTR)SQL_OV_ODBC3, SQL_IS_UINTEGER); if(!fSetSupported) { if (!FindError(SQL_HANDLE_ENV,szIM001)) DISPLAYERROR(szSQLSETENVATTR, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLSETENVATTR); } else RETCHECK(SQL_SUCCESS, rc,szSQLSETENVATTR); if (RC_SUCCESSFUL(rc)) { // Read it again rc = SQLGetEnvAttr(tshenv, SQL_ATTR_ODBC_VERSION, &sdwEnvAttr, sizeof(sdwEnvAttr), NULL); if(!fGetSupported) { if (!FindError(SQL_HANDLE_ENV,szIM001)) DISPLAYERROR(szSQLGETENVATTR, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLGETENVATTR); } else RETCHECK(SQL_SUCCESS, rc,szSQLGETENVATTR); if (RC_SUCCESSFUL(rc) && (SQL_OV_ODBC3 != sdwEnvAttr)) { // New value wrong DISPLAYERROR(szSQLSETENVATTR,TEXT("Unable to set environment attribute SQL_ATTR_ODBC_VERSION to SQL_OV_ODBC3.")); } } rc = SQLFreeHandle(SQL_HANDLE_ENV,tshenv); RETCHECK(SQL_SUCCESS, rc,szSQLFREEHANDLE); //------------------------------- //-------- SQLGetEnvAttr -------- //------------------------------- rc = SQLAllocEnv(&tshenv); RETCHECK(SQL_SUCCESS, rc,szSQLALLOCENV); rc = SQLGetEnvAttr(tshenv, SQL_ATTR_ODBC_VERSION, &sdwEnvAttr, sizeof(sdwEnvAttr), NULL); if(!fGetSupported) { if (!FindError(SQL_HANDLE_ENV,szIM001)) DISPLAYERROR(szSQLGETENVATTR, szNotSupported); RETCHECK(SQL_ERROR, rc,szSQLGETENVATTR); } else RETCHECK(SQL_SUCCESS, rc,szSQLGETENVATTR); DEFAULT_ODBC_VERSION = SQL_OV_ODBC2; if (RC_SUCCESSFUL(rc) && (DEFAULT_ODBC_VERSION != sdwEnvAttr)) { // Default value wrong sprintf(buf, TEXT("Value was not %d!"), DEFAULT_ODBC_VERSION); DISPLAYERROR(szSQLGETENVATTR,buf); } rc = SQLFreeHandle(SQL_HANDLE_ENV,tshenv); RETCHECK(SQL_SUCCESS, rc,szSQLFREEHANDLE); } //TestEnvAttr() //----------------------------------------------------------------------- // Function: GetRowCnt // // Get the row count of the table lpqt->szTalbeName //----------------------------------------------------------------------- SWORD GetRowCnt(QTSTRUCT *lpqt) { SWORD sRowCnt; RETCODE rc; // free the statment handle for a fresh start FreeStmt(SQL_DROP); AllocHstmt(); //get row count for the table sprintf(lpqt->sz,TEXT("select count(*) from %s"), lpqt->szTableName); rc = SQLExecDirect(hstmt, lpqt->sz, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLEXECDIRECT); rc = SQLFetch(hstmt); RETCHECK(SQL_SUCCESS, rc,szSQLFETCH); rc = SQLGetData(hstmt,1, SQL_C_SSHORT, &sRowCnt, sizeof(sRowCnt), NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETDATA); FreeStmt(SQL_CLOSE); return sRowCnt; }//GetRowCount //----------------------------------------------------------------------- // Function: InsertOneRow // // Insert one row into the table. // // lpqt: temp place to hold data genrated // rgFields: hold info about each data type in the dbs // cTypes; the count of data types // lpd: buffer used for SQLBindParam // cSeed; the seed used to generate data // fFreeHsmt: if the hstmt should be freed // // Return TRUE: the insertion was successful // FALSE: otherwise //----------------------------------------------------------------------- BOOL InsertOneRow(QTSTRUCT *lpqt,FIELDINFO *rgFields,UWORD cTypes, DSTRUCT *lpd,UWORD cSeed,BOOL fFreeHstmt) { RETCODE rc; UWORD w; UWORD ind; LPTSTR pch=NULL; SQLHDESC hdesc; SQLSMALLINT fParamType = SQL_PARAM_INPUT; CHAR szDataItem[150]; //prepare the insert statement rc = SQLPrepare(hstmt, szInsertStmt, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLPREPARE); //going through each data type, call SQLBindParam for(ind = 0, w = 0; ind < cTypes; ind++) { //make data according to data type description in rgFields[], cSeed is the seed pch = qtMakeData(cSeed,ind,&rgFields[ind], szDataItem); //if the data type is READ_ONLY, skip if(!pch) continue; //populate the NULL data if(*pch) { _tcscpy(lpd[w].data, pch); lpd[w].cb = SQL_NTS; } else { _tcscpy(lpd[w].data,TEXT("")); lpd[w].cb = SQL_NULL_DATA; } if (g_f3XDriver && Supported(SQL_API_SQLSETDESCFIELD)) // if (0) //DEBUG { //bind the data buffer in lpd[] to each column of the table rc = SQLBindParam(hstmt, (SQLSMALLINT)(w+1),SQL_C_CHAR, rgFields[ind].wSQLType, rgFields[ind].precision, rgFields[ind].scale, &lpd[w].data, &lpd[w].cb); RETCHECK(SQL_SUCCESS, rc,szSQLBINDPARAM); if(rc!= SQL_SUCCESS) return FALSE; //get the driver parameter descriptor handle rc = SQLGetStmtAttr(hstmt,SQL_ATTR_IMP_PARAM_DESC, &hdesc, sizeof(hdesc),NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETSTMTATTR); if(rc!= SQL_SUCCESS) return FALSE; //set the parameter type field in the descriptor rc = SQLSetDescField(hdesc, (SQLSMALLINT)(w+1), SQL_DESC_PARAMETER_TYPE, (PTR)fParamType, sizeof(fParamType)); RETCHECK(SQL_SUCCESS, rc,szSQLSETDESCFIELD); } else { rc = SQLBindParameter(hstmt, (UWORD)(w+1),SQL_PARAM_INPUT,SQL_C_CHAR, rgFields[ind].wSQLType, rgFields[ind].precision, rgFields[ind].scale,&lpd[w].data, 100, &lpd[w].cb); RETCHECK(SQL_SUCCESS, rc,szSQLBINDPARAMETER); if(rc!= SQL_SUCCESS) return FALSE; } //go on to next column w++; } // insert a row rc = SQLExecute(hstmt); RETCHECK(SQL_SUCCESS, rc,szSQLEXECUTE); if(rc!= SQL_SUCCESS) return FALSE; //free the hstmt if required if(fFreeHstmt) { if (FreeStmt(SQL_CLOSE)) return FALSE; } return TRUE; } //InsertOneRow //----------------------------------------------------------------------- // Function: ExecEndTran // // Execute EndTran statement, return the row count of the table //----------------------------------------------------------------------- SWORD ExecEndTran(QTSTRUCT *lpqt,FIELDINFO *rgFields,UWORD cTypes, DSTRUCT *lpd,SQLSMALLINT fHandleType, SQLSMALLINT fMode, UWORD cSeed) { RETCODE rc; //does not free the hstmt if(!InsertOneRow(lpqt,rgFields,cTypes,lpd,cSeed, FALSE)) return (INSERT_FAIL); switch(fHandleType) { case SQL_HANDLE_ENV: rc= SQLEndTran(fHandleType,henv,fMode); break; case SQL_HANDLE_DBC: rc= SQLEndTran(fHandleType,hdbc,fMode); break; default: DISPLAYERROR(TEXT("ExecEndTran"),TEXT("Did not recieve correct handle type")); break; } RETCHECK(SQL_SUCCESS, rc,szSQLENDTRAN); if (SQL_COMMIT == fMode && SQL_SUCCESS == rc) guwRowCount++; // We inserted a row, increment global row count //free the hstmt handle FreeStmt(SQL_CLOSE); return(GetRowCnt(lpqt)); } //ExecEndTran //----------------------------------------------------------------------- // Function: TestEndTran // // Test the SQLEndTran for SDK 3.0 //----------------------------------------------------------------------- void TestEndTran(QTSTRUCT *lpqt,FIELDINFO *rgFields,UWORD cTypes, DSTRUCT *lpd) { SWORD i; RETCODE rc; SWORD sTXN; SWORD sRowCnt_Pre; SWORD sRowCnt_Aft; SQLSMALLINT fHandleType[]={SQL_HANDLE_ENV, SQL_HANDLE_DBC}; SDWORD cbValue=0; //check if transaction is supported rc = SQLGetInfo(hdbc, SQL_TXN_CAPABLE, &sTXN, sizeof(sTXN), NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO); //check both henv and hdbc handle for(i=0; i<=1; i++) { //get the row count of the table sRowCnt_Pre = GetRowCnt(lpqt); //check if SQLEndTran is supported if(Supported(SQL_API_SQLENDTRAN)) { if(sTXN != SQL_TC_NONE) { //set the autocommit to off SetConnectionAttributes(hdbc,SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF); //insert one row, and call SQLEndTran to roll back the transction sRowCnt_Aft = ExecEndTran(lpqt,rgFields,cTypes,lpd,fHandleType[i],SQL_ROLLBACK,(UWORD)(guwRowCount)); //the row count should be the same if(sRowCnt_Aft != sRowCnt_Pre) DISPLAYERROR(szSQLENDTRAN,TEXT("Did not Roll Back the insert transaction")); } //insert one row, and call SQLEndTran to commit the transction sRowCnt_Aft = ExecEndTran(lpqt,rgFields,cTypes,lpd,fHandleType[i],SQL_COMMIT,(UWORD)(guwRowCount)); //the row count should be increased by 1 if(sRowCnt_Aft != (sRowCnt_Pre+1) ) DISPLAYERROR(szSQLENDTRAN,TEXT("Did not commit the insert transaction")); if( sTXN != SQL_TC_NONE) { //set the autocommit to off SetConnectionAttributes(hdbc,SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF); } }//end of the situation where SQLEndTran is supported else { switch(fHandleType[i]) { case SQL_HANDLE_ENV: rc= SQLEndTran(fHandleType[i],henv,SQL_COMMIT); break; case SQL_HANDLE_DBC: rc= SQLEndTran(fHandleType[i],hdbc,SQL_ROLLBACK); break; } //check error msg if(!FindError(fHandleType[i],szIM001)) DISPLAYERROR(szSQLENDTRAN,TEXT("Did not return not Supported Message")); RETCHECK(SQL_ERROR, rc,szSQLENDTRAN); //free the hstmt handle FreeStmt(SQL_CLOSE); }//end of error msg checking }//end of the loop to check both henv and hdbc // Commit the transaction started in GetRowCnt inside ExecEndTran rc= SQLEndTran(SQL_HANDLE_ENV,henv,SQL_COMMIT); RETCHECK(SQL_SUCCESS, rc,szSQLENDTRAN); SetConnectionAttributes(hdbc,SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_ON); //free the hstmt handle FreeStmt(SQL_CLOSE); } // TestEndTran() //----------------------------------------------------------------------- // Function: TestBindParam // // Test the SQLBindParam for SDK 3.0 //----------------------------------------------------------------------- void TestBindParam(QTSTRUCT *lpqt,FIELDINFO *rgFields,UWORD cTypes, DSTRUCT *lpd) { RETCODE rc; SQLINTEGER cbValue = SQL_NTS; CHAR szDataItem[150]; if(Supported(SQL_API_SQLBINDPARAM)) { //test SQLBindParam by inserting one row, do not free the hstmt handle if (InsertOneRow(lpqt,rgFields,cTypes,lpd,(UWORD)(guwRowCount),FALSE)) guwRowCount++; // We've inserted a row } else { //prepare the insert statement rc = SQLPrepare(hstmt, szInsertStmt, SQL_NTS); RETCHECK(SQL_SUCCESS, rc,szSQLPREPARE); //make data according to data type description in rgFields[0], cSeed is the seed qtMakeData(cTypes+1,0,&rgFields[0],szDataItem); //try to bind lpqt->szDataItem to the first column of the table rc = SQLBindParam(hstmt,1,SQL_C_CHAR, rgFields[0].wSQLType, rgFields[0].precision, rgFields[0].scale,lpqt->szDataItem, &cbValue); //check error msg if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(szSQLBINDPARAM,TEXT("Did not return Not Supported Message")); RETCHECK(SQL_ERROR, rc,szSQLBINDPARAM); } //free the hstmt handle FreeStmt(SQL_CLOSE); } // TestBindParam() //----------------------------------------------------------------------- // Function: TestFetchScroll // // Test the SQLFetchScroll for SDK 3.0 //----------------------------------------------------------------------- void TestFetchScroll(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; CHAR szSave[MAX_QUERY_SIZE]; DWORD dwLen=0; SDWORD cbValue=0; /* check if SQLGetFunctions says your API is supported */ if(!Supported( SQL_API_SQLFETCHSCROLL)) { /* Call your 3.0 API here and verify that the correct state is returned */ rc = SQLFetchScroll(hstmt,SQL_FETCH_FIRST, 0); if(!FindError(SQL_HANDLE_STMT,szIM001)) DISPLAYERROR(szSQLFETCHSCROLL, szNotSupported); RETCHECK(SQL_ERROR, rc, szSQLFETCHSCROLL); } else { ResetHstmt(&hstmt); /* Valid Testing of SQLFetchScroll */ SelectFromTable(lpqt); rc = SQLBindCol(hstmt, 1, SQL_C_CHAR, lpqt->sz, sizeof(lpqt->sz), &cbValue); RETCHECK(SQL_SUCCESS, rc, szSQLBINDCOL); rc = SQLFetchScroll(hstmt, SQL_FETCH_NEXT, 3); RETCHECK(SQL_SUCCESS, rc, szSQLFETCHSCROLL); _tcscpy(szSave,lpqt->sz); rc = SQLFetchScroll(hstmt, SQL_FETCH_PRIOR, 1); RETCHECK(SQL_ERROR, rc, szSQLFETCHSCROLL); rc = SQLFetchScroll(hstmt, SQL_FETCH_FIRST, 0); RETCHECK(SQL_ERROR, rc, szSQLFETCHSCROLL); rc = SQLFetchScroll(hstmt, SQL_FETCH_LAST, 0); RETCHECK(SQL_ERROR, rc, szSQLFETCHSCROLL); rc = SQLFreeStmt(hstmt, SQL_CLOSE); RETCHECK(SQL_SUCCESS, rc, szSQLFREESTMT); } //free the hstmt handle FreeStmt(SQL_CLOSE); } // TestFetchScroll() /*-----------------------------------------------------------------------*/ /* Function: qtDisplayError */ /*-----------------------------------------------------------------------*/ void qtDisplayError(LPTSTR szFunction, LPTSTR buf, LPTSTR szFile, int iLine) { CHAR szTmp[MAX_STRING_SIZE]; szWrite(TEXT(""), TRUE); szWrite(TEXT("\t\t\t"), FALSE); szWrite(szFunction, FALSE); szWrite(TEXT(" FAILED"), TRUE); szWrite(TEXT("\t\t\t"), FALSE); szWrite(buf, TRUE); sprintf(szTmp,TEXT("\t\t\t%s: %d"), szFile, iLine); szWrite(szTmp, TRUE); szWrite(TEXT("\t\t\t -------- "), TRUE); lpSI->failed++; return; } /*-----------------------------------------------------------------------*/ /* Function: qtMakeData */ /*-----------------------------------------------------------------------*/ LPTSTR qtMakeData(int row, int col,FIELDINFO *rgField, LPTSTR buf) { int i; CHAR szColNum[10]; CHAR tmpbuf[256]; if(rgField->fAutoUpdate) return NULL; if(rgField->nullable && (row==col)) { _tcscpy(buf,TEXT("")); return buf; } switch(rgField->wSQLType) { case SQL_CHAR: case SQL_VARCHAR: case SQL_LONGVARCHAR: case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY: if(rgField->precision < (4*sizeof(CHAR)) ) sprintf(buf,TEXT("%d"), 1); else sprintf(buf,TEXT("%d%d"), row, row); break; case SQL_DECIMAL: case SQL_NUMERIC: case SQL_REAL: case SQL_FLOAT: case SQL_DOUBLE: if(row == 2 && !rgField->fUnsigned) /* make the second row negative for variety */ sprintf(buf,TEXT("-%d.%d"), row, row); else sprintf(buf,TEXT("%d.%d"), row, row); break; case SQL_BIT: if(row > 2) sprintf(buf,TEXT("%d"), 1); else sprintf(buf,TEXT("%d"), 0); break; case SQL_SMALLINT: case SQL_INTEGER: case SQL_TINYINT: case SQL_BIGINT: if(row == 2 && !rgField->fUnsigned) /* make the second row negative for variety */ sprintf(buf,TEXT("-%d"), row); else sprintf(buf,TEXT("%d"), row); break; case SQL_TIME: case SQL_TYPE_TIME: sprintf(buf,TEXT("{t '01:%02d:%02d'}"), row % 60, row % 60); break; case SQL_DATE: case SQL_TYPE_DATE: sprintf(buf,TEXT("{d '1994-%02d-%02d'}"), (row % 12) + 1, (row % 30) + 1); break; case SQL_TIMESTAMP: case SQL_TYPE_TIMESTAMP: // precision <= 16 means the timestamp column doesn't have enough precision to hold seconds if ( rgField->precision > 16 ) sprintf(buf,TEXT("{ts '1994-%02d-%02d 01:%02d:%02d'}"), (row % 12) + 1, (row % 30) + 1, row % 60, row % 60); else sprintf(buf,TEXT("{ts '1994-%02d-%02d 01:%02d:%02d'}"), (row % 12) + 1, (row % 30) + 1, row % 60, 0); break; case SQL_GUID: _itot(row, szColNum, 10); _tcscpy(tmpbuf, szColNum); for (i=0; i<11; i++){ _tcscat(tmpbuf, szColNum); } sprintf(buf, TEXT("%.8s-%.4s-%.4s-%.4s-%.12s"), tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf); break; } return buf; } /*-----------------------------------------------------------------------*/ /* Function: TestNumResCols */ /*-----------------------------------------------------------------------*/ VOID TestNumResCols(SDWORD cColsSelected,QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; SWORD wNum; SelectFromTable(lpqt); rc = SQLNumResultCols(hstmt, &wNum); RETCHECK(SQL_SUCCESS, rc,szSQLNUMRESULTCOLS); if(wNum != cColsSelected) DISPLAYERROR(szSQLNUMRESULTCOLS,TEXT("incorrect value returned")); FreeStmt(SQL_CLOSE); } /* TestNumResCols() */ /*-----------------------------------------------------------------------*/ /* Function: TestNumResCols */ /*-----------------------------------------------------------------------*/ VOID TestCursorName(QTSTRUCT *lpqt) { RETCODE rc=SQL_SUCCESS; CHAR szCursorName[MEDBUFF]; SWORD cb=0; SelectFromTable(lpqt); /* the cursor name should be created by the driver since one was */ /* not specified */ rc = SQLGetCursorName(hstmt, szCursorName, sizeof(szCursorName)/sizeof(CHAR), &cb); RETCHECK(SQL_SUCCESS, rc,szSQLGETCURSORNAME); if(cb > MAX_STRING_SIZE) { DISPLAYERROR(szSQLGETCURSORNAME,TEXT("invalid cb")); cb = MAX_STRING_SIZE; } /* don't check the name itself, just make sure that */ /* something was returned */ if(!*szCursorName) DISPLAYERROR(szSQLGETCURSORNAME,TEXT("no name returned")); FreeStmt(SQL_CLOSE); } /* TestCursorName() */ //----------------------------------------------------------------------- // Function: GetDMVersion //----------------------------------------------------------------------- UWORD GetDMVersion() { RETCODE rc=SQL_SUCCESS; CHAR szNum[MAX_NUM_BUFFER]; rc = SQLGetInfo(hdbc, SQL_ODBC_VER, szNum, sizeof(szNum), NULL); RETCHECK(SQL_SUCCESS, rc,szSQLGETINFO); return((UWORD)_ttoi(_tcstok(szNum,TEXT(".")))); } /* GetDMVersion() */ //----------------------------------------------------------------------- // Function: DisplayTestName //----------------------------------------------------------------------- VOID DisplayTestName(UWORD i) { szWrite(szBLANKLINE,TRUE); szWrite(szTAB,FALSE); szWrite(iTestNames[i-1], TRUE); } /* DisplayTestName() */ /*************************** External Interfaces *************************/ /* These functions are called by Gator to envoke the tests. */ /***************************************************************************/ BOOL AutoTestName(LPTSTR szName, UINT * cbTestCases) { static CHAR szTestName[] = TEXT("Another Quick Test"); _tcscpy(szName, szTestName); *cbTestCases = sizeof(iTestNames)/sizeof(LPTSTR); return TRUE; } //----------------------------------------------------------------------- // Function: AutoTestDesc // Purpose: Provides gator with a list of tests which can be run. //----------------------------------------------------------------------- BOOL AutoTestDesc(UWORD iTest, LPTSTR szName, LPTSTR szDesc) { UWORD len=0; if (iTest > (sizeof(iTestNames)/sizeof(LPTSTR))) return FALSE; if (szName) _tcscpy(szName,iTestNames[iTest-1]); if (szDesc) _tcscpy(szDesc,TEXT(" ")); return TRUE; } //----------------------------------------------------------------------- // Function: AutoTestFunc //----------------------------------------------------------------------- void AutoTestFunc(lpSERVERINFO pTestSource) { RETCODE rc; UWORD cTypes; UDWORD dwLen; UWORD fIndex; SDWORD cColsSelected; FIELDINFO *rgFields = (FIELDINFO *)AllocateMemory(sizeof(FIELDINFO) * MAX_TYPES_SUPPORTED); QTSTRUCT *lpqt = (QTSTRUCT *)AllocateMemory(sizeof (QTSTRUCT)); DSTRUCT *lpd = (DSTRUCT *)AllocateMemory(sizeof (DSTRUCT) * MAX_TYPES_SUPPORTED); UWORD uDMVer; SDWORD cbValue=0; CHAR szAPI[MEDBUFF]; UWORD i; CHAR szState[100]=TEXT(""), szErrMsg[XLARGEBUFF]=TEXT(""); lpSI = pTestSource; lpSI->failed = 0; henv = NULL; hdbc = NULL; hstmt = NULL; hdesc = NULL; if(lpSI->szValidServer0[0]) { if (Connect(lpSI,lpqt)) goto ErrorRet; } else { henv = lpSI->henv; hdbc = lpSI->hdbc; rc = SQLSetConnectOption(hdbc,SQL_ODBC_CURSORS,dwLen); _tcscpy(szAPI,szSQLSETCONNECTOPTION); if(RETCHECK(SQL_SUCCESS, rc,szAPI)) lpSI->vCursorLib = dwLen; } uDMVer=GetDMVersion(); fIndex=CheckConformanceLevel(); fBindParameter=Supported(SQL_API_SQLBINDPARAMETER); fDiagRecSupported=Supported(SQL_API_SQLGETDIAGREC); fDiagFieldSupported=Supported(SQL_API_SQLGETDIAGFIELD); AllocHstmt(); if (!(cTypes=GetTypeInfo(rgFields,lpqt))) goto ErrorRet; guwRowCount=cTypes+1; // Extra row inserted with DAE. // cTypes=20; //DEBUG // /* build create statement */ if (BuildCreateStmt(lpqt,rgFields,cTypes)) goto ErrorRet; /* put together the insert statement, and set the parameters */ /* parameters are only set the first time through, after which */ /* the contents of the pointers is changed */ if (BuildInsertStmt(lpqt, rgFields,cTypes,lpd,&cColsSelected,fBindParameter)) goto ErrorRet; CreateParamQuery(lpqt,rgFields,cTypes); for(i=1;i <= (sizeof(iTestNames)/sizeof(LPTSTR));i++) { lpqt->sz[0] = TEXT('\0'); if(GETBIT(pTestSource->rglMask,i)) { /* Display current Test */ DisplayTestName(i); switch(i) { case 1: TestConnectionOptions(); break; case 2: TestStmtOptions(); break; case 3: TestCursorName(lpqt); break; case 4: TestData(lpqt,rgFields,cTypes,lpd); break; case 5: TestNumResCols(cColsSelected,lpqt); break; case 6: TestMetaData(lpSI,lpqt,rgFields,cTypes); break; case 7: TestSearchedQuery(lpqt,rgFields,cTypes,lpd,fBindParameter); break; case 8: TestLargeQuery(lpqt,rgFields,cTypes,lpd); break; case 9: TestSQLTables(lpqt); break; case 10: TestSQLStatistics(lpqt,rgFields,cTypes,lpd,fIndex); break; case 11: TestSQLSpecialCols(lpqt); break; case 12: TestLikeQuery(lpqt,rgFields,cTypes,lpd); break; case 13: TestSQLForeignKeys(lpqt); break; case 14: TestSQLBrowseConnect(lpSI); break; case 15: TestSQLDataSources(); break; case 16: TestSQLDrivers(); break; case 17: TestSQLMoreResults(lpqt); break; case 18: TestSQLNativeSQL(lpqt); break; case 19: TestSQLDescribeParam(lpqt); break; case 20: TestSQLNumParams(lpqt); break; case 21: TestSQLParamOptions(lpqt); break; case 22: TestSQLPrimaryKeys(lpqt); break; case 23: TestSQLProcedures(); break; case 24: TestSQLTablePrivileges(); break; case 25: TestSQLColumnPrivileges(lpqt); break; case 26: TestSQLSetScrollOptions(); break; case 27: TestExtendedFetch(lpqt,rgFields,cTypes); break; case 28: TestOJCap(lpqt); break; case 29: TestSQLSetConnectAttr(); break; case 30: TestSQLSetStmtAttr(); break; case 31: TestThreading(lpSI,lpqt,rgFields); break; case 32: TestGetDescField(lpqt); break; case 33: TestSetDescField(lpqt); break; case 34: TestGetDescRec(lpqt); break; case 35: TestSetDescRec(lpqt); break; case 36: TestCopyDesc(lpqt); break; case 37: TestDescDefaults(lpqt); break; case 38: TestUseDesc(lpqt, rgFields); break; case 39: TestEnvAttr(); break; case 40: TestEndTran(lpqt,rgFields,cTypes,lpd); break; case 41: TestBindParam(lpqt,rgFields,cTypes,lpd); break; case 42: TestQuickRebind(lpqt,rgFields,cTypes,lpd); break; case 43: TestFetchScroll(lpqt); break; case 44: TestDiagRec(); break; case 45: TestDiagField(); break; case 46: TestMixedAnsiUnicode(lpqt); break; } /* switch(i) */ } /* if(GETBIT(pTestSource->rglMask,i)) */ } //the end of test cases for ODBC SDK 3.0 /* finished testing, clean up */ CleanUp(lpd,lpqt,rgFields,lpqt->szTableName,FALSE,lpSI->szValidServer0); szWrite(szBLANKLINE,TRUE); lpSI->cErrors = lpSI->failed; return; ErrorRet: /* a failure in an ODBC function that prevents completion of the */ /* test - for example, connect to the server */ szWrite(TEXT("\t\t *** Unrecoverable Quick Test FAILURE ***"), TRUE); /* finished testing, clean up */ CleanUp(lpd,lpqt,rgFields,lpqt->szTableName,FALSE,lpSI->szValidServer0); lpSI->cErrors = ABORT; return; } unixODBC-2.2.14-p2/samples/custom.c0100644000076400007640000003474207363332200015327 0ustar nicknick//*--------------------------------------------------------------------------------- //| Custom Auto Test DLL //| //| Title: CUSTOM.C //| //| Purpose: //| This sample Auto Test DLL shows how an ODBC auto test may be written and //| subsequently run via the ODBC Test application. To use this DLL: //| 1) Compile the source code via the BUILD.EXE program //| CUSTOM.C This shource file with test code //| CUSTOM.H Include files with defines, macros, and prototypes //| CUSTOM.RC Resource file for string tables //| (Note that .H and .RC files are optional in for an Auto Test) //| 2) Start the ODBC Test application //| 3) If you have not done so, choose Tools, Manage Test Sources and define //| a test source to run against //| 4) Choose Tools, Manage Tests and add the CUSTOM.DLL created in step 1 //| to the list of installed test DLLs //| 5) Choose Tools, Run Tests and select "Custom Auto Test" and your Test Source //| from step #3 //| For more details, please see the SDK documentation. //*--------------------------------------------------------------------------------- #include "autotest.h" #include "custom.h" //---------------------------------------------------------------------------------- // Defines and macros //---------------------------------------------------------------------------------- typedef SWORD (FAR PASCAL *TESTCASEFUNC)(HENV FAR *, HDBC FAR *, HSTMT FAR *, lpSERVERINFO); #define CHECKTEST(lps, exprc, actrc, func) \ { \ if(!CheckTest(lps, exprc, actrc, (LPSTR)func)) \ return TEST_ABORTED; \ } #define CHECKERRS(sErr) \ if(!sErr) szLogPrintf(lpSrvr, FALSE, "\t\tPassed\r\n\r\n"); \ else szLogPrintf(lpSrvr, FALSE, "\t\t%d errors\r\n\r\n", sErr); //---------------------------------------------------------------------------------- // Local function prototypes //---------------------------------------------------------------------------------- SWORD FAR PASCAL DoHelloWorld(HENV FAR * phenv, HDBC FAR * phdbc, HSTMT FAR * phstmt, lpSERVERINFO lpSrvr); SWORD FAR PASCAL DoDisplayInfoDesc(HENV FAR * phenv, HDBC FAR * phdbc, HSTMT FAR * phstmt, lpSERVERINFO lpSrvr); SWORD FAR PASCAL DoSimpleConnect(HENV FAR * phenv, HDBC FAR * phdbc, HSTMT FAR * phstmt, lpSERVERINFO lpSrvr); BOOL FAR PASCAL CheckTest(lpSERVERINFO lps, RETCODE exprc, RETCODE actrc, LPSTR szFuncName); // // This structure is declared to describe the test cases and descriptions // that this auto test supports. Note that the strings are stored in // the resource fork, but could have been hard coded. // struct { UINT uiName; // Test case name UINT uiDesc; // Test case description TESTCASEFUNC lpTestFunc; // Pointer to function to implement test } TestCases[] = { // szName szDesc lpTestFunc // -------------------- ----------------------- ------------------------ idsHelloWorld, idsHelloWorldDesc, DoHelloWorld, idsDisplayInfo, idsDisplayInfoDesc, DoDisplayInfoDesc, idsSimpleConnect, idsSimpleConnectDesc, DoSimpleConnect, }; //************************************************************************** //*************************** External Interfaces ************************ //* These functions are called by ODBC Test to gather run-time information //************************************************************************** //*--------------------------------------------------------------------------------- //| AutoTestName: //| This function is called to give the name of the auto test (which cannot //| exceed AUTO_MAX_TEST_NAME) as well as the number of test cases which //| are implemented in this test DLL. //| Parms: //| szName The name to be displayed //| pcbTestCases Pointer to count of test cases //| Returns: //| TRUE if successful (pcbTestCases set), FALSE for error //*--------------------------------------------------------------------------------- BOOL EXTFUN AutoTestName(LPSTR szName, UINT FAR * pcbTestCases) { strcpy( szName, "Custom Auto Test" ); *pcbTestCases = NumItems(TestCases); return TRUE; } //*--------------------------------------------------------------------------------- //| AutoTestDesc: //| This function is called by ODBC Test when a description of a specific //| test case is required. The returned name must be no larger than //| AUTO_MAX_TESTCASE_NAME including the NULL terminator. The returned //| description must be no larger than AUTO_MAX_TESTDESC_NAME including the //| NULL. iTest will be 1-based index of the test required. //| //| Note that iTest will start at 1 and will go to the number of //| test cases as specified by the AutoTestName function. //| //| Parms: //| iTest 1-based index of test case required //| szName The name of the test case //| szDesc A description of the test case //| Returns: //| TRUE if successful, FALSE for error //*--------------------------------------------------------------------------------- BOOL EXTFUN AutoTestDesc(UWORD iTest, LPSTR szName, LPSTR szDesc) { // Extra protection should AutoTestName return invalid pcbTestCases if(iTest > NumItems(TestCases)) return FALSE; // Use GetRCString to retrieve resource string directly into return // values switch( iTest ) { case 1: strcpy( szName, "Hello World" ); strcpy( szDesc, "Uses szLogPrintf and szMessageBox" ); break; case 2: strcpy( szName, "Display SERVERINFO" ); strcpy( szDesc, "Writes the contents of SERVERINFO" ); break; case 3: strcpy( szName, "Simple Connect" ); strcpy( szDesc, "Do a connect using SERVERINFO" ); break; } return TRUE; } //*--------------------------------------------------------------------------------- //| AutoTestFunc: //| This function is called to execute a test case selected by the user for //| execution. The lpSrvr structure contains the information required for //| connected (as defined in the chosen Test Source), as well as other //| usefull information. See the AUTOTEST.H file for the structure //| declaration. //| //| Use the GETBIT macro to determine which test should be executed. //| //| Parms: //| lpSrvr Information required for running the test //| Returns: //| Nothing //*--------------------------------------------------------------------------------- void EXTFUN AutoTestFunc(lpSERVERINFO lpSrvr) { HENV henv=NULL; HDBC hdbc=NULL; HSTMT hstmt0=NULL; int iDex; SWORD cErrCnt; // Count errors char szName[AUTO_MAX_TESTCASE_NAME+6]; // Room for NULL and \r\n // Sets the error count to 0 InitTest(lpSrvr); // Loop through the count of test cases looking for set bits via GETBIT. // When a bit is set, that test is to be run. We've stored the // function address which will implement the test, so simply call it. for(iDex=1; iDex<=NumItems(TestCases); iDex++) if(GETBIT(lpSrvr->rglMask, iDex)) { // Print out title of test switch( iDex ) { case 1: strcpy( szName, "Hello World" ); break; case 2: strcpy( szName, "Display SERVERINFO" ); break; case 3: strcpy( szName, "Simple Connect" ); break; } szLogPrintf(lpSrvr, FALSE, "%s:\r\n", (LPSTR)szName); // Call the test case and add errors cErrCnt = (*TestCases[(iDex-1)].lpTestFunc)(&henv, &hdbc, &hstmt0, lpSrvr); if(cErrCnt != TEST_ABORTED) lpSrvr->cErrors += cErrCnt; else goto abort; } return; // When a test must abort, the test case should call the AbortTest // macro which sets lpSrvr->cErrors to TEST_ABORTED. abort: return; } //************************************************************************** //***************************** Test Cases ******************************* //* The following functions implement the tests //************************************************************************** //*--------------------------------------------------------------------------------- //| DoHelloWord: //| This is a simple test which uses the szLogPrintf and szMessageBox //| functions defined in GATORTST.DLL. //| //| Note that this test also simulates an error by returning a count //| of 1. This value is then totaled by ODBC Test and displayed as //| part of the grand total. //| //| Returns: //| Number of Errors or TEST_ABORTED //*--------------------------------------------------------------------------------- SWORD FAR PASCAL DoHelloWorld(HENV FAR * phenv, HDBC FAR * phdbc, HSTMT FAR * phstmt, lpSERVERINFO lpSrvr) { SWORD sErr=1; // Pretend there was 1 error // The szMessageBox function will display a formatted message via the // Windows MessageBox function. This function should not be used // for standard testing since a good test will run unattended. szMessageBox(lpSrvr->hwnd, MB_ICONINFORMATION | MB_OK, "Hello World", "This is a sample message."); // The szLogPrintf function is preferred for output operations. It will // format your string using wvsprintf (which has a limit of 2000 characters) // and log the result both to the output window and to a file per // user instructions. szLogPrintf(lpSrvr, FALSE, "\tHello World!!\r\n"); // check for errors CHECKERRS(sErr); return sErr; } //*--------------------------------------------------------------------------------- //| DoDisplayInfoDesc: //| This test case will use the szLogPrintf function to dump the contents //| of the lpSrvr structure. //| //| Returns: //| Number of Errors or TEST_ABORTED //*--------------------------------------------------------------------------------- SWORD FAR PASCAL DoDisplayInfoDesc(HENV FAR * phenv, HDBC FAR * phdbc, HSTMT FAR * phstmt, lpSERVERINFO lpSrvr) { SWORD sErr=0; #ifndef WIN32 #define szAddress "%04X:%04X\r\n" #else #define szAddress "%08X\r\n" #endif // The hwnd parameter is the window of style "edit" which is used for output. // The szLogFile parameter is used for file logging of output. szLogPrintf(lpSrvr, FALSE, "\thwnd:\t\t\t\t\t\t\t%04X\r\n", lpSrvr->hwnd); szLogPrintf(lpSrvr, FALSE, "\tszLogFile:\t\t\t\t%s\r\n", (LPSTR)lpSrvr->szLogFile); // Print out address information. Note that szAddress is conditionaly compiled // to handle 16 and 32-bit. It will be concatenated to the format string // by the compiler to create a file platform correct string. szLogPrintf(lpSrvr, FALSE, "\thenv:\t\t\t\t\t\t\t" szAddress, lpSrvr->henv); szLogPrintf(lpSrvr, FALSE, "\thdbc:\t\t\t\t\t\t\t" szAddress, lpSrvr->hdbc); szLogPrintf(lpSrvr, FALSE, "\thstmt:\t\t\t\t\t\t\t" szAddress, lpSrvr->hstmt); // The following are defined via the Tools, Manage Test Sources dialog in // the ODBC Test application. szLogPrintf(lpSrvr, FALSE, "\tszSource:\t\t\t\t\t%s\r\n", (LPSTR)lpSrvr->szSource); szLogPrintf(lpSrvr, FALSE, "\tszValidServer0:\t\t\t\t\t\t%s\r\n", (LPSTR)lpSrvr->szValidServer0); szLogPrintf(lpSrvr, FALSE, "\tszValidLogin0:\t\t\t\t\t\t%s\r\n", (LPSTR)lpSrvr->szValidLogin0); szLogPrintf(lpSrvr, FALSE, "\tszValidPassword0:\t\t\t%s\r\n", (LPSTR)lpSrvr->szValidPassword0); szLogPrintf(lpSrvr, FALSE, "\tszKeywords:\t\t\t%s\r\n", (LPSTR)lpSrvr->szKeywords); // The following elements describe the run-time environment szLogPrintf(lpSrvr, FALSE, "\tcErrors:\t\t\t\t\t\t%d\r\n", (LPSTR)lpSrvr->cErrors); szLogPrintf(lpSrvr, FALSE, "\tfDebug:\t\t\t\t\t\t%d\r\n", (LPSTR)lpSrvr->fDebug); szLogPrintf(lpSrvr, FALSE, "\tfScreen:\t\t\t\t\t\t%d\r\n", (LPSTR)lpSrvr->fScreen); szLogPrintf(lpSrvr, FALSE, "\tfLog:\t\t\t\t\t\t\t\t%d\r\n", (LPSTR)lpSrvr->fLog); szLogPrintf(lpSrvr, FALSE, "\tfIsolate:\t\t\t\t\t\t%d\r\n", (LPSTR)lpSrvr->fIsolate); szLogPrintf(lpSrvr, FALSE, "\tvCursorLib:\t\t\t\t%lu\r\n", (LPSTR)lpSrvr->vCursorLib); szLogPrintf(lpSrvr, FALSE, "\thLoadedInst:\t\t\t%04X\r\n", (LPSTR)lpSrvr->hLoadedInst); // check for errors CHECKERRS(sErr); return sErr; } //*--------------------------------------------------------------------------------- //| DoSimpleConnect: //| This test case will use the information in SERVERINFO to make a connection //| to the chosen test source. //| //| Returns: //| Number of Errors or TEST_ABORTED //*--------------------------------------------------------------------------------- SWORD FAR PASCAL DoSimpleConnect(HENV FAR * phenv, HDBC FAR * phdbc, HSTMT FAR * phstmt, lpSERVERINFO lpSrvr) { RETCODE rc; SWORD sErr=0; // This test will assume that the ODBC handles passed in // are NULL. One could have this function do a connection // and pass the handles to other test functions. rc = SQLAllocEnv(phenv); CHECKTEST(lpSrvr, SQL_SUCCESS, rc, "SQLAllocEnv"); rc = SQLAllocConnect(*phenv, phdbc); CHECKTEST(lpSrvr, SQL_SUCCESS, rc, "SQLAllocConnect"); rc = SQLConnect(*phdbc, lpSrvr->szValidServer0, SQL_NTS, lpSrvr->szValidLogin0, SQL_NTS, lpSrvr->szValidPassword0, SQL_NTS); CHECKTEST(lpSrvr, (RETCODE)((rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) ? rc : SQL_SUCCESS), rc, "SQLConnect"); rc = SQLAllocStmt(*phdbc, phstmt); CHECKTEST(lpSrvr, SQL_SUCCESS, rc, "SQLAllocStmt"); rc = SQLFreeStmt(*phstmt, SQL_DROP); CHECKTEST(lpSrvr, SQL_SUCCESS, rc, "SQLFreeStmt"); rc = SQLDisconnect(*phdbc); CHECKTEST(lpSrvr, SQL_SUCCESS, rc, "SQLDisconnect"); rc = SQLFreeConnect(*phdbc); CHECKTEST(lpSrvr, SQL_SUCCESS, rc, "SQLFreeConnect"); rc = SQLFreeEnv(*phenv); CHECKTEST(lpSrvr, SQL_SUCCESS, rc, "SQLFreeEnv"); // check for errors CHECKERRS(sErr); return sErr; } //************************************************************************** //************************* Utility Functions **************************** //* This section contains internal utility functions //************************************************************************** //*--------------------------------------------------------------------------------- //| CheckTest: //| This function will do a simple comparison of return codes and issue //| erros on failure. Use the CHECKTEST macro to invoke. //| //| Returns: //| TRUE if the codes match, FALSE on error //*--------------------------------------------------------------------------------- BOOL FAR PASCAL CheckTest(lpSERVERINFO lps, RETCODE exprc, RETCODE actrc, LPSTR szFuncName) { if(exprc != actrc) { szLogPrintf(lps, FALSE, "\t%s failed:\r\n", (LPSTR)szFuncName); szLogPrintf(lps, FALSE, "\t\tExpected: %d\r\n", exprc); szLogPrintf(lps, FALSE, "\t\tActual: %d\r\n", actrc); return FALSE; } else return TRUE; } unixODBC-2.2.14-p2/samples/custom.h0100644000076400007640000000141007363332200015316 0ustar nicknick/*------------------------------------------------------------------------------ Custom Auto Test DLL Title: CUSTOM.H Purpose: This file contains the defines required for the resource strings in CUSTOM.RC. This file is optional for an auto test DLL. Note that user resource strings should start at 30001. ------------------------------------------------------------------------------*/ #ifndef _CUSTOM_DEFS #define _CUSTOM_DEFS #define idsTestName 30001 #define idsHelloWorld 30002 #define idsHelloWorldDesc 30003 #define idsDisplayInfo 30004 #define idsDisplayInfoDesc 30005 #define idsSimpleConnect 30006 #define idsSimpleConnectDesc 30007 #define PASCAL #define TRUE 1 #define FALSE 0 #endif unixODBC-2.2.14-p2/samples/helper.h0100644000076400007640000000340007363332200015264 0ustar nicknick/* * $Id: helper.h,v 1.1.1.1 2001/10/17 16:40:32 lurcher Exp $ * * $Log: helper.h,v $ * Revision 1.1.1.1 2001/10/17 16:40:32 lurcher * * First upload to SourceForge * * Revision 1.1 2001/05/10 05:52:01 nick * * Add helper.h * * Revision 1.2 2001/04/18 15:58:06 martin * Add string_param_status(). * * Revision 1.1 1999/02/12 15:16:49 martin * Initial revision * */ #include "autotest.h" typedef struct typeinfo { char local_name[100]; char type_name[100]; SQLSMALLINT sql_data_type; SQLINTEGER column_size; char create_params[256]; }typeinfo_t; SQLRETURN do_a_error( lpSERVERINFO srv_info, SQLSMALLINT type, SQLHANDLE handle, char *fn); SQLRETURN do_create_rows(lpSERVERINFO srv_info, SQLHDBC *hdbc, char *table); SQLRETURN do_table_info(lpSERVERINFO srv_info, SQLHDBC *hdbc); SQLRETURN do_type_info(lpSERVERINFO srv_info, SQLHDBC *hdbc, typeinfo_t *typeinfo); SQLRETURN do_get_dbtype(lpSERVERINFO srv_info, SQLHDBC *hdbc, SQLSMALLINT type, char *type_name, size_t len); SQLSMALLINT do_describe_params(lpSERVERINFO srv_info, SQLHSTMT *hstmt, SQLSMALLINT params); SQLRETURN do_create_table(lpSERVERINFO srv_info, SQLHDBC *hdbc, char *name, unsigned long flags, SQLINTEGER length, char *type, char *params); SQLRETURN do_get_info(lpSERVERINFO srv_info, SQLHDBC *hdbc, SQLUINTEGER *array_row_counts, SQLUINTEGER *array_selects, SQLUINTEGER *static_ca1, SQLUINTEGER *static_ca2); void string_row_status(SQLUSMALLINT status, char *string); char *string_param_status(SQLUSMALLINT status); #ifdef IN_HELPER_C extern unsigned int debug; #endif #define CREATE_TABLE_BIGCOL 0x1 unixODBC-2.2.14-p2/samples/libboundparam.exp0100644000076400007640000000005007432513327017177 0ustar nicknickAutoTestDesc AutoTestFunc AutoTestName